@coinbase/cdp-sdk 1.2.0 → 1.3.1

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 (115) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +116 -1
  3. package/_cjs/analytics.js +25 -6
  4. package/_cjs/analytics.js.map +1 -1
  5. package/_cjs/auth/hooks/axios/withAuth.js +1 -0
  6. package/_cjs/auth/hooks/axios/withAuth.js.map +1 -1
  7. package/_cjs/client/cdp.js +2 -0
  8. package/_cjs/client/cdp.js.map +1 -1
  9. package/_cjs/client/evm/evm.js +119 -0
  10. package/_cjs/client/evm/evm.js.map +1 -1
  11. package/_cjs/openapi-client/cdpApiClient.js +16 -50
  12. package/_cjs/openapi-client/cdpApiClient.js.map +1 -1
  13. package/_cjs/openapi-client/errors.js +38 -3
  14. package/_cjs/openapi-client/errors.js.map +1 -1
  15. package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +12 -1
  16. package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
  17. package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.js +39 -4
  18. package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.js.map +1 -1
  19. package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.msw.js +15 -1
  20. package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.msw.js.map +1 -1
  21. package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js +1 -0
  22. package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js.map +1 -1
  23. package/_cjs/openapi-client/generated/evm-token-balances/evm-token-balances.js +15 -0
  24. package/_cjs/openapi-client/generated/evm-token-balances/evm-token-balances.js.map +1 -0
  25. package/_cjs/openapi-client/generated/evm-token-balances/evm-token-balances.msw.js +45 -0
  26. package/_cjs/openapi-client/generated/evm-token-balances/evm-token-balances.msw.js.map +1 -0
  27. package/_cjs/openapi-client/generated/faucets/faucets.js +2 -1
  28. package/_cjs/openapi-client/generated/faucets/faucets.js.map +1 -1
  29. package/_cjs/openapi-client/generated/index.msw.js +2 -1
  30. package/_cjs/openapi-client/generated/index.msw.js.map +1 -1
  31. package/_cjs/openapi-client/index.js +4 -0
  32. package/_cjs/openapi-client/index.js.map +1 -1
  33. package/_cjs/version.js +1 -1
  34. package/_esm/analytics.js +23 -6
  35. package/_esm/analytics.js.map +1 -1
  36. package/_esm/auth/hooks/axios/withAuth.js +1 -0
  37. package/_esm/auth/hooks/axios/withAuth.js.map +1 -1
  38. package/_esm/client/cdp.js +2 -0
  39. package/_esm/client/cdp.js.map +1 -1
  40. package/_esm/client/evm/evm.js +119 -0
  41. package/_esm/client/evm/evm.js.map +1 -1
  42. package/_esm/openapi-client/cdpApiClient.js +13 -17
  43. package/_esm/openapi-client/cdpApiClient.js.map +1 -1
  44. package/_esm/openapi-client/errors.js +35 -2
  45. package/_esm/openapi-client/errors.js.map +1 -1
  46. package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +11 -0
  47. package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
  48. package/_esm/openapi-client/generated/evm-accounts/evm-accounts.js +37 -3
  49. package/_esm/openapi-client/generated/evm-accounts/evm-accounts.js.map +1 -1
  50. package/_esm/openapi-client/generated/evm-accounts/evm-accounts.msw.js +12 -0
  51. package/_esm/openapi-client/generated/evm-accounts/evm-accounts.msw.js.map +1 -1
  52. package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js +1 -0
  53. package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js.map +1 -1
  54. package/_esm/openapi-client/generated/evm-token-balances/evm-token-balances.js +11 -0
  55. package/_esm/openapi-client/generated/evm-token-balances/evm-token-balances.js.map +1 -0
  56. package/_esm/openapi-client/generated/evm-token-balances/evm-token-balances.msw.js +39 -0
  57. package/_esm/openapi-client/generated/evm-token-balances/evm-token-balances.msw.js.map +1 -0
  58. package/_esm/openapi-client/generated/faucets/faucets.js +2 -1
  59. package/_esm/openapi-client/generated/faucets/faucets.js.map +1 -1
  60. package/_esm/openapi-client/generated/index.msw.js +2 -1
  61. package/_esm/openapi-client/generated/index.msw.js.map +1 -1
  62. package/_esm/openapi-client/index.js +4 -0
  63. package/_esm/openapi-client/index.js.map +1 -1
  64. package/_esm/version.js +1 -1
  65. package/_types/analytics.d.ts +15 -0
  66. package/_types/analytics.d.ts.map +1 -1
  67. package/_types/auth/hooks/axios/withAuth.d.ts.map +1 -1
  68. package/_types/client/cdp.d.ts.map +1 -1
  69. package/_types/client/evm/evm.d.ts +83 -1
  70. package/_types/client/evm/evm.d.ts.map +1 -1
  71. package/_types/client/evm/evm.types.d.ts +100 -4
  72. package/_types/client/evm/evm.types.d.ts.map +1 -1
  73. package/_types/openapi-client/cdpApiClient.d.ts.map +1 -1
  74. package/_types/openapi-client/errors.d.ts +28 -1
  75. package/_types/openapi-client/errors.d.ts.map +1 -1
  76. package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +87 -2
  77. package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
  78. package/_types/openapi-client/generated/evm-accounts/evm-accounts.d.ts +32 -4
  79. package/_types/openapi-client/generated/evm-accounts/evm-accounts.d.ts.map +1 -1
  80. package/_types/openapi-client/generated/evm-accounts/evm-accounts.msw.d.ts +3 -1
  81. package/_types/openapi-client/generated/evm-accounts/evm-accounts.msw.d.ts.map +1 -1
  82. package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts +1 -0
  83. package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts.map +1 -1
  84. package/_types/openapi-client/generated/evm-token-balances/evm-token-balances.d.ts +20 -0
  85. package/_types/openapi-client/generated/evm-token-balances/evm-token-balances.d.ts.map +1 -0
  86. package/_types/openapi-client/generated/evm-token-balances/evm-token-balances.msw.d.ts +6 -0
  87. package/_types/openapi-client/generated/evm-token-balances/evm-token-balances.msw.d.ts.map +1 -0
  88. package/_types/openapi-client/generated/faucets/faucets.d.ts +2 -1
  89. package/_types/openapi-client/generated/faucets/faucets.d.ts.map +1 -1
  90. package/_types/openapi-client/generated/index.msw.d.ts +2 -1
  91. package/_types/openapi-client/generated/index.msw.d.ts.map +1 -1
  92. package/_types/openapi-client/index.d.ts +5 -0
  93. package/_types/openapi-client/index.d.ts.map +1 -1
  94. package/_types/types/misc.d.ts +37 -0
  95. package/_types/types/misc.d.ts.map +1 -1
  96. package/_types/version.d.ts +1 -1
  97. package/analytics.ts +26 -7
  98. package/auth/hooks/axios/withAuth.ts +1 -0
  99. package/client/cdp.ts +3 -0
  100. package/client/evm/evm.ts +134 -1
  101. package/client/evm/evm.types.ts +113 -8
  102. package/openapi-client/cdpApiClient.ts +28 -21
  103. package/openapi-client/errors.ts +37 -1
  104. package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +103 -2
  105. package/openapi-client/generated/evm-accounts/evm-accounts.msw.ts +29 -0
  106. package/openapi-client/generated/evm-accounts/evm-accounts.ts +47 -3
  107. package/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.ts +1 -0
  108. package/openapi-client/generated/evm-token-balances/evm-token-balances.msw.ts +57 -0
  109. package/openapi-client/generated/evm-token-balances/evm-token-balances.ts +37 -0
  110. package/openapi-client/generated/faucets/faucets.ts +2 -1
  111. package/openapi-client/generated/index.msw.ts +2 -1
  112. package/openapi-client/index.ts +4 -0
  113. package/package.json +2 -3
  114. package/types/misc.ts +39 -0
  115. package/version.ts +1 -1
@@ -5,7 +5,7 @@
5
5
  * The Coinbase Developer Platform APIs - leading the world's transition onchain.
6
6
  * OpenAPI spec version: 2.0.0
7
7
  */
8
- import type { CreateEvmAccountBody, EvmAccount, ListEvmAccounts200, ListEvmAccountsParams, SignEvmHash200, SignEvmHashBody, SignEvmMessage200, SignEvmMessageBody, SignEvmTransaction200, SignEvmTransactionBody } from "../coinbaseDeveloperPlatformAPIs.schemas.js";
8
+ import type { CreateEvmAccountBody, EvmAccount, ListEvmAccounts200, ListEvmAccountsParams, SendEvmTransaction200, SendEvmTransactionBody, SignEvmHash200, SignEvmHashBody, SignEvmMessage200, SignEvmMessageBody, SignEvmTransaction200, SignEvmTransactionBody } from "../coinbaseDeveloperPlatformAPIs.schemas.js";
9
9
  import { cdpApiClient } from "../../cdpApiClient.js";
10
10
  type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
11
11
  /**
@@ -29,6 +29,36 @@ export declare const getEvmAccount: (address: string, options?: SecondParameter<
29
29
  * @summary Get an EVM account by name
30
30
  */
31
31
  export declare const getEvmAccountByName: (name: string, options?: SecondParameter<typeof cdpApiClient>) => Promise<EvmAccount>;
32
+ /**
33
+ * Signs a transaction with the given EVM account and sends it to the indicated supported network. This API handles nonce management and gas estimation, leaving the developer to provide only the minimal set of fields necessary to send the transaction. The transaction should be serialized as a hex string using [RLP](https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/).
34
+
35
+ The transaction must be an [EIP-1559 dynamic fee transaction](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1559.md).
36
+
37
+
38
+ **Transaction fields and API behavior**
39
+
40
+ - `to` *(Required)*: The address of the contract or account to send the transaction to.
41
+ - `chainId` *(Ignored)*: The value of the `chainId` field in the transaction is ignored.
42
+ The transaction will be sent to the network indicated by the `network` field in the request body.
43
+
44
+ - `nonce` *(Optional)*: The nonce to use for the transaction. If not provided, the API will assign
45
+ a nonce to the transaction based on the current state of the account.
46
+
47
+ - `maxPriorityFeePerGas` *(Optional)*: The maximum priority fee per gas to use for the transaction.
48
+ If not provided, the API will estimate a value based on current network conditions.
49
+
50
+ - `maxFeePerGas` *(Optional)*: The maximum fee per gas to use for the transaction.
51
+ If not provided, the API will estimate a value based on current network conditions.
52
+
53
+ - `gasLimit` *(Optional)*: The gas limit to use for the transaction. If not provided, the API will estimate a value
54
+ based on the `to` and `data` fields of the transaction.
55
+
56
+ - `value` *(Optional)*: The amount of ETH, in wei, to send with the transaction.
57
+ - `data` *(Optional)*: The data to send with the transaction; only used for contract calls.
58
+ - `accessList` *(Optional)*: The access list to use for the transaction.
59
+ * @summary Send a transaction
60
+ */
61
+ export declare const sendEvmTransaction: (address: string, sendEvmTransactionBody: SendEvmTransactionBody, options?: SecondParameter<typeof cdpApiClient>) => Promise<SendEvmTransaction200>;
32
62
  /**
33
63
  * Signs a transaction with the given EVM account.
34
64
  The transaction should be serialized as a hex string using [RLP](https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/).
@@ -39,9 +69,6 @@ The transaction must be an [EIP-1559 dynamic fee transaction](https://github.com
39
69
  export declare const signEvmTransaction: (address: string, signEvmTransactionBody: SignEvmTransactionBody, options?: SecondParameter<typeof cdpApiClient>) => Promise<SignEvmTransaction200>;
40
70
  /**
41
71
  * Signs an arbitrary 32 byte hash with the given EVM account.
42
-
43
-
44
- **WARNING: This API will likely be deprecated in the future.** It is recommended not to depend on it. Never sign a hash that you didn't generate, as it can be an arbitrary transaction. For example, it might send all of your funds to an attacker.
45
72
  * @summary Sign a hash
46
73
  */
47
74
  export declare const signEvmHash: (address: string, signEvmHashBody: SignEvmHashBody, options?: SecondParameter<typeof cdpApiClient>) => Promise<SignEvmHash200>;
@@ -56,6 +83,7 @@ export type ListEvmAccountsResult = NonNullable<Awaited<ReturnType<typeof listEv
56
83
  export type CreateEvmAccountResult = NonNullable<Awaited<ReturnType<typeof createEvmAccount>>>;
57
84
  export type GetEvmAccountResult = NonNullable<Awaited<ReturnType<typeof getEvmAccount>>>;
58
85
  export type GetEvmAccountByNameResult = NonNullable<Awaited<ReturnType<typeof getEvmAccountByName>>>;
86
+ export type SendEvmTransactionResult = NonNullable<Awaited<ReturnType<typeof sendEvmTransaction>>>;
59
87
  export type SignEvmTransactionResult = NonNullable<Awaited<ReturnType<typeof signEvmTransaction>>>;
60
88
  export type SignEvmHashResult = NonNullable<Awaited<ReturnType<typeof signEvmHash>>>;
61
89
  export type SignEvmMessageResult = NonNullable<Awaited<ReturnType<typeof signEvmMessage>>>;
@@ -1 +1 @@
1
- {"version":3,"file":"evm-accounts.d.ts","sourceRoot":"","sources":["../../../../openapi-client/generated/evm-accounts/evm-accounts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EACV,oBAAoB,EACpB,UAAU,EACV,kBAAkB,EAClB,qBAAqB,EACrB,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,6CAA6C,CAAC;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,KAAK,eAAe,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,OAAO,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/E;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAC1B,SAAS,qBAAqB,EAC9B,UAAU,eAAe,CAAC,OAAO,YAAY,CAAC,gCAM/C,CAAC;AACF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAC3B,uBAAuB,oBAAoB,EAC3C,UAAU,eAAe,CAAC,OAAO,YAAY,CAAC,wBAW/C,CAAC;AACF;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAI,SAAS,MAAM,EAAE,UAAU,eAAe,CAAC,OAAO,YAAY,CAAC,wBAE5F,CAAC;AACF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAC9B,MAAM,MAAM,EACZ,UAAU,eAAe,CAAC,OAAO,YAAY,CAAC,wBAM/C,CAAC;AACF;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAC7B,SAAS,MAAM,EACf,wBAAwB,sBAAsB,EAC9C,UAAU,eAAe,CAAC,OAAO,YAAY,CAAC,mCAW/C,CAAC;AACF;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,GACtB,SAAS,MAAM,EACf,iBAAiB,eAAe,EAChC,UAAU,eAAe,CAAC,OAAO,YAAY,CAAC,4BAW/C,CAAC;AACF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GACzB,SAAS,MAAM,EACf,oBAAoB,kBAAkB,EACtC,UAAU,eAAe,CAAC,OAAO,YAAY,CAAC,+BAW/C,CAAC;AACF,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC,CAAC;AAC7F,MAAM,MAAM,sBAAsB,GAAG,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAC/F,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC;AACzF,MAAM,MAAM,yBAAyB,GAAG,WAAW,CACjD,OAAO,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAChD,CAAC;AACF,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC;AACnG,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC;AACrF,MAAM,MAAM,oBAAoB,GAAG,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"evm-accounts.d.ts","sourceRoot":"","sources":["../../../../openapi-client/generated/evm-accounts/evm-accounts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EACV,oBAAoB,EACpB,UAAU,EACV,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,sBAA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AAC,+BAW/C,CAAC;AACF,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC,CAAC;AAC7F,MAAM,MAAM,sBAAsB,GAAG,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAC/F,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC;AACzF,MAAM,MAAM,yBAAyB,GAAG,WAAW,CACjD,OAAO,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAChD,CAAC;AACF,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC;AACnG,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC;AACnG,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC;AACrF,MAAM,MAAM,oBAAoB,GAAG,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC"}
@@ -1,9 +1,10 @@
1
1
  import { http } from "msw";
2
- import type { EvmAccount, ListEvmAccounts200, SignEvmHash200, SignEvmMessage200, SignEvmTransaction200 } from "../coinbaseDeveloperPlatformAPIs.schemas.js";
2
+ import type { EvmAccount, ListEvmAccounts200, SendEvmTransaction200, SignEvmHash200, SignEvmMessage200, SignEvmTransaction200 } from "../coinbaseDeveloperPlatformAPIs.schemas.js";
3
3
  export declare const getListEvmAccountsResponseMock: () => ListEvmAccounts200;
4
4
  export declare const getCreateEvmAccountResponseMock: (overrideResponse?: Partial<EvmAccount>) => EvmAccount;
5
5
  export declare const getGetEvmAccountResponseMock: (overrideResponse?: Partial<EvmAccount>) => EvmAccount;
6
6
  export declare const getGetEvmAccountByNameResponseMock: (overrideResponse?: Partial<EvmAccount>) => EvmAccount;
7
+ export declare const getSendEvmTransactionResponseMock: (overrideResponse?: Partial<SendEvmTransaction200>) => SendEvmTransaction200;
7
8
  export declare const getSignEvmTransactionResponseMock: (overrideResponse?: Partial<SignEvmTransaction200>) => SignEvmTransaction200;
8
9
  export declare const getSignEvmHashResponseMock: (overrideResponse?: Partial<SignEvmHash200>) => SignEvmHash200;
9
10
  export declare const getSignEvmMessageResponseMock: (overrideResponse?: Partial<SignEvmMessage200>) => SignEvmMessage200;
@@ -11,6 +12,7 @@ export declare const getListEvmAccountsMockHandler: (overrideResponse?: ListEvmA
11
12
  export declare const getCreateEvmAccountMockHandler: (overrideResponse?: EvmAccount | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<EvmAccount> | EvmAccount)) => import("msw").HttpHandler;
12
13
  export declare const getGetEvmAccountMockHandler: (overrideResponse?: EvmAccount | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<EvmAccount> | EvmAccount)) => import("msw").HttpHandler;
13
14
  export declare const getGetEvmAccountByNameMockHandler: (overrideResponse?: EvmAccount | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<EvmAccount> | EvmAccount)) => import("msw").HttpHandler;
15
+ export declare const getSendEvmTransactionMockHandler: (overrideResponse?: SendEvmTransaction200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<SendEvmTransaction200> | SendEvmTransaction200)) => import("msw").HttpHandler;
14
16
  export declare const getSignEvmTransactionMockHandler: (overrideResponse?: SignEvmTransaction200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<SignEvmTransaction200> | SignEvmTransaction200)) => import("msw").HttpHandler;
15
17
  export declare const getSignEvmHashMockHandler: (overrideResponse?: SignEvmHash200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<SignEvmHash200> | SignEvmHash200)) => import("msw").HttpHandler;
16
18
  export declare const getSignEvmMessageMockHandler: (overrideResponse?: SignEvmMessage200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<SignEvmMessage200> | SignEvmMessage200)) => import("msw").HttpHandler;
@@ -1 +1 @@
1
- {"version":3,"file":"evm-accounts.msw.d.ts","sourceRoot":"","sources":["../../../../openapi-client/generated/evm-accounts/evm-accounts.msw.ts"],"names":[],"mappings":"AASA,OAAO,EAAuB,IAAI,EAAE,MAAM,KAAK,CAAC;AAEhD,OAAO,KAAK,EACV,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACtB,MAAM,6CAA6C,CAAC;AAErD,eAAO,MAAM,8BAA8B,QAAO,kBAahD,CAAC;AAEH,eAAO,MAAM,+BAA+B,GAC1C,mBAAkB,OAAO,CAAC,UAAU,CAAM,KACzC,UAOD,CAAC;AAEH,eAAO,MAAM,4BAA4B,GACvC,mBAAkB,OAAO,CAAC,UAAU,CAAM,KACzC,UAOD,CAAC;AAEH,eAAO,MAAM,kCAAkC,GAC7C,mBAAkB,OAAO,CAAC,UAAU,CAAM,KACzC,UAOD,CAAC;AAEH,eAAO,MAAM,iCAAiC,GAC5C,mBAAkB,OAAO,CAAC,qBAAqB,CAAM,KACpD,qBAA6F,CAAC;AAEjG,eAAO,MAAM,0BAA0B,GACrC,mBAAkB,OAAO,CAAC,cAAc,CAAM,KAC7C,cAA8E,CAAC;AAElF,eAAO,MAAM,6BAA6B,GACxC,mBAAkB,OAAO,CAAC,iBAAiB,CAAM,KAChD,iBAAiF,CAAC;AAErF,eAAO,MAAM,6BAA6B,GACxC,mBACI,kBAAkB,GAClB,CAAC,CACC,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAChD,OAAO,CAAC,kBAAkB,CAAC,GA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4B,GACvC,mBACI,iBAAiB,GACjB,CAAC,CACC,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KACjD,OAAO,CAAC,iBAAiB,CAAC,GAAG,iBAAiB,CAAC,8BAgBzD,CAAC;AACF,eAAO,MAAM,kBAAkB,mCAQ9B,CAAC"}
1
+ {"version":3,"file":"evm-accounts.msw.d.ts","sourceRoot":"","sources":["../../../../openapi-client/generated/evm-accounts/evm-accounts.msw.ts"],"names":[],"mappings":"AASA,OAAO,EAAuB,IAAI,EAAE,MAAM,KAAK,CAAC;AAEhD,OAAO,KAAK,EACV,UAAU,EACV,kBAAkB,EAClB,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACtB,MAAM,6CAA6C,CAAC;AAErD,eAAO,MAAM,8BAA8B,QAAO,kBAahD,CAAC;AAEH,eAAO,MAAM,+BAA+B,GAC1C,mBAAkB,OAAO,CAAC,UAAU,CAAM,KACzC,UAOD,CAAC;AAEH,eAAO,MAAM,4BAA4B,GACvC,mBAAkB,OAAO,CAAC,UAAU,CAAM,KACzC,UAOD,CAAC;AAEH,eAAO,MAAM,kCAAkC,GAC7C,mBAAkB,OAAO,CAAC,UAAU,CAAM,KACzC,UAOD,CAAC;AAEH,eAAO,MAAM,iCAAiC,GAC5C,mBAAkB,OAAO,CAAC,qBAAqB,CAAM,KACpD,qBAA2F,CAAC;AAE/F,eAAO,MAAM,iCAAiC,GAC5C,mBAAkB,OAAO,CAAC,qBAAqB,CAAM,KACpD,qBAA6F,CAAC;AAEjG,eAAO,MAAM,0BAA0B,GACrC,mBAAkB,OAAO,CAAC,cAAc,CAAM,KAC7C,cAA8E,CAAC;AAElF,eAAO,MAAM,6BAA6B,GACxC,mBAAkB,OAAO,CAAC,iBAAiB,CAAM,KAChD,iBAAiF,CAAC;AAErF,eAAO,MAAM,6BAA6B,GACxC,mBACI,kBAA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AU,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KACjD,OAAO,CAAC,qBAAqB,CAAC,GAAG,qBAAqB,CAAC,8BAgBjE,CAAC;AAEF,eAAO,MAAM,yBAAyB,GACpC,mBACI,cAAc,GACd,CAAC,CACC,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KACjD,OAAO,CAAC,cAAc,CAAC,GAAG,cAAc,CAAC,8BAgBnD,CAAC;AAEF,eAAO,MAAM,4BAA4B,GACvC,mBACI,iBAAiB,GACjB,CAAC,CACC,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KACjD,OAAO,CAAC,iBAAiB,CAAC,GAAG,iBAAiB,CAAC,8BAgBzD,CAAC;AACF,eAAO,MAAM,kBAAkB,mCAS9B,CAAC"}
@@ -36,6 +36,7 @@ export declare const prepareUserOperation: (address: string, prepareUserOperatio
36
36
  export declare const getUserOperation: (address: string, userOpHash: string, options?: SecondParameter<typeof cdpApiClient>) => Promise<EvmUserOperation>;
37
37
  /**
38
38
  * Sends a user operation with a signature.
39
+ The signature that is sent should be 65 bytes, consisting of the `r`, `s`, and `v` values of the ECDSA signature. Note that the `v` value should conform to the `personal_sign` standard, which means it should be 27 or 28.
39
40
  * @summary Send a user operation
40
41
  */
41
42
  export declare const sendUserOperation: (address: string, userOpHash: string, sendUserOperationBody: SendUserOperationBody, options?: SecondParameter<typeof cdpApiClient>) => Promise<EvmUserOperation>;
@@ -1 +1 @@
1
- {"version":3,"file":"evm-smart-accounts.d.ts","sourceRoot":"","sources":["../../../../openapi-client/generated/evm-smart-accounts/evm-smart-accounts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EACV,yBAA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UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC,CAClD,CAAC;AACF,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC;AACnG,MAAM,MAAM,0BAA0B,GAAG,WAAW,CAClD,OAAO,CAAC,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CACjD,CAAC;AACF,MAAM,MAAM,sBAAsB,GAAG,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAC/F,MAAM,MAAM,uBAAuB,GAAG,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"evm-smart-accounts.d.ts","sourceRoot":"","sources":["../../../../openapi-client/generated/evm-smart-accounts/evm-smart-accounts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EACV,yBAAyB,EACzB,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACvB,0BAA0B,EAC1B,wBAAwB,EACxB,qBAAqB,EACtB,MAAM,6CAA6C,CAAC;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,KAAK,eAAe,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,OAAO,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/E;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAC/B,SAAS,0BAA0B,EACnC,UAAU,eAAe,CAAC,OAAO,YAAY,CAAC,qCAM/C,CAAC;AACF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAChC,2BAA2B,yBAAyB,EACpD,UAAU,eAAe,CAAC,OAAO,YAAY,CAAC,6BAW/C,CAAC;AACF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAC7B,SAAS,MAAM,EACf,U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s - leading the world's transition onchain.
6
+ * OpenAPI spec version: 2.0.0
7
+ */
8
+ import type { ListEvmTokenBalances200, ListEvmTokenBalancesNetwork, ListEvmTokenBalancesParams } 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 token balances of an EVM address on a given network. The balances include ERC-20 tokens and the native gas token (usually ETH). The response is paginated, and by default, returns 20 balances per page.
13
+
14
+ **Note:** This endpoint is still under development and does not yet provide strong freshness guarantees. Specifically, balances of new tokens can, on occasion, take up to ~30 seconds to appear, while balances of tokens already belonging to an address will generally be close to chain tip. Freshness of new token balances will improve over the coming weeks.
15
+ * @summary List EVM token balances
16
+ */
17
+ export declare const listEvmTokenBalances: (network: ListEvmTokenBalancesNetwork, address: string, params?: ListEvmTokenBalancesParams, options?: SecondParameter<typeof cdpApiClient>) => Promise<ListEvmTokenBalances200>;
18
+ export type ListEvmTokenBalancesResult = NonNullable<Awaited<ReturnType<typeof listEvmTokenBalances>>>;
19
+ export {};
20
+ //# sourceMappingURL=evm-token-balances.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evm-token-balances.d.ts","sourceRoot":"","sources":["../../../../openapi-client/generated/evm-token-balances/evm-token-balances.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EACV,uBAAuB,EACvB,2BAA2B,EAC3B,0BAA0B,EAC3B,MAAM,6CAA6C,CAAC;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,KAAK,eAAe,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,OAAO,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/E;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAC/B,SAAS,2BAA2B,EACpC,SAAS,MAAM,EACf,SAAS,0BAA0B,EACnC,UAAU,eAAe,CAAC,OAAO,YAAY,CAAC,qCAM/C,CAAC;AACF,MAAM,MAAM,0BAA0B,GAAG,WAAW,CAClD,OAAO,CAAC,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CACjD,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { http } from "msw";
2
+ import type { ListEvmTokenBalances200 } from "../coinbaseDeveloperPlatformAPIs.schemas.js";
3
+ export declare const getListEvmTokenBalancesResponseMock: () => ListEvmTokenBalances200;
4
+ export declare const getListEvmTokenBalancesMockHandler: (overrideResponse?: ListEvmTokenBalances200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<ListEvmTokenBalances200> | ListEvmTokenBalances200)) => import("msw").HttpHandler;
5
+ export declare const getEvmTokenBalancesMock: () => import("msw").HttpHandler[];
6
+ //# sourceMappingURL=evm-token-balances.msw.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evm-token-balances.msw.d.ts","sourceRoot":"","sources":["../../../../openapi-client/generated/evm-token-balances/evm-token-balances.msw.ts"],"names":[],"mappings":"AASA,OAAO,EAAuB,IAAI,EAAE,MAAM,KAAK,CAAC;AAGhD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAE3F,eAAO,MAAM,mCAAmC,QAAO,uBAkBrD,CAAC;AAEH,eAAO,MAAM,kCAAkC,GAC7C,mBACI,uBAAuB,GACvB,CAAC,CACC,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAChD,OAAO,CAAC,uBAAuB,CAAC,GAAG,uBAAuB,CAAC,8BAgBrE,CAAC;AACF,eAAO,MAAM,uBAAuB,mCAA+C,CAAC"}
@@ -19,7 +19,7 @@ A single blockchain address cannot exceed the specified limits, even if multiple
19
19
 
20
20
  | Token | Amount per Faucet Request |Rolling 24-hour window Rate Limits|
21
21
  |:-----:|:-------------------------:|:--------------------------------:|
22
- | ETH | 0.0001 ETH | 0.001 ETH |
22
+ | ETH | 0.0001 ETH | 0.1 ETH |
23
23
  | USDC | 1 USDC | 10 USDC |
24
24
  | EURC | 1 EURC | 10 EURC |
25
25
  | cbBTC | 0.0001 cbBTC | 0.001 cbBTC |
@@ -39,6 +39,7 @@ A single blockchain address cannot exceed the specified limits, even if multiple
39
39
  | Token | Amount per Faucet Request |Rolling 24-hour window Rate Limits|
40
40
  |:-----:|:-------------------------:|:--------------------------------:|
41
41
  | SOL | 0.00125 SOL | 0.0125 SOL |
42
+ | USDC | 1 USDC | 10 USDC |
42
43
 
43
44
  * @summary Request funds on Solana devnet
44
45
  */
@@ -1 +1 @@
1
- {"version":3,"file":"faucets.d.ts","sourceRoot":"","sources":["../../../../openapi-client/generated/faucets/faucets.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,6CAA6C,CAAC;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,KAAK,eAAe,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,OAAO,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/E;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,gBAAgB,GAC3B,sBAAsB,oBAAoB,EAC1C,UAAU,eAAe,CAAC,OAAO,YAAY,CAAC,iCAW/C,CAAC;AACF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,mBAAmB,GAC9B,yBAAyB,uBAAuB,EAChD,UAAU,eAAe,CAAC,OAAO,YAAY,CAAC,oCAW/C,CAAC;AACF,MAAM,MAAM,sBAAsB,GAAG,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAC/F,MAAM,MAAM,yBAAyB,GAAG,WAAW,CACjD,OAAO,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAChD,CAAC"}
1
+ {"version":3,"file":"faucets.d.ts","sourceRoot":"","sources":["../../../../openapi-client/generated/faucets/faucets.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,6CAA6C,CAAC;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,KAAK,eAAe,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,OAAO,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/E;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,gBAAgB,GAC3B,sBAAsB,oBAAoB,EAC1C,UAAU,eAAe,CAAC,OAAO,YAAY,CAAC,iCAW/C,CAAC;AACF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,mBAAmB,GAC9B,yBAAyB,uBAAuB,EAChD,UAAU,eAAe,CAAC,OAAO,YAAY,CAAC,oCAW/C,CAAC;AACF,MAAM,MAAM,sBAAsB,GAAG,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAC/F,MAAM,MAAM,yBAAyB,GAAG,WAAW,CACjD,OAAO,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAChD,CAAC"}
@@ -1,5 +1,6 @@
1
1
  export * from "./evm-accounts/evm-accounts.msw.js";
2
- export * from "./evm-smart-accounts/evm-smart-accounts.msw.js";
3
2
  export * from "./faucets/faucets.msw.js";
3
+ export * from "./evm-smart-accounts/evm-smart-accounts.msw.js";
4
+ export * from "./evm-token-balances/evm-token-balances.msw.js";
4
5
  export * from "./solana-accounts/solana-accounts.msw.js";
5
6
  //# 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,gDAAgD,CAAC;AAC/D,cAAc,0BAA0B,CAAC;AACzC,cAAc,0CAA0C,CAAC"}
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,6 +1,7 @@
1
1
  export * from "./generated/coinbaseDeveloperPlatformAPIs.schemas.js";
2
2
  export * from "./generated/evm-accounts/evm-accounts.js";
3
3
  export * from "./generated/evm-smart-accounts/evm-smart-accounts.js";
4
+ export * from "./generated/evm-token-balances/evm-token-balances.js";
4
5
  export * from "./generated/solana-accounts/solana-accounts.js";
5
6
  export * from "./generated/faucets/faucets.js";
6
7
  export declare const CdpOpenApiClient: {
@@ -13,6 +14,7 @@ export declare const CdpOpenApiClient: {
13
14
  getSolanaAccountByName: (name: string, options?: string | undefined) => Promise<import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").SolanaAccount>;
14
15
  signSolanaTransaction: (address: string, signSolanaTransactionBody: import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").SignSolanaTransactionBody, options?: string | undefined) => Promise<import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").SignSolanaTransaction200>;
15
16
  signSolanaMessage: (address: string, signSolanaMessageBody: import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").SignSolanaMessageBody, options?: string | undefined) => Promise<import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").SignSolanaMessage200>;
17
+ listEvmTokenBalances: (network: import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").ListEvmTokenBalancesNetwork, address: string, params?: import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").ListEvmTokenBalancesParams, options?: string | undefined) => Promise<import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").ListEvmTokenBalances200>;
16
18
  listEvmSmartAccounts: (params?: import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").ListEvmSmartAccountsParams, options?: string | undefined) => Promise<import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").ListEvmSmartAccounts200>;
17
19
  createEvmSmartAccount: (createEvmSmartAccountBody: import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").CreateEvmSmartAccountBody, options?: string | undefined) => Promise<import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").EvmSmartAccount>;
18
20
  getEvmSmartAccount: (address: string, options?: string | undefined) => Promise<import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").EvmSmartAccount>;
@@ -23,12 +25,14 @@ export declare const CdpOpenApiClient: {
23
25
  createEvmAccount: (createEvmAccountBody?: import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").CreateEvmAccountBody, options?: string | undefined) => Promise<import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").EvmAccount>;
24
26
  getEvmAccount: (address: string, options?: string | undefined) => Promise<import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").EvmAccount>;
25
27
  getEvmAccountByName: (name: string, options?: string | undefined) => Promise<import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").EvmAccount>;
28
+ sendEvmTransaction: (address: string, sendEvmTransactionBody: import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").SendEvmTransactionBody, options?: string | undefined) => Promise<import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").SendEvmTransaction200>;
26
29
  signEvmTransaction: (address: string, signEvmTransactionBody: import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").SignEvmTransactionBody, options?: string | undefined) => Promise<import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").SignEvmTransaction200>;
27
30
  signEvmHash: (address: string, signEvmHashBody: import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").SignEvmHashBody, options?: string | undefined) => Promise<import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").SignEvmHash200>;
28
31
  signEvmMessage: (address: string, signEvmMessageBody: import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").SignEvmMessageBody, options?: string | undefined) => Promise<import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").SignEvmMessage200>;
29
32
  };
30
33
  export declare const OpenApiEvmMethods: {
31
34
  requestEvmFaucet: (requestEvmFaucetBody: import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").RequestEvmFaucetBody, options?: string | undefined) => Promise<import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").RequestEvmFaucet200>;
35
+ listEvmTokenBalances: (network: import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").ListEvmTokenBalancesNetwork, address: string, params?: import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").ListEvmTokenBalancesParams, options?: string | undefined) => Promise<import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").ListEvmTokenBalances200>;
32
36
  listEvmSmartAccounts: (params?: import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").ListEvmSmartAccountsParams, options?: string | undefined) => Promise<import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").ListEvmSmartAccounts200>;
33
37
  createEvmSmartAccount: (createEvmSmartAccountBody: import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").CreateEvmSmartAccountBody, options?: string | undefined) => Promise<import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").EvmSmartAccount>;
34
38
  getEvmSmartAccount: (address: string, options?: string | undefined) => Promise<import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").EvmSmartAccount>;
@@ -39,6 +43,7 @@ export declare const OpenApiEvmMethods: {
39
43
  createEvmAccount: (createEvmAccountBody?: import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").CreateEvmAccountBody, options?: string | undefined) => Promise<import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").EvmAccount>;
40
44
  getEvmAccount: (address: string, options?: string | undefined) => Promise<import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").EvmAccount>;
41
45
  getEvmAccountByName: (name: string, options?: string | undefined) => Promise<import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").EvmAccount>;
46
+ sendEvmTransaction: (address: string, sendEvmTransactionBody: import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").SendEvmTransactionBody, options?: string | undefined) => Promise<import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").SendEvmTransaction200>;
42
47
  signEvmTransaction: (address: string, signEvmTransactionBody: import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").SignEvmTransactionBody, options?: string | undefined) => Promise<import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").SignEvmTransaction200>;
43
48
  signEvmHash: (address: string, signEvmHashBody: import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").SignEvmHashBody, options?: string | undefined) => Promise<import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").SignEvmHash200>;
44
49
  signEvmMessage: (address: string, signEvmMessageBody: import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").SignEvmMessageBody, options?: string | undefined) => Promise<import("./generated/coinbaseDeveloperPlatformAPIs.schemas.js").SignEvmMessage200>;
@@ -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,gDAAgD,CAAC;AAC/D,cAAc,gCAAgC,CAAC;AAQ/C,eAAO,MAAM,gBAAgB;;uBAoB4d,yGAA6C,EAAC,4BAAiD;0BAAk8B,+GAAmD,EAAC,4BAAiD;yBAJxnD,gGAAoC,EAAC,4BAGP;0BAC4L,gHAAoD,EAA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 export type AccessList = readonly {
5
+ address: Address;
6
+ storageKeys: readonly Hex[];
7
+ }[];
8
+ export type TransactionRequestEIP1559 = {
9
+ /** The address of the contract or account to send the transaction to. */
10
+ to: Address;
11
+ /** The amount of ETH, in wei, to send with the transaction. */
12
+ value?: bigint | undefined;
13
+ /** The data to send with the transaction; only used for contract calls. */
14
+ data?: Hex | undefined;
15
+ /** The amount of gas to use for the transaction. */
16
+ gas?: bigint | undefined;
17
+ /**
18
+ * The nonce to use for the transaction.
19
+ * If not provided, the API will assign a nonce to the transaction based on the current state of the account.
20
+ */
21
+ nonce?: number | undefined;
22
+ /**
23
+ * The maximum fee per gas to use for the transaction.
24
+ * If not provided, the API will estimate a value based on current network conditions.
25
+ */
26
+ maxFeePerGas?: bigint | undefined;
27
+ /**
28
+ * The maximum priority fee per gas to use for the transaction.
29
+ * If not provided, the API will estimate a value based on current network conditions.
30
+ */
31
+ maxPriorityFeePerGas?: bigint | undefined;
32
+ /** The access list to use for the transaction. */
33
+ accessList?: AccessList | undefined;
34
+ /** (Ignored) The value of the `chainId` field in the transaction is ignored. */
35
+ chainId?: number | undefined;
36
+ /** (Ignored) Ignored in favor of the account address that is sending the transaction. */
37
+ from?: Address | undefined;
38
+ /** (Ignored) The transaction type is always `eip1559`. */
39
+ type?: "eip1559" | undefined;
40
+ };
4
41
  //# sourceMappingURL=misc.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"misc.d.ts","sourceRoot":"","sources":["../../types/misc.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAG,GAAG,KAAK,MAAM,EAAE,CAAC;AAChC,MAAM,MAAM,IAAI,GAAG,KAAK,MAAM,EAAE,CAAC;AACjC,MAAM,MAAM,OAAO,GAAG,KAAK,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"misc.d.ts","sourceRoot":"","sources":["../../types/misc.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAG,GAAG,KAAK,MAAM,EAAE,CAAC;AAChC,MAAM,MAAM,IAAI,GAAG,KAAK,MAAM,EAAE,CAAC;AACjC,MAAM,MAAM,OAAO,GAAG,KAAK,MAAM,EAAE,CAAC;AAEpC,MAAM,MAAM,UAAU,GAAG,SAAS;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,SAAS,GAAG,EAAE,CAAC;CAC7B,EAAE,CAAC;AAEJ,MAAM,MAAM,yBAAyB,GAAG;IACtC,yEAAyE;IACzE,EAAE,EAAE,OAAO,CAAC;IACZ,+DAA+D;IAC/D,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,2EAA2E;IAC3E,IAAI,CAAC,EAAE,GAAG,GAAG,SAAS,CAAC;IACvB,oDAAoD;IACpD,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,kDAAkD;IAClD,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACpC,gFAAgF;IAChF,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,yFAAyF;IACzF,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3B,0DAA0D;IAC1D,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CAC9B,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const version = "1.2.0";
1
+ export declare const version = "1.3.1";
2
2
  //# sourceMappingURL=version.d.ts.map
package/analytics.ts CHANGED
@@ -28,6 +28,28 @@ type ErrorEventData = {
28
28
 
29
29
  type EventData = ErrorEventData;
30
30
 
31
+ // This is a public client id for the analytics service
32
+ const publicClientId = "54f2ee2fb3d2b901a829940d70fbfc13";
33
+
34
+ /**
35
+ * AnalyticsConfig singleton class for holding the API key ID
36
+ */
37
+ export class AnalyticsConfig {
38
+ /**
39
+ * The API key ID
40
+ */
41
+ public static apiKeyId: string;
42
+
43
+ /**
44
+ * Sets the API key ID
45
+ *
46
+ * @param apiKeyId - The API key ID
47
+ */
48
+ public static set(apiKeyId: string): void {
49
+ AnalyticsConfig.apiKeyId = apiKeyId;
50
+ }
51
+ }
52
+
31
53
  /**
32
54
  * Sends an analytics event to the default endpoint
33
55
  *
@@ -38,12 +60,12 @@ export async function sendEvent(event: EventData): Promise<void> {
38
60
  const timestamp = Date.now();
39
61
 
40
62
  const enhancedEvent = {
63
+ user_id: AnalyticsConfig.apiKeyId,
41
64
  event_type: event.name,
42
65
  platform: "server",
66
+ timestamp,
43
67
  event_properties: {
44
- platform: "server",
45
68
  project_name: "cdp-sdk",
46
- time_start: timestamp,
47
69
  cdp_sdk_language: "typescript",
48
70
  ...event,
49
71
  },
@@ -56,6 +78,7 @@ export async function sendEvent(event: EventData): Promise<void> {
56
78
  const checksum = md5(stringifiedEventData + uploadTime);
57
79
 
58
80
  const analyticsServiceData = {
81
+ client: publicClientId,
59
82
  e: stringifiedEventData,
60
83
  checksum,
61
84
  };
@@ -64,7 +87,7 @@ export async function sendEvent(event: EventData): Promise<void> {
64
87
  const eventPath = "/amp";
65
88
  const eventEndPoint = `${apiEndpoint}${eventPath}`;
66
89
 
67
- const response = await fetch(eventEndPoint, {
90
+ await fetch(eventEndPoint, {
68
91
  method: "POST",
69
92
  mode: "no-cors",
70
93
  headers: {
@@ -72,10 +95,6 @@ export async function sendEvent(event: EventData): Promise<void> {
72
95
  },
73
96
  body: JSON.stringify(analyticsServiceData),
74
97
  });
75
-
76
- if (!response.ok) {
77
- throw new Error(`HTTP error! status: ${response.status}`);
78
- }
79
98
  }
80
99
 
81
100
  /**
@@ -108,6 +108,7 @@ export function withAuth(axiosClient: AxiosInstance, options: AuthInterceptorOpt
108
108
  headers: error.response?.headers,
109
109
  data: error.response?.data,
110
110
  message: error.message,
111
+ cause: error.cause,
111
112
  };
112
113
 
113
114
  console.error("Response Error:", errorDetails);
package/client/cdp.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { AnalyticsConfig } from "../analytics.js";
1
2
  import { CdpOpenApiClient } from "../openapi-client/index.js";
2
3
  import { version } from "../version.js";
3
4
  import { EvmClient } from "./evm/evm.js";
@@ -107,6 +108,8 @@ For more information, see: https://github.com/coinbase/cdp-sdk/blob/main/typescr
107
108
  sourceVersion: version,
108
109
  });
109
110
 
111
+ AnalyticsConfig.set(apiKeyId);
112
+
110
113
  this.evm = new EvmClient();
111
114
  this.solana = new SolanaClient();
112
115
  }
package/client/evm/evm.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Address } from "viem";
1
+ import { Address, serializeTransaction } from "viem";
2
2
 
3
3
  import {
4
4
  CreateServerAccountOptions,
@@ -23,6 +23,10 @@ import {
23
23
  GetUserOperationOptions,
24
24
  ListSmartAccountResult,
25
25
  ListSmartAccountsOptions,
26
+ ListTokenBalancesOptions,
27
+ ListTokenBalancesResult,
28
+ SendTransactionOptions,
29
+ TransactionResult,
26
30
  } from "./evm.types.js";
27
31
  import { toEvmServerAccount } from "../../accounts/evm/toEvmServerAccount.js";
28
32
  import { toEvmSmartAccount } from "../../accounts/evm/toEvmSmartAccount.js";
@@ -294,6 +298,65 @@ export class EvmClient implements EvmClientInterface {
294
298
  };
295
299
  }
296
300
 
301
+ /**
302
+ * Lists CDP EVM token balances.
303
+ *
304
+ * @param {ListTokenBalancesOptions} options - Parameters for listing the token balances.
305
+ * @param {number} [options.pageSize] - The number of token balances to return.
306
+ * @param {string} [options.pageToken] - The page token to begin listing from.
307
+ * This is obtained by previous calls to this method.
308
+ *
309
+ * @returns A promise that resolves to an array of token balances, and a token to paginate through the token balances.
310
+ *
311
+ * @example
312
+ * ```ts
313
+ * const tokenBalances = await cdp.evm.listTokenBalances({
314
+ * address: "0x1234567890123456789012345678901234567890",
315
+ * network: "base-sepolia",
316
+ * });
317
+ * ```
318
+ *
319
+ * @example
320
+ * **With pagination**
321
+ * ```ts
322
+ * let page = await cdp.evm.listTokenBalances({
323
+ * address: "0x1234567890123456789012345678901234567890",
324
+ * network: "base-sepolia",
325
+ * });
326
+ *
327
+ * while (page.nextPageToken) {
328
+ * page = await cdp.evm.listTokenBalances({
329
+ * address: "0x1234567890123456789012345678901234567890",
330
+ * network: "base-sepolia",
331
+ * pageToken: page.nextPageToken,
332
+ * });
333
+ * }
334
+ */
335
+ async listTokenBalances(options: ListTokenBalancesOptions): Promise<ListTokenBalancesResult> {
336
+ const response = await CdpOpenApiClient.listEvmTokenBalances(options.network, options.address, {
337
+ pageSize: options.pageSize,
338
+ pageToken: options.pageToken,
339
+ });
340
+
341
+ const balances = response.balances.map(balance => {
342
+ return {
343
+ token: {
344
+ network: balance.token.network,
345
+ contractAddress: balance.token.contractAddress as Address,
346
+ },
347
+ amount: {
348
+ amount: BigInt(balance.amount.amount),
349
+ decimals: BigInt(balance.amount.decimals),
350
+ },
351
+ };
352
+ });
353
+
354
+ return {
355
+ balances,
356
+ nextPageToken: response.nextPageToken,
357
+ };
358
+ }
359
+
297
360
  /**
298
361
  * Lists CDP EVM smart accounts.
299
362
  *
@@ -413,6 +476,76 @@ export class EvmClient implements EvmClientInterface {
413
476
  };
414
477
  }
415
478
 
479
+ /**
480
+ * Signs an EVM transaction and sends it to the specified network using the Coinbase API.
481
+ * This method handles nonce management and gas estimation automatically.
482
+ *
483
+ * @param {SendTransactionOptions} options - Configuration options for sending the transaction.
484
+ * @returns A promise that resolves to the transaction hash.
485
+ *
486
+ * @example
487
+ * **Sending an RLP-encoded transaction**
488
+ * ```ts
489
+ * import { parseEther, serializeTransaction } from "viem";
490
+ * import { baseSepolia } from "viem/chains";
491
+ *
492
+ * const { transactionHash } = await cdp.evm.sendTransaction({
493
+ * address: account.address,
494
+ * transaction: serializeTransaction({
495
+ * to: "0x4252e0c9A3da5A2700e7d91cb50aEf522D0C6Fe8",
496
+ * value: parseEther("0.000001"),
497
+ * chainId: baseSepolia.id,
498
+ * // Fields below are optional, CDP API will populate them if omitted.
499
+ * // nonce
500
+ * // maxPriorityFeePerGas
501
+ * // maxFeePerGas
502
+ * // gas
503
+ * }),
504
+ * network: "base-sepolia",
505
+ * });
506
+ * ```
507
+ * @example
508
+ * **Sending an EIP-1559 transaction request object**
509
+ * ```ts
510
+ * const { transactionHash } = await cdp.evm.sendTransaction({
511
+ * address: account.address,
512
+ * transaction: {
513
+ * to: "0x4252e0c9A3da5A2700e7d91cb50aEf522D0C6Fe8",
514
+ * value: parseEther("0.000001"),
515
+ * // Fields below are optional, CDP API will populate them if omitted.
516
+ * // nonce
517
+ * // maxPriorityFeePerGas
518
+ * // maxFeePerGas
519
+ * // gas
520
+ * },
521
+ * network: "base-sepolia",
522
+ * });
523
+ * ```
524
+ */
525
+ async sendTransaction(options: SendTransactionOptions): Promise<TransactionResult> {
526
+ const { address, network, idempotencyKey } = options;
527
+ let transaction = options.transaction;
528
+
529
+ if (typeof transaction !== "string") {
530
+ transaction = serializeTransaction({
531
+ ...transaction,
532
+ // chainId is ignored in favor of network
533
+ chainId: 1,
534
+ type: "eip1559",
535
+ });
536
+ }
537
+
538
+ const result = await CdpOpenApiClient.sendEvmTransaction(
539
+ address,
540
+ { transaction, network },
541
+ idempotencyKey,
542
+ );
543
+
544
+ return {
545
+ transactionHash: result.transactionHash as Hex,
546
+ };
547
+ }
548
+
416
549
  /**
417
550
  * Sends a user operation.
418
551
  *