Skip to content

Commit 6a3f599

Browse files
authored
Merge branch 'main' into ew-dashboard
2 parents 51a3640 + 3f028db commit 6a3f599

1 file changed

Lines changed: 19 additions & 17 deletions

File tree

  • smart-accounts-kit/reference/delegation

smart-accounts-kit/reference/delegation/index.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,16 @@ Creates a delegation with a specific <GlossaryTerm term="Delegate account">deleg
5656

5757
### Parameters
5858

59-
| Name | Type | Required | Description |
60-
| ------------------ | ------------------------------------------------------------------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
61-
| `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 <GlossaryTerm term="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. |
59+
| Name | Type | Required | Description |
60+
| ------------------------- | ------------------------------------------------------------------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
61+
| `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 <GlossaryTerm term="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. |
6869

6970
### Example
7071

@@ -98,14 +99,15 @@ Creates an <GlossaryTerm term="Open delegation">open delegation</GlossaryTerm> t
9899

99100
### Parameters
100101

101-
| Name | Type | Required | Description |
102-
| ------------------ | ------------------------------------------------------------------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
103-
| `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 <GlossaryTerm term="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. |
102+
| Name | Type | Required | Description |
103+
| ------------------------- | ------------------------------------------------------------------ | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
104+
| `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 <GlossaryTerm term="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. |
109111

110112
### Example
111113

0 commit comments

Comments
 (0)