SorobanServer class Null safety

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

acknowledgeExperimental bool
read / write
enableLogging bool
read / write
hashCode int
The hash code for this object.
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

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
getLedgerEntry(String base64EncodedKey) Future<GetLedgerEntryResponse>
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/getLedgerEntry
getNetwork() Future<GetNetworkResponse>
General info about the currently configured network. See: https://soroban.stellar.org/api/methods/getNetwork
getNonce(String accountId, String contractId) Future<int>
Helper method to get the nonce for a given accountId for the contract specified by the contractId. Used for contract auth.
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
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
printExperimentalFlagErr() → dynamic
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(Transaction transaction) 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