Skip to Content

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

TypeScriptsubmitTransaction

submitTransaction

This function is used to submit signed transactions to the Aptos blockchain.

Usage

import { AptosJSProClient } from "@aptos-labs/js-pro"; const client = new AptosJSProClient({ /* ... */ }); const transaction = await client.buildTransaction({ /* ... */ }); const signedTransaction = await client.signTransaction({ transaction }); const transactionResponse = await client.submitTransaction({ senderAuthenticator: signedTransaction.authenticator, transaction: signedTransaction, });

Parameters

The submitTransaction function has two types of parameters: SubmitTransactionWithSignedTransactionParameters or SubmitTransactionWithRawTransactionParameters.

SubmitTransactionWithSignedTransactionParameters

NameTypeDefault
transactionSignedTransaction
networkNetworkInfo

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

SubmitTransactionWithRawTransactionParameters

NameTypeDefault
transactionAnyRawTransaction
senderAuthenticatorAccountAuthenticator
feePayerAuthenticatorAccountAuthenticator
additionalSignersAuthenticatorsAccountAuthenticator[]
pluginParamsRecord<string, any>

Additional parameters that will be passed to the transaction submitter plugin if configured.

transactionSubmitterTransactionSubmitter | null

You can set this to override the configured transaction submitter (if any). Conversely you can set this to null to ignore any configured transaction submitter.

networkNetworkInfo

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

Return Type

NameTypeDefault
typeTransactionResponseType.Pending
hashstring
senderstring
sequence_numberstring
max_gas_amountstring
gas_unit_pricestring
expiration_timestamp_secsstring
payloadTransactionPayloadResponse
signatureTransactionSignature
Last updated on