Documentation ¶
Index ¶
Constants ¶
View Source
const ( GetTxPath = "/transactions/info" GetUnconfirmedTxByPath = "/transactions/unconfirmed/info" GetStateByAddressPath = "/addresses/data" WaitCount = 10 )
Variables ¶
This section is empty.
Functions ¶
func GroupByHeightAndFunc ¶
func GroupByHeightAndFunc(txs []Transaction) map[int]map[ContractFunc][]Transaction
Types ¶
type ContractFunc ¶
type ContractFunc string
type FuncArg ¶
type FuncArg struct { Type string `structs:"type"` Value interface{} `structs:"value"` }
type FuncCall ¶
type FuncCall struct { Function ContractFunc `structs:"function"` Args []FuncArg `structs:"args"` }
type InvokeScriptBody ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func (*Node) GetStateByAddressAndKey ¶
type Transaction ¶
type Transaction struct { Sender string `structs:"sender"` SenderPublicKey string `structs:"senderPublicKey"` Fee int `structs:"fee"` Type TxType `structs:"type"` Version int `structs:"version"` Proofs []string `structs:"proofs"` ID string `structs:"id"` Timestamp int64 `structs:"timestamp"` Height int `structs:"height"` Attachment string `structs:"attachment"` InvokeScriptBody *InvokeScriptBody `structs:"-"` }
func NewTransaction ¶
func NewTransaction(txType TxType, sender string) Transaction
func Parse ¶
func Parse(json map[string]interface{}) (Transaction, error)
func Unmarshal ¶
func Unmarshal(data []byte) (Transaction, error)
func (Transaction) JsonMap ¶
func (tx Transaction) JsonMap() (map[string]interface{}, error)
func (Transaction) Marshal ¶
func (tx Transaction) Marshal() ([]byte, error)
func (*Transaction) NewInvokeScript ¶
func (tx *Transaction) NewInvokeScript(dapp string, funcCall FuncCall, payments []Payment, fee int)
Click to show internal directories.
Click to hide internal directories.