Create Raw Transaction (Advanced)

Created by Admin KL, Modified on Thu, 10 Oct at 1:24 AM by Admin KL

1. What is a raw transaction (Advanced) on the Litecoin blockchain?
A raw transaction (Advanced) allows users to manually construct a Litecoin transaction with greater control, including selecting which specific UTXOs (Unspent Transaction Outputs) to spend. This version is ideal for more complex scenarios, such as when you need to manage UTXOs directly.


2. How do I create a raw transaction (Advanced) using the Kakr LiaaS API?
To create a raw transaction (Advanced), you send a POST request to the /api/Litecoin/Create-Raw-LTC-Transactions-v2 endpoint. This request requires details like sender's address, recipient's address, the amount, and the specific UTXOs you wish to use in the transaction.


3. Why is selecting UTXOs important for raw transactions?
Manually selecting UTXOs gives you more control over which unspent outputs are used to fund your transaction. This can be critical when managing funds, optimizing transaction fees, or resolving wallet issues (such as forgetting the wallet name).


4. What headers are required for the API request?
You need the following headers in your POST request:

  • Content-Type: application/json
  • Authorization: Bearer <your API key>
  • Usev2: Set to true or yes to use version 2 of the API.

5. What information should be included in the request body?
The request body should include:

  • senderAddress: The Litecoin address sending the funds.
  • recipientAddress: The Litecoin address receiving the funds.
  • amount: The amount of Litecoin to be sent.
  • utxos: An array of unspent transaction IDs (UTXOs) to be used as inputs.
  • vouts_n: An array of output indices corresponding to the UTXOs.

6. How do I choose which UTXOs to use?
UTXOs (Unspent Transaction Outputs) represent funds that haven’t been spent yet. You can retrieve UTXOs from your wallet and manually select which ones to use by providing their transaction IDs (Txid) and the corresponding output indices (vouts_n).


7. What happens after I create a raw transaction (Advanced)?
Once the raw transaction is successfully created, it is broadcast to the Litecoin network, where miners validate it and add it to the blockchain. You will receive a confirmation that the transaction was successfully created.


8. Why should I use the Advanced version of creating raw transactions?
The Advanced version gives you complete control over which UTXOs to spend, making it suitable for situations where wallet management is necessary, such as forgotten wallet names or when managing multiple UTXOs for optimization.


9. Can I use Postman to create a raw transaction (Advanced)?
Yes, you can use Postman to test the raw transaction v2 endpoint. Simply make a POST request to /api/Litecoin/Create-Raw-LTC-Transactions-v2 with the necessary headers and body parameters (sender address, recipient address, UTXOs, etc.).


10. Is the raw transaction (Advanced) endpoint secure?
Yes, creating a raw transaction using the Advanced endpoint is secure. It requires a valid API key for authorization, and all communication with the Litecoin blockchain is encrypted, ensuring your transaction data remains safe.


11. Where can I learn more about UTXOs?
Before using this endpoint, it is recommended to review the What are UTXOs and How to spend UTXOs manually pages to gain a better understanding of UTXO management and its role in Litecoin transactions.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article