Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.startale.com/llms.txt

Use this file to discover all available pages before exploring further.

The SDK uses standard EIP-1193 and JSON-RPC error codes. All errors are instances of ProviderRpcError with a code, message, and optional data field.

Provider errors

CodeNameMeaning
4001User rejectedUser dismissed the popup or rejected the request
4100UnauthorizedMethod requires a connected account; call eth_requestAccounts first
4200Unsupported methodThe method is not supported by the SDK or in the current context
4900Provider disconnectedThe popup is unreachable
4901Chain disconnectedThe active chain is not reachable
4902Unsupported chainChain not in appChainIds

RPC errors

CodeNameMeaning
-32700Parse errorMalformed JSON in request
-32600Invalid requestRequest shape invalid
-32601Method not foundUnknown method name
-32602Invalid paramsParameters don’t match the method’s schema
-32603Internal errorUnexpected internal failure

Handling rejections

try {
  const hash = await sendTransactionAsync({ to, value })
} catch (error) {
  if (error.code === 4001) {
    // User cancelled
    return
  }
  if (error.code === 4100) {
    // Not connected, prompt connect
    return
  }
  throw error
}

Wagmi errors

Wagmi wraps provider errors in its own error types. The same code values are preserved on the cause field:
try {
  await sendTransactionAsync({ to, value })
} catch (error) {
  if (error.cause?.code === 4001) {
    // User cancelled
  }
}
SymptomLikely cause
Popup never opensBrowser popup blocker; the call must be triggered from a user gesture
Popup opens then immediately closesCross-Origin-Opener-Policy mismatch on the host page
Connection completes but accountsChanged never firesListener registered after connection; subscribe before calling connect