Skip to content

@lelantos-org/sdk / index / AnyWalletError

Type Alias: AnyWalletError ​

ts
type AnyWalletError = 
  | WalletConfigError
  | NetworkNotDeployedError
  | EnvironmentError
  | InvalidArgumentError
  | NoEvmAccountError
  | UnsupportedOperationError
  | InsufficientBalanceError
  | NotesHeldError
  | InsufficientCoverError
  | FeeAssetNotQuotedError
  | FeeAboveLimitError
  | DeadlinePassedError
  | QuoteStaleError
  | UserRejectedError
  | RelayerRejectedError
  | SpendOutcomeUnknownError
  | { [K in NetworkErrorCode]: NetworkError<K> }[NetworkErrorCode]
  | WireFormatError
  | ChainRpcError
  | TxRevertedError
  | TxMiningError
  | TreeOutOfSyncError
  | ProverError
  | ProverUnavailableError
  | ProverArtifactsMissingError
  | ProverArtifactsFailedError
  | { [K in WorkerErrorCode]: WorkerRpcError<K> }[WorkerErrorCode]
  | X402PaymentError
  | InternalError;

Defined in: @lelantos-org/sdk/dist/errors/guard.d.ts:21

Union of every concrete SDK error, discriminated on code. Switching on code narrows to the class carrying that variant's context fields.

NetworkError and WorkerRpcError cover several codes and are expanded one code per member. Extract (the basis of WalletErrorOf and the code overload of isWalletError) matches a member only when its code is assignable to the requested literal, which a union-typed code never is, so listing either class once would resolve WalletErrorOf to never for its codes.