Functions
useSignTransaction
Call Signature
useSignTransaction<
TWalletAccount
>(uiWalletAccount
,chain
): (input
) =>Promise
<SolanaSignTransactionOutput
>
Use this to get a function capable of signing a serialized transaction with the private key of a UiWalletAccount
Type Parameters
Type Parameter |
---|
TWalletAccount extends UiWalletAccount |
Parameters
Parameter | Type | Description |
---|---|---|
uiWalletAccount | TWalletAccount | - |
chain | OnlySolanaChains <TWalletAccount ["chains" ]> | The identifier of the chain the transaction is destined for. Wallets may use this to simulate the transaction for the user. |
Returns
(
input
):Promise
<SolanaSignTransactionOutput
>
Parameters
Parameter | Type |
---|---|
input | Input |
Returns
Promise
<SolanaSignTransactionOutput
>
Example
Call Signature
useSignTransaction<
TWalletAccount
>(uiWalletAccount
,chain
): (input
) =>Promise
<SolanaSignTransactionOutput
>
Use this to get a function capable of signing a serialized transaction with the private key of a UiWalletAccount
Type Parameters
Type Parameter |
---|
TWalletAccount extends UiWalletAccount |
Parameters
Parameter | Type | Description |
---|---|---|
uiWalletAccount | TWalletAccount | - |
chain | `solana:${string}` | The identifier of the chain the transaction is destined for. Wallets may use this to simulate the transaction for the user. |
Returns
(
input
):Promise
<SolanaSignTransactionOutput
>
Parameters
Parameter | Type |
---|---|
input | Input |
Returns
Promise
<SolanaSignTransactionOutput
>