Module types

Module types 

Source
Expand description

State machine types.

Structs§

ActionCancelPayment
The user requests the transfer to be cancelled. This state change can fail, it depends on the node’s role and the current state of the transfer.
ActionChannelClose
User is closing an existing channel.
ActionChannelCoopSettle
Cooperatively withdraw funds from channel back to both parties and close the channel in a single operation.
ActionChannelSetRevealTimeout
Change the reveal timeout value of a given channel.
ActionChannelWithdraw
Withdraw funds from channel.
ActionInitChain
Transition to initialize chain state
ActionInitInitiator
Initial state of a new mediated transfer.
ActionInitMediator
Initial state for a new mediator.
ActionInitTarget
Initial state for a new target.
ActionTransferReroute
A transfer will be rerouted.
BalanceProofState
Proof of a channel balance that can be used on-chain to resolve disputes.
Block
Transition used when a new block is mined.
ChainState
Umbrella object that stores the per blockchain state. For each registry smart contract there must be a token network registry. Within the token network registry the existing token networks and channels are registered.
ChannelEndState
The state of one of the nodes in a two party channel.
ChannelState
The state of a channel.“”“
ContractReceiveChannelBatchUnlock
All the locks were claimed via the blockchain. Used when all the hash time locks were unlocked and a log ChannelUnlocked is emitted by the token network contract. Note: For this state change the contract caller is not important but only the receiving address. receiver is the address to which the unlocked_amount was transferred. returned_tokens was transferred to the channel partner.
ContractReceiveChannelClosed
A channel to which this node IS a participant was closed.
ContractReceiveChannelDeposit
A channel to which this node IS a participant had a deposit.
ContractReceiveChannelOpened
A new channel was created and this node IS a participant.
ContractReceiveChannelSettled
A channel to which this node IS a participant was settled.
ContractReceiveChannelWithdraw
A channel to which this node IS a participant had a withdraw.
ContractReceiveRouteNew
New channel was created and this node is NOT a participant.
ContractReceiveSecretReveal
A new secret was registered with the SecretRegistry contract.
ContractReceiveTokenNetworkCreated
A new token was registered with the token network registry.
ContractReceiveTokenNetworkRegistry
Registers a new token network registry. A token network registry corresponds to a registry smart contract.
ContractReceiveUpdateTransfer
Participant updated the latest balance proof on-chain.
ContractSendChannelBatchUnlock
Look for unlocks that we should do after settlement
ContractSendChannelClose
Event emitted to close the netting channel. This event is used when a node needs to prepare the channel to unlock on-chain.
ContractSendChannelCoopSettle
Event emitted if node wants to cooperatively settle a channel.
ContractSendChannelSettle
Event emitted if the netting channel must be settled.
ContractSendChannelUpdateTransfer
Event emitted if the netting channel balance proof must be updated.
ContractSendChannelWithdraw
Event emitted if node wants to withdraw from current channel balance.
ContractSendEventInner
Common attributes of events which represent on-chain transactions.
ContractSendSecretReveal
Event emitted when the lock must be claimed on-chain.
CoopSettleState
The state of a pending cooperative settle underway.
DecryptedSecret
Type to hold a decrypted secret with metadata.
ErrorInvalidActionCoopSettle
Event emitted when an invalid coop-settle is initiated.
ErrorInvalidActionSetRevealTimeout
Event emitted when an invalid withdraw is initiated.
ErrorInvalidActionWithdraw
Event emitted when an invalid withdraw is initiated.
ErrorInvalidReceivedLockExpired
Event emitted when an invalid lock expired message is received.
ErrorInvalidReceivedLockedTransfer
Event emitted when an invalid locked transfer is received.
ErrorInvalidReceivedTransferRefund
Event emitted when an invalid refund transfer is received.
ErrorInvalidReceivedUnlock
Event emitted when an invalid unlock message is received.
ErrorInvalidReceivedWithdrawConfirmation
Event emitted when an invalid withdraw confirmation is received.
ErrorInvalidReceivedWithdrawExpired
Event emitted when an invalid withdraw expired event is received.
ErrorInvalidReceivedWithdrawRequest
Event emitted when an invalid withdraw request is received.
ErrorInvalidSecretRequest
Event emitted when an invalid SecretRequest is received.
ErrorPaymentSentFailed
Event emitted by the payer when a transfer has failed.
ErrorRouteFailed
Event emitted when a route failed. As a payment can try different routes to reach the intended target some of the routes can fail. This event is emitted when a route failed. This means that multiple EventRouteFailed for a given payment and it’s therefore different to EventPaymentSentFailed. A route can fail for two reasons:
ErrorUnexpectedReveal
Event emitted when an unexpected secret reveal message is received.
ErrorUnlockClaimFailed
Event emitted when a lock claim failed.
ErrorUnlockFailed
Event emitted when a lock unlock failed.
ExpiredWithdrawState
State of an expired withdraw.
FeeScheduleState
Mediation fee schedule parameters.
HashTimeLockState
Represents a hash time lock.
HopState
Information about the next hop.
InitiatorPaymentState
State of a payment for the initiator node. A single payment may have multiple transfers. E.g. because if one of the transfers fails or timeouts another transfer will be started with a different secrethash.
InitiatorTask
An initiator task.
InitiatorTransferState
State of a transfer for the initiator node.
Interpolate
Linear interpolation of a function with given points
LockedTransferState
A pending transfer state.
MediationFeeConfig
Configuration parameters of the mediator fee.
MediationPairState
State for a mediated transfer. A mediator will pay payee node knowing that there is a payer node to cover the token expenses. This state keeps track of transfers for the payer and payee, and the current state of the payment.
MediatorTask
A mediator task.
MediatorTransferState
State of a transfer for the mediator node. A mediator may manage multiple channels because of refunds, but all these channels will be used for the same transfer (not for different payments).
PFSUpdate
PFS state update notification.
PaymentMappingState
Global map from secrethash to a transfer task. This mapping is used to quickly dispatch state changes by secrethash, for those that don’t have a balance proof, e.g. SecretReveal. This mapping forces one task per secrethash, assuming that secrethash collision is unlikely. Features like token swaps, that span multiple networks, must be encapsulated in a single task to work with this structure.
PaymentReceivedSuccess
Event emitted when a payee has received a payment.
PaymentSentSuccess
Event emitted by the initiator when a transfer is considered successful.
PendingLocksState
List of encoded locks.
PendingWithdrawState
State of a pending withdraw.
Random
The channel’s pseudo random number generator.
ReceiveDelivered
A Delivered message was received.
ReceiveLockExpired
A LockExpired message received.
ReceiveProcessed
A processed message was received.
ReceiveSecretRequest
A SecretRequest message received.
ReceiveSecretReveal
A SecretReveal message received.
ReceiveTransferCancelRoute
A mediator sends us a refund due to a failed route.
ReceiveTransferRefund
A RefundTransfer message received.
ReceiveUnlock
An Unlock message received.
ReceiveWithdrawConfirmation
A Withdraw message was received.
ReceiveWithdrawExpired
A WithdrawExpired message was received.
ReceiveWithdrawRequest
A Withdraw message received.
RouteState
A possible route for a payment to a given target.
SendLockExpired
Sends a LockExpired to another node.
SendLockedTransfer
A locked transfer that must be sent to recipient.
SendMessageEventInner
Common message attributes.
SendProcessed
Send a Processed to another node.
SendSecretRequest
Event used by a target node to request the secret from the initiator (recipient).
SendSecretReveal
Sends a SecretReveal to another node.
SendUnlock
Event to send a balance-proof to the counter-party, used after a lock is unlocked locally allowing the counter-party to claim it.
SendWithdrawConfirmation
Event used by node to confirm a withdraw for a channel’s partner.
SendWithdrawExpired
Event used by node to expire a withdraw request.
SendWithdrawRequest
Event used by node to request a withdraw from channel partner.
TargetTask
A target task.
TargetTransferState
State of a transfer for the target node.“”“
TokenNetworkRegistryState
Corresponds to a token network registry smart contract.“”“
TokenNetworkState
Corresponds to a token network smart contract.“”“
TransactionChannelDeposit
Deposit transaction information.
TransactionExecutionStatus
The transaction execution status.
TransferDescriptionWithSecretState
Describes a transfer (target, amount, and token) and contains an additional secret that can be used with a hash-time-lock.
UnlockClaimSuccess
Event emitted when a lock claim succeded.
UnlockPartialProofState
Stores the lock along with its unlocking secret.
UnlockSuccess
Event emitted when a lock unlock succeded.
UpdateServicesAddresses
A RegisteredService contract event was received.
UpdatedServicesAddresses
Transition used when adding a new service address.
WaitingTransferState
Waiting transfer state.

Enums§

ChannelStatus
Vairants of the channel status
ContractSendEvent
An enum of the ContractSendEvent variants.
Event
An enum containing all possible event variants.
PayeeState
Variants of the payee states.
PayerState
Variants of the payers states.
SendMessageEvent
An enum of the SendEvent variants.
StateChange
An enum containing all possible state change variants.
TargetState
Variants of the target states.
TransactionResult
Transaction result state.
TransferRole
Determine the type of the transfer task.
TransferState
Variants of the transfer states.
TransferTask
Variants of transfer tasks.
WaitingTransferStatus
Variants of the waiting transfer status.