@coinbase/cdp-sdk 1.44.1 → 1.45.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.
Files changed (125) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +117 -0
  3. package/_cjs/accounts/evm/toEvmDelegatedAccount.js +27 -0
  4. package/_cjs/accounts/evm/toEvmDelegatedAccount.js.map +1 -0
  5. package/_cjs/accounts/evm/toEvmServerAccount.js +127 -55
  6. package/_cjs/accounts/evm/toEvmServerAccount.js.map +1 -1
  7. package/_cjs/accounts/evm/toEvmSmartAccount.js +111 -45
  8. package/_cjs/accounts/evm/toEvmSmartAccount.js.map +1 -1
  9. package/_cjs/accounts/solana/toSolanaAccount.js +49 -19
  10. package/_cjs/accounts/solana/toSolanaAccount.js.map +1 -1
  11. package/_cjs/actions/evm/waitForEvmEip7702DelegationStatus.js +37 -0
  12. package/_cjs/actions/evm/waitForEvmEip7702DelegationStatus.js.map +1 -0
  13. package/_cjs/analytics.js +10 -228
  14. package/_cjs/analytics.js.map +1 -1
  15. package/_cjs/client/cdp.js +0 -6
  16. package/_cjs/client/cdp.js.map +1 -1
  17. package/_cjs/client/evm/evm.js +482 -227
  18. package/_cjs/client/evm/evm.js.map +1 -1
  19. package/_cjs/client/policies/policies.js +41 -11
  20. package/_cjs/client/policies/policies.js.map +1 -1
  21. package/_cjs/client/solana/solana.js +177 -106
  22. package/_cjs/client/solana/solana.js.map +1 -1
  23. package/_cjs/index.js +3 -1
  24. package/_cjs/index.js.map +1 -1
  25. package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +137 -5
  26. package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
  27. package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.js +30 -1
  28. package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.js.map +1 -1
  29. package/_cjs/openapi-client/generated/onramp/onramp.js +15 -1
  30. package/_cjs/openapi-client/generated/onramp/onramp.js.map +1 -1
  31. package/_cjs/policies/evmSchema.js +127 -1
  32. package/_cjs/policies/evmSchema.js.map +1 -1
  33. package/_cjs/policies/solanaSchema.js +102 -1
  34. package/_cjs/policies/solanaSchema.js.map +1 -1
  35. package/_cjs/policies/types.js +7 -0
  36. package/_cjs/policies/types.js.map +1 -1
  37. package/_cjs/version.js +1 -1
  38. package/_esm/accounts/evm/toEvmDelegatedAccount.js +24 -0
  39. package/_esm/accounts/evm/toEvmDelegatedAccount.js.map +1 -0
  40. package/_esm/accounts/evm/toEvmServerAccount.js +127 -55
  41. package/_esm/accounts/evm/toEvmServerAccount.js.map +1 -1
  42. package/_esm/accounts/evm/toEvmSmartAccount.js +111 -45
  43. package/_esm/accounts/evm/toEvmSmartAccount.js.map +1 -1
  44. package/_esm/accounts/solana/toSolanaAccount.js +49 -19
  45. package/_esm/accounts/solana/toSolanaAccount.js.map +1 -1
  46. package/_esm/actions/evm/waitForEvmEip7702DelegationStatus.js +34 -0
  47. package/_esm/actions/evm/waitForEvmEip7702DelegationStatus.js.map +1 -0
  48. package/_esm/analytics.js +9 -227
  49. package/_esm/analytics.js.map +1 -1
  50. package/_esm/client/cdp.js +0 -6
  51. package/_esm/client/cdp.js.map +1 -1
  52. package/_esm/client/evm/evm.js +482 -227
  53. package/_esm/client/evm/evm.js.map +1 -1
  54. package/_esm/client/policies/policies.js +41 -11
  55. package/_esm/client/policies/policies.js.map +1 -1
  56. package/_esm/client/solana/solana.js +177 -106
  57. package/_esm/client/solana/solana.js.map +1 -1
  58. package/_esm/index.js +1 -0
  59. package/_esm/index.js.map +1 -1
  60. package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +134 -3
  61. package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
  62. package/_esm/openapi-client/generated/evm-accounts/evm-accounts.js +27 -0
  63. package/_esm/openapi-client/generated/evm-accounts/evm-accounts.js.map +1 -1
  64. package/_esm/openapi-client/generated/onramp/onramp.js +13 -0
  65. package/_esm/openapi-client/generated/onramp/onramp.js.map +1 -1
  66. package/_esm/policies/evmSchema.js +126 -0
  67. package/_esm/policies/evmSchema.js.map +1 -1
  68. package/_esm/policies/solanaSchema.js +101 -0
  69. package/_esm/policies/solanaSchema.js.map +1 -1
  70. package/_esm/policies/types.js +9 -2
  71. package/_esm/policies/types.js.map +1 -1
  72. package/_esm/version.js +1 -1
  73. package/_types/accounts/evm/toEvmDelegatedAccount.d.ts +13 -0
  74. package/_types/accounts/evm/toEvmDelegatedAccount.d.ts.map +1 -0
  75. package/_types/accounts/evm/toEvmServerAccount.d.ts.map +1 -1
  76. package/_types/accounts/evm/toEvmSmartAccount.d.ts.map +1 -1
  77. package/_types/accounts/solana/toSolanaAccount.d.ts.map +1 -1
  78. package/_types/actions/evm/waitForEvmEip7702DelegationStatus.d.ts +32 -0
  79. package/_types/actions/evm/waitForEvmEip7702DelegationStatus.d.ts.map +1 -0
  80. package/_types/analytics.d.ts +5 -38
  81. package/_types/analytics.d.ts.map +1 -1
  82. package/_types/client/cdp.d.ts.map +1 -1
  83. package/_types/client/evm/evm.d.ts +54 -1
  84. package/_types/client/evm/evm.d.ts.map +1 -1
  85. package/_types/client/evm/evm.types.d.ts +29 -2
  86. package/_types/client/evm/evm.types.d.ts.map +1 -1
  87. package/_types/client/policies/policies.d.ts.map +1 -1
  88. package/_types/client/solana/solana.d.ts.map +1 -1
  89. package/_types/index.d.ts +2 -0
  90. package/_types/index.d.ts.map +1 -1
  91. package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +436 -10
  92. package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
  93. package/_types/openapi-client/generated/evm-accounts/evm-accounts.d.ts +21 -1
  94. package/_types/openapi-client/generated/evm-accounts/evm-accounts.d.ts.map +1 -1
  95. package/_types/openapi-client/generated/onramp/onramp.d.ts +8 -1
  96. package/_types/openapi-client/generated/onramp/onramp.d.ts.map +1 -1
  97. package/_types/openapi-client/index.d.ts +4 -0
  98. package/_types/openapi-client/index.d.ts.map +1 -1
  99. package/_types/policies/evmSchema.d.ts +2717 -601
  100. package/_types/policies/evmSchema.d.ts.map +1 -1
  101. package/_types/policies/solanaSchema.d.ts +1411 -47
  102. package/_types/policies/solanaSchema.d.ts.map +1 -1
  103. package/_types/policies/types.d.ts +8427 -2942
  104. package/_types/policies/types.d.ts.map +1 -1
  105. package/_types/version.d.ts +1 -1
  106. package/accounts/evm/toEvmDelegatedAccount.ts +26 -0
  107. package/accounts/evm/toEvmServerAccount.ts +115 -67
  108. package/accounts/evm/toEvmSmartAccount.ts +100 -56
  109. package/accounts/solana/toSolanaAccount.ts +44 -24
  110. package/actions/evm/waitForEvmEip7702DelegationStatus.ts +57 -0
  111. package/analytics.ts +8 -294
  112. package/client/cdp.ts +0 -7
  113. package/client/evm/evm.ts +517 -282
  114. package/client/evm/evm.types.ts +41 -0
  115. package/client/policies/policies.ts +41 -16
  116. package/client/solana/solana.ts +195 -141
  117. package/index.ts +5 -0
  118. package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +580 -11
  119. package/openapi-client/generated/evm-accounts/evm-accounts.ts +49 -0
  120. package/openapi-client/generated/onramp/onramp.ts +24 -0
  121. package/package.json +1 -1
  122. package/policies/evmSchema.ts +164 -0
  123. package/policies/solanaSchema.ts +130 -0
  124. package/policies/types.ts +14 -0
  125. package/version.ts +1 -1
@@ -17,6 +17,7 @@ const sendUserOperation_js_1 = require("../../actions/evm/sendUserOperation.js")
17
17
  const resolveSpendPermission_js_1 = require("../../actions/evm/spend-permissions/resolveSpendPermission.js");
18
18
  const createSwapQuote_js_1 = require("../../actions/evm/swap/createSwapQuote.js");
19
19
  const getSwapPrice_js_1 = require("../../actions/evm/swap/getSwapPrice.js");
20
+ const waitForEvmEip7702DelegationStatus_js_1 = require("../../actions/evm/waitForEvmEip7702DelegationStatus.js");
20
21
  const waitForUserOperation_js_1 = require("../../actions/evm/waitForUserOperation.js");
21
22
  const analytics_js_1 = require("../../analytics.js");
22
23
  const constants_js_1 = require("../../constants.js");
@@ -68,7 +69,13 @@ class EvmClient {
68
69
  action: "create_account",
69
70
  accountType: "evm_server",
70
71
  });
71
- return this._createAccountInternal(options);
72
+ try {
73
+ return await this._createAccountInternal(options);
74
+ }
75
+ catch (error) {
76
+ analytics_js_1.Analytics.trackError(error, "createAccount");
77
+ throw error;
78
+ }
72
79
  }
73
80
  /**
74
81
  * Imports a CDP EVM account from an external source.
@@ -117,14 +124,14 @@ class EvmClient {
117
124
  action: "import_account",
118
125
  accountType: "evm_server",
119
126
  });
120
- const encryptionPublicKey = options.encryptionPublicKey || constants_js_1.ImportAccountPublicRSAKey;
121
- const privateKeyHex = options.privateKey.startsWith("0x")
122
- ? options.privateKey.slice(2)
123
- : options.privateKey;
124
- if (!/^[0-9a-fA-F]+$/.test(privateKeyHex)) {
125
- throw new errors_js_1.UserInputValidationError("Private key must be a valid hexadecimal string");
126
- }
127
127
  try {
128
+ const encryptionPublicKey = options.encryptionPublicKey || constants_js_1.ImportAccountPublicRSAKey;
129
+ const privateKeyHex = options.privateKey.startsWith("0x")
130
+ ? options.privateKey.slice(2)
131
+ : options.privateKey;
132
+ if (!/^[0-9a-fA-F]+$/.test(privateKeyHex)) {
133
+ throw new errors_js_1.UserInputValidationError("Private key must be a valid hexadecimal string");
134
+ }
128
135
  const privateKeyBytes = Buffer.from(privateKeyHex, "hex");
129
136
  const encryptedPrivateKey = (0, crypto_1.publicEncrypt)({
130
137
  key: encryptionPublicKey,
@@ -138,10 +145,12 @@ class EvmClient {
138
145
  const account = (0, toEvmServerAccount_js_1.toEvmServerAccount)(index_js_1.CdpOpenApiClient, {
139
146
  account: openApiAccount,
140
147
  });
141
- analytics_js_1.Analytics.wrapObjectMethodsWithErrorTracking(account);
142
148
  return account;
143
149
  }
144
150
  catch (error) {
151
+ if (!(error instanceof errors_js_1.UserInputValidationError)) {
152
+ analytics_js_1.Analytics.trackError(error, "importAccount");
153
+ }
145
154
  if (error instanceof errors_js_2.APIError) {
146
155
  throw error;
147
156
  }
@@ -178,21 +187,29 @@ class EvmClient {
178
187
  action: "export_account",
179
188
  accountType: "evm_server",
180
189
  });
181
- const { publicKey, privateKey } = await (0, export_js_1.generateExportEncryptionKeyPair)();
182
- const { encryptedPrivateKey } = await (async () => {
183
- if (options.address) {
184
- return index_js_1.CdpOpenApiClient.exportEvmAccount(options.address, {
185
- exportEncryptionKey: publicKey,
186
- }, options.idempotencyKey);
187
- }
188
- if (options.name) {
189
- return index_js_1.CdpOpenApiClient.exportEvmAccountByName(options.name, {
190
- exportEncryptionKey: publicKey,
191
- }, options.idempotencyKey);
190
+ try {
191
+ const { publicKey, privateKey } = await (0, export_js_1.generateExportEncryptionKeyPair)();
192
+ const { encryptedPrivateKey } = await (async () => {
193
+ if (options.address) {
194
+ return index_js_1.CdpOpenApiClient.exportEvmAccount(options.address, {
195
+ exportEncryptionKey: publicKey,
196
+ }, options.idempotencyKey);
197
+ }
198
+ if (options.name) {
199
+ return index_js_1.CdpOpenApiClient.exportEvmAccountByName(options.name, {
200
+ exportEncryptionKey: publicKey,
201
+ }, options.idempotencyKey);
202
+ }
203
+ throw new errors_js_1.UserInputValidationError("Either address or name must be provided");
204
+ })();
205
+ return (0, export_js_1.decryptWithPrivateKey)(privateKey, encryptedPrivateKey);
206
+ }
207
+ catch (error) {
208
+ if (!(error instanceof errors_js_1.UserInputValidationError)) {
209
+ analytics_js_1.Analytics.trackError(error, "exportAccount");
192
210
  }
193
- throw new errors_js_1.UserInputValidationError("Either address or name must be provided");
194
- })();
195
- return (0, export_js_1.decryptWithPrivateKey)(privateKey, encryptedPrivateKey);
211
+ throw error;
212
+ }
196
213
  }
197
214
  /**
198
215
  * Creates a new CDP EVM smart account.
@@ -244,7 +261,13 @@ class EvmClient {
244
261
  action: "create_smart_account",
245
262
  accountType: "evm_smart",
246
263
  });
247
- return this._createSmartAccountInternal(options);
264
+ try {
265
+ return await this._createSmartAccountInternal(options);
266
+ }
267
+ catch (error) {
268
+ analytics_js_1.Analytics.trackError(error, "createSmartAccount");
269
+ throw error;
270
+ }
248
271
  }
249
272
  /**
250
273
  * Creates a spend permission for a smart account.
@@ -267,29 +290,35 @@ class EvmClient {
267
290
  analytics_js_1.Analytics.trackAction({
268
291
  action: "create_spend_permission",
269
292
  });
270
- const resolvedSpendPermission = (0, resolveSpendPermission_js_1.resolveSpendPermission)(options.spendPermission, options.network);
271
- const userOperation = await index_js_1.CdpOpenApiClient.createSpendPermission(resolvedSpendPermission.account, {
272
- spender: resolvedSpendPermission.spender,
273
- token: resolvedSpendPermission.token,
274
- allowance: resolvedSpendPermission.allowance.toString(),
275
- period: resolvedSpendPermission.period.toString(),
276
- start: resolvedSpendPermission.start.toString(),
277
- end: resolvedSpendPermission.end.toString(),
278
- salt: resolvedSpendPermission.salt.toString(),
279
- extraData: resolvedSpendPermission.extraData,
280
- network: options.network,
281
- paymasterUrl: options.paymasterUrl,
282
- }, options.idempotencyKey);
283
- return {
284
- network: userOperation.network,
285
- userOpHash: userOperation.userOpHash,
286
- status: userOperation.status,
287
- calls: userOperation.calls.map(call => ({
288
- to: call.to,
289
- value: BigInt(call.value),
290
- data: call.data,
291
- })),
292
- };
293
+ try {
294
+ const resolvedSpendPermission = (0, resolveSpendPermission_js_1.resolveSpendPermission)(options.spendPermission, options.network);
295
+ const userOperation = await index_js_1.CdpOpenApiClient.createSpendPermission(resolvedSpendPermission.account, {
296
+ spender: resolvedSpendPermission.spender,
297
+ token: resolvedSpendPermission.token,
298
+ allowance: resolvedSpendPermission.allowance.toString(),
299
+ period: resolvedSpendPermission.period.toString(),
300
+ start: resolvedSpendPermission.start.toString(),
301
+ end: resolvedSpendPermission.end.toString(),
302
+ salt: resolvedSpendPermission.salt.toString(),
303
+ extraData: resolvedSpendPermission.extraData,
304
+ network: options.network,
305
+ paymasterUrl: options.paymasterUrl,
306
+ }, options.idempotencyKey);
307
+ return {
308
+ network: userOperation.network,
309
+ userOpHash: userOperation.userOpHash,
310
+ status: userOperation.status,
311
+ calls: userOperation.calls.map(call => ({
312
+ to: call.to,
313
+ value: BigInt(call.value),
314
+ data: call.data,
315
+ })),
316
+ };
317
+ }
318
+ catch (error) {
319
+ analytics_js_1.Analytics.trackError(error, "createSpendPermission");
320
+ throw error;
321
+ }
293
322
  }
294
323
  /**
295
324
  * Revokes a spend permission for a smart account.
@@ -315,21 +344,27 @@ class EvmClient {
315
344
  analytics_js_1.Analytics.trackAction({
316
345
  action: "revoke_spend_permission",
317
346
  });
318
- const userOperation = await index_js_1.CdpOpenApiClient.revokeSpendPermission(options.address, {
319
- network: options.network,
320
- permissionHash: options.permissionHash,
321
- paymasterUrl: options.paymasterUrl,
322
- }, options.idempotencyKey);
323
- return {
324
- network: userOperation.network,
325
- userOpHash: userOperation.userOpHash,
326
- status: userOperation.status,
327
- calls: userOperation.calls.map(call => ({
328
- to: call.to,
329
- value: BigInt(call.value),
330
- data: call.data,
331
- })),
332
- };
347
+ try {
348
+ const userOperation = await index_js_1.CdpOpenApiClient.revokeSpendPermission(options.address, {
349
+ network: options.network,
350
+ permissionHash: options.permissionHash,
351
+ paymasterUrl: options.paymasterUrl,
352
+ }, options.idempotencyKey);
353
+ return {
354
+ network: userOperation.network,
355
+ userOpHash: userOperation.userOpHash,
356
+ status: userOperation.status,
357
+ calls: userOperation.calls.map(call => ({
358
+ to: call.to,
359
+ value: BigInt(call.value),
360
+ data: call.data,
361
+ })),
362
+ };
363
+ }
364
+ catch (error) {
365
+ analytics_js_1.Analytics.trackError(error, "revokeSpendPermission");
366
+ throw error;
367
+ }
333
368
  }
334
369
  /**
335
370
  * Gets a CDP EVM account.
@@ -361,7 +396,13 @@ class EvmClient {
361
396
  action: "get_account",
362
397
  accountType: "evm_server",
363
398
  });
364
- return this._getAccountInternal(options);
399
+ try {
400
+ return await this._getAccountInternal(options);
401
+ }
402
+ catch (error) {
403
+ analytics_js_1.Analytics.trackError(error, "getAccount");
404
+ throw error;
405
+ }
365
406
  }
366
407
  /**
367
408
  * Gets a CDP EVM smart account.
@@ -389,7 +430,13 @@ class EvmClient {
389
430
  analytics_js_1.Analytics.trackAction({
390
431
  action: "get_smart_account",
391
432
  });
392
- return this._getSmartAccountInternal(options);
433
+ try {
434
+ return await this._getSmartAccountInternal(options);
435
+ }
436
+ catch (error) {
437
+ analytics_js_1.Analytics.trackError(error, "getSmartAccount");
438
+ throw error;
439
+ }
393
440
  }
394
441
  /**
395
442
  * Gets a CDP EVM account, or creates one if it doesn't exist.
@@ -412,27 +459,33 @@ class EvmClient {
412
459
  accountType: "evm_server",
413
460
  });
414
461
  try {
415
- const account = await this._getAccountInternal(options);
416
- return account;
417
- }
418
- catch (error) {
419
- // If it failed because the account doesn't exist, create it
420
- const doesAccountNotExist = error instanceof errors_js_2.APIError && error.statusCode === 404;
421
- if (doesAccountNotExist) {
422
- try {
423
- const account = await this._createAccountInternal(options);
424
- return account;
425
- }
426
- catch (error) {
427
- // If it failed because the account already exists, get the existing account
428
- const doesAccountAlreadyExist = error instanceof errors_js_2.APIError && error.statusCode === 409;
429
- if (doesAccountAlreadyExist) {
430
- const account = await this._getAccountInternal(options);
462
+ try {
463
+ const account = await this._getAccountInternal(options);
464
+ return account;
465
+ }
466
+ catch (error) {
467
+ // If it failed because the account doesn't exist, create it
468
+ const doesAccountNotExist = error instanceof errors_js_2.APIError && error.statusCode === 404;
469
+ if (doesAccountNotExist) {
470
+ try {
471
+ const account = await this._createAccountInternal(options);
431
472
  return account;
432
473
  }
433
- throw error;
474
+ catch (error) {
475
+ // If it failed because the account already exists, get the existing account
476
+ const doesAccountAlreadyExist = error instanceof errors_js_2.APIError && error.statusCode === 409;
477
+ if (doesAccountAlreadyExist) {
478
+ const account = await this._getAccountInternal(options);
479
+ return account;
480
+ }
481
+ throw error;
482
+ }
434
483
  }
484
+ throw error;
435
485
  }
486
+ }
487
+ catch (error) {
488
+ analytics_js_1.Analytics.trackError(error, "getOrCreateAccount");
436
489
  throw error;
437
490
  }
438
491
  }
@@ -461,27 +514,33 @@ class EvmClient {
461
514
  accountType: "evm_smart",
462
515
  });
463
516
  try {
464
- const account = await this._getSmartAccountInternal(options);
465
- return account;
466
- }
467
- catch (error) {
468
- // If it failed because the account doesn't exist, create it
469
- const doesAccountNotExist = error instanceof errors_js_2.APIError && error.statusCode === 404;
470
- if (doesAccountNotExist) {
471
- try {
472
- const account = await this._createSmartAccountInternal(options);
473
- return account;
474
- }
475
- catch (error) {
476
- // If it failed because the account already exists, get the existing account
477
- const doesAccountAlreadyExist = error instanceof errors_js_2.APIError && error.statusCode === 409;
478
- if (doesAccountAlreadyExist) {
479
- const account = await this._getSmartAccountInternal(options);
517
+ try {
518
+ const account = await this._getSmartAccountInternal(options);
519
+ return account;
520
+ }
521
+ catch (error) {
522
+ // If it failed because the account doesn't exist, create it
523
+ const doesAccountNotExist = error instanceof errors_js_2.APIError && error.statusCode === 404;
524
+ if (doesAccountNotExist) {
525
+ try {
526
+ const account = await this._createSmartAccountInternal(options);
480
527
  return account;
481
528
  }
482
- throw error;
529
+ catch (error) {
530
+ // If it failed because the account already exists, get the existing account
531
+ const doesAccountAlreadyExist = error instanceof errors_js_2.APIError && error.statusCode === 409;
532
+ if (doesAccountAlreadyExist) {
533
+ const account = await this._getSmartAccountInternal(options);
534
+ return account;
535
+ }
536
+ throw error;
537
+ }
483
538
  }
539
+ throw error;
484
540
  }
541
+ }
542
+ catch (error) {
543
+ analytics_js_1.Analytics.trackError(error, "getOrCreateSmartAccount");
485
544
  throw error;
486
545
  }
487
546
  }
@@ -510,7 +569,13 @@ class EvmClient {
510
569
  network: options.network,
511
570
  },
512
571
  });
513
- return (0, getSwapPrice_js_1.getSwapPrice)(index_js_1.CdpOpenApiClient, options);
572
+ try {
573
+ return await (0, getSwapPrice_js_1.getSwapPrice)(index_js_1.CdpOpenApiClient, options);
574
+ }
575
+ catch (error) {
576
+ analytics_js_1.Analytics.trackError(error, "getSwapPrice");
577
+ throw error;
578
+ }
514
579
  }
515
580
  /**
516
581
  * Creates a quote for a swap between two tokens on an EVM network.
@@ -537,7 +602,13 @@ class EvmClient {
537
602
  network: options.network,
538
603
  },
539
604
  });
540
- return (0, createSwapQuote_js_1.createSwapQuote)(index_js_1.CdpOpenApiClient, options);
605
+ try {
606
+ return await (0, createSwapQuote_js_1.createSwapQuote)(index_js_1.CdpOpenApiClient, options);
607
+ }
608
+ catch (error) {
609
+ analytics_js_1.Analytics.trackError(error, "createSwapQuote");
610
+ throw error;
611
+ }
541
612
  }
542
613
  /**
543
614
  * Gets a user operation for a smart account by user operation hash.
@@ -560,7 +631,13 @@ class EvmClient {
560
631
  analytics_js_1.Analytics.trackAction({
561
632
  action: "get_user_operation",
562
633
  });
563
- return (0, getUserOperation_js_1.getUserOperation)(index_js_1.CdpOpenApiClient, options);
634
+ try {
635
+ return await (0, getUserOperation_js_1.getUserOperation)(index_js_1.CdpOpenApiClient, options);
636
+ }
637
+ catch (error) {
638
+ analytics_js_1.Analytics.trackError(error, "getUserOperation");
639
+ throw error;
640
+ }
564
641
  }
565
642
  /**
566
643
  * Lists CDP EVM accounts.
@@ -591,20 +668,25 @@ class EvmClient {
591
668
  action: "list_accounts",
592
669
  accountType: "evm_server",
593
670
  });
594
- const ethAccounts = await index_js_1.CdpOpenApiClient.listEvmAccounts({
595
- pageSize: options.pageSize,
596
- pageToken: options.pageToken,
597
- });
598
- return {
599
- accounts: ethAccounts.accounts.map(account => {
600
- const evmAccount = (0, toEvmServerAccount_js_1.toEvmServerAccount)(index_js_1.CdpOpenApiClient, {
601
- account,
602
- });
603
- analytics_js_1.Analytics.wrapObjectMethodsWithErrorTracking(evmAccount);
604
- return evmAccount;
605
- }),
606
- nextPageToken: ethAccounts.nextPageToken,
607
- };
671
+ try {
672
+ const ethAccounts = await index_js_1.CdpOpenApiClient.listEvmAccounts({
673
+ pageSize: options.pageSize,
674
+ pageToken: options.pageToken,
675
+ });
676
+ return {
677
+ accounts: ethAccounts.accounts.map(account => {
678
+ const evmAccount = (0, toEvmServerAccount_js_1.toEvmServerAccount)(index_js_1.CdpOpenApiClient, {
679
+ account,
680
+ });
681
+ return evmAccount;
682
+ }),
683
+ nextPageToken: ethAccounts.nextPageToken,
684
+ };
685
+ }
686
+ catch (error) {
687
+ analytics_js_1.Analytics.trackError(error, "listAccounts");
688
+ throw error;
689
+ }
608
690
  }
609
691
  /**
610
692
  * Lists CDP EVM token balances.
@@ -647,7 +729,13 @@ class EvmClient {
647
729
  network: options.network,
648
730
  },
649
731
  });
650
- return (0, listTokenBalances_js_1.listTokenBalances)(index_js_1.CdpOpenApiClient, options);
732
+ try {
733
+ return await (0, listTokenBalances_js_1.listTokenBalances)(index_js_1.CdpOpenApiClient, options);
734
+ }
735
+ catch (error) {
736
+ analytics_js_1.Analytics.trackError(error, "listTokenBalances");
737
+ throw error;
738
+ }
651
739
  }
652
740
  /**
653
741
  * Lists CDP EVM smart accounts.
@@ -677,19 +765,25 @@ class EvmClient {
677
765
  analytics_js_1.Analytics.trackAction({
678
766
  action: "list_smart_accounts",
679
767
  });
680
- const smartAccounts = await index_js_1.CdpOpenApiClient.listEvmSmartAccounts({
681
- pageSize: options.pageSize,
682
- pageToken: options.pageToken,
683
- });
684
- return {
685
- accounts: smartAccounts.accounts.map(account => ({
686
- address: account.address,
687
- owners: [account.owners[0]],
688
- type: "evm-smart",
689
- policies: account.policies,
690
- })),
691
- nextPageToken: smartAccounts.nextPageToken,
692
- };
768
+ try {
769
+ const smartAccounts = await index_js_1.CdpOpenApiClient.listEvmSmartAccounts({
770
+ pageSize: options.pageSize,
771
+ pageToken: options.pageToken,
772
+ });
773
+ return {
774
+ accounts: smartAccounts.accounts.map(account => ({
775
+ address: account.address,
776
+ owners: [account.owners[0]],
777
+ type: "evm-smart",
778
+ policies: account.policies,
779
+ })),
780
+ nextPageToken: smartAccounts.nextPageToken,
781
+ };
782
+ }
783
+ catch (error) {
784
+ analytics_js_1.Analytics.trackError(error, "listSmartAccounts");
785
+ throw error;
786
+ }
693
787
  }
694
788
  /**
695
789
  * Lists the spend permissions for a smart account.
@@ -705,7 +799,13 @@ class EvmClient {
705
799
  analytics_js_1.Analytics.trackAction({
706
800
  action: "list_spend_permissions",
707
801
  });
708
- return (0, listSpendPermissions_js_1.listSpendPermissions)(index_js_1.CdpOpenApiClient, options);
802
+ try {
803
+ return await (0, listSpendPermissions_js_1.listSpendPermissions)(index_js_1.CdpOpenApiClient, options);
804
+ }
805
+ catch (error) {
806
+ analytics_js_1.Analytics.trackError(error, "listSpendPermissions");
807
+ throw error;
808
+ }
709
809
  }
710
810
  /**
711
811
  * Prepares a user operation for a smart account.
@@ -740,27 +840,33 @@ class EvmClient {
740
840
  network: options.network,
741
841
  },
742
842
  });
743
- const userOp = await index_js_1.CdpOpenApiClient.prepareUserOperation(options.smartAccount.address, {
744
- network: options.network,
745
- calls: options.calls.map(call => ({
746
- to: call.to,
747
- value: call.value.toString(),
748
- data: call.data,
749
- overrideGasLimit: call.overrideGasLimit,
750
- })),
751
- paymasterUrl: options.paymasterUrl,
752
- dataSuffix: options.dataSuffix,
753
- });
754
- return {
755
- network: userOp.network,
756
- userOpHash: userOp.userOpHash,
757
- status: userOp.status,
758
- calls: userOp.calls.map(call => ({
759
- to: call.to,
760
- value: BigInt(call.value),
761
- data: call.data,
762
- })),
763
- };
843
+ try {
844
+ const userOp = await index_js_1.CdpOpenApiClient.prepareUserOperation(options.smartAccount.address, {
845
+ network: options.network,
846
+ calls: options.calls.map(call => ({
847
+ to: call.to,
848
+ value: call.value.toString(),
849
+ data: call.data,
850
+ overrideGasLimit: call.overrideGasLimit,
851
+ })),
852
+ paymasterUrl: options.paymasterUrl,
853
+ dataSuffix: options.dataSuffix,
854
+ });
855
+ return {
856
+ network: userOp.network,
857
+ userOpHash: userOp.userOpHash,
858
+ status: userOp.status,
859
+ calls: userOp.calls.map(call => ({
860
+ to: call.to,
861
+ value: BigInt(call.value),
862
+ data: call.data,
863
+ })),
864
+ };
865
+ }
866
+ catch (error) {
867
+ analytics_js_1.Analytics.trackError(error, "prepareUserOperation");
868
+ throw error;
869
+ }
764
870
  }
765
871
  /**
766
872
  * Prepares and sends a user operation for a smart account.
@@ -795,20 +901,26 @@ class EvmClient {
795
901
  network: options.network,
796
902
  },
797
903
  });
798
- const userOp = await index_js_1.CdpOpenApiClient.prepareAndSendUserOperation(options.smartAccount.address, {
799
- network: options.network,
800
- calls: options.calls.map(call => ({
801
- to: call.to,
802
- value: call.value.toString(),
803
- data: call.data,
804
- })),
805
- paymasterUrl: options.paymasterUrl,
806
- }, options.idempotencyKey);
807
- return {
808
- smartAccountAddress: options.smartAccount.address,
809
- userOpHash: userOp.userOpHash,
810
- status: userOp.status,
811
- };
904
+ try {
905
+ const userOp = await index_js_1.CdpOpenApiClient.prepareAndSendUserOperation(options.smartAccount.address, {
906
+ network: options.network,
907
+ calls: options.calls.map(call => ({
908
+ to: call.to,
909
+ value: call.value.toString(),
910
+ data: call.data,
911
+ })),
912
+ paymasterUrl: options.paymasterUrl,
913
+ }, options.idempotencyKey);
914
+ return {
915
+ smartAccountAddress: options.smartAccount.address,
916
+ userOpHash: userOp.userOpHash,
917
+ status: userOp.status,
918
+ };
919
+ }
920
+ catch (error) {
921
+ analytics_js_1.Analytics.trackError(error, "prepareAndSendUserOperation");
922
+ throw error;
923
+ }
812
924
  }
813
925
  /**
814
926
  * Requests funds from an EVM faucet.
@@ -837,7 +949,13 @@ class EvmClient {
837
949
  network: options.network,
838
950
  },
839
951
  });
840
- return (0, requestFaucet_js_1.requestFaucet)(index_js_1.CdpOpenApiClient, options);
952
+ try {
953
+ return await (0, requestFaucet_js_1.requestFaucet)(index_js_1.CdpOpenApiClient, options);
954
+ }
955
+ catch (error) {
956
+ analytics_js_1.Analytics.trackError(error, "requestFaucet");
957
+ throw error;
958
+ }
841
959
  }
842
960
  /**
843
961
  * Signs an EVM transaction and sends it to the specified network using the Coinbase API.
@@ -892,7 +1010,13 @@ class EvmClient {
892
1010
  network: options.network,
893
1011
  },
894
1012
  });
895
- return (0, sendTransaction_js_1.sendTransaction)(index_js_1.CdpOpenApiClient, options);
1013
+ try {
1014
+ return await (0, sendTransaction_js_1.sendTransaction)(index_js_1.CdpOpenApiClient, options);
1015
+ }
1016
+ catch (error) {
1017
+ analytics_js_1.Analytics.trackError(error, "sendTransaction");
1018
+ throw error;
1019
+ }
896
1020
  }
897
1021
  /**
898
1022
  * Sends a user operation.
@@ -929,14 +1053,20 @@ class EvmClient {
929
1053
  network: options.network,
930
1054
  },
931
1055
  });
932
- return (0, sendUserOperation_js_1.sendUserOperation)(index_js_1.CdpOpenApiClient, {
933
- smartAccount: options.smartAccount,
934
- network: options.network,
935
- calls: options.calls,
936
- paymasterUrl: options.paymasterUrl,
937
- idempotencyKey: options.idempotencyKey,
938
- dataSuffix: options.dataSuffix,
939
- });
1056
+ try {
1057
+ return await (0, sendUserOperation_js_1.sendUserOperation)(index_js_1.CdpOpenApiClient, {
1058
+ smartAccount: options.smartAccount,
1059
+ network: options.network,
1060
+ calls: options.calls,
1061
+ paymasterUrl: options.paymasterUrl,
1062
+ idempotencyKey: options.idempotencyKey,
1063
+ dataSuffix: options.dataSuffix,
1064
+ });
1065
+ }
1066
+ catch (error) {
1067
+ analytics_js_1.Analytics.trackError(error, "sendUserOperation");
1068
+ throw error;
1069
+ }
940
1070
  }
941
1071
  /**
942
1072
  * Signs an EVM hash.
@@ -963,12 +1093,18 @@ class EvmClient {
963
1093
  analytics_js_1.Analytics.trackAction({
964
1094
  action: "sign_hash",
965
1095
  });
966
- const signature = await index_js_1.CdpOpenApiClient.signEvmHash(options.address, {
967
- hash: options.hash,
968
- }, options.idempotencyKey);
969
- return {
970
- signature: signature.signature,
971
- };
1096
+ try {
1097
+ const signature = await index_js_1.CdpOpenApiClient.signEvmHash(options.address, {
1098
+ hash: options.hash,
1099
+ }, options.idempotencyKey);
1100
+ return {
1101
+ signature: signature.signature,
1102
+ };
1103
+ }
1104
+ catch (error) {
1105
+ analytics_js_1.Analytics.trackError(error, "signHash");
1106
+ throw error;
1107
+ }
972
1108
  }
973
1109
  /**
974
1110
  * Signs an EIP-191 message.
@@ -995,12 +1131,18 @@ class EvmClient {
995
1131
  analytics_js_1.Analytics.trackAction({
996
1132
  action: "sign_message",
997
1133
  });
998
- const signature = await index_js_1.CdpOpenApiClient.signEvmMessage(options.address, {
999
- message: options.message,
1000
- }, options.idempotencyKey);
1001
- return {
1002
- signature: signature.signature,
1003
- };
1134
+ try {
1135
+ const signature = await index_js_1.CdpOpenApiClient.signEvmMessage(options.address, {
1136
+ message: options.message,
1137
+ }, options.idempotencyKey);
1138
+ return {
1139
+ signature: signature.signature,
1140
+ };
1141
+ }
1142
+ catch (error) {
1143
+ analytics_js_1.Analytics.trackError(error, "signMessage");
1144
+ throw error;
1145
+ }
1004
1146
  }
1005
1147
  /**
1006
1148
  * Signs an EIP-712 message.
@@ -1051,21 +1193,27 @@ class EvmClient {
1051
1193
  analytics_js_1.Analytics.trackAction({
1052
1194
  action: "sign_typed_data",
1053
1195
  });
1054
- const { domain, message, primaryType } = options;
1055
- const types = {
1056
- EIP712Domain: (0, viem_1.getTypesForEIP712Domain)({ domain }),
1057
- ...options.types,
1058
- };
1059
- const openApiMessage = {
1060
- domain,
1061
- types,
1062
- primaryType,
1063
- message,
1064
- };
1065
- const signature = await index_js_1.CdpOpenApiClient.signEvmTypedData(options.address, openApiMessage, options.idempotencyKey);
1066
- return {
1067
- signature: signature.signature,
1068
- };
1196
+ try {
1197
+ const { domain, message, primaryType } = options;
1198
+ const types = {
1199
+ EIP712Domain: (0, viem_1.getTypesForEIP712Domain)({ domain }),
1200
+ ...options.types,
1201
+ };
1202
+ const openApiMessage = {
1203
+ domain,
1204
+ types,
1205
+ primaryType,
1206
+ message,
1207
+ };
1208
+ const signature = await index_js_1.CdpOpenApiClient.signEvmTypedData(options.address, openApiMessage, options.idempotencyKey);
1209
+ return {
1210
+ signature: signature.signature,
1211
+ };
1212
+ }
1213
+ catch (error) {
1214
+ analytics_js_1.Analytics.trackError(error, "signTypedData");
1215
+ throw error;
1216
+ }
1069
1217
  }
1070
1218
  /**
1071
1219
  * Signs an EVM transaction.
@@ -1101,12 +1249,18 @@ class EvmClient {
1101
1249
  analytics_js_1.Analytics.trackAction({
1102
1250
  action: "sign_transaction",
1103
1251
  });
1104
- const signature = await index_js_1.CdpOpenApiClient.signEvmTransaction(options.address, {
1105
- transaction: options.transaction,
1106
- }, options.idempotencyKey);
1107
- return {
1108
- signature: signature.signedTransaction,
1109
- };
1252
+ try {
1253
+ const signature = await index_js_1.CdpOpenApiClient.signEvmTransaction(options.address, {
1254
+ transaction: options.transaction,
1255
+ }, options.idempotencyKey);
1256
+ return {
1257
+ signature: signature.signedTransaction,
1258
+ };
1259
+ }
1260
+ catch (error) {
1261
+ analytics_js_1.Analytics.trackError(error, "signTransaction");
1262
+ throw error;
1263
+ }
1110
1264
  }
1111
1265
  /**
1112
1266
  * Updates a CDP EVM account.
@@ -1153,12 +1307,17 @@ class EvmClient {
1153
1307
  analytics_js_1.Analytics.trackAction({
1154
1308
  action: "update_account",
1155
1309
  });
1156
- const openApiAccount = await index_js_1.CdpOpenApiClient.updateEvmAccount(options.address, options.update, options.idempotencyKey);
1157
- const account = (0, toEvmServerAccount_js_1.toEvmServerAccount)(index_js_1.CdpOpenApiClient, {
1158
- account: openApiAccount,
1159
- });
1160
- analytics_js_1.Analytics.wrapObjectMethodsWithErrorTracking(account);
1161
- return account;
1310
+ try {
1311
+ const openApiAccount = await index_js_1.CdpOpenApiClient.updateEvmAccount(options.address, options.update, options.idempotencyKey);
1312
+ const account = (0, toEvmServerAccount_js_1.toEvmServerAccount)(index_js_1.CdpOpenApiClient, {
1313
+ account: openApiAccount,
1314
+ });
1315
+ return account;
1316
+ }
1317
+ catch (error) {
1318
+ analytics_js_1.Analytics.trackError(error, "updateAccount");
1319
+ throw error;
1320
+ }
1162
1321
  }
1163
1322
  /**
1164
1323
  * Updates a CDP EVM smart account.
@@ -1176,13 +1335,107 @@ class EvmClient {
1176
1335
  analytics_js_1.Analytics.trackAction({
1177
1336
  action: "update_smart_account",
1178
1337
  });
1179
- const openApiSmartAccount = await index_js_1.CdpOpenApiClient.updateEvmSmartAccount(options.address, options.update, options.idempotencyKey);
1180
- const smartAccount = (0, toEvmSmartAccount_js_1.toEvmSmartAccount)(index_js_1.CdpOpenApiClient, {
1181
- smartAccount: openApiSmartAccount,
1182
- owner: options.owner,
1338
+ try {
1339
+ const openApiSmartAccount = await index_js_1.CdpOpenApiClient.updateEvmSmartAccount(options.address, options.update, options.idempotencyKey);
1340
+ const smartAccount = (0, toEvmSmartAccount_js_1.toEvmSmartAccount)(index_js_1.CdpOpenApiClient, {
1341
+ smartAccount: openApiSmartAccount,
1342
+ owner: options.owner,
1343
+ });
1344
+ return smartAccount;
1345
+ }
1346
+ catch (error) {
1347
+ analytics_js_1.Analytics.trackError(error, "updateSmartAccount");
1348
+ throw error;
1349
+ }
1350
+ }
1351
+ /**
1352
+ * Creates an EIP-7702 delegation for an EVM EOA account, upgrading it with smart account capabilities.
1353
+ * The delegation allows the EVM EOA to be used as a smart account, which enables batched transactions and gas sponsorship via paymaster.
1354
+ *
1355
+ * @param {CreateEvmEip7702DelegationOptions} options - The delegation parameters (address and network required, enableSpendPermissions and idempotencyKey optional).
1356
+ * @returns A promise that resolves to the delegation result including the delegation operation ID.
1357
+ *
1358
+ * @example
1359
+ * ```ts
1360
+ * const result = await cdp.evm.createEvmEip7702Delegation({
1361
+ * address: account.address,
1362
+ * network: "base-sepolia",
1363
+ * enableSpendPermissions: false,
1364
+ * });
1365
+ * console.log(result.delegationOperationId);
1366
+ * ```
1367
+ */
1368
+ async createEvmEip7702Delegation(options) {
1369
+ analytics_js_1.Analytics.trackAction({
1370
+ action: "create_eip7702_delegation",
1183
1371
  });
1184
- analytics_js_1.Analytics.wrapObjectMethodsWithErrorTracking(smartAccount);
1185
- return smartAccount;
1372
+ try {
1373
+ const { address, network, enableSpendPermissions, idempotencyKey } = options;
1374
+ const body = {
1375
+ network,
1376
+ ...(enableSpendPermissions !== undefined && { enableSpendPermissions }),
1377
+ };
1378
+ return await index_js_1.CdpOpenApiClient.createEvmEip7702Delegation(address, body, idempotencyKey);
1379
+ }
1380
+ catch (error) {
1381
+ analytics_js_1.Analytics.trackError(error, "createEvmEip7702Delegation");
1382
+ throw error;
1383
+ }
1384
+ }
1385
+ /**
1386
+ * Gets the EIP-7702 delegation operation status.
1387
+ *
1388
+ * @param {string} delegationOperationId - The delegation operation ID returned by createEvmEip7702Delegation.
1389
+ * @returns A promise that resolves to the delegation operation status.
1390
+ *
1391
+ * @example
1392
+ * ```ts
1393
+ * const operation = await cdp.evm.getEvmEip7702DelegationOperationById(
1394
+ * "delegation-op-123",
1395
+ * );
1396
+ * console.log(operation.status); // "PENDING" | "SUBMITTED" | "COMPLETED" | "FAILED"
1397
+ * ```
1398
+ */
1399
+ async getEvmEip7702DelegationOperationById(delegationOperationId) {
1400
+ analytics_js_1.Analytics.trackAction({
1401
+ action: "get_eip7702_delegation_operation_by_id",
1402
+ });
1403
+ try {
1404
+ return await index_js_1.CdpOpenApiClient.getEvmEip7702DelegationOperationById(delegationOperationId);
1405
+ }
1406
+ catch (error) {
1407
+ analytics_js_1.Analytics.trackError(error, "getEvmEip7702DelegationOperationById");
1408
+ throw error;
1409
+ }
1410
+ }
1411
+ /**
1412
+ * Polls the EIP-7702 delegation operation status until the status is COMPLETED or a timeout occurs.
1413
+ *
1414
+ * @param {WaitForEvmEip7702DelegationOperationStatusOptions} options - Parameters for waiting, including delegationOperationId and optional wait configuration.
1415
+ * @param {string} options.delegationOperationId - The delegation operation ID returned by createEvmEip7702Delegation.
1416
+ * @param {WaitOptions} [options.waitOptions] - Optional parameters for the wait operation.
1417
+ *
1418
+ * @returns A promise that resolves to the delegation operation once it reaches COMPLETED.
1419
+ *
1420
+ * @example
1421
+ * ```ts
1422
+ * const operation = await cdp.evm.waitForEvmEip7702DelegationOperationStatus({
1423
+ * delegationOperationId: "delegation-op-123",
1424
+ * });
1425
+ * console.log(operation.status); // "COMPLETED"
1426
+ * ```
1427
+ */
1428
+ async waitForEvmEip7702DelegationOperationStatus(options) {
1429
+ analytics_js_1.Analytics.trackAction({
1430
+ action: "wait_for_eip7702_delegation_operation_status",
1431
+ });
1432
+ try {
1433
+ return await (0, waitForEvmEip7702DelegationStatus_js_1.waitForEvmEip7702DelegationOperationStatus)(index_js_1.CdpOpenApiClient, options);
1434
+ }
1435
+ catch (error) {
1436
+ analytics_js_1.Analytics.trackError(error, "waitForEvmEip7702DelegationOperationStatus");
1437
+ throw error;
1438
+ }
1186
1439
  }
1187
1440
  /**
1188
1441
  * Waits for a user operation to complete or fail.
@@ -1220,9 +1473,15 @@ class EvmClient {
1220
1473
  analytics_js_1.Analytics.trackAction({
1221
1474
  action: "wait_for_user_operation",
1222
1475
  });
1223
- return (0, waitForUserOperation_js_1.waitForUserOperation)(index_js_1.CdpOpenApiClient, {
1224
- ...options,
1225
- });
1476
+ try {
1477
+ return await (0, waitForUserOperation_js_1.waitForUserOperation)(index_js_1.CdpOpenApiClient, {
1478
+ ...options,
1479
+ });
1480
+ }
1481
+ catch (error) {
1482
+ analytics_js_1.Analytics.trackError(error, "waitForUserOperation");
1483
+ throw error;
1484
+ }
1226
1485
  }
1227
1486
  /**
1228
1487
  * Internal method to create an account without tracking analytics.
@@ -1239,7 +1498,6 @@ class EvmClient {
1239
1498
  const account = (0, toEvmServerAccount_js_1.toEvmServerAccount)(index_js_1.CdpOpenApiClient, {
1240
1499
  account: openApiAccount,
1241
1500
  });
1242
- analytics_js_1.Analytics.wrapObjectMethodsWithErrorTracking(account);
1243
1501
  return account;
1244
1502
  }
1245
1503
  /**
@@ -1262,7 +1520,6 @@ class EvmClient {
1262
1520
  const account = (0, toEvmServerAccount_js_1.toEvmServerAccount)(index_js_1.CdpOpenApiClient, {
1263
1521
  account: openApiAccount,
1264
1522
  });
1265
- analytics_js_1.Analytics.wrapObjectMethodsWithErrorTracking(account);
1266
1523
  return account;
1267
1524
  }
1268
1525
  /**
@@ -1285,7 +1542,6 @@ class EvmClient {
1285
1542
  smartAccount: openApiSmartAccount,
1286
1543
  owner: options.owner,
1287
1544
  });
1288
- analytics_js_1.Analytics.wrapObjectMethodsWithErrorTracking(smartAccount);
1289
1545
  return smartAccount;
1290
1546
  }
1291
1547
  /**
@@ -1316,7 +1572,6 @@ Provided Owner Address: ${options.owner.address}\n`);
1316
1572
  smartAccount: openApiSmartAccount,
1317
1573
  owner: options.owner,
1318
1574
  });
1319
- analytics_js_1.Analytics.wrapObjectMethodsWithErrorTracking(smartAccount);
1320
1575
  return smartAccount;
1321
1576
  }
1322
1577
  }