tx

package
v1.0.10-0...-8f267d5 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeOk int32 = 0
)
View Source
const Source int64 = 0

Variables

View Source
var Cdc = amino.NewCodec()

cdc global variable

Functions

func RegisterCodec

func RegisterCodec(cdc *amino.Codec)

func StdSignBytes

func StdSignBytes(chainID string, accnum int64, sequence int64, msgs []msg.Msg, memo string, source int64, data []byte) []byte

StdSignBytes returns the bytes to sign for a transaction.

Types

type Info

type Info struct {
	Hash   common.HexBytes         `json:"hash"`
	Height int64                   `json:"height"`
	Tx     Tx                      `json:"tx"`
	Result types.ResponseDeliverTx `json:"result"`
}

type StdSignDoc

type StdSignDoc struct {
	ChainID       string            `json:"chain_id"`
	AccountNumber int64             `json:"account_number"`
	Sequence      int64             `json:"sequence"`
	Memo          string            `json:"memo"`
	Source        int64             `json:"source"`
	Msgs          []json.RawMessage `json:"msgs"`
	Data          []byte            `json:"data"`
}

StdSignDoc def

type StdSignMsg

type StdSignMsg struct {
	ChainID       string    `json:"chain_id"`
	AccountNumber int64     `json:"account_number"`
	Sequence      int64     `json:"sequence"`
	Msgs          []msg.Msg `json:"msgs"`
	Memo          string    `json:"memo"`
	Source        int64     `json:"source"`
	Data          []byte    `json:"data"`
}

StdSignMsg def

func (StdSignMsg) Bytes

func (msg StdSignMsg) Bytes() []byte

Bytes gets message bytes

type StdSignature

type StdSignature struct {
	crypto.PubKey `json:"pub_key"` // optional
	Signature     []byte           `json:"signature"`
	AccountNumber int64            `json:"account_number"`
	Sequence      int64            `json:"sequence"`
}

StdSignature Signature

type StdTx

type StdTx struct {
	Msgs       []msg.Msg      `json:"msg"`
	Signatures []StdSignature `json:"signatures"`
	Memo       string         `json:"memo"`
	Source     int64          `json:"source"`
	Data       []byte         `json:"data"`
}

StdTx def

func NewStdTx

func NewStdTx(msgs []msg.Msg, sigs []StdSignature, memo string, source int64, data []byte) StdTx

NewStdTx to instantiate an instance

func (StdTx) GetMsgs

func (tx StdTx) GetMsgs() []msg.Msg

GetMsgs def

type Tx

type Tx interface {

	// Gets the Msg.
	GetMsgs() []msg.Msg
}

type TxCommitResult

type TxCommitResult struct {
	Ok   bool   `json:"ok"`
	Log  string `json:"log"`
	Hash string `json:"hash"`
	Code int32  `json:"code"`
	Data string `json:"data"`
}

TxCommitResult for POST tx results

type TxResult

type TxResult struct {
	Hash string `json:"hash"`
	Log  string `json:"log"`
	Data string `json:"data"`
	Code int32  `json:"code"`
}

TxResult def

Jump to

Keyboard shortcuts

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