-
Notifications
You must be signed in to change notification settings - Fork 122
SPV RPC Calls
[spv_claimhtlc](#spv_claimhtlc) [spv_createanchor](#spv_createanchor) [spv_createanchortemplate](#spv_createanchortemplate) [spv_createhtlc](#spv_createhtlc) [spv_decodehtlcscript](#spv_decodehtlcscript) [spv_dumpprivkey](#spv_dumpprivkey) [spv_estimateanchorcost](#spv_estimateanchorcost) [spv_getaddresspubkey](#spv_getaddresspubkey) [spv_getbalance](#spv_getbalance) [spv_gethtlcseed](#spv_gethtlcseed) [spv_getnewaddress](#spv_getnewaddress) [spv_getrawtransaction](#spv_getrawtransaction) [spv_gettxconfirmations](#spv_gettxconfirmations) [spv_listanchors](#spv_listanchors) [spv_listanchorauths](#spv_listanchorauths) [spv_listanchorrewardconfirms](#spv_listanchorrewardconfirms) [spv_listanchorrewards](#spv_listanchorrewards) [spv_listanchorsunrewarded](#spv_listanchorsunrewarded) [spv_listanchorspending](#spv_listanchorspending) [spv_listhtlcoutputs](#spv_listhtlcoutputs) [spv_listtransactions](#spv_listtransactions) [spv_refundhtlc](#spv_refundhtlc) [spv_rescan](#spv_rescan) [spv_sendrawtx](#spv_sendrawtx) [spv_sendtoaddress](#spv_sendtoaddress) [spv_syncstatus](#spv_syncstatus)
- spv_claimhtlc
Arguments scriptaddress string HTLC address destinationaddress string Destination for funds in the HTLC seed string Seed that was used to generate the hash in the HTLC feerate number Feerate (satoshis) per KB (Default: 10000)
Results {
txid string The transaction id sendmessage string Send message result
}
- spv_createanchor
Arguments inputs JSON array of objects containing
txid string The transaction id of the bitcoin UTXO to spend vout number The output index to spend in UTXO amount number Amount of output in satoshis privkey string WIF private key of bitcoin for signing this output
rewardAddress string User's P2PKH address (in DeFi chain) for reward send bool Send it to btc network (Default = true) feerate number Feerate (satoshis) per 1000 bytes (Default = 1000)
Results txHex string The hex-encoded raw transaction with signature(s) txHash string The hex-encoded transaction hash
- spv_createanchortemplate
Argument rewardAddress string User's P2PKH address (in DeFi chain) for reward
Result txHex string The hex-encoded raw transaction with signature(s)
- spv_createhtlc
Arguments seller_key string The public key of the possessor of the seed refund_key string The public key of the recipient of the refund hash string SHA256 hash of the seed timeout string Timeout of the contract (denominated in blocks) relative to its placement in the blockchain
Results {
address string The value of the new Bitcoin address. redeemscript string The string value of the hex-encoded redemption script
}
- spv_decodehtlcscript
Argument redeemscript string The HTLC redeemscript
Results {
sellerkey string Seller public key buyerkey string Buyer public key blocks number Locktime in number of blocks hash string Hash of the seed
}
- spv_dumpprivkey
Argument address string The BTC address for the private key
Result key string The private key