Skip to content

Commit

Permalink
Purge V0 implementation, tests, and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ilikesymmetry committed Oct 8, 2024
1 parent 74bd2cb commit 028685b
Show file tree
Hide file tree
Showing 61 changed files with 36 additions and 4,586 deletions.
20 changes: 0 additions & 20 deletions docs/Cosigner.md

This file was deleted.

62 changes: 20 additions & 42 deletions docs/ERC-7715.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@
### Signer types

```typescript
type KeySigner = {
type: "key";
data: {
type: "secp256r1"; // supports both passkeys and cryptokeys
publicKey: `0x${string}`;
};
};

type AccountSigner = {
type: "account";
data: {
Expand All @@ -31,11 +23,13 @@ type NativeTokenRecurringAllowancePermission = {
};
};

type AllowedContractSelectorPermission = {
type: "allowed-contract-selector";
type NativeTokenRecurringAllowancePermission = {
type: "erc20-recurring-allowance";
data: {
contract: `0x${string}`; // address
selector: `0x${string}`; // bytes4 function selector
token: `0x${string}`; // address
start: number; // unix seconds
period: number; // seconds
allowance: `0x${string}`; // hex for uint256
};
};
```
Expand All @@ -51,10 +45,9 @@ const request = {
address: "0x...", // optional
expiry: 1725000000,
signer: {
type: "key",
type: "account",
data: {
type: "secp256r1",
publicKey: "0x...",
address: "0x...",
},
},
permissions: [
Expand All @@ -66,13 +59,6 @@ const request = {
allowance: `0x1`, // 1 wei
},
},
{
type: "allowed-contract-selector",
data: {
contract: "0x8Af2FA0c32891F1b32A75422eD3c9a8B22951f2F", // Click
selector: "0x2bd1b86d", // permissionedCall(bytes)
},
},
],
},
],
Expand All @@ -89,10 +75,9 @@ const request = {
address: "0x...", // optional
expiry: 1725000000,
signer: {
type: "key",
type: "account",
data: {
type: "secp256r1",
publicKey: "0x...",
address: "0x...",
},
},
permissions: [
Expand All @@ -104,13 +89,6 @@ const request = {
allowance: `0x1`, // 1 wei
},
},
{
type: "allowed-contract-selector",
data: {
contract: "0x8Af2FA0c32891F1b32A75422eD3c9a8B22951f2F",
selector: "0x2bd1b86d", // permissionedCall(bytes)
},
},
],
},
context: "0x...",
Expand All @@ -127,6 +105,14 @@ type NativeTokenRecurringAllowancePermissionState = {
allowanceUsed: Hex; // uint256
allowanceLeft: Hex; // uint256
};

type NativeTokenRecurringAllowancePermissionState = {
token: Address;
cycleStart: number;
cycleEnd: number;
allowanceUsed: Hex; // uint256
allowanceLeft: Hex; // uint256
};
```

### `wallet_getPermissions` RPC types
Expand Down Expand Up @@ -163,10 +149,9 @@ type GetPermissionsResponse = (PermissionReponse & {
address: "0x...", // optional
expiry: 1725000000,
signer: {
type: "key",
type: "account",
data: {
type: "secp256r1",
publicKey: "0x...",
address: "0x...",
},
},
permissions: [
Expand All @@ -178,13 +163,6 @@ type GetPermissionsResponse = (PermissionReponse & {
allowance: `0x1`, // 1 wei
},
},
{
type: "allowed-contract-selector",
data: {
contract: "0x8Af2FA0c32891F1b32A75422eD3c9a8B22951f2F", // Click
selector: "0x2bd1b86d", // permissionedCall(bytes)
},
},
],
},
context: "0x...",
Expand Down
9 changes: 0 additions & 9 deletions docs/PaymasterRequirement.md

This file was deleted.

64 changes: 0 additions & 64 deletions docs/PermissionManager.md

This file was deleted.

Loading

0 comments on commit 028685b

Please sign in to comment.