@coinbase/cdp-sdk 1.8.0 → 1.10.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 +16 -0
- package/README.md +190 -105
- package/_cjs/accounts/evm/toEvmServerAccount.js.map +1 -1
- package/_cjs/accounts/evm/toEvmSmartAccount.js.map +1 -1
- package/_cjs/accounts/solana/toSolanaAccount.js +7 -0
- package/_cjs/accounts/solana/toSolanaAccount.js.map +1 -1
- package/_cjs/actions/evm/transfer/accountTransferStrategy.js +30 -63
- package/_cjs/actions/evm/transfer/accountTransferStrategy.js.map +1 -1
- package/_cjs/actions/evm/transfer/smartAccountTransferStrategy.js +39 -56
- package/_cjs/actions/evm/transfer/smartAccountTransferStrategy.js.map +1 -1
- package/_cjs/actions/evm/transfer/transfer.js +2 -39
- package/_cjs/actions/evm/transfer/transfer.js.map +1 -1
- package/_cjs/actions/evm/transfer/utils.js +0 -12
- package/_cjs/actions/evm/transfer/utils.js.map +1 -1
- package/_cjs/actions/solana/constants.js +9 -0
- package/_cjs/actions/solana/constants.js.map +1 -0
- package/_cjs/actions/solana/transfer.js +117 -0
- package/_cjs/actions/solana/transfer.js.map +1 -0
- package/_cjs/actions/solana/utils.js +66 -0
- package/_cjs/actions/solana/utils.js.map +1 -0
- package/_cjs/analytics.js +2 -0
- package/_cjs/analytics.js.map +1 -1
- package/_cjs/client/evm/constants.js +21 -0
- package/_cjs/client/evm/constants.js.map +1 -0
- package/_cjs/client/evm/evm.js +75 -0
- package/_cjs/client/evm/evm.js.map +1 -1
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +35 -4
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.js +14 -1
- package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.js.map +1 -1
- package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.msw.js +26 -1
- package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.msw.js.map +1 -1
- package/_cjs/openapi-client/generated/policy-engine/policy-engine.msw.js +121 -36
- package/_cjs/openapi-client/generated/policy-engine/policy-engine.msw.js.map +1 -1
- package/_cjs/policies/schema.js +60 -1
- package/_cjs/policies/schema.js.map +1 -1
- package/_cjs/version.js +1 -1
- package/_cjs/version.js.map +1 -1
- package/_esm/accounts/evm/toEvmServerAccount.js.map +1 -1
- package/_esm/accounts/evm/toEvmSmartAccount.js.map +1 -1
- package/_esm/accounts/solana/toSolanaAccount.js +7 -0
- package/_esm/accounts/solana/toSolanaAccount.js.map +1 -1
- package/_esm/actions/evm/transfer/accountTransferStrategy.js +31 -64
- package/_esm/actions/evm/transfer/accountTransferStrategy.js.map +1 -1
- package/_esm/actions/evm/transfer/smartAccountTransferStrategy.js +39 -56
- package/_esm/actions/evm/transfer/smartAccountTransferStrategy.js.map +1 -1
- package/_esm/actions/evm/transfer/transfer.js +2 -39
- package/_esm/actions/evm/transfer/transfer.js.map +1 -1
- package/_esm/actions/evm/transfer/utils.js +0 -11
- package/_esm/actions/evm/transfer/utils.js.map +1 -1
- package/_esm/actions/solana/constants.js +6 -0
- package/_esm/actions/solana/constants.js.map +1 -0
- package/_esm/actions/solana/transfer.js +114 -0
- package/_esm/actions/solana/transfer.js.map +1 -0
- package/_esm/actions/solana/utils.js +61 -0
- package/_esm/actions/solana/utils.js.map +1 -0
- package/_esm/analytics.js +2 -0
- package/_esm/analytics.js.map +1 -1
- package/_esm/client/evm/constants.js +18 -0
- package/_esm/client/evm/constants.js.map +1 -0
- package/_esm/client/evm/evm.js +75 -0
- package/_esm/client/evm/evm.js.map +1 -1
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +34 -3
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_esm/openapi-client/generated/evm-accounts/evm-accounts.js +12 -0
- package/_esm/openapi-client/generated/evm-accounts/evm-accounts.js.map +1 -1
- package/_esm/openapi-client/generated/evm-accounts/evm-accounts.msw.js +23 -0
- package/_esm/openapi-client/generated/evm-accounts/evm-accounts.msw.js.map +1 -1
- package/_esm/openapi-client/generated/policy-engine/policy-engine.msw.js +116 -35
- package/_esm/openapi-client/generated/policy-engine/policy-engine.msw.js.map +1 -1
- package/_esm/policies/schema.js +59 -0
- package/_esm/policies/schema.js.map +1 -1
- package/_esm/version.js +1 -1
- package/_esm/version.js.map +1 -1
- package/_types/accounts/evm/toEvmServerAccount.d.ts.map +1 -1
- package/_types/accounts/evm/toEvmSmartAccount.d.ts.map +1 -1
- package/_types/accounts/solana/toSolanaAccount.d.ts.map +1 -1
- package/_types/actions/evm/transfer/accountTransferStrategy.d.ts +2 -2
- package/_types/actions/evm/transfer/accountTransferStrategy.d.ts.map +1 -1
- package/_types/actions/evm/transfer/smartAccountTransferStrategy.d.ts +2 -2
- package/_types/actions/evm/transfer/smartAccountTransferStrategy.d.ts.map +1 -1
- package/_types/actions/evm/transfer/transfer.d.ts +6 -4
- package/_types/actions/evm/transfer/transfer.d.ts.map +1 -1
- package/_types/actions/evm/transfer/types.d.ts +7 -52
- package/_types/actions/evm/transfer/types.d.ts.map +1 -1
- package/_types/actions/evm/transfer/utils.d.ts +0 -619
- package/_types/actions/evm/transfer/utils.d.ts.map +1 -1
- package/_types/actions/evm/types.d.ts +140 -68
- package/_types/actions/evm/types.d.ts.map +1 -1
- package/_types/actions/solana/constants.d.ts +6 -0
- package/_types/actions/solana/constants.d.ts.map +1 -0
- package/_types/actions/solana/transfer.d.ts +36 -0
- package/_types/actions/solana/transfer.d.ts.map +1 -0
- package/_types/actions/solana/types.d.ts +27 -0
- package/_types/actions/solana/types.d.ts.map +1 -1
- package/_types/actions/solana/utils.d.ts +34 -0
- package/_types/actions/solana/utils.d.ts.map +1 -0
- package/_types/analytics.d.ts.map +1 -1
- package/_types/client/evm/constants.d.ts +5 -0
- package/_types/client/evm/constants.d.ts.map +1 -0
- package/_types/client/evm/evm.d.ts +44 -1
- package/_types/client/evm/evm.d.ts.map +1 -1
- package/_types/client/evm/evm.types.d.ts +13 -1
- package/_types/client/evm/evm.types.d.ts.map +1 -1
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +106 -17
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
- package/_types/openapi-client/generated/evm-accounts/evm-accounts.d.ts +7 -1
- 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 +2 -0
- package/_types/openapi-client/generated/evm-accounts/evm-accounts.msw.d.ts.map +1 -1
- package/_types/openapi-client/generated/policy-engine/policy-engine.msw.d.ts +5 -1
- package/_types/openapi-client/generated/policy-engine/policy-engine.msw.d.ts.map +1 -1
- package/_types/openapi-client/index.d.ts +2 -0
- package/_types/openapi-client/index.d.ts.map +1 -1
- package/_types/policies/schema.d.ts +630 -0
- package/_types/policies/schema.d.ts.map +1 -1
- package/_types/version.d.ts +1 -1
- package/_types/version.d.ts.map +1 -1
- package/accounts/evm/toEvmServerAccount.ts +7 -6
- package/accounts/evm/toEvmSmartAccount.ts +1 -2
- package/accounts/solana/toSolanaAccount.ts +7 -0
- package/actions/evm/transfer/accountTransferStrategy.ts +38 -78
- package/actions/evm/transfer/smartAccountTransferStrategy.ts +43 -63
- package/actions/evm/transfer/transfer.ts +10 -51
- package/actions/evm/transfer/types.ts +8 -66
- package/actions/evm/transfer/utils.ts +0 -13
- package/actions/evm/types.ts +143 -78
- package/actions/solana/constants.ts +6 -0
- package/actions/solana/transfer.ts +219 -0
- package/actions/solana/types.ts +28 -0
- package/actions/solana/utils.ts +79 -0
- package/analytics.ts +2 -0
- package/client/evm/constants.ts +17 -0
- package/client/evm/evm.ts +90 -0
- package/client/evm/evm.types.ts +14 -0
- package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +146 -18
- package/openapi-client/generated/evm-accounts/evm-accounts.msw.ts +41 -0
- package/openapi-client/generated/evm-accounts/evm-accounts.ts +20 -0
- package/openapi-client/generated/policy-engine/policy-engine.msw.ts +199 -56
- package/package.json +2 -1
- package/policies/schema.ts +83 -0
- package/version.ts +1 -1
|
@@ -1,54 +1,80 @@
|
|
|
1
1
|
import { SendUserOperationOptions, SendUserOperationReturnType } from "./sendUserOperation.js";
|
|
2
2
|
import { GetUserOperationOptions, UserOperation } from "../../client/evm/evm.types.js";
|
|
3
|
-
import {
|
|
3
|
+
import { Hex } from "../../types/misc.js";
|
|
4
4
|
import type { ListTokenBalancesOptions, ListTokenBalancesResult } from "./listTokenBalances.js";
|
|
5
5
|
import type { RequestFaucetOptions, RequestFaucetResult } from "./requestFaucet.js";
|
|
6
6
|
import type { SendTransactionOptions, TransactionResult } from "./sendTransaction.js";
|
|
7
|
-
import type {
|
|
7
|
+
import type { TransferOptions } from "./transfer/types.js";
|
|
8
8
|
import type { WaitForUserOperationOptions, WaitForUserOperationReturnType } from "./waitForUserOperation.js";
|
|
9
|
-
type Actions
|
|
9
|
+
type Actions = {
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* List the token balances of an account.
|
|
12
12
|
*
|
|
13
|
-
* @param options - The options for the
|
|
14
|
-
* @param options.
|
|
15
|
-
* @param options.amount - The amount of the token to transfer.
|
|
16
|
-
* @param options.token - The token to transfer.
|
|
17
|
-
* @param options.network - The network to transfer the token on.
|
|
13
|
+
* @param options - The options for the list token balances.
|
|
14
|
+
* @param options.network - The network to list the token balances on.
|
|
18
15
|
*
|
|
19
|
-
* @returns The result of the
|
|
16
|
+
* @returns The result of the list token balances.
|
|
20
17
|
*
|
|
21
18
|
* @example
|
|
22
19
|
* ```typescript
|
|
23
|
-
* const
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
20
|
+
* const balances = await account.listTokenBalances({
|
|
21
|
+
* network: "base-sepolia",
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
listTokenBalances: (options: Omit<ListTokenBalancesOptions, "address">) => Promise<ListTokenBalancesResult>;
|
|
26
|
+
/**
|
|
27
|
+
* Requests funds from an EVM faucet.
|
|
28
|
+
*
|
|
29
|
+
* @param {RequestFaucetOptions} options - Parameters for requesting funds from the EVM faucet.
|
|
30
|
+
* @param {string} options.network - The network to request funds from.
|
|
31
|
+
* @param {string} options.token - The token to request funds for.
|
|
32
|
+
* @param {string} [options.idempotencyKey] - An idempotency key.
|
|
33
|
+
*
|
|
34
|
+
* @returns A promise that resolves to the transaction hash.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const result = await account.requestFaucet({
|
|
27
39
|
* network: "base-sepolia",
|
|
40
|
+
* token: "eth",
|
|
28
41
|
* });
|
|
29
42
|
* ```
|
|
43
|
+
*/
|
|
44
|
+
requestFaucet: (options: Omit<RequestFaucetOptions, "address">) => Promise<RequestFaucetResult>;
|
|
45
|
+
};
|
|
46
|
+
export type AccountActions = Actions & {
|
|
47
|
+
/**
|
|
48
|
+
* Transfer an amount of a token from an account to another account.
|
|
49
|
+
*
|
|
50
|
+
* @param options - The options for the transfer.
|
|
51
|
+
* @param options.to - The account or 0x-prefixed address to transfer the token to.
|
|
52
|
+
* @param options.amount - The amount of the token to transfer represented as an atomic unit.
|
|
53
|
+
* It's common to use `parseEther` or `parseUnits` utils from viem to convert to atomic units.
|
|
54
|
+
* Otherwise, you can pass atomic units directly. See examples below.
|
|
55
|
+
* @param options.token - The token to transfer. This can be 'eth', 'usdc', or a contract address.
|
|
56
|
+
* @param options.network - The network to transfer the token on.
|
|
57
|
+
*
|
|
58
|
+
* @returns An object containing the transaction hash.
|
|
30
59
|
*
|
|
31
60
|
* @example
|
|
32
|
-
* **Pass a bigint value**
|
|
33
61
|
* ```typescript
|
|
34
|
-
* const {
|
|
62
|
+
* const { transactionHash } = await sender.transfer({
|
|
35
63
|
* to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
|
|
36
|
-
* amount: 10000n, // equivalent to 0.01
|
|
64
|
+
* amount: 10000n, // equivalent to 0.01 USDC
|
|
37
65
|
* token: "usdc",
|
|
38
66
|
* network: "base-sepolia",
|
|
39
67
|
* });
|
|
40
68
|
* ```
|
|
41
69
|
*
|
|
42
70
|
* @example
|
|
43
|
-
* **
|
|
71
|
+
* **Using parseUnits to specify USDC amount**
|
|
44
72
|
* ```typescript
|
|
45
|
-
*
|
|
46
|
-
* owner: await cdp.evm.createAccount({ name: "Owner" }),
|
|
47
|
-
* });
|
|
73
|
+
* import { parseUnits } from "viem";
|
|
48
74
|
*
|
|
49
|
-
* const {
|
|
75
|
+
* const { transactionHash } = await sender.transfer({
|
|
50
76
|
* to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
|
|
51
|
-
* amount: "0.01",
|
|
77
|
+
* amount: parseUnits("0.01", 6), // USDC uses 6 decimal places
|
|
52
78
|
* token: "usdc",
|
|
53
79
|
* network: "base-sepolia",
|
|
54
80
|
* });
|
|
@@ -57,9 +83,11 @@ type Actions<T extends EvmAccount | EvmSmartAccount> = {
|
|
|
57
83
|
* @example
|
|
58
84
|
* **Transfer ETH**
|
|
59
85
|
* ```typescript
|
|
60
|
-
*
|
|
86
|
+
* import { parseEther } from "viem";
|
|
87
|
+
*
|
|
88
|
+
* const { transactionHash } = await sender.transfer({
|
|
61
89
|
* to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
|
|
62
|
-
* amount: "0.000001",
|
|
90
|
+
* amount: parseEther("0.000001"),
|
|
63
91
|
* token: "eth",
|
|
64
92
|
* network: "base-sepolia",
|
|
65
93
|
* });
|
|
@@ -68,9 +96,11 @@ type Actions<T extends EvmAccount | EvmSmartAccount> = {
|
|
|
68
96
|
* @example
|
|
69
97
|
* **Using a contract address**
|
|
70
98
|
* ```typescript
|
|
71
|
-
*
|
|
99
|
+
* import { parseEther } from "viem";
|
|
100
|
+
*
|
|
101
|
+
* const { transactionHash } = await sender.transfer({
|
|
72
102
|
* to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
|
|
73
|
-
* amount: "0.000001",
|
|
103
|
+
* amount: parseEther("0.000001"),
|
|
74
104
|
* token: "0x4200000000000000000000000000000000000006", // WETH on Base Sepolia
|
|
75
105
|
* network: "base-sepolia",
|
|
76
106
|
* });
|
|
@@ -82,52 +112,17 @@ type Actions<T extends EvmAccount | EvmSmartAccount> = {
|
|
|
82
112
|
* const sender = await cdp.evm.createAccount({ name: "Sender" });
|
|
83
113
|
* const receiver = await cdp.evm.createAccount({ name: "Receiver" });
|
|
84
114
|
*
|
|
85
|
-
* const {
|
|
115
|
+
* const { transactionHash } = await sender.transfer({
|
|
86
116
|
* to: receiver,
|
|
87
|
-
* amount:
|
|
117
|
+
* amount: 10000n, // equivalent to 0.01 USDC
|
|
88
118
|
* token: "usdc",
|
|
89
119
|
* network: "base-sepolia",
|
|
90
120
|
* });
|
|
91
121
|
* ```
|
|
92
122
|
*/
|
|
93
|
-
transfer: (options:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
*
|
|
97
|
-
* @param options - The options for the list token balances.
|
|
98
|
-
* @param options.network - The network to list the token balances on.
|
|
99
|
-
*
|
|
100
|
-
* @returns The result of the list token balances.
|
|
101
|
-
*
|
|
102
|
-
* @example
|
|
103
|
-
* ```typescript
|
|
104
|
-
* const balances = await account.listTokenBalances({
|
|
105
|
-
* network: "base-sepolia",
|
|
106
|
-
* });
|
|
107
|
-
* ```
|
|
108
|
-
*/
|
|
109
|
-
listTokenBalances: (options: Omit<ListTokenBalancesOptions, "address">) => Promise<ListTokenBalancesResult>;
|
|
110
|
-
/**
|
|
111
|
-
* Requests funds from an EVM faucet.
|
|
112
|
-
*
|
|
113
|
-
* @param {RequestFaucetOptions} options - Parameters for requesting funds from the EVM faucet.
|
|
114
|
-
* @param {string} options.network - The network to request funds from.
|
|
115
|
-
* @param {string} options.token - The token to request funds for.
|
|
116
|
-
* @param {string} [options.idempotencyKey] - An idempotency key.
|
|
117
|
-
*
|
|
118
|
-
* @returns A promise that resolves to the transaction hash.
|
|
119
|
-
*
|
|
120
|
-
* @example
|
|
121
|
-
* ```ts
|
|
122
|
-
* const result = await account.requestFaucet({
|
|
123
|
-
* network: "base-sepolia",
|
|
124
|
-
* token: "eth",
|
|
125
|
-
* });
|
|
126
|
-
* ```
|
|
127
|
-
*/
|
|
128
|
-
requestFaucet: (options: Omit<RequestFaucetOptions, "address">) => Promise<RequestFaucetResult>;
|
|
129
|
-
};
|
|
130
|
-
export type AccountActions = Actions<EvmAccount> & {
|
|
123
|
+
transfer: (options: TransferOptions) => Promise<{
|
|
124
|
+
transactionHash: Hex;
|
|
125
|
+
}>;
|
|
131
126
|
/**
|
|
132
127
|
* Signs an EVM transaction and sends it to the specified network using the Coinbase API.
|
|
133
128
|
* This method handles nonce management and gas estimation automatically.
|
|
@@ -174,7 +169,84 @@ export type AccountActions = Actions<EvmAccount> & {
|
|
|
174
169
|
*/
|
|
175
170
|
sendTransaction: (options: Omit<SendTransactionOptions, "address">) => Promise<TransactionResult>;
|
|
176
171
|
};
|
|
177
|
-
export type SmartAccountActions = Actions
|
|
172
|
+
export type SmartAccountActions = Actions & {
|
|
173
|
+
/**
|
|
174
|
+
* Transfer an amount of a token from an account to another account.
|
|
175
|
+
*
|
|
176
|
+
* @param options - The options for the transfer.
|
|
177
|
+
* @param options.to - The account or 0x-prefixed address to transfer the token to.
|
|
178
|
+
* @param options.amount - The amount of the token to transfer represented as an atomic unit.
|
|
179
|
+
* It's common to use `parseEther` or `parseUnits` utils from viem to convert to atomic units.
|
|
180
|
+
* Otherwise, you can pass atomic units directly. See examples below.
|
|
181
|
+
* @param options.token - The token to transfer. This can be 'eth', 'usdc', or a contract address.
|
|
182
|
+
* @param options.network - The network to transfer the token on.
|
|
183
|
+
*
|
|
184
|
+
* @returns The user operation result.
|
|
185
|
+
*
|
|
186
|
+
* @example
|
|
187
|
+
* ```typescript
|
|
188
|
+
* const { userOpHash } = await sender.transfer({
|
|
189
|
+
* to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
|
|
190
|
+
* amount: 10000n, // equivalent to 0.01 USDC
|
|
191
|
+
* token: "usdc",
|
|
192
|
+
* network: "base-sepolia",
|
|
193
|
+
* });
|
|
194
|
+
* ```
|
|
195
|
+
*
|
|
196
|
+
* @example
|
|
197
|
+
* **Using parseUnits to specify USDC amount**
|
|
198
|
+
* ```typescript
|
|
199
|
+
* import { parseUnits } from "viem";
|
|
200
|
+
*
|
|
201
|
+
* const { userOpHash } = await sender.transfer({
|
|
202
|
+
* to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
|
|
203
|
+
* amount: parseUnits("0.01", 6), // USDC uses 6 decimal places
|
|
204
|
+
* token: "usdc",
|
|
205
|
+
* network: "base-sepolia",
|
|
206
|
+
* });
|
|
207
|
+
* ```
|
|
208
|
+
*
|
|
209
|
+
* @example
|
|
210
|
+
* **Transfer ETH**
|
|
211
|
+
* ```typescript
|
|
212
|
+
* import { parseEther } from "viem";
|
|
213
|
+
*
|
|
214
|
+
* const { userOpHash } = await sender.transfer({
|
|
215
|
+
* to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
|
|
216
|
+
* amount: parseEther("0.000001"),
|
|
217
|
+
* token: "eth",
|
|
218
|
+
* network: "base-sepolia",
|
|
219
|
+
* });
|
|
220
|
+
* ```
|
|
221
|
+
*
|
|
222
|
+
* @example
|
|
223
|
+
* **Using a contract address**
|
|
224
|
+
* ```typescript
|
|
225
|
+
* import { parseEther } from "viem";
|
|
226
|
+
*
|
|
227
|
+
* const { userOpHash } = await sender.transfer({
|
|
228
|
+
* to: "0x9F663335Cd6Ad02a37B633602E98866CF944124d",
|
|
229
|
+
* amount: parseEther("0.000001"),
|
|
230
|
+
* token: "0x4200000000000000000000000000000000000006", // WETH on Base Sepolia
|
|
231
|
+
* network: "base-sepolia",
|
|
232
|
+
* });
|
|
233
|
+
* ```
|
|
234
|
+
*
|
|
235
|
+
* @example
|
|
236
|
+
* **Transfer to another account**
|
|
237
|
+
* ```typescript
|
|
238
|
+
* const sender = await cdp.evm.createAccount({ name: "Sender" });
|
|
239
|
+
* const receiver = await cdp.evm.createAccount({ name: "Receiver" });
|
|
240
|
+
*
|
|
241
|
+
* const { userOpHash } = await sender.transfer({
|
|
242
|
+
* to: receiver,
|
|
243
|
+
* amount: 10000n, // equivalent to 0.01 USDC
|
|
244
|
+
* token: "usdc",
|
|
245
|
+
* network: "base-sepolia",
|
|
246
|
+
* });
|
|
247
|
+
* ```
|
|
248
|
+
*/
|
|
249
|
+
transfer: (options: TransferOptions) => Promise<SendUserOperationReturnType>;
|
|
178
250
|
/**
|
|
179
251
|
* Sends a user operation.
|
|
180
252
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../actions/evm/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAC/F,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACvF,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../actions/evm/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAC/F,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACvF,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAE1C,OAAO,KAAK,EAAE,wBAAwB,EAAE,uBAAuB,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,e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,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;IAE7C;;;;;;;;;;;;;;OAcG;IACH,gBAAgB,EAAE,CAChB,OAAO,EAAE,IAAI,CAAC,uBAAuB,EAAE,cAAc,CAAC,KACnD,OAAO,CAAC,aAAa,CAAC,CAAC;CAC7B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const GENESIS_HASH_MAINNET = "5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d";
|
|
2
|
+
export declare const GENESIS_HASH_DEVNET = "EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG";
|
|
3
|
+
export declare const GENESIS_HASH_TESTNET = "4uhcVJyU9pJkvQyS88uRDiswHXSCkY3zQawwpjk2NsNY";
|
|
4
|
+
export declare const USDC_MAINNET_MINT_ADDRESS = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
|
|
5
|
+
export declare const USDC_DEVNET_MINT_ADDRESS = "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU";
|
|
6
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../actions/solana/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,iDAAiD,CAAC;AACnF,eAAO,MAAM,mBAAmB,iDAAiD,CAAC;AAClF,eAAO,MAAM,oBAAoB,iDAAiD,CAAC;AAEnF,eAAO,MAAM,yBAAyB,iDAAiD,CAAC;AACxF,eAAO,MAAM,wBAAwB,iDAAiD,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Connection } from "@solana/web3.js";
|
|
2
|
+
import { type Network } from "./utils.js";
|
|
3
|
+
import type { SignatureResult } from "../../client/solana/solana.types.js";
|
|
4
|
+
import type { CdpOpenApiClientType } from "../../openapi-client/index.js";
|
|
5
|
+
export interface TransferOptions {
|
|
6
|
+
/**
|
|
7
|
+
* The base58 encoded Solana address of the source account.
|
|
8
|
+
*/
|
|
9
|
+
from: string;
|
|
10
|
+
/**
|
|
11
|
+
* The base58 encoded Solana address of the destination account.
|
|
12
|
+
*/
|
|
13
|
+
to: string;
|
|
14
|
+
/**
|
|
15
|
+
* The amount to transfer, represented as an atomic unit of the token.
|
|
16
|
+
*/
|
|
17
|
+
amount: bigint;
|
|
18
|
+
/**
|
|
19
|
+
* The token to transfer, or mint address of the SPL token to transfer.
|
|
20
|
+
*/
|
|
21
|
+
token: "sol" | "usdc" | string;
|
|
22
|
+
/**
|
|
23
|
+
* The network to use which will be used to create a Connection, otherwise a Connection can be provided.
|
|
24
|
+
*/
|
|
25
|
+
network: Network | Connection;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Transfers SOL or SPL tokens between accounts
|
|
29
|
+
*
|
|
30
|
+
* @param apiClient - The API client to use
|
|
31
|
+
* @param options - The transfer options
|
|
32
|
+
*
|
|
33
|
+
* @returns The transfer result
|
|
34
|
+
*/
|
|
35
|
+
export declare function transfer(apiClient: CdpOpenApiClientType, options: TransferOptions): Promise<SignatureResult>;
|
|
36
|
+
//# sourceMappingURL=transfer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transfer.d.ts","sourceRoot":"","sources":["../../../actions/solana/transfer.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,UAAU,EAOX,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAIL,KAAK,OAAO,EACb,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAE1E,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;IAC/B;;OAEG;IACH,OAAO,EAAE,OAAO,GAAG,UAAU,CAAC;CAC/B;AAED;;;;;;;GAOG;AACH,wBAAsB,QAAQ,CAC5B,SAAS,EAAE,oBAAoB,EAC/B,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,eAAe,CAAC,CAoC1B"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TransferOptions } from "./transfer.js";
|
|
1
2
|
import { RequestFaucetOptions, SignatureResult, SignMessageOptions, SignTransactionOptions } from "../../client/solana/solana.types.js";
|
|
2
3
|
export type AccountActions = {
|
|
3
4
|
/**
|
|
@@ -76,5 +77,31 @@ export type AccountActions = {
|
|
|
76
77
|
* ```
|
|
77
78
|
*/
|
|
78
79
|
signTransaction: (options: Omit<SignTransactionOptions, "address">) => Promise<SignatureResult>;
|
|
80
|
+
/**
|
|
81
|
+
* Transfers SOL or SPL tokens between accounts
|
|
82
|
+
*
|
|
83
|
+
* @param {TransferOptions} options - Parameters for the transfer.
|
|
84
|
+
* @param {string} options.to - The base58 encoded Solana address of the destination account.
|
|
85
|
+
* @param {sol|usdc|string} options.token - The token to transfer ("sol" or "usdc"), or mint address of the SPL token to transfer.
|
|
86
|
+
* @param {bigint} options.amount - The amount to transfer in atomic units of the token. For example, 0.01 * LAMPORTS_PER_SOL would transfer 0.01 SOL.
|
|
87
|
+
* @param {string | Connection} options.network - The network identifier to use, or a Solana Connection object.
|
|
88
|
+
*
|
|
89
|
+
* @returns A promise that resolves to the transaction signature, which can be used to wait for the transaction result.
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* ```ts
|
|
93
|
+
* import { LAMPORTS_PER_SOL } from "@solana/web3.js";
|
|
94
|
+
*
|
|
95
|
+
* const account = await cdp.solana.getAccount({ name: "Account" });
|
|
96
|
+
*
|
|
97
|
+
* const { signature } = await account.transfer({
|
|
98
|
+
* token: "sol",
|
|
99
|
+
* amount: 5 * LAMPORTS_PER_SOL,
|
|
100
|
+
* to: "3KzDtddx4i53FBkvCzuDmRbaMozTZoJBb1TToWhz3JfE",
|
|
101
|
+
* network: "devnet",
|
|
102
|
+
* });
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
transfer: (options: Omit<TransferOptions, "from">) => Promise<SignatureResult>;
|
|
79
106
|
};
|
|
80
107
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../actions/solana/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,qCAAqC,CAAC;AAE7C,MAAM,MAAM,cAAc,GAAG;IAC3B;;;;;;;;;;;;;;;;;;;OAmBG;IACH,aAAa,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;IAE5F;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,WAAW,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,kBAAkB,EAAE,SAAS,CAAC,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;IAExF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,eAAe,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,sBAAsB,EAAE,SAAS,CAAC,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../actions/solana/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,qCAAqC,CAAC;AAE7C,MAAM,MAAM,cAAc,GAAG;IAC3B;;;;;;;;;;;;;;;;;;;OAmBG;IACH,aAAa,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;IAE5F;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,WAAW,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,kBAAkB,EAAE,SAAS,CAAC,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;IAExF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,eAAe,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,sBAAsB,EAAE,SAAS,CAAC,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;IAEhG;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,QAAQ,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;CAChF,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Connection } from "@solana/web3.js";
|
|
2
|
+
export type Network = "mainnet" | "devnet" | "testnet";
|
|
3
|
+
type GetOrCreateConnectionOptions = {
|
|
4
|
+
networkOrConnection: Network | Connection;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Get a connection to the Solana network
|
|
8
|
+
*
|
|
9
|
+
* @param options - The options for the connection
|
|
10
|
+
*
|
|
11
|
+
* @param options.networkOrConnection - The network to use or a connection
|
|
12
|
+
*
|
|
13
|
+
* @returns The connection
|
|
14
|
+
*/
|
|
15
|
+
export declare function getOrCreateConnection({ networkOrConnection, }: GetOrCreateConnectionOptions): Connection;
|
|
16
|
+
/**
|
|
17
|
+
* Get the network of the connected Solana node
|
|
18
|
+
*
|
|
19
|
+
* @param connection - The connection to the Solana network
|
|
20
|
+
* @throws {Error} If the network is not mainnet, devnet, or testnet
|
|
21
|
+
*
|
|
22
|
+
* @returns The network of the connected Solana node
|
|
23
|
+
*/
|
|
24
|
+
export declare function getConnectedNetwork(connection: Connection): Promise<Network>;
|
|
25
|
+
/**
|
|
26
|
+
* Get the USDC mint address for the given connection
|
|
27
|
+
*
|
|
28
|
+
* @param network - The network to use
|
|
29
|
+
*
|
|
30
|
+
* @returns The USDC mint address
|
|
31
|
+
*/
|
|
32
|
+
export declare function getUsdcMintAddress(network: Network): string;
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../actions/solana/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAU7C,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEvD,KAAK,4BAA4B,GAAG;IAClC,mBAAmB,EAAE,OAAO,GAAG,UAAU,CAAC;CAC3C,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,mBAAmB,GACpB,EAAE,4BAA4B,GAAG,UAAU,CAY3C;AAED;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,CAYlF;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAQ3D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../analytics.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../analytics.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,KAAK,cAAc,GAAG;IACpB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAEF,KAAK,SAAS,GAAG,cAAc,CAAC;AAKhC,eAAO,MAAM,SAAS;;;;;CAKrB,CAAC;AAEF;;;;;GAKG;AACH,iBAAe,SAAS,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CA4CxD;AAED;;;;GAIG;AAEH,iBAAS,0BAA0B,CAAC,WAAW,EAAE,GAAG,GAAG,IAAI,CAkC1D;AAED;;;;GAIG;AAEH,iBAAS,kCAAkC,CAAC,MAAM,EAAE,GAAG,GAAG,IAAI,CAkC7D"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The public RSA key used to encrypt the private key when importing an EVM account.
|
|
3
|
+
*/
|
|
4
|
+
export declare const ImportEvmAccountPublicRSAKey = "-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA2Fxydgm/ryYk0IexQIuL\n9DKyiIk2WmS36AZ83a9Z0QX53qdveg08b05g1Qr+o+COoYOT/FDi8anRGAs7rIyS\nuigrjHR6VrmFjnGrrTr3MINwC9cYQFHwET8YVGRq+BB3iFTB1kIb9XJ/vT2sk1xP\nhJ6JihEwSl4DgbeVjqw59wYqrNg355oa8EdFqkmfGU2tpbM56F8iv1F+shwkGo3y\nGhW/UOQ5OLauXvsqo8ranwsK+lqFblLEMlNtn1VSJeO2vMxryeKFrY2ob8VqGchC\nftPJiLWs2Du6juw4C1rOWwSMlXzZ6cNMHkxdTcEHMr3C2TEHgzjZY41whMwNTB8q\n/pxXnIbH77caaviRs4R/POe8cSsznalXj85LULvFWOIHp0w+jEYSii9Rp9XtHWAH\nnrK/O/SVDtT1ohp2F+Zg1mojTgKfLOyGdOUXTi95naDTuG770rSjHdL80tJBz1Fd\n+1pzGTGXGHLZQLX5YZm5iuy2cebWfF09VjIoCIlDB2++tr4M+O0Z1X1ZE0J5Ackq\nrOluAFalaKynyH3KMyRg+NuLmibu5OmcMjCLK3D4X1YLiN2OK8/bbpEL8JYroDwb\nEXIUW5mGS06YxfSUsxHzL9Tj00+GMm/Gvl0+4/+Vn8IXVHjQOSPNEy3EnqCiH/OW\n8v0IMC32CeGrX7mGbU+MzlsCAwEAAQ==\n-----END PUBLIC KEY-----";
|
|
5
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../client/evm/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,4BAA4B,izBAahB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateServerAccountOptions, GetServerAccountOptions, ListServerAccountsOptions, CreateSmartAccountOptions, WaitForUserOperationOptions, SignHashOptions, SignatureResult, SignMessageOptions, SignTransactionOptions, GetSmartAccountOptions, SmartAccount, ServerAccount, EvmClientInterface, ListServerAccountResult, PrepareUserOperationOptions, UserOperation, GetUserOperationOptions, ListSmartAccountResult, ListSmartAccountsOptions, GetOrCreateServerAccountOptions, SignTypedDataOptions, UpdateEvmAccountOptions } from "./evm.types.js";
|
|
1
|
+
import { CreateServerAccountOptions, GetServerAccountOptions, ListServerAccountsOptions, CreateSmartAccountOptions, WaitForUserOperationOptions, SignHashOptions, SignatureResult, SignMessageOptions, SignTransactionOptions, GetSmartAccountOptions, SmartAccount, ServerAccount, EvmClientInterface, ListServerAccountResult, PrepareUserOperationOptions, UserOperation, GetUserOperationOptions, ListSmartAccountResult, ListSmartAccountsOptions, GetOrCreateServerAccountOptions, SignTypedDataOptions, UpdateEvmAccountOptions, ImportServerAccountOptions } from "./evm.types.js";
|
|
2
2
|
import { ListTokenBalancesResult, ListTokenBalancesOptions } from "../../actions/evm/listTokenBalances.js";
|
|
3
3
|
import { RequestFaucetOptions, RequestFaucetResult } from "../../actions/evm/requestFaucet.js";
|
|
4
4
|
import { SendUserOperationOptions, SendUserOperationReturnType } from "../../actions/evm/sendUserOperation.js";
|
|
@@ -43,6 +43,49 @@ export declare class EvmClient implements EvmClientInterface {
|
|
|
43
43
|
* ```
|
|
44
44
|
*/
|
|
45
45
|
createAccount(options?: CreateServerAccountOptions): Promise<ServerAccount>;
|
|
46
|
+
/**
|
|
47
|
+
* Imports a CDP EVM account from an external source.
|
|
48
|
+
*
|
|
49
|
+
* @param {ImportServerAccountOptions} options - Parameters for importing the account.
|
|
50
|
+
* @param {string} options.privateKey - The private key of the account to import.
|
|
51
|
+
* @param {string} [options.name] - A name for the account to import.
|
|
52
|
+
* @param {string} [options.idempotencyKey] - An idempotency key.
|
|
53
|
+
*
|
|
54
|
+
* @returns A promise that resolves to the imported account.
|
|
55
|
+
*
|
|
56
|
+
* @example **Without arguments**
|
|
57
|
+
* ```ts
|
|
58
|
+
* const account = await cdp.evm.importAccount({
|
|
59
|
+
* privateKey: "0x123456"
|
|
60
|
+
* });
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* @example **With a name**
|
|
64
|
+
* ```ts
|
|
65
|
+
* const account = await cdp.evm.importAccount({
|
|
66
|
+
* privateKey: "0x123456",
|
|
67
|
+
* name: "MyAccount"
|
|
68
|
+
* });
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
* @example **With an idempotency key**
|
|
72
|
+
* ```ts
|
|
73
|
+
* const idempotencyKey = uuidv4();
|
|
74
|
+
*
|
|
75
|
+
* // First call
|
|
76
|
+
* await cdp.evm.importAccount({
|
|
77
|
+
* privateKey: "0x123456",
|
|
78
|
+
* idempotencyKey,
|
|
79
|
+
* });
|
|
80
|
+
*
|
|
81
|
+
* // Second call with the same idempotency key will return the same account
|
|
82
|
+
* await cdp.evm.importAccount({
|
|
83
|
+
* privateKey: "0x123456"
|
|
84
|
+
* idempotencyKey,
|
|
85
|
+
* });
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
importAccount(options: ImportServerAccountOptions): Promise<ServerAccount>;
|
|
46
89
|
/**
|
|
47
90
|
* Creates a new CDP EVM smart account.
|
|
48
91
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evm.d.ts","sourceRoot":"","sources":["../../../client/evm/evm.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"evm.d.ts","sourceRoot":"","sources":["../../../client/evm/evm.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,EACvB,yBAAyB,EACzB,yBAAyB,EACzB,2BAA2B,EAC3B,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,+BAA+B,EAC/B,oBAAoB,EACpB,uBAAuB,EACvB,0BAA0B,EAC3B,MAAM,gBAAgB,CAAC;AAIxB,OAAO,EAEL,uBAAuB,EACvB,wBAAwB,EACzB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EAEpB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAEL,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAEL,8BAA8B,EAC/B,MAAM,2CAA2C,CAAC;AAMnD,OAAO,KAAK,EACV,iBAAiB,EACjB,sBAAsB,EACvB,MAAM,sCAAsC,CAAC;AAE9C;;GAEG;AACH,qBAAa,SAAU,YAAW,kBAAkB;IAClD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACG,aAAa,CAAC,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BG;IACG,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAIhF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6CG;IACG,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAIlF;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACG,iBAAiB,CACrB,OAAO,EAAE,wBAAwB,CAAC,OAAO,EAAE,CAAC,GAC3C,OAAO,CAAC,2BAA2B,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4CG;IACG,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,CAAC;IAiB5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACG,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,eAAe,CAAC;IAchF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwCG;IACG,aAAa,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,aAAa,CAAC;IAgB7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACG,oBAAoB,CACxB,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,8BAA8B,CAAC;CAK3C"}
|
|
@@ -11,9 +11,10 @@ import type { WaitOptions } from "../../utils/wait.js";
|
|
|
11
11
|
/**
|
|
12
12
|
* The EvmClient type, where all OpenApiEvmMethods methods are wrapped.
|
|
13
13
|
*/
|
|
14
|
-
export type EvmClientInterface = Omit<typeof OpenApiEvmMethods, "createEvmAccount" | "createEvmSmartAccount" | "getEvmAccount" | "getEvmAccountByName" | "getEvmSmartAccount" | "getUserOperation" | "updateEvmAccount" | "listEvmAccounts" | "listEvmSmartAccounts" | "listEvmTokenBalances" | "prepareUserOperation" | "requestEvmFaucet" | "sendUserOperation" | "signEvmHash" | "signEvmMessage" | "signEvmTransaction" | "signEvmTypedData" | "sendEvmTransaction" | "signEvmTypedData" | "updateEvmAccount"> & {
|
|
14
|
+
export type EvmClientInterface = Omit<typeof OpenApiEvmMethods, "createEvmAccount" | "createEvmSmartAccount" | "importEvmAccount" | "getEvmAccount" | "getEvmAccountByName" | "getEvmSmartAccount" | "getUserOperation" | "updateEvmAccount" | "listEvmAccounts" | "listEvmSmartAccounts" | "listEvmTokenBalances" | "prepareUserOperation" | "requestEvmFaucet" | "sendUserOperation" | "signEvmHash" | "signEvmMessage" | "signEvmTransaction" | "signEvmTypedData" | "sendEvmTransaction" | "signEvmTypedData" | "updateEvmAccount"> & {
|
|
15
15
|
createAccount: (options: CreateServerAccountOptions) => Promise<ServerAccount>;
|
|
16
16
|
createSmartAccount: (options: CreateSmartAccountOptions) => Promise<SmartAccount>;
|
|
17
|
+
importAccount: (options: ImportServerAccountOptions) => Promise<ServerAccount>;
|
|
17
18
|
getAccount: (options: GetServerAccountOptions) => Promise<ServerAccount>;
|
|
18
19
|
getSmartAccount: (options: GetSmartAccountOptions) => Promise<SmartAccount>;
|
|
19
20
|
getOrCreateAccount: (options: GetOrCreateServerAccountOptions) => Promise<ServerAccount>;
|
|
@@ -97,6 +98,17 @@ export interface CreateServerAccountOptions {
|
|
|
97
98
|
/** The idempotency key. */
|
|
98
99
|
idempotencyKey?: string;
|
|
99
100
|
}
|
|
101
|
+
/**
|
|
102
|
+
* Options for importing an EVM server account.
|
|
103
|
+
*/
|
|
104
|
+
export interface ImportServerAccountOptions {
|
|
105
|
+
/** The name of the account. */
|
|
106
|
+
name?: string;
|
|
107
|
+
/** The idempotency key. */
|
|
108
|
+
idempotencyKey?: string;
|
|
109
|
+
/** The private key of the account. */
|
|
110
|
+
privateKey: Hex;
|
|
111
|
+
}
|
|
100
112
|
/**
|
|
101
113
|
* Options for getting an EVM account.
|
|
102
114
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evm.types.d.ts","sourceRoot":"","sources":["../../../client/evm/evm.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,IAAI,OAAO,EACrB,gBAAgB,IAAI,aAAa,EACjC,eAAe,IAAI,YAAY,EAChC,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EACV,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACpG,OAAO,KAAK,EACV,iBAAiB,EACjB,sBAAsB,EACvB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EACV,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EACV,uBAAuB,EACvB,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,OAAO,iBAAiB,EACtB,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,qBAAqB,GACrB,oBAAoB,GACpB,kBAAkB,GAClB,kBAAkB,GAClB,iBAAiB,GACjB,sBAAsB,GACtB,sB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ClC,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
|
+
{"version":3,"file":"evm.types.d.ts","sourceRoot":"","sources":["../../../client/evm/evm.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,IAAI,OAAO,EACrB,gBAAgB,IAAI,aAAa,EACjC,eAAe,IAAI,YAAY,EAChC,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EACV,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACpG,OAAO,KAAK,EACV,iBAAiB,EACjB,sBAAsB,EACvB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EACV,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EACV,uBAAuB,EACvB,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;A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