The Agent Pocket Extension supports a "Relay" mode where it connects to a specified WebSocket URL to receive remote commands. Security Update: All messages must be signed by a trusted Ed25519 key.
The wallet initiates the connection to the Relay URL configured in Settings.
Every message sent to the wallet MUST follow this authenticated envelope format:
{
"protocol": "ed25519/v1",
"data": {
"nonce": 123, // Integer, must be > previous nonce received from this pubkey
"timestamp": 167890000, // Optional: timestamp to prevent long-replay if nonce state is lost
"method": "sign_transaction",
"params": [...]
},
"auth": {
"pubkey": "aad3b...", // Hex string of the Ed25519 public key
"signature": "..." // Hex string of Ed25519(JSON.stringify(data))
}
}- Whitelist: The wallet will verify if
auth.pubkeyexists in its local "Trusted Apps" whitelist. - Signature: Use
auth.pubkeyto verifyauth.signatureagainst the serializeddataobject (canonical JSON needed or raw string logic). - Nonce:
data.noncemust be strictly greater than the last processed nonce for thispubkey.
The wallet acknowledges execution with a signed response, proving it was the holder of the Ethereum private key who executed it.
{
"protocol": "eth/v1",
"data": {
"nonce": 123, // Echoes the request nonce
"id": 1, // Request ID if applicable
"result": "...", // The result of the operation
"error": null
},
"auth": {
"address": "0xWalletAddress...", // The Ethereum address of the wallet
"signature": "0x..." // Ethereum Signature (EIP-191) of JSON.stringify(data)
}
}Request params: []
Response result: "0xWalletAddress..."
Request params: [{ "to": "...", "value": "...", "data": "..." }]
Response result: "0xSignedTxHash..."
Request params: ["Message text"]
Response result: "0xSig..."