CasperClient class

Constructors

CasperClient(Uri nodeUri)
Creates an instance of Casper RPC client.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getAccountInfo(ClPublicKey publicKey, [BlockId? blockId]) Future<GetAccountInfoResult>
Requests the information about the account with given publicKey from the network. If no blockId is specified, the latest information will be requested.
getAuctionInfo([BlockId? blockId]) Future<GetAuctionInfoResult>
Requests the bids and validators at a given block.
getBalance(Uref purseUref, [String? stateRootHash]) Future<GetBalanceResult>
Requests a purse’s balance from the network.
getBlock(BlockId blockId) Future<GetBlockResult>
Requests the block identified by blockId from the network.
getBlockTransfers(BlockId blockId) Future<GetBlockTransfersResult>
Requests the block transfers of the block identified by blockId from the network.
getDeploy(String deployHash) Future<GetDeployResult>
Requests the deploy object with given deployHash from the network.
getDictionaryItem(String dictionaryItemKey, [String? stateRootHash]) Future<GetDictionaryItemResult>
Queries a dictionary item and returns the stored value from the network dictionaryItemKey is the key of the dictionary item to query. stateRootHash is the state root hash of the block.
getDictionaryItemByAccount(String accountKey, String dictionaryName, String dictionaryItemKey, [String? stateRootHash]) Future<GetDictionaryItemResult>
Queries a dictionary item from an account's named keys. accountKey is the formatted key of the account, whose named keys contain the queried dictionary item. dictionaryName is the named key under which the dictionary seed URef is stored. dictionaryItemKey is the key of the dictionary item to query. stateRootHash is the state root hash of the block.
getDictionaryItemByContract(String contractKey, String dictionaryName, String dictionaryItemKey, [String? stateRootHash]) Future<GetDictionaryItemResult>
Queries a dictionary item from a contract's named keys. contractKey is the formatted key of the contract, whose named keys contain the queried dictionary item. dictionaryName is the named key under which the dictionary seed URef is stored. dictionaryItemKey is the key of the dictionary item to query. stateRootHash is the state root hash of the block.
getDictionaryItemByUref(Uref seedUref, String dictionaryItemKey, [String? stateRootHash]) Future<GetDictionaryItemResult>
Queries a dictionary item via it's seed URef. seedUref is the dictionary's seed URef. dictionaryItemKey is the key of the dictionary item to query. stateRootHash is the state root hash of the block.
getEraInfoBySwitchBlock([BlockId? blockId]) Future<GetEraInfoBySwitchBlockResult>
Requests an EraInfo from the network given a switch block. For a non-switch block this method returns an empty response.
getItem(String key, [String? stateRootHash, List<String> path = const []]) Future<GetItemResult>
Deprecated Use queryGlobalState instead. Queries a state item and returns the stored value from the network
getPeers() Future<GetPeersResult>
Requests the list of peers connected to the node.
getRpcSchema() Future
getStateRootHash([BlockId? blockId]) Future<GetStateRootHashResult>
Requests the state root hash of the node. If specified, requests the state root hash of the block identified by blockId.
getStatus() Future<GetStatusResult>
Requests the current status of the node.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
putDeploy(Deploy deploy) Future<PutDeployResult>
Sends a Deploy to the network to be executed. PutDeployResult contains the hash of the deploy.
putDeployJson(Map<String, dynamic> deployJson) Future<PutDeployResult>
Deprecated Sends a Deploy to the network to be executed. PutDeployResult contains the hash of the deploy.
queryGlobalState(String key, String hash, bool isBlockHash, [List<String> path = const []]) Future<QueryGlobalStateResult>
Queries a global state and returns the stored value from the network
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited