wrappers

package
v0.60.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 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 AccountState

type AccountState struct {
	Version    uint8             `json:"version"`
	ScriptHash util.Uint160      `json:"script_hash"`
	IsFrozen   bool              `json:"frozen"`
	Votes      []*keys.PublicKey `json:"votes"`
	Balances   []Balance         `json:"balances"`
}

AccountState wrapper used for the representation of core.AccountState on the RPC Server.

func NewAccountState

func NewAccountState(a *core.AccountState) AccountState

NewAccountState creates a new AccountState wrapper.

type AssetState

type AssetState struct {
	ID         util.Uint256          `json:"assetID"`
	AssetType  transaction.AssetType `json:"assetType"`
	Name       string                `json:"name"`
	Amount     util.Fixed8           `json:"amount"`
	Available  util.Fixed8           `json:"available"`
	Precision  uint8                 `json:"precision"`
	FeeMode    uint8                 `json:"fee"`
	FeeAddress util.Uint160          `json:"address"`
	Owner      string                `json:"owner"`
	Admin      string                `json:"admin"`
	Issuer     string                `json:"issuer"`
	Expiration uint32                `json:"expiration"`
	IsFrozen   bool                  `json:"is_frozen"`
}

AssetState wrapper used for the representation of core.AssetState on the RPC Server.

func NewAssetState

func NewAssetState(a *core.AssetState) AssetState

NewAssetState creates a new AssetState wrapper.

type Balance

type Balance struct {
	Asset util.Uint256 `json:"asset"`
	Value util.Fixed8  `json:"value"`
}

Balance response wrapper.

type Balances

type Balances []Balance

Balances type for sorting balances in rpc response.

func (Balances) Len

func (b Balances) Len() int

func (Balances) Less

func (b Balances) Less(i, j int) bool

func (Balances) Swap

func (b Balances) Swap(i, j int)

type Block

type Block struct {
	*core.Block
	Confirmations uint32       `json:"confirmations"`
	NextBlockHash util.Uint256 `json:"nextblockhash,omitempty"`
	Hash          util.Uint256 `json:"hash"`
}

Block wrapper used for the representation of core.Block / core.BlockBase on the RPC Server.

func NewBlock

func NewBlock(block *core.Block, chain core.Blockchainer) Block

NewBlock creates a new Block wrapper.

type TransactionOutputRaw

type TransactionOutputRaw struct {
	*transaction.Transaction
	TxHash        util.Uint256 `json:"txid"`
	Size          int          `json:"size"`
	SysFee        util.Fixed8  `json:"sys_fee"`
	NetFee        util.Fixed8  `json:"net_fee"`
	Blockhash     util.Uint256 `json:"blockhash"`
	Confirmations int          `json:"confirmations"`
	Timestamp     uint32       `json:"blocktime"`
}

TransactionOutputRaw is used as a wrapper to represents a Transaction.

func NewTransactionOutputRaw

func NewTransactionOutputRaw(tx *transaction.Transaction, header *core.Header, chain core.Blockchainer) TransactionOutputRaw

NewTransactionOutputRaw returns a new ransactionOutputRaw object.

type ValidateAddressResponse

type ValidateAddressResponse struct {
	Address interface{} `json:"address"`
	IsValid bool        `json:"isvalid"`
}

ValidateAddressResponse represents response to validate address call.

func ValidateAddress

func ValidateAddress(address interface{}) ValidateAddressResponse

ValidateAddress verifies that the address is a correct NEO address see https://docs.neo.org/en-us/node/cli/2.9.4/api/validateaddress.html

Jump to

Keyboard shortcuts

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