Kit
Type aliases

SendTransactionApi

SendTransactionApi = object

Methods

sendTransaction()

Call Signature

sendTransaction(base64EncodedWireTransaction, config?): Signature

Parameters
ParameterType
base64EncodedWireTransactionBase64EncodedWireTransaction
config?Readonly<{ maxRetries?: bigint; minContextSlot?: Slot; preflightCommitment?: Commitment; skipPreflight?: boolean; }> & object
Returns

Signature

Deprecated

Set encoding to 'base64' when calling this method

Call Signature

sendTransaction(base64EncodedWireTransaction, config?): Signature

Submits a signed transaction to the cluster for processing.

This method does not alter the transaction in any way; it relays the transaction created by clients to the node as-is.

If the node's RPC service receives the transaction, this method immediately succeeds, without waiting for any confirmations. A successful response from this method does not guarantee the transaction will be processed or confirmed by the cluster.

While the RPC service will reasonably retry to submit it, the transaction could fail to be committed if the transaction's lifetime specifier (ie. its recent blockhash or nonce) expires before it lands.

Use GetSignatureStatusesApi.getSignatureStatuses to ensure that a transaction has been processed and confirmed.

Before submitting, the following preflight checks are performed:

  1. The transaction signatures are verified
  2. The transaction is simulated against the bank slot specified by the preflight commitment. On failure, an error will be returned. It is recommended to specify the same commitment and preflight commitment to avoid confusing behavior. You can disable preflight checks if desired.
Parameters
ParameterTypeDescription
base64EncodedWireTransactionBase64EncodedWireTransactionA fully signed transaction in wire format, as a base-64 encoded string. Use getBase64EncodedWireTransaction to obtain this.
config?Readonly<{ maxRetries?: bigint; minContextSlot?: Slot; preflightCommitment?: Commitment; skipPreflight?: boolean; }> & object-
Returns

Signature

The signature of the transaction, as a base-58 encoded string. This is the first signature in the transaction, which is used to uniquely identify it. You do not have to wait for this method to return to obtain the signature; you can extract it from the transaction before sending it.

See

https://solana.com/docs/rpc/http/sendtransaction

On this page