@somnia-chain/markets-sdk / index / SignerRequiredError
Class: SignerRequiredError
Defined in: packages/sdk/src/errors.ts:193
An authenticated (writing) method was called on a read-only client.
Details
Construct the exchange with a privateKey, an account, or a
walletClient to unlock writes. Distinct from NotConfiguredError:
nothing is missing from the addresses, the client simply has no signer.
Extends
Constructors
Constructor
new SignerRequiredError(
operation,guidance?):SignerRequiredError
Defined in: packages/sdk/src/errors.ts:205
Creates a signer-required error for one authenticated operation.
Details
operation: The method that needs a signer (e.g."createOrder").guidance: What would satisfy it, when the default ("construct SomniaMarkets with a signer") is not the fix — a trader whose executor cannot sign typed data needs a different executor, not a different root. Kept on the error asguidanceso a caller can branch on it without parsing the message.
Parameters
operation
string
guidance?
string = "construct SomniaMarkets with a privateKey / account / walletClient"
Returns
SignerRequiredError
Overrides
SomniaMarketsError.constructor
Properties
operation
readonlyoperation:string
Defined in: packages/sdk/src/errors.ts:206
guidance
readonlyguidance:string="construct SomniaMarkets with a privateKey / account / walletClient"
Defined in: packages/sdk/src/errors.ts:207