@account-kit/infra 4.0.0-alpha.1 → 4.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/chains.d.ts +19 -0
- package/dist/cjs/chains.js +166 -1
- package/dist/cjs/chains.js.map +1 -1
- package/dist/cjs/client/decorators/alchemyEnhancedApis.d.ts +128 -128
- package/dist/cjs/client/isAlchemySmartAccountClient.d.ts +128 -128
- package/dist/cjs/client/rpcClient.js.map +1 -1
- package/dist/cjs/defaults.js +7 -7
- package/dist/cjs/defaults.js.map +1 -1
- package/dist/cjs/gas-manager.js +16 -16
- package/dist/cjs/gas-manager.js.map +1 -1
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +20 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/schema.js +2 -9
- package/dist/cjs/schema.js.map +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/esm/chains.d.ts +19 -0
- package/dist/esm/chains.js +165 -0
- package/dist/esm/chains.js.map +1 -1
- package/dist/esm/client/decorators/alchemyEnhancedApis.d.ts +128 -128
- package/dist/esm/client/isAlchemySmartAccountClient.d.ts +128 -128
- package/dist/esm/client/rpcClient.js.map +1 -1
- package/dist/esm/defaults.js +2 -1
- package/dist/esm/defaults.js.map +1 -1
- package/dist/esm/gas-manager.js +1 -1
- package/dist/esm/gas-manager.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/schema.js +3 -10
- package/dist/esm/schema.js.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/types/chains.d.ts +19 -0
- package/dist/types/chains.d.ts.map +1 -1
- package/dist/types/client/decorators/alchemyEnhancedApis.d.ts +128 -128
- package/dist/types/client/isAlchemySmartAccountClient.d.ts +128 -128
- package/dist/types/client/rpcClient.d.ts +1 -1
- package/dist/types/defaults.d.ts +1 -1
- package/dist/types/defaults.d.ts.map +1 -1
- package/dist/types/gas-manager.d.ts +1 -1
- package/dist/types/gas-manager.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/schema.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +3 -3
- package/src/chains.ts +195 -0
- package/src/client/rpcClient.ts +1 -1
- package/src/defaults.ts +4 -4
- package/src/gas-manager.ts +3 -3
- package/src/index.ts +22 -1
- package/src/schema.ts +2 -10
- package/src/version.ts +1 -1
|
@@ -7,7 +7,7 @@ import type { ClientWithAlchemyMethods } from "./types.js";
|
|
|
7
7
|
* @example
|
|
8
8
|
* ```ts
|
|
9
9
|
* import { createAlchemyPublicRpcClient } from "@account-kit/infra";
|
|
10
|
-
* import { sepolia } from "@account-kit/infra
|
|
10
|
+
* import { sepolia } from "@account-kit/infra";
|
|
11
11
|
*
|
|
12
12
|
* const client = createAlchemyPublicRpcClient({
|
|
13
13
|
* chain: sepolia,
|
package/dist/types/defaults.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type { Chain } from "viem";
|
|
|
6
6
|
* @example
|
|
7
7
|
* ```ts
|
|
8
8
|
* import { getDefaultUserOperationFeeOptions } from "@account-kit/infra";
|
|
9
|
-
* import { arbitrum } from "@account-kit/infra
|
|
9
|
+
* import { arbitrum } from "@account-kit/infra";
|
|
10
10
|
*
|
|
11
11
|
* const feeOpts = getDefaultUserOperationFeeOptions(arbitrum);
|
|
12
12
|
* ```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAUlC;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iCAAiC,UACrC,KAAK,KACX,uBAoBF,CAAC"}
|
|
@@ -8,7 +8,7 @@ export declare const AlchemyPaymasterAddressV1 = "0xc03aac639bb21233e01393819703
|
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* ```ts
|
|
11
|
-
* import { sepolia, getAlchemyPaymasterAddress } from "@account-kit/infra
|
|
11
|
+
* import { sepolia, getAlchemyPaymasterAddress } from "@account-kit/infra";
|
|
12
12
|
*
|
|
13
13
|
* const paymasterAddress = getAlchemyPaymasterAddress(sepolia);
|
|
14
14
|
* ```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gas-manager.d.ts","sourceRoot":"","sources":["../../src/gas-manager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gas-manager.d.ts","sourceRoot":"","sources":["../../src/gas-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAmB3C,eAAO,MAAM,yBAAyB,+CACQ,CAAC;AAC/C,eAAO,MAAM,yBAAyB,+CACQ,CAAC;AAC/C,eAAO,MAAM,0BAA0B,+CACO,CAAC;AAC/C,eAAO,MAAM,yBAAyB,+CACQ,CAAC;AAE/C;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,0BAA0B,UAAW,KAAK,KAAG,OAwBzD,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export type * from "./actions/simulateUserOperationChanges.js";
|
|
|
2
2
|
export { simulateUserOperationChanges } from "./actions/simulateUserOperationChanges.js";
|
|
3
3
|
export type * from "./actions/types.js";
|
|
4
4
|
export type * from "./chains.js";
|
|
5
|
-
export { defineAlchemyChain } from "./chains.js";
|
|
5
|
+
export { arbitrum, arbitrumGoerli, arbitrumSepolia, base, baseGoerli, baseSepolia, defineAlchemyChain, fraxtal, fraxtalSepolia, goerli, mainnet, optimism, optimismGoerli, optimismSepolia, polygon, polygonAmoy, polygonMumbai, sepolia, zora, zoraSepolia, } from "./chains.js";
|
|
6
6
|
export type * from "./client/decorators/alchemyEnhancedApis.js";
|
|
7
7
|
export { alchemyEnhancedApiActions } from "./client/decorators/alchemyEnhancedApis.js";
|
|
8
8
|
export type * from "./client/decorators/smartAccount.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,2CAA2C,CAAC;AAC/D,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AACzF,mBAAmB,oBAAoB,CAAC;AACxC,mBAAmB,aAAa,CAAC;AACjC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,2CAA2C,CAAC;AAC/D,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AACzF,mBAAmB,oBAAoB,CAAC;AACxC,mBAAmB,aAAa,CAAC;AACjC,OAAO,EACL,QAAQ,EACR,cAAc,EACd,eAAe,EACf,IAAI,EACJ,UAAU,EACV,WAAW,EACX,kBAAkB,EAClB,OAAO,EACP,cAAc,EACd,MAAM,EACN,OAAO,EACP,QAAQ,EACR,cAAc,EACd,eAAe,EACf,OAAO,EACP,WAAW,EACX,aAAa,EACb,OAAO,EACP,IAAI,EACJ,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,mBAAmB,4CAA4C,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAC;AACvF,mBAAmB,qCAAqC,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,4CAA4C,IAAI,2CAA2C,EAAE,MAAM,gDAAgD,CAAC;AAC7J,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AACtF,mBAAmB,uBAAuB,CAAC;AAC3C,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AACrE,mBAAmB,gCAAgC,CAAC;AACpD,OAAO,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAC;AACjF,mBAAmB,mBAAmB,CAAC;AACvC,OAAO,EAAE,iCAAiC,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,mBAAmB,4BAA4B,CAAC;AAChD,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AACvF,mBAAmB,aAAa,CAAC;AACjC,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAC1D,YAAY,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/schema.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,eAAO,MAAM,kBAAkB,uCAIgG,CAAC;AAEhI,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAOvC,CAAC;AAEF,eAAO,MAAM,sBAAsB,2CAAwB,CAAC"}
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "4.0.0-alpha.
|
|
1
|
+
export declare const VERSION = "4.0.0-alpha.2";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@account-kit/infra",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.2",
|
|
4
4
|
"description": "adapters for @aa-sdk/core for interacting with alchemy services",
|
|
5
5
|
"author": "Alchemy",
|
|
6
6
|
"license": "MIT",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"vitest": "^0.31.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@aa-sdk/core": "^4.0.0-alpha.
|
|
48
|
+
"@aa-sdk/core": "^4.0.0-alpha.2",
|
|
49
49
|
"eventemitter3": "^5.0.1",
|
|
50
50
|
"viem": "2.8.6",
|
|
51
51
|
"zod": "^3.22.4"
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"url": "https://github.com/alchemyplatform/aa-sdk/issues"
|
|
69
69
|
},
|
|
70
70
|
"homepage": "https://github.com/alchemyplatform/aa-sdk#readme",
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "af70c1ea67be7f49339a1267ccadd8dc10aabde1",
|
|
72
72
|
"optionalDependencies": {
|
|
73
73
|
"alchemy-sdk": "^3.0.0"
|
|
74
74
|
}
|
package/src/chains.ts
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
import type { Chain } from "viem";
|
|
2
2
|
|
|
3
|
+
import { defineChain } from "viem";
|
|
4
|
+
import {
|
|
5
|
+
arbitrum as vab,
|
|
6
|
+
arbitrumGoerli as vabg,
|
|
7
|
+
arbitrumSepolia as vabs,
|
|
8
|
+
base as vbase,
|
|
9
|
+
baseGoerli as vbaseg,
|
|
10
|
+
baseSepolia as vbases,
|
|
11
|
+
fraxtal as vfrax,
|
|
12
|
+
goerli as vgo,
|
|
13
|
+
mainnet as vmain,
|
|
14
|
+
optimism as vop,
|
|
15
|
+
optimismGoerli as vopg,
|
|
16
|
+
optimismSepolia as vops,
|
|
17
|
+
polygon as vpg,
|
|
18
|
+
polygonAmoy as vpga,
|
|
19
|
+
polygonMumbai as vpgm,
|
|
20
|
+
sepolia as vsep,
|
|
21
|
+
zora as vzora,
|
|
22
|
+
zoraSepolia as vzoras,
|
|
23
|
+
} from "viem/chains";
|
|
24
|
+
|
|
3
25
|
export type AlchemyChainConfig = {
|
|
4
26
|
chain: Chain;
|
|
5
27
|
rpcBaseUrl: string;
|
|
@@ -41,3 +63,176 @@ export const defineAlchemyChain = ({
|
|
|
41
63
|
},
|
|
42
64
|
};
|
|
43
65
|
};
|
|
66
|
+
|
|
67
|
+
export const arbitrum: Chain = {
|
|
68
|
+
...vab,
|
|
69
|
+
rpcUrls: {
|
|
70
|
+
...vab.rpcUrls,
|
|
71
|
+
alchemy: {
|
|
72
|
+
http: ["https://arb-mainnet.g.alchemy.com/v2"],
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export const arbitrumGoerli: Chain = {
|
|
78
|
+
...vabg,
|
|
79
|
+
rpcUrls: {
|
|
80
|
+
...vabg.rpcUrls,
|
|
81
|
+
alchemy: {
|
|
82
|
+
http: ["https://arb-goerli.g.alchemy.com/v2"],
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export const arbitrumSepolia: Chain = {
|
|
88
|
+
...vabs,
|
|
89
|
+
rpcUrls: {
|
|
90
|
+
...vabs.rpcUrls,
|
|
91
|
+
alchemy: {
|
|
92
|
+
http: ["https://arb-sepolia.g.alchemy.com/v2"],
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
export const goerli: Chain = {
|
|
97
|
+
...vgo,
|
|
98
|
+
rpcUrls: {
|
|
99
|
+
...vgo.rpcUrls,
|
|
100
|
+
alchemy: {
|
|
101
|
+
http: ["https://eth-goerli.g.alchemy.com/v2"],
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
export const mainnet: Chain = {
|
|
106
|
+
...vmain,
|
|
107
|
+
rpcUrls: {
|
|
108
|
+
...vmain.rpcUrls,
|
|
109
|
+
alchemy: {
|
|
110
|
+
http: ["https://eth-mainnet.g.alchemy.com/v2"],
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
export const optimism: Chain = {
|
|
115
|
+
...vop,
|
|
116
|
+
rpcUrls: {
|
|
117
|
+
...vop.rpcUrls,
|
|
118
|
+
alchemy: {
|
|
119
|
+
http: ["https://opt-mainnet.g.alchemy.com/v2"],
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
};
|
|
123
|
+
export const optimismGoerli: Chain = {
|
|
124
|
+
...vopg,
|
|
125
|
+
rpcUrls: {
|
|
126
|
+
...vopg.rpcUrls,
|
|
127
|
+
alchemy: {
|
|
128
|
+
http: ["https://opt-goerli.g.alchemy.com/v2"],
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
export const optimismSepolia: Chain = {
|
|
133
|
+
...vops,
|
|
134
|
+
rpcUrls: {
|
|
135
|
+
...vops.rpcUrls,
|
|
136
|
+
alchemy: {
|
|
137
|
+
http: ["https://opt-sepolia.g.alchemy.com/v2"],
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
};
|
|
141
|
+
export const sepolia: Chain = {
|
|
142
|
+
...vsep,
|
|
143
|
+
rpcUrls: {
|
|
144
|
+
...vsep.rpcUrls,
|
|
145
|
+
alchemy: {
|
|
146
|
+
http: ["https://eth-sepolia.g.alchemy.com/v2"],
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
};
|
|
150
|
+
export const base: Chain = {
|
|
151
|
+
...vbase,
|
|
152
|
+
rpcUrls: {
|
|
153
|
+
...vbase.rpcUrls,
|
|
154
|
+
alchemy: {
|
|
155
|
+
http: ["https://base-mainnet.g.alchemy.com/v2"],
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
};
|
|
159
|
+
export const baseGoerli: Chain = {
|
|
160
|
+
...vbaseg,
|
|
161
|
+
rpcUrls: {
|
|
162
|
+
...vbaseg.rpcUrls,
|
|
163
|
+
alchemy: {
|
|
164
|
+
http: ["https://base-goerli.g.alchemy.com/v2"],
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
};
|
|
168
|
+
export const baseSepolia: Chain = {
|
|
169
|
+
...vbases,
|
|
170
|
+
rpcUrls: {
|
|
171
|
+
...vbases.rpcUrls,
|
|
172
|
+
alchemy: {
|
|
173
|
+
http: ["https://base-sepolia.g.alchemy.com/v2"],
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
export const polygonMumbai: Chain = {
|
|
179
|
+
...vpgm,
|
|
180
|
+
rpcUrls: {
|
|
181
|
+
...vpgm.rpcUrls,
|
|
182
|
+
alchemy: {
|
|
183
|
+
http: ["https://polygon-mumbai.g.alchemy.com/v2"],
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
export const polygonAmoy: Chain = {
|
|
189
|
+
...vpga,
|
|
190
|
+
rpcUrls: {
|
|
191
|
+
...vpga.rpcUrls,
|
|
192
|
+
alchemy: {
|
|
193
|
+
http: ["https://polygon-amoy.g.alchemy.com/v2"],
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
export const polygon: Chain = {
|
|
199
|
+
...vpg,
|
|
200
|
+
rpcUrls: {
|
|
201
|
+
...vpg.rpcUrls,
|
|
202
|
+
alchemy: {
|
|
203
|
+
http: ["https://polygon-mainnet.g.alchemy.com/v2"],
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
export const fraxtal: Chain = {
|
|
209
|
+
...vfrax,
|
|
210
|
+
rpcUrls: {
|
|
211
|
+
...vfrax.rpcUrls,
|
|
212
|
+
},
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
export const fraxtalSepolia: Chain = defineChain({
|
|
216
|
+
id: 2523,
|
|
217
|
+
name: "Fraxtal Sepolia",
|
|
218
|
+
nativeCurrency: { name: "Frax Ether", symbol: "frxETH", decimals: 18 },
|
|
219
|
+
rpcUrls: {
|
|
220
|
+
default: {
|
|
221
|
+
http: ["https://rpc.testnet-sepolia.frax.com"],
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
export const zora: Chain = {
|
|
227
|
+
...vzora,
|
|
228
|
+
rpcUrls: {
|
|
229
|
+
...vzora.rpcUrls,
|
|
230
|
+
},
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
export const zoraSepolia: Chain = {
|
|
234
|
+
...vzoras,
|
|
235
|
+
rpcUrls: {
|
|
236
|
+
...vzoras.rpcUrls,
|
|
237
|
+
},
|
|
238
|
+
};
|
package/src/client/rpcClient.ts
CHANGED
|
@@ -14,7 +14,7 @@ import type { ClientWithAlchemyMethods } from "./types.js";
|
|
|
14
14
|
* @example
|
|
15
15
|
* ```ts
|
|
16
16
|
* import { createAlchemyPublicRpcClient } from "@account-kit/infra";
|
|
17
|
-
* import { sepolia } from "@account-kit/infra
|
|
17
|
+
* import { sepolia } from "@account-kit/infra";
|
|
18
18
|
*
|
|
19
19
|
* const client = createAlchemyPublicRpcClient({
|
|
20
20
|
* chain: sepolia,
|
package/src/defaults.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type UserOperationFeeOptions } from "@aa-sdk/core";
|
|
2
|
+
import type { Chain } from "viem";
|
|
1
3
|
import {
|
|
2
4
|
arbitrum,
|
|
3
5
|
arbitrumGoerli,
|
|
@@ -5,9 +7,7 @@ import {
|
|
|
5
7
|
optimism,
|
|
6
8
|
optimismGoerli,
|
|
7
9
|
optimismSepolia,
|
|
8
|
-
|
|
9
|
-
} from "@aa-sdk/core";
|
|
10
|
-
import type { Chain } from "viem";
|
|
10
|
+
} from "./chains.js";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Retrieves the default user operation fee options for a given chain. Adjusts fees for specific chains like Arbitrum and Optimism.
|
|
@@ -15,7 +15,7 @@ import type { Chain } from "viem";
|
|
|
15
15
|
* @example
|
|
16
16
|
* ```ts
|
|
17
17
|
* import { getDefaultUserOperationFeeOptions } from "@account-kit/infra";
|
|
18
|
-
* import { arbitrum } from "@account-kit/infra
|
|
18
|
+
* import { arbitrum } from "@account-kit/infra";
|
|
19
19
|
*
|
|
20
20
|
* const feeOpts = getDefaultUserOperationFeeOptions(arbitrum);
|
|
21
21
|
* ```
|
package/src/gas-manager.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Address, Chain } from "viem";
|
|
1
2
|
import {
|
|
2
3
|
arbitrum,
|
|
3
4
|
arbitrumSepolia,
|
|
@@ -14,8 +15,7 @@ import {
|
|
|
14
15
|
sepolia,
|
|
15
16
|
zora,
|
|
16
17
|
zoraSepolia,
|
|
17
|
-
} from "
|
|
18
|
-
import type { Address, Chain } from "viem";
|
|
18
|
+
} from "./chains.js";
|
|
19
19
|
|
|
20
20
|
export const AlchemyPaymasterAddressV3 =
|
|
21
21
|
"0x4f84a207A80c39E9e8BaE717c1F25bA7AD1fB08F";
|
|
@@ -31,7 +31,7 @@ export const AlchemyPaymasterAddressV1 =
|
|
|
31
31
|
*
|
|
32
32
|
* @example
|
|
33
33
|
* ```ts
|
|
34
|
-
* import { sepolia, getAlchemyPaymasterAddress } from "@account-kit/infra
|
|
34
|
+
* import { sepolia, getAlchemyPaymasterAddress } from "@account-kit/infra";
|
|
35
35
|
*
|
|
36
36
|
* const paymasterAddress = getAlchemyPaymasterAddress(sepolia);
|
|
37
37
|
* ```
|
package/src/index.ts
CHANGED
|
@@ -2,7 +2,28 @@ export type * from "./actions/simulateUserOperationChanges.js";
|
|
|
2
2
|
export { simulateUserOperationChanges } from "./actions/simulateUserOperationChanges.js";
|
|
3
3
|
export type * from "./actions/types.js";
|
|
4
4
|
export type * from "./chains.js";
|
|
5
|
-
export {
|
|
5
|
+
export {
|
|
6
|
+
arbitrum,
|
|
7
|
+
arbitrumGoerli,
|
|
8
|
+
arbitrumSepolia,
|
|
9
|
+
base,
|
|
10
|
+
baseGoerli,
|
|
11
|
+
baseSepolia,
|
|
12
|
+
defineAlchemyChain,
|
|
13
|
+
fraxtal,
|
|
14
|
+
fraxtalSepolia,
|
|
15
|
+
goerli,
|
|
16
|
+
mainnet,
|
|
17
|
+
optimism,
|
|
18
|
+
optimismGoerli,
|
|
19
|
+
optimismSepolia,
|
|
20
|
+
polygon,
|
|
21
|
+
polygonAmoy,
|
|
22
|
+
polygonMumbai,
|
|
23
|
+
sepolia,
|
|
24
|
+
zora,
|
|
25
|
+
zoraSepolia,
|
|
26
|
+
} from "./chains.js";
|
|
6
27
|
export type * from "./client/decorators/alchemyEnhancedApis.js";
|
|
7
28
|
export { alchemyEnhancedApiActions } from "./client/decorators/alchemyEnhancedApis.js";
|
|
8
29
|
export type * from "./client/decorators/smartAccount.js";
|
package/src/schema.ts
CHANGED
|
@@ -2,23 +2,15 @@ import {
|
|
|
2
2
|
ChainSchema,
|
|
3
3
|
ConnectionConfigSchema,
|
|
4
4
|
SmartAccountClientOptsSchema,
|
|
5
|
-
getChain,
|
|
6
5
|
} from "@aa-sdk/core";
|
|
7
6
|
import { Alchemy } from "alchemy-sdk";
|
|
8
7
|
import type { Chain } from "viem";
|
|
9
8
|
import z from "zod";
|
|
10
9
|
|
|
11
10
|
export const AlchemyChainSchema = z.custom<Chain>((chain) => {
|
|
12
|
-
const
|
|
11
|
+
const chain_ = ChainSchema.parse(chain);
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
try {
|
|
16
|
-
chainObject = getChain(_chain.id);
|
|
17
|
-
} catch {
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return chainObject.rpcUrls.alchemy != null;
|
|
13
|
+
return chain_.rpcUrls.alchemy != null;
|
|
22
14
|
}, "chain must include an alchemy rpc url. See `createAlchemyChain` or use the `AlchemyChainMap` exported from `@aa-sdk/core`");
|
|
23
15
|
|
|
24
16
|
export const AlchemyProviderConfigSchema = ConnectionConfigSchema.and(
|
package/src/version.ts
CHANGED