Skip to content

Commit 9864149

Browse files
authored
Merge branch 'main' into richard/docs-review
2 parents cc4f894 + e82c14b commit 9864149

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+260
-74
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [4.66.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.65.0...v4.66.0) (2025-09-29)
7+
8+
### Bug Fixes
9+
10+
- autogen infra sdk and fix remaining links ([#2121](https://github.com/alchemyplatform/aa-sdk/issues/2121)) ([701007b](https://github.com/alchemyplatform/aa-sdk/commit/701007bb095614ab909187389bed04c5e1d895f8))
11+
- include policy id from client on request quote action ([#2103](https://github.com/alchemyplatform/aa-sdk/issues/2103)) ([a7c749d](https://github.com/alchemyplatform/aa-sdk/commit/a7c749d7271fee3124460fb2ca64df426405bfc8))
12+
13+
### Features
14+
15+
- add info about rawcalls ([#2110](https://github.com/alchemyplatform/aa-sdk/issues/2110)) ([81ce22f](https://github.com/alchemyplatform/aa-sdk/commit/81ce22fd6568400b99f3b616fe73f24cad1b7c7c))
16+
- add recipe for programmatically creating a wallet ([#2088](https://github.com/alchemyplatform/aa-sdk/issues/2088)) ([a5ad4cd](https://github.com/alchemyplatform/aa-sdk/commit/a5ad4cdeca36b93280306d325320e96866a51594))
17+
- add signAuthorization method to WalletClientSigner ([#2128](https://github.com/alchemyplatform/aa-sdk/issues/2128)) ([fb8ea39](https://github.com/alchemyplatform/aa-sdk/commit/fb8ea3995b8a9fa04d9e4ecd4f154e6b68258633))
18+
- add SMS early access call out to demo app ([#2119](https://github.com/alchemyplatform/aa-sdk/issues/2119)) ([155206d](https://github.com/alchemyplatform/aa-sdk/commit/155206da63a48e1eec6372196bbc01319862aaba))
19+
- replace doc-gen with typedoc ([#2092](https://github.com/alchemyplatform/aa-sdk/issues/2092)) ([6fd935d](https://github.com/alchemyplatform/aa-sdk/commit/6fd935db9677ed34eefabdeae741a881737c6d08))
20+
621
# [4.65.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.64.0...v4.65.0) (2025-09-23)
722

823
### Bug Fixes

aa-sdk/core/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [4.66.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.65.0...v4.66.0) (2025-09-29)
7+
8+
### Features
9+
10+
- add signAuthorization method to WalletClientSigner ([#2128](https://github.com/alchemyplatform/aa-sdk/issues/2128)) ([fb8ea39](https://github.com/alchemyplatform/aa-sdk/commit/fb8ea3995b8a9fa04d9e4ecd4f154e6b68258633))
11+
- replace doc-gen with typedoc ([#2092](https://github.com/alchemyplatform/aa-sdk/issues/2092)) ([6fd935d](https://github.com/alchemyplatform/aa-sdk/commit/6fd935db9677ed34eefabdeae741a881737c6d08))
12+
613
# [4.65.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.64.0...v4.65.0) (2025-09-23)
714

815
**Note:** Version bump only for package @aa-sdk/core

aa-sdk/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@aa-sdk/core",
33
"license": "MIT",
4-
"version": "4.65.0",
4+
"version": "4.66.0",
55
"description": "viem based SDK that enables interactions with ERC-4337 Smart Accounts. ABIs are based off the definitions generated in @account-abstraction/contracts",
66
"author": "Alchemy",
77
"type": "module",

aa-sdk/core/src/signer/__tests__/wallet-client.test.ts

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,43 @@ import { mnemonicToAccount } from "viem/accounts";
33
import { WalletClientSigner } from "../wallet-client.js";
44

55
describe("Wallet Client Signer Tests", () => {
6-
it("should successfully sign", async () => {
7-
const dummyMnemonic =
8-
"test test test test test test test test test test test test";
9-
const wallet = mnemonicToAccount(dummyMnemonic);
10-
const walletClient = createWalletClient({
11-
account: wallet,
12-
// just a nonsense URL
13-
transport: http(`https://rpc.testnet.viem.io`),
14-
});
6+
const dummyMnemonic =
7+
"test test test test test test test test test test test test";
8+
const wallet = mnemonicToAccount(dummyMnemonic);
9+
const walletClient = createWalletClient({
10+
account: wallet,
11+
// just a nonsense URL
12+
transport: http(`https://rpc.testnet.viem.io`),
13+
});
1514

16-
const smartAccountSigner: WalletClientSigner = new WalletClientSigner(
17-
walletClient,
18-
"test",
19-
);
15+
const smartAccountSigner: WalletClientSigner = new WalletClientSigner(
16+
walletClient,
17+
"test",
18+
);
2019

20+
it("should successfully sign a message", async () => {
2121
const signature = await smartAccountSigner.signMessage("hello world");
2222
expect(signature).toMatchInlineSnapshot(
2323
'"0xcaf98cb42536352270a5a6e7d5aa2c186cd53701b9059d8596a1a13feb8d33d4194914598a6f60be302947b79d3c2635378adef4e72139e94030a3b8a7cd8d891c"',
2424
);
2525
});
26+
27+
it("should successfully sign a 7702 authorization", async () => {
28+
const signedAuthorization = await smartAccountSigner.signAuthorization({
29+
address: "0x69007702764179f14F51cdce752f4f775d74E139",
30+
chainId: 1,
31+
nonce: 1,
32+
});
33+
expect(signedAuthorization).toMatchInlineSnapshot(`
34+
{
35+
"address": "0x69007702764179f14F51cdce752f4f775d74E139",
36+
"chainId": 1,
37+
"nonce": 1,
38+
"r": "0xb5b39b3d7119d68c9936e476346f50061fed17c575ca395755ec0f41b45896bb",
39+
"s": "0x12e44057bd6c761da15b5ca5d860d11962ea34d1e1b9ce6eac7fbe2e8699469c",
40+
"v": 27n,
41+
"yParity": 0,
42+
}
43+
`);
44+
});
2645
});

aa-sdk/core/src/signer/wallet-client.ts

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ import {
55
type TypedData,
66
type TypedDataDefinition,
77
type WalletClient,
8+
type SignedAuthorization,
89
} from "viem";
910
import type { Account } from "viem/accounts";
1011
import type { SignTypedDataParameters } from "viem/actions";
1112
import { InvalidSignerTypeError } from "../errors/signer.js";
12-
import type { SmartAccountSigner } from "./types";
13+
import type { SmartAccountSigner, AuthorizationRequest } from "./types";
1314

1415
/**
15-
* Represents a wallet client signer for smart accounts, providing methods to get the address, sign messages, and sign typed data.
16+
* Represents a wallet client signer for smart accounts, providing methods to get the address, sign messages, sign typed data, and sign 7702 authorizations.
1617
*/
1718
export class WalletClientSigner implements SmartAccountSigner<WalletClient> {
1819
signerType: string;
@@ -142,4 +143,37 @@ export class WalletClientSigner implements SmartAccountSigner<WalletClient> {
142143

143144
return this.inner.signTypedData<TTypedData, string>(params);
144145
};
146+
147+
/**
148+
* Signs an EIP-7702 Authorization
149+
*
150+
* @example
151+
* ```ts twoslash
152+
* import { WalletClientSigner } from "@aa-sdk/core";
153+
* import { createWalletClient, custom } from 'viem';
154+
* import { mainnet } from 'viem/chains';
155+
*
156+
* const client = createWalletClient({
157+
* chain: mainnet,
158+
* transport: custom(window.ethereum!)
159+
* });
160+
*
161+
* const signer = new WalletClientSigner(client, 'wallet');
162+
*
163+
* const authorization = await signer.signAuthorization({
164+
* contractAddress: "0x1234123412341234123412341234123412341234",
165+
* chainId: 1,
166+
* nonce: 0,
167+
* });
168+
* ```
169+
*
170+
* @param {AuthorizationRequest<number>} unsignedAuthorization the authorization to be signed
171+
* @returns {Promise<SignedAuthorization<number>>} a promise that resolves to the signed authorization
172+
*/
173+
signAuthorization = async (
174+
unsignedAuthorization: AuthorizationRequest<number>,
175+
): Promise<SignedAuthorization<number>> => {
176+
const account = this.inner.account ?? (await this.getAddress());
177+
return this.inner.signAuthorization({ ...unsignedAuthorization, account });
178+
};
145179
}

aa-sdk/core/src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// This file is autogenerated by inject-version.ts. Any changes will be
22
// overwritten on commit!
3-
export const VERSION = "4.65.0";
3+
export const VERSION = "4.66.0";

aa-sdk/ethers/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [4.66.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.65.0...v4.66.0) (2025-09-29)
7+
8+
### Features
9+
10+
- replace doc-gen with typedoc ([#2092](https://github.com/alchemyplatform/aa-sdk/issues/2092)) ([6fd935d](https://github.com/alchemyplatform/aa-sdk/commit/6fd935db9677ed34eefabdeae741a881737c6d08))
11+
612
# [4.65.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.64.0...v4.65.0) (2025-09-23)
713

814
**Note:** Version bump only for package @aa-sdk/ethers

aa-sdk/ethers/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@aa-sdk/ethers",
33
"license": "MIT",
4-
"version": "4.65.0",
4+
"version": "4.66.0",
55
"description": "Ethers.js wrapper for @aa-sdk/core",
66
"author": "Alchemy",
77
"type": "module",
@@ -41,13 +41,13 @@
4141
"test:run": "vitest run"
4242
},
4343
"devDependencies": {
44-
"@account-kit/smart-contracts": "^4.65.0",
44+
"@account-kit/smart-contracts": "^4.66.0",
4545
"alchemy-sdk": "^3.0.0",
4646
"dotenv": "^16.0.3",
4747
"typescript-template": "*"
4848
},
4949
"dependencies": {
50-
"@aa-sdk/core": "^4.65.0",
50+
"@aa-sdk/core": "^4.66.0",
5151
"@ethersproject/abi": "^5.7.0",
5252
"@ethersproject/abstract-signer": "^5.7.0",
5353
"@ethersproject/bytes": "^5.7.0",

account-kit/core/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [4.66.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.65.0...v4.66.0) (2025-09-29)
7+
8+
### Features
9+
10+
- replace doc-gen with typedoc ([#2092](https://github.com/alchemyplatform/aa-sdk/issues/2092)) ([6fd935d](https://github.com/alchemyplatform/aa-sdk/commit/6fd935db9677ed34eefabdeae741a881737c6d08))
11+
612
# [4.65.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.64.0...v4.65.0) (2025-09-23)
713

814
**Note:** Version bump only for package @account-kit/core

account-kit/core/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@account-kit/core",
3-
"version": "4.65.0",
3+
"version": "4.66.0",
44
"description": "Core library for account kit that provides state management and framework indepednent abstractions across infra, Alchemy Signer, and Smart Contracts",
55
"author": "Alchemy",
66
"license": "MIT",
@@ -48,12 +48,12 @@
4848
"typescript-template": "*"
4949
},
5050
"dependencies": {
51-
"@account-kit/infra": "^4.65.0",
52-
"@account-kit/logging": "^4.65.0",
53-
"@account-kit/react-native-signer": "^4.65.0",
54-
"@account-kit/signer": "^4.65.0",
55-
"@account-kit/smart-contracts": "^4.65.0",
56-
"@account-kit/wallet-client": "^4.65.0",
51+
"@account-kit/infra": "^4.66.0",
52+
"@account-kit/logging": "^4.66.0",
53+
"@account-kit/react-native-signer": "^4.66.0",
54+
"@account-kit/signer": "^4.66.0",
55+
"@account-kit/smart-contracts": "^4.66.0",
56+
"@account-kit/wallet-client": "^4.66.0",
5757
"@solana/web3.js": "^1.98.0",
5858
"js-cookie": "^3.0.5",
5959
"zod": "^3.22.4",

0 commit comments

Comments
 (0)