chain

package
v0.0.0-...-48972bb Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	IsSuccess bool  `json:"isSuccess"`
	TxDs      []TxD `json:"result"`
}

func GetTx

func GetTx(host, order string, cursor, limit uint64) (result *Result, err error)

func GetTxByAccount

func GetTxByAccount(host, account, dir string) (result *Result, err error)

func GetTxByHash

func GetTxByHash(host, hash string) (result *Result, err error)

type TxD

type TxD struct {
	TxID        uint64 `json:"tx_id"`        //交易ID
	TxHash      string `json:"tx_hash"`      //交易HASH - 重复交易不会被处理
	BlockHeight uint64 `json:"block_height"` //区块高度
	BlockHash   string `json:"block_hash"`   //区块HASH
	ActionCount uint32 `json:"action_count"` //一笔交易多个action
	ActionID    uint32 `json:"action_id"`    //action id
	Src         string `json:"src"`          //用户ID (if dir==0,uid 表示转入方,否则表示转出方)
	Dst         string `json:"dst"`          //关联的用户ID
	Nonce       uint64 `json:"nonce"`        //对应操作源帐户(转出方)NONCE
	Amount      uint64 `json:"amount"`       //金额
	ResultCode  uint   `json:"result_code"`  //应答码 0-success
	ResultMsg   string `json:"result_msg"`   //应答消息
	CreateAt    uint64 `json:"created_at"`   //入库时间
	JData       string `json:"jdata"`        //数据部分 建议JSON序列化
	Memo        string `json:"memo"`         //交易备注
}

type TxD_Ex

type TxD_Ex struct {
	TxD
	TimeStr string
}

Jump to

Keyboard shortcuts

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