@getpara/aa-gelato 2.16.0 → 2.17.0

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/action.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { GelatoBundlerClient } from '@gelatocloud/gasless';
2
- import type { SmartAccount7702 } from '@getpara/viem-v2-integration';
2
+ import type { SmartAccount7702 } from '@getpara/viem-v2-integration/aa';
3
3
  import type { CreateGelatoSmartAccountParams } from './types.js';
4
4
  export type { CreateGelatoSmartAccountParams } from './types.js';
5
5
  /**
package/dist/action.js CHANGED
@@ -1,14 +1,20 @@
1
1
  import { createGelatoBundlerClient, toGelatoSmartAccount } from "@gelatocloud/gasless";
2
- import { createParaAccount } from "@getpara/viem-v2-integration";
3
- import { SmartAccountError, wrapProviderError, resolveWalletIdentifier } from "@getpara/viem-v2-integration";
2
+ import { isExternalWallet, resolveSigner, assertAccountAddress } from "@getpara/viem-v2-integration/aa";
3
+ import { SmartAccountError, wrapProviderError } from "@getpara/viem-v2-integration/aa";
4
4
  import { entryPoint08Address } from "viem/account-abstraction";
5
5
  import { createPublicClient, http } from "viem";
6
6
  const GELATO_DELEGATION_ADDRESS = "0x5aF42746a8Af42d8a4708dF238C53F1F71abF0E0";
7
7
  async function createGelatoSmartAccount(params) {
8
8
  const { para, apiKey, chain, rpcUrl } = params;
9
- const walletAddress = resolveWalletIdentifier(para, params);
10
- if (!walletAddress) return null;
11
- const viemAccount = createParaAccount(para, walletAddress);
9
+ if (isExternalWallet(params.signer)) {
10
+ throw new SmartAccountError({
11
+ code: "INVALID_CONFIG",
12
+ message: "Gelato is 7702-only and does not support external wallets. External wallets cannot produce the raw signAuthorization required by EIP-7702. Use an embedded Para wallet.",
13
+ provider: "GELATO"
14
+ });
15
+ }
16
+ const viemAccount = resolveSigner(para, params);
17
+ if (!viemAccount) return null;
12
18
  const publicClient = createPublicClient({ chain, transport: http(rpcUrl) });
13
19
  const smartAccount = toGelatoSmartAccount({
14
20
  client: publicClient,
@@ -44,13 +50,7 @@ async function createGelatoSmartAccount(params) {
44
50
  client: publicClient,
45
51
  sponsored: true
46
52
  });
47
- if (!bundlerClient.account?.address) {
48
- throw new SmartAccountError({
49
- code: "MISSING_ACCOUNT_ADDRESS",
50
- message: "Gelato bundler client must have an account address",
51
- provider: "GELATO"
52
- });
53
- }
53
+ assertAccountAddress(bundlerClient.account?.address, "Gelato bundler client", "GELATO");
54
54
  const accountAddress = bundlerClient.account.address;
55
55
  async function getAuthorizationIfNeeded() {
56
56
  if (isGelatoDelegated) return void 0;
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ApiKeySmartAccountConfig, CreateSmartAccountParams } from '@getpara/viem-v2-integration';
1
+ import type { ApiKeySmartAccountConfig, CreateSmartAccountParams } from '@getpara/viem-v2-integration/aa';
2
2
  /**
3
3
  * Configuration for Gelato smart account.
4
4
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpara/aa-gelato",
3
- "version": "2.16.0",
3
+ "version": "2.17.0",
4
4
  "description": "Gelato smart account integration for Para",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "@gelatocloud/gasless": "^0.0.12",
26
- "@getpara/viem-v2-integration": "2.16.0"
26
+ "@getpara/viem-v2-integration": "2.17.0"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "viem": ">=2.0.0"
@@ -34,5 +34,5 @@
34
34
  "publishConfig": {
35
35
  "access": "public"
36
36
  },
37
- "gitHead": "fbe96a062b308d04105213378c12c38ee973c798"
37
+ "gitHead": "3ed1f835b97ae720f1ac747611296e3b86f61138"
38
38
  }