Skip to content

Commit d1b1cda

Browse files
docs: update v5 SDK reference docs for 5.0.0-beta.26 (#2482)
Co-authored-by: gha-aa-sdk[bot] <269827238+gha-aa-sdk[bot]@users.noreply.github.com>
1 parent 791f5c3 commit d1b1cda

7 files changed

Lines changed: 331 additions & 0 deletions

File tree

docs/docs.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,8 @@ navigation:
437437
path: wallets/pages/reference/wallet-apis/src/exports/functions/smartWalletActions.mdx
438438
- page: undelegateAccount
439439
path: wallets/pages/reference/wallet-apis/src/exports/functions/undelegateAccount.mdx
440+
- page: requestQuoteV0 (experimental)
441+
path: wallets/pages/reference/wallet-apis/src/exports/experimental/functions/requestQuoteV0.mdx
440442
- section: Type Aliases
441443
contents:
442444
- page: AlchemyWalletTransport
@@ -507,6 +509,16 @@ navigation:
507509
path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/UndelegateAccountParams.mdx
508510
- page: UndelegateAccountResult
509511
path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/UndelegateAccountResult.mdx
512+
- page: RequestQuoteV0Params (experimental)
513+
path: wallets/pages/reference/wallet-apis/src/exports/experimental/type-aliases/RequestQuoteV0Params.mdx
514+
- page: RequestQuoteV0Result (experimental)
515+
path: wallets/pages/reference/wallet-apis/src/exports/experimental/type-aliases/RequestQuoteV0Result.mdx
516+
- page: SwapActions (experimental)
517+
path: wallets/pages/reference/wallet-apis/src/exports/experimental/type-aliases/SwapActions.mdx
518+
- section: Variables
519+
contents:
520+
- page: swapActions (experimental)
521+
path: wallets/pages/reference/wallet-apis/src/exports/experimental/variables/swapActions.mdx
510522
- section: 4.x.x
511523
collapsed: true
512524
contents:
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
title: "@alchemy/wallet-apis/src/exports/experimental"
3+
description: Overview of wallet-apis/experimental
4+
slug: wallets/reference/wallet-apis/experimental
5+
layout: reference
6+
---
7+
8+
{/* This file is auto-generated by TypeDoc. Do not edit manually. */}
9+
10+
<Warning>
11+
Experimental: This API is experimental and may change in a future release.
12+
</Warning>
13+
14+
**Beta** — This package replaces `@account-kit/wallet-client`. See the [migration guide](https://www.alchemy.com/docs/wallets/resources/migration-v5).
15+
16+
High-level viem-style client for Alchemy's Smart Wallet APIs. Provides EIP-7702 smart wallet support with signing, transaction preparation, and call sending.
17+
18+
## Installation
19+
20+
```bash
21+
npm install @alchemy/wallet-apis viem
22+
```
23+
24+
## Key Exports
25+
26+
- **`createSmartWalletClient`** - Factory to create a `SmartWalletClient` (viem client extended with smart wallet actions)
27+
- **`alchemyWalletTransport`** - Alchemy transport pre-configured for the Wallet API gateway
28+
- **`smartWalletActions`** - Client decorator attaching all wallet API actions
29+
30+
### Actions
31+
32+
- **Signing** - `signMessage`, `signTypedData`, `prepareSign`, `signPreparedCalls`, `signSignatureRequest`
33+
- **Transactions** - `prepareCalls`, `sendCalls`, `sendPreparedCalls`
34+
- **Account management** - `getCapabilities`, `listAccounts`, `requestAccount`
35+
- **Permissions** - `grantPermissions`
36+
37+
### Experimental (`@alchemy/wallet-apis/experimental`)
38+
39+
- `requestQuoteV0`, `swapActions` - Pre-release swap functionality
40+
41+
## License
42+
43+
MIT
44+
45+
## Type Aliases
46+
47+
| Type Alias | Description |
48+
| :---------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------- |
49+
| [RequestQuoteV0Params](/wallets/reference/wallet-apis/experimental/type-aliases/RequestQuoteV0Params) | Parameters accepted by the experimental `requestQuoteV0` action. |
50+
| [RequestQuoteV0Result](/wallets/reference/wallet-apis/experimental/type-aliases/RequestQuoteV0Result) | Result returned by the experimental `requestQuoteV0` action. |
51+
| [SwapActions](/wallets/reference/wallet-apis/experimental/type-aliases/SwapActions) | Experimental swap actions for wallet API clients. |
52+
53+
## Variables
54+
55+
| Variable | Description |
56+
| :------------------------------------------------------------------------------- | :----------------------------------------------------------------------------- |
57+
| [swapActions](/wallets/reference/wallet-apis/experimental/variables/swapActions) | This is a decorator that is used to add experimental swap actions to a client. |
58+
59+
## Functions
60+
61+
| Function | Description |
62+
| :------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------- |
63+
| [requestQuoteV0](/wallets/reference/wallet-apis/experimental/functions/requestQuoteV0) | Requests a quote for a token swap, returning either prepared calls for smart wallets or raw calls for EOA wallets depending on the returnRawCalls parameter. |
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
---
2+
title: requestQuoteV0 (experimental)
3+
description: Overview of the requestQuoteV0 function
4+
slug: wallets/reference/wallet-apis/experimental/functions/requestQuoteV0
5+
layout: reference
6+
---
7+
8+
{/* This file is auto-generated by TypeDoc. Do not edit manually. */}
9+
10+
<Warning>
11+
Experimental: This API is experimental and may change in a future release.
12+
</Warning>
13+
14+
```ts
15+
function requestQuoteV0(client, params): Promise<RequestQuoteV0Result>;
16+
```
17+
18+
Defined in: [packages/wallet-apis/src/experimental/actions/requestQuoteV0.ts:104](https://github.com/alchemyplatform/aa-sdk/blob/v5.x.x/packages/wallet-apis/src/experimental/actions/requestQuoteV0.ts#L104)
19+
20+
Requests a quote for a token swap, returning either prepared calls for smart wallets
21+
or raw calls for EOA wallets depending on the returnRawCalls parameter.
22+
23+
## Example
24+
25+
```ts twoslash
26+
// Request a quote for smart wallet (prepared calls)
27+
const quote = await client.requestQuoteV0({
28+
fromToken: "0xA0b86a33E6441e1d6a8E8C7a8E8E8E8E8E8E8E8E",
29+
toToken: "0xB0b86a33E6441e1d6a8E8C7a8E8E8E8E8E8E8E8E",
30+
fromAmount: 1000000000000000000n, // 1 ETH
31+
chainId: 42161, // Arbitrum
32+
capabilities: {
33+
paymaster: { policyId: "your-policy-id" },
34+
},
35+
});
36+
37+
// Request a quote for EOA wallet (raw calls)
38+
const rawQuote = await client.requestQuoteV0({
39+
fromToken: "0xA0b86a33E6441e1d6a8E8C7a8E8E8E8E8E8E8E8E",
40+
toToken: "0xB0b86a33E6441e1d6a8E8C7a8E8E8E8E8E8E8E8E",
41+
fromAmount: 1000000000000000000n,
42+
chainId: 42161,
43+
returnRawCalls: true,
44+
});
45+
```
46+
47+
## Parameters
48+
49+
<table>
50+
<thead>
51+
<tr>
52+
<th align="left">Parameter</th>
53+
<th align="left">Type</th>
54+
<th align="left">Description</th>
55+
</tr>
56+
</thead>
57+
58+
<tbody>
59+
<tr>
60+
<td>
61+
`client`
62+
</td>
63+
64+
<td>
65+
`InnerWalletApiClient`
66+
</td>
67+
68+
<td>
69+
The wallet API client to use for the request
70+
</td>
71+
</tr>
72+
73+
<tr>
74+
<td>
75+
`params`
76+
</td>
77+
78+
<td>
79+
[`RequestQuoteV0Params`](../type-aliases/RequestQuoteV0Params)
80+
</td>
81+
82+
<td>
83+
Parameters for requesting a swap quote
84+
</td>
85+
</tr>
86+
87+
</tbody>
88+
</table>
89+
90+
## Returns
91+
92+
`Promise`\<[`RequestQuoteV0Result`](../type-aliases/RequestQuoteV0Result)>
93+
94+
A Promise that resolves to either prepared calls or raw calls depending on returnRawCalls
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: RequestQuoteV0Params (experimental)
3+
description: Parameters accepted by the experimental `requestQuoteV0` action.
4+
slug: wallets/reference/wallet-apis/experimental/type-aliases/RequestQuoteV0Params
5+
layout: reference
6+
---
7+
8+
{/* This file is auto-generated by TypeDoc. Do not edit manually. */}
9+
10+
<Warning>
11+
Experimental: This API is experimental and may change in a future release.
12+
</Warning>
13+
14+
```ts
15+
type RequestQuoteV0Params = Prettify<
16+
WithCapabilities<
17+
DistributiveOmit<BaseRequestQuoteV0Params, "from" | "chainId">
18+
>
19+
>;
20+
```
21+
22+
Defined in: [packages/wallet-apis/src/experimental/actions/requestQuoteV0.ts:27](https://github.com/alchemyplatform/aa-sdk/blob/v5.x.x/packages/wallet-apis/src/experimental/actions/requestQuoteV0.ts#L27)
23+
24+
Parameters accepted by the experimental `requestQuoteV0` action.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: RequestQuoteV0Result (experimental)
3+
description: Result returned by the experimental `requestQuoteV0` action.
4+
slug: wallets/reference/wallet-apis/experimental/type-aliases/RequestQuoteV0Result
5+
layout: reference
6+
---
7+
8+
{/* This file is auto-generated by TypeDoc. Do not edit manually. */}
9+
10+
<Warning>
11+
Experimental: This API is experimental and may change in a future release.
12+
</Warning>
13+
14+
```ts
15+
type RequestQuoteV0Result =
16+
| Exclude<
17+
RequestQuoteV0Response,
18+
{
19+
type: "paymaster-permit";
20+
}
21+
>
22+
| Omit<
23+
Extract<
24+
RequestQuoteV0Response,
25+
{
26+
type: "paymaster-permit";
27+
}
28+
>,
29+
"modifiedRequest"
30+
>;
31+
```
32+
33+
Defined in: [packages/wallet-apis/src/experimental/actions/requestQuoteV0.ts:53](https://github.com/alchemyplatform/aa-sdk/blob/v5.x.x/packages/wallet-apis/src/experimental/actions/requestQuoteV0.ts#L53)
34+
35+
Result returned by the experimental `requestQuoteV0` action.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: SwapActions (experimental)
3+
description: Experimental swap actions for wallet API clients.
4+
slug: wallets/reference/wallet-apis/experimental/type-aliases/SwapActions
5+
layout: reference
6+
---
7+
8+
{/* This file is auto-generated by TypeDoc. Do not edit manually. */}
9+
10+
<Warning>
11+
Experimental: This API is experimental and may change in a future release.
12+
</Warning>
13+
14+
```ts
15+
type SwapActions = {
16+
requestQuoteV0: (
17+
params: RequestQuoteV0Params,
18+
) => Promise<RequestQuoteV0Result>;
19+
};
20+
```
21+
22+
Defined in: [packages/wallet-apis/src/experimental/swapActionsDecorator.ts:11](https://github.com/alchemyplatform/aa-sdk/blob/v5.x.x/packages/wallet-apis/src/experimental/swapActionsDecorator.ts#L11)
23+
24+
Experimental swap actions for wallet API clients.
25+
26+
## Properties
27+
28+
<table>
29+
<thead>
30+
<tr>
31+
<th align="left">Property</th>
32+
<th align="left">Type</th>
33+
</tr>
34+
</thead>
35+
36+
<tbody>
37+
<tr>
38+
<td>
39+
<a id="requestquotev0" /> `requestQuoteV0`
40+
</td>
41+
42+
<td>
43+
(`params`) => `Promise`\<[`RequestQuoteV0Result`](RequestQuoteV0Result)>
44+
</td>
45+
</tr>
46+
47+
</tbody>
48+
</table>
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: swapActions (experimental)
3+
description: This is a decorator that is used to add experimental swap actions to a client.
4+
slug: wallets/reference/wallet-apis/experimental/variables/swapActions
5+
layout: reference
6+
---
7+
8+
{/* This file is auto-generated by TypeDoc. Do not edit manually. */}
9+
10+
<Warning>
11+
Experimental: This API is experimental and may change in a future release.
12+
</Warning>
13+
14+
```ts
15+
const swapActions: (client) => SwapActions;
16+
```
17+
18+
Defined in: [packages/wallet-apis/src/experimental/swapActionsDecorator.ts:23](https://github.com/alchemyplatform/aa-sdk/blob/v5.x.x/packages/wallet-apis/src/experimental/swapActionsDecorator.ts#L23)
19+
20+
This is a decorator that is used to add experimental swap actions to a client.
21+
22+
## Parameters
23+
24+
<table>
25+
<thead>
26+
<tr>
27+
<th align="left">Parameter</th>
28+
<th align="left">Type</th>
29+
<th align="left">Description</th>
30+
</tr>
31+
</thead>
32+
33+
<tbody>
34+
<tr>
35+
<td>
36+
`client`
37+
</td>
38+
39+
<td>
40+
[`BaseWalletClient`](../../type-aliases/BaseWalletClient)
41+
</td>
42+
43+
<td>
44+
The wallet client to extend with swap functionality
45+
</td>
46+
</tr>
47+
48+
</tbody>
49+
</table>
50+
51+
## Returns
52+
53+
[`SwapActions`](../type-aliases/SwapActions)
54+
55+
An object containing swap-related actions

0 commit comments

Comments
 (0)