Fiber LogoFiber Docs
RPC API Reference

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 to
  • amount - u128, The amount of the TLC
  • payment_hash - Hash256, The payment hash of the TLC
  • expiry - u64, The expiry of the TLC
  • hash_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 from
  • tlc_id - u64, The ID of the TLC to remove
  • reason - 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 ID
  • commitment_number - u64, Commitment number

Returns

  • tx_hash - Hash256, Submitted commitment transaction hash

Method check_channel_shutdown

Manually trigger CheckShutdownTx on all channels

Params

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 from open_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 via submit_signed_funding_tx.

Fiber AI Assistant

Ask me anything

I can answer questions about Fiber Network using our documentation.

AI answers are based on Fiber documentation