types

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2019 License: Apache-2.0 Imports: 4 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 ModuleCdc = codec.New()

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 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 {
	Peer      string
	Messages  []string
	Nums      []int
	Ack       int
	Submitter sdk.AccAddress
}

MsgDeliverInbound defines a DeliverInbound message

func NewMsgDeliverInbound

func NewMsgDeliverInbound(peer string, 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() sdk.Error

ValidateBasic runs stateless checks on the message

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