testapplication

package
v0.0.0-...-a86c377 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryResolve = "resolve" // used to get the value of the hash
	QueryOwner   = "owner"   // used to get owner
	QueryBol     = "bol"     // used for to query the entire bill of lading data
	QueryHashes  = "hashes"  // used for the interator to get all the hashes
)

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(keeper Keeper) sdk.Handler

func NewQuerier

func NewQuerier(keeper Keeper) sdk.Querier

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

RegisterCodec registers concrete types on wire codec

Types

type Bol

type Bol struct {
	Value string         `json:"value"`
	Owner sdk.AccAddress `json:"owner"`
}

Bol is a strcut containig the metadata of a hash

func NewBol

func NewBol(address sdk.AccAddress, value string) Bol

func (Bol) String

func (b Bol) String() string

implement fmt.Stringer

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

Keeper maintains the link to data storage and exposes getter/setter methods for the various parts of the state machine

func NewKeeper

func NewKeeper(coinKeeper bank.Keeper, storeKey sdk.StoreKey, cdc *codec.Codec) Keeper

NewKeeper creates new instances of the testapplication Keeper

func (Keeper) GetBol

func (k Keeper) GetBol(ctx sdk.Context, hash string) Bol

func (Keeper) GetHash

func (k Keeper) GetHash(ctx sdk.Context, hash string) string

Return the value of the hash to be used for hash check and comparison for example

func (Keeper) GetHashesIterator

func (k Keeper) GetHashesIterator(ctx sdk.Context) sdk.Iterator

Get an iterator over all hashes in which the keys are the names and the values are the whois

func (Keeper) GetOwner

func (k Keeper) GetOwner(ctx sdk.Context, hash string) sdk.AccAddress

func (Keeper) SetBol

func (k Keeper) SetBol(ctx sdk.Context, hash string, bol Bol)

Sets the entire Bol metadata struct for a hash

func (Keeper) SetOwner

func (k Keeper) SetOwner(ctx sdk.Context, hash string, owner sdk.AccAddress)

SetOwner function to change the owner if the bol is transmitted

type MsgCreateBol

type MsgCreateBol struct {
	Hash  string
	Owner sdk.AccAddress
}

func NewMsgCreateBol

func NewMsgCreateBol(hash string, owner sdk.AccAddress) MsgCreateBol

constructor function for MsgBuyName

func (MsgCreateBol) GetSignBytes

func (msg MsgCreateBol) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgCreateBol) GetSigners

func (msg MsgCreateBol) GetSigners() []sdk.AccAddress

GetSigners defines whose signature is required

func (MsgCreateBol) Route

func (msg MsgCreateBol) Route() string

func (MsgCreateBol) Type

func (msg MsgCreateBol) Type() string

func (MsgCreateBol) ValidateBasic

func (msg MsgCreateBol) ValidateBasic() sdk.Error

type MsgSendMoney

type MsgSendMoney struct {
	Destination sdk.AccAddress
	Amount      sdk.Coins
	Sender      sdk.AccAddress
}

func NewMsgSendMoney

func NewMsgSendMoney(destination sdk.AccAddress, amount sdk.Coins, sender sdk.AccAddress) MsgSendMoney

func (MsgSendMoney) GetSignBytes

func (msg MsgSendMoney) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgSendMoney) GetSigners

func (msg MsgSendMoney) GetSigners() []sdk.AccAddress

GetSigners defines whose signature is required

func (MsgSendMoney) Route

func (msg MsgSendMoney) Route() string

Route should return the name of the module

func (MsgSendMoney) Type

func (msg MsgSendMoney) Type() string

func (MsgSendMoney) ValidateBasic

func (msg MsgSendMoney) ValidateBasic() sdk.Error

type MsgTransmitBol

type MsgTransmitBol struct {
	Hash     string
	Owner    sdk.AccAddress
	NewOwner sdk.AccAddress
}

MsgBuyName defines the BuyName message

func NewMsgTransmitBol

func NewMsgTransmitBol(hash string, owner sdk.AccAddress, newOwner sdk.AccAddress) MsgTransmitBol

NewMsgBuyName is the constructor function for MsgBuyName

func (MsgTransmitBol) GetSignBytes

func (msg MsgTransmitBol) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgTransmitBol) GetSigners

func (msg MsgTransmitBol) GetSigners() []sdk.AccAddress

GetSigners defines whose signature is required

func (MsgTransmitBol) Route

func (msg MsgTransmitBol) Route() string

Route should return the name of the module

func (MsgTransmitBol) Type

func (msg MsgTransmitBol) Type() string

Type should return the action

func (MsgTransmitBol) ValidateBasic

func (msg MsgTransmitBol) ValidateBasic() sdk.Error

ValidateBasic runs stateless checks on the message

type QueryResHashes

type QueryResHashes []string

Query Result Payload for a names query

func (QueryResHashes) String

func (n QueryResHashes) String() string

implement fmt.Stringer

type QueryResResolve

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

Query Result Payload for a resolve query

func (QueryResResolve) String

func (r QueryResResolve) String() string

implement fmt.Stringer

Directories

Path Synopsis
cli

Jump to

Keyboard shortcuts

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