useSolanaTransaction

This is the hook that will be used to send a transaction.

Import

1import { useSolanaTransaction } from "@account-kit/react";

Usage

1const {mutate} = useSolanaTransaction({
2policyId: "<policyId>",
3});
4
5mutate({
6transfer: {
7amount: <amount:number>,
8toAddress: "<toAddress>",
9},

Parameters

opts

SolanaTransactionHookParams Options for the hook to get setup, The transaction is required.

Returns

SolanaTransaction The transaction hook.