@xpla/use-wallet
TypeScript icon, indicating that this package has built-in type declarations

1.6.1 • Public • Published

@xpla/use-wallet

Core interface of @xpla/wallet-provider.

If you want to create a library using the useWallet() of @xpla/wallet-provider, you can use this @xpla/use-wallet instead of @xpla/wallet-provider for its internal dependence.

Because @xpla/wallet-provider contains multiple implementations, if your library is built on @xpla/wallet-provider, problems can arise in exceptional situations (e.g. when users implement and use Context themselves).

Using @xpla/use-wallet instead of @xpla/wallet-provider can make your library work reliably in a more diverse set of implementations.

You don't have to use this library if you're just creating a WebApp. Use @xpla/wallet-provider.

APIs

  • React context and hooks
    • const WalletContext = React.createContext()
    • useWallet(): Wallet
    • useConnectedWallet(): ConnectedWallet
  • Types
    • enum WalletStatus
    • enum ConnectType
    • type WalletInfo
    • type WalletStates
    • type NetworkInfo
    • type TxResult extends CreateTxOptions
    • type SignResult extends CreateTxOptions
    • type SignBytesResult
  • Error types
    • class UserDenied extends Error
    • class CreateTxFailed extends Error
    • class TxFailed extends Error
    • class Timeout extends Error
    • class TxUnspecifiedError extends Error

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.6.13latest
1.6.1-beta.11beta

Version History

VersionDownloads (Last 7 Days)Published
1.6.13
1.6.1-beta.11
1.5.212
1.5.10
1.5.1-beta.30
1.5.1-beta.20
1.5.1-beta.11
1.0.00
1.0.0-beta.80
1.0.0-beta.70
1.0.0-beta.61
1.0.0-beta.50
1.0.0-beta.40
1.0.0-beta.30
1.0.0-beta.20
1.0.0-beta.10
0.4.10
0.4.00
0.3.1020
0.3.90
0.3.80
0.3.70
0.3.60
0.3.50
0.3.40
0.3.30
0.3.20
0.3.10
0.3.00
0.2.90
0.2.80
0.2.70
0.2.60
0.2.40
0.2.30
0.2.20
0.2.10
0.2.00
0.0.100
0.0.90
0.0.80
0.0.70
0.0.60
0.0.50
0.0.40
0.0.30
0.0.20
0.0.10

Package Sidebar

Install

npm i @xpla/use-wallet

Weekly Downloads

38

Version

1.6.1

License

Apache-2.0

Unpacked Size

63.2 kB

Total Files

17

Last publish

Collaborators

  • zenaad-dev
  • junhee0
  • woosweb