walletjson

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2019 License: GPL-3.0, GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertGetFileInfos2Json

func ConvertGetFileInfos2Json(gets []GetFileInfos) string

Types

type AssetJson

type AssetJson struct {
	AssetId     string `json:"asset_id"`
	Symbol      string `json:"symbol"`
	Decimal     int    `json:"decimal"`
	TotalSupply uint64 `json:"total_supply"`
}

type ContractInvokeRequest

type ContractInvokeRequest struct {
	ContractAddress string
	Args            []string
}

type GetFileInfos

type GetFileInfos struct {
	UnitHash        string `json:"unit_hash"`
	UintHeight      uint64 `json:"unit_index"`
	ParentsHash     string `json:"parents_hash"`
	TransactionHash string `json:"transaction_hash"`
	Timestamp       string `json:"timestamp"`
	FileHash        string `json:"file_hash"`
	ExtraData       string `json:"extra_data"`
}

type InputJson

type InputJson struct {
	TxHash       string `json:"txid"`          // reference Utxo struct key field
	MessageIndex uint32 `json:"message_index"` // message index in transaction
	OutIndex     uint32 `json:"out_index"`
	HashForSign  string `json:"hash"`
	Signature    string `json:"signature"`
}

type OutputJson

type OutputJson struct {
	Amount    uint64 `json:"amount"`
	Asset     string `json:"asset"`
	ToAddress string `json:"to_address"`
}

type PaymentJson

type PaymentJson struct {
	Inputs  []InputJson  `json:"inputs"`
	Outputs []OutputJson `json:"outputs"`
}

type ProofJson

type ProofJson struct {
	Inputs  []InputJson  `json:"inputs"`
	Outputs []OutputJson `json:"outputs"`
	Proof   string       `json:"proof"`
	Extra   string       `json:"extra"`
}

type RawTxjsonGenParams

type RawTxjsonGenParams struct {
	Inputs []struct {
		TxHash       string `json:"txid"`
		OutIndex     uint32 `json:"outindex"`
		MessageIndex uint32 `json:"messageindex"`
		HashForSign  string `json:"hash"`
		Signature    string `json:"signature"`
	} `json:"inputs"`
	Outputs []struct {
		Address string `json:"address"`
		Amount  uint64 `json:"amount"`
		Asset   string `json:"asset"`
	} `json:"outputs"`
}

type TxHistoryJson

type TxHistoryJson struct {
	TxId     string
	FromAddr string
	ToAddr   string
	Amount   decimal.Decimal
	Asset    string
}

type TxJson

type TxJson struct {
	Payload       []PaymentJson         `json:"payload"`
	InvokeRequest ContractInvokeRequest `json:"invoke_request"`
}

type TxProofJson

type TxProofJson struct {
	Payload       []ProofJson           `json:"payload"`
	InvokeRequest ContractInvokeRequest `json:"invoke_request"`
}

type UtxoJson

type UtxoJson struct {
	TxHash         string `json:"txid"`          // reference Utxo struct key field
	MessageIndex   uint32 `json:"message_index"` // message index in transaction
	OutIndex       uint32 `json:"out_index"`
	Amount         uint64 `json:"amount"`           // 数量
	Asset          string `json:"asset"`            // 资产类别
	PkScriptHex    string `json:"pk_script_hex"`    // 要执行的代码段
	PkScriptString string `json:"pk_script_string"` // 要执行的代码段
	LockTime       uint32 `json:"lock_time"`
}

Jump to

Keyboard shortcuts

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