ClientConfig
Defined in: src/Client.ts:147
Configuration for creating a client.
Constraint: Only one network ID is supported per process. The Midnight SDK
uses a global setNetworkId call internally, so creating two clients targeting
different networks in the same process will cause undefined behaviour.
Since
0.2.0
Properties
feeRelay?
optionalfeeRelay:object
Defined in: src/Client.ts:167
Fee relay — delegate fee payment to a remote HTTP relay server.
The relay pays dust (tx fees) while the user’s wallet provides value inputs.
User’s wallet balances with { payFees: false }, relay adds dust only.
url
url:
string
logging?
optionallogging:boolean
Defined in: src/Client.ts:161
Enable logging (default: true)
network?
optionalnetwork:string
Defined in: src/Client.ts:149
Network to connect to (default: ‘local’)
networkConfig?
optionalnetworkConfig:NetworkConfig
Defined in: src/Client.ts:151
Custom network configuration (overrides network preset)
privateStateProvider
privateStateProvider:
PrivateStateProvider
Defined in: src/Client.ts:157
Private state provider (required)
seed?
optionalseed:string
Defined in: src/Client.ts:155
Wallet seed (required for non-local networks). Ignored if wallet is provided.
storage?
optionalstorage:StorageConfig
Defined in: src/Client.ts:159
Storage configuration
txTtlMs?
optionaltxTtlMs:number
Defined in: src/Client.ts:169
Transaction TTL in milliseconds (default: 30 minutes). Used as the fallback when no per-call TTL is provided to balanceTx.
wallet?
optionalwallet:ConnectedWallet
Defined in: src/Client.ts:153
Pre-created wallet (from Wallet.fromSeed or Wallet.fromBrowser)