ClientOptions

data class ClientOptions(val sourceAccountKeyPair: KeyPair, val contractId: String, val network: Network, val rpcUrl: String, val baseFee: Int = 100, val transactionTimeout: Long = 300, val submitTimeout: Int = 30, val simulate: Boolean = true, val restore: Boolean = true, val autoSubmit: Boolean = true)

Configuration options for ContractClient initialization and contract invocation.

This class consolidates both client setup and invocation behavior options:

  • Client setup: sourceAccountKeyPair, contractId, network, rpcUrl, logging

  • Invocation behavior: baseFee, timeouts, simulation, restoration, auto-submit

Client Setup Options

Constructors

Link copied to clipboard
constructor(sourceAccountKeyPair: KeyPair, contractId: String, network: Network, rpcUrl: String, baseFee: Int = 100, transactionTimeout: Long = 300, submitTimeout: Int = 30, simulate: Boolean = true, restore: Boolean = true, autoSubmit: Boolean = true)

Properties

Link copied to clipboard

Whether to auto-submit write calls (default: true). When true, write calls are automatically signed and submitted. When false, only simulation is performed and you can inspect the transaction before submitting manually.

Link copied to clipboard

The base fee for the transaction in stroops (default: 100)

Link copied to clipboard

The contract ID (C... address) to interact with

Link copied to clipboard

The Stellar network (TESTNET, PUBLIC, etc.)

Link copied to clipboard

Whether to auto-restore contract state if expired (default: true)

Link copied to clipboard

The RPC server URL (e.g., "https://soroban-testnet.stellar.org:443")

Link copied to clipboard

Whether to simulate the transaction before submission (default: true)

Link copied to clipboard

The keypair of the source account that will send transactions. If restore is needed in method options, must contain private key.

Link copied to clipboard

Polling timeout when submitting transactions in seconds (default: 30)

Link copied to clipboard

Transaction validity timeout in seconds (default: 300 = 5 minutes)