Developer Docs: Build with Kakr Labs
HomeAPI PolicyPrivacy & TermsPlayground
  • Core Concepts
    • Core Concepts
      • Introduction
        • What is a Blockchain?
        • Litecoin as a Service (LiaaS)
        • Web2 Vs Web3
        • Category Codes
      • Transactions
        • Stages of a Litecoin Transaction
        • What are UTXOs?
        • How to spend UTXOs?
      • Assets
        • Collections
        • Tokens
        • Uploading and Pinning Files on IPFS
      • Wallet
        • Non custody wallet vs custody wallet
        • Hierarchical Deterministic wallets(HD Wallets)
        • Passphrase and Private key
      • Address
        • Default Address of Wallet
        • Official Address of Wallet
        • Key Differences
      • MimbleWimble (MWEB)
      • Multi-sig Concept
    • 💰Pricing
  • Solutions
    • Solutions
      • Payments
        • Peer-to-Peer Payments
        • Micropayments
        • Confidential Payments
      • Tokenization
        • Stablecoins
          • Proof of Loyalty
        • NFT Marketplace overview
          • NFT Marketplace
        • Industrial Tokenization
          • Energy Sector
      • Multi-signature
        • Assets Security
      • IPFS Gateway
        • Decentralized Storage (IPFS + Litecoin)
      • Decentralized Identity & Authentication
        • Decentralized Identity: Password Recovery via Litecoin Address Ownership
        • Decentralized Identity: Passwordless Agent Authentication
        • Decentralized Authentication
  • Using Pteri
    • 🤝Introduction
    • 😇Create an Account
    • 💰Get started
      • ⚕️Stats
      • 📖Debug
      • ➡️Work Flow
      • 🤑Subscription
      • 💆‍♂️Usage
      • 💆‍♂️Settings
    • ✨PTERI Intelligence
  • Pteri Wallet
    • 🔁Wallet Recovery Mechanism on Pteri
  • LiaaS
    • LiaaS
      • What Kakr LiaaS
      • Getting set up
        • Authentication
      • Kakr (LiaaS) Features
        • Address Features
        • Token Features
        • Wallet Features
      • Wallet System
        • Create Wallet
        • Create Importable Wallet
        • Encrypt Wallet
        • Create Encrypted Wallet
        • Create Importable Encrypted Wallet
        • Change wallet passphrase
        • Generate Address
        • Generate Default Address
        • Wallet official address
        • Wallet default address
        • Wallet default address v2
        • Wallet addresses
        • Wallet Balance
        • Address Details
        • Load Wallet
        • Import Wallet
        • Address Balance (Using Wallet)
        • Wallet Tokens
        • Create Multi Signature Address (preview)
      • Token Issuance
        • Create Collection
        • Create Tokens
          • Create Secure Digital Asset SDA (Alias NFT)
          • Create Token
          • Create Token v2
          • Create Managed Supply Tokens
          • Mint Supply Tokens
          • Burn Supply Tokens
      • Token Transfer
        • Send Token
        • Send SDA/NFT
      • Transactions
        • Send Litecoin
        • Create Raw Transaction
        • Create Raw Transaction (Advanced)
        • Sign Transaction
        • Broadcast Transaction
      • Blocks
        • Blocks Information
        • Blocks Stat
        • Blocks Header Information
        • Block Transactions
      • Others
        • 🔁Get SDA Transaction Details
        • 🔁Address Details
        • 🔁External Address Details
        • ⏺️Address Transactions
        • ⏺️Address Balance
        • 🔐Address Private Key
        • 🔐Address Private Key V2
        • 🚀NFT Details
        • 🚀NFT Balance
        • 🚀Token and Collection Balance
        • 📙Property Details
        • 💹Wallet Details
        • 🔼Generate passphrase
        • 💱Wallet Transactions
        • ✒️Sign Wallet message
        • 🖊️Sign Address Message
        • 💱Verify Message
        • 🗄️Upload to IPFS
        • 📌Pin on IPFS
  • API Reference
  • FAQs and Troubleshooting
  • Developers FAQs and Error Handling
Powered by GitBook
LogoLogo

© 2025 Kakr Platform Inc. All rights reserved

On this page

Was this helpful?

  1. Core Concepts
  2. Core Concepts
  3. Transactions

How to spend UTXOs?

PreviousWhat are UTXOs?NextAssets

Last updated 8 months ago

Was this helpful?

When you want to spend UTXOs of an address manually, you need to reference the specific transaction outputs (UTXOs) that you want to spend using Txid (transaction ID) and Vout (index number of the output in that transaction). Here’s how you can do it:

  1. Identify the UTXOs of an address you want to spend ():

    • Every UTXO is referenced by a Txid, which is the unique identifier of the transaction that created the output.

    • The Vout (or index) specifies the particular output in that transaction. If a transaction has multiple outputs, each one is assigned a number starting from 0.

  2. Construct a new raw transaction ():

    • Input: You specify the Txid and Vout of the UTXO you want to spend.

    • Output: You provide the address where you want to send the funds, along with the amount. Any change left over (if the UTXO is larger than the amount you want to send) is typically sent back to your own address as a new UTXO.

  3. Broadcast the transaction ():

    • After constructing the transaction, it needs to be signed with your private key () to prove that you own the UTXO.

    • The signed transaction is then broadcast to the blockchain network, where it gets verified and added to a block.

Example: Let’s assume you want to spend a UTXO with the following details:

  • Txid: a2f0c9... (a 64-character hexadecimal string representing the transaction).

  • Vout: 1 (the second output of the transaction, as Vout is indexed from 0).

Let's assume If the selected UTXO’s amount is insufficient for the transaction you want to execute. In such scenarios, you would need to select multiple UTXOs to cover the required amount. To do this, you would create an array of transaction IDs (utxos) and an array of output indices (vouts_n) to combine multiple UTXOs, thereby gathering enough funds to complete the transaction.

You would use these details to where this UTXO is spent as input. You can also retrieve UTXO details using our available under the Liaas (No Tokenization).

API
API
API
API
create a new raw transaction
API
Enterprise Plan