useSolanaTransaction
Defined in: account-kit/react/dist/types/hooks/useSolanaTransaction.d.ts:99
This is the hook that will be used to send a transaction. It will prioritize external connected Solana wallets, falling back to the internal signer when not connected. Supports sponsorship for both external wallets and internal signers.
Example
import { function useSolanaTransaction(opts?: SolanaTransactionHookParams): SolanaTransactionThis is the hook that will be used to send a transaction. It will prioritize external connected Solana wallets, falling back to the internal signer when not connected. Supports sponsorship for both external wallets and internal signers.
useSolanaTransaction } from "@account-kit/react"; const { const mutate: anymutate } = function useSolanaTransaction(opts?: SolanaTransactionHookParams): SolanaTransactionThis is the hook that will be used to send a transaction. It will prioritize external connected Solana wallets, falling back to the internal signer when not connected. Supports sponsorship for both external wallets and internal signers.
useSolanaTransaction({ policyId?: string | void | undefinedpolicyId: "<policyId>", }); const mutate: anymutate({ transfer: { amount: number; toAddress: string; }transfer: { amount: numberamount: 0, toAddress: stringtoAddress: "<toAddress>", }, });
Parameters
Returns
The transaction hook.