You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`from`|`Hex`| Yes | The address that is granting the delegation. |
62
-
|`to`|`Hex`| Yes | The address to which the delegation is being granted. |
63
-
|`scope`|`ScopeConfig`| Yes | The scope of the delegation that defines the initial authority. See [delegation scopes](./delegation-scopes.md) for the full list of scope types and their parameters. |
64
-
|`environment`|[`SmartAccountsEnvironment`](../types.md#smartaccountsenvironment)| Yes | The environment used by the toolkit to define contract addresses for interacting with the <GlossaryTermterm="Delegation Framework" /> contracts. |
65
-
|`caveats`|`Caveats`| No | Caveats that further refine the authority granted by the `scope`. See [caveats reference](./caveats.md) for the full list of caveat types and their parameters. |
66
-
|`parentDelegation`|[`Delegation`](../types.md#delegation)\|`Hex`| No | The parent delegation or its corresponding hex to create a delegation chain. |
67
-
|`salt`|`Hex`| No | The salt for generating the delegation hash. This helps prevent hash collisions when creating identical delegations. |
|`from`|`Hex`| Yes | The address that is granting the delegation. |
62
+
|`to`|`Hex`| Yes | The address to which the delegation is being granted. |
63
+
|`scope`|`ScopeConfig`| Yes | The scope of the delegation that defines the initial authority. See [delegation scopes](./delegation-scopes.md) for the full list of scope types and their parameters. |
64
+
|`environment`|[`SmartAccountsEnvironment`](../types.md#smartaccountsenvironment)| Yes | The environment used by the toolkit to define contract addresses for interacting with the <GlossaryTermterm="Delegation Framework" /> contracts. |
65
+
|`caveats`|`Caveats`| No | Caveats that further refine the authority granted by the `scope`. See [caveats reference](./caveats.md) for the full list of caveat types and their parameters. |
66
+
|`parentDelegation`|[`Delegation`](../types.md#delegation)\|`Hex`| No | The parent delegation or its corresponding hex to create a delegation chain. Mutually exclusive with `parentPermissionContext`. |
67
+
|`parentPermissionContext`|`PermissionContext`| No | Parent chain as `Hex` or as decoded [`Delegation`](../types.md#delegation) values (leaf first). Mutually exclusive with `parentDelegation`. |
68
+
|`salt`|`Hex`| No | The salt for generating the delegation hash. This helps prevent hash collisions when creating identical delegations. |
68
69
69
70
### Example
70
71
@@ -98,14 +99,15 @@ Creates an <GlossaryTerm term="Open delegation">open delegation</GlossaryTerm> t
|`from`|`Hex`| Yes | The address that is granting the delegation. |
104
-
|`scope`|`ScopeConfig`| Yes | The scope of the delegation that defines the initial authority. See [delegation scopes](./delegation-scopes.md) for the full list of scope types and their parameters. |
105
-
|`environment`|[`SmartAccountsEnvironment`](../types.md#smartaccountsenvironment)| Yes | The environment used by the toolkit to define contract addresses for interacting with the <GlossaryTermterm="Delegation Framework" /> contracts. |
106
-
|`caveats`|`Caveats`| No | Caveats that further refine the authority granted by the `scope`. See [caveats reference](./caveats.md) for the full list of caveat types and their parameters. |
107
-
|`parentDelegation`|[`Delegation`](../types.md#delegation)\|`Hex`| No | The parent delegation or its corresponding hex to create a delegation chain. |
108
-
|`salt`|`Hex`| No | The salt for generating the delegation hash. This helps prevent hash collisions when creating identical delegations. |
|`from`|`Hex`| Yes | The address that is granting the delegation. |
105
+
|`scope`|`ScopeConfig`| Conditional | Defines the delegation authority. See [delegation scopes](./delegation-scopes.md) for supported types and parameters. Required for a root open delegation. Optional when either `parentDelegation` or `parentPermissionContext` is set; if omitted, authority is inherited from the parent chain. |
106
+
|`environment`|[`SmartAccountsEnvironment`](../types.md#smartaccountsenvironment)| Yes | The environment used by the toolkit to define contract addresses for interacting with the <GlossaryTermterm="Delegation Framework" /> contracts. |
107
+
|`caveats`|`Caveats`| No | Caveats that further refine the authority granted by the `scope`. See [caveats reference](./caveats.md) for the full list of caveat types and their parameters. |
108
+
|`parentDelegation`|[`Delegation`](../types.md#delegation)\|`Hex`| No | The parent delegation or its corresponding hex to create a delegation chain. Mutually exclusive with `parentPermissionContext`. |
109
+
|`parentPermissionContext`|`PermissionContext`| No | Parent chain as `Hex` or as decoded [`Delegation`](../types.md#delegation) values (leaf first). Mutually exclusive with `parentDelegation`. |
110
+
|`salt`|`Hex`| No | The salt for generating the delegation hash. This helps prevent hash collisions when creating identical delegations. |
0 commit comments