RPC API Reference
Module `Cch`
Cross Chain Hub demonstration RPC methods
Module Cch
RPC module for cross chain hub demonstration.
Method send_btc
Creates a CCH order for a BTC Lightning payee.
Params
btc_pay_req-String, Payment request string for the BTC Lightning payee.currency- Currency, Request currency
Returns
timestamp-u64, Seconds since epoch when the order is createdexpiry_delta_seconds-u64, Relative expiry time in seconds fromcreated_atthat the order expireswrapped_btc_type_script-Script, Wrapped BTC type scriptincoming_invoice- CchInvoice, Generated invoice for the incoming paymentoutgoing_pay_req-String, The final payee to accept the payment. It has the different network with incoming invoice.payment_hash- Hash256, Payment hash for the HTLC for both CKB and BTC.amount_sats-u128, Amount required to pay in Satoshis, including feefee_sats-u128, Fee in Satoshisstatus- CchOrderStatus, Order status
Method receive_btc
Creates a CCH order for a CKB Fiber payee.
Params
fiber_pay_req-String, Payment request string for the CKB Fiber payee.
Returns
timestamp-u64, Seconds since epoch when the order is createdexpiry_delta_seconds-u64, Relative expiry time in seconds fromcreated_atthat the order expireswrapped_btc_type_script-Script, Wrapped BTC type scriptincoming_invoice- CchInvoice, Generated invoice for the incoming paymentoutgoing_pay_req-String, The final payee to accept the payment. It has the different network with incoming invoice.payment_hash- Hash256, Payment hash for the HTLC for both CKB and BTC.amount_sats-u128, Amount required to pay in Satoshis, including feefee_sats-u128, Fee in Satoshisstatus- CchOrderStatus, Order status
Method get_cch_order
Get a CCH order by payment hash.
Params
payment_hash- Hash256, Payment hash for the HTLC for both CKB and BTC.
Returns
timestamp-u64, Seconds since epoch when the order is createdexpiry_delta_seconds-u64, Relative expiry time in seconds fromcreated_atthat the order expireswrapped_btc_type_script-Script, Wrapped BTC type scriptincoming_invoice- CchInvoice, Generated invoice for the incoming paymentoutgoing_pay_req-String, The final payee to accept the payment. It has the different network with incoming invoice.payment_hash- Hash256, Payment hash for the HTLC for both CKB and BTC.amount_sats-u128, Amount required to pay in Satoshis, including feefee_sats-u128, Fee in Satoshisstatus- CchOrderStatus, Order status