@1shotapi/ows-types 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,29 +8,27 @@ export interface IExecutionPermission {
|
|
|
8
8
|
isAdjustmentAllowed: boolean;
|
|
9
9
|
data: Record<string, unknown>;
|
|
10
10
|
}
|
|
11
|
-
/** EIP-7715 rule constraining a permission (e.g. expiry). */
|
|
12
|
-
export interface IExecutionPermissionRule {
|
|
13
|
-
type: string;
|
|
14
|
-
data: Record<string, unknown>;
|
|
15
|
-
}
|
|
16
11
|
/**
|
|
17
|
-
*
|
|
12
|
+
* EIP-7715 rule constraining a permission (e.g. expiry, allowedTargets).
|
|
18
13
|
*
|
|
19
|
-
*
|
|
20
|
-
* `
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* caveat config via `builder.addCaveat(type, data)` and merges the result onto
|
|
24
|
-
* the top-level scope through `createDelegation({ scope, caveats })`.
|
|
14
|
+
* Host-stacked enforcers on `wallet_requestExecutionPermissions` use optional
|
|
15
|
+
* top-level `rules[]` with this shape. At sign time the wallet maps each entry
|
|
16
|
+
* via `builder.addCaveat(type, data)` / `createDelegation({ scope, caveats })`
|
|
17
|
+
* — MetaMask kit “caveats” are the on-delegation concept after that mapping.
|
|
25
18
|
*
|
|
26
|
-
* `type` matches a `CaveatType`
|
|
27
|
-
* `data` carries the config for that
|
|
28
|
-
* `{
|
|
19
|
+
* `type` matches a kit `CaveatType` (or a wallet-allowlisted custom enforcer such
|
|
20
|
+
* as `chainlink-price-rule`). `data` carries the builder config for that type
|
|
21
|
+
* (e.g. `{ targets: address[] }` for `allowedTargets`).
|
|
29
22
|
*/
|
|
30
|
-
export interface
|
|
23
|
+
export interface IExecutionPermissionRule {
|
|
31
24
|
type: string;
|
|
32
25
|
data: Record<string, unknown>;
|
|
33
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Alias for {@link IExecutionPermissionRule} used at wallet DF mapping call sites
|
|
29
|
+
* that still speak “appended caveats” after host `rules` → `addCaveat`.
|
|
30
|
+
*/
|
|
31
|
+
export type IAppendedCaveatConfiguration = IExecutionPermissionRule;
|
|
34
32
|
/**
|
|
35
33
|
* One entry in `wallet_requestExecutionPermissions` params.
|
|
36
34
|
* `params` is the array of these objects (not nested in a further wrapper).
|
|
@@ -42,14 +40,12 @@ export interface IExecutionPermissionRequest {
|
|
|
42
40
|
/** Session / delegatee account that receives the permission. */
|
|
43
41
|
to: EVMAccountAddress;
|
|
44
42
|
permission: IExecutionPermission;
|
|
45
|
-
rules?: IExecutionPermissionRule[];
|
|
46
43
|
/**
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* legacy single-scope behaviour.
|
|
44
|
+
* Host-stacked enforcer configs (EIP-7715 `rules`), AND-ed onto the
|
|
45
|
+
* top-level `permission` scope at sign time. Optional + additive: omitting
|
|
46
|
+
* it keeps single-scope behaviour.
|
|
51
47
|
*/
|
|
52
|
-
|
|
48
|
+
rules?: IExecutionPermissionRule[];
|
|
53
49
|
}
|
|
54
50
|
/** ERC-4337 factory dependency required before redeeming a permission. */
|
|
55
51
|
export interface IExecutionPermissionDependency {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eip7715.d.ts","sourceRoot":"","sources":["../../src/eip1193/eip7715.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,UAAU,EACV,kBAAkB,EAClB,SAAS,EACV,MAAM,wBAAwB,CAAC;AAEhC;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,mBAAmB,EAAE,OAAO,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B;AAED
|
|
1
|
+
{"version":3,"file":"eip7715.d.ts","sourceRoot":"","sources":["../../src/eip1193/eip7715.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,E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