app

package
v0.0.0-...-59eeb30 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2019 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthCodec = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowCodec   = fmt.Errorf("proto: integer overflow")
)

Functions

func Application

func Application(name string, h weave.Handler,
	tx weave.TxDecoder, dbPath string, debug bool) (app.BaseApp, error)

Application constructs a basic ABCI application with the given arguments.

func Authenticator

func Authenticator() x.Authenticator

Authenticator returns authentication with multisigs and public key signatues

func Chain

func Chain(authFn x.Authenticator, minFee coin.Coin) app.Decorators

Chain returns a chain of decorators, to handle authentication, fees, logging, and recovery

func CommitKVStore

func CommitKVStore(dbPath string) (weave.CommitKVStore, error)

CommitKVStore returns an initialized KVStore that persists the data to the named path.

func DecorateApp

func DecorateApp(application app.BaseApp, logger log.Logger) app.BaseApp

DecorateApp adds initializers and Logger to an Application

func GenInitOptions

func GenInitOptions(args []string) (json.RawMessage, error)

GenInitOptions will produce some basic options for one rich account, to use for dev mode

func GenerateApp

func GenerateApp(options *server.Options) (abci.Application, error)

GenerateApp is used to create a stub for server/start.go command

func GenerateCoinKey

func GenerateCoinKey() (weave.Address, string, error)

GenerateCoinKey returns the address of a public key, along with the secret phrase to recover the private key. You can give coins to this address and return the recovery phrase to the user to access them.

func QueryRouter

func QueryRouter() weave.QueryRouter

QueryRouter returns a default query router, allowing access to "/auth", "/contracts" and "/"

func Router

func Router(authFn x.Authenticator) *app.Router

Router returns a default router

func Stack

func Stack(minFee coin.Coin) weave.Handler

Stack wires up a standard router with a standard decorator chain. This can be passed into BaseApp.

func TxDecoder

func TxDecoder(bz []byte) (weave.Tx, error)

TxDecoder creates a Tx and unmarshals bytes into it

Types

type Tx

type Tx struct {
	// fee info, autogenerates GetFees()
	CashFees       *cash.FeeInfo        `protobuf:"bytes,20,opt,name=cash_fees,json=cashFees,proto3" json:"cash_fees,omitempty"`
	SigsSignatures []*sigs.StdSignature `protobuf:"bytes,21,rep,name=sigs_signatures,json=sigsSignatures,proto3" json:"sigs_signatures,omitempty"`
	// ID of a multisig contract.
	Multisig [][]byte `protobuf:"bytes,4,rep,name=multisig,proto3" json:"multisig,omitempty"`
	// msg is a sum type over all allowed messages on this chain.
	//
	// Types that are valid to be assigned to Sum:
	//	*Tx_CashSendMsg
	//	*Tx_OrderbookCreateOrderbookMsg
	//	*Tx_OrderbookCreateOrderMsg
	//	*Tx_OrderbookCancelOrderMsg
	Sum isTx_Sum `protobuf_oneof:"sum"`
}

Tx contains the message

func (*Tx) Descriptor

func (*Tx) Descriptor() ([]byte, []int)

func (*Tx) GetCashFees

func (m *Tx) GetCashFees() *cash.FeeInfo

func (*Tx) GetCashSendMsg

func (m *Tx) GetCashSendMsg() *cash.SendMsg

func (*Tx) GetMsg

func (tx *Tx) GetMsg() (weave.Msg, error)

GetMsg switches over all types defined in the protobuf file

func (*Tx) GetMultisig

func (m *Tx) GetMultisig() [][]byte

func (*Tx) GetOrderbookCancelOrderMsg

func (m *Tx) GetOrderbookCancelOrderMsg() *orderbook.CancelOrderMsg

func (*Tx) GetOrderbookCreateOrderMsg

func (m *Tx) GetOrderbookCreateOrderMsg() *orderbook.CreateOrderMsg

func (*Tx) GetOrderbookCreateOrderbookMsg

func (m *Tx) GetOrderbookCreateOrderbookMsg() *orderbook.CreateOrderBookMsg

func (*Tx) GetSigsSignatures

func (m *Tx) GetSigsSignatures() []*sigs.StdSignature

func (*Tx) GetSum

func (m *Tx) GetSum() isTx_Sum

func (*Tx) Marshal

func (m *Tx) Marshal() (dAtA []byte, err error)

func (*Tx) MarshalTo

func (m *Tx) MarshalTo(dAtA []byte) (int, error)

func (*Tx) ProtoMessage

func (*Tx) ProtoMessage()

func (*Tx) Reset

func (m *Tx) Reset()

func (*Tx) Size

func (m *Tx) Size() (n int)

func (*Tx) String

func (m *Tx) String() string

func (*Tx) Unmarshal

func (m *Tx) Unmarshal(dAtA []byte) error

func (*Tx) XXX_DiscardUnknown

func (m *Tx) XXX_DiscardUnknown()

func (*Tx) XXX_Marshal

func (m *Tx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Tx) XXX_Merge

func (m *Tx) XXX_Merge(src proto.Message)

func (*Tx) XXX_OneofFuncs

func (*Tx) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*Tx) XXX_Size

func (m *Tx) XXX_Size() int

func (*Tx) XXX_Unmarshal

func (m *Tx) XXX_Unmarshal(b []byte) error

type Tx_CashSendMsg

type Tx_CashSendMsg struct {
	CashSendMsg *cash.SendMsg `protobuf:"bytes,51,opt,name=cash_send_msg,json=cashSendMsg,proto3,oneof"`
}

func (*Tx_CashSendMsg) MarshalTo

func (m *Tx_CashSendMsg) MarshalTo(dAtA []byte) (int, error)

func (*Tx_CashSendMsg) Size

func (m *Tx_CashSendMsg) Size() (n int)

type Tx_OrderbookCancelOrderMsg

type Tx_OrderbookCancelOrderMsg struct {
	OrderbookCancelOrderMsg *orderbook.CancelOrderMsg `protobuf:"bytes,102,opt,name=orderbook_cancel_order_msg,json=orderbookCancelOrderMsg,proto3,oneof"`
}

func (*Tx_OrderbookCancelOrderMsg) MarshalTo

func (m *Tx_OrderbookCancelOrderMsg) MarshalTo(dAtA []byte) (int, error)

func (*Tx_OrderbookCancelOrderMsg) Size

func (m *Tx_OrderbookCancelOrderMsg) Size() (n int)

type Tx_OrderbookCreateOrderMsg

type Tx_OrderbookCreateOrderMsg struct {
	OrderbookCreateOrderMsg *orderbook.CreateOrderMsg `protobuf:"bytes,101,opt,name=orderbook_create_order_msg,json=orderbookCreateOrderMsg,proto3,oneof"`
}

func (*Tx_OrderbookCreateOrderMsg) MarshalTo

func (m *Tx_OrderbookCreateOrderMsg) MarshalTo(dAtA []byte) (int, error)

func (*Tx_OrderbookCreateOrderMsg) Size

func (m *Tx_OrderbookCreateOrderMsg) Size() (n int)

type Tx_OrderbookCreateOrderbookMsg

type Tx_OrderbookCreateOrderbookMsg struct {
	OrderbookCreateOrderbookMsg *orderbook.CreateOrderBookMsg `protobuf:"bytes,100,opt,name=orderbook_create_orderbook_msg,json=orderbookCreateOrderbookMsg,proto3,oneof"`
}

func (*Tx_OrderbookCreateOrderbookMsg) MarshalTo

func (m *Tx_OrderbookCreateOrderbookMsg) MarshalTo(dAtA []byte) (int, error)

func (*Tx_OrderbookCreateOrderbookMsg) Size

func (m *Tx_OrderbookCreateOrderbookMsg) Size() (n int)

Jump to

Keyboard shortcuts

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