Documentation ¶
Overview ¶
Package api defines the staking application API for other applications.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var MessageAccountHook = messageKind(0)
MessageAccountHook is the message kind for dispatching account hooks. The message itself implements the AccountHookInvocation interface.
Only the module that can handle the given destination should respond. The response value depends on the hook.
Functions ¶
This section is empty.
Types ¶
type AccountHookInvocation ¶
type AccountHookInvocation interface { // Kind is the invoked hook kind. Kind() staking.HookKind // DestinationMatches checks whether the destination matches the given destination. DestinationMatches(dst staking.HookDestination) bool }
AccountHookInvocation is the message body for dispatching account hooks.
type WithdrawHookInvocation ¶
type WithdrawHookInvocation struct { // Destination is the configured hook destination. Destination staking.HookDestination // From is the address of the source account. From staking.Address // To is the address of the account that is attempting withdrawal. To staking.Address // Amount is the amount that is being withdrawn. Amount *quantity.Quantity }
WithdrawHookInvocation is the message body for HookKindWithdraw hook dispatch.
func (*WithdrawHookInvocation) DestinationMatches ¶
func (wh *WithdrawHookInvocation) DestinationMatches(dst staking.HookDestination) bool
DestinationMatches checks whether the destination matches the given destination.
func (*WithdrawHookInvocation) Kind ¶
func (wh *WithdrawHookInvocation) Kind() staking.HookKind
Kind is the invoked hook kind.
Click to show internal directories.
Click to hide internal directories.