@coinbase/cdp-sdk 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +88 -1
- package/_cjs/analytics.js +25 -6
- package/_cjs/analytics.js.map +1 -1
- package/_cjs/auth/hooks/axios/withAuth.js +1 -0
- package/_cjs/auth/hooks/axios/withAuth.js.map +1 -1
- package/_cjs/client/cdp.js +2 -0
- package/_cjs/client/cdp.js.map +1 -1
- package/_cjs/client/evm/evm.js +119 -0
- package/_cjs/client/evm/evm.js.map +1 -1
- package/_cjs/openapi-client/cdpApiClient.js +16 -50
- package/_cjs/openapi-client/cdpApiClient.js.map +1 -1
- package/_cjs/openapi-client/errors.js +38 -3
- package/_cjs/openapi-client/errors.js.map +1 -1
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +12 -1
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.js +39 -4
- package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.js.map +1 -1
- package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.msw.js +15 -1
- package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.msw.js.map +1 -1
- package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js +1 -0
- package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js.map +1 -1
- package/_cjs/openapi-client/generated/evm-token-balances/evm-token-balances.js +15 -0
- package/_cjs/openapi-client/generated/evm-token-balances/evm-token-balances.js.map +1 -0
- package/_cjs/openapi-client/generated/evm-token-balances/evm-token-balances.msw.js +45 -0
- package/_cjs/openapi-client/generated/evm-token-balances/evm-token-balances.msw.js.map +1 -0
- package/_cjs/openapi-client/generated/faucets/faucets.js +2 -1
- package/_cjs/openapi-client/generated/faucets/faucets.js.map +1 -1
- package/_cjs/openapi-client/generated/index.msw.js +2 -1
- package/_cjs/openapi-client/generated/index.msw.js.map +1 -1
- package/_cjs/openapi-client/index.js +4 -0
- package/_cjs/openapi-client/index.js.map +1 -1
- package/_cjs/version.js +1 -1
- package/_esm/analytics.js +23 -6
- package/_esm/analytics.js.map +1 -1
- package/_esm/auth/hooks/axios/withAuth.js +1 -0
- package/_esm/auth/hooks/axios/withAuth.js.map +1 -1
- package/_esm/client/cdp.js +2 -0
- package/_esm/client/cdp.js.map +1 -1
- package/_esm/client/evm/evm.js +119 -0
- package/_esm/client/evm/evm.js.map +1 -1
- package/_esm/openapi-client/cdpApiClient.js +13 -17
- package/_esm/openapi-client/cdpApiClient.js.map +1 -1
- package/_esm/openapi-client/errors.js +35 -2
- package/_esm/openapi-client/errors.js.map +1 -1
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +11 -0
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_esm/openapi-client/generated/evm-accounts/evm-accounts.js +37 -3
- package/_esm/openapi-client/generated/evm-accounts/evm-accounts.js.map +1 -1
- package/_esm/openapi-client/generated/evm-accounts/evm-accounts.msw.js +12 -0
- package/_esm/openapi-client/generated/evm-accounts/evm-accounts.msw.js.map +1 -1
- package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js +1 -0
- package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js.map +1 -1
- package/_esm/openapi-client/generated/evm-token-balances/evm-token-balances.js +11 -0
- package/_esm/openapi-client/generated/evm-token-balances/evm-token-balances.js.map +1 -0
- package/_esm/openapi-client/generated/evm-token-balances/evm-token-balances.msw.js +39 -0
- package/_esm/openapi-client/generated/evm-token-balances/evm-token-balances.msw.js.map +1 -0
- package/_esm/openapi-client/generated/faucets/faucets.js +2 -1
- package/_esm/openapi-client/generated/faucets/faucets.js.map +1 -1
- package/_esm/openapi-client/generated/index.msw.js +2 -1
- package/_esm/openapi-client/generated/index.msw.js.map +1 -1
- package/_esm/openapi-client/index.js +4 -0
- package/_esm/openapi-client/index.js.map +1 -1
- package/_esm/version.js +1 -1
- package/_types/analytics.d.ts +15 -0
- package/_types/analytics.d.ts.map +1 -1
- package/_types/auth/hooks/axios/withAuth.d.ts.map +1 -1
- package/_types/client/cdp.d.ts.map +1 -1
- package/_types/client/evm/evm.d.ts +83 -1
- package/_types/client/evm/evm.d.ts.map +1 -1
- package/_types/client/evm/evm.types.d.ts +100 -4
- package/_types/client/evm/evm.types.d.ts.map +1 -1
- package/_types/openapi-client/cdpApiClient.d.ts.map +1 -1
- package/_types/openapi-client/errors.d.ts +28 -1
- package/_types/openapi-client/errors.d.ts.map +1 -1
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +87 -2
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
- package/_types/openapi-client/generated/evm-accounts/evm-accounts.d.ts +32 -4
- package/_types/openapi-client/generated/evm-accounts/evm-accounts.d.ts.map +1 -1
- package/_types/openapi-client/generated/evm-accounts/evm-accounts.msw.d.ts +3 -1
- package/_types/openapi-client/generated/evm-accounts/evm-accounts.msw.d.ts.map +1 -1
- package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts +1 -0
- package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts.map +1 -1
- package/_types/openapi-client/generated/evm-token-balances/evm-token-balances.d.ts +20 -0
- package/_types/openapi-client/generated/evm-token-balances/evm-token-balances.d.ts.map +1 -0
- package/_types/openapi-client/generated/evm-token-balances/evm-token-balances.msw.d.ts +6 -0
- package/_types/openapi-client/generated/evm-token-balances/evm-token-balances.msw.d.ts.map +1 -0
- package/_types/openapi-client/generated/faucets/faucets.d.ts +2 -1
- package/_types/openapi-client/generated/faucets/faucets.d.ts.map +1 -1
- package/_types/openapi-client/generated/index.msw.d.ts +2 -1
- package/_types/openapi-client/generated/index.msw.d.ts.map +1 -1
- package/_types/openapi-client/index.d.ts +5 -0
- package/_types/openapi-client/index.d.ts.map +1 -1
- package/_types/types/misc.d.ts +37 -0
- package/_types/types/misc.d.ts.map +1 -1
- package/_types/version.d.ts +1 -1
- package/analytics.ts +26 -7
- package/auth/hooks/axios/withAuth.ts +1 -0
- package/client/cdp.ts +3 -0
- package/client/evm/evm.ts +134 -1
- package/client/evm/evm.types.ts +113 -8
- package/openapi-client/cdpApiClient.ts +28 -21
- package/openapi-client/errors.ts +37 -1
- package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +103 -2
- package/openapi-client/generated/evm-accounts/evm-accounts.msw.ts +29 -0
- package/openapi-client/generated/evm-accounts/evm-accounts.ts +47 -3
- package/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.ts +1 -0
- package/openapi-client/generated/evm-token-balances/evm-token-balances.msw.ts +57 -0
- package/openapi-client/generated/evm-token-balances/evm-token-balances.ts +37 -0
- package/openapi-client/generated/faucets/faucets.ts +2 -1
- package/openapi-client/generated/index.msw.ts +2 -1
- package/openapi-client/index.ts +4 -0
- package/package.json +1 -1
- package/types/misc.ts +39 -0
- package/version.ts +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateServerAccountOptions, GetServerAccountOptions, ListServerAccountsOptions, CreateSmartAccountOptions, RequestFaucetOptions, SendUserOperationOptions, WaitForUserOperationOptions, RequestFaucetResult, SignHashOptions, SignatureResult, SignMessageOptions, SignTransactionOptions, GetSmartAccountOptions, SmartAccount, ServerAccount, EvmClientInterface, ListServerAccountResult, PrepareUserOperationOptions, UserOperation, GetUserOperationOptions, ListSmartAccountResult, ListSmartAccountsOptions } from "./evm.types.js";
|
|
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
2
|
import { SendUserOperationReturnType } from "../../actions/evm/sendUserOperation.js";
|
|
3
3
|
import { WaitForUserOperationReturnType } from "../../actions/evm/waitForUserOperation.js";
|
|
4
4
|
/**
|
|
@@ -175,6 +175,41 @@ export declare class EvmClient implements EvmClientInterface {
|
|
|
175
175
|
* ```
|
|
176
176
|
*/
|
|
177
177
|
listAccounts(options?: ListServerAccountsOptions): Promise<ListServerAccountResult>;
|
|
178
|
+
/**
|
|
179
|
+
* Lists CDP EVM token balances.
|
|
180
|
+
*
|
|
181
|
+
* @param {ListTokenBalancesOptions} options - Parameters for listing the token balances.
|
|
182
|
+
* @param {number} [options.pageSize] - The number of token balances to return.
|
|
183
|
+
* @param {string} [options.pageToken] - The page token to begin listing from.
|
|
184
|
+
* This is obtained by previous calls to this method.
|
|
185
|
+
*
|
|
186
|
+
* @returns A promise that resolves to an array of token balances, and a token to paginate through the token balances.
|
|
187
|
+
*
|
|
188
|
+
* @example
|
|
189
|
+
* ```ts
|
|
190
|
+
* const tokenBalances = await cdp.evm.listTokenBalances({
|
|
191
|
+
* address: "0x1234567890123456789012345678901234567890",
|
|
192
|
+
* network: "base-sepolia",
|
|
193
|
+
* });
|
|
194
|
+
* ```
|
|
195
|
+
*
|
|
196
|
+
* @example
|
|
197
|
+
* **With pagination**
|
|
198
|
+
* ```ts
|
|
199
|
+
* let page = await cdp.evm.listTokenBalances({
|
|
200
|
+
* address: "0x1234567890123456789012345678901234567890",
|
|
201
|
+
* network: "base-sepolia",
|
|
202
|
+
* });
|
|
203
|
+
*
|
|
204
|
+
* while (page.nextPageToken) {
|
|
205
|
+
* page = await cdp.evm.listTokenBalances({
|
|
206
|
+
* address: "0x1234567890123456789012345678901234567890",
|
|
207
|
+
* network: "base-sepolia",
|
|
208
|
+
* pageToken: page.nextPageToken,
|
|
209
|
+
* });
|
|
210
|
+
* }
|
|
211
|
+
*/
|
|
212
|
+
listTokenBalances(options: ListTokenBalancesOptions): Promise<ListTokenBalancesResult>;
|
|
178
213
|
/**
|
|
179
214
|
* Lists CDP EVM smart accounts.
|
|
180
215
|
*
|
|
@@ -247,6 +282,53 @@ export declare class EvmClient implements EvmClientInterface {
|
|
|
247
282
|
* ```
|
|
248
283
|
*/
|
|
249
284
|
requestFaucet(options: RequestFaucetOptions): Promise<RequestFaucetResult>;
|
|
285
|
+
/**
|
|
286
|
+
* Signs an EVM transaction and sends it to the specified network using the Coinbase API.
|
|
287
|
+
* This method handles nonce management and gas estimation automatically.
|
|
288
|
+
*
|
|
289
|
+
* @param {SendTransactionOptions} options - Configuration options for sending the transaction.
|
|
290
|
+
* @returns A promise that resolves to the transaction hash.
|
|
291
|
+
*
|
|
292
|
+
* @example
|
|
293
|
+
* **Sending an RLP-encoded transaction**
|
|
294
|
+
* ```ts
|
|
295
|
+
* import { parseEther, serializeTransaction } from "viem";
|
|
296
|
+
* import { baseSepolia } from "viem/chains";
|
|
297
|
+
*
|
|
298
|
+
* const { transactionHash } = await cdp.evm.sendTransaction({
|
|
299
|
+
* address: account.address,
|
|
300
|
+
* transaction: serializeTransaction({
|
|
301
|
+
* to: "0x4252e0c9A3da5A2700e7d91cb50aEf522D0C6Fe8",
|
|
302
|
+
* value: parseEther("0.000001"),
|
|
303
|
+
* chainId: baseSepolia.id,
|
|
304
|
+
* // Fields below are optional, CDP API will populate them if omitted.
|
|
305
|
+
* // nonce
|
|
306
|
+
* // maxPriorityFeePerGas
|
|
307
|
+
* // maxFeePerGas
|
|
308
|
+
* // gas
|
|
309
|
+
* }),
|
|
310
|
+
* network: "base-sepolia",
|
|
311
|
+
* });
|
|
312
|
+
* ```
|
|
313
|
+
* @example
|
|
314
|
+
* **Sending an EIP-1559 transaction request object**
|
|
315
|
+
* ```ts
|
|
316
|
+
* const { transactionHash } = await cdp.evm.sendTransaction({
|
|
317
|
+
* address: account.address,
|
|
318
|
+
* transaction: {
|
|
319
|
+
* to: "0x4252e0c9A3da5A2700e7d91cb50aEf522D0C6Fe8",
|
|
320
|
+
* value: parseEther("0.000001"),
|
|
321
|
+
* // Fields below are optional, CDP API will populate them if omitted.
|
|
322
|
+
* // nonce
|
|
323
|
+
* // maxPriorityFeePerGas
|
|
324
|
+
* // maxFeePerGas
|
|
325
|
+
* // gas
|
|
326
|
+
* },
|
|
327
|
+
* network: "base-sepolia",
|
|
328
|
+
* });
|
|
329
|
+
* ```
|
|
330
|
+
*/
|
|
331
|
+
sendTransaction(options: SendTransactionOptions): Promise<TransactionResult>;
|
|
250
332
|
/**
|
|
251
333
|
* Sends a user operation.
|
|
252
334
|
*
|
|
@@ -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,
|
|
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,uBA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C;IAgBhG;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACG,oBAAoB,CAAC,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,aAAa,CAAC;IAuBxF;;;;;;;;;;;;;;;;;;;OAmBG;IACG,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAWhF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6CG;IACG,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAwBlF;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACG,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAShG;;;;;;;;;;;;;;;;;;;;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,13 +1,13 @@
|
|
|
1
|
+
import { EvmAccount as Account, EvmServerAccount as ServerAccount, EvmSmartAccount as SmartAccount } from "../../accounts/types.js";
|
|
1
2
|
import { SendUserOperationReturnType } from "../../actions/evm/sendUserOperation.js";
|
|
3
|
+
import { EvmUserOperationNetwork, EvmUserOperationStatus, OpenApiEvmMethods, ListEvmTokenBalancesNetwork, SendEvmTransactionBodyNetwork } from "../../openapi-client/index.js";
|
|
2
4
|
import { Call, Calls } from "../../types/calls.js";
|
|
3
|
-
import { Address, Hex } from "../../types/misc.js";
|
|
5
|
+
import { Address, Hex, TransactionRequestEIP1559 } from "../../types/misc.js";
|
|
4
6
|
import { WaitOptions } from "../../utils/wait.js";
|
|
5
|
-
import type { EvmAccount as Account, EvmServerAccount as ServerAccount, EvmSmartAccount as SmartAccount } from "../../accounts/types.js";
|
|
6
|
-
import type { EvmUserOperationNetwork, EvmUserOperationStatus, OpenApiEvmMethods } from "../../openapi-client/index.js";
|
|
7
7
|
/**
|
|
8
8
|
* The EvmClient type, where all OpenApiEvmMethods methods are wrapped.
|
|
9
9
|
*/
|
|
10
|
-
export type EvmClientInterface = Omit<typeof OpenApiEvmMethods, "createEvmAccount" | "createEvmSmartAccount" | "getEvmAccount" | "getEvmAccountByName" | "getEvmSmartAccount" | "getUserOperation" | "
|
|
10
|
+
export type EvmClientInterface = Omit<typeof OpenApiEvmMethods, "createEvmAccount" | "createEvmSmartAccount" | "getEvmAccount" | "getEvmAccountByName" | "getEvmSmartAccount" | "getUserOperation" | "listEvmAccounts" | "listEvmSmartAccounts" | "listEvmTokenBalances" | "prepareUserOperation" | "requestEvmFaucet" | "sendUserOperation" | "signEvmHash" | "signEvmMessage" | "signEvmTransaction" | "sendEvmTransaction"> & {
|
|
11
11
|
createAccount: (options: CreateServerAccountOptions) => Promise<ServerAccount>;
|
|
12
12
|
createSmartAccount: (options: CreateSmartAccountOptions) => Promise<SmartAccount>;
|
|
13
13
|
getAccount: (options: GetServerAccountOptions) => Promise<ServerAccount>;
|
|
@@ -15,8 +15,10 @@ export type EvmClientInterface = Omit<typeof OpenApiEvmMethods, "createEvmAccoun
|
|
|
15
15
|
getUserOperation: (options: GetUserOperationOptions) => Promise<UserOperation>;
|
|
16
16
|
listAccounts: (options: ListServerAccountsOptions) => Promise<ListServerAccountResult>;
|
|
17
17
|
listSmartAccounts: (options: ListSmartAccountsOptions) => Promise<ListSmartAccountResult>;
|
|
18
|
+
listTokenBalances: (options: ListTokenBalancesOptions) => Promise<ListTokenBalancesResult>;
|
|
18
19
|
prepareUserOperation: (options: PrepareUserOperationOptions) => Promise<UserOperation>;
|
|
19
20
|
requestFaucet: (options: RequestFaucetOptions) => Promise<RequestFaucetResult>;
|
|
21
|
+
sendTransaction: (options: SendTransactionOptions) => Promise<TransactionResult>;
|
|
20
22
|
sendUserOperation: (options: SendUserOperationOptions) => Promise<SendUserOperationReturnType>;
|
|
21
23
|
signHash: (options: SignHashOptions) => Promise<SignatureResult>;
|
|
22
24
|
signMessage: (options: SignMessageOptions) => Promise<SignatureResult>;
|
|
@@ -186,6 +188,28 @@ export interface RequestFaucetResult {
|
|
|
186
188
|
/** The transaction hash. */
|
|
187
189
|
transactionHash: Hex;
|
|
188
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
|
+
}
|
|
189
213
|
/**
|
|
190
214
|
* Options for sending a user operation.
|
|
191
215
|
*/
|
|
@@ -241,6 +265,13 @@ export interface SignatureResult {
|
|
|
241
265
|
/** The signature. */
|
|
242
266
|
signature: Hex;
|
|
243
267
|
}
|
|
268
|
+
/**
|
|
269
|
+
* Result of a transaction
|
|
270
|
+
*/
|
|
271
|
+
export interface TransactionResult {
|
|
272
|
+
/** The hash of the transaction. */
|
|
273
|
+
transactionHash: Hex;
|
|
274
|
+
}
|
|
244
275
|
/**
|
|
245
276
|
* Options for waiting for a user operation.
|
|
246
277
|
*/
|
|
@@ -252,4 +283,69 @@ export interface WaitForUserOperationOptions {
|
|
|
252
283
|
/** The wait options. */
|
|
253
284
|
waitOptions?: WaitOptions;
|
|
254
285
|
}
|
|
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
|
+
}
|
|
255
351
|
//# 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,
|
|
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,OA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AA2B,CAAC;IACrC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,6EAA6E;IAC7E,MAAM,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,iBAAiB;IACjB,KAAK,EAAE,QAAQ,CAAC;IAChB,+BAA+B;IAC/B,MAAM,EAAE,cAAc,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,0BAA0B;IAC1B,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdpApiClient.d.ts","sourceRoot":"","sources":["../../openapi-client/cdpApiClient.ts"],"names":[],"mappings":"AACA,OAAc,EAAiB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"cdpApiClient.d.ts","sourceRoot":"","sources":["../../openapi-client/cdpApiClient.ts"],"names":[],"mappings":"AACA,OAAc,EAAiB,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAYjE;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB;;;;;;OAMG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;;OAMG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB,qEAAqE;IACrE,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,+DAA+D;IAC/D,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,2FAA2F;IAC3F,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,yEAAyE;IACzE,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,4DAA4D;IAC5D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAIF;;;;GAIG;AACH,eAAO,MAAM,SAAS,GAAI,SAAS,UAAU,SAc5C,CAAC;AA0BF;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,GAAU,CAAC,EAClC,QAAQ,kBAAkB,EAC1B,iBAAiB,MAAM,KACtB,OAAO,CAAC,CAAC,CAuFX,CAAC"}
|
|
@@ -5,6 +5,7 @@ export declare const HttpErrorType: {
|
|
|
5
5
|
readonly not_found: "not_found";
|
|
6
6
|
readonly bad_gateway: "bad_gateway";
|
|
7
7
|
readonly service_unavailable: "service_unavailable";
|
|
8
|
+
readonly unknown: "unknown";
|
|
8
9
|
};
|
|
9
10
|
export type HttpErrorType = (typeof HttpErrorType)[keyof typeof HttpErrorType];
|
|
10
11
|
/**
|
|
@@ -28,8 +29,9 @@ export declare class APIError extends Error {
|
|
|
28
29
|
* @param errorMessage - The error message
|
|
29
30
|
* @param correlationId - The correlation ID
|
|
30
31
|
* @param errorLink - URL to documentation about this error
|
|
32
|
+
* @param cause - The cause of the error
|
|
31
33
|
*/
|
|
32
|
-
constructor(statusCode: number, errorType: APIErrorType, errorMessage: string, correlationId?: string, errorLink?: string);
|
|
34
|
+
constructor(statusCode: number, errorType: APIErrorType, errorMessage: string, correlationId?: string, errorLink?: string, cause?: Error);
|
|
33
35
|
/**
|
|
34
36
|
* Convert the error to a JSON object, excluding undefined properties
|
|
35
37
|
*
|
|
@@ -44,6 +46,31 @@ export declare class APIError extends Error {
|
|
|
44
46
|
errorMessage: string;
|
|
45
47
|
};
|
|
46
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Error thrown when an Axios request is made but no response is received
|
|
51
|
+
*/
|
|
52
|
+
export declare class UnknownApiError extends APIError {
|
|
53
|
+
/**
|
|
54
|
+
* Constructor for the UnknownApiError class
|
|
55
|
+
*
|
|
56
|
+
* @param errorType - The type of error
|
|
57
|
+
* @param errorMessage - The error message
|
|
58
|
+
* @param cause - The cause of the error
|
|
59
|
+
*/
|
|
60
|
+
constructor(errorType: APIErrorType, errorMessage: string, cause?: Error);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Error thrown when an error is not known
|
|
64
|
+
*/
|
|
65
|
+
export declare class UnknownError extends Error {
|
|
66
|
+
/**
|
|
67
|
+
* Constructor for the UnknownError class
|
|
68
|
+
*
|
|
69
|
+
* @param message - The error message
|
|
70
|
+
* @param cause - The cause of the error
|
|
71
|
+
*/
|
|
72
|
+
constructor(message: string, cause?: Error);
|
|
73
|
+
}
|
|
47
74
|
/**
|
|
48
75
|
* Type guard to check if an object is an OpenAPIError
|
|
49
76
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../openapi-client/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,YAAY,EACrB,SAAS,IAAI,gBAAgB,EAC9B,MAAM,sDAAsD,CAAC;AAE9D,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../openapi-client/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,YAAY,EACrB,SAAS,IAAI,gBAAgB,EAC9B,MAAM,sDAAsD,CAAC;AAE9D,eAAO,MAAM,aAAa;;;;;;;CAOhB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAE/E;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,gBAAgB,GAAG,aAAa,CAAC;AAE5D;;GAEG;AACH,qBAAa,QAAS,SAAQ,KAAK;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,YAAY,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;;;;OASG;gBAED,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,YAAY,EACvB,YAAY,EAAE,MAAM,EACpB,aAAa,CAAC,EAAE,MAAM,EACtB,SAAS,CAAC,EAAE,MAAM,EAClB,KAAK,CAAC,EAAE,KAAK;IAmBf;;;;OAIG;IACH,MAAM;;;;;;;;CAUP;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,QAAQ;IAC3C;;;;;;OAMG;gBACS,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAIzE;AAED;;GAEG;AACH,qBAAa,YAAa,SAAQ,KAAK;IACrC;;;;;OAKG;gBACS,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAI3C;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,YAAY,CAShE"}
|
|
@@ -41,6 +41,7 @@ export declare const ErrorType: {
|
|
|
41
41
|
readonly request_canceled: "request_canceled";
|
|
42
42
|
readonly timed_out: "timed_out";
|
|
43
43
|
readonly unauthorized: "unauthorized";
|
|
44
|
+
readonly policy_violation: "policy_violation";
|
|
44
45
|
};
|
|
45
46
|
/**
|
|
46
47
|
* An error response including the code for the type of error and a human-readable message describing the error.
|
|
@@ -121,6 +122,57 @@ export interface EvmUserOperation {
|
|
|
121
122
|
*/
|
|
122
123
|
transactionHash?: string;
|
|
123
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* The name of the supported EVM networks in human-readable format.
|
|
127
|
+
*/
|
|
128
|
+
export type ListEvmTokenBalancesNetwork = (typeof ListEvmTokenBalancesNetwork)[keyof typeof ListEvmTokenBalancesNetwork];
|
|
129
|
+
export declare const ListEvmTokenBalancesNetwork: {
|
|
130
|
+
readonly base: "base";
|
|
131
|
+
readonly "base-sepolia": "base-sepolia";
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Amount of a given token.
|
|
135
|
+
*/
|
|
136
|
+
export interface TokenAmount {
|
|
137
|
+
/**
|
|
138
|
+
* The amount is denominated in the smallest indivisible unit of the token. For ETH, the smallest indivisible unit is Wei (10^-18 ETH). For ERC-20s, the smallest unit is the unit returned from `function totalSupply() public view returns (uint256)`.
|
|
139
|
+
* @pattern ^[0-9]+$
|
|
140
|
+
*/
|
|
141
|
+
amount: string;
|
|
142
|
+
/** 'decimals' is the exponential value N that satisfies the equation `amount * 10^-N = standard_denomination`. The standard denomination is the most commonly used denomination for the token.
|
|
143
|
+
- In the case of the native gas token, `decimals` is defined via convention. As an example, for ETH of Ethereum mainnet, the standard denomination is 10^-18 the smallest denomination (Wei). As such, for ETH on Ethereum mainnet, `decimals` is 18. - In the case of ERC-20 tokens, `decimals` is defined via configuration. `decimals` will be the number returned by `function decimals() public view returns (uint8)` on the underlying token contract.
|
|
144
|
+
Not all tokens have a `decimals` field, as this function is [optional in the ERC-20 specification](https://eips.ethereum.org/EIPS/eip-20#decimals). This field will be left empty if the underlying token contract doesn't implement `decimals`.
|
|
145
|
+
Further, this endpoint will only populate this value for a small subset of whitelisted ERC-20 tokens at this time. We intend to improve coverage in the future. */
|
|
146
|
+
decimals: number;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* General information about a token. Includes the type, the network, and other identifying information.
|
|
150
|
+
*/
|
|
151
|
+
export interface Token {
|
|
152
|
+
network: ListEvmTokenBalancesNetwork;
|
|
153
|
+
/** The symbol of this token (ex: SOL, ETH, USDC).
|
|
154
|
+
The token symbol is not unique. It is possible for two different tokens to have the same symbol.
|
|
155
|
+
For native gas tokens, this symbol is defined via convention. As an example, for ETH on Ethereum mainnet, the symbol is "ETH". For ERC-20 tokens, this symbol is defined via configuration. `symbol` will be the string returned by `function symbol() public view returns (string)` on the underlying token contract.
|
|
156
|
+
Not all tokens have a symbol, as this function is [optional in the ERC-20 specification](https://eips.ethereum.org/EIPS/eip-20#symbol). This field will only be populated when the token's underlying ERC-20 contract has a `symbol()` function.
|
|
157
|
+
Further, this endpoint will only populate this value for a small subset of whitelisted ERC-20 tokens at this time. We intend to improve coverage in the future. */
|
|
158
|
+
symbol?: string;
|
|
159
|
+
/** The name of this token (ex: "Solana", "Ether", "USD Coin").
|
|
160
|
+
The token name is not unique. It is possible for two different tokens to have the same name.
|
|
161
|
+
For native gas tokens, this name is defined via convention. As an example, for ETH on Ethereum mainnet, the name is "Ether". For ERC-20 tokens, this name is defined via configuration. `name` will be the string returned by `function name() public view returns (string)` on the underlying token contract.
|
|
162
|
+
Not all tokens have a name, as this function is [optional in the ERC-20 specification](https://eips.ethereum.org/EIPS/eip-20#name). This field will only be populated when the token's underlying ERC-20 contract has a `name()` function.
|
|
163
|
+
Further, this endpoint will only populate this value for a small subset of whitelisted ERC-20 tokens at this time. We intend to improve coverage in the future. */
|
|
164
|
+
name?: string;
|
|
165
|
+
/**
|
|
166
|
+
* The contract address of the token.
|
|
167
|
+
For Ether, the contract address is `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` per [EIP-7528](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7528.md). For ERC-20 tokens, this is the contract address where the token is deployed.
|
|
168
|
+
* @pattern ^0x[0-9a-fA-F]{40}$
|
|
169
|
+
*/
|
|
170
|
+
contractAddress: string;
|
|
171
|
+
}
|
|
172
|
+
export interface TokenBalance {
|
|
173
|
+
amount: TokenAmount;
|
|
174
|
+
token: Token;
|
|
175
|
+
}
|
|
124
176
|
export interface SolanaAccount {
|
|
125
177
|
/**
|
|
126
178
|
* The base58 encoded Solana address.
|
|
@@ -149,7 +201,7 @@ export type IdempotencyErrorResponse = Error;
|
|
|
149
201
|
export type AlreadyExistsErrorResponse = Error;
|
|
150
202
|
/**
|
|
151
203
|
* A JWT signed using your Wallet Secret, encoded in base64. Refer to the
|
|
152
|
-
[Generate
|
|
204
|
+
[Generate Wallet Token](https://docs.cdp.coinbase.com/api-v2/docs/authentication#2-generate-wallet-token)
|
|
153
205
|
section of our Authentication docs for more details on how to generate your Wallet Token.
|
|
154
206
|
|
|
155
207
|
*/
|
|
@@ -185,6 +237,24 @@ export type CreateEvmAccountBody = {
|
|
|
185
237
|
*/
|
|
186
238
|
name?: string;
|
|
187
239
|
};
|
|
240
|
+
/**
|
|
241
|
+
* The network to send the transaction to.
|
|
242
|
+
*/
|
|
243
|
+
export type SendEvmTransactionBodyNetwork = (typeof SendEvmTransactionBodyNetwork)[keyof typeof SendEvmTransactionBodyNetwork];
|
|
244
|
+
export declare const SendEvmTransactionBodyNetwork: {
|
|
245
|
+
readonly base: "base";
|
|
246
|
+
readonly "base-sepolia": "base-sepolia";
|
|
247
|
+
};
|
|
248
|
+
export type SendEvmTransactionBody = {
|
|
249
|
+
/** The network to send the transaction to. */
|
|
250
|
+
network: SendEvmTransactionBodyNetwork;
|
|
251
|
+
/** The RLP-encoded transaction to sign and send, as a 0x-prefixed hex string. */
|
|
252
|
+
transaction: string;
|
|
253
|
+
};
|
|
254
|
+
export type SendEvmTransaction200 = {
|
|
255
|
+
/** The hash of the transaction, as a 0x-prefixed hex string. */
|
|
256
|
+
transactionHash: string;
|
|
257
|
+
};
|
|
188
258
|
export type SignEvmTransactionBody = {
|
|
189
259
|
/** The RLP-encoded transaction to sign, as a 0x-prefixed hex string. */
|
|
190
260
|
transaction: string;
|
|
@@ -245,9 +315,24 @@ export type PrepareUserOperationBody = {
|
|
|
245
315
|
paymasterUrl?: string;
|
|
246
316
|
};
|
|
247
317
|
export type SendUserOperationBody = {
|
|
248
|
-
/** The hex-encoded signature of the user operation. */
|
|
318
|
+
/** The hex-encoded signature of the user operation. This should be a 65-byte signature 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. */
|
|
249
319
|
signature: string;
|
|
250
320
|
};
|
|
321
|
+
export type ListEvmTokenBalancesParams = {
|
|
322
|
+
/**
|
|
323
|
+
* The number of balances to return per page.
|
|
324
|
+
*/
|
|
325
|
+
pageSize?: number;
|
|
326
|
+
/**
|
|
327
|
+
* The token for the next page of balances. Will be empty if there are no more balances to fetch.
|
|
328
|
+
*/
|
|
329
|
+
pageToken?: string;
|
|
330
|
+
};
|
|
331
|
+
export type ListEvmTokenBalances200AllOf = {
|
|
332
|
+
/** The list of EVM token balances. */
|
|
333
|
+
balances: TokenBalance[];
|
|
334
|
+
};
|
|
335
|
+
export type ListEvmTokenBalances200 = ListEvmTokenBalances200AllOf & ListResponse;
|
|
251
336
|
/**
|
|
252
337
|
* The network to request funds from.
|
|
253
338
|
*/
|
|
@@ -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
|
|
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,SAA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AGnF,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"}
|
|
@@ -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
|
|
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,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,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AU,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,GAAG,kBAAkB,CAAC,8BAgB3D,CAAC;AAEF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C,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,
|
|
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,kBAAkB,GAClB,CAAC,CACC,IAAI,EAAE,UAAU,CAAC,UAA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AC,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>;
|