Documentation ¶
Index ¶
- type InvokeResult
- type InvokeStack
- type Peer
- type RpcAddress
- type RpcApplicationLog
- type RpcBlock
- type RpcBlockHeader
- type RpcCandidates
- type RpcContextItem
- type RpcContractAbi
- type RpcContractEventDescriptor
- type RpcContractGroup
- type RpcContractManifest
- type RpcContractMethodDescriptor
- type RpcContractParameter
- type RpcContractParameterContext
- type RpcContractParameterDefinition
- type RpcContractPermission
- type RpcContractState
- type RpcDiagnostic
- type RpcExecution
- type RpcInvocationTreeNode
- type RpcListAddress
- type RpcListPlugin
- type RpcMethodToken
- type RpcNativeContract
- type RpcNefFile
- type RpcNep11Balance
- type RpcNep11Balances
- type RpcNep11Token
- type RpcNep11Transfer
- type RpcNep11Transfers
- type RpcNep17Balance
- type RpcNep17Balances
- type RpcNep17Transfer
- type RpcNep17Transfers
- type RpcNetworkFee
- type RpcNotification
- type RpcPeers
- type RpcProtocol
- type RpcSigner
- type RpcStateHeight
- type RpcStorageChange
- type RpcTransaction
- type RpcTransactionAttribute
- type RpcTransferOut
- type RpcValidator
- type RpcVersion
- type RpcWalletBalance
- type RpcWitness
- type RpcWitnessCondition
- type RpcWitnessRule
- type UnclaimedGas
- type ValidateAddress
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InvokeResult ¶
type InvokeResult struct { Script string `json:"script"` State string `json:"state"` GasConsumed string `json:"gasconsumed"` Exception string `json:"exception"` Notifications []RpcNotification `json:"notifications"` Diagnostics RpcDiagnostic `json:"diagnostics,omitempty"` Stack []InvokeStack `json:"stack"` // "error: invalid operation" | InvokeStack[] Session string `json:"session,omitempty"` Tx string `json:"tx,omitempty"` PendingSignature RpcContractParameterContext `json:"pendingsignature,omitempty"` }
type InvokeStack ¶
type InvokeStack struct { Type string `json:"type"` Value interface{} `json:"value"` Interface string `json:"interface,omitempty"` Id string `json:"id,omitempty"` }
func ConvertInvokeStackArray ¶ added in v1.2.1
func ConvertInvokeStackArray(s InvokeStack) []InvokeStack
ConvertInvokeStackArray converts an "Array" type InvokeStack to an InvokeStack array
type RpcAddress ¶
type RpcApplicationLog ¶
type RpcApplicationLog struct { TxId string `json:"txid"` Executions []RpcExecution `json:"executions"` }
type RpcBlock ¶
type RpcBlock struct { RpcBlockHeader Tx []RpcTransaction `json:"tx"` }
type RpcBlockHeader ¶
type RpcBlockHeader struct { Hash string `json:"hash"` Size int `json:"size"` Version int `json:"version"` PreviousBlockHash string `json:"previousblockhash"` MerkleRoot string `json:"merkleroot"` Time int `json:"time"` Nonce string `json:"nonce"` Index int `json:"index"` PrimaryIndex byte `json:"primary"` NextConsensus string `json:"nextconsensus"` //address Witnesses []RpcWitness `json:"witnesses"` Confirmations int `json:"confirmations"` NextBlockHash string `json:"nextblockhash"` }
type RpcCandidates ¶ added in v1.2.0
type RpcContextItem ¶ added in v1.2.0
type RpcContextItem struct { Script string `json:"script"` Parameters []RpcContractParameter `json:"parameters"` Signatures map[string]string `json:"signatures"` }
type RpcContractAbi ¶
type RpcContractAbi struct { Methods []RpcContractMethodDescriptor `json:"methods"` Events []RpcContractEventDescriptor `json:"events"` }
type RpcContractEventDescriptor ¶
type RpcContractEventDescriptor struct { Name string `json:"name"` Parameters []RpcContractParameterDefinition `json:"parameters"` }
type RpcContractGroup ¶
type RpcContractManifest ¶
type RpcContractManifest struct { Name string `json:"name"` Groups []RpcContractGroup `json:"groups"` SupportedStandards []string `json:"supportedstandards"` Abi RpcContractAbi `json:"abi"` Permissions []RpcContractPermission `json:"permissions"` Trusts []string `json:"trusts"` Extra interface{} `json:"extra"` }
type RpcContractMethodDescriptor ¶
type RpcContractMethodDescriptor struct { Name string `json:"name"` Parameters []RpcContractParameterDefinition `json:"parameters"` ReturnType string `json:"returntype"` Offset int `json:"offset"` Safe bool `json:"safe"` }
type RpcContractParameter ¶
type RpcContractParameter struct { Type string `json:"type"` Value interface{} `json:"value"` }
func NewRpcContractParameter ¶ added in v0.3.1
func NewRpcContractParameter(t string, v interface{}) RpcContractParameter
type RpcContractParameterContext ¶ added in v1.2.0
type RpcContractParameterDefinition ¶
func (*RpcContractParameterDefinition) ToContractParameterType ¶
func (mp *RpcContractParameterDefinition) ToContractParameterType() (sc.ContractParameterType, error)
type RpcContractPermission ¶
type RpcContractState ¶
type RpcContractState struct { Id int `json:"id"` UpdateCounter uint16 `json:"updatecounter"` Hash string `json:"hash"` Nef RpcNefFile `json:"nef"` Manifest RpcContractManifest `json:"manifest"` }
func (*RpcContractState) ToContract ¶
func (cs *RpcContractState) ToContract() (*sc.Contract, error)
type RpcDiagnostic ¶ added in v1.2.0
type RpcDiagnostic struct {
InvokedContracts []RpcInvocationTreeNode `json:"invokedcontracts"`
}
type RpcExecution ¶
type RpcExecution struct { Trigger string `json:"trigger"` VMState string `json:"vmstate"` Exception string `json:"exception"` GasConsumed string `json:"gasconsumed"` Stack []InvokeStack `json:"stack"` Notifications []RpcNotification `json:"notifications"` }
type RpcInvocationTreeNode ¶ added in v1.2.0
type RpcInvocationTreeNode struct { Hash string `json:"hash"` Call []RpcInvocationTreeNode `json:"call,omitempty"` }
type RpcListAddress ¶
type RpcListAddress struct {
AddressList []RpcAddress
}
type RpcListPlugin ¶
type RpcMethodToken ¶
type RpcNativeContract ¶ added in v0.3.8
type RpcNativeContract struct { Id int `json:"id"` Hash string `json:"hash"` Nef RpcNefFile `json:"nef"` Manifest RpcContractManifest `json:"manifest"` UpdateHistory []uint `json:"updatehistory"` }
type RpcNefFile ¶
type RpcNefFile struct { Magic uint `json:"magic"` Compiler string `json:"compiler"` Tokens []RpcMethodToken `json:"tokens"` Script string `json:"script"` // base64 CheckSum uint `json:"checksum"` }
type RpcNep11Balance ¶ added in v1.2.0
type RpcNep11Balance struct { AssetHash string `json:"assethash"` Name string `json:"name"` Symbol string `json:"symbol"` Decimals string `json:"decimals"` Tokens []RpcNep11Token `json:"tokens"` }
type RpcNep11Balances ¶ added in v1.2.0
type RpcNep11Balances struct { Address string `json:"address"` Balances []RpcNep11Balance `json:"balance"` }
type RpcNep11Token ¶ added in v1.2.0
type RpcNep11Transfer ¶ added in v1.2.0
type RpcNep11Transfer struct { Timestamp uint64 `json:"timestamp"` AssetHash string `json:"assethash"` TransferAddress string `json:"transferaddress"` Amount string `json:"amount"` BlockIndex uint32 `json:"blockindex"` TransferNotifyIndex uint32 `json:"transfernotifyindex"` TxHash string `json:"txhash"` TokenId string `json:"tokenid"` }
type RpcNep11Transfers ¶ added in v1.2.0
type RpcNep11Transfers struct { Address string `json:"address"` Sent []RpcNep11Transfer `json:"sent"` Received []RpcNep11Transfer `json:"received"` }
type RpcNep17Balance ¶
type RpcNep17Balances ¶
type RpcNep17Balances struct { Address string `json:"address"` Balances []RpcNep17Balance `json:"balance"` }
type RpcNep17Transfer ¶
type RpcNep17Transfer struct { Timestamp uint64 `json:"timestamp"` AssetHash string `json:"assethash"` TransferAddress string `json:"transferaddress"` Amount string `json:"amount"` BlockIndex uint32 `json:"blockindex"` TransferNotifyIndex uint32 `json:"transfernotifyindex"` TxHash string `json:"txhash"` }
type RpcNep17Transfers ¶
type RpcNep17Transfers struct { Address string `json:"address"` Sent []RpcNep17Transfer `json:"sent"` Received []RpcNep17Transfer `json:"received"` }
type RpcNetworkFee ¶
type RpcNetworkFee struct {
NetworkFee string `json:"networkfee"`
}
type RpcNotification ¶
type RpcNotification struct { Contract string `json:"contract"` EventName string `json:"eventname"` State InvokeStack `json:"state"` }
type RpcProtocol ¶ added in v1.2.0
type RpcProtocol struct { AddressVersion byte `json:"addressversion"` Network uint32 `json:"network"` ValidatorsCount int32 `json:"validatorscount"` MillisecondsPerBlock uint32 `json:"msperblock"` MaxTraceableBlocks uint32 `json:"maxtraceableblocks"` MaxValidUntilBlockIncrement uint32 `json:"maxvaliduntilblockincrement"` MaxTransactionsPerBlock uint32 `json:"maxtransactionsperblock"` MemoryPoolMaxTransactions int32 `json:"memorypoolmaxtransactions"` InitialGasDistribution uint64 `json:"initialgasdistribution"` }
type RpcSigner ¶
type RpcSigner struct { Account string `json:"account"` // script hash Scopes string `json:"scopes"` AllowedContracts []string `json:"allowedcontracts,omitempty"` AllowedGroups []string `json:"allowedgroups,omitempty"` Rules []RpcWitnessRule `json:"rules,omitempty"` }
func CreateRpcSigner ¶
func CreateRpcSigners ¶
type RpcStateHeight ¶
type RpcStorageChange ¶ added in v1.2.0
type RpcTransaction ¶
type RpcTransaction struct { Hash string `json:"hash"` Size int `json:"size"` Version int `json:"version"` Nonce int `json:"nonce"` Sender string `json:"sender"` SysFee string `json:"sysfee"` NetFee string `json:"netfee"` ValidUntilBlock int `json:"validuntilblock"` Signers []RpcSigner `json:"signers"` Attributes []RpcTransactionAttribute `json:"attributes"` Script string `json:"script"` Witnesses []RpcWitness `json:"witnesses"` BlockHash string `json:"blockhash"` Confirmations int `json:"confirmations"` Blocktime int `json:"blocktime"` }
type RpcTransactionAttribute ¶
type RpcTransferOut ¶
type RpcValidator ¶
type RpcVersion ¶
type RpcVersion struct { TcpPort int `json:"tcpPort"` WsPort int `json:"wsPort"` Nonce string `json:"nonce"` UserAgent string `json:"useragent"` Protocol RpcProtocol `json:"protocol"` }
type RpcWalletBalance ¶
type RpcWalletBalance struct {
Balance string `json:"balance"`
}
type RpcWitness ¶
type RpcWitnessCondition ¶ added in v1.2.0
type RpcWitnessCondition struct { Type string `json:"type"` // type of this condition Expression interface{} `json:"expression,omitempty"` // BooleanCondition: "true" || "false" | NotCondition: !RpcWitnessCondition Expressions []RpcWitnessCondition `json:"expressions,omitempty"` // AndCondition: RpcWitnessCondition && RpcWitnessCondition | OrCondition: RpcWitnessCondition || RpcWitnessCondition Hash string `json:"hash,omitempty"` // ScriptHashCondition | CalledByContractCondition: UInt160.ToString() Group string `json:"group,omitempty"` // GroupCondition | CalledByGroupCondition: ECPoint.ToString() }
RpcWitnessCondition combines all types of conditions into one struct
func CreateRpcWitnessCondition ¶ added in v1.2.0
func CreateRpcWitnessCondition(c *conditions.WitnessCondition) RpcWitnessCondition
type RpcWitnessRule ¶ added in v1.2.0
type RpcWitnessRule struct { Action string `json:"action"` Condition RpcWitnessCondition `json:"condition"` }
type UnclaimedGas ¶
type ValidateAddress ¶
Source Files ¶
- rpcApplicationLog.go
- rpcBlock.go
- rpcCandidates.go
- rpcContractParameter.go
- rpcContractParameterContext.go
- rpcContractState.go
- rpcInvoke.go
- rpcListAddress.go
- rpcListPlugins.go
- rpcNativeContract.go
- rpcNep11Balances.go
- rpcNep11Transfers.go
- rpcNep17Balances.go
- rpcNep17Transfers.go
- rpcNetworkFee.go
- rpcPeers.go
- rpcSigner.go
- rpcState.go
- rpcTransaction.go
- rpcTransferOut.go
- rpcUnclaimed.go
- rpcValidators.go
- rpcVersion.go
- rpcWalletBalance.go
- rpcWitness.go
Click to show internal directories.
Click to hide internal directories.