negotiation

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: 16 Imported by: 0

README

Negotiation

types

negotiation.go
type Negotiation interface {
	GetNegotiationID() NegotiationID
	SetNegotiationID(NegotiationID) error

	GetBuyerAddress() ctypes.AccAddress
	SetBuyerAddress(ctypes.AccAddress) error

	GetSellerAddress() ctypes.AccAddress
	SetSellerAddress(ctypes.AccAddress) error

	GetTime() int64
	SetTime(int64) error
	
	GetPegHash() types.PegHash
	SetPegHash(types.PegHash) error

	GetBuyerSignature() Signature
	SetBuyerSignature(Signature) error

	GetSellerSignature() Signature
	SetSellerSignature(Signature) error

	GetBuyerBlockHeight() int64
	SetBuyerBlockHeight(int64) error

	GetSellerBlockHeight() int64
	SetSellerBlockHeight(int64) error
}
  • Base Negotiation interface

keys.go

  • negotiationKey
    • append(append(buyerAddress,sellerAddress),pegHash)

Keeper

type Keeper struct {
	storeKey      ctypes.StoreKey
	accountKeeper auth.AccountKeeper
	cdc           *codec.Codec
}

methods

  • setNegotiation
  • getNegotiation
  • getNegotiations

Documentation

Index

Constants

View Source
const (
	StoreKey     = types.StoreKey
	ModuleName   = types.ModuleName
	RouterKey    = types.RouterKey
	QuerierRoute = types.QuerierRoute

	CodeInvalidSignature = types.CodeInvalidSignature
	DefaultCodeSpace     = types.DefaultCodeSpace
)

Variables

View Source
var (
	RegisterCodec = types.RegisterCodec
	ModuleCdc     = types.ModuleCdc

	DefaultGenesisState = types.DefaultGenesisState
	ValidateGenesis     = types.ValidateGenesis

	NewNegotiation         = types.NewNegotiation
	NewSignNegotiationBody = types.NewSignNegotiationBody

	EventTypeChangeNegotiationBid  = types.EventTypeChangeNegotiationBid
	EventTypeConfirmNegotiationBid = types.EventTypeConfirmNegotiationBid

	AttributeKeyNegotiationID = types.AttributeKeyNegotiationID
	AttributeKeyBuyerAddress  = types.AttributeKeyBuyerAddress
	AttributeKeySellerAddress = types.AttributeKeySellerAddress
	AttributeKeyPegHash       = types.AttributeKeyPegHash

	ErrCodeVerifySignature = types.ErrVerifySignature
	ErrCodeInvalidBid      = types.ErrInvalidBid

	NewQuerier = keeper.NewQuerier
	NewKeeper  = keeper.NewKeeper

	GetNegotiationKey = types.GetNegotiationKey

	ErrUnauthorized = types.ErrUnauthorized

	BuildMsgChangeBuyerBid   = types.BuildMsgChangeBuyerBid
	BuildMsgChangeSellerBid  = types.BuildMsgChangeSellerBid
	BuildMsgConfirmBuyerBid  = types.BuildMsgConfirmBuyerBid
	BuildMsgConfirmSellerBid = types.BuildMsgConfirmSellerBid

	GetNegotiationIDFromString = types.GetNegotiationIDFromString
)

Functions

func InitGenesis

func InitGenesis(ctx sdk.Context, keeper Keeper, data GenesisState)

func NewHandler

func NewHandler(k Keeper) cTypes.Handler

func VerifySignature

func VerifySignature(pubKey crypto.PubKey, signature Signature, signBytes []byte) bool

Types

type AppModule

type AppModule struct {
	AppModuleBasic
	// contains filtered or unexported fields
}

func NewAppModule

func NewAppModule(keeper Keeper) AppModule

func (AppModule) BeginBlock

func (AppModule) EndBlock

func (AppModule) ExportGenesis

func (am AppModule) ExportGenesis(ctx cTypes.Context) json.RawMessage

func (AppModule) InitGenesis

func (am AppModule) InitGenesis(ctx cTypes.Context, data json.RawMessage) []abci.ValidatorUpdate

func (AppModule) Name

func (AppModule) Name() string

func (AppModule) NewHandler

func (am AppModule) NewHandler() cTypes.Handler

func (AppModule) NewQuerierHandler

func (am AppModule) NewQuerierHandler() cTypes.Querier

func (AppModule) QuerierRoute

func (am AppModule) QuerierRoute() string

func (AppModule) RegisterInvariants

func (am AppModule) RegisterInvariants(ir cTypes.InvariantRegistry)

func (AppModule) Route

func (AppModule) Route() string

type AppModuleBasic

type AppModuleBasic struct{}

func (AppModuleBasic) DefaultGenesis

func (AppModuleBasic) DefaultGenesis() json.RawMessage

func (AppModuleBasic) GetQueryCmd

func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command

func (AppModuleBasic) GetTxCmd

func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command

func (AppModuleBasic) Name

func (AppModuleBasic) Name() string

func (AppModuleBasic) RegisterCodec

func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)

func (AppModuleBasic) RegisterRESTRoutes

func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router, kafkaBool bool, kafkaState kafka.KafkaState)

func (AppModuleBasic) ValidateGenesis

func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error

type BaseNegotiation

type BaseNegotiation = types.BaseNegotiation

type ChangeBid

type ChangeBid = types.ChangeBid

type ConfirmBid

type ConfirmBid = types.ConfirmBid

type GenesisState

type GenesisState = types.GenesisState

func ExportGenesis

func ExportGenesis(ctx sdk.Context, keeper Keeper) (data GenesisState)

type Keeper

type Keeper = keeper.Keeper

type MsgChangeBuyerBids

type MsgChangeBuyerBids = types.MsgChangeBuyerBids

type MsgChangeSellerBids

type MsgChangeSellerBids = types.MsgChangeSellerBids

type MsgConfirmBuyerBids

type MsgConfirmBuyerBids = types.MsgConfirmBuyerBids

type MsgConfirmSellerBids

type MsgConfirmSellerBids = types.MsgConfirmSellerBids

type Negotiation

type Negotiation = types.Negotiation

type NegotiationID

type NegotiationID = types.NegotiationID

type Signature

type Signature = types.Signature

Directories

Path Synopsis
client
cli
internal

Jump to

Keyboard shortcuts

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