Skip to content

Commit

Permalink
Add special "0x0" chainID for universally supported capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
forshtat committed Feb 20, 2025
1 parent e8e1400 commit 8fa2c54
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion EIPS/eip-5792.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ If any of these supplemental expressions of capabilities are contradicted by cap

Capabilities are returned in key/value pairs, with the key naming a capability and a value conforming to a shape defined for that name, in an object keyed to the relevant [EIP-155](./eip-155.md) `chainId` expressed in hexadecimal notation.
Capabilities are nested in per-chain objects because wallets may support different capabilities across multiple chains authorized in a given session.
Capabilities that the wallet supports on all the chains SHOULD be included only once, using a special `chainID` value `"0x0"`, and SHOULD NOT be repeated in nested per-chain objects.

```typescript
type GetCapabilitiesParams = [`0x${string}`, [`0x${string}`]]; // Wallet address, array of queried chain ids (optional)
Expand All @@ -297,6 +298,11 @@ The capabilities below are for illustrative purposes.
```json
{
"0x0": {
"flow-control": {
"supported": true
}
},
"0x2105": {
"paymasterService": {
"supported": true
Expand All @@ -306,7 +312,7 @@ The capabilities below are for illustrative purposes.
}
},
"0x14A34": {
"paymasterService": {
"auxiliaryFunds": {
"supported": true
}
}
Expand Down

0 comments on commit 8fa2c54

Please sign in to comment.