broadcastSerializedTransaction

Broadcasts a serialized, signed transaction to be confirmed on the Solana network

(async() => {
    let broadcasted_tx = await SOLPay.broadcastSerializedTransaction([...]); // {"signature": "..."}
})();

Parameters:

  • serialized_transaction: Uint8Array - the serialized, signed transaction to broadcast, which can be obtained through the signTransaction method (signTransaction)

Returns:

object ({"signature": "..."}) - the transaction details

  • signature: string ("...") - the signature of the transaction

Throws:

  • SOL Pay SDK Fatal Error: Invalid serialized transaction ${serialized_transaction}. - an invalid serialized transaction was used

  • SOL Pay SDK Fatal Error: No connection found. Use SOLPay.connectNetwork() to connect to the Solana network. - could not find a connection to the Solana network

  • SOL Pay SDK Fatal Error: SOL Pay SDK Fatal Error: Unable to broadcast transaction. - was not able to broadcast the transaction

Last updated