api

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2019 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Transaction

type Transaction struct {
	Message   entity.Message `json:"message"`
	Seal      *entity.Seal   `json:"seal"`
	NonceTime *entity.Time   `json:"nonce_time"`
}

Transaction wraps a message, its signature infos and the nonce time used to sign the message.

func NewTransaction

func NewTransaction(
	message entity.Message,
	msgSignature *ED25519.Signature,
	msgSigner *ED25519.PublicKey,
	nonceTime *entity.Time,
) *Transaction

NewTransaction constructor.

func (*Transaction) UnmarshalJSON added in v1.1.0

func (t *Transaction) UnmarshalJSON(data []byte) error

UnmarshalJSON converts a byte array a Transaction. It handles the Message interface conversion as well.

type TransactionStatus added in v1.1.0

type TransactionStatus struct {
	Code    uint32 `json:"code"`
	Message string `json:"message"`
}

TransactionStatus is the blockchain status of a transaction.

type TransactionWrapper added in v1.1.0

type TransactionWrapper struct {
	Transaction *Transaction       `json:"transaction"`
	Status      *TransactionStatus `json:"status"`
}

TransactionWrapper wraps a Transaction with its blockchain status.

type TransactionWrappers added in v1.1.0

type TransactionWrappers struct {
	Transactions []*TransactionWrapper `json:"transactions"`
	Total        int                   `json:"total"`
}

TransactionWrappers wraps a list of TransactionWrapper with the total transactions available in the blockchain. The API by default, will only returns 10 transactions.

Jump to

Keyboard shortcuts

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