@0xio/sdk. Every 0xio wallet (extension, 0xio Desktop, the 0xio app) runs the same conformance suite against these rules.
Messages
ridis 32 lowercase hex and rides only on methods that open a review or sign. Key records by the page’s origin as the browser reports it, never by params.- An answer to a request with a
ridcarries it. An error answer carriesridandstatusat the top level and again inerror.detailsas{ requestId, status }. - The announce and
wallet_hellocarry no user state: no address, network, lock state or connection. - “Same request” is sha256 of the canonical JSON of
{ method, network, params }.networkis the frame’s network on 0xio Desktop andnullon postMessage channels.
Rules
- Idempotency. The same request under a known
ridjoins it or gets the stored outcome; another request under it isREQUEST_ID_REUSED. A final failure never runs again. - Statuses. Only the allowed moves; a final status never changes; records live 24 hours.
- Scope. Events go only to the tab and frame that sent the request. A site that is not connected sees
review_openforlocked, and no address or network. - Timeouts. A page that stops waiting never cancels the review. The review window is 5 minutes, then
expiredwithUSER_REJECTED. - Page close. An unanswered review closes with its page; an approved request finishes and keeps its outcome.
- Limits. Over 20 requests a second, answer
RATE_LIMITEDfor each extra one, never drop it. Over the open request cap (8, or a lower cap you declare), answerRATE_LIMIT_EXCEEDED. - Pre-signed.
broadcast_onlyfrom the connected wallet is not reviewed again; from another wallet,INVALID_PARAMS. - Registration.
register_private_view_keyfollows the contract on the request lifecycle page.
Conformance suite
The suite lives in the SDK repository underconformance/. It speaks only the wire, so a wallet passes only by following the rules itself.
harness.ts: the adapter your test harness implements (open a page, send, receive events, close the page, approve or reject the review, and optional clock, chain, lock and account hooks).suite.ts: the cases. Register them withdefineConformanceSuite({ name, features, create })under Jest or Vitest.vectors.json: request id format, digest bytes, transitions, masking and limits forcargo test, XCTest and JUnit.reference/: a reference wallet that passes every case, to read as the executable spec.