Struct ChannelConfig

Channel configuration. These fields remain static throughout the lifetime of the channel. All of these fields are public and known by all participants in the channel.

struct ChannelConfig ;

Fields

NameTypeDescription
capacity AmountThe total amount funded in this channel. This information is derived from the Outputs of the funding transaction.
cooperative_close_timeout ulongHow long a node will wait for a response after some calls to closeChannel before the node decides to unilaterally close the channel. This is only an informative value and cannot be guaranteed by the protocol, but it gives well-behaved nodes an ability to mutually agree on a sufficiently long delay before a unilateral close is attempted.
funder_pk PublicKeyPublic key of the funder of the channel.
funding_tx TransactionThe funding transaction from which the trigger transaction may spend. This transaction is unsigned - only the funder may sign & send it to the agora network for externalization. The peer can retrieve the signature when it detects this transaction is in the blockchain.
funding_tx_hash geod24.bitblob.BitBlob!(64L)Hash of the funding transaction above.
funding_utxo_idx uintThe utxo that will actually be spent from the funding tx (just index 0)
gen_hash geod24.bitblob.BitBlob!(64L)Hash of the genesis block, used to determine which blockchain this channel belongs to.
is_private boolIf this channel should be kept private and reject any routing attempts
num_peers uintTotal number of co-signers needed to make update/settlement transactions in this channel.
peer_pk PublicKeyPublic key of the counter-party to the channel.
settle_time uintThe settle time to use for the settlement transactions. This time is verified by the OP.VERIFY_UNLOCK_AGE opcode in the lock script of the trigger / update transactions.
update_pair_pk PublicKeyThe public key sum used for validating Update transactions. This key is derived and remains static throughout the lifetime of the channel.

Methods

NameDescription
is_peer (key)
isNotValidOpenReason (txs) Whether this channel is to be considered valid and open, and why
pair_pk () Sum of funder_pk + peer_pk.

Aliases

NameDescription
chan_id The channel's ID is derived from the hash of the funding transaction.