Module `Dev`
Development-only RPC methods
Module Dev
RPC module for development purposes, this module is not intended to be used in production. This module will be disabled in release build.
Method commitment_signed
Sends a commitment_signed message to the peer.
Params
channel_id- Hash256, The channel ID of the channel to send the commitment_signed message to
Returns
- None
Method add_tlc
Adds a TLC to a channel.
Params
channel_id- Hash256, The channel ID of the channel to add the TLC toamount-u128, The amount of the TLCpayment_hash- Hash256, The payment hash of the TLCexpiry-u64, The expiry of the TLChash_algorithm-Option<[HashAlgorithm](#type-hashalgorithm)>, The hash algorithm of the TLC
Returns
tlc_id-u64, The ID of the TLC
Method remove_tlc
Removes a TLC from a channel.
Params
channel_id- Hash256, The channel ID of the channel to remove the TLC fromtlc_id-u64, The ID of the TLC to removereason- RemoveTlcReason, The reason for removing the TLC, either a 32-byte hash for preimage fulfillment or an u32 error code for removal
Returns
- None
Method submit_commitment_transaction
Submit a commitment transaction to the chain
Params
channel_id- Hash256, Channel IDcommitment_number-u64, Commitment number
Returns
tx_hash- Hash256, Submitted commitment transaction hash
Method check_channel_shutdown
Manually trigger CheckShutdownTx on all channels
Params
channel_id- Hash256, Channel ID
Returns
- None
Method sign_external_funding_tx
Sign an external funding transaction with a provided private key.
This is a development-only RPC that signs an unsigned funding transaction
(returned from open_channel_with_external_funding) using the provided private key.
The signed transaction can then be submitted via submit_signed_funding_tx.
Params
unsigned_funding_tx-ckb_jsonrpc_types::Transaction, The unsigned funding transaction returned fromopen_channel_with_external_funding.private_key-String, The private key to sign the transaction, as a 0x-prefixed 32-byte hex string. Note: This is a development-only RPC and the private key is provided directly.
Returns
signed_funding_tx-ckb_jsonrpc_types::Transaction, The signed funding transaction that can be submitted viasubmit_signed_funding_tx.