Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var GlobalAssets = map[string]string{
"c56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9b": "NEO",
"602c79718b16e442de58778e148d0b1084e3b2dffd5de6b7b16cee7969282de7": "GAS",
}
GlobalAssets stores a map of asset IDs to user-friendly strings ("NEO"/"GAS").
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 state.Account on the RPC Server.
func NewAccountState ¶
func NewAccountState(a *state.Account) AccountState
NewAccountState creates a new Account 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 state.Asset on the RPC Server.
func NewAssetState ¶
func NewAssetState(a *state.Asset) AssetState
NewAssetState creates a new Asset wrapper.
type Block ¶
type Block struct { *block.Block Confirmations uint32 `json:"confirmations"` NextBlockHash util.Uint256 `json:"nextblockhash,omitempty"` Hash util.Uint256 `json:"hash"` }
Block wrapper used for the representation of block.Block / block.Base on the RPC Server.
type InvokeResult ¶ added in v0.61.0
type InvokeResult struct { State string `json:"state"` GasConsumed string `json:"gas_consumed"` Script string `json:"script"` Stack *vm.Stack }
InvokeResult is used as a wrapper to represent an invokation result.
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 *block.Header, chain core.Blockchainer) TransactionOutputRaw
NewTransactionOutputRaw returns a new ransactionOutputRaw object.
type UnspentBalanceInfo ¶ added in v0.70.0
type UnspentBalanceInfo struct { Unspents []state.UnspentBalance `json:"unspent"` AssetHash util.Uint256 `json:"asset_hash"` Asset string `json:"asset"` AssetSymbol string `json:"asset_symbol"` Amount util.Fixed8 `json:"amount"` }
UnspentBalanceInfo wrapper is used to represent single unspent asset entry in `getunspents` output.
type Unspents ¶ added in v0.70.0
type Unspents struct { Balance []UnspentBalanceInfo `json:"balance"` Address string `json:"address"` }
Unspents wrapper is used to represent getunspents return result.
func NewUnspents ¶ added in v0.70.0
NewUnspents creates a new Account wrapper using given Blockchainer.
type ValidateAddressResponse ¶
type ValidateAddressResponse struct { Address interface{} `json:"address"` IsValid bool `json:"isvalid"` }
ValidateAddressResponse represents response to validate address call.
func ValidateAddress ¶
func ValidateAddress(addr 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