Documentation ¶
Index ¶
- Constants
- Variables
- func Nat(num float64) (int, error)
- func RegisterCodec(cdc *codec.Codec)
- type ChannelKeeper
- type ClientKeeper
- type ConnectionKeeper
- type Egress
- type Keys
- type Messages
- type MsgDeliverInbound
- type MsgProvision
- type MsgSendPacket
- type PortKeeper
- type QueryResEgress
- type QueryResKeys
- type QueryResStorage
- type Storage
Constants ¶
const ( // module name ModuleName = "swingset" // StoreKey to be used when creating the KVStore StoreKey = ModuleName )
const EmptyMailboxValue = `"{\"outbox\":[], \"ack\":0}"`
const RouterKey = ModuleName // this was defined in your key.go file
Variables ¶
var ( DataPrefix = []byte(StoreKey + "/data") KeysPrefix = []byte(StoreKey + "/keys") EgressPrefix = []byte(StoreKey + "/egress") )
var ModuleCdc *codec.Codec
Functions ¶
func RegisterCodec ¶
RegisterCodec registers concrete types on the Amino codec
Types ¶
type ChannelKeeper ¶
type ChannelKeeper interface { GetChannel(ctx sdk.Context, srcPort, srcChan string) (channel channel.Channel, found bool) GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool) SendPacket(ctx sdk.Context, channelCap *capability.Capability, packet channelexported.PacketI) error PacketExecuted(ctx sdk.Context, channelCap *capability.Capability, packet channelexported.PacketI, acknowledgement []byte) error ChanOpenInit(ctx sdk.Context, order ibctypes.Order, connectionHops []string, portID, channelID string, portCap *capability.Capability, counterparty types.Counterparty, version string) (*capability.Capability, error) ChanCloseInit(ctx sdk.Context, portID, channelID string, chanCap *capability.Capability) error TimeoutExecuted(ctx sdk.Context, channelCap *capability.Capability, packet channelexported.PacketI) error }
ChannelKeeper defines the expected IBC channel keeper
type ClientKeeper ¶
type ClientKeeper interface {
GetClientConsensusState(ctx sdk.Context, clientID string) (connection clientexported.ConsensusState, found bool)
}
ClientKeeper defines the expected IBC client keeper
type ConnectionKeeper ¶
type ConnectionKeeper interface {
GetConnection(ctx sdk.Context, connectionID string) (connection connection.ConnectionEnd, found bool)
}
ConnectionKeeper defines the expected IBC connection keeper
type Egress ¶
type Egress struct { Nickname string `json:"nickname"` Peer sdk.AccAddress `json:"peer"` }
type Messages ¶
func UnmarshalMessagesJSON ¶
type MsgDeliverInbound ¶
type MsgDeliverInbound struct { Messages []string Nums []int Ack int Submitter sdk.AccAddress }
MsgDeliverInbound defines a DeliverInbound message
func NewMsgDeliverInbound ¶
func NewMsgDeliverInbound(msgs *Messages, submitter sdk.AccAddress) MsgDeliverInbound
func (MsgDeliverInbound) GetSignBytes ¶
func (msg MsgDeliverInbound) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgDeliverInbound) GetSigners ¶
func (msg MsgDeliverInbound) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgDeliverInbound) Route ¶
func (msg MsgDeliverInbound) Route() string
Route should return the name of the module
func (MsgDeliverInbound) Type ¶
func (msg MsgDeliverInbound) Type() string
Type should return the action
func (MsgDeliverInbound) ValidateBasic ¶
func (msg MsgDeliverInbound) ValidateBasic() error
ValidateBasic runs stateless checks on the message
type MsgProvision ¶
type MsgProvision struct { Nickname string `json:"nickname" yaml:"nickname"` Address sdk.AccAddress `json:"address" yaml:"address"` Submitter sdk.AccAddress `json:"submitter" yaml:"submitter"` }
MsgProvision defines a Provision message
func NewMsgProvision ¶
func NewMsgProvision(nickname string, addr sdk.AccAddress, submitter sdk.AccAddress) MsgProvision
func (MsgProvision) GetSignBytes ¶
func (msg MsgProvision) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgProvision) GetSigners ¶
func (msg MsgProvision) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgProvision) Route ¶
func (msg MsgProvision) Route() string
Route should return the name of the module
func (MsgProvision) ValidateBasic ¶
func (msg MsgProvision) ValidateBasic() error
ValidateBasic runs stateless checks on the message
type MsgSendPacket ¶
type MsgSendPacket struct { Packet chanTypes.Packet `json:"packet" yaml:"packet"` Sender sdk.AccAddress `json:"sender" yaml:"sender"` }
MsgSendPacket sends an outgoing IBC packet
func NewMsgSendPacket ¶
func NewMsgSendPacket(packet chanTypes.Packet, sender sdk.AccAddress) MsgSendPacket
NewMsgSendPacket returns a new send request
func (MsgSendPacket) GetSignBytes ¶
func (msg MsgSendPacket) GetSignBytes() []byte
GetSignBytes implements sdk.Msg
func (MsgSendPacket) GetSigners ¶
func (msg MsgSendPacket) GetSigners() []sdk.AccAddress
GetSigners implements sdk.Msg
func (MsgSendPacket) ValidateBasic ¶
func (msg MsgSendPacket) ValidateBasic() error
ValidateBasic implements sdk.Msg
type PortKeeper ¶
type PortKeeper interface {
BindPort(ctx sdk.Context, portID string) *capability.Capability
}
PortKeeper defines the expected IBC port keeper
type QueryResEgress ¶
type QueryResEgress struct {
Nickname string `json:"nickname"`
}
func (QueryResEgress) String ¶
func (r QueryResEgress) String() string
type QueryResKeys ¶
type QueryResKeys struct {
Keys []string `json:"keys"`
}
Query Result Payload for a keys query
type QueryResStorage ¶
type QueryResStorage struct {
Value string `json:"value"`
}
Query Result Payload for a storage query