dApp Integration
Implement the dApp endpoint directly against the three specifications. Do not depend on the removed package or send its former capability and handshake objects.
Pairing and relay connection
- Create a fresh X25519 private key, public key, and 32-byte lowercase-hex channel ID.
- Build the six-field QR URI in the canonical order and display the derived four-digit code.
- Connect to
/v1using all five required query fields. - Wait for the dApp's own
channel_joinedevent before sending data. - Pin the first eligible non-self
channel_joinedpublic key. Extra joiners are ignored.
Send requests
Each request is an EIP-1193 envelope, not JSON-RPC 2.0. Its ID is a unique printable ASCII string
of 1–128 bytes among outstanding requests. Seal it with the dApp-to-wallet key and attach the
canonical eip155:<decimal> suffix.
// eip155:1 request plaintext
{
"id": "a printable-ASCII request ID",
"method": "personal_sign",
"params": ["0x48656c6c6f", "0x0000000000000000000000000000000000000000"]
}Handle responses and events
A response has id and exactly one of result or error.
Events have event and data. Reject ambiguous envelopes. Response frames
reuse the request's CAIP-2 suffix; a chainChanged event uses the new chain.
Counter persistence
Reserve and persist each send sequence number before encryption, and persist the accepted receive sequence after authentication and MessagePack decoding. If key or counter state cannot be restored safely, close the channel and pair again with fresh keys.