types

package
v0.2.2-0...-13ba25a Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultCodeSpace cTypes.CodespaceType = ModuleName

	CodeInvalidInputsOutputs cTypes.CodeType = 701
	CodeUnauthorized         cTypes.CodeType = 702
)
View Source
const (
	ModuleName   = "orders"
	StoreKey     = ModuleName
	RouterKey    = StoreKey
	QuerierRoute = RouterKey
)

Variables

View Source
var ModuleCdc *codec.Codec
View Source
var (
	OrdersKey = []byte{0x07}
)

Functions

func ErrNoInputsOutputs

func ErrNoInputsOutputs(codeSpace cTypes.CodespaceType) cTypes.Error

func ErrUnauthorized

func ErrUnauthorized(codeSpace cTypes.CodespaceType) cTypes.Error

func GetOrderKey

func GetOrderKey(negotiationID negotiation.NegotiationID) []byte

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

func ValidateGensis

func ValidateGensis(data GenesisState) error

Types

type ACLKeeper

type ACLKeeper interface {
	GetAccountACLDetails(ctx cTypes.Context, fromAddress cTypes.AccAddress) (acl.ACLAccount, cTypes.Error)
}

type AccountKeeper

type AccountKeeper interface {
	GetAccount(ctx cTypes.Context, address cTypes.AccAddress) exported.Account
}

type BaseOrder

type BaseOrder struct {
	NegotiationID  negotiation.NegotiationID `json:"negotiation_id"`
	FiatPegWallet  types.FiatPegWallet       `json:"fiat_peg_wallet"`
	AssetPegWallet types.AssetPegWallet      `json:"asset_peg_wallet"`
	FiatProofHash  string                    `json:"fiat_proof_hash"`
	AWBProofHash   string                    `json:"awb_proof_hash"`
}

func (BaseOrder) GetAWBProofHash

func (baseOrder BaseOrder) GetAWBProofHash() string

func (BaseOrder) GetAssetPegWallet

func (baseOrder BaseOrder) GetAssetPegWallet() types.AssetPegWallet

func (BaseOrder) GetFiatPegWallet

func (baseOrder BaseOrder) GetFiatPegWallet() types.FiatPegWallet

func (BaseOrder) GetFiatProofHash

func (baseOrder BaseOrder) GetFiatProofHash() string

func (BaseOrder) GetNegotiationID

func (baseOrder BaseOrder) GetNegotiationID() negotiation.NegotiationID

func (*BaseOrder) SetAWBProofHash

func (baseOrder *BaseOrder) SetAWBProofHash(awbProofHash string)

func (*BaseOrder) SetAssetPegWallet

func (baseOrder *BaseOrder) SetAssetPegWallet(assetPegWallet types.AssetPegWallet)

func (*BaseOrder) SetFiatPegWallet

func (baseOrder *BaseOrder) SetFiatPegWallet(fiatPegWallet types.FiatPegWallet)

func (*BaseOrder) SetFiatProofHash

func (baseOrder *BaseOrder) SetFiatProofHash(fiatProofHash string)

func (*BaseOrder) SetNegotiationID

func (baseOrder *BaseOrder) SetNegotiationID(negotiationID negotiation.NegotiationID)

type CodeType

type CodeType cTypes.CodeType

type GenesisState

type GenesisState struct {
	Orders []Order `json:"orders"`
}

func DefaultGenesisState

func DefaultGenesisState() GenesisState

type NegotiationKeeper

type NegotiationKeeper interface {
	GetNegotiation(ctx cTypes.Context, id negotiation.NegotiationID) (negotiation.Negotiation, cTypes.Error)
}

type Order

type Order interface {
	GetNegotiationID() negotiation.NegotiationID
	SetNegotiationID(negotiation.NegotiationID)

	GetAssetPegWallet() types.AssetPegWallet
	SetAssetPegWallet(types.AssetPegWallet)

	GetFiatPegWallet() types.FiatPegWallet
	SetFiatPegWallet(types.FiatPegWallet)

	GetFiatProofHash() string
	SetFiatProofHash(string)

	GetAWBProofHash() string
	SetAWBProofHash(string)
}

func ProtoBaseOrder

func ProtoBaseOrder() Order

type OrderDecoder

type OrderDecoder func(orderBytes []byte) (Order, error)

Jump to

Keyboard shortcuts

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