@coinbase/cdp-sdk 1.49.1 → 1.50.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/CHANGELOG.md +12 -0
- package/_cjs/client/end-user/endUser.js +21 -42
- package/_cjs/client/end-user/endUser.js.map +1 -1
- package/_cjs/client/end-user/toEndUserAccount.js +18 -43
- package/_cjs/client/end-user/toEndUserAccount.js.map +1 -1
- package/_cjs/version.js +1 -1
- package/_esm/client/end-user/endUser.js +21 -42
- package/_esm/client/end-user/endUser.js.map +1 -1
- package/_esm/client/end-user/toEndUserAccount.js +18 -43
- package/_esm/client/end-user/toEndUserAccount.js.map +1 -1
- package/_esm/version.js +1 -1
- package/_types/client/end-user/endUser.d.ts.map +1 -1
- package/_types/client/end-user/endUser.types.d.ts +63 -4
- package/_types/client/end-user/endUser.types.d.ts.map +1 -1
- package/_types/client/end-user/toEndUserAccount.d.ts.map +1 -1
- package/_types/version.d.ts +1 -1
- package/client/end-user/endUser.ts +113 -69
- package/client/end-user/endUser.types.ts +63 -4
- package/client/end-user/toEndUserAccount.ts +103 -64
- package/package.json +2 -2
- package/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# CDP SDK Changelog
|
|
2
2
|
|
|
3
|
+
## 1.50.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#713](https://github.com/coinbase/cdp-sdk/pull/713) [`db0adb8`](https://github.com/coinbase/cdp-sdk/commit/db0adb801ff8a185aba7c441bb9a3fbd5b4a3ddd) Thanks [@sammccord](https://github.com/sammccord)! - Added idempotencyKey option to all end user operation methods for safe request retries.
|
|
8
|
+
|
|
9
|
+
## 1.49.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#701](https://github.com/coinbase/cdp-sdk/pull/701) [`7439b21`](https://github.com/coinbase/cdp-sdk/commit/7439b21efc6f52c5870144317fefa9498afbc231) Thanks [@sddioulde](https://github.com/sddioulde)! - Updated axios dep to 1.16.0
|
|
14
|
+
|
|
3
15
|
## 1.49.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -51,7 +51,7 @@ class EndUserClient {
|
|
|
51
51
|
const endUser = await index_js_1.CdpOpenApiClient.createEndUser({
|
|
52
52
|
...options,
|
|
53
53
|
userId,
|
|
54
|
-
});
|
|
54
|
+
}, options.idempotencyKey);
|
|
55
55
|
return (0, toEndUserAccount_js_1.toEndUserAccount)(index_js_1.CdpOpenApiClient, { endUser });
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
@@ -139,8 +139,8 @@ class EndUserClient {
|
|
|
139
139
|
analytics_js_1.Analytics.trackAction({
|
|
140
140
|
action: "add_end_user_evm_account",
|
|
141
141
|
});
|
|
142
|
-
const { userId } = options;
|
|
143
|
-
return index_js_1.CdpOpenApiClient.addEndUserEvmAccount(userId, {});
|
|
142
|
+
const { userId, idempotencyKey } = options;
|
|
143
|
+
return index_js_1.CdpOpenApiClient.addEndUserEvmAccount(userId, {}, idempotencyKey);
|
|
144
144
|
}
|
|
145
145
|
/**
|
|
146
146
|
* Adds an EVM smart account to an existing end user. This also creates a new EVM EOA account to serve as the owner of the smart account.
|
|
@@ -171,10 +171,8 @@ class EndUserClient {
|
|
|
171
171
|
analytics_js_1.Analytics.trackAction({
|
|
172
172
|
action: "add_end_user_evm_smart_account",
|
|
173
173
|
});
|
|
174
|
-
const { userId, enableSpendPermissions } = options;
|
|
175
|
-
return index_js_1.CdpOpenApiClient.addEndUserEvmSmartAccount(userId, {
|
|
176
|
-
enableSpendPermissions,
|
|
177
|
-
});
|
|
174
|
+
const { userId, enableSpendPermissions, idempotencyKey } = options;
|
|
175
|
+
return index_js_1.CdpOpenApiClient.addEndUserEvmSmartAccount(userId, { enableSpendPermissions }, idempotencyKey);
|
|
178
176
|
}
|
|
179
177
|
/**
|
|
180
178
|
* Adds a Solana account to an existing end user. End users can have up to 10 Solana accounts.
|
|
@@ -195,8 +193,8 @@ class EndUserClient {
|
|
|
195
193
|
analytics_js_1.Analytics.trackAction({
|
|
196
194
|
action: "add_end_user_solana_account",
|
|
197
195
|
});
|
|
198
|
-
const { userId } = options;
|
|
199
|
-
return index_js_1.CdpOpenApiClient.addEndUserSolanaAccount(userId, {});
|
|
196
|
+
const { userId, idempotencyKey } = options;
|
|
197
|
+
return index_js_1.CdpOpenApiClient.addEndUserSolanaAccount(userId, {}, idempotencyKey);
|
|
200
198
|
}
|
|
201
199
|
/**
|
|
202
200
|
* Gets the active delegation for the specified end user, if one exists.
|
|
@@ -240,8 +238,8 @@ class EndUserClient {
|
|
|
240
238
|
analytics_js_1.Analytics.trackAction({
|
|
241
239
|
action: "revoke_delegation_for_end_user",
|
|
242
240
|
});
|
|
243
|
-
const { userId } = options;
|
|
244
|
-
await index_js_1.CdpOpenApiClient.revokeDelegationForEndUser(userId, {});
|
|
241
|
+
const { userId, idempotencyKey } = options;
|
|
242
|
+
await index_js_1.CdpOpenApiClient.revokeDelegationForEndUser(userId, {}, undefined, idempotencyKey);
|
|
245
243
|
}
|
|
246
244
|
// ─── Account-Scoped Delegation Methods ───
|
|
247
245
|
/**
|
|
@@ -310,10 +308,7 @@ class EndUserClient {
|
|
|
310
308
|
*/
|
|
311
309
|
async signEvmTransaction(options) {
|
|
312
310
|
analytics_js_1.Analytics.trackAction({ action: "end_user_sign_evm_transaction" });
|
|
313
|
-
return index_js_1.CdpOpenApiClient.signEvmTransactionWithEndUserAccount(options.userId, {
|
|
314
|
-
address: options.address,
|
|
315
|
-
transaction: options.transaction,
|
|
316
|
-
});
|
|
311
|
+
return index_js_1.CdpOpenApiClient.signEvmTransactionWithEndUserAccount(options.userId, { address: options.address, transaction: options.transaction }, undefined, options.idempotencyKey);
|
|
317
312
|
}
|
|
318
313
|
/**
|
|
319
314
|
* Signs an EVM message (EIP-191) on behalf of an end user using a delegation.
|
|
@@ -334,10 +329,7 @@ class EndUserClient {
|
|
|
334
329
|
*/
|
|
335
330
|
async signEvmMessage(options) {
|
|
336
331
|
analytics_js_1.Analytics.trackAction({ action: "end_user_sign_evm_message" });
|
|
337
|
-
return index_js_1.CdpOpenApiClient.signEvmMessageWithEndUserAccount(options.userId, {
|
|
338
|
-
address: options.address,
|
|
339
|
-
message: options.message,
|
|
340
|
-
});
|
|
332
|
+
return index_js_1.CdpOpenApiClient.signEvmMessageWithEndUserAccount(options.userId, { address: options.address, message: options.message }, undefined, options.idempotencyKey);
|
|
341
333
|
}
|
|
342
334
|
/**
|
|
343
335
|
* Signs EVM EIP-712 typed data on behalf of an end user using a delegation.
|
|
@@ -358,10 +350,7 @@ class EndUserClient {
|
|
|
358
350
|
*/
|
|
359
351
|
async signEvmTypedData(options) {
|
|
360
352
|
analytics_js_1.Analytics.trackAction({ action: "end_user_sign_evm_typed_data" });
|
|
361
|
-
return index_js_1.CdpOpenApiClient.signEvmTypedDataWithEndUserAccount(options.userId, {
|
|
362
|
-
address: options.address,
|
|
363
|
-
typedData: options.typedData,
|
|
364
|
-
});
|
|
353
|
+
return index_js_1.CdpOpenApiClient.signEvmTypedDataWithEndUserAccount(options.userId, { address: options.address, typedData: options.typedData }, undefined, options.idempotencyKey);
|
|
365
354
|
}
|
|
366
355
|
// ─── Delegated EVM Send Methods ───
|
|
367
356
|
/**
|
|
@@ -384,11 +373,7 @@ class EndUserClient {
|
|
|
384
373
|
*/
|
|
385
374
|
async sendEvmTransaction(options) {
|
|
386
375
|
analytics_js_1.Analytics.trackAction({ action: "end_user_send_evm_transaction" });
|
|
387
|
-
return index_js_1.CdpOpenApiClient.sendEvmTransactionWithEndUserAccount(options.userId, {
|
|
388
|
-
address: options.address,
|
|
389
|
-
transaction: options.transaction,
|
|
390
|
-
network: options.network,
|
|
391
|
-
});
|
|
376
|
+
return index_js_1.CdpOpenApiClient.sendEvmTransactionWithEndUserAccount(options.userId, { address: options.address, transaction: options.transaction, network: options.network }, undefined, options.idempotencyKey);
|
|
392
377
|
}
|
|
393
378
|
/**
|
|
394
379
|
* Sends an EVM asset (e.g. USDC) on behalf of an end user using a delegation.
|
|
@@ -418,7 +403,7 @@ class EndUserClient {
|
|
|
418
403
|
network: options.network,
|
|
419
404
|
useCdpPaymaster: options.useCdpPaymaster,
|
|
420
405
|
paymasterUrl: options.paymasterUrl,
|
|
421
|
-
});
|
|
406
|
+
}, undefined, options.idempotencyKey);
|
|
422
407
|
}
|
|
423
408
|
/**
|
|
424
409
|
* Sends a user operation on behalf of an end user using a delegation.
|
|
@@ -446,7 +431,7 @@ class EndUserClient {
|
|
|
446
431
|
useCdpPaymaster: options.useCdpPaymaster,
|
|
447
432
|
paymasterUrl: options.paymasterUrl,
|
|
448
433
|
dataSuffix: options.dataSuffix,
|
|
449
|
-
});
|
|
434
|
+
}, undefined, options.idempotencyKey);
|
|
450
435
|
}
|
|
451
436
|
// ─── Delegated EVM EIP-7702 Delegation Method ───
|
|
452
437
|
/**
|
|
@@ -472,7 +457,7 @@ class EndUserClient {
|
|
|
472
457
|
address: options.address,
|
|
473
458
|
network: options.network,
|
|
474
459
|
enableSpendPermissions: options.enableSpendPermissions,
|
|
475
|
-
});
|
|
460
|
+
}, undefined, options.idempotencyKey);
|
|
476
461
|
}
|
|
477
462
|
// ─── Delegated Solana Sign Methods ───
|
|
478
463
|
/**
|
|
@@ -494,10 +479,7 @@ class EndUserClient {
|
|
|
494
479
|
*/
|
|
495
480
|
async signSolanaMessage(options) {
|
|
496
481
|
analytics_js_1.Analytics.trackAction({ action: "end_user_sign_solana_message" });
|
|
497
|
-
return index_js_1.CdpOpenApiClient.signSolanaMessageWithEndUserAccount(options.userId, {
|
|
498
|
-
address: options.address,
|
|
499
|
-
message: options.message,
|
|
500
|
-
});
|
|
482
|
+
return index_js_1.CdpOpenApiClient.signSolanaMessageWithEndUserAccount(options.userId, { address: options.address, message: options.message }, undefined, options.idempotencyKey);
|
|
501
483
|
}
|
|
502
484
|
/**
|
|
503
485
|
* Signs a Solana transaction on behalf of an end user using a delegation.
|
|
@@ -518,10 +500,7 @@ class EndUserClient {
|
|
|
518
500
|
*/
|
|
519
501
|
async signSolanaTransaction(options) {
|
|
520
502
|
analytics_js_1.Analytics.trackAction({ action: "end_user_sign_solana_transaction" });
|
|
521
|
-
return index_js_1.CdpOpenApiClient.signSolanaTransactionWithEndUserAccount(options.userId, {
|
|
522
|
-
address: options.address,
|
|
523
|
-
transaction: options.transaction,
|
|
524
|
-
});
|
|
503
|
+
return index_js_1.CdpOpenApiClient.signSolanaTransactionWithEndUserAccount(options.userId, { address: options.address, transaction: options.transaction }, undefined, options.idempotencyKey);
|
|
525
504
|
}
|
|
526
505
|
// ─── Delegated Solana Send Methods ───
|
|
527
506
|
/**
|
|
@@ -548,7 +527,7 @@ class EndUserClient {
|
|
|
548
527
|
address: options.address,
|
|
549
528
|
transaction: options.transaction,
|
|
550
529
|
network: options.network,
|
|
551
|
-
});
|
|
530
|
+
}, undefined, options.idempotencyKey);
|
|
552
531
|
}
|
|
553
532
|
/**
|
|
554
533
|
* Sends a Solana asset (e.g. USDC) on behalf of an end user using a delegation.
|
|
@@ -577,7 +556,7 @@ class EndUserClient {
|
|
|
577
556
|
amount: options.amount,
|
|
578
557
|
network: options.network,
|
|
579
558
|
createRecipientAta: options.createRecipientAta,
|
|
580
|
-
});
|
|
559
|
+
}, undefined, options.idempotencyKey);
|
|
581
560
|
}
|
|
582
561
|
/**
|
|
583
562
|
* Validates an end user's access token. Throws an error if the access token is invalid.
|
|
@@ -670,7 +649,7 @@ class EndUserClient {
|
|
|
670
649
|
authenticationMethods: options.authenticationMethods,
|
|
671
650
|
encryptedPrivateKey: encryptedPrivateKey.toString("base64"),
|
|
672
651
|
keyType: options.keyType,
|
|
673
|
-
});
|
|
652
|
+
}, options.idempotencyKey);
|
|
674
653
|
return (0, toEndUserAccount_js_1.toEndUserAccount)(index_js_1.CdpOpenApiClient, { endUser });
|
|
675
654
|
}
|
|
676
655
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endUser.js","sourceRoot":"","sources":["../../../client/end-user/endUser.ts"],"names":[],"mappings":";;;;;;AAAA,mCAA8D;AAE9D,gDAAwB;AA4CxB,+DAAyD;AACzD,qDAA+C;AAC/C,qDAA+D;AAC/D,+CAA2D;AAC3D,4DAAuF;AAEvF;;GAEG;AACH,MAAa,aAAa;IACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,KAAK,CAAC,aAAa,CAAC,OAA6B;QAC/C,wBAAS,CAAC,WAAW,CAAC;YACpB,MAAM,EAAE,iBAAiB;SAC1B,CAAC,CAAC;QAEH,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,IAAA,mBAAU,GAAE,CAAC;QAE9C,MAAM,OAAO,GAAG,MAAM,2BAAgB,CAAC,aAAa,
|
|
1
|
+
{"version":3,"file":"endUser.js","sourceRoot":"","sources":["../../../client/end-user/endUser.ts"],"names":[],"mappings":";;;;;;AAAA,mCAA8D;AAE9D,gDAAwB;AA4CxB,+DAAyD;AACzD,qDAA+C;AAC/C,qDAA+D;AAC/D,+CAA2D;AAC3D,4DAAuF;AAEvF;;GAEG;AACH,MAAa,aAAa;IACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,KAAK,CAAC,aAAa,CAAC,OAA6B;QAC/C,wBAAS,CAAC,WAAW,CAAC;YACpB,MAAM,EAAE,iBAAiB;SAC1B,CAAC,CAAC;QAEH,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,IAAA,mBAAU,GAAE,CAAC;QAE9C,MAAM,OAAO,GAAG,MAAM,2BAAgB,CAAC,aAAa,CAClD;YACE,GAAG,OAAO;YACV,MAAM;SACP,EACD,OAAO,CAAC,cAAc,CACvB,CAAC;QAEF,OAAO,IAAA,sCAAgB,EAAC,2BAAgB,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IACzD,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACH,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AO,OAAO,CAAC,UAAU,KAAK,QAAQ,EAAE,CAAC;gBAC3C,eAAe,GAAG,cAAI,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;YACpD,CAAC;iBAAM,CAAC;gBACN,eAAe,GAAG,OAAO,CAAC,UAAU,CAAC;YACvC,CAAC;YAED,IAAI,eAAe,CAAC,MAAM,KAAK,EAAE,IAAI,eAAe,CAAC,MAAM,KAAK,EAAE,EAAE,CAAC;gBACnE,MAAM,IAAI,oCAAwB,CAAC,mCAAmC,CAAC,CAAC;YAC1E,CAAC;YAED,gDAAgD;YAChD,IAAI,eAAe,CAAC,MAAM,KAAK,EAAE,EAAE,CAAC;gBAClC,eAAe,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACpD,CAAC;QACH,CAAC;QAED,MAAM,mBAAmB,GAAG,IAAA,sBAAa,EACvC;YACE,GAAG,EAAE,OAAO,CAAC,mBAAmB,IAAI,wCAAyB;YAC7D,OAAO,EAAE,kBAAS,CAAC,sBAAsB;YACzC,QAAQ,EAAE,QAAQ;SACnB,EACD,eAAe,CAChB,CAAC;QAEF,MAAM,OAAO,GAAG,MAAM,2BAAgB,CAAC,aAAa,CAClD;YACE,MAAM;YACN,qBAAqB,EAAE,OAAO,CAAC,qBAAqB;YACpD,mBAAmB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,QAAQ,CAAC;YAC3D,OAAO,EAAE,OAAO,CAAC,OAAO;SACzB,EACD,OAAO,CAAC,cAAc,CACvB,CAAC;QAEF,OAAO,IAAA,sCAAgB,EAAC,2BAAgB,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IACzD,CAAC;CACF;AAzyBD,sCAyyBC"}
|
|
@@ -69,27 +69,25 @@ function toEndUserAccount(apiClient, options) {
|
|
|
69
69
|
solanaAccountObjects: endUser.solanaAccountObjects,
|
|
70
70
|
createdAt: endUser.createdAt,
|
|
71
71
|
// ─── Account Management Methods ───
|
|
72
|
-
async addEvmAccount() {
|
|
72
|
+
async addEvmAccount(idempotencyKey) {
|
|
73
73
|
analytics_js_1.Analytics.trackAction({ action: "end_user_add_evm_account" });
|
|
74
|
-
return apiClient.addEndUserEvmAccount(endUser.userId, {});
|
|
74
|
+
return apiClient.addEndUserEvmAccount(endUser.userId, {}, idempotencyKey);
|
|
75
75
|
},
|
|
76
76
|
async addEvmSmartAccount(smartAccountOptions) {
|
|
77
77
|
analytics_js_1.Analytics.trackAction({ action: "end_user_add_evm_smart_account" });
|
|
78
|
-
return apiClient.addEndUserEvmSmartAccount(endUser.userId, {
|
|
79
|
-
enableSpendPermissions: smartAccountOptions.enableSpendPermissions,
|
|
80
|
-
});
|
|
78
|
+
return apiClient.addEndUserEvmSmartAccount(endUser.userId, { enableSpendPermissions: smartAccountOptions.enableSpendPermissions }, smartAccountOptions.idempotencyKey);
|
|
81
79
|
},
|
|
82
|
-
async addSolanaAccount() {
|
|
80
|
+
async addSolanaAccount(idempotencyKey) {
|
|
83
81
|
analytics_js_1.Analytics.trackAction({ action: "end_user_add_solana_account" });
|
|
84
|
-
return apiClient.addEndUserSolanaAccount(endUser.userId, {});
|
|
82
|
+
return apiClient.addEndUserSolanaAccount(endUser.userId, {}, idempotencyKey);
|
|
85
83
|
},
|
|
86
84
|
async getDelegation() {
|
|
87
85
|
analytics_js_1.Analytics.trackAction({ action: "end_user_get_delegation" });
|
|
88
86
|
return apiClient.getDelegationForEndUser(endUser.userId);
|
|
89
87
|
},
|
|
90
|
-
async revokeDelegation() {
|
|
88
|
+
async revokeDelegation(idempotencyKey) {
|
|
91
89
|
analytics_js_1.Analytics.trackAction({ action: "end_user_revoke_delegation" });
|
|
92
|
-
await apiClient.revokeDelegationForEndUser(endUser.userId, {});
|
|
90
|
+
await apiClient.revokeDelegationForEndUser(endUser.userId, {}, undefined, idempotencyKey);
|
|
93
91
|
},
|
|
94
92
|
// ─── Account-Scoped Delegation Methods ───
|
|
95
93
|
async getDelegationForAccount(opts) {
|
|
@@ -106,36 +104,23 @@ function toEndUserAccount(apiClient, options) {
|
|
|
106
104
|
async signEvmTransaction(opts) {
|
|
107
105
|
analytics_js_1.Analytics.trackAction({ action: "end_user_sign_evm_transaction" });
|
|
108
106
|
const address = resolveEvmAddress(endUser, opts.address);
|
|
109
|
-
return apiClient.signEvmTransactionWithEndUserAccount(endUser.userId, {
|
|
110
|
-
address,
|
|
111
|
-
transaction: opts.transaction,
|
|
112
|
-
});
|
|
107
|
+
return apiClient.signEvmTransactionWithEndUserAccount(endUser.userId, { address, transaction: opts.transaction }, undefined, opts.idempotencyKey);
|
|
113
108
|
},
|
|
114
109
|
async signEvmMessage(opts) {
|
|
115
110
|
analytics_js_1.Analytics.trackAction({ action: "end_user_sign_evm_message" });
|
|
116
111
|
const address = resolveEvmAddress(endUser, opts.address);
|
|
117
|
-
return apiClient.signEvmMessageWithEndUserAccount(endUser.userId, {
|
|
118
|
-
address,
|
|
119
|
-
message: opts.message,
|
|
120
|
-
});
|
|
112
|
+
return apiClient.signEvmMessageWithEndUserAccount(endUser.userId, { address, message: opts.message }, undefined, opts.idempotencyKey);
|
|
121
113
|
},
|
|
122
114
|
async signEvmTypedData(opts) {
|
|
123
115
|
analytics_js_1.Analytics.trackAction({ action: "end_user_sign_evm_typed_data" });
|
|
124
116
|
const address = resolveEvmAddress(endUser, opts.address);
|
|
125
|
-
return apiClient.signEvmTypedDataWithEndUserAccount(endUser.userId, {
|
|
126
|
-
address,
|
|
127
|
-
typedData: opts.typedData,
|
|
128
|
-
});
|
|
117
|
+
return apiClient.signEvmTypedDataWithEndUserAccount(endUser.userId, { address, typedData: opts.typedData }, undefined, opts.idempotencyKey);
|
|
129
118
|
},
|
|
130
119
|
// ─── Delegated EVM Send Methods ───
|
|
131
120
|
async sendEvmTransaction(opts) {
|
|
132
121
|
analytics_js_1.Analytics.trackAction({ action: "end_user_send_evm_transaction" });
|
|
133
122
|
const address = resolveEvmAddress(endUser, opts.address);
|
|
134
|
-
return apiClient.sendEvmTransactionWithEndUserAccount(endUser.userId, {
|
|
135
|
-
address,
|
|
136
|
-
transaction: opts.transaction,
|
|
137
|
-
network: opts.network,
|
|
138
|
-
});
|
|
123
|
+
return apiClient.sendEvmTransactionWithEndUserAccount(endUser.userId, { address, transaction: opts.transaction, network: opts.network }, undefined, opts.idempotencyKey);
|
|
139
124
|
},
|
|
140
125
|
async sendEvmAsset(opts) {
|
|
141
126
|
analytics_js_1.Analytics.trackAction({ action: "end_user_send_evm_asset" });
|
|
@@ -147,7 +132,7 @@ function toEndUserAccount(apiClient, options) {
|
|
|
147
132
|
network: opts.network,
|
|
148
133
|
useCdpPaymaster: opts.useCdpPaymaster,
|
|
149
134
|
paymasterUrl: opts.paymasterUrl,
|
|
150
|
-
});
|
|
135
|
+
}, undefined, opts.idempotencyKey);
|
|
151
136
|
},
|
|
152
137
|
async sendUserOperation(opts) {
|
|
153
138
|
analytics_js_1.Analytics.trackAction({ action: "end_user_send_user_operation" });
|
|
@@ -158,7 +143,7 @@ function toEndUserAccount(apiClient, options) {
|
|
|
158
143
|
useCdpPaymaster: opts.useCdpPaymaster,
|
|
159
144
|
paymasterUrl: opts.paymasterUrl,
|
|
160
145
|
dataSuffix: opts.dataSuffix,
|
|
161
|
-
});
|
|
146
|
+
}, undefined, opts.idempotencyKey);
|
|
162
147
|
},
|
|
163
148
|
// ─── Delegated EVM EIP-7702 Delegation Method ───
|
|
164
149
|
async createEvmEip7702Delegation(opts) {
|
|
@@ -168,34 +153,24 @@ function toEndUserAccount(apiClient, options) {
|
|
|
168
153
|
address,
|
|
169
154
|
network: opts.network,
|
|
170
155
|
enableSpendPermissions: opts.enableSpendPermissions,
|
|
171
|
-
});
|
|
156
|
+
}, undefined, opts.idempotencyKey);
|
|
172
157
|
},
|
|
173
158
|
// ─── Delegated Solana Sign Methods ───
|
|
174
159
|
async signSolanaMessage(opts) {
|
|
175
160
|
analytics_js_1.Analytics.trackAction({ action: "end_user_sign_solana_message" });
|
|
176
161
|
const address = resolveSolanaAddress(endUser, opts.address);
|
|
177
|
-
return apiClient.signSolanaMessageWithEndUserAccount(endUser.userId, {
|
|
178
|
-
address,
|
|
179
|
-
message: opts.message,
|
|
180
|
-
});
|
|
162
|
+
return apiClient.signSolanaMessageWithEndUserAccount(endUser.userId, { address, message: opts.message }, undefined, opts.idempotencyKey);
|
|
181
163
|
},
|
|
182
164
|
async signSolanaTransaction(opts) {
|
|
183
165
|
analytics_js_1.Analytics.trackAction({ action: "end_user_sign_solana_transaction" });
|
|
184
166
|
const address = resolveSolanaAddress(endUser, opts.address);
|
|
185
|
-
return apiClient.signSolanaTransactionWithEndUserAccount(endUser.userId, {
|
|
186
|
-
address,
|
|
187
|
-
transaction: opts.transaction,
|
|
188
|
-
});
|
|
167
|
+
return apiClient.signSolanaTransactionWithEndUserAccount(endUser.userId, { address, transaction: opts.transaction }, undefined, opts.idempotencyKey);
|
|
189
168
|
},
|
|
190
169
|
// ─── Delegated Solana Send Methods ───
|
|
191
170
|
async sendSolanaTransaction(opts) {
|
|
192
171
|
analytics_js_1.Analytics.trackAction({ action: "end_user_send_solana_transaction" });
|
|
193
172
|
const address = resolveSolanaAddress(endUser, opts.address);
|
|
194
|
-
return apiClient.sendSolanaTransactionWithEndUserAccount(endUser.userId, {
|
|
195
|
-
address,
|
|
196
|
-
transaction: opts.transaction,
|
|
197
|
-
network: opts.network,
|
|
198
|
-
});
|
|
173
|
+
return apiClient.sendSolanaTransactionWithEndUserAccount(endUser.userId, { address, transaction: opts.transaction, network: opts.network }, undefined, opts.idempotencyKey);
|
|
199
174
|
},
|
|
200
175
|
async sendSolanaAsset(opts) {
|
|
201
176
|
analytics_js_1.Analytics.trackAction({ action: "end_user_send_solana_asset" });
|
|
@@ -206,7 +181,7 @@ function toEndUserAccount(apiClient, options) {
|
|
|
206
181
|
amount: opts.amount,
|
|
207
182
|
network: opts.network,
|
|
208
183
|
createRecipientAta: opts.createRecipientAta,
|
|
209
|
-
});
|
|
184
|
+
}, undefined, opts.idempotencyKey);
|
|
210
185
|
},
|
|
211
186
|
};
|
|
212
187
|
return endUserAccount;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toEndUserAccount.js","sourceRoot":"","sources":["../../../client/end-user/toEndUserAccount.ts"],"names":[],"mappings":";;AA6GA,
|
|
1
|
+
{"version":3,"file":"toEndUserAccount.js","sourceRoot":"","sources":["../../../client/end-user/toEndUserAccount.ts"],"names":[],"mappings":";;AA6GA,4CA2PC;AAxWD,qDAA+C;AAgD/C;;;;;;GAMG;AACH,SAAS,iBAAiB,CAAC,OAAuB,EAAE,QAAiB;IACnE,MAAM,OAAO,GAAG,QAAQ,IAAI,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC;IAClE,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACb,iGAAiG,CAClG,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;;GAMG;AACH,SAAS,6BAA6B,CAAC,OAAuB,EAAE,QAAiB;IAC/E,MAAM,OAAO,GAAG,QAAQ,IAAI,OAAO,CAAC,sBAAsB,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC;IACvE,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACb,6GAA6G,CAC9G,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;;GAMG;AACH,SAAS,oBAAoB,CAAC,OAAuB,EAAE,QAAiB;IACtE,MAAM,OAAO,GAAG,QAAQ,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC;IACrE,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACb,sGAAsG,CACvG,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;;;;;GASG;AACH,SAAgB,gBAAgB,CAC9B,SAA+B,EAC/B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ACzB,IAAyC;YAEzC,wBAAS,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,kCAAkC,EAAE,CAAC,CAAC;YACtE,MAAM,OAAO,GAAG,oBAAoB,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;YAC5D,OAAO,SAAS,CAAC,uCAAuC,CACtD,OAAO,CAAC,MAAM,EACd,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,EACjE,SAAS,EACT,IAAI,CAAC,cAAc,CACpB,CAAC;QACJ,CAAC;QAED,KAAK,CAAC,eAAe,CAAC,IAAmC;YACvD,wBAAS,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,4BAA4B,EAAE,CAAC,CAAC;YAChE,MAAM,OAAO,GAAG,oBAAoB,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;YAC5D,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC;YACnC,OAAO,SAAS,CAAC,iCAAiC,CAChD,OAAO,CAAC,MAAM,EACd,OAAO,EACP,KAAK,EACL;gBACE,EAAE,EAAE,IAAI,CAAC,EAAE;gBACX,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;aAC5C,EACD,SAAS,EACT,IAAI,CAAC,cAAc,CACpB,CAAC;QACJ,CAAC;KACF,CAAC;IAEF,OAAO,cAAc,CAAC;AACxB,CAAC"}
|
package/_cjs/version.js
CHANGED
|
@@ -45,7 +45,7 @@ export class EndUserClient {
|
|
|
45
45
|
const endUser = await CdpOpenApiClient.createEndUser({
|
|
46
46
|
...options,
|
|
47
47
|
userId,
|
|
48
|
-
});
|
|
48
|
+
}, options.idempotencyKey);
|
|
49
49
|
return toEndUserAccount(CdpOpenApiClient, { endUser });
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
@@ -133,8 +133,8 @@ export class EndUserClient {
|
|
|
133
133
|
Analytics.trackAction({
|
|
134
134
|
action: "add_end_user_evm_account",
|
|
135
135
|
});
|
|
136
|
-
const { userId } = options;
|
|
137
|
-
return CdpOpenApiClient.addEndUserEvmAccount(userId, {});
|
|
136
|
+
const { userId, idempotencyKey } = options;
|
|
137
|
+
return CdpOpenApiClient.addEndUserEvmAccount(userId, {}, idempotencyKey);
|
|
138
138
|
}
|
|
139
139
|
/**
|
|
140
140
|
* Adds an EVM smart account to an existing end user. This also creates a new EVM EOA account to serve as the owner of the smart account.
|
|
@@ -165,10 +165,8 @@ export class EndUserClient {
|
|
|
165
165
|
Analytics.trackAction({
|
|
166
166
|
action: "add_end_user_evm_smart_account",
|
|
167
167
|
});
|
|
168
|
-
const { userId, enableSpendPermissions } = options;
|
|
169
|
-
return CdpOpenApiClient.addEndUserEvmSmartAccount(userId, {
|
|
170
|
-
enableSpendPermissions,
|
|
171
|
-
});
|
|
168
|
+
const { userId, enableSpendPermissions, idempotencyKey } = options;
|
|
169
|
+
return CdpOpenApiClient.addEndUserEvmSmartAccount(userId, { enableSpendPermissions }, idempotencyKey);
|
|
172
170
|
}
|
|
173
171
|
/**
|
|
174
172
|
* Adds a Solana account to an existing end user. End users can have up to 10 Solana accounts.
|
|
@@ -189,8 +187,8 @@ export class EndUserClient {
|
|
|
189
187
|
Analytics.trackAction({
|
|
190
188
|
action: "add_end_user_solana_account",
|
|
191
189
|
});
|
|
192
|
-
const { userId } = options;
|
|
193
|
-
return CdpOpenApiClient.addEndUserSolanaAccount(userId, {});
|
|
190
|
+
const { userId, idempotencyKey } = options;
|
|
191
|
+
return CdpOpenApiClient.addEndUserSolanaAccount(userId, {}, idempotencyKey);
|
|
194
192
|
}
|
|
195
193
|
/**
|
|
196
194
|
* Gets the active delegation for the specified end user, if one exists.
|
|
@@ -234,8 +232,8 @@ export class EndUserClient {
|
|
|
234
232
|
Analytics.trackAction({
|
|
235
233
|
action: "revoke_delegation_for_end_user",
|
|
236
234
|
});
|
|
237
|
-
const { userId } = options;
|
|
238
|
-
await CdpOpenApiClient.revokeDelegationForEndUser(userId, {});
|
|
235
|
+
const { userId, idempotencyKey } = options;
|
|
236
|
+
await CdpOpenApiClient.revokeDelegationForEndUser(userId, {}, undefined, idempotencyKey);
|
|
239
237
|
}
|
|
240
238
|
// ─── Account-Scoped Delegation Methods ───
|
|
241
239
|
/**
|
|
@@ -304,10 +302,7 @@ export class EndUserClient {
|
|
|
304
302
|
*/
|
|
305
303
|
async signEvmTransaction(options) {
|
|
306
304
|
Analytics.trackAction({ action: "end_user_sign_evm_transaction" });
|
|
307
|
-
return CdpOpenApiClient.signEvmTransactionWithEndUserAccount(options.userId, {
|
|
308
|
-
address: options.address,
|
|
309
|
-
transaction: options.transaction,
|
|
310
|
-
});
|
|
305
|
+
return CdpOpenApiClient.signEvmTransactionWithEndUserAccount(options.userId, { address: options.address, transaction: options.transaction }, undefined, options.idempotencyKey);
|
|
311
306
|
}
|
|
312
307
|
/**
|
|
313
308
|
* Signs an EVM message (EIP-191) on behalf of an end user using a delegation.
|
|
@@ -328,10 +323,7 @@ export class EndUserClient {
|
|
|
328
323
|
*/
|
|
329
324
|
async signEvmMessage(options) {
|
|
330
325
|
Analytics.trackAction({ action: "end_user_sign_evm_message" });
|
|
331
|
-
return CdpOpenApiClient.signEvmMessageWithEndUserAccount(options.userId, {
|
|
332
|
-
address: options.address,
|
|
333
|
-
message: options.message,
|
|
334
|
-
});
|
|
326
|
+
return CdpOpenApiClient.signEvmMessageWithEndUserAccount(options.userId, { address: options.address, message: options.message }, undefined, options.idempotencyKey);
|
|
335
327
|
}
|
|
336
328
|
/**
|
|
337
329
|
* Signs EVM EIP-712 typed data on behalf of an end user using a delegation.
|
|
@@ -352,10 +344,7 @@ export class EndUserClient {
|
|
|
352
344
|
*/
|
|
353
345
|
async signEvmTypedData(options) {
|
|
354
346
|
Analytics.trackAction({ action: "end_user_sign_evm_typed_data" });
|
|
355
|
-
return CdpOpenApiClient.signEvmTypedDataWithEndUserAccount(options.userId, {
|
|
356
|
-
address: options.address,
|
|
357
|
-
typedData: options.typedData,
|
|
358
|
-
});
|
|
347
|
+
return CdpOpenApiClient.signEvmTypedDataWithEndUserAccount(options.userId, { address: options.address, typedData: options.typedData }, undefined, options.idempotencyKey);
|
|
359
348
|
}
|
|
360
349
|
// ─── Delegated EVM Send Methods ───
|
|
361
350
|
/**
|
|
@@ -378,11 +367,7 @@ export class EndUserClient {
|
|
|
378
367
|
*/
|
|
379
368
|
async sendEvmTransaction(options) {
|
|
380
369
|
Analytics.trackAction({ action: "end_user_send_evm_transaction" });
|
|
381
|
-
return CdpOpenApiClient.sendEvmTransactionWithEndUserAccount(options.userId, {
|
|
382
|
-
address: options.address,
|
|
383
|
-
transaction: options.transaction,
|
|
384
|
-
network: options.network,
|
|
385
|
-
});
|
|
370
|
+
return CdpOpenApiClient.sendEvmTransactionWithEndUserAccount(options.userId, { address: options.address, transaction: options.transaction, network: options.network }, undefined, options.idempotencyKey);
|
|
386
371
|
}
|
|
387
372
|
/**
|
|
388
373
|
* Sends an EVM asset (e.g. USDC) on behalf of an end user using a delegation.
|
|
@@ -412,7 +397,7 @@ export class EndUserClient {
|
|
|
412
397
|
network: options.network,
|
|
413
398
|
useCdpPaymaster: options.useCdpPaymaster,
|
|
414
399
|
paymasterUrl: options.paymasterUrl,
|
|
415
|
-
});
|
|
400
|
+
}, undefined, options.idempotencyKey);
|
|
416
401
|
}
|
|
417
402
|
/**
|
|
418
403
|
* Sends a user operation on behalf of an end user using a delegation.
|
|
@@ -440,7 +425,7 @@ export class EndUserClient {
|
|
|
440
425
|
useCdpPaymaster: options.useCdpPaymaster,
|
|
441
426
|
paymasterUrl: options.paymasterUrl,
|
|
442
427
|
dataSuffix: options.dataSuffix,
|
|
443
|
-
});
|
|
428
|
+
}, undefined, options.idempotencyKey);
|
|
444
429
|
}
|
|
445
430
|
// ─── Delegated EVM EIP-7702 Delegation Method ───
|
|
446
431
|
/**
|
|
@@ -466,7 +451,7 @@ export class EndUserClient {
|
|
|
466
451
|
address: options.address,
|
|
467
452
|
network: options.network,
|
|
468
453
|
enableSpendPermissions: options.enableSpendPermissions,
|
|
469
|
-
});
|
|
454
|
+
}, undefined, options.idempotencyKey);
|
|
470
455
|
}
|
|
471
456
|
// ─── Delegated Solana Sign Methods ───
|
|
472
457
|
/**
|
|
@@ -488,10 +473,7 @@ export class EndUserClient {
|
|
|
488
473
|
*/
|
|
489
474
|
async signSolanaMessage(options) {
|
|
490
475
|
Analytics.trackAction({ action: "end_user_sign_solana_message" });
|
|
491
|
-
return CdpOpenApiClient.signSolanaMessageWithEndUserAccount(options.userId, {
|
|
492
|
-
address: options.address,
|
|
493
|
-
message: options.message,
|
|
494
|
-
});
|
|
476
|
+
return CdpOpenApiClient.signSolanaMessageWithEndUserAccount(options.userId, { address: options.address, message: options.message }, undefined, options.idempotencyKey);
|
|
495
477
|
}
|
|
496
478
|
/**
|
|
497
479
|
* Signs a Solana transaction on behalf of an end user using a delegation.
|
|
@@ -512,10 +494,7 @@ export class EndUserClient {
|
|
|
512
494
|
*/
|
|
513
495
|
async signSolanaTransaction(options) {
|
|
514
496
|
Analytics.trackAction({ action: "end_user_sign_solana_transaction" });
|
|
515
|
-
return CdpOpenApiClient.signSolanaTransactionWithEndUserAccount(options.userId, {
|
|
516
|
-
address: options.address,
|
|
517
|
-
transaction: options.transaction,
|
|
518
|
-
});
|
|
497
|
+
return CdpOpenApiClient.signSolanaTransactionWithEndUserAccount(options.userId, { address: options.address, transaction: options.transaction }, undefined, options.idempotencyKey);
|
|
519
498
|
}
|
|
520
499
|
// ─── Delegated Solana Send Methods ───
|
|
521
500
|
/**
|
|
@@ -542,7 +521,7 @@ export class EndUserClient {
|
|
|
542
521
|
address: options.address,
|
|
543
522
|
transaction: options.transaction,
|
|
544
523
|
network: options.network,
|
|
545
|
-
});
|
|
524
|
+
}, undefined, options.idempotencyKey);
|
|
546
525
|
}
|
|
547
526
|
/**
|
|
548
527
|
* Sends a Solana asset (e.g. USDC) on behalf of an end user using a delegation.
|
|
@@ -571,7 +550,7 @@ export class EndUserClient {
|
|
|
571
550
|
amount: options.amount,
|
|
572
551
|
network: options.network,
|
|
573
552
|
createRecipientAta: options.createRecipientAta,
|
|
574
|
-
});
|
|
553
|
+
}, undefined, options.idempotencyKey);
|
|
575
554
|
}
|
|
576
555
|
/**
|
|
577
556
|
* Validates an end user's access token. Throws an error if the access token is invalid.
|
|
@@ -664,7 +643,7 @@ export class EndUserClient {
|
|
|
664
643
|
authenticationMethods: options.authenticationMethods,
|
|
665
644
|
encryptedPrivateKey: encryptedPrivateKey.toString("base64"),
|
|
666
645
|
keyType: options.keyType,
|
|
667
|
-
});
|
|
646
|
+
}, options.idempotencyKey);
|
|
668
647
|
return toEndUserAccount(CdpOpenApiClient, { endUser });
|
|
669
648
|
}
|
|
670
649
|
}
|