neo3.api
Classes to interact with the network such as a specialised RPC Client for NEO Node RPC API and a facade for interacting with smart contracts over RPC.
neo3.api.noderpc
NEO RPC Node client and response classes.
ApplicationExecution
— SpecialisedExecutionResult
with additional notification and trigger information.BlockApplicationLogResponse
— Data log for processing of a block on chain.BlockValidator
— Activate consensus member.Candidate
— Candidate consensus member.ExecutionResult
— Execution result data.ExecutionResultResponse
— Response toinvokecontractverify
,invokefunction
orinvokescript
RPC call.GetPeersResponse
— Response togetpeers
RPC call.GetVersionResponse
— Response togetversion
RPC call.JsonRpcError
— Common base class for all non-exit exceptions.JsonRpcTimeoutError
— Common base class for all non-exit exceptions.MapStackItem
— Virtual machine stack item.MempoolResponse
— Response togetrawmempool
RPC call.NeoRpcClient
— Specialised RPC client for NEO's Node RPC API.Nep17Balance
— NEP-17 balance entry.Nep17BalancesResponse
— Response togetnep17balances
RPC call.Nep17Transfer
— NEP-17 transfer record.Nep17TransfersResponse
— Response togetnep17transfer
RPC call.NextBlockValidatorsResponse
— Response togetnextblockvalidators
RPC call.Notification
— Smart contract notification entry.Peer
— P2P peer information.RPCClient
— RPC Client base.Receipt
— Transaction receipt containing data regarding chain state and events happening as a result of executing the transaction.StackItem
— Virtual machine stack item.TransactionApplicationLogResponse
— Data log for processing of a transaction on chain.VersionProtocol
— Partial response ofgetversion
RPC call.
neo3.api.wrappers
Convenience wrappers for calling smart contracts via RPC.
The most specific wrappers in this module are for NEOs native contracts NeoToken
, GasToken
, PolicyContract
and
RoleManagement
. The ContractManagement
and Ledger
contracts are not wrapped. See the FAQ for the reasons.
One step up are wrappers for contracts following the NEP-17 Token standard (NEP17Contract
) and NEP-11 NFT standard
(NEP11DivisibleContract
& NEP11NonDivisibleContract
).
As last resort there is the GenericContract
which can be used for calling arbitrary functions on arbitrary contracts.
Obtaining the execution results of the functions on the wrapped contracts is done through one of 3 methods on the ChainFacade class
test_invoke()
- does not persist to chain. Costs no gas.invoke()
- does persist to chain. Requires signing and costs gas.estimate_gas()
- does not persist to chain. Costs no gas.
facade = ChainFacade.node_provider_mainnet()
neo = NeoToken()
result = await facade.test_invoke(neo.candidates_registered())
Candidate
— Container for holding consensus candidate voting results.ChainFacade
— The gateway to the network.ContractMethodResult
— A helper class around thescript
(VM opcodes) to be executed which allows to forward the annotated return type(ContractMethodResult[T]
) of the annotated functionf
to a consumer function, without having to actually return an instance ofT
in the implementation off
.GasToken
— Wrapped GAS token contract.GenericContract
— Generic class to call arbitrary methods on a smart contract.InvokeReceipt
— Transaction submission results.NEP11DivisibleContract
— Base class for divisible NFTs.NEP11NonDivisibleContract
— Base class for non-divisible NFTs.NEP17Contract
— Base class for calling NEP-17 compliant smart contracts.NeoToken
— Wrapped NEO token contract.PolicyContract
— Wrapper around the native contract that manages system policies.RoleContract
— Wrapper around the native Role management contract.