@coinbase/cdp-sdk 1.5.0 → 1.7.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 (191) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +101 -3
  3. package/_cjs/accounts/evm/toEvmServerAccount.js +21 -0
  4. package/_cjs/accounts/evm/toEvmServerAccount.js.map +1 -1
  5. package/_cjs/accounts/evm/toEvmSmartAccount.js +35 -0
  6. package/_cjs/accounts/evm/toEvmSmartAccount.js.map +1 -1
  7. package/_cjs/accounts/{types.js.map → evm/types.js.map} +1 -1
  8. package/_cjs/accounts/solana/toSolanaAccount.js +41 -0
  9. package/_cjs/accounts/solana/toSolanaAccount.js.map +1 -0
  10. package/_cjs/accounts/solana/types.js +3 -0
  11. package/_cjs/accounts/solana/types.js.map +1 -0
  12. package/_cjs/actions/evm/getUserOperation.js +36 -0
  13. package/_cjs/actions/evm/getUserOperation.js.map +1 -0
  14. package/_cjs/actions/evm/listTokenBalances.js +33 -0
  15. package/_cjs/actions/evm/listTokenBalances.js.map +1 -0
  16. package/_cjs/actions/evm/requestFaucet.js +18 -0
  17. package/_cjs/actions/evm/requestFaucet.js.map +1 -0
  18. package/_cjs/actions/evm/sendTransaction.js +29 -0
  19. package/_cjs/actions/evm/sendTransaction.js.map +1 -0
  20. package/_cjs/actions/evm/sendUserOperation.js +5 -6
  21. package/_cjs/actions/evm/sendUserOperation.js.map +1 -1
  22. package/_cjs/actions/evm/transfer/accountTransferStrategy.js +11 -7
  23. package/_cjs/actions/evm/transfer/accountTransferStrategy.js.map +1 -1
  24. package/_cjs/actions/evm/transfer/smartAccountTransferStrategy.js +13 -8
  25. package/_cjs/actions/evm/transfer/smartAccountTransferStrategy.js.map +1 -1
  26. package/_cjs/actions/evm/transfer/transfer.js +7 -3
  27. package/_cjs/actions/evm/transfer/transfer.js.map +1 -1
  28. package/_cjs/actions/solana/requestFaucet.js +29 -0
  29. package/_cjs/actions/solana/requestFaucet.js.map +1 -0
  30. package/_cjs/actions/solana/signMessage.js +29 -0
  31. package/_cjs/actions/solana/signMessage.js.map +1 -0
  32. package/_cjs/actions/solana/signTransaction.js +46 -0
  33. package/_cjs/actions/solana/signTransaction.js.map +1 -0
  34. package/_cjs/actions/solana/types.js +3 -0
  35. package/_cjs/actions/solana/types.js.map +1 -0
  36. package/_cjs/client/evm/evm.js +10 -52
  37. package/_cjs/client/evm/evm.js.map +1 -1
  38. package/_cjs/client/solana/solana.js +22 -17
  39. package/_cjs/client/solana/solana.js.map +1 -1
  40. package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +59 -1
  41. package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
  42. package/_cjs/openapi-client/generated/index.msw.js +3 -2
  43. package/_cjs/openapi-client/generated/index.msw.js.map +1 -1
  44. package/_cjs/openapi-client/generated/policy-engine/policy-engine.js +56 -0
  45. package/_cjs/openapi-client/generated/policy-engine/policy-engine.js.map +1 -0
  46. package/_cjs/openapi-client/generated/policy-engine/policy-engine.msw.js +284 -0
  47. package/_cjs/openapi-client/generated/policy-engine/policy-engine.msw.js.map +1 -0
  48. package/_cjs/openapi-client/index.js +1 -0
  49. package/_cjs/openapi-client/index.js.map +1 -1
  50. package/_cjs/version.js +1 -1
  51. package/_esm/accounts/evm/toEvmServerAccount.js +21 -0
  52. package/_esm/accounts/evm/toEvmServerAccount.js.map +1 -1
  53. package/_esm/accounts/evm/toEvmSmartAccount.js +35 -0
  54. package/_esm/accounts/evm/toEvmSmartAccount.js.map +1 -1
  55. package/_esm/accounts/{types.js.map → evm/types.js.map} +1 -1
  56. package/_esm/accounts/solana/toSolanaAccount.js +38 -0
  57. package/_esm/accounts/solana/toSolanaAccount.js.map +1 -0
  58. package/_esm/accounts/solana/types.js +2 -0
  59. package/_esm/accounts/solana/types.js.map +1 -0
  60. package/_esm/actions/evm/getUserOperation.js +33 -0
  61. package/_esm/actions/evm/getUserOperation.js.map +1 -0
  62. package/_esm/actions/evm/listTokenBalances.js +30 -0
  63. package/_esm/actions/evm/listTokenBalances.js.map +1 -0
  64. package/_esm/actions/evm/requestFaucet.js +15 -0
  65. package/_esm/actions/evm/requestFaucet.js.map +1 -0
  66. package/_esm/actions/evm/sendTransaction.js +26 -0
  67. package/_esm/actions/evm/sendTransaction.js.map +1 -0
  68. package/_esm/actions/evm/sendUserOperation.js +5 -6
  69. package/_esm/actions/evm/sendUserOperation.js.map +1 -1
  70. package/_esm/actions/evm/transfer/accountTransferStrategy.js +11 -7
  71. package/_esm/actions/evm/transfer/accountTransferStrategy.js.map +1 -1
  72. package/_esm/actions/evm/transfer/smartAccountTransferStrategy.js +13 -8
  73. package/_esm/actions/evm/transfer/smartAccountTransferStrategy.js.map +1 -1
  74. package/_esm/actions/evm/transfer/transfer.js +7 -3
  75. package/_esm/actions/evm/transfer/transfer.js.map +1 -1
  76. package/_esm/actions/solana/requestFaucet.js +26 -0
  77. package/_esm/actions/solana/requestFaucet.js.map +1 -0
  78. package/_esm/actions/solana/signMessage.js +26 -0
  79. package/_esm/actions/solana/signMessage.js.map +1 -0
  80. package/_esm/actions/solana/signTransaction.js +43 -0
  81. package/_esm/actions/solana/signTransaction.js.map +1 -0
  82. package/_esm/actions/solana/types.js +2 -0
  83. package/_esm/actions/solana/types.js.map +1 -0
  84. package/_esm/client/evm/evm.js +10 -52
  85. package/_esm/client/evm/evm.js.map +1 -1
  86. package/_esm/client/solana/solana.js +22 -17
  87. package/_esm/client/solana/solana.js.map +1 -1
  88. package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +58 -0
  89. package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
  90. package/_esm/openapi-client/generated/index.msw.js +3 -2
  91. package/_esm/openapi-client/generated/index.msw.js.map +1 -1
  92. package/_esm/openapi-client/generated/policy-engine/policy-engine.js +48 -0
  93. package/_esm/openapi-client/generated/policy-engine/policy-engine.js.map +1 -0
  94. package/_esm/openapi-client/generated/policy-engine/policy-engine.msw.js +259 -0
  95. package/_esm/openapi-client/generated/policy-engine/policy-engine.msw.js.map +1 -0
  96. package/_esm/openapi-client/index.js +1 -0
  97. package/_esm/openapi-client/index.js.map +1 -1
  98. package/_esm/version.js +1 -1
  99. package/_types/accounts/evm/toEvmServerAccount.d.ts +1 -1
  100. package/_types/accounts/evm/toEvmServerAccount.d.ts.map +1 -1
  101. package/_types/accounts/evm/toEvmSmartAccount.d.ts +1 -1
  102. package/_types/accounts/evm/toEvmSmartAccount.d.ts.map +1 -1
  103. package/_types/accounts/{types.d.ts → evm/types.d.ts} +5 -5
  104. package/_types/accounts/evm/types.d.ts.map +1 -0
  105. package/_types/accounts/solana/toSolanaAccount.d.ts +20 -0
  106. package/_types/accounts/solana/toSolanaAccount.d.ts.map +1 -0
  107. package/_types/accounts/solana/types.d.ts +12 -0
  108. package/_types/accounts/solana/types.d.ts.map +1 -0
  109. package/_types/actions/evm/getUserOperation.d.ts +22 -0
  110. package/_types/actions/evm/getUserOperation.d.ts.map +1 -0
  111. package/_types/actions/evm/listTokenBalances.d.ts +76 -0
  112. package/_types/actions/evm/listTokenBalances.d.ts.map +1 -0
  113. package/_types/actions/evm/requestFaucet.d.ts +34 -0
  114. package/_types/actions/evm/requestFaucet.d.ts.map +1 -0
  115. package/_types/actions/evm/sendTransaction.d.ts +42 -0
  116. package/_types/actions/evm/sendTransaction.d.ts.map +1 -0
  117. package/_types/actions/evm/sendUserOperation.d.ts +4 -3
  118. package/_types/actions/evm/sendUserOperation.d.ts.map +1 -1
  119. package/_types/actions/evm/transfer/accountTransferStrategy.d.ts +1 -1
  120. package/_types/actions/evm/transfer/accountTransferStrategy.d.ts.map +1 -1
  121. package/_types/actions/evm/transfer/smartAccountTransferStrategy.d.ts +1 -1
  122. package/_types/actions/evm/transfer/smartAccountTransferStrategy.d.ts.map +1 -1
  123. package/_types/actions/evm/transfer/transfer.d.ts +3 -3
  124. package/_types/actions/evm/transfer/transfer.d.ts.map +1 -1
  125. package/_types/actions/evm/transfer/types.d.ts +41 -7
  126. package/_types/actions/evm/transfer/types.d.ts.map +1 -1
  127. package/_types/actions/evm/types.d.ts +168 -3
  128. package/_types/actions/evm/types.d.ts.map +1 -1
  129. package/_types/actions/solana/requestFaucet.d.ts +23 -0
  130. package/_types/actions/solana/requestFaucet.d.ts.map +1 -0
  131. package/_types/actions/solana/signMessage.d.ts +23 -0
  132. package/_types/actions/solana/signMessage.d.ts.map +1 -0
  133. package/_types/actions/solana/signTransaction.d.ts +38 -0
  134. package/_types/actions/solana/signTransaction.d.ts.map +1 -0
  135. package/_types/actions/solana/types.d.ts +80 -0
  136. package/_types/actions/solana/types.d.ts.map +1 -0
  137. package/_types/client/evm/evm.d.ts +6 -3
  138. package/_types/client/evm/evm.d.ts.map +1 -1
  139. package/_types/client/evm/evm.types.d.ts +12 -138
  140. package/_types/client/evm/evm.types.d.ts.map +1 -1
  141. package/_types/client/solana/solana.d.ts +5 -4
  142. package/_types/client/solana/solana.d.ts.map +1 -1
  143. package/_types/client/solana/solana.types.d.ts +8 -11
  144. package/_types/client/solana/solana.types.d.ts.map +1 -1
  145. package/_types/index.d.ts +1 -1
  146. package/_types/index.d.ts.map +1 -1
  147. package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +218 -0
  148. package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
  149. package/_types/openapi-client/generated/index.msw.d.ts +3 -2
  150. package/_types/openapi-client/generated/index.msw.d.ts.map +1 -1
  151. package/_types/openapi-client/generated/policy-engine/policy-engine.d.ts +43 -0
  152. package/_types/openapi-client/generated/policy-engine/policy-engine.d.ts.map +1 -0
  153. package/_types/openapi-client/generated/policy-engine/policy-engine.msw.d.ts +25 -0
  154. package/_types/openapi-client/generated/policy-engine/policy-engine.msw.d.ts.map +1 -0
  155. package/_types/openapi-client/index.d.ts +1 -0
  156. package/_types/openapi-client/index.d.ts.map +1 -1
  157. package/_types/version.d.ts +1 -1
  158. package/accounts/evm/toEvmServerAccount.ts +35 -1
  159. package/accounts/evm/toEvmSmartAccount.ts +63 -1
  160. package/accounts/{types.ts → evm/types.ts} +5 -5
  161. package/accounts/solana/toSolanaAccount.ts +59 -0
  162. package/accounts/solana/types.ts +13 -0
  163. package/actions/evm/getUserOperation.ts +40 -0
  164. package/actions/evm/listTokenBalances.ts +107 -0
  165. package/actions/evm/requestFaucet.ts +46 -0
  166. package/actions/evm/sendTransaction.ts +73 -0
  167. package/actions/evm/sendUserOperation.ts +7 -7
  168. package/actions/evm/transfer/accountTransferStrategy.ts +12 -8
  169. package/actions/evm/transfer/smartAccountTransferStrategy.ts +14 -9
  170. package/actions/evm/transfer/transfer.ts +17 -6
  171. package/actions/evm/transfer/types.ts +55 -12
  172. package/actions/evm/types.ts +191 -3
  173. package/actions/solana/requestFaucet.ts +35 -0
  174. package/actions/solana/signMessage.ts +36 -0
  175. package/actions/solana/signTransaction.ts +53 -0
  176. package/actions/solana/types.ts +87 -0
  177. package/client/evm/evm.ts +28 -77
  178. package/client/evm/evm.types.ts +25 -151
  179. package/client/solana/solana.ts +32 -37
  180. package/client/solana/solana.types.ts +10 -15
  181. package/index.ts +1 -1
  182. package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +274 -0
  183. package/openapi-client/generated/index.msw.ts +3 -2
  184. package/openapi-client/generated/policy-engine/policy-engine.msw.ts +404 -0
  185. package/openapi-client/generated/policy-engine/policy-engine.ts +95 -0
  186. package/openapi-client/index.ts +1 -0
  187. package/package.json +1 -1
  188. package/version.ts +1 -1
  189. package/_types/accounts/types.d.ts.map +0 -1
  190. /package/_cjs/accounts/{types.js → evm/types.js} +0 -0
  191. /package/_esm/accounts/{types.js → evm/types.js} +0 -0
@@ -29,6 +29,7 @@ export interface ListResponse {
29
29
  export type ErrorType = (typeof ErrorType)[keyof typeof ErrorType];
30
30
  export declare const ErrorType: {
31
31
  readonly already_exists: "already_exists";
32
+ readonly bad_gateway: "bad_gateway";
32
33
  readonly faucet_limit_exceeded: "faucet_limit_exceeded";
33
34
  readonly forbidden: "forbidden";
34
35
  readonly idempotency_error: "idempotency_error";
@@ -39,9 +40,11 @@ export declare const ErrorType: {
39
40
  readonly not_found: "not_found";
40
41
  readonly rate_limit_exceeded: "rate_limit_exceeded";
41
42
  readonly request_canceled: "request_canceled";
43
+ readonly service_unavailable: "service_unavailable";
42
44
  readonly timed_out: "timed_out";
43
45
  readonly unauthorized: "unauthorized";
44
46
  readonly policy_violation: "policy_violation";
47
+ readonly policy_in_use: "policy_in_use";
45
48
  };
46
49
  /**
47
50
  * An error response including the code for the type of error and a human-readable message describing the error.
@@ -173,6 +176,159 @@ export interface TokenBalance {
173
176
  amount: TokenAmount;
174
177
  token: Token;
175
178
  }
179
+ /**
180
+ * The type of criterion to use. This should be `ethValue`.
181
+ */
182
+ export type EthValueCriterionType = (typeof EthValueCriterionType)[keyof typeof EthValueCriterionType];
183
+ export declare const EthValueCriterionType: {
184
+ readonly ethValue: "ethValue";
185
+ };
186
+ /**
187
+ * The operator to use for the comparison. The transaction's `value` field will be on the left-hand side of the operator, and the `ethValue` field will be on the right-hand side.
188
+ */
189
+ export type EthValueCriterionOperator = (typeof EthValueCriterionOperator)[keyof typeof EthValueCriterionOperator];
190
+ export declare const EthValueCriterionOperator: {
191
+ readonly ">": ">";
192
+ readonly ">=": ">=";
193
+ readonly "<": "<";
194
+ readonly "<=": "<=";
195
+ readonly "==": "==";
196
+ };
197
+ /**
198
+ * A schema for specifying a criterion for the `value` field of an EVM transaction.
199
+ */
200
+ export interface EthValueCriterion {
201
+ /** The type of criterion to use. This should be `ethValue`. */
202
+ type: EthValueCriterionType;
203
+ /**
204
+ * The amount of ETH, in wei, that the transaction's `value` field should be compared to.
205
+ * @pattern ^[0-9]+$
206
+ */
207
+ ethValue: string;
208
+ /** The operator to use for the comparison. The transaction's `value` field will be on the left-hand side of the operator, and the `ethValue` field will be on the right-hand side. */
209
+ operator: EthValueCriterionOperator;
210
+ }
211
+ /**
212
+ * The type of criterion to use. This should be `evmAddress`.
213
+ */
214
+ export type EvmAddressCriterionType = (typeof EvmAddressCriterionType)[keyof typeof EvmAddressCriterionType];
215
+ export declare const EvmAddressCriterionType: {
216
+ readonly evmAddress: "evmAddress";
217
+ };
218
+ /**
219
+ * The operator to use for the comparison. The transaction's `to` field will be on the left-hand side of the operator, and the `addresses` field will be on the right-hand side.
220
+ */
221
+ export type EvmAddressCriterionOperator = (typeof EvmAddressCriterionOperator)[keyof typeof EvmAddressCriterionOperator];
222
+ export declare const EvmAddressCriterionOperator: {
223
+ readonly in: "in";
224
+ readonly not_in: "not in";
225
+ };
226
+ /**
227
+ * A schema for specifying a criterion for the `to` field of an EVM transaction.
228
+ */
229
+ export interface EvmAddressCriterion {
230
+ /** The type of criterion to use. This should be `evmAddress`. */
231
+ type: EvmAddressCriterionType;
232
+ /** A list of 0x-prefixed EVM addresses that the transaction's `to` field should be compared to. There is a limit of 100 addresses per criterion. */
233
+ addresses: string[];
234
+ /** The operator to use for the comparison. The transaction's `to` field will be on the left-hand side of the operator, and the `addresses` field will be on the right-hand side. */
235
+ operator: EvmAddressCriterionOperator;
236
+ }
237
+ export type SignEvmTransactionCriteriaItem = EthValueCriterion | EvmAddressCriterion;
238
+ /**
239
+ * A schema for specifying the rejection criteria for the SignEvmTransaction operation.
240
+ */
241
+ export type SignEvmTransactionCriteria = SignEvmTransactionCriteriaItem[];
242
+ /**
243
+ * The type of criterion to use. This should be `solAddress`.
244
+ */
245
+ export type SolAddressCriterionType = (typeof SolAddressCriterionType)[keyof typeof SolAddressCriterionType];
246
+ export declare const SolAddressCriterionType: {
247
+ readonly solAddress: "solAddress";
248
+ };
249
+ /**
250
+ * The operator to use for the comparison. Each of the addresses in the transaction's `accountKeys` (for legacy transactions) or `staticAccountKeys` (for V0 transactions) array will be on the left-hand side of the operator, and the addresses field will be on the right-hand side.
251
+ */
252
+ export type SolAddressCriterionOperator = (typeof SolAddressCriterionOperator)[keyof typeof SolAddressCriterionOperator];
253
+ export declare const SolAddressCriterionOperator: {
254
+ readonly in: "in";
255
+ readonly not_in: "not in";
256
+ };
257
+ /**
258
+ * The criterion for the recipient addresses of a Solana transaction.
259
+ */
260
+ export interface SolAddressCriterion {
261
+ /** The type of criterion to use. This should be `solAddress`. */
262
+ type: SolAddressCriterionType;
263
+ /** The Solana addresses that are compared to the list of addresses in the transaction's `accountKeys` (for legacy transactions) or `staticAccountKeys` (for V0 transactions) array. */
264
+ addresses: string[];
265
+ /** The operator to use for the comparison. Each of the addresses in the transaction's `accountKeys` (for legacy transactions) or `staticAccountKeys` (for V0 transactions) array will be on the left-hand side of the operator, and the addresses field will be on the right-hand side. */
266
+ operator: SolAddressCriterionOperator;
267
+ }
268
+ /**
269
+ * A schema for specifying the rejection criteria for the SignSolTransaction operation.
270
+ */
271
+ export type SignSolTransactionCriteria = SolAddressCriterion[];
272
+ /**
273
+ * Whether matching the rule will cause the request to be rejected or accepted.
274
+ */
275
+ export type RuleAction = (typeof RuleAction)[keyof typeof RuleAction];
276
+ export declare const RuleAction: {
277
+ readonly reject: "reject";
278
+ readonly accept: "accept";
279
+ };
280
+ /**
281
+ * The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
282
+ */
283
+ export type RuleOperation = (typeof RuleOperation)[keyof typeof RuleOperation];
284
+ export declare const RuleOperation: {
285
+ readonly signEvmTransaction: "signEvmTransaction";
286
+ readonly signSolTransaction: "signSolTransaction";
287
+ };
288
+ /**
289
+ * The set of criteria for the rule. There is a limit of 10 criteria per rule.
290
+ */
291
+ export type RuleCriteria = SignEvmTransactionCriteria | SignSolTransactionCriteria;
292
+ /**
293
+ * A rule that limits the behavior of an account.
294
+ */
295
+ export interface Rule {
296
+ /** Whether matching the rule will cause the request to be rejected or accepted. */
297
+ action: RuleAction;
298
+ /** The operation to which the rule applies. Every element of the `criteria` array must match the specified operation. */
299
+ operation: RuleOperation;
300
+ /** The set of criteria for the rule. There is a limit of 10 criteria per rule. */
301
+ criteria: RuleCriteria;
302
+ }
303
+ /**
304
+ * The scope of the policy. Only one project-level policy can exist at any time.
305
+ */
306
+ export type PolicyScope = (typeof PolicyScope)[keyof typeof PolicyScope];
307
+ export declare const PolicyScope: {
308
+ readonly project: "project";
309
+ readonly account: "account";
310
+ };
311
+ export interface Policy {
312
+ /**
313
+ * The unique identifier for the policy.
314
+ * @pattern ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
315
+ */
316
+ id: string;
317
+ /**
318
+ * An optional human-readable description of the policy.
319
+ Policy descriptions can consist of alphanumeric characters, spaces, commas, and periods, and be 50 characters or less.
320
+ * @pattern ^[A-Za-z0-9 ,.]{1,50}$
321
+ */
322
+ description?: string;
323
+ /** The scope of the policy. Only one project-level policy can exist at any time. */
324
+ scope: PolicyScope;
325
+ /** A list of rules that comprise the policy. */
326
+ rules: Rule[];
327
+ /** The ISO 8601 timestamp at which the Policy was created. */
328
+ createdAt: string;
329
+ /** The ISO 8601 timestamp at which the Policy was last updated. */
330
+ updatedAt: string;
331
+ }
176
332
  export interface SolanaAccount {
177
333
  /**
178
334
  * The base58 encoded Solana address.
@@ -191,6 +347,14 @@ export interface SolanaAccount {
191
347
  * Internal server error.
192
348
  */
193
349
  export type InternalServerErrorResponse = Error;
350
+ /**
351
+ * Bad gateway.
352
+ */
353
+ export type BadGatewayErrorResponse = Error;
354
+ /**
355
+ * Service unavailable.
356
+ */
357
+ export type ServiceUnavailableErrorResponse = Error;
194
358
  /**
195
359
  * Idempotency key conflict.
196
360
  */
@@ -367,6 +531,60 @@ export type RequestEvmFaucet200 = {
367
531
  **Note:** In rare cases, when gas conditions are unusually high, the transaction may not confirm, and the system may issue a replacement transaction to complete the faucet request. In these rare cases, the `transactionHash` will be out of sync with the actual faucet transaction that was confirmed onchain. */
368
532
  transactionHash: string;
369
533
  };
534
+ export type ListPoliciesParams = {
535
+ /**
536
+ * The number of policies to return per page.
537
+ */
538
+ pageSize?: number;
539
+ /**
540
+ * The token for the next page of policies, if any.
541
+ */
542
+ pageToken?: string;
543
+ /**
544
+ * The scope of the policies to return. If `project`, the response will include exactly one policy, which is the project-level policy. If `account`, the response will include all account-level policies for the developer's CDP Project.
545
+ */
546
+ scope?: ListPoliciesScope;
547
+ };
548
+ export type ListPoliciesScope = (typeof ListPoliciesScope)[keyof typeof ListPoliciesScope];
549
+ export declare const ListPoliciesScope: {
550
+ readonly project: "project";
551
+ readonly account: "account";
552
+ };
553
+ export type ListPolicies200AllOf = {
554
+ /** The list of policies. */
555
+ policies: Policy[];
556
+ };
557
+ export type ListPolicies200 = ListPolicies200AllOf & ListResponse;
558
+ /**
559
+ * The scope of the policy.
560
+ */
561
+ export type CreatePolicyBodyScope = (typeof CreatePolicyBodyScope)[keyof typeof CreatePolicyBodyScope];
562
+ export declare const CreatePolicyBodyScope: {
563
+ readonly project: "project";
564
+ readonly account: "account";
565
+ };
566
+ export type CreatePolicyBody = {
567
+ /** The scope of the policy. */
568
+ scope: CreatePolicyBodyScope;
569
+ /**
570
+ * An optional human-readable description for the policy.
571
+ Policy descriptions can consist of alphanumeric characters, spaces, commas, and periods, and be 50 characters or less.
572
+ * @pattern ^[A-Za-z0-9 ,.]{1,50}$
573
+ */
574
+ description?: string;
575
+ /** A list of rules that comprise the policy. There is a limit of 10 rules per policy. */
576
+ rules: Rule[];
577
+ };
578
+ export type UpdatePolicyBody = {
579
+ /**
580
+ * An optional human-readable description for the policy.
581
+ Policy descriptions can consist of alphanumeric characters, spaces, commas, and periods, and be 50 characters or less.
582
+ * @pattern ^[A-Za-z0-9 ,.]{1,50}$
583
+ */
584
+ description?: string;
585
+ /** A list of rules that comprise the policy. There is a limit of 10 rules per policy. */
586
+ rules: Rule[];
587
+ };
370
588
  export type ListSolanaAccountsParams = {
371
589
  /**
372
590
  * The number of accounts to return per page.
@@ -1 +1 @@
1
- {"version":3,"file":"coinbaseDeveloperPlatformAPIs.schemas.d.ts","sourceRoot":"","sources":["../../../openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,oDAAoD;IACpD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAGnE,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;CAeZ,CAAC;AAEX;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB,SAAS,EAAE,SAAS,CAAC;IACrB,yBAAyB;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,wHAAwH;IACxH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,qLAAqL;IACrL,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,OAAO;IACtB;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,MAAM,uBAAuB,GACjC,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,OAAO,uBAAuB,CAAC,CAAC;AAGzE,eAAO,MAAM,uBAAuB;;;CAG1B,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAChC,CAAC,OAA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AG;IACrC,6CAA6C;IAC7C,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,gEAAgE;IAChE,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,4BAA4B,GACtC,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,OAAO,4BAA4B,CAAC,CAAC;AAGnF,eAAO,MAAM,4BAA4B;;;CAG/B,CAAC;AAEX,MAAM,MAAM,uBAAuB,GAAG;IACpC;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,KAAK,EAAE,4BAA4B,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,0EAA0E;IAC1E,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC"}
1
+ {"version":3,"file":"coinbaseDeveloperPlatformAPIs.schemas.d.ts","sourceRoot":"","sources":["../../../openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,oDAAoD;IACpD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAGnE,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;CAkBZ,CAAC;AAEX;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB,SAAS,EAAE,SAAS,CAAC;IACrB,yBAAyB;IACzB,YAAY,EAA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B,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,0EAA0E;IAC1E,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC"}
@@ -1,6 +1,7 @@
1
- export * from "./evm-accounts/evm-accounts.msw.js";
2
1
  export * from "./faucets/faucets.msw.js";
3
- export * from "./evm-smart-accounts/evm-smart-accounts.msw.js";
2
+ export * from "./evm-accounts/evm-accounts.msw.js";
4
3
  export * from "./evm-token-balances/evm-token-balances.msw.js";
4
+ export * from "./evm-smart-accounts/evm-smart-accounts.msw.js";
5
+ export * from "./policy-engine/policy-engine.msw.js";
5
6
  export * from "./solana-accounts/solana-accounts.msw.js";
6
7
  //# sourceMappingURL=index.msw.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.msw.d.ts","sourceRoot":"","sources":["../../../openapi-client/generated/index.msw.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC;AACnD,cAAc,0BAA0B,CAAC;AACzC,cAAc,gDAAgD,CAAC;AAC/D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,0CAA0C,CAAC"}
1
+ {"version":3,"file":"index.msw.d.ts","sourceRoot":"","sources":["../../../openapi-client/generated/index.msw.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC;AACnD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,sCAAsC,CAAC;AACrD,cAAc,0CAA0C,CAAC"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Generated by orval v7.6.0 🍺
3
+ * Do not edit manually.
4
+ * Coinbase Developer Platform APIs
5
+ * The Coinbase Developer Platform APIs - leading the world's transition onchain.
6
+ * OpenAPI spec version: 2.0.0
7
+ */
8
+ import type { CreatePolicyBody, ListPolicies200, ListPoliciesParams, Policy, UpdatePolicyBody } from "../coinbaseDeveloperPlatformAPIs.schemas.js";
9
+ import { cdpApiClient } from "../../cdpApiClient.js";
10
+ type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
11
+ /**
12
+ * Lists the policies belonging to the developer's CDP Project. Use the `scope` parameter to filter the policies by scope.
13
+ The response is paginated, and by default, returns 20 policies per page.
14
+ * @summary List policies
15
+ */
16
+ export declare const listPolicies: (params?: ListPoliciesParams, options?: SecondParameter<typeof cdpApiClient>) => Promise<ListPolicies200>;
17
+ /**
18
+ * Create a policy that can be used to govern the behavior of accounts.
19
+ * @summary Create a policy
20
+ */
21
+ export declare const createPolicy: (createPolicyBody: CreatePolicyBody, options?: SecondParameter<typeof cdpApiClient>) => Promise<Policy>;
22
+ /**
23
+ * Get a policy by its ID.
24
+ * @summary Get a policy by ID
25
+ */
26
+ export declare const getPolicyById: (policyId: string, options?: SecondParameter<typeof cdpApiClient>) => Promise<Policy>;
27
+ /**
28
+ * Delete a policy by its ID. This will have the effect of removing the policy from all accounts that are currently using it.
29
+ * @summary Delete a policy
30
+ */
31
+ export declare const deletePolicy: (policyId: string, options?: SecondParameter<typeof cdpApiClient>) => Promise<void>;
32
+ /**
33
+ * Updates a policy by its ID. This will have the effect of applying the updated policy to all accounts that are currently using it.
34
+ * @summary Update a policy
35
+ */
36
+ export declare const updatePolicy: (policyId: string, updatePolicyBody: UpdatePolicyBody, options?: SecondParameter<typeof cdpApiClient>) => Promise<Policy>;
37
+ export type ListPoliciesResult = NonNullable<Awaited<ReturnType<typeof listPolicies>>>;
38
+ export type CreatePolicyResult = NonNullable<Awaited<ReturnType<typeof createPolicy>>>;
39
+ export type GetPolicyByIdResult = NonNullable<Awaited<ReturnType<typeof getPolicyById>>>;
40
+ export type DeletePolicyResult = NonNullable<Awaited<ReturnType<typeof deletePolicy>>>;
41
+ export type UpdatePolicyResult = NonNullable<Awaited<ReturnType<typeof updatePolicy>>>;
42
+ export {};
43
+ //# sourceMappingURL=policy-engine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"policy-engine.d.ts","sourceRoot":"","sources":["../../../../openapi-client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C,CAAC,CAAC;AACzF,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC;AACvF,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { http } from "msw";
2
+ import type { EthValueCriterion, EvmAddressCriterion, ListPolicies200, Policy, SolAddressCriterion } from "../coinbaseDeveloperPlatformAPIs.schemas.js";
3
+ export declare const getListPoliciesResponseEthValueCriterionMock: (overrideResponse?: Partial<EthValueCriterion>) => EthValueCriterion;
4
+ export declare const getListPoliciesResponseEvmAddressCriterionMock: (overrideResponse?: Partial<EvmAddressCriterion>) => EvmAddressCriterion;
5
+ export declare const getListPoliciesResponseSolAddressCriterionMock: (overrideResponse?: Partial<SolAddressCriterion>) => SolAddressCriterion;
6
+ export declare const getListPoliciesResponseMock: () => ListPolicies200;
7
+ export declare const getCreatePolicyResponseEthValueCriterionMock: (overrideResponse?: Partial<EthValueCriterion>) => EthValueCriterion;
8
+ export declare const getCreatePolicyResponseEvmAddressCriterionMock: (overrideResponse?: Partial<EvmAddressCriterion>) => EvmAddressCriterion;
9
+ export declare const getCreatePolicyResponseSolAddressCriterionMock: (overrideResponse?: Partial<SolAddressCriterion>) => SolAddressCriterion;
10
+ export declare const getCreatePolicyResponseMock: (overrideResponse?: Partial<Policy>) => Policy;
11
+ export declare const getGetPolicyByIdResponseEthValueCriterionMock: (overrideResponse?: Partial<EthValueCriterion>) => EthValueCriterion;
12
+ export declare const getGetPolicyByIdResponseEvmAddressCriterionMock: (overrideResponse?: Partial<EvmAddressCriterion>) => EvmAddressCriterion;
13
+ export declare const getGetPolicyByIdResponseSolAddressCriterionMock: (overrideResponse?: Partial<SolAddressCriterion>) => SolAddressCriterion;
14
+ export declare const getGetPolicyByIdResponseMock: (overrideResponse?: Partial<Policy>) => Policy;
15
+ export declare const getUpdatePolicyResponseEthValueCriterionMock: (overrideResponse?: Partial<EthValueCriterion>) => EthValueCriterion;
16
+ export declare const getUpdatePolicyResponseEvmAddressCriterionMock: (overrideResponse?: Partial<EvmAddressCriterion>) => EvmAddressCriterion;
17
+ export declare const getUpdatePolicyResponseSolAddressCriterionMock: (overrideResponse?: Partial<SolAddressCriterion>) => SolAddressCriterion;
18
+ export declare const getUpdatePolicyResponseMock: (overrideResponse?: Partial<Policy>) => Policy;
19
+ export declare const getListPoliciesMockHandler: (overrideResponse?: ListPolicies200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<ListPolicies200> | ListPolicies200)) => import("msw").HttpHandler;
20
+ export declare const getCreatePolicyMockHandler: (overrideResponse?: Policy | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<Policy> | Policy)) => import("msw").HttpHandler;
21
+ export declare const getGetPolicyByIdMockHandler: (overrideResponse?: Policy | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<Policy> | Policy)) => import("msw").HttpHandler;
22
+ export declare const getDeletePolicyMockHandler: (overrideResponse?: void | ((info: Parameters<Parameters<typeof http.delete>[1]>[0]) => Promise<void> | void) | undefined) => import("msw").HttpHandler;
23
+ export declare const getUpdatePolicyMockHandler: (overrideResponse?: Policy | ((info: Parameters<Parameters<typeof http.put>[1]>[0]) => Promise<Policy> | Policy)) => import("msw").HttpHandler;
24
+ export declare const getPolicyEngineMock: () => import("msw").HttpHandler[];
25
+ //# sourceMappingURL=policy-engine.msw.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"policy-engine.msw.d.ts","sourceRoot":"","sources":["../../../../openapi-client/generated/policy-engine/policy-engine.msw.ts"],"names":[],"mappings":"AASA,OAAO,EAAuB,IAAI,EAAE,MAAM,KAAK,CAAC;AAEhD,OAAO,KAAK,EACV,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,MAAM,EACN,mBAAmB,EACpB,MAAM,6CAA6C,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,CAAC;AACF,eAAO,MAAM,mBAAmB,mCAM/B,CAAC"}
@@ -4,6 +4,7 @@ export * from "./generated/evm-smart-accounts/evm-smart-accounts.js";
4
4
  export * from "./generated/evm-token-balances/evm-token-balances.js";
5
5
  export * from "./generated/solana-accounts/solana-accounts.js";
6
6
  export * from "./generated/faucets/faucets.js";
7
+ export * from "./generated/policy-engine/policy-engine.js";
7
8
  export declare const CdpOpenApiClient: {
8
9
  configure: (options: import("./cdpApiClient.js").CdpOptions) => void;
9
10
  requestEvmFaucet: (requestEvmFaucetBody: import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").RequestEvmFaucetBody, options?: string | undefined) => Promise<import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").RequestEvmFaucet200>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../openapi-client/index.ts"],"names":[],"mappings":"AAAA,cAAc,sDAAsD,CAAC;AACrE,cAAc,0CAA0C,CAAC;AACzD,cAAc,sDAAsD,CAAC;AACrE,cAAc,sDAAsD,CAAC;AACrE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,gCAAgC,CAAC;AAS/C,eAAO,MAAM,gBAAgB;;uBAsB8Q,yGAA6C,EAAC,4BAAiD;0BAA2gC,+GAAmD,EAAC,4BAAiD;yBAhBh/C,gGAGmB,EAAE,4BAGpB;0BAUQ,gHAAoD,EAAC,4BAAiD;uBAAmW,eAAkB,EAAC,4BAAiD;6BAAgQ,YAAe,EAAC,4BAAiD;4BAAwvB,eAAkB,EAAC,mHAAuD,EAAC,4BAAiD;wBAAijB,eAAkB,EAAC,2GAA+C,EAAC,4BAAiD;2BAJ/1E,mGAGjB,EAAE,eAAiB,EAAC,kGACtB,EAAC,4BAAiD;2BAtBhD,kGAEN,EAAC,4BAEG;4BAciB,mHAGD,EAAC,4BACX;yBAA0W,eAAkB,EAAC,4BAAiD;2BAAqS,eAAkB,EAAC,iHAAqD,EAAC,4BAAiD;uBAAuX,eAAkB,EA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,EAAC,qGAAyC,EAAC,4BAAiD;CAfzwJ,CAAC;AAEF,eAAO,MAAM,iBAAiB;;2BAOZ,mGAEZ,EAAC,eAAkB,EAAC,kGAGlB,EAAC,4BAAiD;2BAvBjC,kGAAsC,EAAC,4BAG5D;4BAeY,mHAEI,EAAC,4BAGP;yBAC8S,eAAkB,EAAC,4BAAiD;2BAAqS,eAAkB,EAAC,iHAAqD,EAAC,4BAAiD;uBAAuX,eAAkB,EAAC,kBAAqB,EAAC,4BAAiD;wBAA2f,eAAkB,EAAC,kBAAqB,EAAC,2GAA+C,EAAC,4BAAiD;sBAtBv1D,6FAEX,EAAC,4BAGV;uBAaW,0GAGV,EAAC,4BACX;oBAAmV,eAAe,EAAC,4BAA+C;0BAAoO,YAAe,EAAC,4BAAiD;yBAA68D,eAAkB,EAAC,6GAAiD,EAAC,4BAAiD;yBAA8wB,eAAkB,EAAC,6GAAiD,EAAC,4BAAiD;kBAAgY,eAAkB,EAAC,+FAAmC,EAAC,4BAAiD;qBAAqjB,eAAkB,EAAC,qGAAyC,EAAC,4BAAiD;CARzwJ,CAAC;AAEF,eAAO,MAAM,oBAAoB;;yBAb/B,gGAEF,EAAE,4BAIiB;0BAYA,gHACR,EAAC,4BAAiD;uBAAmW,eAAkB,EAAC,4BAAiD;6BAAgQ,YAAe,EAAC,4BAAiD;4BAAwvB,eAAkB,EAAC,mHAAuD,EAAC,4BAAiD;wBAAijB,eAAkB,EAAC,2GAA+C,EAAC,4BAAiD;CAH7zE,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,OAAO,gBAAgB,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const version = "1.5.0";
1
+ export declare const version = "1.7.0";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1,12 +1,24 @@
1
1
  import { type Hex, type TransactionSerializable, serializeTransaction } from "viem";
2
2
 
3
+ import {
4
+ listTokenBalances,
5
+ type ListTokenBalancesResult,
6
+ type ListTokenBalancesOptions,
7
+ } from "../../actions/evm/listTokenBalances.js";
8
+ import {
9
+ requestFaucet,
10
+ type RequestFaucetOptions,
11
+ type RequestFaucetResult,
12
+ } from "../../actions/evm/requestFaucet.js";
13
+ import { sendTransaction } from "../../actions/evm/sendTransaction.js";
3
14
  import { accountTransferStrategy } from "../../actions/evm/transfer/accountTransferStrategy.js";
4
15
  import { transfer } from "../../actions/evm/transfer/transfer.js";
5
16
 
17
+ import type { EvmServerAccount } from "./types.js";
18
+ import type { SendTransactionOptions } from "../../actions/evm/sendTransaction.js";
6
19
  import type { TransferResult } from "../../actions/evm/transfer/types.js";
7
20
  import type { CdpOpenApiClientType, EvmAccount } from "../../openapi-client/index.js";
8
21
  import type { Address, Hash } from "../../types/misc.js";
9
- import type { EvmServerAccount } from "../types.js";
10
22
 
11
23
  /**
12
24
  * Options for converting a pre-existing EvmAccount to a EvmServerAccount.
@@ -58,6 +70,28 @@ export function toEvmServerAccount(
58
70
  async transfer(transferArgs): Promise<TransferResult> {
59
71
  return transfer(apiClient, account, transferArgs, accountTransferStrategy);
60
72
  },
73
+ async listTokenBalances(
74
+ options: Omit<ListTokenBalancesOptions, "address">,
75
+ ): Promise<ListTokenBalancesResult> {
76
+ return listTokenBalances(apiClient, {
77
+ ...options,
78
+ address: this.address,
79
+ });
80
+ },
81
+ async requestFaucet(
82
+ options: Omit<RequestFaucetOptions, "address">,
83
+ ): Promise<RequestFaucetResult> {
84
+ return requestFaucet(apiClient, {
85
+ ...options,
86
+ address: this.address,
87
+ });
88
+ },
89
+ async sendTransaction(options: Omit<SendTransactionOptions, "address">) {
90
+ return sendTransaction(apiClient, {
91
+ ...options,
92
+ address: this.address,
93
+ });
94
+ },
61
95
  name: options.account.name,
62
96
  type: "evm-server",
63
97
  };
@@ -1,13 +1,35 @@
1
+ import { getUserOperation } from "../../actions/evm/getUserOperation.js";
2
+ import {
3
+ listTokenBalances,
4
+ type ListTokenBalancesOptions,
5
+ type ListTokenBalancesResult,
6
+ } from "../../actions/evm/listTokenBalances.js";
7
+ import {
8
+ RequestFaucetResult,
9
+ RequestFaucetOptions,
10
+ requestFaucet,
11
+ } from "../../actions/evm/requestFaucet.js";
12
+ import {
13
+ type SendUserOperationOptions,
14
+ type SendUserOperationReturnType,
15
+ sendUserOperation,
16
+ } from "../../actions/evm/sendUserOperation.js";
1
17
  import { smartAccountTransferStrategy } from "../../actions/evm/transfer/smartAccountTransferStrategy.js";
2
18
  import { transfer } from "../../actions/evm/transfer/transfer.js";
19
+ import {
20
+ waitForUserOperation,
21
+ WaitForUserOperationOptions,
22
+ WaitForUserOperationReturnType,
23
+ } from "../../actions/evm/waitForUserOperation.js";
24
+ import { GetUserOperationOptions, UserOperation } from "../../client/evm/evm.types.js";
3
25
 
26
+ import type { EvmAccount, EvmSmartAccount } from "./types.js";
4
27
  import type { TransferResult } from "../../actions/evm/transfer/types.js";
5
28
  import type {
6
29
  CdpOpenApiClientType,
7
30
  EvmSmartAccount as EvmSmartAccountModel,
8
31
  } from "../../openapi-client/index.js";
9
32
  import type { Address } from "../../types/misc.js";
10
- import type { EvmAccount, EvmSmartAccount } from "../types.js";
11
33
 
12
34
  /**
13
35
  * Options for converting a pre-existing EvmSmartAccount and owner to a EvmSmartAccount
@@ -41,6 +63,46 @@ export function toEvmSmartAccount(
41
63
  async transfer(transferArgs): Promise<TransferResult> {
42
64
  return transfer(apiClient, account, transferArgs, smartAccountTransferStrategy);
43
65
  },
66
+ async listTokenBalances(
67
+ options: Omit<ListTokenBalancesOptions, "address">,
68
+ ): Promise<ListTokenBalancesResult> {
69
+ return listTokenBalances(apiClient, {
70
+ ...options,
71
+ address: this.address,
72
+ });
73
+ },
74
+ async sendUserOperation(
75
+ options: Omit<SendUserOperationOptions<unknown[]>, "smartAccount">,
76
+ ): Promise<SendUserOperationReturnType> {
77
+ return sendUserOperation(apiClient, {
78
+ ...options,
79
+ smartAccount: account,
80
+ });
81
+ },
82
+ async waitForUserOperation(
83
+ options: Omit<WaitForUserOperationOptions, "smartAccountAddress">,
84
+ ): Promise<WaitForUserOperationReturnType> {
85
+ return waitForUserOperation(apiClient, {
86
+ ...options,
87
+ smartAccountAddress: account.address,
88
+ });
89
+ },
90
+ async getUserOperation(
91
+ options: Omit<GetUserOperationOptions, "smartAccount">,
92
+ ): Promise<UserOperation> {
93
+ return getUserOperation(apiClient, {
94
+ ...options,
95
+ smartAccount: account,
96
+ });
97
+ },
98
+ async requestFaucet(
99
+ options: Omit<RequestFaucetOptions, "address">,
100
+ ): Promise<RequestFaucetResult> {
101
+ return requestFaucet(apiClient, {
102
+ ...options,
103
+ address: account.address,
104
+ });
105
+ },
44
106
  name: options.smartAccount.name,
45
107
  type: "evm-smart",
46
108
  };
@@ -1,9 +1,9 @@
1
1
  import { SignableMessage, TransactionSerializable, TypedData, TypedDataDefinition } from "viem";
2
2
 
3
- import { Actions } from "../actions/evm/types.js";
4
- import { Prettify } from "../types/utils.js";
3
+ import { Prettify } from "../../types/utils.js";
5
4
 
6
- import type { Hash, Hex, Address } from "../types/misc.js";
5
+ import type { AccountActions, SmartAccountActions } from "../../actions/evm/types.js";
6
+ import type { Hash, Hex, Address } from "../../types/misc.js";
7
7
 
8
8
  /**
9
9
  * Base type for any Ethereum account with signing capabilities.
@@ -32,7 +32,7 @@ export type EvmAccount = {
32
32
  */
33
33
  export type EvmServerAccount = Prettify<
34
34
  EvmAccount &
35
- Actions & {
35
+ AccountActions & {
36
36
  /** Optional name for the server account. */
37
37
  name?: string;
38
38
  /** Indicates this is a server-managed account. */
@@ -53,5 +53,5 @@ export type EvmSmartAccount = Prettify<
53
53
  owners: EvmAccount[];
54
54
  /** Identifier for the smart account type. */
55
55
  type: "evm-smart";
56
- } & Actions
56
+ } & SmartAccountActions
57
57
  >;
@@ -0,0 +1,59 @@
1
+ import { Account, SolanaAccount } from "./types.js";
2
+ import { requestFaucet } from "../../actions/solana/requestFaucet.js";
3
+ import { signMessage } from "../../actions/solana/signMessage.js";
4
+ import { signTransaction } from "../../actions/solana/signTransaction.js";
5
+ import {
6
+ RequestFaucetOptions,
7
+ SignatureResult,
8
+ SignMessageOptions,
9
+ SignTransactionOptions,
10
+ } from "../../client/solana/solana.types.js";
11
+ import { CdpOpenApiClientType } from "../../openapi-client/index.js";
12
+ /**
13
+ * Options for converting a pre-existing EvmAccount to a EvmServerAccount.
14
+ */
15
+ export type ToSolanaAccountOptions = {
16
+ /** The Solana account that was previously created. */
17
+ account: Account;
18
+ };
19
+
20
+ /**
21
+ * Creates a Solana account instance with actions from an existing Solana account.
22
+ * Use this to interact with previously deployed Solana accounts, rather than creating new ones.
23
+ *
24
+ * @param {CdpOpenApiClientType} apiClient - The API client.
25
+ * @param {ToSolanaAccountOptions} options - Configuration options.
26
+ * @param {Account} options.account - The Solana account that was previously created.
27
+ * @returns {SolanaAccount} A configured SolanaAccount instance ready for signing.
28
+ */
29
+ export function toSolanaAccount(
30
+ apiClient: CdpOpenApiClientType,
31
+ options: ToSolanaAccountOptions,
32
+ ): SolanaAccount {
33
+ const account: SolanaAccount = {
34
+ address: options.account.address,
35
+ name: options.account.name,
36
+ async requestFaucet(options: Omit<RequestFaucetOptions, "address">): Promise<SignatureResult> {
37
+ return requestFaucet(apiClient, {
38
+ ...options,
39
+ address: account.address,
40
+ });
41
+ },
42
+ async signMessage(options: Omit<SignMessageOptions, "address">): Promise<SignatureResult> {
43
+ return signMessage(apiClient, {
44
+ ...options,
45
+ address: account.address,
46
+ });
47
+ },
48
+ async signTransaction(
49
+ options: Omit<SignTransactionOptions, "address">,
50
+ ): Promise<SignatureResult> {
51
+ return signTransaction(apiClient, {
52
+ ...options,
53
+ address: account.address,
54
+ });
55
+ },
56
+ };
57
+
58
+ return account;
59
+ }