Documentation
¶
Overview ¶
Package std contains standard implementations of a number of components.
It is a good place to get started buuilding your first app, and to see how to wire together the various components. You can then replace them with custom implementations, as your project grows.
Package std is a generated protocol buffer package. It is generated from these files: std/codec.proto It has these top-level messages: Tx
Index ¶
- Variables
- func Application(name string, h weave.Handler, tx weave.TxDecoder, dbPath string) (app.BaseApp, error)
- func AuthFunc() weave.AuthFunc
- func Chain(minFee coins.Coin, authFn weave.AuthFunc) app.Decorators
- func CommitKVStore(dbPath string) (weave.CommitKVStore, error)
- func GenInitOptions(args []string) (json.RawMessage, error)
- func GenerateApp(dbPath string, logger log.Logger) (abci.Application, error)
- func GenerateCoinKey() (weave.Address, string, error)
- func Router(authFn weave.AuthFunc) app.Router
- func Stack(minFee coins.Coin) weave.Handler
- func TxDecoder(bz []byte) (weave.Tx, error)
- type Tx
- func (*Tx) Descriptor() ([]byte, []int)
- func (m *Tx) GetFees() *coins.FeeInfo
- func (tx *Tx) GetMsg() (weave.Msg, error)
- func (m *Tx) GetSendMsg() *coins.SendMsg
- func (tx *Tx) GetSignBytes() ([]byte, error)
- func (m *Tx) GetSignatures() []*auth.StdSignature
- func (m *Tx) GetSum() isTx_Sum
- func (m *Tx) Marshal() (dAtA []byte, err error)
- func (m *Tx) MarshalTo(dAtA []byte) (int, error)
- func (*Tx) ProtoMessage()
- func (m *Tx) Reset()
- func (m *Tx) Size() (n int)
- func (m *Tx) String() string
- func (m *Tx) Unmarshal(dAtA []byte) error
- func (*Tx) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type Tx_SendMsg
Constants ¶
This section is empty.
Variables ¶
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) (app.BaseApp, error)
Application constructs a basic ABCI application with the given arguments. If you are not sure what to use for the Handler, just use Stack().
func Chain ¶
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 GenInitOptions ¶
func GenInitOptions(args []string) (json.RawMessage, error)
GenInitOptions will produce some basic options for one rich account, to use for dev mode
You can set
func GenerateApp ¶
GenerateApp is used to create a stub for server/start.go command
func GenerateCoinKey ¶
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.
Types ¶
type Tx ¶
type Tx struct {
// msg is a sum type over all allowed messages on this chain.
//
// Types that are valid to be assigned to Sum:
// *Tx_SendMsg
Sum isTx_Sum `protobuf_oneof:"sum"`
// fee info, autogenerates GetFees()
Fees *coins.FeeInfo `protobuf:"bytes,20,opt,name=fees" json:"fees,omitempty"`
// signatures, autogenerates GetSignatures()
Signatures []*auth.StdSignature `protobuf:"bytes,21,rep,name=signatures" json:"signatures,omitempty"`
}
Tx contains the message
func (*Tx) Descriptor ¶
func (*Tx) GetSendMsg ¶
func (*Tx) GetSignBytes ¶
GetSignBytes returns the bytes to sign...
func (*Tx) GetSignatures ¶
func (m *Tx) GetSignatures() []*auth.StdSignature
func (*Tx) ProtoMessage ¶
func (*Tx) ProtoMessage()
type Tx_SendMsg ¶
type Tx_SendMsg struct {
SendMsg *coins.SendMsg `protobuf:"bytes,1,opt,name=send_msg,json=sendMsg,oneof"`
}
func (*Tx_SendMsg) Size ¶
func (m *Tx_SendMsg) Size() (n int)