Documentation
¶
Overview ¶
nolint
Index ¶
- Constants
- func ApproveCmd(cdc *wire.Codec) *cobra.Command
- func ErrInvalidInput(codespace sdk.CodespaceType, msg string) sdk.Error
- func ErrInvalidOutput(codespace sdk.CodespaceType, msg string) sdk.Error
- func ErrNoInputs(codespace sdk.CodespaceType) sdk.Error
- func ErrNoOutputs(codespace sdk.CodespaceType) sdk.Error
- func GetResultKey(heigth1 string, tx1 string) string
- func MustSortJSON(toSortJSON []byte) []byte
- func NewSendBody(r *http.Request) (*sendBody, error)
- func RegisterRoutes(cdc *wire.Codec, r *mux.Router)
- func RegisterWire(cdc *wire.Codec)
- func SendTxCmd(cdc *wire.Codec) *cobra.Command
- func SortJSON(toSortJSON []byte) ([]byte, error)
- type BankStub
- func (kv BankStub) CustomerQuery(ctx ctx.Context, route []string, req abci.RequestQuery) (res []byte, err types.Error)
- func (kv BankStub) EndBlockNotify(ctx context.Context)
- func (kv BankStub) Name() string
- func (kv BankStub) RegisterCdc(cdc *go_amino.Codec)
- func (kv BankStub) ResultNotify(ctx context.Context, txQcpResult interface{}) *types.Result
- func (kv BankStub) StartX(base *baseapp.QstarsBaseApp) error
- type Input
- type MsgSend
- type Output
- type SendOptions
- type SendResult
- type WrapperSendTx
- func (tx WrapperSendTx) CalcGas() btypes.BigInt
- func (tx WrapperSendTx) Exec(ctx context.Context) (result btypes.Result, crossTxQcps *txs.TxQcp)
- func (tx WrapperSendTx) GetGasPayer() btypes.Address
- func (tx WrapperSendTx) GetSignData() []byte
- func (tx WrapperSendTx) GetSigner() []btypes.Address
- func (tx WrapperSendTx) Name() string
- func (tx WrapperSendTx) ValidateData(ctx context.Context) error
Constants ¶
View Source
const ( DefaultCodespace sdk.CodespaceType = 2 CodeInvalidInput sdk.CodeType = 101 CodeInvalidOutput sdk.CodeType = 102 )
Bank errors reserve 100 ~ 199.
Variables ¶
This section is empty.
Functions ¶
func ApproveCmd ¶
ApproveCmd will create a approve tx and sign it with the given key.
func ErrInvalidInput ¶
func ErrInvalidInput(codespace sdk.CodespaceType, msg string) sdk.Error
func ErrInvalidOutput ¶
func ErrInvalidOutput(codespace sdk.CodespaceType, msg string) sdk.Error
func ErrNoInputs ¶
func ErrNoInputs(codespace sdk.CodespaceType) sdk.Error
func ErrNoOutputs ¶
func ErrNoOutputs(codespace sdk.CodespaceType) sdk.Error
func GetResultKey ¶
func MustSortJSON ¶
MustSortJSON is like SortJSON but panic if an error occurs, e.g., if the passed JSON isn't valid.
func NewSendBody ¶
func RegisterRoutes ¶
RegisterRoutes - Central function to define routes that get registered by the main application
Types ¶
type BankStub ¶
type BankStub struct{}
func NewBankStub ¶
func NewBankStub() BankStub
func (BankStub) CustomerQuery ¶
func (BankStub) EndBlockNotify ¶
func (BankStub) RegisterCdc ¶
func (BankStub) ResultNotify ¶
type Input ¶
Transaction Input
func (Input) ValidateBasic ¶
ValidateBasic - validate transaction input
type MsgSend ¶
MsgSend - high level transaction of the coin module
func NewMsgSend ¶
NewMsgSend - construct arbitrary multi-in, multi-out send msg.
type Output ¶
Transaction Output
func (Output) GetSignBytes ¶
Return bytes to sign for Output
func (Output) ValidateBasic ¶
ValidateBasic - validate transaction output
type SendOptions ¶
type SendOptions struct {
// contains filtered or unexported fields
}
func NewSendOptions ¶
func NewSendOptions(opts ...func(*SendOptions)) *SendOptions
type SendResult ¶
type SendResult struct { Hash string `json:"hash"` Error string `json:"error"` Code string `json:"code"` Result string `json:"result"` Heigth string `json:"heigth"` }
func Approve ¶
func Approve(cdc *wire.Codec, command string, fromstr string, tostr string, coins types.Coins, chainid string, sopt *SendOptions) (*SendResult, error)
Send 暂时只支持一次只转一种币 coins.Len() == 1; add chainid string input
func Send ¶
func Send(cdc *wire.Codec, fromstr string, to qbasetypes.Address, coins types.Coins, sopt *SendOptions) (*SendResult, error)
Send 支持一次多种币 coins.Len() == 1;
type WrapperSendTx ¶
func NewWrapperSendTx ¶
func NewWrapperSendTx(wrapper *txs.TxStd) WrapperSendTx
func (WrapperSendTx) CalcGas ¶
func (tx WrapperSendTx) CalcGas() btypes.BigInt
func (WrapperSendTx) GetGasPayer ¶
func (tx WrapperSendTx) GetGasPayer() btypes.Address
func (WrapperSendTx) GetSignData ¶
func (tx WrapperSendTx) GetSignData() []byte
func (WrapperSendTx) GetSigner ¶
func (tx WrapperSendTx) GetSigner() []btypes.Address
func (WrapperSendTx) Name ¶
func (tx WrapperSendTx) Name() string
func (WrapperSendTx) ValidateData ¶
func (tx WrapperSendTx) ValidateData(ctx context.Context) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.