@coinbase/cdp-sdk 1.19.0 → 1.21.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 +28 -0
- package/README.md +8 -0
- package/_cjs/accounts/evm/chainToNetworkMapper.js +33 -0
- package/_cjs/accounts/evm/chainToNetworkMapper.js.map +1 -0
- package/_cjs/accounts/evm/getBaseNodeRpcUrl.js +38 -0
- package/_cjs/accounts/evm/getBaseNodeRpcUrl.js.map +1 -0
- package/_cjs/accounts/evm/networkCapabilities.js +91 -0
- package/_cjs/accounts/evm/networkCapabilities.js.map +1 -0
- package/_cjs/accounts/evm/resolveViemClients.js +2 -35
- package/_cjs/accounts/evm/resolveViemClients.js.map +1 -1
- package/_cjs/accounts/evm/toEvmServerAccount.js +1 -1
- package/_cjs/accounts/evm/toEvmServerAccount.js.map +1 -1
- package/_cjs/accounts/evm/toEvmSmartAccount.js +2 -2
- package/_cjs/accounts/evm/toEvmSmartAccount.js.map +1 -1
- package/_cjs/accounts/evm/toNetworkScopedEvmServerAccount.js +87 -18
- package/_cjs/accounts/evm/toNetworkScopedEvmServerAccount.js.map +1 -1
- package/_cjs/accounts/evm/toNetworkScopedEvmSmartAccount.js +126 -2
- package/_cjs/accounts/evm/toNetworkScopedEvmSmartAccount.js.map +1 -1
- package/_cjs/actions/evm/sendUserOperation.js +8 -1
- package/_cjs/actions/evm/sendUserOperation.js.map +1 -1
- package/_cjs/actions/evm/transfer/smartAccountTransferStrategy.js +3 -2
- package/_cjs/actions/evm/transfer/smartAccountTransferStrategy.js.map +1 -1
- package/_cjs/actions/evm/transfer/transfer.js +4 -0
- package/_cjs/actions/evm/transfer/transfer.js.map +1 -1
- package/_cjs/actions/evm/transfer/transferWithViem.js +53 -0
- package/_cjs/actions/evm/transfer/transferWithViem.js.map +1 -0
- package/_cjs/actions/evm/transfer/types.js +25 -0
- package/_cjs/actions/evm/transfer/types.js.map +1 -1
- package/_cjs/client/evm/evm.js +2 -2
- package/_cjs/client/evm/evm.js.map +1 -1
- package/_cjs/client/solana/solana.js +74 -0
- package/_cjs/client/solana/solana.js.map +1 -1
- package/_cjs/constants.js +18 -1
- package/_cjs/constants.js.map +1 -1
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +2 -0
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_cjs/openapi-client/generated/index.msw.js +4 -4
- package/_cjs/openapi-client/generated/index.msw.js.map +1 -1
- package/_cjs/openapi-client/generated/solana-accounts/solana-accounts.js +10 -1
- package/_cjs/openapi-client/generated/solana-accounts/solana-accounts.js.map +1 -1
- package/_cjs/version.js +1 -1
- package/_esm/accounts/evm/chainToNetworkMapper.js +30 -0
- package/_esm/accounts/evm/chainToNetworkMapper.js.map +1 -0
- package/_esm/accounts/evm/getBaseNodeRpcUrl.js +35 -0
- package/_esm/accounts/evm/getBaseNodeRpcUrl.js.map +1 -0
- package/_esm/accounts/evm/networkCapabilities.js +86 -0
- package/_esm/accounts/evm/networkCapabilities.js.map +1 -0
- package/_esm/accounts/evm/resolveViemClients.js +1 -34
- package/_esm/accounts/evm/resolveViemClients.js.map +1 -1
- package/_esm/accounts/evm/toEvmServerAccount.js +1 -1
- package/_esm/accounts/evm/toEvmServerAccount.js.map +1 -1
- package/_esm/accounts/evm/toEvmSmartAccount.js +2 -2
- package/_esm/accounts/evm/toEvmSmartAccount.js.map +1 -1
- package/_esm/accounts/evm/toNetworkScopedEvmServerAccount.js +88 -19
- package/_esm/accounts/evm/toNetworkScopedEvmServerAccount.js.map +1 -1
- package/_esm/accounts/evm/toNetworkScopedEvmSmartAccount.js +126 -2
- package/_esm/accounts/evm/toNetworkScopedEvmSmartAccount.js.map +1 -1
- package/_esm/actions/evm/sendUserOperation.js +8 -1
- package/_esm/actions/evm/sendUserOperation.js.map +1 -1
- package/_esm/actions/evm/transfer/smartAccountTransferStrategy.js +3 -2
- package/_esm/actions/evm/transfer/smartAccountTransferStrategy.js.map +1 -1
- package/_esm/actions/evm/transfer/transfer.js +4 -0
- package/_esm/actions/evm/transfer/transfer.js.map +1 -1
- package/_esm/actions/evm/transfer/transferWithViem.js +50 -0
- package/_esm/actions/evm/transfer/transferWithViem.js.map +1 -0
- package/_esm/actions/evm/transfer/types.js +23 -1
- package/_esm/actions/evm/transfer/types.js.map +1 -1
- package/_esm/client/evm/evm.js +2 -2
- package/_esm/client/evm/evm.js.map +1 -1
- package/_esm/client/solana/solana.js +71 -0
- package/_esm/client/solana/solana.js.map +1 -1
- package/_esm/constants.js +17 -0
- package/_esm/constants.js.map +1 -1
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +2 -0
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_esm/openapi-client/generated/index.msw.js +4 -4
- package/_esm/openapi-client/generated/index.msw.js.map +1 -1
- package/_esm/openapi-client/generated/solana-accounts/solana-accounts.js +8 -0
- package/_esm/openapi-client/generated/solana-accounts/solana-accounts.js.map +1 -1
- package/_esm/version.js +1 -1
- package/_types/accounts/evm/chainToNetworkMapper.d.ts +11 -0
- package/_types/accounts/evm/chainToNetworkMapper.d.ts.map +1 -0
- package/_types/accounts/evm/getBaseNodeRpcUrl.d.ts +8 -0
- package/_types/accounts/evm/getBaseNodeRpcUrl.d.ts.map +1 -0
- package/_types/accounts/evm/networkCapabilities.d.ts +103 -0
- package/_types/accounts/evm/networkCapabilities.d.ts.map +1 -0
- package/_types/accounts/evm/resolveViemClients.d.ts.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/evm/toNetworkScopedEvmServerAccount.d.ts +3 -3
- package/_types/accounts/evm/toNetworkScopedEvmServerAccount.d.ts.map +1 -1
- package/_types/accounts/evm/toNetworkScopedEvmSmartAccount.d.ts +9 -6
- package/_types/accounts/evm/toNetworkScopedEvmSmartAccount.d.ts.map +1 -1
- package/_types/accounts/evm/types.d.ts +109 -12
- package/_types/accounts/evm/types.d.ts.map +1 -1
- package/_types/actions/evm/sendUserOperation.d.ts.map +1 -1
- package/_types/actions/evm/swap/types.d.ts +9 -4
- package/_types/actions/evm/swap/types.d.ts.map +1 -1
- package/_types/actions/evm/transfer/smartAccountTransferStrategy.d.ts.map +1 -1
- package/_types/actions/evm/transfer/transfer.d.ts.map +1 -1
- package/_types/actions/evm/transfer/transferWithViem.d.ts +16 -0
- package/_types/actions/evm/transfer/transferWithViem.d.ts.map +1 -0
- package/_types/actions/evm/transfer/types.d.ts +17 -1
- package/_types/actions/evm/transfer/types.d.ts.map +1 -1
- package/_types/client/evm/evm.d.ts.map +1 -1
- package/_types/client/evm/evm.types.d.ts +1 -1
- package/_types/client/evm/evm.types.d.ts.map +1 -1
- package/_types/client/solana/solana.d.ts +40 -1
- package/_types/client/solana/solana.d.ts.map +1 -1
- package/_types/client/solana/solana.types.d.ts +15 -1
- package/_types/client/solana/solana.types.d.ts.map +1 -1
- package/_types/constants.d.ts +4 -0
- package/_types/constants.d.ts.map +1 -1
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +2 -0
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
- package/_types/openapi-client/generated/index.msw.d.ts +4 -4
- package/_types/openapi-client/generated/index.msw.d.ts.map +1 -1
- package/_types/openapi-client/generated/solana-accounts/solana-accounts.d.ts +5 -0
- package/_types/openapi-client/generated/solana-accounts/solana-accounts.d.ts.map +1 -1
- package/_types/openapi-client/index.d.ts +10 -0
- package/_types/openapi-client/index.d.ts.map +1 -1
- package/_types/version.d.ts +1 -1
- package/accounts/evm/chainToNetworkMapper.ts +37 -0
- package/accounts/evm/getBaseNodeRpcUrl.ts +40 -0
- package/accounts/evm/networkCapabilities.ts +117 -0
- package/accounts/evm/resolveViemClients.ts +1 -38
- package/accounts/evm/toEvmServerAccount.ts +3 -3
- package/accounts/evm/toEvmSmartAccount.ts +3 -3
- package/accounts/evm/toNetworkScopedEvmServerAccount.ts +116 -29
- package/accounts/evm/toNetworkScopedEvmSmartAccount.ts +178 -11
- package/accounts/evm/types.ts +253 -23
- package/actions/evm/sendUserOperation.ts +9 -1
- package/actions/evm/swap/types.ts +11 -3
- package/actions/evm/transfer/smartAccountTransferStrategy.ts +5 -2
- package/actions/evm/transfer/transfer.ts +8 -0
- package/actions/evm/transfer/transferWithViem.ts +66 -0
- package/actions/evm/transfer/types.ts +31 -1
- package/client/evm/evm.ts +2 -2
- package/client/evm/evm.types.ts +1 -1
- package/client/solana/solana.ts +89 -0
- package/client/solana/solana.types.ts +16 -0
- package/constants.ts +18 -0
- package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +2 -0
- package/openapi-client/generated/index.msw.ts +4 -4
- package/openapi-client/generated/solana-accounts/solana-accounts.ts +20 -0
- package/package.json +1 -1
- package/version.ts +1 -1
- package/_cjs/client/evm/constants.js +0 -21
- package/_cjs/client/evm/constants.js.map +0 -1
- package/_esm/client/evm/constants.js +0 -18
- package/_esm/client/evm/constants.js.map +0 -1
- package/_types/client/evm/constants.d.ts +0 -5
- package/_types/client/evm/constants.d.ts.map +0 -1
- package/client/evm/constants.ts +0 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solana-accounts.js","sourceRoot":"","sources":["../../../../openapi-client/generated/solana-accounts/solana-accounts.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,MAAiC,EACjC,OAA8C,EAC9C,EAAE;IACF,OAAO,YAAY,CACjB,EAAE,GAAG,EAAE,qBAAqB,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EACrD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;GAGG;A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,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,uBAAuB;KAC9B,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACvC,IAAY,EACZ,6BAA4D,EAC5D,OAA8C,EAC9C,EAAE;IACF,OAAO,YAAY,CACjB;QACE,GAAG,EAAE,sCAAsC,IAAI,EAAE;QACjD,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,6BAA6B;KACpC,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,OAAe,EACf,yBAAoD,EACpD,OAA8C,EAC9C,EAAE;IACF,OAAO,YAAY,CACjB;QACE,GAAG,EAAE,uBAAuB,OAAO,mBAAmB;QACtD,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,yBAAyB;KAChC,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AACF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,OAAe,EACf,qBAA4C,EAC5C,OAA8C,EAC9C,EAAE;IACF,OAAO,YAAY,CACjB;QACE,GAAG,EAAE,uBAAuB,OAAO,eAAe;QAClD,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,qBAAqB;KAC5B,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"solana-accounts.js","sourceRoot":"","sources":["../../../../openapi-client/generated/solana-accounts/solana-accounts.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD;;;;;;GAMG;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B;KAC5B,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,uBAIC,EACD,OAA8C,EAC9C,EAAE;IACF,OAAO,YAAY,CACjB;QACE,GAAG,EAAE,4BAA4B;QACjC,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,uBAAuB;KAC9B,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC"}
|
package/_esm/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const version = "1.
|
|
1
|
+
export const version = "1.21.0";
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { KnownEvmNetworks } from "./types.js";
|
|
2
|
+
import type { Chain } from "viem";
|
|
3
|
+
/**
|
|
4
|
+
* Maps a viem chain to a Coinbase network identifier.
|
|
5
|
+
* This function only supports the networks defined in KnownEvmNetworks.
|
|
6
|
+
*
|
|
7
|
+
* @param chain - The viem chain object
|
|
8
|
+
* @returns The Coinbase network identifier, or undefined if the chain is not supported
|
|
9
|
+
*/
|
|
10
|
+
export declare function mapChainToNetwork(chain: Chain): KnownEvmNetworks | undefined;
|
|
11
|
+
//# sourceMappingURL=chainToNetworkMapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chainToNetworkMapper.d.ts","sourceRoot":"","sources":["../../../accounts/evm/chainToNetworkMapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAElC;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,KAAK,GAAG,gBAAgB,GAAG,SAAS,CA0B5E"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the base node RPC URL for a given network. Can also be used as a Paymaster URL
|
|
3
|
+
*
|
|
4
|
+
* @param network - The network identifier
|
|
5
|
+
* @returns The base node RPC URL or undefined if the network is not supported
|
|
6
|
+
*/
|
|
7
|
+
export declare function getBaseNodeRpcUrl(network: "base" | "base-sepolia"): Promise<string | undefined>;
|
|
8
|
+
//# sourceMappingURL=getBaseNodeRpcUrl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getBaseNodeRpcUrl.d.ts","sourceRoot":"","sources":["../../../accounts/evm/getBaseNodeRpcUrl.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,MAAM,GAAG,cAAc,GAC/B,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CA4B7B"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized configuration for network capabilities.
|
|
3
|
+
* This defines which methods are available on which networks.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Network capabilities configuration.
|
|
7
|
+
* Each network has a set of boolean flags indicating which methods are supported.
|
|
8
|
+
*/
|
|
9
|
+
export declare const NETWORK_CAPABILITIES: {
|
|
10
|
+
readonly base: {
|
|
11
|
+
readonly listTokenBalances: true;
|
|
12
|
+
readonly requestFaucet: false;
|
|
13
|
+
readonly quoteFund: true;
|
|
14
|
+
readonly fund: true;
|
|
15
|
+
readonly waitForFundOperationReceipt: true;
|
|
16
|
+
readonly transfer: true;
|
|
17
|
+
readonly sendTransaction: true;
|
|
18
|
+
readonly quoteSwap: true;
|
|
19
|
+
readonly swap: true;
|
|
20
|
+
};
|
|
21
|
+
readonly "base-sepolia": {
|
|
22
|
+
readonly listTokenBalances: true;
|
|
23
|
+
readonly requestFaucet: true;
|
|
24
|
+
readonly quoteFund: false;
|
|
25
|
+
readonly fund: false;
|
|
26
|
+
readonly waitForFundOperationReceipt: false;
|
|
27
|
+
readonly transfer: true;
|
|
28
|
+
readonly sendTransaction: true;
|
|
29
|
+
readonly quoteSwap: false;
|
|
30
|
+
readonly swap: false;
|
|
31
|
+
};
|
|
32
|
+
readonly ethereum: {
|
|
33
|
+
readonly listTokenBalances: true;
|
|
34
|
+
readonly requestFaucet: false;
|
|
35
|
+
readonly quoteFund: false;
|
|
36
|
+
readonly fund: false;
|
|
37
|
+
readonly waitForFundOperationReceipt: false;
|
|
38
|
+
readonly transfer: true;
|
|
39
|
+
readonly sendTransaction: true;
|
|
40
|
+
readonly quoteSwap: true;
|
|
41
|
+
readonly swap: true;
|
|
42
|
+
};
|
|
43
|
+
readonly "ethereum-sepolia": {
|
|
44
|
+
readonly listTokenBalances: false;
|
|
45
|
+
readonly requestFaucet: true;
|
|
46
|
+
readonly quoteFund: false;
|
|
47
|
+
readonly fund: false;
|
|
48
|
+
readonly waitForFundOperationReceipt: false;
|
|
49
|
+
readonly transfer: true;
|
|
50
|
+
readonly sendTransaction: true;
|
|
51
|
+
readonly quoteSwap: false;
|
|
52
|
+
readonly swap: false;
|
|
53
|
+
};
|
|
54
|
+
readonly "ethereum-hoodi": {
|
|
55
|
+
readonly listTokenBalances: false;
|
|
56
|
+
readonly requestFaucet: true;
|
|
57
|
+
readonly quoteFund: false;
|
|
58
|
+
readonly fund: false;
|
|
59
|
+
readonly waitForFundOperationReceipt: false;
|
|
60
|
+
readonly transfer: false;
|
|
61
|
+
readonly sendTransaction: true;
|
|
62
|
+
readonly quoteSwap: false;
|
|
63
|
+
readonly swap: false;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Type for a network name from the capabilities configuration
|
|
68
|
+
*/
|
|
69
|
+
export type NetworkName = keyof typeof NETWORK_CAPABILITIES;
|
|
70
|
+
/**
|
|
71
|
+
* Type for method names
|
|
72
|
+
*/
|
|
73
|
+
export type MethodName = keyof (typeof NETWORK_CAPABILITIES)[NetworkName];
|
|
74
|
+
/**
|
|
75
|
+
* Helper to get networks that support a specific method
|
|
76
|
+
*
|
|
77
|
+
* @param method - The method name to check support for
|
|
78
|
+
* @returns An array of network names that support the method
|
|
79
|
+
*/
|
|
80
|
+
export declare function getNetworksSupportingMethod(method: MethodName): NetworkName[];
|
|
81
|
+
/**
|
|
82
|
+
* Helper to check if a network supports a method
|
|
83
|
+
*
|
|
84
|
+
* @param method - The method name to check
|
|
85
|
+
* @param network - The network name to check
|
|
86
|
+
* @returns True if the network supports the method, false otherwise
|
|
87
|
+
*/
|
|
88
|
+
export declare function isMethodSupportedOnNetwork(method: MethodName, network: string): boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Type helper to extract networks supporting a specific method
|
|
91
|
+
*/
|
|
92
|
+
export type NetworksSupporting<M extends MethodName> = {
|
|
93
|
+
[N in NetworkName]: (typeof NETWORK_CAPABILITIES)[N][M] extends true ? N : never;
|
|
94
|
+
}[NetworkName];
|
|
95
|
+
export type ListTokenBalancesNetworks = NetworksSupporting<"listTokenBalances">;
|
|
96
|
+
export type RequestFaucetNetworks = NetworksSupporting<"requestFaucet">;
|
|
97
|
+
export type QuoteFundNetworks = NetworksSupporting<"quoteFund">;
|
|
98
|
+
export type FundNetworks = NetworksSupporting<"fund">;
|
|
99
|
+
export type TransferNetworks = NetworksSupporting<"transfer">;
|
|
100
|
+
export type SendTransactionNetworks = NetworksSupporting<"sendTransaction">;
|
|
101
|
+
export type QuoteSwapNetworks = NetworksSupporting<"quoteSwap">;
|
|
102
|
+
export type SwapNetworks = NetworksSupporting<"swap">;
|
|
103
|
+
//# sourceMappingURL=networkCapabilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"networkCapabilities.d.ts","sourceRoot":"","sources":["../../../accounts/evm/networkCapabilities.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDvB,C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ings":"AAAA,OAAO,EACL,OAAO,EAIP,SAAS,EACT,KAAK,KAAK,EACV,KAAK,YAAY,EACjB,KAAK,YAAY,EAClB,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"resolveViemClients.d.ts","sourceRoot":"","sources":["../../../accounts/evm/resolveViemClients.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAIP,SAAS,EACT,KAAK,KAAK,EACV,KAAK,YAAY,EACjB,KAAK,YAAY,EAClB,MAAM,MAAM,CAAC;AAMd,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAmG7C;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,wEAAwE;IACxE,gBAAgB,EAAE,MAAM,CAAC;IACzB,oDAAoD;IACpD,OAAO,EAAE,UAAU,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,8BAA8B;IAC9B,KAAK,EAAE,KAAK,CAAC;IACb,oDAAoD;IACpD,YAAY,EAAE,YAAY,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC7C,iDAAiD;IACjD,YAAY,EAAE,YAAY,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;CACvD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,mBAAmB,CAAC,CA4D9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toEvmServerAccount.d.ts","sourceRoot":"","sources":["../../../accounts/evm/toEvmServerAccount.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"toEvmServerAccount.d.ts","sourceRoot":"","sources":["../../../accounts/evm/toEvmServerAccount.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,gBAAgB,EAAmB,MAAM,YAAY,CAAC;AAWpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAGtF;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,kDAAkD;IAClD,OAAO,EAAE,UAAU,CAAC;CACrB,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,oBAAoB,EAC/B,OAAO,EAAE,yBAAyB,GACjC,gBAAgB,CA+GlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toEvmSmartAccount.d.ts","sourceRoot":"","sources":["../../../accounts/evm/toEvmSmartAccount.ts"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"toEvmSmartAccount.d.ts","sourceRoot":"","sources":["../../../accounts/evm/toEvmSmartAccount.ts"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAoB,MAAM,YAAY,CAAC;AAOhF,OAAO,KAAK,EACV,oBAAoB,EACpB,eAAe,IAAI,oBAAoB,EACxC,MAAM,+BAA+B,CAAC;AAGvC;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,wCAAwC;IACxC,YAAY,EAAE,oBAAoB,CAAC;IACnC,sCAAsC;IACtC,KAAK,EAAE,UAAU,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,oBAAoB,EAC/B,OAAO,EAAE,wBAAwB,GAChC,eAAe,CA6FjB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { EvmServerAccount, NetworkScopedEvmServerAccount } from "./types.js";
|
|
2
|
-
import type { CdpOpenApiClientType } from "../../openapi-client/index.js";
|
|
3
2
|
/**
|
|
4
3
|
* Options for converting a pre-existing EvmAccount to a NetworkScopedEvmServerAccount.
|
|
5
4
|
*/
|
|
@@ -13,11 +12,12 @@ export type ToNetworkScopedEvmServerAccountOptions = {
|
|
|
13
12
|
* Creates a Network-scoped Server-managed EvmAccount instance from an existing EvmAccount.
|
|
14
13
|
* Use this to interact with previously deployed EvmAccounts on a specific network.
|
|
15
14
|
*
|
|
16
|
-
* @param {CdpOpenApiClientType} apiClient - The API client.
|
|
17
15
|
* @param {ToNetworkScopedEvmServerAccountOptions} options - Configuration options.
|
|
18
16
|
* @param {EvmServerAccount} options.account - The EvmServerAccount that was previously created.
|
|
19
17
|
* @param {string} options.network - The network to scope the account to.
|
|
20
18
|
* @returns {NetworkScopedEvmServerAccount} A configured NetworkScopedEvmServerAccount instance ready for signing.
|
|
21
19
|
*/
|
|
22
|
-
export declare function toNetworkScopedEvmServerAccount
|
|
20
|
+
export declare function toNetworkScopedEvmServerAccount<Network extends string>(options: ToNetworkScopedEvmServerAccountOptions & {
|
|
21
|
+
network: Network;
|
|
22
|
+
}): Promise<NetworkScopedEvmServerAccount<Network>>;
|
|
23
23
|
//# sourceMappingURL=toNetworkScopedEvmServerAccount.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toNetworkScopedEvmServerAccount.d.ts","sourceRoot":"","sources":["../../../accounts/evm/toNetworkScopedEvmServerAccount.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"toNetworkScopedEvmServerAccount.d.ts","sourceRoot":"","sources":["../../../accounts/evm/toNetworkScopedEvmServerAccount.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,gBAAgB,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAkBlF;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG;IACnD,kDAAkD;IAClD,OAAO,EAAE,gBAAgB,CAAC;IAC1B,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAsB,+BAA+B,CAAC,OAAO,SAAS,MAAM,EAC1E,OAAO,EAAE,sCAAsC,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,GACrE,OAAO,CAAC,6BAA6B,CAAC,OAAO,CAAC,CAAC,CAiIjD"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { EvmAccount, EvmSmartAccount, NetworkScopedEvmSmartAccount } from "./types.js";
|
|
1
|
+
import type { EvmAccount, EvmSmartAccount, KnownEvmNetworks, NetworkScopedEvmSmartAccount } from "./types.js";
|
|
2
2
|
import type { CdpOpenApiClientType } from "../../openapi-client/index.js";
|
|
3
3
|
/**
|
|
4
|
-
* Options for converting a pre-existing EvmSmartAccount and owner to a
|
|
4
|
+
* Options for converting a pre-existing EvmSmartAccount and owner to a NetworkScopedEvmSmartAccount
|
|
5
5
|
*/
|
|
6
|
-
export type
|
|
6
|
+
export type ToNetworkScopedEvmSmartAccountOptions = {
|
|
7
7
|
/** The pre-existing EvmSmartAccount. */
|
|
8
8
|
smartAccount: EvmSmartAccount;
|
|
9
9
|
/** The network to scope the smart account object to. */
|
|
10
|
-
network:
|
|
10
|
+
network: KnownEvmNetworks;
|
|
11
11
|
/** The owner of the smart account. */
|
|
12
12
|
owner: EvmAccount;
|
|
13
13
|
};
|
|
@@ -18,10 +18,13 @@ export type ToEvmSmartAccountOptions = {
|
|
|
18
18
|
* The owner must be the original owner of the evm smart account.
|
|
19
19
|
*
|
|
20
20
|
* @param {CdpOpenApiClientType} apiClient - The API client.
|
|
21
|
-
* @param {
|
|
21
|
+
* @param {ToNetworkScopedEvmSmartAccountOptions} options - Configuration options.
|
|
22
22
|
* @param {EvmSmartAccount} options.smartAccount - The deployed evm smart account.
|
|
23
23
|
* @param {EvmAccount} options.owner - The owner which signs for the smart account.
|
|
24
|
+
* @param {KnownEvmNetworks} options.network - The network to scope the smart account to.
|
|
24
25
|
* @returns {NetworkScopedEvmSmartAccount} A configured NetworkScopedEvmSmartAccount instance ready for user operation submission.
|
|
25
26
|
*/
|
|
26
|
-
export declare function toNetworkScopedEvmSmartAccount(apiClient: CdpOpenApiClientType, options:
|
|
27
|
+
export declare function toNetworkScopedEvmSmartAccount<Network extends KnownEvmNetworks>(apiClient: CdpOpenApiClientType, options: ToNetworkScopedEvmSmartAccountOptions & {
|
|
28
|
+
network: Network;
|
|
29
|
+
}): Promise<NetworkScopedEvmSmartAccount<Network>>;
|
|
27
30
|
//# sourceMappingURL=toNetworkScopedEvmSmartAccount.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toNetworkScopedEvmSmartAccount.d.ts","sourceRoot":"","sources":["../../../accounts/evm/toNetworkScopedEvmSmartAccount.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"toNetworkScopedEvmSmartAccount.d.ts","sourceRoot":"","sources":["../../../accounts/evm/toNetworkScopedEvmSmartAccount.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EACV,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,4BAA4B,EAC7B,MAAM,YAAY,CAAC;AAepB,OAAO,KAAK,EACV,oBAAoB,EAGrB,MAAM,+BAA+B,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAAG;IAClD,wCAAwC;IACxC,YAAY,EAAE,eAAe,CAAC;IAC9B,wDAAwD;IACxD,OAAO,EAAE,gBAAgB,CAAC;IAC1B,sCAAsC;IACtC,KAAK,EAAE,UAAU,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,wBAAsB,8BAA8B,CAAC,OAAO,SAAS,gBAAgB,EACnF,SAAS,EAAE,oBAAoB,EAC/B,OAAO,EAAE,qCAAqC,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,GACpE,OAAO,CAAC,4BAA4B,CAAC,OAAO,CAAC,CAAC,CA0IhD"}
|
|
@@ -1,5 +1,17 @@
|
|
|
1
|
+
import { ListTokenBalancesNetworks, RequestFaucetNetworks, QuoteFundNetworks, FundNetworks, TransferNetworks, QuoteSwapNetworks, SwapNetworks } from "./networkCapabilities.js";
|
|
2
|
+
import { FundOptions } from "../../actions/evm/fund/fund.js";
|
|
3
|
+
import { Quote } from "../../actions/evm/fund/Quote.js";
|
|
4
|
+
import { QuoteFundOptions } from "../../actions/evm/fund/quoteFund.js";
|
|
5
|
+
import { FundOperationResult } from "../../actions/evm/fund/types.js";
|
|
6
|
+
import { WaitForFundOperationOptions, WaitForFundOperationResult } from "../../actions/evm/fund/waitForFundOperationReceipt.js";
|
|
7
|
+
import { ListTokenBalancesOptions, ListTokenBalancesResult } from "../../actions/evm/listTokenBalances.js";
|
|
1
8
|
import { RequestFaucetOptions, RequestFaucetResult } from "../../actions/evm/requestFaucet.js";
|
|
2
9
|
import { TransactionResult, SendTransactionOptions } from "../../actions/evm/sendTransaction.js";
|
|
10
|
+
import { SendUserOperationOptions, SendUserOperationReturnType } from "../../actions/evm/sendUserOperation.js";
|
|
11
|
+
import { AccountQuoteSwapOptions, AccountQuoteSwapResult, AccountSwapOptions, AccountSwapResult, SmartAccountQuoteSwapOptions, SmartAccountQuoteSwapResult, SmartAccountSwapOptions, SmartAccountSwapResult } from "../../actions/evm/swap/types.js";
|
|
12
|
+
import { WaitForUserOperationOptions, WaitForUserOperationReturnType } from "../../actions/evm/waitForUserOperation.js";
|
|
13
|
+
import { GetUserOperationOptions, UserOperation } from "../../client/evm/evm.types.js";
|
|
14
|
+
import type { SmartAccountTransferOptions, TransferOptions } from "../../actions/evm/transfer/types.js";
|
|
3
15
|
import type { AccountActions, SmartAccountActions } from "../../actions/evm/types.js";
|
|
4
16
|
import type { Address, Hash, Hex } from "../../types/misc.js";
|
|
5
17
|
import type { Prettify } from "../../types/utils.js";
|
|
@@ -26,6 +38,14 @@ export type EvmAccount = {
|
|
|
26
38
|
/** A list of Policy ID's that apply to the account. */
|
|
27
39
|
policies?: string[];
|
|
28
40
|
};
|
|
41
|
+
/**
|
|
42
|
+
* Known EVM networks supported by the SDK.
|
|
43
|
+
*/
|
|
44
|
+
export type KnownEvmNetworks = "base" | "base-sepolia" | "ethereum" | "ethereum-sepolia" | "ethereum-hoodi" | "polygon" | "polygon-mumbai" | "arbitrum" | "arbitrum-sepolia" | "optimism" | "optimism-sepolia";
|
|
45
|
+
/**
|
|
46
|
+
* Network input that accepts known networks or RPC URLs
|
|
47
|
+
*/
|
|
48
|
+
export type NetworkOrRpcUrl = KnownEvmNetworks | (string & {});
|
|
29
49
|
/**
|
|
30
50
|
* Server-managed ethereum account
|
|
31
51
|
*/
|
|
@@ -34,8 +54,21 @@ export type EvmServerAccount = Prettify<EvmAccount & AccountActions & {
|
|
|
34
54
|
name?: string;
|
|
35
55
|
/** Indicates this is a server-managed account. */
|
|
36
56
|
type: "evm-server";
|
|
37
|
-
/**
|
|
38
|
-
|
|
57
|
+
/**
|
|
58
|
+
* A function that returns a network-scoped server-managed account.
|
|
59
|
+
*
|
|
60
|
+
* @param network - The network name or RPC URL
|
|
61
|
+
* @example
|
|
62
|
+
* // For known networks, type is inferred automatically:
|
|
63
|
+
* const baseAccount = await account.useNetwork("base");
|
|
64
|
+
*
|
|
65
|
+
* // For custom RPC URLs with type hints (requires casting):
|
|
66
|
+
* const typedAccount = await account.useNetwork<"base">("https://mainnet.base.org" as "base");
|
|
67
|
+
*
|
|
68
|
+
* // For custom RPC URLs without type hints (only sendTransaction and waitForTransactionReceipt methods available):
|
|
69
|
+
* const customAccount = await account.useNetwork("https://mainnet.base.org");
|
|
70
|
+
*/
|
|
71
|
+
useNetwork: <Network extends NetworkOrRpcUrl>(network: Network) => Promise<NetworkScopedEvmServerAccount<Network>>;
|
|
39
72
|
}>;
|
|
40
73
|
type EvmSmartAccountProperties = {
|
|
41
74
|
/** The smart account's address. */
|
|
@@ -46,28 +79,92 @@ type EvmSmartAccountProperties = {
|
|
|
46
79
|
owners: EvmAccount[];
|
|
47
80
|
/** Identifier for the smart account type. */
|
|
48
81
|
type: "evm-smart";
|
|
49
|
-
/**
|
|
50
|
-
|
|
82
|
+
/**
|
|
83
|
+
* A function that returns a network-scoped smart account.
|
|
84
|
+
*
|
|
85
|
+
* @param network - The network name or RPC URL
|
|
86
|
+
* @example
|
|
87
|
+
* // For known networks, type is inferred automatically:
|
|
88
|
+
* const baseAccount = await smartAccount.useNetwork("base");
|
|
89
|
+
*
|
|
90
|
+
* // For custom RPC URLs with type hints (requires casting):
|
|
91
|
+
* const typedAccount = await smartAccount.useNetwork<"base">("https://mainnet.base.org" as "base");
|
|
92
|
+
*
|
|
93
|
+
* // For custom RPC URLs without type hints (only sendTransaction, transfer and waitForTransactionReceipt methods available):
|
|
94
|
+
* const customAccount = await smartAccount.useNetwork("https://mainnet.base.org");
|
|
95
|
+
*/
|
|
96
|
+
useNetwork: <Network extends KnownEvmNetworks>(network: Network) => Promise<NetworkScopedEvmSmartAccount<Network>>;
|
|
51
97
|
};
|
|
52
98
|
/**
|
|
53
99
|
* Ethereum smart account which supports account abstraction features like user operations, batch transactions, and paymaster.
|
|
54
100
|
*/
|
|
55
101
|
export type EvmSmartAccount = Prettify<EvmSmartAccountProperties & SmartAccountActions>;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
type
|
|
102
|
+
type DistributedOmit<T, K extends PropertyKey> = T extends any ? Omit<T, K> : never;
|
|
103
|
+
/**
|
|
104
|
+
* Helper type for network-specific smart account actions
|
|
105
|
+
*/
|
|
106
|
+
type NetworkSpecificSmartAccountActions<Network extends string> = Prettify<{
|
|
107
|
+
sendUserOperation: <const callData extends unknown[]>(options: Omit<SendUserOperationOptions<callData>, "smartAccount" | "network">) => Promise<SendUserOperationReturnType>;
|
|
108
|
+
waitForUserOperation: (options: Omit<WaitForUserOperationOptions, "smartAccountAddress" | "network">) => Promise<WaitForUserOperationReturnType>;
|
|
109
|
+
getUserOperation: (options: Omit<GetUserOperationOptions, "smartAccount" | "network">) => Promise<UserOperation>;
|
|
110
|
+
} & (Network extends TransferNetworks ? {
|
|
111
|
+
transfer: (options: Omit<SmartAccountTransferOptions, "network">) => Promise<SendUserOperationReturnType>;
|
|
112
|
+
} : EmptyObject) & (Network extends ListTokenBalancesNetworks ? {
|
|
113
|
+
listTokenBalances: (options: Omit<ListTokenBalancesOptions, "address" | "network">) => Promise<ListTokenBalancesResult>;
|
|
114
|
+
} : EmptyObject) & (Network extends RequestFaucetNetworks ? {
|
|
61
115
|
requestFaucet: (options: Omit<RequestFaucetOptions, "address" | "network">) => Promise<RequestFaucetResult>;
|
|
116
|
+
} : EmptyObject) & (Network extends QuoteFundNetworks ? {
|
|
117
|
+
quoteFund: (options: Omit<QuoteFundOptions, "address" | "network">) => Promise<Quote>;
|
|
118
|
+
} : EmptyObject) & (Network extends FundNetworks ? {
|
|
119
|
+
fund: (options: Omit<FundOptions, "address" | "network">) => Promise<FundOperationResult>;
|
|
120
|
+
waitForFundOperationReceipt: (options: Omit<WaitForFundOperationOptions, "network">) => Promise<WaitForFundOperationResult>;
|
|
121
|
+
} : EmptyObject) & (Network extends QuoteSwapNetworks ? {
|
|
122
|
+
quoteSwap: (options: Omit<SmartAccountQuoteSwapOptions, "network">) => Promise<SmartAccountQuoteSwapResult>;
|
|
123
|
+
} : EmptyObject) & (Network extends SwapNetworks ? {
|
|
124
|
+
swap: (options: DistributedOmit<SmartAccountSwapOptions, "network">) => Promise<SmartAccountSwapResult>;
|
|
125
|
+
} : EmptyObject)>;
|
|
126
|
+
/**
|
|
127
|
+
* A network-scoped smart account
|
|
128
|
+
*/
|
|
129
|
+
export type NetworkScopedEvmSmartAccount<Network extends string = string> = Prettify<Omit<EvmSmartAccountProperties, "useNetwork"> & NetworkSpecificSmartAccountActions<Network> & {
|
|
130
|
+
/** The network this account is scoped to */
|
|
131
|
+
network: Network;
|
|
132
|
+
}>;
|
|
133
|
+
/**
|
|
134
|
+
* Helper type to surface a TypeError when calling a method that doesn't exist based on the network
|
|
135
|
+
*/
|
|
136
|
+
type EmptyObject = {};
|
|
137
|
+
/**
|
|
138
|
+
* Conditional account actions based on network
|
|
139
|
+
*/
|
|
140
|
+
type NetworkSpecificAccountActions<Network extends string> = Prettify<{
|
|
62
141
|
sendTransaction: (options: Omit<SendTransactionOptions, "address" | "network">) => Promise<TransactionResult>;
|
|
142
|
+
transfer: (options: Omit<TransferOptions, "address" | "network">) => Promise<TransactionResult>;
|
|
63
143
|
waitForTransactionReceipt: (options: WaitForTransactionReceiptParameters | TransactionResult) => Promise<TransactionReceipt>;
|
|
64
|
-
}
|
|
144
|
+
} & (Network extends ListTokenBalancesNetworks ? {
|
|
145
|
+
listTokenBalances: (options: Omit<ListTokenBalancesOptions, "address" | "network">) => Promise<ListTokenBalancesResult>;
|
|
146
|
+
} : EmptyObject) & (Network extends RequestFaucetNetworks ? {
|
|
147
|
+
requestFaucet: (options: Omit<RequestFaucetOptions, "address" | "network">) => Promise<RequestFaucetResult>;
|
|
148
|
+
} : EmptyObject) & (Network extends QuoteFundNetworks ? {
|
|
149
|
+
quoteFund: (options: Omit<QuoteFundOptions, "address">) => Promise<Quote>;
|
|
150
|
+
} : EmptyObject) & (Network extends FundNetworks ? {
|
|
151
|
+
fund: (options: Omit<FundOptions, "address">) => Promise<FundOperationResult>;
|
|
152
|
+
waitForFundOperationReceipt: (options: WaitForFundOperationOptions) => Promise<WaitForFundOperationResult>;
|
|
153
|
+
} : EmptyObject) & (Network extends TransferNetworks ? {
|
|
154
|
+
transfer: (options: TransferOptions) => Promise<{
|
|
155
|
+
transactionHash: Hex;
|
|
156
|
+
}>;
|
|
157
|
+
} : EmptyObject) & (Network extends QuoteSwapNetworks ? {
|
|
158
|
+
quoteSwap: (options: AccountQuoteSwapOptions) => Promise<AccountQuoteSwapResult>;
|
|
159
|
+
} : EmptyObject) & (Network extends SwapNetworks ? {
|
|
160
|
+
swap: (options: AccountSwapOptions) => Promise<AccountSwapResult>;
|
|
161
|
+
} : EmptyObject)>;
|
|
65
162
|
/**
|
|
66
163
|
* A network-scoped server-managed ethereum account
|
|
67
164
|
*/
|
|
68
|
-
export type NetworkScopedEvmServerAccount = Prettify<Omit<EvmServerAccount, keyof AccountActions | "useNetwork"> &
|
|
165
|
+
export type NetworkScopedEvmServerAccount<Network extends string = string> = Prettify<Omit<EvmServerAccount, keyof AccountActions | "useNetwork"> & NetworkSpecificAccountActions<Network> & {
|
|
69
166
|
/** The network this account is scoped to */
|
|
70
|
-
network:
|
|
167
|
+
network: Network;
|
|
71
168
|
}>;
|
|
72
169
|
export {};
|
|
73
170
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../accounts/evm/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAC/F,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../accounts/evm/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACb,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,EAC3B,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAC/F,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AACjG,OAAO,EACL,wBAAwB,EACxB,2BAA2B,EAC5B,M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EhB,CAAC,OAAO,SAAS,gBAAgB,GAC7B;IACE,QAAQ,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,OAAO,CAAC;QAAE,eAAe,EAAE,GAAG,CAAA;KAAE,CAAC,CAAC;CAC3E,GACD,WAAW,CAAC,GAEhB,CAAC,OAAO,SAAS,iBAAiB,GAC9B;IACE,SAAS,EAAE,CAAC,OAAO,EAAE,uBAAuB,KAAK,OAAO,CAAC,sBAAsB,CAAC,CAAC;CAClF,GACD,WAAW,CAAC,GAEhB,CAAC,OAAO,SAAS,YAAY,GACzB;IACE,IAAI,EAAE,CAAC,OAAO,EAAE,kBAAkB,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC;CACnE,GACD,WAAW,CAAC,CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,6BAA6B,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM,IAAI,QAAQ,CACnF,IAAI,CAAC,gBAAgB,EAAE,MAAM,cAAc,GAAG,YAAY,CAAC,GACzD,6BAA6B,CAAC,OAAO,CAAC,GAAG;IACvC,4CAA4C;IAC5C,OAAO,EAAE,OAAO,CAAC;CAClB,CACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendUserOperation.d.ts","sourceRoot":"","sources":["../../../actions/evm/sendUserOperation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sendUserOperation.d.ts","sourceRoot":"","sources":["../../../actions/evm/sendUserOperation.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAExD;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,IAAI;IACnE,yBAAyB;IACzB,YAAY,EAAE,eAAe,CAAC;IAC9B;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAChB,6CAA6C;IAC7C,OAAO,EAAE,uBAAuB,CAAC;IACjC,oGAAoG;IACpG,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,2BAA2B;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC,uCAAuC;IACvC,mBAAmB,EAAE,OAAO,CAAC;IAC7B,wCAAwC;IACxC,MAAM,EAAE,OAAO,sBAAsB,CAAC,SAAS,CAAC;IAChD,gIAAgI;IAChI,UAAU,EAAE,GAAG,CAAC;CACjB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAsB,iBAAiB,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAClE,MAAM,EAAE,oBAAoB,EAC5B,OAAO,EAAE,wBAAwB,CAAC,CAAC,CAAC,GACnC,OAAO,CAAC,2BAA2B,CAAC,CA8DtC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { EvmSmartAccount } from "../../../accounts/evm/types.js";
|
|
2
2
|
import type { CreateSwapQuoteOptions, CreateSwapQuoteResult, SwapUnavailableResult } from "../../../client/evm/evm.types.js";
|
|
3
|
-
import type { SendEvmTransactionBodyNetwork, EvmUserOperationNetwork, EvmUserOperationStatus } from "../../../openapi-client/index.js";
|
|
3
|
+
import type { SendEvmTransactionBodyNetwork, EvmUserOperationNetwork, EvmUserOperationStatus, EvmSwapsNetwork } from "../../../openapi-client/index.js";
|
|
4
4
|
import type { Address, Hex } from "../../../types/misc.js";
|
|
5
|
+
export type SmartAccountSwapNetwork = Extract<EvmSwapsNetwork, EvmUserOperationNetwork>;
|
|
5
6
|
/**
|
|
6
7
|
* Base options for sending a swap transaction.
|
|
7
8
|
*/
|
|
@@ -119,7 +120,10 @@ export type AccountSwapResult = SendSwapTransactionResult;
|
|
|
119
120
|
/**
|
|
120
121
|
* Options for creating a swap quote (smart account-level).
|
|
121
122
|
*/
|
|
122
|
-
export type SmartAccountQuoteSwapOptions = Omit<CreateSwapQuoteOptions, "taker"
|
|
123
|
+
export type SmartAccountQuoteSwapOptions = Omit<CreateSwapQuoteOptions, "taker" | "network"> & {
|
|
124
|
+
/** The network to create a swap quote on. Smart accounts only support networks that support both user operations and swaps. */
|
|
125
|
+
network: SmartAccountSwapNetwork;
|
|
126
|
+
};
|
|
123
127
|
/**
|
|
124
128
|
* Result of creating a swap quote (smart account-level).
|
|
125
129
|
*/
|
|
@@ -146,9 +150,10 @@ interface SmartAccountQuoteBasedSwapOptions {
|
|
|
146
150
|
*/
|
|
147
151
|
interface SmartAccountInlineSwapOptions {
|
|
148
152
|
/**
|
|
149
|
-
* The network to execute the swap on (e.g., "
|
|
153
|
+
* The network to execute the swap on (e.g., "base").
|
|
154
|
+
* Smart accounts only support networks that support both user operations and swaps.
|
|
150
155
|
*/
|
|
151
|
-
network:
|
|
156
|
+
network: SmartAccountSwapNetwork;
|
|
152
157
|
/** The token to receive (destination token). */
|
|
153
158
|
toToken: Address;
|
|
154
159
|
/** The token to send (source token). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../actions/evm/swap/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,KAAK,EACV,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EACV,6BAA6B,EAC7B,uBAAuB,EACvB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../actions/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AE,OAAO,CAAC;IACnB,uDAAuD;IACvD,UAAU,EAAE,MAAM,CAAC;IACnB,8CAA8C;IAC9C,KAAK,EAAE,OAAO,CAAC;IACf,qEAAqE;IACrE,aAAa,EAAE,OAAO,CAAC;IACvB,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAChC,kCAAkC,GAClC,8BAA8B,CAAC;AAEnC;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC,uCAAuC;IACvC,mBAAmB,EAAE,OAAO,CAAC;IAC7B,wCAAwC;IACxC,MAAM,EAAE,OAAO,sBAAsB,CAAC,SAAS,CAAC;IAChD,sCAAsC;IACtC,UAAU,EAAE,GAAG,CAAC;CACjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smartAccountTransferStrategy.d.ts","sourceRoot":"","sources":["../../../../actions/evm/transfer/smartAccountTransferStrategy.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"smartAccountTransferStrategy.d.ts","sourceRoot":"","sources":["../../../../actions/evm/transfer/smartAccountTransferStrategy.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAGtE,eAAO,MAAM,4BAA4B,EAAE,yBAAyB,CAAC,eAAe,CAgDnF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transfer.d.ts","sourceRoot":"","sources":["../../../../actions/evm/transfer/transfer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transfer.d.ts","sourceRoot":"","sources":["../../../../actions/evm/transfer/transfer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,yBAAyB,EACzB,2BAA2B,EAC3B,eAAe,EAChB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAE3E;;;;;;;;GAQG;AACH,wBAAsB,QAAQ,CAAC,CAAC,SAAS,UAAU,GAAG,eAAe,EACnE,SAAS,EAAE,oBAAoB,EAC/B,IAAI,EAAE,CAAC,EACP,YAAY,EAAE,CAAC,SAAS,eAAe,GAAG,2BAA2B,GAAG,eAAe,EACvF,gBAAgB,EAAE,yBAAyB,CAAC,CAAC,CAAC,GAC7C,OAAO,CAAC,CAAC,SAAS,eAAe,GAAG,2BAA2B,GAAG,iBAAiB,CAAC,CAqBtF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TransferOptions } from "./types.js";
|
|
2
|
+
import type { EvmAccount } from "../../../accounts/evm/types.js";
|
|
3
|
+
import type { TransactionResult } from "../sendTransaction.js";
|
|
4
|
+
import type { Account, Chain, Transport, WalletClient } from "viem";
|
|
5
|
+
/**
|
|
6
|
+
* Transfer an amount of a token from a network-scoped account to another account.
|
|
7
|
+
* This function is used for accounts that are scoped to a specific network and use
|
|
8
|
+
* a wallet client for transaction execution instead of the API client.
|
|
9
|
+
*
|
|
10
|
+
* @param walletClient - The wallet client to use for transaction execution.
|
|
11
|
+
* @param from - The account to send the transaction from.
|
|
12
|
+
* @param transferArgs - The transfer options.
|
|
13
|
+
* @returns The result of the transfer.
|
|
14
|
+
*/
|
|
15
|
+
export declare function transferWithViem<T extends EvmAccount>(walletClient: WalletClient<Transport, Chain, Account>, from: T, transferArgs: Omit<TransferOptions, "address" | "network">): Promise<TransactionResult>;
|
|
16
|
+
//# sourceMappingURL=transferWithViem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transferWithViem.d.ts","sourceRoot":"","sources":["../../../../actions/evm/transfer/transferWithViem.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAW,eAAe,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAEjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAEpE;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CAAC,CAAC,SAAS,UAAU,EACzD,YAAY,EAAE,YAAY,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,EACrD,IAAI,EAAE,CAAC,EACP,YAAY,EAAE,IAAI,CAAC,eAAe,EAAE,SAAS,GAAG,SAAS,CAAC,GACzD,OAAO,CAAC,iBAAiB,CAAC,CAwC5B"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { EvmUserOperationNetwork } from "../../../openapi-client/index.js";
|
|
1
2
|
import type { EvmAccount, EvmSmartAccount } from "../../../accounts/evm/types.js";
|
|
2
|
-
import type { CdpOpenApiClientType,
|
|
3
|
+
import type { CdpOpenApiClientType, SendEvmTransactionBodyNetwork } from "../../../openapi-client/index.js";
|
|
3
4
|
import type { TransactionResult } from "../sendTransaction.js";
|
|
4
5
|
import type { SendUserOperationReturnType } from "../sendUserOperation.js";
|
|
5
6
|
import type { Hex, Address } from "viem";
|
|
@@ -56,4 +57,19 @@ export interface TransferExecutionStrategy<T extends EvmAccount | EvmSmartAccoun
|
|
|
56
57
|
paymasterUrl?: string;
|
|
57
58
|
} : object)): Promise<T extends EvmSmartAccount ? SendUserOperationReturnType : TransactionResult>;
|
|
58
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Validates that the network is supported for the given account type.
|
|
62
|
+
*
|
|
63
|
+
* @param network - The network to validate
|
|
64
|
+
* @param account - The account to check network support for
|
|
65
|
+
* @returns true if the network is valid for the account type
|
|
66
|
+
*/
|
|
67
|
+
export declare function isValidNetworkForAccount(network: Network, account: EvmAccount | EvmSmartAccount): boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Type guard to check if an account is a smart account.
|
|
70
|
+
*
|
|
71
|
+
* @param account - The account to check.
|
|
72
|
+
* @returns true if the account is a smart account, false otherwise.
|
|
73
|
+
*/
|
|
74
|
+
export declare function isSmartAccount(account: EvmAccount | EvmSmartAccount): account is EvmSmartAccount;
|
|
59
75
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../actions/evm/transfer/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,KAAK,EACV,oBAAoB,EACpB,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../actions/evm/transfer/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,KAAK,EACV,oBAAoB,EACpB,6BAA6B,EAE9B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAEzC;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
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":"AAIA,OAAO,EACL,0BAA0B,EAC1B,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,EACrB,kBAAkB,EAClB,0BAA0B,EAC1B,+BAA+B,EAC/B,8BAA8B,EAC9B,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,EAClB,uBAAuB,EACvB,0BAA0B,EAC1B,uBAAuB,EACvB,yBAAyB,EACzB,sBAAsB,EACtB,wBAAwB,EACxB,2BAA2B,EAC3B,aAAa,EACb,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACpB,YAAY,EACZ,qBAAqB,EACrB,uBAAuB,EACvB,aAAa,EACb,2BAA2B,EAC5B,MAAM,gBAAgB,CAAC;AAIxB,OAAO,EAEL,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAEL,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAEL,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,wCAAwC,CAAC;AAGhD,OAAO,EAEL,8BAA8B,EAC/B,MAAM,2CAA2C,CAAC;AAWnD,OAAO,KAAK,EACV,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,sCAAsC,CAAC;AAE9C;;GAEG;AACH,qBAAa,SAAU,YAAW,kBAAkB;IAClD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACG,aAAa,CAAC,OAAO,GAAE,0BAA+B,GAAG,OAAO,CAAC,aAAa,CAAC;IAkBrF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAyCG;IACG,aAAa,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAA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AC;IAgB7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACG,oBAAoB,CACxB,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,8BAA8B,CAAC;CAK3C"}
|
|
@@ -327,7 +327,7 @@ export interface ListServerAccountsOptions {
|
|
|
327
327
|
/**
|
|
328
328
|
* A smart account that only contains the owner address.
|
|
329
329
|
*/
|
|
330
|
-
export interface ReadonlySmartAccount extends Omit<SmartAccount, "owners" | keyof SmartAccountActions | "
|
|
330
|
+
export interface ReadonlySmartAccount extends Omit<SmartAccount, "owners" | keyof SmartAccountActions | "useNetwork"> {
|
|
331
331
|
/** The owners of the smart account. */
|
|
332
332
|
owners: Address[];
|
|
333
333
|
}
|