Client class

Constructors

Client.new([String endpoint = 'https://testnet.toncenter.com/api/v2/jsonRPC', String? apiKey, int timeout = 30000])

Properties

apiKey String?
API key
finalinherited
endpoint String
API endpoint
finalinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timeout int
HTTP request timeout in milliseconds
finalinherited

Methods

estimateExternalMessageFee(InternalAddress address, {required Cell body, Cell? initCode, Cell? initData, required bool ignoreSignature}) Future<({int forwardFee, int gasFee, int inForwardFee, int storageFee})>
Returns a fee estimate for the external message as a record, wrapped in a Future:
inherited
getBalance(InternalAddress address) Future<BigInt>
Returns the address balance as a Future
inherited
getContractState(InternalAddress address) Future<({BigInt balance, ({int seqno, String shard, int workchain}) blockId, Uint8List? code, Uint8List? data, LastTransactionId? lastTransaction, String state, int timestamp})>
Returns a contract state as a record, wrapped in a Future:
inherited
getMasterchainInfo() Future<({int initSeqno, int latestSeqno, String shard, int workchain})>
Returns the latest masterchain info as a record, wrapped in a Future:
inherited
getShardTransactions(int workchain, int seqno, String shard) Future<List<({InternalAddress account, LastTransactionId lastTransactionId})>>
Returns the latest workchain shards as a List of records, wrapped in a Future:
inherited
getTransaction(InternalAddress address, String lt, String hash) Future<Transaction?>
Returns a transaction by its logical time lt and a base64 encoded hash as a Transaction? wrapped in a Future
inherited
getTransactions(InternalAddress address, {required int limit, String? lt, String? hash, String? toLt, bool? inclusive}) Future<List<Transaction>>
Returns a List
inherited
getWorkchainShards(int seqno) Future<List<({int seqno, String shard, int workchain})>>
Returns the latest workchain shards as a List of records, wrapped in a Future:
inherited
isContractDeployed(InternalAddress address) Future<bool>
Returns a bool, wrapped in a Future: true if contract is in active state, false otherwise
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
open<T extends Contract>(T src) → T
Returns a new opened contract with the ContractProvider initialized
provider(InternalAddress address, ContractMaybeInit? init) StonfiContractProvider
Returns a new ContractProvider
runMethod(InternalAddress address, String methodName, [List<TupleItem> stack = const <TupleItem>[]]) Future<({int gasUsed, TupleReader stack})>
Returns the gas used and the stack after the get method invocation as a record, wrapped in a Future:
runMethodWithError(InternalAddress address, String methodName, List<TupleItem> stack) Future<({int exitCode, int gasUsed, TupleReader stack})>
Returns the gas used, stack and the exit code after the get method invocation as a record, wrapped in a Future:
inherited
sendExternalMessage(Contract contract, Cell src) → dynamic
Returns nothing, sends an external message to contract
inherited
sendFile(Uint8List src) Future<void>
Returns nothing, sends a BoC file src directly to the network
inherited
sendMessage(Message src) Future<void>
Returns nothing, sends a message src as a BoC to the network
inherited
toString() String
A string representation of this object.
inherited

Operators

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