Fiber LogoFiber Docs
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 created
  • expiry_delta_seconds - u64, Relative expiry time in seconds from created_at that the order expires
  • wrapped_btc_type_script - Script, Wrapped BTC type script
  • incoming_invoice - CchInvoice, Generated invoice for the incoming payment
  • outgoing_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 fee
  • fee_sats - u128, Fee in Satoshis
  • status - 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 created
  • expiry_delta_seconds - u64, Relative expiry time in seconds from created_at that the order expires
  • wrapped_btc_type_script - Script, Wrapped BTC type script
  • incoming_invoice - CchInvoice, Generated invoice for the incoming payment
  • outgoing_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 fee
  • fee_sats - u128, Fee in Satoshis
  • status - 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 created
  • expiry_delta_seconds - u64, Relative expiry time in seconds from created_at that the order expires
  • wrapped_btc_type_script - Script, Wrapped BTC type script
  • incoming_invoice - CchInvoice, Generated invoice for the incoming payment
  • outgoing_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 fee
  • fee_sats - u128, Fee in Satoshis
  • status - CchOrderStatus, Order status

Fiber AI Assistant

Ask me anything

I can answer questions about Fiber Network using our documentation.

AI answers are based on Fiber documentation