Version: 4.xAll useink
Hooks 🪝
- Like what you see? Please give it a star ⭐
- Don't see a feature you need? Create a feature request.
- Have a question? Join the useink Element chat.
Contracts
- useCall - call a contract and get the decoded result or an error.
- useCallSubscription - call a contract and get the decoded result or an error on each new block.
- useCodeHash - validate code hash values. Can be used when deploying contracts from hash.
- useContract - create a contract client instance containing metadata and the contract's address.
- useDeployer - deploy a contract from Wasm or a code hash on chain.
- useDryRun - send a dry run of a transaction to check if it will succeed and to determine gas costs.
- useEventSubscription - subscribe to a contract's emitted events.
- useEvents - fetch the events for a contract from state. Optionally filter by event name.
- useTxEvents - collect the events emitted in a single transaction. Used internally.
- useMetadata - load and validate a metadata file or contract file. Get the ABI for use with other hooks.
- useSalter - generate random salt hexidecimal values and validate them. Can be used with useDeployer.
- useTxPaymentInfo - send a dry run of a transaction and get the total payment information required.
- useTx - sign and send a contract transaction and get the decoded result or an error.
Wallets
- useAllWallets - get a list of all supported wallets including Talisman, PolkadotJs, and more.
- useInstalledWallets - get a list of all supported wallets that are installed in a user's browser extensions.
- useUnInstalledWallets - get a list of all supported wallets that are NOT installed in a user's browser extensions.
- useWallet - connect to a wallet browser extension, and get account information.
Substrate Runtime
- useApi - get the api client instance configured for a specific chain. This contains RPC information, and is used in many other hooks.
- useBalance - get an account's balance for a given chain.
- useBlockHeader - get block header information for a chain on each new block.
- useChainDecimals - get the decimal count for a chain. e.g.
12
- useTimestampDate - get block date on each new block.
- useTimestampNow - get block unix timestamp in milliseconds on each new block.
- useTimestampQuery - get a function that can be used to query timestamp info for a chain.
- useTokenSymbol - get the native token's symbol. e.g.
ROC
- useTransfer - transfer funds to another account.
Helpers
- useUnixMilliToDate - convert a unix timestamp in milliseconds to a JavaScript Date object.