Skip to Content

🚧 These packages are still in development and may change rapidly as they are developed.

TypeScriptsignTransaction

signTransaction

This function is used to sign a transaction to be submitted later on the Aptos blockchain.

Usage

import { AptosJSProClient } from "@aptos-labs/js-pro"; import { Account } from "@aptos-labs/ts-sdk"; const client = new AptosJSProClient({ /* ... */ }); const transaction = await client.buildTransaction({ data: { function: "0x1::aptos_account::transfer", functionArguments: [recipient.accountAddress, 100], }, }); const signedTransaction = await client.signTransaction({ transaction });

Parameters

NameTypeDefault
transactionAnyRawTransaction
signerAccount
networkNetworkInfo

The network to use for the request. If not set, the network of the AptosJSProClient instance will be used.

Return Type

NameTypeDefault
authenticatorAccountAuthenticator
rawTransactionUint8Array<ArrayBufferLike>
Last updated on