Hooks
React hooks that provide deeper access into the wallet APIs
Inside the <ArweaveWalletKit>
, you can use all kinds of hooks that are reactive to the different strategies. Some of the hooks and/or api functions might not be supported by all wallets.
useConnection
useConnection
The core hook for connecting / disconnecting a strategy.
Usage
useApi
useApi
API hook. Returns the active strategy's API as an intractable object. Can be used to sign/encrypt, etc.
Usage
Some API functions might not be supported depending on the strategy the user chose. (e.g.: Othent does not support the signature()
function.
useProfileModal
useProfileModal
Toggle / display a modal with profile information and a disconnect button.
useActiveAddress
useActiveAddress
Active address hook. Requires the ACCESS_ADDRESS
and the ACCESS_ALL_ADDRESSES
permission.
Usage
usePublicKey
usePublicKey
Active address hook. Requires the ACCESS_PUBLIC_KEY
permission.
Usage
usePermissions
usePermissions
Permissions hook. Returns the permissions given to the app, known by Arweave Wallet Kit.
Usage
useAddresses
useAddresses
All addresses hook. Returns the addresses in the connected wallet, known by Arweave Wallet Kit. Requires the ACCESS_ALL_ADDRESSES
permission.
Usage
useWalletNames
useWalletNames
All addresses hook. Returns the addresses in the connected wallet, known by Arweave Wallet Kit. Requires the ACCESS_ALL_ADDRESSES
permission.
Usage
useStrategy
useStrategy
Active strategy hook. Returns the currently used strategy's ID ("arconnect", "webwallet"
, etc.)
Usage
Last updated