@somnia-chain/markets-sdk / index / TraderConfig
Interface: TraderConfig
Defined in: trade.ts:73
Signer + defaults for client.createTrader — how a Trader signs. Provide
at least one signing source: privateKey, a local account, or a walletClient.
Properties
walletClient?
optionalwalletClient?:object
Defined in: trade.ts:80
A pre-built signer (e.g. a browser/wagmi wallet over an injected provider).
Only needed when the SDK can't sign locally — with privateKey / a local
account, the SDK signs itself and sends over the client's WebSocket via
realtime_sendRawTransaction (send + confirm in one round-trip).
account?
optionalaccount?:`0x${string}`|Account
Defined in: trade.ts:82
A local signing account (e.g. from viem's privateKeyToAccount).
privateKey?
optionalprivateKey?:`0x${string}`
Defined in: trade.ts:84
Private key — the SDK derives the account.
publicClient?
optionalpublicClient?:object
Defined in: trade.ts:86
Read client for allowance/receipts. Defaults to the client's WebSocket client.
decimals?
optionaldecimals?:number
Defined in: trade.ts:88
Outcome/collateral decimals (default 6).
gas?
optionalgas?:bigint
Defined in: trade.ts:93
Default gas ceiling per tx (10,000,000 when unset); each write can override
per-call via its params' gas.