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
Name | Type | Default |
---|---|---|
transaction | AnyRawTransaction | |
signer | Account | |
network | NetworkInfo The network to use for the request. If not set, the network of the |
Return Type
Name | Type | Default |
---|---|---|
authenticator | AccountAuthenticator | |
rawTransaction | Uint8Array<ArrayBufferLike> |
Last updated on