@alchemy/wallet-apis 5.0.0-beta.26 → 5.0.0-beta.28
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/esm/actions/sendCalls.d.ts +5 -2
- package/dist/esm/actions/sendCalls.js +5 -2
- package/dist/esm/actions/sendCalls.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/actions/sendCalls.d.ts +5 -2
- package/dist/types/actions/sendCalls.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +5 -5
- package/src/actions/sendCalls.ts +5 -2
- package/src/version.ts +1 -1
|
@@ -33,8 +33,11 @@ export type SendCallsResult = Prettify<SendPreparedCallsResult>;
|
|
|
33
33
|
* }
|
|
34
34
|
* });
|
|
35
35
|
*
|
|
36
|
-
* //
|
|
37
|
-
*
|
|
36
|
+
* // Wait for the calls to be mined and confirmed.
|
|
37
|
+
* // Polls getCallsStatus until the bundle succeeds, fails, or times out (default 60s).
|
|
38
|
+
* // See: https://viem.sh/docs/actions/wallet/waitForCallsStatus
|
|
39
|
+
* const status = await client.waitForCallsStatus({ id: result.id });
|
|
40
|
+
* console.log(status.status); // "success" | "failure"
|
|
38
41
|
* ```
|
|
39
42
|
* <Note>
|
|
40
43
|
* If using this action with an ERC-20 paymaster in pre-operation mode with `autoPermit`, the contents of the permit will be hidden
|
|
@@ -31,8 +31,11 @@ import { extractCapabilitiesForSending } from "../utils/capabilities.js";
|
|
|
31
31
|
* }
|
|
32
32
|
* });
|
|
33
33
|
*
|
|
34
|
-
* //
|
|
35
|
-
*
|
|
34
|
+
* // Wait for the calls to be mined and confirmed.
|
|
35
|
+
* // Polls getCallsStatus until the bundle succeeds, fails, or times out (default 60s).
|
|
36
|
+
* // See: https://viem.sh/docs/actions/wallet/waitForCallsStatus
|
|
37
|
+
* const status = await client.waitForCallsStatus({ id: result.id });
|
|
38
|
+
* console.log(status.status); // "success" | "failure"
|
|
36
39
|
* ```
|
|
37
40
|
* <Note>
|
|
38
41
|
* If using this action with an ERC-20 paymaster in pre-operation mode with `autoPermit`, the contents of the permit will be hidden
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendCalls.js","sourceRoot":"","sources":["../../../src/actions/sendCalls.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAA2B,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EACL,iBAAiB,GAElB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AAUzE
|
|
1
|
+
{"version":3,"file":"sendCalls.js","sourceRoot":"","sources":["../../../src/actions/sendCalls.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAA2B,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EACL,iBAAiB,GAElB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AAUzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,MAA4B,EAC5B,MAAuB;IAEvB,MAAM,CAAC,IAAI,CAAC,iBAAiB,EAAE;QAC7B,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM;QAC3B,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,YAAY;KACvC,CAAC,CAAC;IACH,MAAM,EAAE,KAAK,EAAE,GAAG,kBAAkB,EAAE,GAAG,MAAM,CAAC;IAChD,IAAI,KAAK,GAAG,MAAM,YAAY,CAAC,MAAM,EAAE;QACrC,GAAG,kBAAkB;QACrB,GAAG,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAChD,CAAC,CAAC;IAEH,IAAI,KAAK,CAAC,IAAI,KAAK,kBAAkB,EAAE,CAAC;QACtC,MAAM,SAAS,GAAG,MAAM,oBAAoB,CAC1C,MAAM,EACN,KAAK,CAAC,gBAAgB,CACvB,CAAC;QAEF,MAAM,gBAAgB,GAAG;YACvB,GAAG,KAAK,CAAC,eAAe;YACxB,8EAA8E;YAC9E,wBAAwB,EAAE,SAGzB;SACF,CAAC;QAEF,KAAK,GAAG,MAAM,YAAY,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACvD,CAAC;IAED,MAAM,WAAW,GAAG,MAAM,iBAAiB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAE3D,MAAM,6BAA6B,GAAG,6BAA6B,CACjE,MAAM,CAAC,YAAY,CACpB,CAAC;IAEF,MAAM,GAAG,GAAG,MAAM,iBAAiB,CAAC,MAAM,EAAE;QAC1C,GAAG,WAAW;QACd,GAAG,CAAC,6BAA6B,IAAI,IAAI;YACvC,CAAC,CAAC,EAAE,YAAY,EAAE,6BAA6B,EAAE;YACjD,CAAC,CAAC,EAAE,CAAC;KACR,CAAC,CAAC;IACH,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAC9B,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import type { Chain, Prettify } from \"viem\";\nimport type { DistributiveOmit, InnerWalletApiClient } from \"../types.js\";\nimport { prepareCalls, type PrepareCallsParams } from \"./prepareCalls.js\";\nimport { signPreparedCalls } from \"./signPreparedCalls.js\";\nimport {\n sendPreparedCalls,\n type SendPreparedCallsResult,\n} from \"./sendPreparedCalls.js\";\nimport { LOGGER } from \"../logger.js\";\nimport { signSignatureRequest } from \"./signSignatureRequest.js\";\nimport { extractCapabilitiesForSending } from \"../utils/capabilities.js\";\n\nexport type SendCallsParams = Prettify<\n DistributiveOmit<PrepareCallsParams, \"chainId\"> & {\n chain?: Pick<Chain, \"id\">;\n }\n>;\n\nexport type SendCallsResult = Prettify<SendPreparedCallsResult>;\n\n/**\n * Prepares, signs, and submits calls. This function internally calls `prepareCalls`, `signPreparedCalls`, and `sendPreparedCalls`.\n *\n * The client defaults to using EIP-7702 with the signer's address, so you can call\n * this directly without first calling `requestAccount`.\n *\n * @param {InnerWalletApiClient} client - The wallet API client to use for the request\n * @param {SendCallsParams} params - Parameters for sending calls\n * @param {Array<{to: Address, data?: Hex, value?: bigint}>} params.calls - Array of contract calls to execute\n * @param {AccountParam} [params.account] - The account to execute the calls from. Can be an address string or an object with an `address` property. Defaults to the client's account (signer address via EIP-7702).\n * @param {object} [params.capabilities] - Optional capabilities to include with the request.\n * @returns {Promise<SendPreparedCallsResult>} A Promise that resolves to the result containing the call ID.\n *\n * @example\n * ```ts\n * // Send calls (uses signer address via EIP-7702 by default)\n * const result = await client.sendCalls({\n * calls: [{\n * to: \"0x1234...\",\n * data: \"0xabcdef...\",\n * value: 0n\n * }],\n * capabilities: {\n * paymaster: { policyId: \"your-policy-id\" }\n * }\n * });\n *\n * // Wait for the calls to be mined and confirmed.\n * // Polls getCallsStatus until the bundle succeeds, fails, or times out (default 60s).\n * // See: https://viem.sh/docs/actions/wallet/waitForCallsStatus\n * const status = await client.waitForCallsStatus({ id: result.id });\n * console.log(status.status); // \"success\" | \"failure\"\n * ```\n * <Note>\n * If using this action with an ERC-20 paymaster in pre-operation mode with `autoPermit`, the contents of the permit will be hidden\n * from the user. It is recommended to use the `prepareCalls` action instead to manually handle the permit signature.\n * </Note>\n */\nexport async function sendCalls(\n client: InnerWalletApiClient,\n params: SendCallsParams,\n): Promise<SendCallsResult> {\n LOGGER.info(\"sendCalls:start\", {\n calls: params.calls?.length,\n hasCapabilities: !!params.capabilities,\n });\n const { chain, ...prepareCallsParams } = params;\n let calls = await prepareCalls(client, {\n ...prepareCallsParams,\n ...(chain != null ? { chainId: chain.id } : {}),\n });\n\n if (calls.type === \"paymaster-permit\") {\n const signature = await signSignatureRequest(\n client,\n calls.signatureRequest,\n );\n\n const secondCallParams = {\n ...calls.modifiedRequest,\n // WebAuthn signatures are not supported for paymaster permits (throws above).\n paymasterPermitSignature: signature as Exclude<\n typeof signature,\n { type: \"webauthn-p256\" }\n >,\n };\n\n calls = await prepareCalls(client, secondCallParams);\n }\n\n const signedCalls = await signPreparedCalls(client, calls);\n\n const sendPreparedCallsCapabilities = extractCapabilitiesForSending(\n params.capabilities,\n );\n\n const res = await sendPreparedCalls(client, {\n ...signedCalls,\n ...(sendPreparedCallsCapabilities != null\n ? { capabilities: sendPreparedCallsCapabilities }\n : {}),\n });\n LOGGER.info(\"sendCalls:done\");\n return res;\n}\n"]}
|
package/dist/esm/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "5.0.0-beta.
|
|
1
|
+
export declare const VERSION = "5.0.0-beta.27";
|
package/dist/esm/version.js
CHANGED
package/dist/esm/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,yBAAyB;AACzB,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC","sourcesContent":["// This file is autogenerated by inject-version.ts. Any changes will be\n// overwritten on commit!\nexport const VERSION = \"5.0.0-beta.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,yBAAyB;AACzB,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC","sourcesContent":["// This file is autogenerated by inject-version.ts. Any changes will be\n// overwritten on commit!\nexport const VERSION = \"5.0.0-beta.27\";\n"]}
|
|
@@ -33,8 +33,11 @@ export type SendCallsResult = Prettify<SendPreparedCallsResult>;
|
|
|
33
33
|
* }
|
|
34
34
|
* });
|
|
35
35
|
*
|
|
36
|
-
* //
|
|
37
|
-
*
|
|
36
|
+
* // Wait for the calls to be mined and confirmed.
|
|
37
|
+
* // Polls getCallsStatus until the bundle succeeds, fails, or times out (default 60s).
|
|
38
|
+
* // See: https://viem.sh/docs/actions/wallet/waitForCallsStatus
|
|
39
|
+
* const status = await client.waitForCallsStatus({ id: result.id });
|
|
40
|
+
* console.log(status.status); // "success" | "failure"
|
|
38
41
|
* ```
|
|
39
42
|
* <Note>
|
|
40
43
|
* If using this action with an ERC-20 paymaster in pre-operation mode with `autoPermit`, the contents of the permit will be hidden
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendCalls.d.ts","sourceRoot":"","sources":["../../../src/actions/sendCalls.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,EAAgB,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE1E,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,wBAAwB,CAAC;AAKhC,MAAM,MAAM,eAAe,GAAG,QAAQ,CACpC,gBAAgB,CAAC,kBAAkB,EAAE,SAAS,CAAC,GAAG;IAChD,KAAK,CAAC,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;CAC3B,CACF,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC,uBAAuB,CAAC,CAAC;AAEhE
|
|
1
|
+
{"version":3,"file":"sendCalls.d.ts","sourceRoot":"","sources":["../../../src/actions/sendCalls.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,EAAgB,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE1E,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,wBAAwB,CAAC;AAKhC,MAAM,MAAM,eAAe,GAAG,QAAQ,CACpC,gBAAgB,CAAC,kBAAkB,EAAE,SAAS,CAAC,GAAG;IAChD,KAAK,CAAC,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;CAC3B,CACF,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC,uBAAuB,CAAC,CAAC;AAEhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAsB,SAAS,CAC7B,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE,eAAe,GACtB,OAAO,CAAC,eAAe,CAAC,CA2C1B"}
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "5.0.0-beta.
|
|
1
|
+
export declare const VERSION = "5.0.0-beta.27";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alchemy/wallet-apis",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.28",
|
|
4
4
|
"description": "Alchemy Wallet APIs",
|
|
5
5
|
"author": "Alchemy",
|
|
6
6
|
"license": "MIT",
|
|
@@ -55,11 +55,11 @@
|
|
|
55
55
|
"viem": "^2.45.0"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@alchemy/common": "5.0.0-beta.
|
|
59
|
-
"@alchemy/wallet-api-types": "
|
|
58
|
+
"@alchemy/common": "5.0.0-beta.28",
|
|
59
|
+
"@alchemy/wallet-api-types": "0.1.0-alpha.27",
|
|
60
60
|
"deep-equal": "^2.2.3",
|
|
61
61
|
"ox": "^0.11.1",
|
|
62
|
-
"typebox": "
|
|
62
|
+
"typebox": "1.0.81"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"viem": "^2.45.0"
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"url": "https://github.com/alchemyplatform/aa-sdk/issues"
|
|
77
77
|
},
|
|
78
78
|
"homepage": "https://github.com/alchemyplatform/aa-sdk#readme",
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "cda39f81987f118b0a910a934b4b140b9e08c62f"
|
|
80
80
|
}
|
package/src/actions/sendCalls.ts
CHANGED
|
@@ -45,8 +45,11 @@ export type SendCallsResult = Prettify<SendPreparedCallsResult>;
|
|
|
45
45
|
* }
|
|
46
46
|
* });
|
|
47
47
|
*
|
|
48
|
-
* //
|
|
49
|
-
*
|
|
48
|
+
* // Wait for the calls to be mined and confirmed.
|
|
49
|
+
* // Polls getCallsStatus until the bundle succeeds, fails, or times out (default 60s).
|
|
50
|
+
* // See: https://viem.sh/docs/actions/wallet/waitForCallsStatus
|
|
51
|
+
* const status = await client.waitForCallsStatus({ id: result.id });
|
|
52
|
+
* console.log(status.status); // "success" | "failure"
|
|
50
53
|
* ```
|
|
51
54
|
* <Note>
|
|
52
55
|
* If using this action with an ERC-20 paymaster in pre-operation mode with `autoPermit`, the contents of the permit will be hidden
|
package/src/version.ts
CHANGED