Sign Transaction

Signing a transaction involves using the private key associated with the input's address to sign the transaction inputs.

Sign a raw transaction (API reference)

POST /api/Litecoin/sign-Raw-LTC-Transactions

This post requests to sign a created raw transaction on the Litecoin blockchain

Headers

Name
Type
Description

Content-Type

application/json

Authorization*

Bearer <your api key>

Attach your API key here

wallet

String

Wallet name (optional)

Usev2*

String

Value should be true or yes

Request Body

Name
Type
Description

addressPrivateKey*

String

Sender's address private key

txhash*

String

The transaction hash gotten from the response of Create-Raw-Transaction Endpoint

Sign Raw Transaction with Javascript SDK

Liaas SDK package installation

/** 
 * Sign Raw Transaction on Litecoin Blockchain
**/
 
//all the parameters specified here are the same as all the parameters in the API implementation
//pass your API key or Node URL, wallet name, and the encrypted key
const response = await liaasSdk.signRawTransaction(
nodeUrl_or_apiAccessKey,
walletName,
encryptedpassphrase,
addressPrivateKey,
txhash);

Last updated