@coinbase/cdp-sdk 1.5.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/README.md +101 -3
- package/_cjs/accounts/evm/toEvmServerAccount.js +21 -0
- package/_cjs/accounts/evm/toEvmServerAccount.js.map +1 -1
- package/_cjs/accounts/evm/toEvmSmartAccount.js +35 -0
- package/_cjs/accounts/evm/toEvmSmartAccount.js.map +1 -1
- package/_cjs/accounts/{types.js.map → evm/types.js.map} +1 -1
- package/_cjs/accounts/solana/toSolanaAccount.js +41 -0
- package/_cjs/accounts/solana/toSolanaAccount.js.map +1 -0
- package/_cjs/accounts/solana/types.js +3 -0
- package/_cjs/accounts/solana/types.js.map +1 -0
- package/_cjs/actions/evm/getUserOperation.js +36 -0
- package/_cjs/actions/evm/getUserOperation.js.map +1 -0
- package/_cjs/actions/evm/listTokenBalances.js +33 -0
- package/_cjs/actions/evm/listTokenBalances.js.map +1 -0
- package/_cjs/actions/evm/requestFaucet.js +18 -0
- package/_cjs/actions/evm/requestFaucet.js.map +1 -0
- package/_cjs/actions/evm/sendTransaction.js +29 -0
- package/_cjs/actions/evm/sendTransaction.js.map +1 -0
- package/_cjs/actions/evm/sendUserOperation.js +5 -6
- package/_cjs/actions/evm/sendUserOperation.js.map +1 -1
- package/_cjs/actions/evm/transfer/accountTransferStrategy.js +11 -7
- package/_cjs/actions/evm/transfer/accountTransferStrategy.js.map +1 -1
- package/_cjs/actions/evm/transfer/smartAccountTransferStrategy.js +13 -8
- package/_cjs/actions/evm/transfer/smartAccountTransferStrategy.js.map +1 -1
- package/_cjs/actions/evm/transfer/transfer.js +7 -3
- package/_cjs/actions/evm/transfer/transfer.js.map +1 -1
- package/_cjs/actions/solana/requestFaucet.js +29 -0
- package/_cjs/actions/solana/requestFaucet.js.map +1 -0
- package/_cjs/actions/solana/signMessage.js +29 -0
- package/_cjs/actions/solana/signMessage.js.map +1 -0
- package/_cjs/actions/solana/signTransaction.js +46 -0
- package/_cjs/actions/solana/signTransaction.js.map +1 -0
- package/_cjs/actions/solana/types.js +3 -0
- package/_cjs/actions/solana/types.js.map +1 -0
- package/_cjs/client/evm/evm.js +10 -52
- package/_cjs/client/evm/evm.js.map +1 -1
- package/_cjs/client/solana/solana.js +22 -17
- package/_cjs/client/solana/solana.js.map +1 -1
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +59 -1
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_cjs/openapi-client/generated/index.msw.js +3 -2
- package/_cjs/openapi-client/generated/index.msw.js.map +1 -1
- package/_cjs/openapi-client/generated/policy-engine/policy-engine.js +56 -0
- package/_cjs/openapi-client/generated/policy-engine/policy-engine.js.map +1 -0
- package/_cjs/openapi-client/generated/policy-engine/policy-engine.msw.js +284 -0
- package/_cjs/openapi-client/generated/policy-engine/policy-engine.msw.js.map +1 -0
- package/_cjs/openapi-client/index.js +1 -0
- package/_cjs/openapi-client/index.js.map +1 -1
- package/_cjs/version.js +1 -1
- package/_esm/accounts/evm/toEvmServerAccount.js +21 -0
- package/_esm/accounts/evm/toEvmServerAccount.js.map +1 -1
- package/_esm/accounts/evm/toEvmSmartAccount.js +35 -0
- package/_esm/accounts/evm/toEvmSmartAccount.js.map +1 -1
- package/_esm/accounts/{types.js.map → evm/types.js.map} +1 -1
- package/_esm/accounts/solana/toSolanaAccount.js +38 -0
- package/_esm/accounts/solana/toSolanaAccount.js.map +1 -0
- package/_esm/accounts/solana/types.js +2 -0
- package/_esm/accounts/solana/types.js.map +1 -0
- package/_esm/actions/evm/getUserOperation.js +33 -0
- package/_esm/actions/evm/getUserOperation.js.map +1 -0
- package/_esm/actions/evm/listTokenBalances.js +30 -0
- package/_esm/actions/evm/listTokenBalances.js.map +1 -0
- package/_esm/actions/evm/requestFaucet.js +15 -0
- package/_esm/actions/evm/requestFaucet.js.map +1 -0
- package/_esm/actions/evm/sendTransaction.js +26 -0
- package/_esm/actions/evm/sendTransaction.js.map +1 -0
- package/_esm/actions/evm/sendUserOperation.js +5 -6
- package/_esm/actions/evm/sendUserOperation.js.map +1 -1
- package/_esm/actions/evm/transfer/accountTransferStrategy.js +11 -7
- package/_esm/actions/evm/transfer/accountTransferStrategy.js.map +1 -1
- package/_esm/actions/evm/transfer/smartAccountTransferStrategy.js +13 -8
- package/_esm/actions/evm/transfer/smartAccountTransferStrategy.js.map +1 -1
- package/_esm/actions/evm/transfer/transfer.js +7 -3
- package/_esm/actions/evm/transfer/transfer.js.map +1 -1
- package/_esm/actions/solana/requestFaucet.js +26 -0
- package/_esm/actions/solana/requestFaucet.js.map +1 -0
- package/_esm/actions/solana/signMessage.js +26 -0
- package/_esm/actions/solana/signMessage.js.map +1 -0
- package/_esm/actions/solana/signTransaction.js +43 -0
- package/_esm/actions/solana/signTransaction.js.map +1 -0
- package/_esm/actions/solana/types.js +2 -0
- package/_esm/actions/solana/types.js.map +1 -0
- package/_esm/client/evm/evm.js +10 -52
- package/_esm/client/evm/evm.js.map +1 -1
- package/_esm/client/solana/solana.js +22 -17
- package/_esm/client/solana/solana.js.map +1 -1
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +58 -0
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_esm/openapi-client/generated/index.msw.js +3 -2
- package/_esm/openapi-client/generated/index.msw.js.map +1 -1
- package/_esm/openapi-client/generated/policy-engine/policy-engine.js +48 -0
- package/_esm/openapi-client/generated/policy-engine/policy-engine.js.map +1 -0
- package/_esm/openapi-client/generated/policy-engine/policy-engine.msw.js +259 -0
- package/_esm/openapi-client/generated/policy-engine/policy-engine.msw.js.map +1 -0
- package/_esm/openapi-client/index.js +1 -0
- package/_esm/openapi-client/index.js.map +1 -1
- package/_esm/version.js +1 -1
- package/_types/accounts/evm/toEvmServerAccount.d.ts +1 -1
- package/_types/accounts/evm/toEvmServerAccount.d.ts.map +1 -1
- package/_types/accounts/evm/toEvmSmartAccount.d.ts +1 -1
- package/_types/accounts/evm/toEvmSmartAccount.d.ts.map +1 -1
- package/_types/accounts/{types.d.ts → evm/types.d.ts} +5 -5
- package/_types/accounts/evm/types.d.ts.map +1 -0
- package/_types/accounts/solana/toSolanaAccount.d.ts +20 -0
- package/_types/accounts/solana/toSolanaAccount.d.ts.map +1 -0
- package/_types/accounts/solana/types.d.ts +12 -0
- package/_types/accounts/solana/types.d.ts.map +1 -0
- package/_types/actions/evm/getUserOperation.d.ts +22 -0
- package/_types/actions/evm/getUserOperation.d.ts.map +1 -0
- package/_types/actions/evm/listTokenBalances.d.ts +76 -0
- package/_types/actions/evm/listTokenBalances.d.ts.map +1 -0
- package/_types/actions/evm/requestFaucet.d.ts +34 -0
- package/_types/actions/evm/requestFaucet.d.ts.map +1 -0
- package/_types/actions/evm/sendTransaction.d.ts +42 -0
- package/_types/actions/evm/sendTransaction.d.ts.map +1 -0
- package/_types/actions/evm/sendUserOperation.d.ts +4 -3
- package/_types/actions/evm/sendUserOperation.d.ts.map +1 -1
- package/_types/actions/evm/transfer/accountTransferStrategy.d.ts +1 -1
- package/_types/actions/evm/transfer/accountTransferStrategy.d.ts.map +1 -1
- package/_types/actions/evm/transfer/smartAccountTransferStrategy.d.ts +1 -1
- package/_types/actions/evm/transfer/smartAccountTransferStrategy.d.ts.map +1 -1
- package/_types/actions/evm/transfer/transfer.d.ts +3 -3
- package/_types/actions/evm/transfer/transfer.d.ts.map +1 -1
- package/_types/actions/evm/transfer/types.d.ts +41 -7
- package/_types/actions/evm/transfer/types.d.ts.map +1 -1
- package/_types/actions/evm/types.d.ts +168 -3
- package/_types/actions/evm/types.d.ts.map +1 -1
- package/_types/actions/solana/requestFaucet.d.ts +23 -0
- package/_types/actions/solana/requestFaucet.d.ts.map +1 -0
- package/_types/actions/solana/signMessage.d.ts +23 -0
- package/_types/actions/solana/signMessage.d.ts.map +1 -0
- package/_types/actions/solana/signTransaction.d.ts +38 -0
- package/_types/actions/solana/signTransaction.d.ts.map +1 -0
- package/_types/actions/solana/types.d.ts +80 -0
- package/_types/actions/solana/types.d.ts.map +1 -0
- package/_types/client/evm/evm.d.ts +6 -3
- package/_types/client/evm/evm.d.ts.map +1 -1
- package/_types/client/evm/evm.types.d.ts +12 -138
- package/_types/client/evm/evm.types.d.ts.map +1 -1
- package/_types/client/solana/solana.d.ts +5 -4
- package/_types/client/solana/solana.d.ts.map +1 -1
- package/_types/client/solana/solana.types.d.ts +8 -11
- package/_types/client/solana/solana.types.d.ts.map +1 -1
- package/_types/index.d.ts +1 -1
- package/_types/index.d.ts.map +1 -1
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +218 -0
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
- package/_types/openapi-client/generated/index.msw.d.ts +3 -2
- package/_types/openapi-client/generated/index.msw.d.ts.map +1 -1
- package/_types/openapi-client/generated/policy-engine/policy-engine.d.ts +43 -0
- package/_types/openapi-client/generated/policy-engine/policy-engine.d.ts.map +1 -0
- package/_types/openapi-client/generated/policy-engine/policy-engine.msw.d.ts +25 -0
- package/_types/openapi-client/generated/policy-engine/policy-engine.msw.d.ts.map +1 -0
- package/_types/openapi-client/index.d.ts +1 -0
- package/_types/openapi-client/index.d.ts.map +1 -1
- package/_types/version.d.ts +1 -1
- package/accounts/evm/toEvmServerAccount.ts +35 -1
- package/accounts/evm/toEvmSmartAccount.ts +63 -1
- package/accounts/{types.ts → evm/types.ts} +5 -5
- package/accounts/solana/toSolanaAccount.ts +59 -0
- package/accounts/solana/types.ts +13 -0
- package/actions/evm/getUserOperation.ts +40 -0
- package/actions/evm/listTokenBalances.ts +107 -0
- package/actions/evm/requestFaucet.ts +46 -0
- package/actions/evm/sendTransaction.ts +73 -0
- package/actions/evm/sendUserOperation.ts +7 -7
- package/actions/evm/transfer/accountTransferStrategy.ts +12 -8
- package/actions/evm/transfer/smartAccountTransferStrategy.ts +14 -9
- package/actions/evm/transfer/transfer.ts +17 -6
- package/actions/evm/transfer/types.ts +55 -12
- package/actions/evm/types.ts +191 -3
- package/actions/solana/requestFaucet.ts +35 -0
- package/actions/solana/signMessage.ts +36 -0
- package/actions/solana/signTransaction.ts +53 -0
- package/actions/solana/types.ts +87 -0
- package/client/evm/evm.ts +28 -77
- package/client/evm/evm.types.ts +25 -151
- package/client/solana/solana.ts +32 -37
- package/client/solana/solana.types.ts +10 -15
- package/index.ts +1 -1
- package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +274 -0
- package/openapi-client/generated/index.msw.ts +3 -2
- package/openapi-client/generated/policy-engine/policy-engine.msw.ts +404 -0
- package/openapi-client/generated/policy-engine/policy-engine.ts +95 -0
- package/openapi-client/index.ts +1 -0
- package/package.json +1 -1
- package/version.ts +1 -1
- package/_types/accounts/types.d.ts.map +0 -1
- /package/_cjs/accounts/{types.js → evm/types.js} +0 -0
- /package/_esm/accounts/{types.js → evm/types.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signTransaction.d.ts","sourceRoot":"","sources":["../../../actions/solana/signTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC9F,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAsB,eAAe,CACnC,SAAS,EAAE,oBAAoB,EAC/B,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,eAAe,CAAC,CAY1B"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { RequestFaucetOptions, SignatureResult, SignMessageOptions, SignTransactionOptions } from "../../client/solana/solana.types.js";
|
|
2
|
+
export type AccountActions = {
|
|
3
|
+
/**
|
|
4
|
+
* Requests funds from a Solana faucet.
|
|
5
|
+
*
|
|
6
|
+
* @param {RequestFaucetOptions} options - Parameters for requesting funds from the Solana faucet.
|
|
7
|
+
* @param {string} options.token - The token to request funds for.
|
|
8
|
+
* @param {string} [options.idempotencyKey] - An idempotency key.
|
|
9
|
+
*
|
|
10
|
+
* @returns A promise that resolves to the transaction hash.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* // Create a Solana account
|
|
15
|
+
* const account = await cdp.solana.createAccount();
|
|
16
|
+
*
|
|
17
|
+
* // Request funds from the Solana faucet
|
|
18
|
+
* const result = await account.requestFaucet({
|
|
19
|
+
* token: "sol",
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
requestFaucet: (options: Omit<RequestFaucetOptions, "address">) => Promise<SignatureResult>;
|
|
24
|
+
/**
|
|
25
|
+
* Signs a message.
|
|
26
|
+
*
|
|
27
|
+
* @param {SignMessageOptions} options - Parameters for signing the message.
|
|
28
|
+
* @param {string} options.address - The address to sign the message for.
|
|
29
|
+
* @param {string} options.message - The message to sign.
|
|
30
|
+
* @param {string} [options.idempotencyKey] - An idempotency key.
|
|
31
|
+
*
|
|
32
|
+
* @returns A promise that resolves to the signature.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* // Create a Solana account
|
|
37
|
+
* const account = await cdp.solana.createAccount();
|
|
38
|
+
*
|
|
39
|
+
* // Sign a message
|
|
40
|
+
* const { signature } = await account.signMessage({
|
|
41
|
+
* message: "Hello, world!",
|
|
42
|
+
* });
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
signMessage: (options: Omit<SignMessageOptions, "address">) => Promise<SignatureResult>;
|
|
46
|
+
/**
|
|
47
|
+
* Signs a transaction.
|
|
48
|
+
*
|
|
49
|
+
* @param {SignTransactionOptions} options - Parameters for signing the transaction.
|
|
50
|
+
* @param {string} options.address - The address to sign the transaction for.
|
|
51
|
+
* @param {string} options.transaction - The transaction to sign.
|
|
52
|
+
* @param {string} [options.idempotencyKey] - An idempotency key.
|
|
53
|
+
*
|
|
54
|
+
* @returns A promise that resolves to the signature.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* // Create a Solana account
|
|
59
|
+
* const account = await cdp.solana.createAccount();
|
|
60
|
+
*
|
|
61
|
+
* // Add your transaction instructions here
|
|
62
|
+
* const transaction = new Transaction()
|
|
63
|
+
*
|
|
64
|
+
* // Make sure to set requireAllSignatures to false, since signing will be done through the API
|
|
65
|
+
* const serializedTransaction = transaction.serialize({
|
|
66
|
+
* requireAllSignatures: false,
|
|
67
|
+
* });
|
|
68
|
+
*
|
|
69
|
+
* // Base64 encode the serialized transaction
|
|
70
|
+
* const transaction = Buffer.from(serializedTransaction).toString("base64");
|
|
71
|
+
*
|
|
72
|
+
* // When you want to sign a transaction, you can do so by address and base64 encoded transaction
|
|
73
|
+
* const { signature } = await account.signTransaction({
|
|
74
|
+
* transaction,
|
|
75
|
+
* });
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
signTransaction: (options: Omit<SignTransactionOptions, "address">) => Promise<SignatureResult>;
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +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;CACjG,CAAC"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { CreateServerAccountOptions, GetServerAccountOptions, ListServerAccountsOptions, CreateSmartAccountOptions,
|
|
2
|
-
import {
|
|
1
|
+
import { CreateServerAccountOptions, GetServerAccountOptions, ListServerAccountsOptions, CreateSmartAccountOptions, WaitForUserOperationOptions, SignHashOptions, SignatureResult, SignMessageOptions, SignTransactionOptions, GetSmartAccountOptions, SmartAccount, ServerAccount, EvmClientInterface, ListServerAccountResult, PrepareUserOperationOptions, UserOperation, GetUserOperationOptions, ListSmartAccountResult, ListSmartAccountsOptions, GetOrCreateServerAccountOptions } from "./evm.types.js";
|
|
2
|
+
import { ListTokenBalancesResult, ListTokenBalancesOptions } from "../../actions/evm/listTokenBalances.js";
|
|
3
|
+
import { RequestFaucetOptions, RequestFaucetResult } from "../../actions/evm/requestFaucet.js";
|
|
4
|
+
import { SendUserOperationOptions, SendUserOperationReturnType } from "../../actions/evm/sendUserOperation.js";
|
|
3
5
|
import { WaitForUserOperationReturnType } from "../../actions/evm/waitForUserOperation.js";
|
|
6
|
+
import type { TransactionResult, SendTransactionOptions } from "../../actions/evm/sendTransaction.js";
|
|
4
7
|
/**
|
|
5
8
|
* The namespace containing all EVM methods.
|
|
6
9
|
*/
|
|
@@ -373,7 +376,7 @@ export declare class EvmClient implements EvmClientInterface {
|
|
|
373
376
|
* });
|
|
374
377
|
* ```
|
|
375
378
|
*/
|
|
376
|
-
sendUserOperation(options: SendUserOperationOptions): Promise<SendUserOperationReturnType>;
|
|
379
|
+
sendUserOperation(options: SendUserOperationOptions<unknown[]>): Promise<SendUserOperationReturnType>;
|
|
377
380
|
/**
|
|
378
381
|
* Signs an EVM hash.
|
|
379
382
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evm.d.ts","sourceRoot":"","sources":["../../../client/evm/evm.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,EACvB,yBAAyB,EACzB,yBAAyB,EACzB,
|
|
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,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,EAChC,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;AAKnD,OAAO,KAAK,EACV,iBAAiB,EACjB,sBAAsB,EACvB,MAAM,sCAAsC,CAAC;AAE9C;;GAEG;AACH,qBAAa,SAAU,YAAW,kBAAkB;IAClD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACG,aAAa,CAAC,OAAO,GAAE,0BAA+B,GAAG,OAAO,CAAC,aAAa,CAAC;IAarF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4CG;IACG,kBAAkB,CAAC,OAAO,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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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,10 +1,13 @@
|
|
|
1
|
-
import { EvmAccount as Account, EvmServerAccount as ServerAccount, EvmSmartAccount as SmartAccount } from "../../accounts/types.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import type { EvmAccount as Account, EvmServerAccount as ServerAccount, EvmSmartAccount as SmartAccount } from "../../accounts/evm/types.js";
|
|
2
|
+
import type { ListTokenBalancesOptions, ListTokenBalancesResult } from "../../actions/evm/listTokenBalances.js";
|
|
3
|
+
import type { RequestFaucetOptions, RequestFaucetResult } from "../../actions/evm/requestFaucet.js";
|
|
4
|
+
import type { TransactionResult, SendTransactionOptions } from "../../actions/evm/sendTransaction.js";
|
|
5
|
+
import type { SendUserOperationOptions, SendUserOperationReturnType } from "../../actions/evm/sendUserOperation.js";
|
|
6
|
+
import type { SmartAccountActions } from "../../actions/evm/types.js";
|
|
7
|
+
import type { EvmUserOperationNetwork, EvmUserOperationStatus, OpenApiEvmMethods } from "../../openapi-client/index.js";
|
|
8
|
+
import type { Calls } from "../../types/calls.js";
|
|
9
|
+
import type { Address, Hex } from "../../types/misc.js";
|
|
10
|
+
import type { WaitOptions } from "../../utils/wait.js";
|
|
8
11
|
/**
|
|
9
12
|
* The EvmClient type, where all OpenApiEvmMethods methods are wrapped.
|
|
10
13
|
*/
|
|
@@ -21,7 +24,7 @@ export type EvmClientInterface = Omit<typeof OpenApiEvmMethods, "createEvmAccoun
|
|
|
21
24
|
prepareUserOperation: (options: PrepareUserOperationOptions) => Promise<UserOperation>;
|
|
22
25
|
requestFaucet: (options: RequestFaucetOptions) => Promise<RequestFaucetResult>;
|
|
23
26
|
sendTransaction: (options: SendTransactionOptions) => Promise<TransactionResult>;
|
|
24
|
-
sendUserOperation: (options: SendUserOperationOptions) => Promise<SendUserOperationReturnType>;
|
|
27
|
+
sendUserOperation: (options: SendUserOperationOptions<unknown[]>) => Promise<SendUserOperationReturnType>;
|
|
25
28
|
signHash: (options: SignHashOptions) => Promise<SignatureResult>;
|
|
26
29
|
signMessage: (options: SignMessageOptions) => Promise<SignatureResult>;
|
|
27
30
|
signTransaction: (options: SignTransactionOptions) => Promise<SignatureResult>;
|
|
@@ -129,7 +132,7 @@ export interface ListServerAccountsOptions {
|
|
|
129
132
|
/**
|
|
130
133
|
* A smart account that only contains the owner address.
|
|
131
134
|
*/
|
|
132
|
-
export interface ReadonlySmartAccount extends Omit<SmartAccount, "owners" | keyof
|
|
135
|
+
export interface ReadonlySmartAccount extends Omit<SmartAccount, "owners" | keyof SmartAccountActions> {
|
|
133
136
|
/** The owners of the smart account. */
|
|
134
137
|
owners: Address[];
|
|
135
138
|
}
|
|
@@ -177,63 +180,6 @@ export interface CreateSmartAccountOptions {
|
|
|
177
180
|
/** The idempotency key. */
|
|
178
181
|
idempotencyKey?: string;
|
|
179
182
|
}
|
|
180
|
-
/**
|
|
181
|
-
* Options for requesting funds from an EVM faucet.
|
|
182
|
-
*/
|
|
183
|
-
export interface RequestFaucetOptions {
|
|
184
|
-
/** The address of the account. */
|
|
185
|
-
address: string;
|
|
186
|
-
/** The network to request funds from. */
|
|
187
|
-
network: "base-sepolia" | "ethereum-sepolia";
|
|
188
|
-
/** The token to request funds for. */
|
|
189
|
-
token: "eth" | "usdc" | "eurc" | "cbbtc";
|
|
190
|
-
/** The idempotency key. */
|
|
191
|
-
idempotencyKey?: string;
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* The result of requesting funds from an EVM faucet.
|
|
195
|
-
*/
|
|
196
|
-
export interface RequestFaucetResult {
|
|
197
|
-
/** The transaction hash. */
|
|
198
|
-
transactionHash: Hex;
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* Options for sending an EVM transaction.
|
|
202
|
-
*/
|
|
203
|
-
export interface SendTransactionOptions {
|
|
204
|
-
/** The address of the account. */
|
|
205
|
-
address: Address;
|
|
206
|
-
/**
|
|
207
|
-
* The transaction to send. The chainId is ignored in favor of the `network` field.
|
|
208
|
-
*
|
|
209
|
-
* This can be either:
|
|
210
|
-
* - An RLP-encoded transaction to sign and send, as a 0x-prefixed hex string, or
|
|
211
|
-
* - An EIP-1559 transaction request object.
|
|
212
|
-
*/
|
|
213
|
-
transaction: Hex | TransactionRequestEIP1559;
|
|
214
|
-
/**
|
|
215
|
-
* The network to send the transaction to.
|
|
216
|
-
* The chainId in the `transaction` field is ignored in favor of this field.
|
|
217
|
-
*/
|
|
218
|
-
network: SendEvmTransactionBodyNetwork;
|
|
219
|
-
/** The idempotency key. */
|
|
220
|
-
idempotencyKey?: string;
|
|
221
|
-
}
|
|
222
|
-
/**
|
|
223
|
-
* Options for sending a user operation.
|
|
224
|
-
*/
|
|
225
|
-
export interface SendUserOperationOptions {
|
|
226
|
-
/** The smart account. */
|
|
227
|
-
smartAccount: SmartAccount;
|
|
228
|
-
/** The network. */
|
|
229
|
-
network: EvmUserOperationNetwork;
|
|
230
|
-
/** The calls. */
|
|
231
|
-
calls: Call[];
|
|
232
|
-
/** The paymaster URL. */
|
|
233
|
-
paymasterUrl?: string;
|
|
234
|
-
/** The idempotency key. */
|
|
235
|
-
idempotencyKey?: string;
|
|
236
|
-
}
|
|
237
183
|
/**
|
|
238
184
|
* Options for signing an EVM hash.
|
|
239
185
|
*/
|
|
@@ -274,13 +220,6 @@ export interface SignatureResult {
|
|
|
274
220
|
/** The signature. */
|
|
275
221
|
signature: Hex;
|
|
276
222
|
}
|
|
277
|
-
/**
|
|
278
|
-
* Result of a transaction
|
|
279
|
-
*/
|
|
280
|
-
export interface TransactionResult {
|
|
281
|
-
/** The hash of the transaction. */
|
|
282
|
-
transactionHash: Hex;
|
|
283
|
-
}
|
|
284
223
|
/**
|
|
285
224
|
* Options for waiting for a user operation.
|
|
286
225
|
*/
|
|
@@ -292,69 +231,4 @@ export interface WaitForUserOperationOptions {
|
|
|
292
231
|
/** The wait options. */
|
|
293
232
|
waitOptions?: WaitOptions;
|
|
294
233
|
}
|
|
295
|
-
/**
|
|
296
|
-
* Options for listing EVM token balances.
|
|
297
|
-
*/
|
|
298
|
-
export interface ListTokenBalancesOptions {
|
|
299
|
-
/** The address of the account. */
|
|
300
|
-
address: Address;
|
|
301
|
-
/** The network. */
|
|
302
|
-
network: ListEvmTokenBalancesNetwork;
|
|
303
|
-
/** The page size to paginate through the token balances. */
|
|
304
|
-
pageSize?: number;
|
|
305
|
-
/** The page token to paginate through the token balances. */
|
|
306
|
-
pageToken?: string;
|
|
307
|
-
}
|
|
308
|
-
/**
|
|
309
|
-
* A token on an EVM network, which is either an ERC-20 or a native token (i.e. ETH).
|
|
310
|
-
*/
|
|
311
|
-
export interface EvmToken {
|
|
312
|
-
/**
|
|
313
|
-
* The contract address of the token. For Ether, the contract address is 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
|
|
314
|
-
* per EIP-7528. For ERC-20 tokens, this is the contract address where the token is deployed.
|
|
315
|
-
*/
|
|
316
|
-
contractAddress: Address;
|
|
317
|
-
/** The network the token is on. */
|
|
318
|
-
network: ListEvmTokenBalancesNetwork;
|
|
319
|
-
/**
|
|
320
|
-
* The symbol of the token, which is optional and non-unique. Note: This field
|
|
321
|
-
* may not be present for most tokens while the API is still under development.
|
|
322
|
-
*/
|
|
323
|
-
symbol?: string;
|
|
324
|
-
/**
|
|
325
|
-
* The name of the token, which is optional and non-unique. Note: This field
|
|
326
|
-
* may not be present for most tokens while the API is still under development.
|
|
327
|
-
*/
|
|
328
|
-
name?: string;
|
|
329
|
-
}
|
|
330
|
-
/**
|
|
331
|
-
* A token amount on an EVM network.
|
|
332
|
-
*/
|
|
333
|
-
export interface EvmTokenAmount {
|
|
334
|
-
/** The amount of the token in the smallest indivisible unit of the token. */
|
|
335
|
-
amount: bigint;
|
|
336
|
-
/** The number of decimals in the token. */
|
|
337
|
-
decimals: bigint;
|
|
338
|
-
}
|
|
339
|
-
/**
|
|
340
|
-
* An EVM token balance.
|
|
341
|
-
*/
|
|
342
|
-
export interface EvmTokenBalance {
|
|
343
|
-
/** The token. */
|
|
344
|
-
token: EvmToken;
|
|
345
|
-
/** The amount of the token. */
|
|
346
|
-
amount: EvmTokenAmount;
|
|
347
|
-
}
|
|
348
|
-
/**
|
|
349
|
-
* The result of listing EVM token balances.
|
|
350
|
-
*/
|
|
351
|
-
export interface ListTokenBalancesResult {
|
|
352
|
-
/** The token balances. */
|
|
353
|
-
balances: EvmTokenBalance[];
|
|
354
|
-
/**
|
|
355
|
-
* The next page token to paginate through the token balances.
|
|
356
|
-
* If undefined, there are no more token balances to paginate through.
|
|
357
|
-
*/
|
|
358
|
-
nextPageToken?: string;
|
|
359
|
-
}
|
|
360
234
|
//# sourceMappingURL=evm.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evm.types.d.ts","sourceRoot":"","sources":["../../../client/evm/evm.types.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"evm.types.d.ts","sourceRoot":"","sources":["../../../client/evm/evm.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU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AAM,WAAW,kBAAkB;IACjC,kCAAkC;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,2BAA2B;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,2BAA2B;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,kCAAkC;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,wEAAwE;IACxE,WAAW,EAAE,GAAG,CAAC;IACjB,2BAA2B;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,qBAAqB;IACrB,SAAS,EAAE,GAAG,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,iCAAiC;IACjC,mBAAmB,EAAE,OAAO,CAAC;IAC7B,+BAA+B;IAC/B,UAAU,EAAE,GAAG,CAAC;IAChB,wBAAwB;IACxB,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CreateAccountOptions, GetAccountOptions, GetOrCreateAccountOptions, ListAccountsOptions, ListAccountsResult, RequestFaucetOptions, SignatureResult, SignMessageOptions, SignTransactionOptions, SolanaClientInterface } from "./solana.types.js";
|
|
2
|
+
import { SolanaAccount } from "../../accounts/solana/types.js";
|
|
2
3
|
/**
|
|
3
4
|
* The namespace containing all Solana methods.
|
|
4
5
|
*/
|
|
@@ -33,7 +34,7 @@ export declare class SolanaClient implements SolanaClientInterface {
|
|
|
33
34
|
* await cdp.solana.createAccount({ idempotencyKey });
|
|
34
35
|
* ```
|
|
35
36
|
*/
|
|
36
|
-
createAccount(options?: CreateAccountOptions): Promise<
|
|
37
|
+
createAccount(options?: CreateAccountOptions): Promise<SolanaAccount>;
|
|
37
38
|
/**
|
|
38
39
|
* Gets a Solana account by its address.
|
|
39
40
|
*
|
|
@@ -59,7 +60,7 @@ export declare class SolanaClient implements SolanaClientInterface {
|
|
|
59
60
|
* });
|
|
60
61
|
* ```
|
|
61
62
|
*/
|
|
62
|
-
getAccount(options: GetAccountOptions): Promise<
|
|
63
|
+
getAccount(options: GetAccountOptions): Promise<SolanaAccount>;
|
|
63
64
|
/**
|
|
64
65
|
* Gets a Solana account by its address.
|
|
65
66
|
*
|
|
@@ -75,7 +76,7 @@ export declare class SolanaClient implements SolanaClientInterface {
|
|
|
75
76
|
* });
|
|
76
77
|
* ```
|
|
77
78
|
*/
|
|
78
|
-
getOrCreateAccount(options: GetOrCreateAccountOptions): Promise<
|
|
79
|
+
getOrCreateAccount(options: GetOrCreateAccountOptions): Promise<SolanaAccount>;
|
|
79
80
|
/**
|
|
80
81
|
* Lists all Solana accounts.
|
|
81
82
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solana.d.ts","sourceRoot":"","sources":["../../../client/solana/solana.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"solana.d.ts","sourceRoot":"","sources":["../../../client/solana/solana.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,yBAAyB,EACzB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAO/D;;GAEG;AACH,qBAAa,YAAa,YAAW,qBAAqB;IACxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACG,aAAa,CAAC,OAAO,GAAE,oBAAyB,GAAG,OAAO,CAAC,aAAa,CAAC;IAQ/E;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACG,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,aAAa,CAAC;IAkBpE;;;;;;;;;;;;;;OAcG;IACG,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,aAAa,CAAC;IA0BpF;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACG,YAAY,CAAC,OAAO,GAAE,mBAAwB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAgBlF;;;;;;;;;;;;;;;;;OAiBG;IACG,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,CAAC;IAI5E;;;;;;;;;;;;;;;;;;;;;OAqBG;IACG,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,eAAe,CAAC;IAIxE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACG,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,eAAe,CAAC;CAGjF"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Account, SolanaAccount } from "../../accounts/solana/types.js";
|
|
2
|
+
import { OpenApiSolanaMethods } from "../../openapi-client/index.js";
|
|
2
3
|
/**
|
|
3
4
|
* The SolanaClient type, where all OpenApiSolanaMethods methods are wrapped.
|
|
4
5
|
*/
|
|
@@ -12,9 +13,12 @@ export type SolanaClientInterface = Omit<typeof OpenApiSolanaMethods, "createSol
|
|
|
12
13
|
signTransaction: (options: SignTransactionOptions) => Promise<SignatureResult>;
|
|
13
14
|
};
|
|
14
15
|
/**
|
|
15
|
-
* A Solana
|
|
16
|
+
* A Solana signature result.
|
|
16
17
|
*/
|
|
17
|
-
export
|
|
18
|
+
export interface SignatureResult {
|
|
19
|
+
/** The signature. */
|
|
20
|
+
signature: string;
|
|
21
|
+
}
|
|
18
22
|
/**
|
|
19
23
|
* Options for creating a Solana account.
|
|
20
24
|
*/
|
|
@@ -54,7 +58,7 @@ export interface ListAccountsOptions {
|
|
|
54
58
|
*/
|
|
55
59
|
export interface ListAccountsResult {
|
|
56
60
|
/** The accounts. */
|
|
57
|
-
accounts:
|
|
61
|
+
accounts: SolanaAccount[];
|
|
58
62
|
/**
|
|
59
63
|
* The token for the next page of accounts, if any.
|
|
60
64
|
*/
|
|
@@ -93,11 +97,4 @@ export interface SignTransactionOptions {
|
|
|
93
97
|
/** The idempotency key. */
|
|
94
98
|
idempotencyKey?: string;
|
|
95
99
|
}
|
|
96
|
-
/**
|
|
97
|
-
* A Solana signature result.
|
|
98
|
-
*/
|
|
99
|
-
export interface SignatureResult {
|
|
100
|
-
/** The signature. */
|
|
101
|
-
signature: string;
|
|
102
|
-
}
|
|
103
100
|
//# sourceMappingURL=solana.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solana.types.d.ts","sourceRoot":"","sources":["../../../client/solana/solana.types.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"solana.types.d.ts","sourceRoot":"","sources":["../../../client/solana/solana.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACtC,OAAO,oBAAoB,EACzB,qBAAqB,GACrB,kBAAkB,GAClB,wBAAwB,GACxB,oBAAoB,GACpB,qBAAqB,GACrB,mBAAmB,GACnB,uBAAuB,CAC1B,GAAG;IACF,aAAa,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACnE,UAAU,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7D,kBAAkB,EAAE,CAAC,OAAO,EAAE,yBAAyB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7E,YAAY,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC5E,aAAa,EAAE,CAAC,OAAO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ClC,OAAO,EAAE,MAAM,CAAC;IAChB,2BAA2B;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,2BAA2B;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,kCAAkC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,WAAW,EAAE,MAAM,CAAC;IACpB,2BAA2B;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB"}
|
package/_types/index.d.ts
CHANGED
package/_types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC"}
|