Skip to content

Commit 30bda2a

Browse files
docs: update v5 SDK reference docs for 5.0.0-beta.20 (#2440)
Co-authored-by: gha-aa-sdk[bot] <269827238+gha-aa-sdk[bot]@users.noreply.github.com>
1 parent 6f677c4 commit 30bda2a

9 files changed

Lines changed: 145 additions & 3 deletions

File tree

docs/docs.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1824,6 +1824,8 @@ navigation:
18241824
path: wallets/pages/reference/wallet-apis/src/exports/functions/signTypedData.mdx
18251825
- page: smartWalletActions
18261826
path: wallets/pages/reference/wallet-apis/src/exports/functions/smartWalletActions.mdx
1827+
- page: undelegateAccount
1828+
path: wallets/pages/reference/wallet-apis/src/exports/functions/undelegateAccount.mdx
18271829
- section: Type Aliases
18281830
contents:
18291831
- page: AlchemyWalletTransport
@@ -1890,3 +1892,7 @@ navigation:
18901892
path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/SmartWalletActions.mdx
18911893
- page: SmartWalletClient
18921894
path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/SmartWalletClient.mdx
1895+
- page: UndelegateAccountParams
1896+
path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/UndelegateAccountParams.mdx
1897+
- page: UndelegateAccountResult
1898+
path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/UndelegateAccountResult.mdx

docs/pages/reference/wallet-apis/src/exports/README.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ layout: reference
4545
| [SignTypedDataResult](/wallets/reference/wallet-apis/type-aliases/SignTypedDataResult) | - |
4646
| [SmartWalletActions](/wallets/reference/wallet-apis/type-aliases/SmartWalletActions) | - |
4747
| [SmartWalletClient](/wallets/reference/wallet-apis/type-aliases/SmartWalletClient) | - |
48+
| [UndelegateAccountParams](/wallets/reference/wallet-apis/type-aliases/UndelegateAccountParams) | - |
49+
| [UndelegateAccountResult](/wallets/reference/wallet-apis/type-aliases/UndelegateAccountResult) | - |
4850

4951
## Functions
5052

@@ -66,3 +68,4 @@ layout: reference
6668
| [signSignatureRequest](/wallets/reference/wallet-apis/functions/signSignatureRequest) | Signs a signature request using the provided signer. This method handles different types of signature requests including personal_sign, eth_signTypedData_v4, and authorization. |
6769
| [signTypedData](/wallets/reference/wallet-apis/functions/signTypedData) | Signs typed data (EIP-712) using the smart account. This method requests the account associated with the signer and uses it to sign the typed data. |
6870
| [smartWalletActions](/wallets/reference/wallet-apis/functions/smartWalletActions) | Decorator that adds smart wallet actions to a wallet API client. Provides both Alchemy-specific methods and standard viem wallet actions. |
71+
| [undelegateAccount](/wallets/reference/wallet-apis/functions/undelegateAccount) | Prepares, signs, and sends an EIP-7702 undelegation to remove delegation from an EOA. Gas is sponsored by Alchemy (requires Enterprise plan). |

docs/pages/reference/wallet-apis/src/exports/functions/signPreparedCalls.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ layout: reference
1111
function signPreparedCalls(client, params): Promise<SignPreparedCallsResult>;
1212
```
1313

14-
Defined in: [packages/wallet-apis/src/actions/signPreparedCalls.ts:65](https://github.com/alchemyplatform/aa-sdk/blob/v5.x.x/packages/wallet-apis/src/actions/signPreparedCalls.ts#L65)
14+
Defined in: [packages/wallet-apis/src/actions/signPreparedCalls.ts:66](https://github.com/alchemyplatform/aa-sdk/blob/v5.x.x/packages/wallet-apis/src/actions/signPreparedCalls.ts#L66)
1515

1616
Signs prepared calls using the provided signer.
1717

docs/pages/reference/wallet-apis/src/exports/functions/smartWalletActions.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ layout: reference
1111
function smartWalletActions(client): SmartWalletActions;
1212
```
1313

14-
Defined in: [packages/wallet-apis/src/decorators/smartWalletActions.ts:101](https://github.com/alchemyplatform/aa-sdk/blob/v5.x.x/packages/wallet-apis/src/decorators/smartWalletActions.ts#L101)
14+
Defined in: [packages/wallet-apis/src/decorators/smartWalletActions.ts:109](https://github.com/alchemyplatform/aa-sdk/blob/v5.x.x/packages/wallet-apis/src/decorators/smartWalletActions.ts#L109)
1515

1616
Decorator that adds smart wallet actions to a wallet API client.
1717
Provides both Alchemy-specific methods and standard viem wallet actions.
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
title: undelegateAccount
3+
description: Overview of the undelegateAccount function
4+
slug: wallets/reference/wallet-apis/functions/undelegateAccount
5+
layout: reference
6+
---
7+
8+
{/* This file is auto-generated by TypeDoc. Do not edit manually. */}
9+
10+
```ts
11+
function undelegateAccount(client, params?): Promise<UndelegateAccountResult>;
12+
```
13+
14+
Defined in: [packages/wallet-apis/src/actions/undelegateAccount.ts:58](https://github.com/alchemyplatform/aa-sdk/blob/v5.x.x/packages/wallet-apis/src/actions/undelegateAccount.ts#L58)
15+
16+
Prepares, signs, and sends an EIP-7702 undelegation to remove delegation from an EOA.
17+
Gas is sponsored by Alchemy (requires Enterprise plan).
18+
19+
A BSO (Bundler Sponsorship Override) policy ID must be provided either via
20+
`params.capabilities.paymaster.policyId` or pre-configured on the client via `policyIds`.
21+
22+
## Example
23+
24+
```ts
25+
const result = await client.undelegateAccount();
26+
const status = await client.waitForCallsStatus({ id: result.id });
27+
```
28+
29+
## Parameters
30+
31+
<table>
32+
<thead>
33+
<tr>
34+
<th align="left">Parameter</th>
35+
<th align="left">Type</th>
36+
<th align="left">Description</th>
37+
</tr>
38+
</thead>
39+
40+
<tbody>
41+
<tr>
42+
<td>
43+
`client`
44+
</td>
45+
46+
<td>
47+
`InnerWalletApiClient`
48+
</td>
49+
50+
<td>
51+
The wallet API client to use for the request
52+
</td>
53+
</tr>
54+
55+
<tr>
56+
<td>
57+
`params?`
58+
</td>
59+
60+
<td>
61+
[`UndelegateAccountParams`](../type-aliases/UndelegateAccountParams)
62+
</td>
63+
64+
<td>
65+
Parameters for undelegating the account
66+
</td>
67+
</tr>
68+
69+
</tbody>
70+
</table>
71+
72+
## Returns
73+
74+
`Promise`\<[`UndelegateAccountResult`](../type-aliases/UndelegateAccountResult)>
75+
76+
A Promise that resolves to the result containing the call ID.

docs/pages/reference/wallet-apis/src/exports/type-aliases/SignPreparedCallsResult.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ type SignPreparedCallsResult =
3535
type: "user-operation-v070";
3636
}
3737
>
38+
>
39+
| Signed<
40+
Extract<
41+
PrepareCallsResult,
42+
{
43+
type: "authorization";
44+
}
45+
>
3846
>;
3947
```
4048

docs/pages/reference/wallet-apis/src/exports/type-aliases/SmartWalletActions.mdx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,13 @@ type SmartWalletActions = {
3838
getCapabilities: (
3939
params?: GetCapabilitiesParams | undefined,
4040
) => Promise<GetCapabilitiesResult>;
41+
undelegateAccount: (
42+
params?: UndelegateAccountParams,
43+
) => Promise<UndelegateAccountResult>;
4144
};
4245
```
4346

44-
Defined in: [packages/wallet-apis/src/decorators/smartWalletActions.ts:62](https://github.com/alchemyplatform/aa-sdk/blob/v5.x.x/packages/wallet-apis/src/decorators/smartWalletActions.ts#L62)
47+
Defined in: [packages/wallet-apis/src/decorators/smartWalletActions.ts:67](https://github.com/alchemyplatform/aa-sdk/blob/v5.x.x/packages/wallet-apis/src/decorators/smartWalletActions.ts#L67)
4548

4649
## Properties
4750

@@ -174,6 +177,16 @@ Defined in: [packages/wallet-apis/src/decorators/smartWalletActions.ts:62](https
174177
</td>
175178
</tr>
176179

180+
<tr>
181+
<td>
182+
<a id="undelegateaccount" /> `undelegateAccount`
183+
</td>
184+
185+
<td>
186+
(`params?`) => `Promise`\<[`UndelegateAccountResult`](UndelegateAccountResult)>
187+
</td>
188+
</tr>
189+
177190
<tr>
178191
<td>
179192
<a id="waitforcallsstatus" /> `waitForCallsStatus`
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
title: UndelegateAccountParams
3+
description: Overview of UndelegateAccountParams
4+
slug: wallets/reference/wallet-apis/type-aliases/UndelegateAccountParams
5+
layout: reference
6+
---
7+
8+
{/* This file is auto-generated by TypeDoc. Do not edit manually. */}
9+
10+
```ts
11+
type UndelegateAccountParams = Prettify<{
12+
account?: AccountParam;
13+
capabilities?: {
14+
paymaster?: {
15+
policyId: string;
16+
};
17+
};
18+
chainId?: number;
19+
}>;
20+
```
21+
22+
Defined in: [packages/wallet-apis/src/actions/undelegateAccount.ts:24](https://github.com/alchemyplatform/aa-sdk/blob/v5.x.x/packages/wallet-apis/src/actions/undelegateAccount.ts#L24)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: UndelegateAccountResult
3+
description: Overview of UndelegateAccountResult
4+
slug: wallets/reference/wallet-apis/type-aliases/UndelegateAccountResult
5+
layout: reference
6+
---
7+
8+
{/* This file is auto-generated by TypeDoc. Do not edit manually. */}
9+
10+
```ts
11+
type UndelegateAccountResult = Prettify<SendPreparedCallsResponse>;
12+
```
13+
14+
Defined in: [packages/wallet-apis/src/actions/undelegateAccount.ts:34](https://github.com/alchemyplatform/aa-sdk/blob/v5.x.x/packages/wallet-apis/src/actions/undelegateAccount.ts#L34)

0 commit comments

Comments
 (0)