Broadcast Transaction

Broadcasting a transaction is the process of sending a signed transaction to the Litecoin network so that it can be validated and included in a block.

Broadcast transaction

POST /api/Litecoin/broadcast-transactions

This post requests to broadcast transactions on the Litecoin blockchain

Headers

NameTypeDescription

Content-Type

application/json

Authorization*

Bearer <your api key>

Attach your API key here

Encryptedkey*

String

Encrypted key

wallet*

String

Wallet name

Usev2

String

Value should be true or yes

Request Body

NameTypeDescription

signedTxHash*

String

Transaction hash response gotten from the sign-raw-transaction endpoint

Broadcast Transaction with Javascript SDK

Liaas SDK package installation

/** 
 * Broadcast Transactions on Litecoin Blockchain
 **/
 
 //all the parameters specified here are the same as all the parameters in the API implementation
 //pass your API key, wallet name, and the encrypted key
const response = await liaasSdk.broadcastTransaction(
apiAccessKey, 
walletName, 
encryptedpassphrase, 
signedTxHash);

Last updated