Skip to content

Commit

Permalink
Merge pull request ethereum#8 from ilikesymmetry/patch-1
Browse files Browse the repository at this point in the history
7715: Make account DID
  • Loading branch information
pedrouid authored Jun 26, 2024
2 parents 2d98b6d + 9bd3e16 commit e143bb2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ERCS/erc-7715.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ interface Policy {

```tsx
type GrantPermissionsRequestParams = {
account?: `0x${string}`;
account?: `did:${string}`;

signer: {
type: string;
Expand All @@ -89,7 +89,7 @@ type GrantPermissionsRequestParams = {
};
```

`account` is an optional field that identifies the account being targetted for this permissions request which is useful when a connection has been established and multiple accounts have been exposed
`account` is an optional field that identifies the account being targetted for this permissions request which is useful when a connection has been established and multiple accounts have been exposed. It's type is a DID, which requires a `"did:"` prefix and enables us to identify accounts in a flexible and forwards-compatible manner. To idenfiy a Ethereum addresses, [CAIP-10](https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-10.md) is RECOMMENDED, for example: `"did:pkh:eip155:1:0x..."`. To identify an ENS name, [DID-ENS-spec](https://github.com/veramolabs/did-ens-spec) is RECOMMENDED, for example: `"did:ens:mainnet:vitalik.eth"`.

`signer` is a field that identifies the key or account associated with the session or alternatively the wallet will manage the session. See the “Wallet-managed Sessions” section for details.

Expand All @@ -103,7 +103,7 @@ Request example:

```tsx
{
account: '0x...',
account: 'did:pkh:eip155:1:0x...',

signer: {
type: 'key',
Expand Down Expand Up @@ -240,7 +240,7 @@ type MultiKeySigner = {
type AccountSigner = {
type: "account";
data: {
id: `0x${string}`;
id: `did:${string}`;
};
};
```
Expand Down Expand Up @@ -448,11 +448,11 @@ A simple pseudocode example of using a permission in this way, given two ethers
const permissionsResponse = await bob.request({
method: 'wallet_grantPermissions',
params: [{
account: bob.address
account: `did:pkh:eip155:1:${bob.address}`,
signer: {
type: 'account',
data: {
id: alice.address
id: `did:pkh:eip155:1:${alice.address}`
}
},
permissions: [{
Expand Down

0 comments on commit e143bb2

Please sign in to comment.