Litecoin
Litecoin Transactions Build, sign, broadcast Litecoin transactions, and compute signature hashes with Zafeguard Litecoin components.
Components for building, signing, and broadcasting Litecoin transactions, plus signature hash computation. Network access (UTXO fetch, fee estimate, broadcast) is handled by Zafeguard — no RPC URL required.
BROADCAST_LITECOIN_TRANSACTION Workflow Component
Broadcasts a finalized raw transaction to the Litecoin network and returns the transaction ID.
Field Type Required Description network'mainnet' | 'testnet'Yes Target Litecoin network
Field Type Description signedTransactionstring (hex)Raw transaction hex to broadcast
Field Type Description txidstringTransaction ID (64-char hex)
import { WorkspaceClient , ComponentModule } from '@zafeguard/caller-sdk' ;
const workspace = new WorkspaceClient ({ apiKey : process . env . ZAFEGUARD_API_KEY ! });
const result = await workspace . call ( ComponentModule . BROADCAST_LITECOIN_TRANSACTION , {
signedTransaction : 'deadbeef...' ,
}). promise ();
console . log ( result . txid );
BUILD_LITECOIN_TRANSACTION Workflow Component
Builds an unsigned PSBT with UTXO selection, fee estimation, and sighash generation. Supports optional locktime, OP_RETURN data, change address, and fee deduction.
Field Type Required Default Description paymentType'p2pkh' | 'p2sh-p2wpkh' | 'p2wpkh' | 'p2tr'Yes — Litecoin payment type (address format) network'mainnet' | 'testnet'Yes — Target Litecoin network deductFeebooleanNo falseWhen true, subtracts the estimated fee from amount instead of adding it on top
Field Type Description recipientAddressstringDestination Litecoin address amountnumberAmount to send in litoshis (1 LTC = 100,000,000 litoshis) publicKeystring (hex)Sender public key — compressed 33 bytes (66 hex) or uncompressed 65 bytes (130 hex) locktimestring | nullTransaction locktime as block height string. null to disable opReturnDatastring | nullHex data to embed in an OP_RETURN output. null to skip changeAddressstring | nullAddress for change output. null uses the sender's address feeRatenumber | nullCustom fee rate in lit/vByte . null falls back to the network's half-hour fee estimate. See Customizing Transaction Fees for rate selection guidance
Field Type Description unsignedTransactionstring (hex)Hex-encoded unsigned PSBT messageHashesstring[]Array of sighash hex strings, one per input (each 64 hex chars) estimatedFeenumberEstimated network fee in litoshis (using the chosen fee rate)
import { WorkspaceClient , ComponentModule } from '@zafeguard/caller-sdk' ;
const workspace = new WorkspaceClient ({ apiKey : process . env . ZAFEGUARD_API_KEY ! });
const result = await workspace . call ( ComponentModule . BUILD_LITECOIN_TRANSACTION , {
recipientAddress : 'ltc1q...' ,
amount : 50000 ,
publicKey : '02abc123...' ,
locktime : null ,
opReturnData : null ,
changeAddress : null ,
feeRate : null , // or e.g. 10 for 10 lit/vByte
}). promise ();
console . log ( result . unsignedTransaction );
console . log ( result . messageHashes ); // sign each of these
console . log ( result . estimatedFee );
SIGN_LITECOIN_TRANSACTION Workflow Component
Applies signatures to an unsigned PSBT and produces a finalized raw transaction ready to broadcast.
Field Type Description unsignedTransactionstring (hex)Hex-encoded PSBT from BUILD_LITECOIN_TRANSACTION signaturesstring[]Hex-encoded signatures, one per input publicKeystring (hex)Signer public key — compressed 33 bytes (66 hex) or uncompressed 65 bytes (130 hex)
Field Type Description signedTransactionstring (hex)Finalized raw transaction hex, ready to broadcast
COMPUTE_LITECOIN_SIGNATURE_HASH Workflow Component
Computes a signature hash for a message using either the standard Litecoin message format (\x19Litecoin Signed Message:\n) or raw double-SHA-256 hashing.
Field Type Required Description format'litecoin-message' | 'raw'Yes litecoin-message produces a standard signed-message hash. raw produces a double SHA-256 hash
Field Type Description messagestringMessage string to hash
Field Type Description messageHashstring32-byte hash as 64-char hex, ready for external signing