types

package
v0.0.0-...-99ea1f7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// module name
	ModuleName = "swingset"

	// StoreKey to be used when creating the KVStore
	StoreKey = ModuleName
)
View Source
const EmptyMailboxValue = `"{\"outbox\":[], \"ack\":0}"`
View Source
const RouterKey = ModuleName // this was defined in your key.go file

Variables

View Source
var (
	DataPrefix   = []byte(StoreKey + "/data")
	KeysPrefix   = []byte(StoreKey + "/keys")
	EgressPrefix = []byte(StoreKey + "/egress")
)
View Source
var ModuleCdc *codec.Codec

Functions

func Nat

func Nat(num float64) (int, error)

FIXME: Should have @agoric/nat

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

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"`
}

func NewEgress

func NewEgress(nickname string, peer sdk.AccAddress) Egress

type Keys

type Keys struct {
	Keys []string `json:"keys"`
}

func NewKeys

func NewKeys() Keys

type Messages

type Messages struct {
	Nums     []int
	Messages []string
	Ack      int
}

func UnmarshalMessagesJSON

func UnmarshalMessagesJSON(jsonString string) (*Messages, error)

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) Type

func (msg MsgProvision) Type() string

Type should return the action

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) Route

func (msg MsgSendPacket) Route() string

Route implements sdk.Msg

func (MsgSendPacket) Type

func (msg MsgSendPacket) Type() string

Type 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

func (QueryResKeys) String

func (r QueryResKeys) String() string

implement fmt.Stringer

type QueryResStorage

type QueryResStorage struct {
	Value string `json:"value"`
}

Query Result Payload for a storage query

func (QueryResStorage) String

func (r QueryResStorage) String() string

implement fmt.Stringer

type Storage

type Storage struct {
	Value string `json:"value"`
}

func NewMailbox

func NewMailbox() Storage

Returns a new Mailbox with an empty mailbox

func NewStorage

func NewStorage() Storage

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL