SorobanServer class

This class helps you to connect to a local or remote soroban rpc server and send requests to the server. It parses the results and provides corresponding response objects.

Constructors

SorobanServer(String _serverUrl)
Constructor. Provide the url of the soroban rpc server to initialize this class.

Properties

enableLogging bool
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
httpOverrides bool
Dio HTTP Overrides enable overrides to handle badCertificateCallback. available only for the non-Web platform.
no getter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getEvents(GetEventsRequest request) Future<GetEventsResponse>
Clients can request a filtered list of events emitted by a given ledger range. Soroban-RPC will support querying within a maximum 24 hours of recent ledgers. Note, this could be used by the client to only prompt a refresh when there is a new ledger with relevant events. It should also be used by backend Dapp components to "ingest" events into their own database for querying and serving. If making multiple requests, clients should deduplicate any events received, based on the event's unique id field. This prevents double-processing in the case of duplicate events being received. By default soroban-rpc retains the most recent 24 hours of events. See: https://soroban.stellar.org/api/methods/getEvents
getHealth() Future<GetHealthResponse>
General node health check request. See: https://soroban.stellar.org/api/methods/getHealth
getLatestLedger() Future<GetLatestLedgerResponse>
For finding out the current latest known ledger. See: https://soroban.stellar.org/api/methods/getLatestLedger
getLedgerEntries(List<String> base64EncodedKeys) Future<GetLedgerEntriesResponse>
For reading the current value of ledger entries directly. Allows you to directly inspect the current state of a contract, a contract’s code, or any other ledger entry. This is a backup way to access your contract data which may not be available via events or simulateTransaction. To fetch contract wasm byte-code, use the ContractCode ledger entry key. See: https://soroban.stellar.org/api/methods/getLedgerEntries
getNetwork() Future<GetNetworkResponse>
General info about the currently configured network. See: https://soroban.stellar.org/api/methods/getNetwork
getTransaction(String transactionHash) Future<GetTransactionResponse>
Clients will poll this to tell when the transaction has been completed. See: https://soroban.stellar.org/api/methods/getTransaction
loadContractCodeForContractId(String contractId) Future<XdrContractCodeEntry?>
Loads the contract code entry (including source code - wasm bytes) for a given contract id.
loadContractCodeForWasmId(String wasmId) Future<XdrContractCodeEntry?>
Loads the contract source code (including source code - wasm bytes) for a given wasm id.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sendTransaction(Transaction transaction) Future<SendTransactionResponse>
Submit a real transaction to the stellar network. This is the only way to make changes “on-chain”. Unlike Horizon, this does not wait for transaction completion. It simply validates and enqueues the transaction. Clients should call getTransactionStatus to learn about transaction success/failure. This supports all transactions, not only smart contract-related transactions. See: https://soroban.stellar.org/api/methods/sendTransaction
simulateTransaction(SimulateTransactionRequest request) Future<SimulateTransactionResponse>
Submit a trial contract invocation to get back return values, expected ledger footprint, and expected costs. See: https://soroban.stellar.org/api/methods/simulateTransaction
toString() String
A string representation of this object.
inherited

Operators

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