@coinbase/cdp-sdk 1.4.0 → 1.6.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 (121) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +123 -2
  3. package/_cjs/accounts/evm/toEvmServerAccount.js +26 -0
  4. package/_cjs/accounts/evm/toEvmServerAccount.js.map +1 -1
  5. package/_cjs/accounts/evm/toEvmSmartAccount.js +35 -2
  6. package/_cjs/accounts/evm/toEvmSmartAccount.js.map +1 -1
  7. package/_cjs/actions/evm/listTokenBalances.js +33 -0
  8. package/_cjs/actions/evm/listTokenBalances.js.map +1 -0
  9. package/_cjs/actions/evm/requestFaucet.js +18 -0
  10. package/_cjs/actions/evm/requestFaucet.js.map +1 -0
  11. package/_cjs/actions/evm/sendTransaction.js +29 -0
  12. package/_cjs/actions/evm/sendTransaction.js.map +1 -0
  13. package/_cjs/actions/evm/sendUserOperation.js +5 -6
  14. package/_cjs/actions/evm/sendUserOperation.js.map +1 -1
  15. package/_cjs/actions/evm/transfer/accountTransferStrategy.js +72 -0
  16. package/_cjs/actions/evm/transfer/accountTransferStrategy.js.map +1 -0
  17. package/_cjs/actions/evm/transfer/smartAccountTransferStrategy.js +67 -0
  18. package/_cjs/actions/evm/transfer/smartAccountTransferStrategy.js.map +1 -0
  19. package/_cjs/actions/evm/transfer/transfer.js +59 -0
  20. package/_cjs/actions/evm/transfer/transfer.js.map +1 -0
  21. package/_cjs/actions/evm/transfer/types.js +3 -0
  22. package/_cjs/actions/evm/transfer/types.js.map +1 -0
  23. package/_cjs/actions/evm/transfer/utils.js +39 -0
  24. package/_cjs/actions/evm/transfer/utils.js.map +1 -0
  25. package/_cjs/actions/evm/types.js +3 -0
  26. package/_cjs/actions/evm/types.js.map +1 -0
  27. package/_cjs/client/evm/evm.js +52 -42
  28. package/_cjs/client/evm/evm.js.map +1 -1
  29. package/_cjs/client/solana/solana.js +42 -0
  30. package/_cjs/client/solana/solana.js.map +1 -1
  31. package/_cjs/utils/serializeTransaction.js +18 -0
  32. package/_cjs/utils/serializeTransaction.js.map +1 -0
  33. package/_cjs/version.js +1 -1
  34. package/_esm/accounts/evm/toEvmServerAccount.js +26 -0
  35. package/_esm/accounts/evm/toEvmServerAccount.js.map +1 -1
  36. package/_esm/accounts/evm/toEvmSmartAccount.js +35 -2
  37. package/_esm/accounts/evm/toEvmSmartAccount.js.map +1 -1
  38. package/_esm/actions/evm/listTokenBalances.js +30 -0
  39. package/_esm/actions/evm/listTokenBalances.js.map +1 -0
  40. package/_esm/actions/evm/requestFaucet.js +15 -0
  41. package/_esm/actions/evm/requestFaucet.js.map +1 -0
  42. package/_esm/actions/evm/sendTransaction.js +26 -0
  43. package/_esm/actions/evm/sendTransaction.js.map +1 -0
  44. package/_esm/actions/evm/sendUserOperation.js +5 -6
  45. package/_esm/actions/evm/sendUserOperation.js.map +1 -1
  46. package/_esm/actions/evm/transfer/accountTransferStrategy.js +69 -0
  47. package/_esm/actions/evm/transfer/accountTransferStrategy.js.map +1 -0
  48. package/_esm/actions/evm/transfer/smartAccountTransferStrategy.js +64 -0
  49. package/_esm/actions/evm/transfer/smartAccountTransferStrategy.js.map +1 -0
  50. package/_esm/actions/evm/transfer/transfer.js +56 -0
  51. package/_esm/actions/evm/transfer/transfer.js.map +1 -0
  52. package/_esm/actions/evm/transfer/types.js +2 -0
  53. package/_esm/actions/evm/transfer/types.js.map +1 -0
  54. package/_esm/actions/evm/transfer/utils.js +35 -0
  55. package/_esm/actions/evm/transfer/utils.js.map +1 -0
  56. package/_esm/actions/evm/types.js +2 -0
  57. package/_esm/actions/evm/types.js.map +1 -0
  58. package/_esm/client/evm/evm.js +52 -42
  59. package/_esm/client/evm/evm.js.map +1 -1
  60. package/_esm/client/solana/solana.js +42 -0
  61. package/_esm/client/solana/solana.js.map +1 -1
  62. package/_esm/utils/serializeTransaction.js +15 -0
  63. package/_esm/utils/serializeTransaction.js.map +1 -0
  64. package/_esm/version.js +1 -1
  65. package/_types/accounts/evm/toEvmServerAccount.d.ts +2 -2
  66. package/_types/accounts/evm/toEvmServerAccount.d.ts.map +1 -1
  67. package/_types/accounts/evm/toEvmSmartAccount.d.ts +4 -4
  68. package/_types/accounts/evm/toEvmSmartAccount.d.ts.map +1 -1
  69. package/_types/accounts/types.d.ts +4 -3
  70. package/_types/accounts/types.d.ts.map +1 -1
  71. package/_types/actions/evm/listTokenBalances.d.ts +76 -0
  72. package/_types/actions/evm/listTokenBalances.d.ts.map +1 -0
  73. package/_types/actions/evm/requestFaucet.d.ts +34 -0
  74. package/_types/actions/evm/requestFaucet.d.ts.map +1 -0
  75. package/_types/actions/evm/sendTransaction.d.ts +42 -0
  76. package/_types/actions/evm/sendTransaction.d.ts.map +1 -0
  77. package/_types/actions/evm/sendUserOperation.d.ts +3 -2
  78. package/_types/actions/evm/sendUserOperation.d.ts.map +1 -1
  79. package/_types/actions/evm/transfer/accountTransferStrategy.d.ts +4 -0
  80. package/_types/actions/evm/transfer/accountTransferStrategy.d.ts.map +1 -0
  81. package/_types/actions/evm/transfer/smartAccountTransferStrategy.d.ts +4 -0
  82. package/_types/actions/evm/transfer/smartAccountTransferStrategy.d.ts.map +1 -0
  83. package/_types/actions/evm/transfer/transfer.d.ts +14 -0
  84. package/_types/actions/evm/transfer/transfer.d.ts.map +1 -0
  85. package/_types/actions/evm/transfer/types.d.ts +71 -0
  86. package/_types/actions/evm/transfer/types.d.ts.map +1 -0
  87. package/_types/actions/evm/transfer/utils.d.ts +631 -0
  88. package/_types/actions/evm/transfer/utils.d.ts.map +1 -0
  89. package/_types/actions/evm/types.d.ts +230 -0
  90. package/_types/actions/evm/types.d.ts.map +1 -0
  91. package/_types/client/evm/evm.d.ts +22 -3
  92. package/_types/client/evm/evm.d.ts.map +1 -1
  93. package/_types/client/evm/evm.types.d.ts +20 -137
  94. package/_types/client/evm/evm.types.d.ts.map +1 -1
  95. package/_types/client/solana/solana.d.ts +17 -1
  96. package/_types/client/solana/solana.d.ts.map +1 -1
  97. package/_types/client/solana/solana.types.d.ts +8 -0
  98. package/_types/client/solana/solana.types.d.ts.map +1 -1
  99. package/_types/utils/serializeTransaction.d.ts +9 -0
  100. package/_types/utils/serializeTransaction.d.ts.map +1 -0
  101. package/_types/version.d.ts +1 -1
  102. package/accounts/evm/toEvmServerAccount.ts +46 -6
  103. package/accounts/evm/toEvmSmartAccount.ts +68 -4
  104. package/accounts/types.ts +20 -16
  105. package/actions/evm/listTokenBalances.ts +107 -0
  106. package/actions/evm/requestFaucet.ts +46 -0
  107. package/actions/evm/sendTransaction.ts +73 -0
  108. package/actions/evm/sendUserOperation.ts +6 -6
  109. package/actions/evm/transfer/accountTransferStrategy.ts +84 -0
  110. package/actions/evm/transfer/smartAccountTransferStrategy.ts +72 -0
  111. package/actions/evm/transfer/transfer.ts +71 -0
  112. package/actions/evm/transfer/types.ts +81 -0
  113. package/actions/evm/transfer/utils.ts +39 -0
  114. package/actions/evm/types.ts +244 -0
  115. package/client/evm/evm.ts +70 -63
  116. package/client/evm/evm.types.ts +32 -149
  117. package/client/solana/solana.ts +43 -0
  118. package/client/solana/solana.types.ts +9 -0
  119. package/package.json +1 -1
  120. package/utils/serializeTransaction.ts +17 -0
  121. package/version.ts +1 -1
@@ -0,0 +1,230 @@
1
+ import { SendUserOperationReturnType, SendUserOperationOptions } from "./sendUserOperation.js";
2
+ import type { ListTokenBalancesResult, ListTokenBalancesOptions } from "./listTokenBalances.js";
3
+ import type { RequestFaucetOptions, RequestFaucetResult } from "./requestFaucet.js";
4
+ import type { SendTransactionOptions, TransactionResult } from "./sendTransaction.js";
5
+ import type { TransferOptions, TransferResult } from "./transfer/types.js";
6
+ import type { WaitForUserOperationOptions, WaitForUserOperationReturnType } from "./waitForUserOperation.js";
7
+ export type Actions = {
8
+ /**
9
+ * Transfer an amount of a token from an account to another account.
10
+ *
11
+ * @param options - The options for the transfer.
12
+ * @param options.to - The account or 0x-prefixed address to transfer the token to.
13
+ * @param options.amount - The amount of the token to transfer.
14
+ * @param options.token - The token to transfer.
15
+ * @param options.network - The network to transfer the token on.
16
+ *
17
+ * @returns The result of the transfer.
18
+ *
19
+ * @example
20
+ * ```typescript
21
+ * const { status } = await sender.transfer({
22
+ * to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
23
+ * amount: "0.01",
24
+ * token: "usdc",
25
+ * network: "base-sepolia",
26
+ * });
27
+ * ```
28
+ *
29
+ * @example
30
+ * **Pass a bigint value**
31
+ * ```typescript
32
+ * const { status } = await sender.transfer({
33
+ * to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
34
+ * amount: 10000n, // equivalent to 0.01 usdc
35
+ * token: "usdc",
36
+ * network: "base-sepolia",
37
+ * });
38
+ * ```
39
+ *
40
+ * @example
41
+ * **Transfer from a smart account**
42
+ * ```typescript
43
+ * const sender = await cdp.evm.createSmartAccount({
44
+ * owner: await cdp.evm.createAccount({ name: "Owner" }),
45
+ * });
46
+ *
47
+ * const { status } = await sender.transfer({
48
+ * to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
49
+ * amount: "0.01",
50
+ * token: "usdc",
51
+ * network: "base-sepolia",
52
+ * });
53
+ * ```
54
+ *
55
+ * @example
56
+ * **Transfer ETH**
57
+ * ```typescript
58
+ * const { status } = await sender.transfer({
59
+ * to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
60
+ * amount: "0.000001",
61
+ * token: "eth",
62
+ * network: "base-sepolia",
63
+ * });
64
+ * ```
65
+ *
66
+ * @example
67
+ * **Using a contract address**
68
+ * ```typescript
69
+ * const { status } = await sender.transfer({
70
+ * to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
71
+ * amount: "0.000001",
72
+ * token: "0x4200000000000000000000000000000000000006", // WETH on Base Sepolia
73
+ * network: "base-sepolia",
74
+ * });
75
+ * ```
76
+ *
77
+ * @example
78
+ * **Transfer to another account**
79
+ * ```typescript
80
+ * const sender = await cdp.evm.createAccount({ name: "Sender" });
81
+ * const receiver = await cdp.evm.createAccount({ name: "Receiver" });
82
+ *
83
+ * const { status } = await sender.transfer({
84
+ * to: receiver,
85
+ * amount: "0.01",
86
+ * token: "usdc",
87
+ * network: "base-sepolia",
88
+ * });
89
+ * ```
90
+ */
91
+ transfer: (options: TransferOptions) => Promise<TransferResult>;
92
+ /**
93
+ * List the token balances of an account.
94
+ *
95
+ * @param options - The options for the list token balances.
96
+ * @param options.network - The network to list the token balances on.
97
+ *
98
+ * @returns The result of the list token balances.
99
+ *
100
+ * @example
101
+ * ```typescript
102
+ * const balances = await account.listTokenBalances({
103
+ * network: "base-sepolia",
104
+ * });
105
+ * ```
106
+ */
107
+ listTokenBalances: (options: Omit<ListTokenBalancesOptions, "address">) => Promise<ListTokenBalancesResult>;
108
+ /**
109
+ * Requests funds from an EVM faucet.
110
+ *
111
+ * @param {RequestFaucetOptions} options - Parameters for requesting funds from the EVM faucet.
112
+ * @param {string} options.network - The network to request funds from.
113
+ * @param {string} options.token - The token to request funds for.
114
+ * @param {string} [options.idempotencyKey] - An idempotency key.
115
+ *
116
+ * @returns A promise that resolves to the transaction hash.
117
+ *
118
+ * @example
119
+ * ```ts
120
+ * const result = await account.requestFaucet({
121
+ * network: "base-sepolia",
122
+ * token: "eth",
123
+ * });
124
+ * ```
125
+ */
126
+ requestFaucet: (options: Omit<RequestFaucetOptions, "address">) => Promise<RequestFaucetResult>;
127
+ /**
128
+ * Signs an EVM transaction and sends it to the specified network using the Coinbase API.
129
+ * This method handles nonce management and gas estimation automatically.
130
+ *
131
+ * @param {SendTransactionOptions} options - Configuration options for sending the transaction.
132
+ * @returns A promise that resolves to the transaction hash.
133
+ *
134
+ * @example
135
+ * **Sending an RLP-encoded transaction**
136
+ * ```ts
137
+ * import { parseEther, serializeTransaction } from "viem";
138
+ * import { baseSepolia } from "viem/chains";
139
+ *
140
+ * const { transactionHash } = await account.sendTransaction({
141
+ * transaction: serializeTransaction({
142
+ * to: "0x4252e0c9A3da5A2700e7d91cb50aEf522D0C6Fe8",
143
+ * value: parseEther("0.000001"),
144
+ * chainId: baseSepolia.id,
145
+ * // Fields below are optional, CDP API will populate them if omitted.
146
+ * // nonce
147
+ * // maxPriorityFeePerGas
148
+ * // maxFeePerGas
149
+ * // gas
150
+ * }),
151
+ * network: "base-sepolia",
152
+ * });
153
+ * ```
154
+ * @example
155
+ * **Sending an EIP-1559 transaction request object**
156
+ * ```ts
157
+ * const { transactionHash } = await account.sendTransaction({
158
+ * transaction: {
159
+ * to: "0x4252e0c9A3da5A2700e7d91cb50aEf522D0C6Fe8",
160
+ * value: parseEther("0.000001"),
161
+ * // Fields below are optional, CDP API will populate them if omitted.
162
+ * // nonce
163
+ * // maxPriorityFeePerGas
164
+ * // maxFeePerGas
165
+ * // gas
166
+ * },
167
+ * network: "base-sepolia",
168
+ * });
169
+ * ```
170
+ */
171
+ sendTransaction: (options: Omit<SendTransactionOptions, "address">) => Promise<TransactionResult>;
172
+ /**
173
+ * Sends a user operation.
174
+ *
175
+ * @param {SendUserOperationOptions} options - Parameters for sending the user operation.
176
+ * @param {string} options.network - The network to send the user operation on.
177
+ * @param {EvmCall[]} options.calls - The calls to include in the user operation.
178
+ * @param {string} [options.paymasterUrl] - The optional paymaster URL to use for the user operation.
179
+ * @param {string} [options.idempotencyKey] - An idempotency key.
180
+ *
181
+ * @returns A promise that resolves to an object containing the smart account address,
182
+ * the user operation hash, and the status of the user operation.
183
+ *
184
+ * @example
185
+ * ```ts
186
+ * const userOp = await smartAccount.sendUserOperation({
187
+ * network: "base-sepolia",
188
+ * calls: [
189
+ * {
190
+ * to: "0x1234567890123456789012345678901234567890",
191
+ * value: parseEther("0.000001"),
192
+ * data: "0x",
193
+ * },
194
+ * ],
195
+ * });
196
+ * ```
197
+ */
198
+ sendUserOperation: (options: Omit<SendUserOperationOptions<unknown[]>, "smartAccount">) => Promise<SendUserOperationReturnType>;
199
+ /**
200
+ * Waits for a user operation to complete or fail.
201
+ *
202
+ * @param {WaitForUserOperationOptions} options - Parameters for waiting for the user operation.
203
+ * @param {string} options.userOpHash - The user operation hash.
204
+ * @param {WaitOptions} [options.waitOptions] - Optional parameters for the wait operation.
205
+ *
206
+ * @returns A promise that resolves to the transaction receipt.
207
+ *
208
+ * @example
209
+ * ```ts
210
+ * // Send a user operation and get the user operation hash
211
+ * const { userOpHash } = await smartAccount.sendUserOperation({
212
+ * network: "base-sepolia",
213
+ * calls: [
214
+ * {
215
+ * to: "0x0000000000000000000000000000000000000000",
216
+ * value: parseEther("0.000001"),
217
+ * data: "0x",
218
+ * },
219
+ * ],
220
+ * });
221
+ *
222
+ * // Wait for the user operation to complete or fail
223
+ * const result = await smartAccount.waitForUserOperation({
224
+ * userOpHash: userOp.userOpHash,
225
+ * });
226
+ * ```
227
+ */
228
+ waitForUserOperation: (options: Omit<WaitForUserOperationOptions, "smartAccountAddress">) => Promise<WaitForUserOperationReturnType>;
229
+ };
230
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../actions/evm/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAE/F,OAAO,KAAK,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAChG,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACpF,OAAO,KAAK,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACtF,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,KAAK,EACV,2BAA2B,EAC3B,8BAA8B,EAC/B,MAAM,2BAA2B,CAAC;AACnC,MAAM,MAAM,OAAO,GAAG;IACpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkFG;IACH,QAAQ,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IAEhE;;;;;;;;;;;;;;OAcG;IACH,iBAAiB,EAAE,CACjB,OAAO,EAAE,IAAI,CAAC,wBAAwB,EAAE,SAAS,CAAC,KAC/C,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAEtC;;;;;;;;;;;;;;;;;OAiBG;IACH,aAAa,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAEhG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2CG;IACH,eAAe,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,sBAAsB,EAAE,SAAS,CAAC,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAElG;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,iBAAiB,EAAE,CACjB,OAAO,EAAE,IAAI,CAAC,wBAAwB,CAAC,OAAO,EAAE,CAAC,EAAE,cAAc,CAAC,KAC/D,OAAO,CAAC,2BAA2B,CAAC,CAAC;IAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,oBAAoB,EAAE,CACpB,OAAO,EAAE,IAAI,CAAC,2BAA2B,EAAE,qBAAqB,CAAC,KAC9D,OAAO,CAAC,8BAA8B,CAAC,CAAC;CAC9C,CAAC"}
@@ -1,6 +1,9 @@
1
- import { CreateServerAccountOptions, GetServerAccountOptions, ListServerAccountsOptions, CreateSmartAccountOptions, RequestFaucetOptions, SendUserOperationOptions, WaitForUserOperationOptions, RequestFaucetResult, SignHashOptions, SignatureResult, SignMessageOptions, SignTransactionOptions, GetSmartAccountOptions, SmartAccount, ServerAccount, EvmClientInterface, ListServerAccountResult, PrepareUserOperationOptions, UserOperation, GetUserOperationOptions, ListSmartAccountResult, ListSmartAccountsOptions, ListTokenBalancesOptions, ListTokenBalancesResult, SendTransactionOptions, TransactionResult } from "./evm.types.js";
2
- import { SendUserOperationReturnType } from "../../actions/evm/sendUserOperation.js";
1
+ import { CreateServerAccountOptions, GetServerAccountOptions, ListServerAccountsOptions, CreateSmartAccountOptions, WaitForUserOperationOptions, SignHashOptions, SignatureResult, SignMessageOptions, SignTransactionOptions, GetSmartAccountOptions, SmartAccount, ServerAccount, EvmClientInterface, ListServerAccountResult, PrepareUserOperationOptions, UserOperation, GetUserOperationOptions, ListSmartAccountResult, ListSmartAccountsOptions, GetOrCreateServerAccountOptions } from "./evm.types.js";
2
+ import { ListTokenBalancesResult, ListTokenBalancesOptions } from "../../actions/evm/listTokenBalances.js";
3
+ import { RequestFaucetOptions, RequestFaucetResult } from "../../actions/evm/requestFaucet.js";
4
+ import { SendUserOperationOptions, SendUserOperationReturnType } from "../../actions/evm/sendUserOperation.js";
3
5
  import { WaitForUserOperationReturnType } from "../../actions/evm/waitForUserOperation.js";
6
+ import type { TransactionResult, SendTransactionOptions } from "../../actions/evm/sendTransaction.js";
4
7
  /**
5
8
  * The namespace containing all EVM methods.
6
9
  */
@@ -132,6 +135,22 @@ export declare class EvmClient implements EvmClientInterface {
132
135
  * ```
133
136
  */
134
137
  getSmartAccount(options: GetSmartAccountOptions): Promise<SmartAccount>;
138
+ /**
139
+ * Gets a CDP EVM account, or creates one if it doesn't exist.
140
+ *
141
+ * @param {GetOrCreateServerAccountOptions} options - Parameters for getting or creating the account.
142
+ * @param {string} [options.name] - The name of the account to get or create.
143
+ *
144
+ * @returns A promise that resolves to the account.
145
+ *
146
+ * @example
147
+ * ```ts
148
+ * const account = await cdp.evm.getOrCreateAccount({
149
+ * name: "MyAccount",
150
+ * });
151
+ * ```
152
+ */
153
+ getOrCreateAccount(options: GetOrCreateServerAccountOptions): Promise<ServerAccount>;
135
154
  /**
136
155
  * Gets a user operation for a smart account by user operation hash.
137
156
  *
@@ -357,7 +376,7 @@ export declare class EvmClient implements EvmClientInterface {
357
376
  * });
358
377
  * ```
359
378
  */
360
- sendUserOperation(options: SendUserOperationOptions): Promise<SendUserOperationReturnType>;
379
+ sendUserOperation(options: SendUserOperationOptions<unknown[]>): Promise<SendUserOperationReturnType>;
361
380
  /**
362
381
  * Signs an EVM hash.
363
382
  *
@@ -1 +1 @@
1
- {"version":3,"file":"evm.d.ts","sourceRoot":"","sources":["../../../client/evm/evm.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,EACvB,yBAAyB,EACzB,yBAAyB,EACzB,oBAAoB,EACpB,wBAAwB,EACxB,2BAA2B,EAC3B,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,uBAAuB,EACvB,2BAA2B,EAC3B,aAAa,EACb,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,EACvB,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAEL,2BAA2B,EAC5B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAEL,8BAA8B,EAC/B,MAAM,2CAA2C,CAAC;AAInD;;GAEG;AACH,qBAAa,SAAU,YAAW,kBAAkB;IAClD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACG,aAAa,CAAC,OAAO,GAAE,0BAA+B,GAAG,OAAO,CAAC,aAAa,CAAC;IAarF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4CG;IACG,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,YAAY,CAAC;IAcnF;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACG,UAAU,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,aAAa,CAAC;IAkB1E;;;;;;;;;;;;;;;;;;OAkBG;IACG,eAAe,CAAC,OAAO,EAAE,sBAAs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,CAAC;IAUvC;;;;;;;;;;;;;;;;;;;;OAoBG;IACG,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;IAclE;;;;;;;;;;;;;;;;;;;;OAoBG;IACG,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,eAAe,CAAC;IAcxE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACG,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,eAAe,CAAC;IAchF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACG,oBAAoB,CACxB,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,8BAA8B,CAAC;CAK3C"}
@@ -1,9 +1,13 @@
1
- import { EvmAccount as Account, EvmServerAccount as ServerAccount, EvmSmartAccount as SmartAccount } from "../../accounts/types.js";
2
- import { SendUserOperationReturnType } from "../../actions/evm/sendUserOperation.js";
3
- import { EvmUserOperationNetwork, EvmUserOperationStatus, OpenApiEvmMethods, ListEvmTokenBalancesNetwork, SendEvmTransactionBodyNetwork } from "../../openapi-client/index.js";
4
- import { Call, Calls } from "../../types/calls.js";
5
- import { Address, Hex, TransactionRequestEIP1559 } from "../../types/misc.js";
6
- import { WaitOptions } from "../../utils/wait.js";
1
+ import type { EvmAccount as Account, EvmServerAccount as ServerAccount, EvmSmartAccount as SmartAccount } from "../../accounts/types.js";
2
+ import type { ListTokenBalancesOptions, ListTokenBalancesResult } from "../../actions/evm/listTokenBalances.js";
3
+ import type { RequestFaucetOptions, RequestFaucetResult } from "../../actions/evm/requestFaucet.js";
4
+ import type { TransactionResult, SendTransactionOptions } from "../../actions/evm/sendTransaction.js";
5
+ import type { SendUserOperationOptions, SendUserOperationReturnType } from "../../actions/evm/sendUserOperation.js";
6
+ import type { Actions } from "../../actions/evm/types.js";
7
+ import type { EvmUserOperationNetwork, EvmUserOperationStatus, OpenApiEvmMethods } from "../../openapi-client/index.js";
8
+ import type { Calls } from "../../types/calls.js";
9
+ import type { Address, Hex } from "../../types/misc.js";
10
+ import type { WaitOptions } from "../../utils/wait.js";
7
11
  /**
8
12
  * The EvmClient type, where all OpenApiEvmMethods methods are wrapped.
9
13
  */
@@ -12,6 +16,7 @@ export type EvmClientInterface = Omit<typeof OpenApiEvmMethods, "createEvmAccoun
12
16
  createSmartAccount: (options: CreateSmartAccountOptions) => Promise<SmartAccount>;
13
17
  getAccount: (options: GetServerAccountOptions) => Promise<ServerAccount>;
14
18
  getSmartAccount: (options: GetSmartAccountOptions) => Promise<SmartAccount>;
19
+ getOrCreateAccount: (options: GetOrCreateServerAccountOptions) => Promise<ServerAccount>;
15
20
  getUserOperation: (options: GetUserOperationOptions) => Promise<UserOperation>;
16
21
  listAccounts: (options: ListServerAccountsOptions) => Promise<ListServerAccountResult>;
17
22
  listSmartAccounts: (options: ListSmartAccountsOptions) => Promise<ListSmartAccountResult>;
@@ -19,7 +24,7 @@ export type EvmClientInterface = Omit<typeof OpenApiEvmMethods, "createEvmAccoun
19
24
  prepareUserOperation: (options: PrepareUserOperationOptions) => Promise<UserOperation>;
20
25
  requestFaucet: (options: RequestFaucetOptions) => Promise<RequestFaucetResult>;
21
26
  sendTransaction: (options: SendTransactionOptions) => Promise<TransactionResult>;
22
- sendUserOperation: (options: SendUserOperationOptions) => Promise<SendUserOperationReturnType>;
27
+ sendUserOperation: (options: SendUserOperationOptions<unknown[]>) => Promise<SendUserOperationReturnType>;
23
28
  signHash: (options: SignHashOptions) => Promise<SignatureResult>;
24
29
  signMessage: (options: SignMessageOptions) => Promise<SignatureResult>;
25
30
  signTransaction: (options: SignTransactionOptions) => Promise<SignatureResult>;
@@ -108,6 +113,13 @@ export interface GetSmartAccountOptions {
108
113
  /** The owner of the account. */
109
114
  owner: Account;
110
115
  }
116
+ /**
117
+ * Options for getting an EVM account, or creating one if it doesn't exist.
118
+ */
119
+ export interface GetOrCreateServerAccountOptions {
120
+ /** The name of the account. */
121
+ name: string;
122
+ }
111
123
  /**
112
124
  * Options for listing EVM accounts.
113
125
  */
@@ -120,7 +132,7 @@ export interface ListServerAccountsOptions {
120
132
  /**
121
133
  * A smart account that only contains the owner address.
122
134
  */
123
- export interface ReadonlySmartAccount extends Omit<SmartAccount, "owners"> {
135
+ export interface ReadonlySmartAccount extends Omit<SmartAccount, "owners" | keyof Actions> {
124
136
  /** The owners of the smart account. */
125
137
  owners: Address[];
126
138
  }
@@ -168,63 +180,6 @@ export interface CreateSmartAccountOptions {
168
180
  /** The idempotency key. */
169
181
  idempotencyKey?: string;
170
182
  }
171
- /**
172
- * Options for requesting funds from an EVM faucet.
173
- */
174
- export interface RequestFaucetOptions {
175
- /** The address of the account. */
176
- address: string;
177
- /** The network to request funds from. */
178
- network: "base-sepolia" | "ethereum-sepolia";
179
- /** The token to request funds for. */
180
- token: "eth" | "usdc" | "eurc" | "cbbtc";
181
- /** The idempotency key. */
182
- idempotencyKey?: string;
183
- }
184
- /**
185
- * The result of requesting funds from an EVM faucet.
186
- */
187
- export interface RequestFaucetResult {
188
- /** The transaction hash. */
189
- transactionHash: Hex;
190
- }
191
- /**
192
- * Options for sending an EVM transaction.
193
- */
194
- export interface SendTransactionOptions {
195
- /** The address of the account. */
196
- address: Address;
197
- /**
198
- * The transaction to send. The chainId is ignored in favor of the `network` field.
199
- *
200
- * This can be either:
201
- * - An RLP-encoded transaction to sign and send, as a 0x-prefixed hex string, or
202
- * - An EIP-1559 transaction request object.
203
- */
204
- transaction: Hex | TransactionRequestEIP1559;
205
- /**
206
- * The network to send the transaction to.
207
- * The chainId in the `transaction` field is ignored in favor of this field.
208
- */
209
- network: SendEvmTransactionBodyNetwork;
210
- /** The idempotency key. */
211
- idempotencyKey?: string;
212
- }
213
- /**
214
- * Options for sending a user operation.
215
- */
216
- export interface SendUserOperationOptions {
217
- /** The smart account. */
218
- smartAccount: SmartAccount;
219
- /** The network. */
220
- network: EvmUserOperationNetwork;
221
- /** The calls. */
222
- calls: Call[];
223
- /** The paymaster URL. */
224
- paymasterUrl?: string;
225
- /** The idempotency key. */
226
- idempotencyKey?: string;
227
- }
228
183
  /**
229
184
  * Options for signing an EVM hash.
230
185
  */
@@ -265,13 +220,6 @@ export interface SignatureResult {
265
220
  /** The signature. */
266
221
  signature: Hex;
267
222
  }
268
- /**
269
- * Result of a transaction
270
- */
271
- export interface TransactionResult {
272
- /** The hash of the transaction. */
273
- transactionHash: Hex;
274
- }
275
223
  /**
276
224
  * Options for waiting for a user operation.
277
225
  */
@@ -283,69 +231,4 @@ export interface WaitForUserOperationOptions {
283
231
  /** The wait options. */
284
232
  waitOptions?: WaitOptions;
285
233
  }
286
- /**
287
- * Options for listing EVM token balances.
288
- */
289
- export interface ListTokenBalancesOptions {
290
- /** The address of the account. */
291
- address: Address;
292
- /** The network. */
293
- network: ListEvmTokenBalancesNetwork;
294
- /** The page size to paginate through the token balances. */
295
- pageSize?: number;
296
- /** The page token to paginate through the token balances. */
297
- pageToken?: string;
298
- }
299
- /**
300
- * A token on an EVM network, which is either an ERC-20 or a native token (i.e. ETH).
301
- */
302
- export interface EvmToken {
303
- /**
304
- * The contract address of the token. For Ether, the contract address is 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
305
- * per EIP-7528. For ERC-20 tokens, this is the contract address where the token is deployed.
306
- */
307
- contractAddress: Address;
308
- /** The network the token is on. */
309
- network: ListEvmTokenBalancesNetwork;
310
- /**
311
- * The symbol of the token, which is optional and non-unique. Note: This field
312
- * may not be present for most tokens while the API is still under development.
313
- */
314
- symbol?: string;
315
- /**
316
- * The name of the token, which is optional and non-unique. Note: This field
317
- * may not be present for most tokens while the API is still under development.
318
- */
319
- name?: string;
320
- }
321
- /**
322
- * A token amount on an EVM network.
323
- */
324
- export interface EvmTokenAmount {
325
- /** The amount of the token in the smallest indivisible unit of the token. */
326
- amount: bigint;
327
- /** The number of decimals in the token. */
328
- decimals: bigint;
329
- }
330
- /**
331
- * An EVM token balance.
332
- */
333
- export interface EvmTokenBalance {
334
- /** The token. */
335
- token: EvmToken;
336
- /** The amount of the token. */
337
- amount: EvmTokenAmount;
338
- }
339
- /**
340
- * The result of listing EVM token balances.
341
- */
342
- export interface ListTokenBalancesResult {
343
- /** The token balances. */
344
- balances: EvmTokenBalance[];
345
- /**
346
- * The next page token to paginate through the token balances.
347
- * If undefined, there are no more token balances to paginate through.
348
- */
349
- nextPageToken?: string;
350
- }
351
234
  //# sourceMappingURL=evm.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"evm.types.d.ts","sourceRoot":"","sources":["../../../client/evm/evm.types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,IAAI,OAAO,EACrB,gBAAgB,IAAI,aAAa,EACjC,eAAe,IAAI,YAAY,EAChC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AACrF,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,iBAAiB,EACjB,2BAA2B,EAC3B,6BAA6B,EAC9B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,OAAO,iBAAiB,EACtB,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,qBAAqB,GACrB,oBAAoB,GACpB,kBAAkB,GAClB,iBAAiB,GACjB,sBAAsB,GACtB,sBAAsB,GACtB,sBAAsB,GACtB,kBAAkB,GAClB,mBAAmB,GACnB,aAAa,GACb,gBAAgB,GAChB,oBAAoB,GACpB,oBAAoB,CACvB,GAAG;IACF,aAAa,EAAE,CAAC,OAAO,EAAE,0BAA0B,KAAK,OAAO,CAAC,aAAa,CAAC,CAA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2BAA2B;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,kCAAkC;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,2BAA2B;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,2BAA2B;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,kCAAkC;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,wEAAwE;IACxE,WAAW,EAAE,GAAG,CAAC;IACjB,2BAA2B;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,qBAAqB;IACrB,SAAS,EAAE,GAAG,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,iCAAiC;IACjC,mBAAmB,EAAE,OAAO,CAAC;IAC7B,+BAA+B;IAC/B,UAAU,EAAE,GAAG,CAAC;IAChB,wBAAwB;IACxB,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B"}
@@ -1,4 +1,4 @@
1
- import { SolanaClientInterface, Account, CreateAccountOptions, GetAccountOptions, ListAccountsOptions, RequestFaucetOptions, ListAccountsResult, SignatureResult, SignMessageOptions, SignTransactionOptions } from "./solana.types.js";
1
+ import { SolanaClientInterface, Account, CreateAccountOptions, GetAccountOptions, ListAccountsOptions, RequestFaucetOptions, ListAccountsResult, SignatureResult, SignMessageOptions, SignTransactionOptions, GetOrCreateAccountOptions } from "./solana.types.js";
2
2
  /**
3
3
  * The namespace containing all Solana methods.
4
4
  */
@@ -60,6 +60,22 @@ export declare class SolanaClient implements SolanaClientInterface {
60
60
  * ```
61
61
  */
62
62
  getAccount(options: GetAccountOptions): Promise<Account>;
63
+ /**
64
+ * Gets a Solana account by its address.
65
+ *
66
+ * @param {GetOrCreateAccountOptions} options - Parameters for getting or creating the Solana account.
67
+ * @param {string} options.name - The name of the account.
68
+ *
69
+ * @returns A promise that resolves to the account.
70
+ *
71
+ * @example
72
+ * ```ts
73
+ * const account = await cdp.solana.getOrCreateAccount({
74
+ * name: "MyAccount",
75
+ * });
76
+ * ```
77
+ */
78
+ getOrCreateAccount(options: GetOrCreateAccountOptions): Promise<Account>;
63
79
  /**
64
80
  * Lists all Solana accounts.
65
81
  *
@@ -1 +1 @@
1
- {"version":3,"file":"solana.d.ts","sourceRoot":"","sources":["../../../client/solana/solana.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,OAAO,EACP,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,mBAAmB,CAAC;AAG3B;;GAEG;AACH,qBAAa,YAAa,YAAW,qBAAqB;IACxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACG,aAAa,CAAC,OAAO,GAAE,oBAAyB,GAAG,OAAO,CAAC,OAAO,CAAC;IAIzE;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACG,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC;IAY9D;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACG,YAAY,CAAC,OAAO,GAAE,mBAAwB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAYlF;;;;;;;;;;;;;;;;;OAiBG;IACG,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,CAAC;IAW5E;;;;;;;;;;;;;;;;;;;;;OAqBG;IACG,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,eAAe,CAAC;IAUxE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACG,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,eAAe,CAAC;CAajF"}
1
+ {"version":3,"file":"solana.d.ts","sourceRoot":"","sources":["../../../client/solana/solana.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,OAAO,EACP,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,yBAAyB,EAC1B,MAAM,mBAAmB,CAAC;AAI3B;;GAEG;AACH,qBAAa,YAAa,YAAW,qBAAqB;IACxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACG,aAAa,CAAC,OAAO,GAAE,oBAAyB,GAAG,OAAO,CAAC,OAAO,CAAC;IAIzE;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACG,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC;IAY9D;;;;;;;;;;;;;;OAcG;IACG,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,OAAO,CAAC;IA0B9E;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACG,YAAY,CAAC,OAAO,GAAE,mBAAwB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAYlF;;;;;;;;;;;;;;;;;OAiBG;IACG,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,CAAC;IAW5E;;;;;;;;;;;;;;;;;;;;;OAqBG;IACG,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,eAAe,CAAC;IAUxE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACG,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,eAAe,CAAC;CAajF"}
@@ -5,6 +5,7 @@ import { OpenApiSolanaMethods, SolanaAccount as OpenAPISolanaAccount } from "../
5
5
  export type SolanaClientInterface = Omit<typeof OpenApiSolanaMethods, "createSolanaAccount" | "getSolanaAccount" | "getSolanaAccountByName" | "listSolanaAccounts" | "requestSolanaFaucet" | "signSolanaMessage" | "signSolanaTransaction"> & {
6
6
  createAccount: (options: CreateAccountOptions) => Promise<Account>;
7
7
  getAccount: (options: GetAccountOptions) => Promise<Account>;
8
+ getOrCreateAccount: (options: GetOrCreateAccountOptions) => Promise<Account>;
8
9
  listAccounts: (options: ListAccountsOptions) => Promise<ListAccountsResult>;
9
10
  requestFaucet: (options: RequestFaucetOptions) => Promise<SignatureResult>;
10
11
  signMessage: (options: SignMessageOptions) => Promise<SignatureResult>;
@@ -32,6 +33,13 @@ export interface GetAccountOptions {
32
33
  /** The name of the account. */
33
34
  name?: string;
34
35
  }
36
+ /**
37
+ * Options for getting a Solana account.
38
+ */
39
+ export interface GetOrCreateAccountOptions {
40
+ /** The name of the account. */
41
+ name: string;
42
+ }
35
43
  /**
36
44
  * Options for listing Solana accounts.
37
45
  */
@@ -1 +1 @@
1
- {"version":3,"file":"solana.types.d.ts","sourceRoot":"","sources":["../../../client/solana/solana.types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,aAAa,IAAI,oBAAoB,EACtC,MAAM,+BAA+B,CAAC;AACvC;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACtC,OAAO,oBAAoB,EACzB,qBAAqB,GACrB,kBAAkB,GAClB,wBAAwB,GACxB,oBAAoB,GACpB,qBAAqB,GACrB,mBAAmB,GACnB,uBAAuB,CAC1B,GAAG;IACF,aAAa,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACnE,UAAU,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7D,YAAY,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC5E,aAAa,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;IAC3E,WAAW,EAAE,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Ae;IAC9B,qBAAqB;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,9 @@
1
+ import { TransactionRequestEIP1559 } from "../types/misc.js";
2
+ /**
3
+ * Serializes a transaction for the Coinbase API.
4
+ *
5
+ * @param transaction - The transaction to serialize.
6
+ * @returns The serialized transaction.
7
+ */
8
+ export declare function serializeEIP1559Transaction(transaction: TransactionRequestEIP1559): `0x02${string}`;
9
+ //# sourceMappingURL=serializeTransaction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serializeTransaction.d.ts","sourceRoot":"","sources":["../../utils/serializeTransaction.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAE7D;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,yBAAyB,mBAMjF"}
@@ -1,2 +1,2 @@
1
- export declare const version = "1.4.0";
1
+ export declare const version = "1.6.0";
2
2
  //# sourceMappingURL=version.d.ts.map