app

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2018 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Overview

Package app links together all the various components to construct the bnsd app.

Package app is a generated protocol buffer package.

It is generated from these files:
	app/codec.proto

It has these top-level messages:
	Tx

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")
)
View Source
var NftType_name = map[int32]string{
	0: "Username",
	1: "Ticker",
	3: "Blockchain",
	4: "BootstrapNode",
}
View Source
var NftType_value = map[string]int32{
	"Username":      0,
	"Ticker":        1,
	"Blockchain":    3,
	"BootstrapNode": 4,
}

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. If you are not sure what to use for the Handler, just use Stack().

func Authenticator

func Authenticator() x.Authenticator

Authenticator returns the typical authentication, just using public key signatures

func Chain

func Chain(minFee x.Coin, authFn x.Authenticator) 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 Examples

func Examples() []commands.Example

Examples generates some example structs to dump out with testgen

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

func GenerateApp(home string, logger log.Logger, debug bool) (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 a json representation of the keys. You can give coins to this address and import the keys in the js client to use them

func QueryRouter

func QueryRouter() weave.QueryRouter

QueryRouter returns a default query router, allowing access to "/wallets", "/auth", "/", "/escrows", "/nft/usernames", "/nft/blockchains", "/nft/tickers", "/validators"

func RegisterNft

func RegisterNft()

Register nft types for shared action handling via base handler

func Router

func Router(authFn x.Authenticator, issuer weave.Address) app.Router

Router returns a default router, only dispatching to the cash.SendMsg

func Stack

func Stack(minFee x.Coin, issuer weave.Address) 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 NftType

type NftType int32
const (
	NftType_Username      NftType = 0
	NftType_Ticker        NftType = 1
	NftType_Blockchain    NftType = 3
	NftType_BootstrapNode NftType = 4
)

func (NftType) EnumDescriptor

func (NftType) EnumDescriptor() ([]byte, []int)

func (NftType) String

func (x NftType) String() string

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
	//	*Tx_NewTokenMsg
	//	*Tx_SetNameMsg
	//	*Tx_CreateEscrowMsg
	//	*Tx_ReleaseEscrowMsg
	//	*Tx_ReturnEscrowMsg
	//	*Tx_UpdateEscrowMsg
	//	*Tx_CreateContractMsg
	//	*Tx_UpdateContractMsg
	//	*Tx_SetValidatorsMsg
	//	*Tx_AddApprovalMsg
	//	*Tx_RemoveApprovalMsg
	//	*Tx_IssueUsernameNftMsg
	//	*Tx_AddUsernameAddressNftMsg
	//	*Tx_RemoveUsernameAddressMsg
	//	*Tx_IssueBlockchainNftMsg
	//	*Tx_IssueTickerNftMsg
	//	*Tx_IssueBootstrapNodeNftMsg
	Sum isTx_Sum `protobuf_oneof:"sum"`
	// fee info, autogenerates GetFees()
	Fees *cash.FeeInfo `protobuf:"bytes,20,opt,name=fees" json:"fees,omitempty"`
	// signatures, autogenerates GetSignatures()
	Signatures []*sigs.StdSignature `protobuf:"bytes,21,rep,name=signatures" json:"signatures,omitempty"`
	// preimage for hashlock, autogenerates GetPreimage
	Preimage []byte `protobuf:"bytes,22,opt,name=preimage,proto3" json:"preimage,omitempty"`
	// id of multisig contract, autogenerates GetMultisig
	Multisig [][]byte `protobuf:"bytes,23,rep,name=multisig" json:"multisig,omitempty"`
}

Tx contains the message

func (*Tx) Descriptor

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

func (*Tx) GetAddApprovalMsg

func (m *Tx) GetAddApprovalMsg() *nft.AddApprovalMsg

func (*Tx) GetAddUsernameAddressNftMsg

func (m *Tx) GetAddUsernameAddressNftMsg() *username.AddChainAddressMsg

func (*Tx) GetCreateContractMsg

func (m *Tx) GetCreateContractMsg() *multisig.CreateContractMsg

func (*Tx) GetCreateEscrowMsg

func (m *Tx) GetCreateEscrowMsg() *escrow.CreateEscrowMsg

func (*Tx) GetFees

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

func (*Tx) GetIssueBlockchainNftMsg

func (m *Tx) GetIssueBlockchainNftMsg() *blockchain.IssueTokenMsg

func (*Tx) GetIssueBootstrapNodeNftMsg

func (m *Tx) GetIssueBootstrapNodeNftMsg() *bootstrap_node.IssueTokenMsg

func (*Tx) GetIssueTickerNftMsg

func (m *Tx) GetIssueTickerNftMsg() *ticker.IssueTokenMsg

func (*Tx) GetIssueUsernameNftMsg

func (m *Tx) GetIssueUsernameNftMsg() *username.IssueTokenMsg

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) GetNewTokenMsg

func (m *Tx) GetNewTokenMsg() *namecoin.NewTokenMsg

func (*Tx) GetPreimage

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

func (*Tx) GetReleaseEscrowMsg

func (m *Tx) GetReleaseEscrowMsg() *escrow.ReleaseEscrowMsg

func (*Tx) GetRemoveApprovalMsg

func (m *Tx) GetRemoveApprovalMsg() *nft.RemoveApprovalMsg

func (*Tx) GetRemoveUsernameAddressMsg

func (m *Tx) GetRemoveUsernameAddressMsg() *username.RemoveChainAddressMsg

func (*Tx) GetReturnEscrowMsg

func (m *Tx) GetReturnEscrowMsg() *escrow.ReturnEscrowMsg

func (*Tx) GetSendMsg

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

func (*Tx) GetSetNameMsg

func (m *Tx) GetSetNameMsg() *namecoin.SetWalletNameMsg

func (*Tx) GetSetValidatorsMsg

func (m *Tx) GetSetValidatorsMsg() *validators.SetValidatorsMsg

func (*Tx) GetSignBytes

func (tx *Tx) GetSignBytes() ([]byte, error)

GetSignBytes returns the bytes to sign...

func (*Tx) GetSignatures

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

func (*Tx) GetSum

func (m *Tx) GetSum() isTx_Sum

func (*Tx) GetUpdateContractMsg

func (m *Tx) GetUpdateContractMsg() *multisig.UpdateContractMsg

func (*Tx) GetUpdateEscrowMsg

func (m *Tx) GetUpdateEscrowMsg() *escrow.UpdateEscrowPartiesMsg

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_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.

type Tx_AddApprovalMsg

type Tx_AddApprovalMsg struct {
	AddApprovalMsg *nft.AddApprovalMsg `protobuf:"bytes,11,opt,name=add_approval_msg,json=addApprovalMsg,oneof"`
}

func (*Tx_AddApprovalMsg) MarshalTo

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

func (*Tx_AddApprovalMsg) Size

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

type Tx_AddUsernameAddressNftMsg

type Tx_AddUsernameAddressNftMsg struct {
	AddUsernameAddressNftMsg *username.AddChainAddressMsg `protobuf:"bytes,14,opt,name=add_username_address_nft_msg,json=addUsernameAddressNftMsg,oneof"`
}

func (*Tx_AddUsernameAddressNftMsg) MarshalTo

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

func (*Tx_AddUsernameAddressNftMsg) Size

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

type Tx_CreateContractMsg

type Tx_CreateContractMsg struct {
	CreateContractMsg *multisig.CreateContractMsg `protobuf:"bytes,8,opt,name=create_contract_msg,json=createContractMsg,oneof"`
}

func (*Tx_CreateContractMsg) MarshalTo

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

func (*Tx_CreateContractMsg) Size

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

type Tx_CreateEscrowMsg

type Tx_CreateEscrowMsg struct {
	CreateEscrowMsg *escrow.CreateEscrowMsg `protobuf:"bytes,4,opt,name=create_escrow_msg,json=createEscrowMsg,oneof"`
}

func (*Tx_CreateEscrowMsg) MarshalTo

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

func (*Tx_CreateEscrowMsg) Size

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

type Tx_IssueBlockchainNftMsg

type Tx_IssueBlockchainNftMsg struct {
	IssueBlockchainNftMsg *blockchain.IssueTokenMsg `protobuf:"bytes,16,opt,name=issue_blockchain_nft_msg,json=issueBlockchainNftMsg,oneof"`
}

func (*Tx_IssueBlockchainNftMsg) MarshalTo

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

func (*Tx_IssueBlockchainNftMsg) Size

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

type Tx_IssueBootstrapNodeNftMsg

type Tx_IssueBootstrapNodeNftMsg struct {
	IssueBootstrapNodeNftMsg *bootstrap_node.IssueTokenMsg `protobuf:"bytes,18,opt,name=issue_bootstrap_node_nft_msg,json=issueBootstrapNodeNftMsg,oneof"`
}

func (*Tx_IssueBootstrapNodeNftMsg) MarshalTo

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

func (*Tx_IssueBootstrapNodeNftMsg) Size

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

type Tx_IssueTickerNftMsg

type Tx_IssueTickerNftMsg struct {
	IssueTickerNftMsg *ticker.IssueTokenMsg `protobuf:"bytes,17,opt,name=issue_ticker_nft_msg,json=issueTickerNftMsg,oneof"`
}

func (*Tx_IssueTickerNftMsg) MarshalTo

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

func (*Tx_IssueTickerNftMsg) Size

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

type Tx_IssueUsernameNftMsg

type Tx_IssueUsernameNftMsg struct {
	IssueUsernameNftMsg *username.IssueTokenMsg `protobuf:"bytes,13,opt,name=issue_username_nft_msg,json=issueUsernameNftMsg,oneof"`
}

func (*Tx_IssueUsernameNftMsg) MarshalTo

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

func (*Tx_IssueUsernameNftMsg) Size

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

type Tx_NewTokenMsg

type Tx_NewTokenMsg struct {
	NewTokenMsg *namecoin.NewTokenMsg `protobuf:"bytes,2,opt,name=new_token_msg,json=newTokenMsg,oneof"`
}

func (*Tx_NewTokenMsg) MarshalTo

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

func (*Tx_NewTokenMsg) Size

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

type Tx_ReleaseEscrowMsg

type Tx_ReleaseEscrowMsg struct {
	ReleaseEscrowMsg *escrow.ReleaseEscrowMsg `protobuf:"bytes,5,opt,name=release_escrow_msg,json=releaseEscrowMsg,oneof"`
}

func (*Tx_ReleaseEscrowMsg) MarshalTo

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

func (*Tx_ReleaseEscrowMsg) Size

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

type Tx_RemoveApprovalMsg

type Tx_RemoveApprovalMsg struct {
	RemoveApprovalMsg *nft.RemoveApprovalMsg `protobuf:"bytes,12,opt,name=remove_approval_msg,json=removeApprovalMsg,oneof"`
}

func (*Tx_RemoveApprovalMsg) MarshalTo

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

func (*Tx_RemoveApprovalMsg) Size

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

type Tx_RemoveUsernameAddressMsg

type Tx_RemoveUsernameAddressMsg struct {
	RemoveUsernameAddressMsg *username.RemoveChainAddressMsg `protobuf:"bytes,15,opt,name=remove_username_address_msg,json=removeUsernameAddressMsg,oneof"`
}

func (*Tx_RemoveUsernameAddressMsg) MarshalTo

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

func (*Tx_RemoveUsernameAddressMsg) Size

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

type Tx_ReturnEscrowMsg

type Tx_ReturnEscrowMsg struct {
	ReturnEscrowMsg *escrow.ReturnEscrowMsg `protobuf:"bytes,6,opt,name=return_escrow_msg,json=returnEscrowMsg,oneof"`
}

func (*Tx_ReturnEscrowMsg) MarshalTo

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

func (*Tx_ReturnEscrowMsg) Size

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

type Tx_SendMsg

type Tx_SendMsg struct {
	SendMsg *cash.SendMsg `protobuf:"bytes,1,opt,name=send_msg,json=sendMsg,oneof"`
}

func (*Tx_SendMsg) MarshalTo

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

func (*Tx_SendMsg) Size

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

type Tx_SetNameMsg

type Tx_SetNameMsg struct {
	SetNameMsg *namecoin.SetWalletNameMsg `protobuf:"bytes,3,opt,name=set_name_msg,json=setNameMsg,oneof"`
}

func (*Tx_SetNameMsg) MarshalTo

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

func (*Tx_SetNameMsg) Size

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

type Tx_SetValidatorsMsg

type Tx_SetValidatorsMsg struct {
	SetValidatorsMsg *validators.SetValidatorsMsg `protobuf:"bytes,10,opt,name=set_validators_msg,json=setValidatorsMsg,oneof"`
}

func (*Tx_SetValidatorsMsg) MarshalTo

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

func (*Tx_SetValidatorsMsg) Size

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

type Tx_UpdateContractMsg

type Tx_UpdateContractMsg struct {
	UpdateContractMsg *multisig.UpdateContractMsg `protobuf:"bytes,9,opt,name=update_contract_msg,json=updateContractMsg,oneof"`
}

func (*Tx_UpdateContractMsg) MarshalTo

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

func (*Tx_UpdateContractMsg) Size

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

type Tx_UpdateEscrowMsg

type Tx_UpdateEscrowMsg struct {
	UpdateEscrowMsg *escrow.UpdateEscrowPartiesMsg `protobuf:"bytes,7,opt,name=update_escrow_msg,json=updateEscrowMsg,oneof"`
}

func (*Tx_UpdateEscrowMsg) MarshalTo

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

func (*Tx_UpdateEscrowMsg) Size

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

Jump to

Keyboard shortcuts

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