Skip to content

Commit 328df99

Browse files
Add gator links (#2121)
1 parent a5897d7 commit 328df99

File tree

9 files changed

+18
-14
lines changed

9 files changed

+18
-14
lines changed

delegation-toolkit/concepts/environment.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export delegatorSmartAccount;
6969
See the changelog of the toolkit version you are using (in the left sidebar) for supported chains.
7070
:::
7171

72-
Alternatively, you can use the `getDelegatorEnvironment` function to resolve the environment.
72+
Alternatively, you can use the [`getDelegatorEnvironment`](../reference/api/delegation.md#getdelegatorenvironment) function to resolve the environment.
7373
This function is especially useful if your delegator is not a smart account when
7474
[creating a redelegation](../how-to/create-delegation/index.md#create-a-redelegation).
7575

@@ -85,7 +85,7 @@ const environment: DeleGatorEnvironment = getDelegatorEnvironment(59141);
8585

8686
## Deploy custom delegator environment
8787

88-
You can deploy the contracts using any method, but the toolkit provides a convenient `deployDelegatorEnvironment` function. This function simplifies deploying the Delegation Framework contracts to your desired EVM chain.
88+
You can deploy the contracts using any method, but the toolkit provides a convenient [`deployDelegatorEnvironment`](../reference/api/delegation.md#deploydelegatorenvironment) function. This function simplifies deploying the Delegation Framework contracts to your desired EVM chain.
8989

9090
This function requires a Viem [Public Client](https://viem.sh/docs/clients/public.html), [Wallet Client](https://viem.sh/docs/clients/wallet.html), and [Chain](https://viem.sh/docs/glossary/types#chain)
9191
to deploy the contracts and resolve the `DeleGatorEnvironment`.
@@ -157,7 +157,7 @@ Once the contracts are deployed, you can use them to override the delegator envi
157157

158158
## Override delegator environment
159159

160-
To override the delegator environment, the toolkit provides a `overrideDeployedEnvironment` function to resolve
160+
To override the delegator environment, the toolkit provides an [`overrideDeployedEnvironment`](../reference/api/delegation.md#overridedeployedenvironment) function to resolve
161161
`DeleGatorEnvironment` with specified contracts for the given chain and contract version.
162162

163163
```typescript

delegation-toolkit/experimental/erc-7710-redeem-delegations.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ This data encodes the authority that lets the delegate redeem the permission.
6666
### Security considerations for `accountMeta`
6767

6868
When a user grants a permission, they can provide `accountMeta` which is an array of `factory` and `factoryData` values.
69-
These calls must be executed before redeeming the permission (this is handled for you in `sendUserOperationWithDelegation`).
69+
These calls must be executed before redeeming the permission (this is handled for you in [`sendUserOperationWithDelegation`](../reference/api/experimental-actions/bundler-client.md#senduseroperationwithdelegation)).
7070

7171
Because each `accountMeta` is an arbitrary call specified by the granter, it is important that these are executed carefully.
7272
We recommend taking the following precautions:
@@ -87,7 +87,7 @@ Redeem a delegation with a [smart account](#redeem-with-a-smart-account) or an [
8787
To redeem a delegation with a smart account, create a [`MetaMaskSmartAccount`](../how-to/create-smart-account/index.md#create-a-metamasksmartaccount)
8888
and a [Viem Bundler Client](https://viem.sh/account-abstraction/clients/bundler).
8989

90-
After setting up your Bundler Client, you can extend its functionality with `erc7710BundlerActions` actions to support ERC-7710. Once extended, use `sendUserOperationWithDelegation` to redeem the permission.
90+
After setting up your Bundler Client, you can extend its functionality with `erc7710BundlerActions` actions to support ERC-7710. Once extended, use [`sendUserOperationWithDelegation`](../reference/api/experimental-actions/bundler-client.md#senduseroperationwithdelegation) to redeem the permission.
9191

9292
<Tabs>
9393
<TabItem value="example.ts">
@@ -169,7 +169,7 @@ export const bundlerClient = createBundlerClient({
169169

170170
To redeem a delegation with an EOA, create a [Viem Wallet Client](https://viem.sh/docs/clients/wallet).
171171

172-
After creating your Wallet Client, you can extend its functionality with `erc7710WalletActions` actions to support ERC-7710. Once extended, use `sendTransactionWithDelegation` to redeem the permission.
172+
After creating your Wallet Client, you can extend its functionality with `erc7710WalletActions` actions to support ERC-7710. Once extended, use [`sendTransactionWithDelegation`](../reference/api/experimental-actions/wallet-client.md#sendtransactionwithdelegation) to redeem the permission.
173173

174174
<Tabs>
175175
<TabItem value="example.ts">

delegation-toolkit/experimental/erc-7715-request-permissions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ You should always verify the granted permissions and adjust your dapp's behavior
166166
## Security considerations for `accountMeta`
167167

168168
When a user grants a permission, they can provide [`accountMeta`](erc-7710-redeem-delegations.md#extract-relevant-data) which is an array of `factory` and `factoryData` values.
169-
These calls must be executed before redeeming the permission (this is handled for you in `sendUserOperationWithDelegation`).
169+
These calls must be executed before redeeming the permission (this is handled for you in [`sendUserOperationWithDelegation`](../reference/api/experimental-actions/bundler-client.md#senduseroperationwithdelegation)).
170170

171171
Because each `accountMeta` is an arbitrary call specified by the granter, it is important that these are executed carefully.
172172
We recommend taking the following precautions:

delegation-toolkit/get-started/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ This page provides instructions to install and set up the MetaMask Delegation To
2424

2525
### 1. Install the toolkit
2626

27-
Install the MetaMask Delegation Toolkit dependencies:
27+
Install the [MetaMask Delegation Toolkit](https://github.com/MetaMask/delegation-toolkit) dependencies:
2828

2929
```bash npm2yarn
3030
npm install @metamask/delegation-toolkit

delegation-toolkit/get-started/quickstart.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ const delegation = createDelegation({
113113

114114
### 6. Sign the delegation
115115

116-
[Sign the delegation](../how-to/create-delegation/index.md#sign-a-delegation) using the `signDelegation` method from `MetaMaskSmartAccount`.
117-
Alternatively, you can use the Delegation Toolkit's `signDelegation` utility.
116+
[Sign the delegation](../how-to/create-delegation/index.md#sign-a-delegation) using the [`signDelegation`](../reference/api/smart-account.md#signdelegation) method from `MetaMaskSmartAccount`.
117+
Alternatively, you can use the Delegation Toolkit's [`signDelegation`](../reference/api/delegation.md#signdelegation) utility.
118118
The signed delegation will be used later to perform actions on behalf of the delegator.
119119

120120
```typescript
@@ -134,7 +134,7 @@ The delegate account can now [redeem the delegation](../how-to/redeem-delegation
134134
The redeem transaction is sent to the `DelegationManager` contract, which validates the delegation and
135135
executes actions on the delegator's behalf.
136136

137-
To prepare the calldata for the redeem transaction, use the `redeemDelegation` utility function from the Delegation Toolkit.
137+
To prepare the calldata for the redeem transaction, use the [`redeemDelegation`](../reference/api/delegation.md#redeemdelegation) utility function from the Delegation Toolkit.
138138

139139
```typescript
140140
import {

delegation-toolkit/how-to/create-delegation/restrict-delegation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Use the `CaveatBuilder` to easily ensure that your delegations grant only the ne
2828

2929
## Create the caveat builder
3030

31-
To create the caveat builder, call the `createCaveatBuilder()` function, passing an instance of `DeleGatorEnvironment`.
31+
To create the caveat builder, call the [`createCaveatBuilder`](../../reference/api/delegation.md#createcaveatbuilder) function, passing an instance of `DeleGatorEnvironment`.
3232
The environment can be accessed from the `MetaMaskSmartAccount`, as in this example:
3333

3434
```typescript

delegation-toolkit/how-to/generate-multisig-signature.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The MetaMask Delegation Toolkit supports [Multisig smart accounts](../concepts/s
1212
allowing you to add multiple externally owned account (EOA)
1313
signers with a configurable execution threshold. When the threshold
1414
is greater than 1, you can collect signatures from the required signers
15-
and use the `aggregateSignature` function to combine them
15+
and use the [`aggregateSignature`](../reference/api/smart-account.md#aggregatesignature) function to combine them
1616
into a single aggregated signature.
1717

1818
## Prerequisites

delegation-toolkit/how-to/redeem-delegation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ A delegate can redeem a delegation by submitting either a user operation or a re
1313
depending on whether the delegate is a smart account or externally owned account (EOA).
1414

1515
The redeem transaction is sent to the `DelegationManager` contract, which validates the delegation and executes actions on the delegator's behalf.
16-
To prepare the calldata for the redeem transaction, use the `redeemDelegation` utility function.
16+
To prepare the calldata for the redeem transaction, use the [`redeemDelegation`](../reference/api/delegation.md#redeemdelegation) utility function.
1717
The function supports batch redemption, allowing multiple delegations to be processed within a single transaction.
1818

1919
## Prerequisites

docusaurus.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,10 @@ const config = {
336336
label: 'MetaMask SDK GitHub',
337337
href: 'https://github.com/MetaMask/metamask-sdk/',
338338
},
339+
{
340+
label: 'Delegation Toolkit GitHub',
341+
href: 'https://github.com/MetaMask/delegation-toolkit',
342+
},
339343
{
340344
label: 'MetaMask mobile GitHub',
341345
href: 'https://github.com/MetaMask/metamask-mobile',

0 commit comments

Comments
 (0)