@coinbase/cdp-sdk 1.11.0 → 1.13.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 +14 -0
- package/README.md +126 -0
- package/_cjs/accounts/evm/toEvmServerAccount.js +15 -0
- package/_cjs/accounts/evm/toEvmServerAccount.js.map +1 -1
- package/_cjs/actions/evm/swap/createSwapQuote.js +126 -0
- package/_cjs/actions/evm/swap/createSwapQuote.js.map +1 -0
- package/_cjs/actions/evm/swap/getSwapPrice.js +86 -0
- package/_cjs/actions/evm/swap/getSwapPrice.js.map +1 -0
- package/_cjs/actions/evm/swap/sendSwapTransaction.js +141 -0
- package/_cjs/actions/evm/swap/sendSwapTransaction.js.map +1 -0
- package/_cjs/actions/evm/swap/types.js +3 -0
- package/_cjs/actions/evm/swap/types.js.map +1 -0
- package/_cjs/client/evm/evm.js +46 -1
- package/_cjs/client/evm/evm.js.map +1 -1
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +28 -1
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_cjs/openapi-client/generated/evm-swaps/evm-swaps.js +26 -0
- package/_cjs/openapi-client/generated/evm-swaps/evm-swaps.js.map +1 -0
- package/_cjs/openapi-client/generated/evm-swaps/evm-swaps.msw.js +179 -0
- package/_cjs/openapi-client/generated/evm-swaps/evm-swaps.msw.js.map +1 -0
- package/_cjs/openapi-client/generated/index.msw.js +5 -4
- package/_cjs/openapi-client/generated/index.msw.js.map +1 -1
- package/_cjs/openapi-client/generated/policy-engine/policy-engine.msw.js +59 -1
- package/_cjs/openapi-client/generated/policy-engine/policy-engine.msw.js.map +1 -1
- package/_cjs/openapi-client/index.js +4 -0
- package/_cjs/openapi-client/index.js.map +1 -1
- package/_cjs/policies/schema.js +59 -1
- package/_cjs/policies/schema.js.map +1 -1
- package/_cjs/version.js +1 -1
- package/_esm/accounts/evm/toEvmServerAccount.js +15 -0
- package/_esm/accounts/evm/toEvmServerAccount.js.map +1 -1
- package/_esm/actions/evm/swap/createSwapQuote.js +123 -0
- package/_esm/actions/evm/swap/createSwapQuote.js.map +1 -0
- package/_esm/actions/evm/swap/getSwapPrice.js +83 -0
- package/_esm/actions/evm/swap/getSwapPrice.js.map +1 -0
- package/_esm/actions/evm/swap/sendSwapTransaction.js +138 -0
- package/_esm/actions/evm/swap/sendSwapTransaction.js.map +1 -0
- package/_esm/actions/evm/swap/types.js +2 -0
- package/_esm/actions/evm/swap/types.js.map +1 -0
- package/_esm/client/evm/evm.js +46 -1
- package/_esm/client/evm/evm.js.map +1 -1
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +27 -0
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_esm/openapi-client/generated/evm-swaps/evm-swaps.js +21 -0
- package/_esm/openapi-client/generated/evm-swaps/evm-swaps.js.map +1 -0
- package/_esm/openapi-client/generated/evm-swaps/evm-swaps.msw.js +167 -0
- package/_esm/openapi-client/generated/evm-swaps/evm-swaps.msw.js.map +1 -0
- package/_esm/openapi-client/generated/index.msw.js +5 -4
- package/_esm/openapi-client/generated/index.msw.js.map +1 -1
- package/_esm/openapi-client/generated/policy-engine/policy-engine.msw.js +54 -0
- package/_esm/openapi-client/generated/policy-engine/policy-engine.msw.js.map +1 -1
- package/_esm/openapi-client/index.js +4 -0
- package/_esm/openapi-client/index.js.map +1 -1
- package/_esm/policies/schema.js +58 -0
- package/_esm/policies/schema.js.map +1 -1
- package/_esm/version.js +1 -1
- package/_types/accounts/evm/toEvmServerAccount.d.ts.map +1 -1
- package/_types/actions/evm/swap/createSwapQuote.d.ts +23 -0
- package/_types/actions/evm/swap/createSwapQuote.d.ts.map +1 -0
- package/_types/actions/evm/swap/getSwapPrice.d.ts +23 -0
- package/_types/actions/evm/swap/getSwapPrice.d.ts.map +1 -0
- package/_types/actions/evm/swap/sendSwapTransaction.d.ts +64 -0
- package/_types/actions/evm/swap/sendSwapTransaction.d.ts.map +1 -0
- package/_types/actions/evm/swap/types.d.ts +119 -0
- package/_types/actions/evm/swap/types.d.ts.map +1 -0
- package/_types/actions/evm/types.d.ts +86 -0
- package/_types/actions/evm/types.d.ts.map +1 -1
- package/_types/client/evm/evm.d.ts +39 -1
- package/_types/client/evm/evm.d.ts.map +1 -1
- package/_types/client/evm/evm.types.d.ts +207 -3
- package/_types/client/evm/evm.types.d.ts.map +1 -1
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +364 -4
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
- package/_types/openapi-client/generated/evm-swaps/evm-swaps.d.ts +24 -0
- package/_types/openapi-client/generated/evm-swaps/evm-swaps.d.ts.map +1 -0
- package/_types/openapi-client/generated/evm-swaps/evm-swaps.msw.d.ts +12 -0
- package/_types/openapi-client/generated/evm-swaps/evm-swaps.msw.d.ts.map +1 -0
- package/_types/openapi-client/generated/index.msw.d.ts +5 -4
- package/_types/openapi-client/generated/index.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 +5 -0
- package/_types/openapi-client/index.d.ts.map +1 -1
- package/_types/policies/schema.d.ts +338 -0
- package/_types/policies/schema.d.ts.map +1 -1
- package/_types/version.d.ts +1 -1
- package/accounts/evm/toEvmServerAccount.ts +21 -0
- package/actions/evm/swap/createSwapQuote.ts +148 -0
- package/actions/evm/swap/getSwapPrice.ts +95 -0
- package/actions/evm/swap/sendSwapTransaction.ts +173 -0
- package/actions/evm/swap/types.ts +137 -0
- package/actions/evm/types.ts +88 -0
- package/client/evm/evm.ts +58 -1
- package/client/evm/evm.types.ts +225 -1
- package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +422 -4
- package/openapi-client/generated/evm-swaps/evm-swaps.msw.ts +217 -0
- package/openapi-client/generated/evm-swaps/evm-swaps.ts +51 -0
- package/openapi-client/generated/index.msw.ts +5 -4
- package/openapi-client/generated/policy-engine/policy-engine.msw.ts +87 -0
- package/openapi-client/index.ts +4 -0
- package/package.json +1 -1
- package/policies/schema.ts +70 -0
- package/version.ts +1 -1
|
@@ -9,6 +9,7 @@ import { Hex } from "../../types/misc.js";
|
|
|
9
9
|
import type { ListTokenBalancesOptions, ListTokenBalancesResult } from "./listTokenBalances.js";
|
|
10
10
|
import type { RequestFaucetOptions, RequestFaucetResult } from "./requestFaucet.js";
|
|
11
11
|
import type { SendTransactionOptions, TransactionResult } from "./sendTransaction.js";
|
|
12
|
+
import type { SwapOptions, SwapResult, QuoteSwapOptions, QuoteSwapResult } from "./swap/types.js";
|
|
12
13
|
import type { TransferOptions } from "./transfer/types.js";
|
|
13
14
|
import type { WaitForUserOperationOptions, WaitForUserOperationReturnType } from "./waitForUserOperation.js";
|
|
14
15
|
type Actions = {
|
|
@@ -233,6 +234,91 @@ export type AccountActions = Actions & {
|
|
|
233
234
|
* ```
|
|
234
235
|
*/
|
|
235
236
|
sendTransaction: (options: Omit<SendTransactionOptions, "address">) => Promise<TransactionResult>;
|
|
237
|
+
/**
|
|
238
|
+
* Creates a swap quote without executing the transaction.
|
|
239
|
+
* This is useful when you need to get swap details before executing the swap.
|
|
240
|
+
* The taker is automatically set to the account's address.
|
|
241
|
+
*
|
|
242
|
+
* @param {QuoteSwapOptions} options - Configuration options for creating the swap quote.
|
|
243
|
+
* @param {string} options.network - The network to create the quote on
|
|
244
|
+
* @param {string} options.fromToken - The token address to sell
|
|
245
|
+
* @param {string} options.toToken - The token address to buy
|
|
246
|
+
* @param {bigint} options.fromAmount - The amount of fromToken to sell
|
|
247
|
+
* @param {string} [options.signerAddress] - The signer address (only needed if taker is a smart contract)
|
|
248
|
+
* @param {bigint} [options.gasPrice] - The gas price in Wei
|
|
249
|
+
* @param {number} [options.slippageBps] - The slippage tolerance in basis points (0-10000)
|
|
250
|
+
*
|
|
251
|
+
* @returns A promise that resolves to the swap quote or a response indicating that liquidity is unavailable.
|
|
252
|
+
*
|
|
253
|
+
* @example
|
|
254
|
+
* ```ts
|
|
255
|
+
* const swapQuote = await account.quoteSwap({
|
|
256
|
+
* network: "base",
|
|
257
|
+
* fromToken: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", // WETH
|
|
258
|
+
* toToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
|
|
259
|
+
* fromAmount: BigInt("1000000000000000000"), // 1 WETH in wei
|
|
260
|
+
* });
|
|
261
|
+
*
|
|
262
|
+
* if (swapQuote.liquidityAvailable) {
|
|
263
|
+
* console.log(`Can swap for ${swapQuote.toAmount} USDC`);
|
|
264
|
+
* }
|
|
265
|
+
* ```
|
|
266
|
+
*/
|
|
267
|
+
quoteSwap: (options: QuoteSwapOptions) => Promise<QuoteSwapResult>;
|
|
268
|
+
/**
|
|
269
|
+
* Executes a token swap on the specified network.
|
|
270
|
+
* This method handles all the steps required for a swap, including Permit2 signatures if needed.
|
|
271
|
+
*
|
|
272
|
+
* @param {SwapOptions} options - Configuration options for the swap.
|
|
273
|
+
* @param {string} [options.network] - The network to execute the swap on
|
|
274
|
+
* @param {CreateSwapQuoteResult} [options.swapQuote] - The swap quote returned by the createSwapQuote method.
|
|
275
|
+
* @param {CreateSwapQuoteOptions} [options.swapOptions] - Options to create a swap quote. The function will call createSwapQuote internally.
|
|
276
|
+
* @param {string} [options.idempotencyKey] - Optional idempotency key for the request.
|
|
277
|
+
*
|
|
278
|
+
* @returns A promise that resolves to the transaction hash.
|
|
279
|
+
*
|
|
280
|
+
* @throws {Error} If liquidity is not available when using swapOptions.
|
|
281
|
+
*
|
|
282
|
+
* @example **Using a pre-created swap quote**
|
|
283
|
+
* ```ts
|
|
284
|
+
* // First create a swap quote
|
|
285
|
+
* const swapQuote = await cdp.evm.createSwapQuote({
|
|
286
|
+
* network: "base",
|
|
287
|
+
* buyToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
|
|
288
|
+
* sellToken: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", // WETH
|
|
289
|
+
* sellAmount: BigInt("1000000000000000000"), // 1 WETH in wei
|
|
290
|
+
* taker: account.address
|
|
291
|
+
* });
|
|
292
|
+
*
|
|
293
|
+
* // Check if liquidity is available
|
|
294
|
+
* if (!swapQuote.liquidityAvailable) {
|
|
295
|
+
* console.error("Insufficient liquidity for swap");
|
|
296
|
+
* return;
|
|
297
|
+
* }
|
|
298
|
+
*
|
|
299
|
+
* // Execute the swap
|
|
300
|
+
* const { transactionHash } = await account.swap({
|
|
301
|
+
* swapQuote: swapQuote
|
|
302
|
+
* });
|
|
303
|
+
*
|
|
304
|
+
* console.log(`Swap executed with transaction hash: ${transactionHash}`);
|
|
305
|
+
* ```
|
|
306
|
+
*
|
|
307
|
+
* @example **Using swap options (all-in-one)**
|
|
308
|
+
* ```ts
|
|
309
|
+
* // Create and execute swap in one call
|
|
310
|
+
* const { transactionHash } = await account.swap({
|
|
311
|
+
* network: "base",
|
|
312
|
+
* buyToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
|
|
313
|
+
* sellToken: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", // WETH
|
|
314
|
+
* sellAmount: BigInt("1000000000000000000"), // 1 WETH in wei
|
|
315
|
+
* taker: account.address
|
|
316
|
+
* });
|
|
317
|
+
*
|
|
318
|
+
* console.log(`Swap executed with transaction hash: ${transactionHash}`);
|
|
319
|
+
* ```
|
|
320
|
+
*/
|
|
321
|
+
swap: (options: SwapOptions) => Promise<SwapResult>;
|
|
236
322
|
};
|
|
237
323
|
export type SmartAccountActions = Actions & {
|
|
238
324
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../actions/evm/types.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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"}
|
|
@@ -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, ImportServerAccountOptions } 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, GetSwapPriceOptions, CreateSwapQuoteOptions, GetSwapPriceResult, CreateSwapQuoteResult, SwapUnavailableResult } 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";
|
|
@@ -194,6 +194,44 @@ export declare class EvmClient implements EvmClientInterface {
|
|
|
194
194
|
* ```
|
|
195
195
|
*/
|
|
196
196
|
getOrCreateAccount(options: GetOrCreateServerAccountOptions): Promise<ServerAccount>;
|
|
197
|
+
/**
|
|
198
|
+
* Gets the price for a swap between two tokens on an EVM network.
|
|
199
|
+
*
|
|
200
|
+
* @param {GetSwapPriceOptions} options - The options for getting a swap price.
|
|
201
|
+
*
|
|
202
|
+
* @returns {Promise<GetSwapPriceResult | SwapUnavailableResult>} A promise that resolves to the swap price result or a response indicating that liquidity is unavailable.
|
|
203
|
+
*
|
|
204
|
+
* @example
|
|
205
|
+
* ```typescript
|
|
206
|
+
* const price = await cdp.evm.getSwapPrice({
|
|
207
|
+
* network: "ethereum-mainnet",
|
|
208
|
+
* toToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
|
|
209
|
+
* fromToken: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", // WETH
|
|
210
|
+
* fromAmount: BigInt("1000000000000000000"), // 1 WETH
|
|
211
|
+
* taker: "0x1234567890123456789012345678901234567890"
|
|
212
|
+
* });
|
|
213
|
+
* ```
|
|
214
|
+
*/
|
|
215
|
+
getSwapPrice(options: GetSwapPriceOptions): Promise<GetSwapPriceResult | SwapUnavailableResult>;
|
|
216
|
+
/**
|
|
217
|
+
* Creates a quote for a swap between two tokens on an EVM network.
|
|
218
|
+
*
|
|
219
|
+
* @param {CreateSwapQuoteOptions} options - The options for creating a swap quote.
|
|
220
|
+
*
|
|
221
|
+
* @returns {Promise<CreateSwapQuoteResult | SwapUnavailableResult>} A promise that resolves to the swap quote result or a response indicating that liquidity is unavailable.
|
|
222
|
+
*
|
|
223
|
+
* @example
|
|
224
|
+
* ```typescript
|
|
225
|
+
* const swapQuote = await cdp.evm.createSwapQuote({
|
|
226
|
+
* network: "ethereum",
|
|
227
|
+
* toToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
|
|
228
|
+
* fromToken: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", // WETH
|
|
229
|
+
* fromAmount: BigInt("1000000000000000000"), // 1 WETH
|
|
230
|
+
* taker: "0x1234567890123456789012345678901234567890"
|
|
231
|
+
* });
|
|
232
|
+
* ```
|
|
233
|
+
*/
|
|
234
|
+
createSwapQuote(options: CreateSwapQuoteOptions): Promise<CreateSwapQuoteResult | SwapUnavailableResult>;
|
|
197
235
|
/**
|
|
198
236
|
* Gets a user operation for a smart account by user operation hash.
|
|
199
237
|
*
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,EAC1B,mBAAmB,EACnB,sBAAsB,EACtB,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACtB,MAAM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,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"}
|
|
@@ -4,19 +4,21 @@ import type { RequestFaucetOptions, RequestFaucetResult } from "../../actions/ev
|
|
|
4
4
|
import type { TransactionResult, SendTransactionOptions } from "../../actions/evm/sendTransaction.js";
|
|
5
5
|
import type { SendUserOperationOptions, SendUserOperationReturnType } from "../../actions/evm/sendUserOperation.js";
|
|
6
6
|
import type { SmartAccountActions } from "../../actions/evm/types.js";
|
|
7
|
-
import type { EvmUserOperationNetwork, EvmUserOperationStatus, OpenApiEvmMethods, UpdateEvmAccountBody } from "../../openapi-client/index.js";
|
|
7
|
+
import type { EvmSwapsNetwork, EvmUserOperationNetwork, EvmUserOperationStatus, OpenApiEvmMethods, UpdateEvmAccountBody } from "../../openapi-client/index.js";
|
|
8
8
|
import type { Calls } from "../../types/calls.js";
|
|
9
9
|
import type { Address, EIP712Message, Hex } from "../../types/misc.js";
|
|
10
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" | "importEvmAccount" | "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" | "getEvmSwapPrice" | "createEvmSwapQuote" | "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
17
|
importAccount: (options: ImportServerAccountOptions) => Promise<ServerAccount>;
|
|
18
18
|
getAccount: (options: GetServerAccountOptions) => Promise<ServerAccount>;
|
|
19
19
|
getSmartAccount: (options: GetSmartAccountOptions) => Promise<SmartAccount>;
|
|
20
|
+
getSwapPrice: (options: GetSwapPriceOptions) => Promise<GetSwapPriceResult | SwapUnavailableResult>;
|
|
21
|
+
createSwapQuote: (options: CreateSwapQuoteOptions) => Promise<CreateSwapQuoteResult | SwapUnavailableResult>;
|
|
20
22
|
getOrCreateAccount: (options: GetOrCreateServerAccountOptions) => Promise<ServerAccount>;
|
|
21
23
|
getUserOperation: (options: GetUserOperationOptions) => Promise<UserOperation>;
|
|
22
24
|
updateAccount: (options: UpdateEvmAccountOptions) => Promise<ServerAccount>;
|
|
@@ -33,6 +35,146 @@ export type EvmClientInterface = Omit<typeof OpenApiEvmMethods, "createEvmAccoun
|
|
|
33
35
|
signTransaction: (options: SignTransactionOptions) => Promise<SignatureResult>;
|
|
34
36
|
};
|
|
35
37
|
export type { ServerAccount, SmartAccount };
|
|
38
|
+
/**
|
|
39
|
+
* Options for creating a swap quote between two tokens on an EVM network.
|
|
40
|
+
*/
|
|
41
|
+
export interface CreateSwapQuoteOptions {
|
|
42
|
+
/** The network to create a swap quote on. */
|
|
43
|
+
network: EvmSwapsNetwork;
|
|
44
|
+
/** The token to receive (destination token). */
|
|
45
|
+
toToken: Address;
|
|
46
|
+
/** The token to send (source token). */
|
|
47
|
+
fromToken: Address;
|
|
48
|
+
/** The amount to send in atomic units of the token. */
|
|
49
|
+
fromAmount: bigint;
|
|
50
|
+
/** The address that will perform the swap. */
|
|
51
|
+
taker?: Address;
|
|
52
|
+
/** The signer address (only needed if taker is a smart contract). */
|
|
53
|
+
signerAddress?: Address;
|
|
54
|
+
/** The gas price in Wei. */
|
|
55
|
+
gasPrice?: bigint;
|
|
56
|
+
/** The slippage tolerance in basis points (0-10000). */
|
|
57
|
+
slippageBps?: number;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Options for getting a swap price.
|
|
61
|
+
*/
|
|
62
|
+
export interface GetSwapPriceOptions {
|
|
63
|
+
/** The network to get a price from. */
|
|
64
|
+
network: EvmSwapsNetwork;
|
|
65
|
+
/** The token to receive (destination token). */
|
|
66
|
+
toToken: Address;
|
|
67
|
+
/** The token to send (source token). */
|
|
68
|
+
fromToken: Address;
|
|
69
|
+
/** The amount to send in atomic units of the token. */
|
|
70
|
+
fromAmount: bigint;
|
|
71
|
+
/** The address that will perform the swap. */
|
|
72
|
+
taker: Address;
|
|
73
|
+
/** The signer address (only needed if taker is a smart contract). */
|
|
74
|
+
signerAddress?: Address;
|
|
75
|
+
/** The gas price in Wei. */
|
|
76
|
+
gasPrice?: bigint;
|
|
77
|
+
/** The slippage tolerance in basis points (0-10000). */
|
|
78
|
+
slippageBps?: number;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Result of getting a swap price.
|
|
82
|
+
*/
|
|
83
|
+
export interface GetSwapPriceResult {
|
|
84
|
+
/** Whether liquidity is available for the swap. */
|
|
85
|
+
liquidityAvailable: true;
|
|
86
|
+
/** The token to receive (destination token). */
|
|
87
|
+
toToken: Address;
|
|
88
|
+
/** The token to send (source token). */
|
|
89
|
+
fromToken: Address;
|
|
90
|
+
/** The amount to send in atomic units of the token. */
|
|
91
|
+
fromAmount: bigint;
|
|
92
|
+
/** The amount to receive in atomic units of the token. */
|
|
93
|
+
toAmount: bigint;
|
|
94
|
+
/** The minimum amount to receive after slippage in atomic units of the token. */
|
|
95
|
+
minToAmount: bigint;
|
|
96
|
+
/** The block number at which the liquidity conditions were examined. */
|
|
97
|
+
blockNumber: bigint;
|
|
98
|
+
/** The estimated fees for the swap. */
|
|
99
|
+
fees: SwapFees;
|
|
100
|
+
/** Potential issues discovered during validation. */
|
|
101
|
+
issues: SwapIssues;
|
|
102
|
+
/** The gas estimate for the swap. */
|
|
103
|
+
gas?: bigint;
|
|
104
|
+
/** The gas price in Wei. */
|
|
105
|
+
gasPrice?: bigint;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Result when liquidity is unavailable for a swap.
|
|
109
|
+
*/
|
|
110
|
+
export interface SwapUnavailableResult {
|
|
111
|
+
/** Whether liquidity is available for the swap. */
|
|
112
|
+
liquidityAvailable: false;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Options for executing a swap quote.
|
|
116
|
+
*/
|
|
117
|
+
export interface ExecuteSwapQuoteOptions {
|
|
118
|
+
/** Optional idempotency key for the request. */
|
|
119
|
+
idempotencyKey?: string;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Result of executing a swap quote.
|
|
123
|
+
*/
|
|
124
|
+
export interface ExecuteSwapQuoteResult {
|
|
125
|
+
/** The transaction hash of the executed swap. */
|
|
126
|
+
transactionHash: Hex;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Result of creating a swap quote.
|
|
130
|
+
*/
|
|
131
|
+
export interface CreateSwapQuoteResult {
|
|
132
|
+
/** Whether liquidity is available for the swap. */
|
|
133
|
+
liquidityAvailable: true;
|
|
134
|
+
/** The network for which this swap quote was created. */
|
|
135
|
+
network: EvmSwapsNetwork;
|
|
136
|
+
/** The token to receive (destination token). */
|
|
137
|
+
toToken: Address;
|
|
138
|
+
/** The token to send (source token). */
|
|
139
|
+
fromToken: Address;
|
|
140
|
+
/** The amount to send in atomic units of the token. */
|
|
141
|
+
fromAmount: bigint;
|
|
142
|
+
/** The amount to receive in atomic units of the token. */
|
|
143
|
+
toAmount: bigint;
|
|
144
|
+
/** The minimum amount to receive after slippage in atomic units of the token. */
|
|
145
|
+
minToAmount: bigint;
|
|
146
|
+
/** The block number at which the liquidity conditions were examined. */
|
|
147
|
+
blockNumber: bigint;
|
|
148
|
+
/** The estimated fees for the swap. */
|
|
149
|
+
fees: SwapFees;
|
|
150
|
+
/** Potential issues discovered during validation. */
|
|
151
|
+
issues: SwapIssues;
|
|
152
|
+
/** The transaction to execute the swap. */
|
|
153
|
+
transaction?: {
|
|
154
|
+
/** The contract address to send the transaction to. */
|
|
155
|
+
to: Address;
|
|
156
|
+
/** The transaction data. */
|
|
157
|
+
data: Hex;
|
|
158
|
+
/** The value to send with the transaction in Wei. */
|
|
159
|
+
value: bigint;
|
|
160
|
+
/** The gas limit for the transaction. */
|
|
161
|
+
gas: bigint;
|
|
162
|
+
/** The gas price for the transaction in Wei. */
|
|
163
|
+
gasPrice: bigint;
|
|
164
|
+
};
|
|
165
|
+
/** Permit2 data if required for the swap. */
|
|
166
|
+
permit2?: {
|
|
167
|
+
/** EIP-712 typed data for signing. */
|
|
168
|
+
eip712: EIP712Message;
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* Execute the swap using the quote.
|
|
172
|
+
*
|
|
173
|
+
* @param {ExecuteSwapQuoteOptions} options - Options for executing the swap.
|
|
174
|
+
* @returns {Promise<ExecuteSwapQuoteResult>} A promise that resolves to the swap execution result.
|
|
175
|
+
*/
|
|
176
|
+
execute: (options?: ExecuteSwapQuoteOptions) => Promise<ExecuteSwapQuoteResult>;
|
|
177
|
+
}
|
|
36
178
|
/**
|
|
37
179
|
* Options for getting a user operation.
|
|
38
180
|
*/
|
|
@@ -104,6 +246,8 @@ export interface CreateServerAccountOptions {
|
|
|
104
246
|
* Options for importing an EVM server account.
|
|
105
247
|
*/
|
|
106
248
|
export interface ImportServerAccountOptions {
|
|
249
|
+
/** The public RSA key used to encrypt the private key when importing an EVM account. */
|
|
250
|
+
encryptionPublicKey?: string;
|
|
107
251
|
/** The name of the account. */
|
|
108
252
|
name?: string;
|
|
109
253
|
/** The idempotency key. */
|
|
@@ -230,7 +374,7 @@ export interface SignMessageOptions {
|
|
|
230
374
|
idempotencyKey?: string;
|
|
231
375
|
}
|
|
232
376
|
/**
|
|
233
|
-
* Options for signing an EVM message.
|
|
377
|
+
* Options for signing an EVM typed data message.
|
|
234
378
|
*/
|
|
235
379
|
export interface SignTypedDataOptions {
|
|
236
380
|
/** The address of the account. */
|
|
@@ -264,6 +408,55 @@ export interface SignatureResult {
|
|
|
264
408
|
/** The signature. */
|
|
265
409
|
signature: Hex;
|
|
266
410
|
}
|
|
411
|
+
/**
|
|
412
|
+
* A fee in a specific token.
|
|
413
|
+
*/
|
|
414
|
+
export interface TokenFee {
|
|
415
|
+
/** The amount of the fee in atomic units of the token. */
|
|
416
|
+
amount: bigint;
|
|
417
|
+
/** The contract address of the token that the fee is paid in. */
|
|
418
|
+
token: Address;
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* The estimated fees for a swap.
|
|
422
|
+
*/
|
|
423
|
+
export interface SwapFees {
|
|
424
|
+
/** The estimated gas fee for the swap. */
|
|
425
|
+
gasFee?: TokenFee;
|
|
426
|
+
/** The estimated protocol fee for the swap. */
|
|
427
|
+
protocolFee?: TokenFee;
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* Details of allowance issues for a swap.
|
|
431
|
+
*/
|
|
432
|
+
export interface SwapAllowanceIssue {
|
|
433
|
+
/** The current allowance of the fromToken by the taker. */
|
|
434
|
+
currentAllowance: bigint;
|
|
435
|
+
/** The address to set the allowance on. */
|
|
436
|
+
spender: Address;
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* Details of balance issues for a swap.
|
|
440
|
+
*/
|
|
441
|
+
export interface SwapBalanceIssue {
|
|
442
|
+
/** The contract address of the token. */
|
|
443
|
+
token: Address;
|
|
444
|
+
/** The current balance of the fromToken by the taker. */
|
|
445
|
+
currentBalance: bigint;
|
|
446
|
+
/** The amount of the token that the taker must hold. */
|
|
447
|
+
requiredBalance: bigint;
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* Potential issues discovered during swap validation.
|
|
451
|
+
*/
|
|
452
|
+
export interface SwapIssues {
|
|
453
|
+
/** Details of the allowances that the taker must set. Null if no allowance is required. */
|
|
454
|
+
allowance?: SwapAllowanceIssue;
|
|
455
|
+
/** Details of the balance of the fromToken that the taker must hold. Null if sufficient balance. */
|
|
456
|
+
balance?: SwapBalanceIssue;
|
|
457
|
+
/** True when the transaction cannot be validated (e.g., insufficient balance). */
|
|
458
|
+
simulationIncomplete: boolean;
|
|
459
|
+
}
|
|
267
460
|
/**
|
|
268
461
|
* Options for waiting for a user operation.
|
|
269
462
|
*/
|
|
@@ -275,4 +468,15 @@ export interface WaitForUserOperationOptions {
|
|
|
275
468
|
/** The wait options. */
|
|
276
469
|
waitOptions?: WaitOptions;
|
|
277
470
|
}
|
|
471
|
+
/**
|
|
472
|
+
* Legacy type aliases for backwards compatibility.
|
|
473
|
+
*
|
|
474
|
+
* @deprecated Use the new type names instead.
|
|
475
|
+
*/
|
|
476
|
+
export type CreateSwapOptions = CreateSwapQuoteOptions;
|
|
477
|
+
export type CreateSwapResult = CreateSwapQuoteResult;
|
|
478
|
+
export type GetSwapQuoteOptions = GetSwapPriceOptions;
|
|
479
|
+
export type GetSwapQuoteResult = GetSwapPriceResult;
|
|
480
|
+
export type SwapQuoteUnavailableResult = SwapUnavailableResult;
|
|
481
|
+
export type SwapPriceUnavailableResult = SwapUnavailableResult;
|
|
278
482
|
//# 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,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,kBAAk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