@circle-fin/app-kit 1.16.0 → 1.17.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 +38 -0
- package/borrow.cjs +148 -30
- package/borrow.d.cts +35 -6
- package/borrow.d.mts +35 -6
- package/borrow.d.ts +35 -6
- package/borrow.mjs +148 -30
- package/bridge.cjs +187 -40
- package/bridge.d.cts +35 -6
- package/bridge.d.mts +35 -6
- package/bridge.d.ts +35 -6
- package/bridge.mjs +187 -40
- package/chains.cjs +8 -4
- package/chains.mjs +8 -4
- package/context.d.cts +35 -6
- package/context.d.mts +35 -6
- package/context.d.ts +35 -6
- package/earn.cjs +470 -34
- package/earn.d.cts +35 -6
- package/earn.d.mts +35 -6
- package/earn.d.ts +35 -6
- package/earn.mjs +470 -34
- package/estimateBridge.cjs +187 -40
- package/estimateBridge.d.cts +35 -6
- package/estimateBridge.d.mts +35 -6
- package/estimateBridge.d.ts +35 -6
- package/estimateBridge.mjs +187 -40
- package/estimateSwap.cjs +263 -43
- package/estimateSwap.d.cts +83 -6
- package/estimateSwap.d.mts +83 -6
- package/estimateSwap.d.ts +83 -6
- package/estimateSwap.mjs +263 -43
- package/index.cjs +468 -53
- package/index.d.cts +331 -202
- package/index.d.mts +331 -202
- package/index.d.ts +331 -202
- package/index.mjs +468 -53
- package/package.json +8 -8
- package/server.cjs +33 -7
- package/server.d.cts +29 -10
- package/server.d.mts +29 -10
- package/server.d.ts +29 -10
- package/server.mjs +33 -7
- package/swap.cjs +263 -43
- package/swap.d.cts +83 -6
- package/swap.d.mts +83 -6
- package/swap.d.ts +83 -6
- package/swap.mjs +263 -43
- package/unifiedBalance.cjs +73 -12
- package/unifiedBalance.mjs +73 -12
package/borrow.mjs
CHANGED
|
@@ -3175,6 +3175,8 @@ var SwapChain;
|
|
|
3175
3175
|
SwapChain["HyperEVM"] = "HyperEVM";
|
|
3176
3176
|
SwapChain["Monad"] = "Monad";
|
|
3177
3177
|
SwapChain["Arc"] = "Arc";
|
|
3178
|
+
SwapChain["Cronos"] = "Cronos";
|
|
3179
|
+
SwapChain["Morph"] = "Morph";
|
|
3178
3180
|
// Testnet chains with swap support
|
|
3179
3181
|
SwapChain["Arc_Testnet"] = "Arc_Testnet";
|
|
3180
3182
|
})(SwapChain || (SwapChain = {}));
|
|
@@ -4507,7 +4509,8 @@ var BorrowChain;
|
|
|
4507
4509
|
}
|
|
4508
4510
|
},
|
|
4509
4511
|
kitContracts: {
|
|
4510
|
-
bridge: BRIDGE_CONTRACT_EVM_MAINNET
|
|
4512
|
+
bridge: BRIDGE_CONTRACT_EVM_MAINNET,
|
|
4513
|
+
adapter: ADAPTER_CONTRACT_EVM_MAINNET
|
|
4511
4514
|
}
|
|
4512
4515
|
});
|
|
4513
4516
|
|
|
@@ -5376,7 +5379,8 @@ var BorrowChain;
|
|
|
5376
5379
|
}
|
|
5377
5380
|
},
|
|
5378
5381
|
kitContracts: {
|
|
5379
|
-
bridge: BRIDGE_CONTRACT_EVM_MAINNET
|
|
5382
|
+
bridge: BRIDGE_CONTRACT_EVM_MAINNET,
|
|
5383
|
+
adapter: ADAPTER_CONTRACT_EVM_MAINNET
|
|
5380
5384
|
}
|
|
5381
5385
|
});
|
|
5382
5386
|
|
|
@@ -7266,6 +7270,56 @@ var Chains = /*#__PURE__*/Object.freeze({
|
|
|
7266
7270
|
Blockchain.World_Chain_Sepolia
|
|
7267
7271
|
]);
|
|
7268
7272
|
|
|
7273
|
+
/**
|
|
7274
|
+
* Check if a chain supports a specific type of custom smart contract logic.
|
|
7275
|
+
*
|
|
7276
|
+
* This function examines a chain definition to determine if it has a specific
|
|
7277
|
+
* contract type configured. When a chain has custom contract support, it can
|
|
7278
|
+
* use enhanced features and custom business logic in addition to the standard
|
|
7279
|
+
* CCTP approve/burn/mint flow.
|
|
7280
|
+
*
|
|
7281
|
+
* @param chain - The chain definition to examine for custom contract support.
|
|
7282
|
+
* @param contractType - The type of contract to check for (e.g., 'bridge').
|
|
7283
|
+
* @returns True if the chain supports the specified contract type with a valid address configured.
|
|
7284
|
+
*
|
|
7285
|
+
* @example
|
|
7286
|
+
* ```typescript
|
|
7287
|
+
* import { hasCustomContractSupport, Ethereum } from '@core/chains'
|
|
7288
|
+
*
|
|
7289
|
+
* // Check if a chain supports bridge contracts
|
|
7290
|
+
* if (hasCustomContractSupport(Ethereum, 'bridge')) {
|
|
7291
|
+
* // Runtime validation confirmed kitContracts.bridge exists
|
|
7292
|
+
* console.log('Bridge contract:', Ethereum.kitContracts?.bridge)
|
|
7293
|
+
* return executeCustomFlow(Ethereum.kitContracts?.bridge!, params)
|
|
7294
|
+
* } else {
|
|
7295
|
+
* console.log('Using standard CCTP flow')
|
|
7296
|
+
* return executeStandardFlow(params)
|
|
7297
|
+
* }
|
|
7298
|
+
* ```
|
|
7299
|
+
*
|
|
7300
|
+
* @example
|
|
7301
|
+
* ```typescript
|
|
7302
|
+
* // Usage in flow determination
|
|
7303
|
+
* function determineBridgingFlow(chain: ChainDefinition, params: BridgeParams) {
|
|
7304
|
+
* if (hasCustomContractSupport(chain, 'bridge')) {
|
|
7305
|
+
* return 'custom'
|
|
7306
|
+
* } else if (isCCTPV2Supported(chain)) {
|
|
7307
|
+
* return 'standard'
|
|
7308
|
+
* } else {
|
|
7309
|
+
* throw new Error(`Chain ${chain.name} is not supported for bridging`)
|
|
7310
|
+
* }
|
|
7311
|
+
* }
|
|
7312
|
+
*
|
|
7313
|
+
* // Future usage with other contract types (when added to KitContractType)
|
|
7314
|
+
* // if (hasCustomContractSupport(someChain, 'customType')) {
|
|
7315
|
+
* // console.log('Custom contract:', someChain.kitContracts?.customType)
|
|
7316
|
+
* // }
|
|
7317
|
+
* ```
|
|
7318
|
+
*/ function hasCustomContractSupport(chain, contractType) {
|
|
7319
|
+
const contractAddress = chain.kitContracts?.[contractType];
|
|
7320
|
+
return typeof contractAddress === 'string' && contractAddress.trim().length > 0;
|
|
7321
|
+
}
|
|
7322
|
+
|
|
7269
7323
|
/**
|
|
7270
7324
|
* Temporary allowlist of chains permitted to initiate Gateway fast deposits.
|
|
7271
7325
|
* Only chains keyed here are eligible; all others are rejected. Using the
|
|
@@ -7519,8 +7573,8 @@ var Chains = /*#__PURE__*/Object.freeze({
|
|
|
7519
7573
|
* Zod schema for validating swap-specific chain identifiers.
|
|
7520
7574
|
*
|
|
7521
7575
|
* Validates chains based on:
|
|
7522
|
-
* -
|
|
7523
|
-
* - Mainnet
|
|
7576
|
+
* - Membership in the SwapChain enum
|
|
7577
|
+
* - Mainnet or explicitly allowlisted testnet
|
|
7524
7578
|
* - At least one supported token available
|
|
7525
7579
|
*
|
|
7526
7580
|
*/ const swapChainIdentifierSchema = z.union([
|
|
@@ -7925,7 +7979,7 @@ const swapTokenEnumSchema = z.enum([
|
|
|
7925
7979
|
*
|
|
7926
7980
|
* A chain supports swaps if ALL conditions are met:
|
|
7927
7981
|
* 1. Is a member of the {@link SwapChain} enum
|
|
7928
|
-
* 2. Has
|
|
7982
|
+
* 2. Has an Adapter contract configured directly or through CCTP v2
|
|
7929
7983
|
*
|
|
7930
7984
|
* Testnets are allowed only when explicitly listed in the
|
|
7931
7985
|
* {@link SwapChain} enum (e.g., Arc_Testnet).
|
|
@@ -7946,14 +8000,14 @@ const swapTokenEnumSchema = z.enum([
|
|
|
7946
8000
|
* @remarks
|
|
7947
8001
|
* Chains automatically become swap-enabled when:
|
|
7948
8002
|
* - Added to the {@link SwapChain} enum
|
|
7949
|
-
* - Adapter contract is deployed
|
|
8003
|
+
* - An Adapter contract is deployed and configured
|
|
7950
8004
|
*
|
|
7951
8005
|
* No code changes needed when new chains are added!
|
|
7952
8006
|
*/ function isSwapSupportedChain(chain) {
|
|
7953
8007
|
if (!(chain.chain in SwapChain)) {
|
|
7954
8008
|
return false;
|
|
7955
8009
|
}
|
|
7956
|
-
if (!isCCTPV2Supported(chain)) {
|
|
8010
|
+
if (!isCCTPV2Supported(chain) && !hasCustomContractSupport(chain, 'adapter')) {
|
|
7957
8011
|
return false;
|
|
7958
8012
|
}
|
|
7959
8013
|
return true;
|
|
@@ -7964,7 +8018,7 @@ const swapTokenEnumSchema = z.enum([
|
|
|
7964
8018
|
*
|
|
7965
8019
|
* Dynamically filter chain definitions to include only those that:
|
|
7966
8020
|
* - Are members of the {@link SwapChain} enum
|
|
7967
|
-
* - Have
|
|
8021
|
+
* - Have an Adapter contract configured directly or through CCTP v2
|
|
7968
8022
|
*
|
|
7969
8023
|
* This function is pure and accepts chains as parameter to avoid
|
|
7970
8024
|
* circular dependencies.
|
|
@@ -8899,11 +8953,13 @@ function parseOrThrow(value, schema, context) {
|
|
|
8899
8953
|
[Blockchain.Arbitrum]: '0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9',
|
|
8900
8954
|
[Blockchain.Avalanche]: '0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7',
|
|
8901
8955
|
[Blockchain.Celo]: '0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e',
|
|
8956
|
+
[Blockchain.Cronos]: '0x66e428c3f67a68878562e79A0234c1F83c208770',
|
|
8902
8957
|
[Blockchain.Ethereum]: '0xdAC17F958D2ee523a2206206994597C13D831ec7',
|
|
8903
8958
|
[Blockchain.HyperEVM]: '0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb',
|
|
8904
8959
|
[Blockchain.Ink]: '0x0200C29006150606B650577BBE7B6248F58470c1',
|
|
8905
8960
|
[Blockchain.Linea]: '0xA219439258ca9da29E9Cc4cE5596924745e12B93',
|
|
8906
8961
|
[Blockchain.Monad]: '0xe7cd86e13AC4309349F30B3435a9d337750fC82D',
|
|
8962
|
+
[Blockchain.Morph]: '0xe7cd86e13AC4309349F30B3435a9d337750fC82D',
|
|
8907
8963
|
[Blockchain.NEAR]: 'usdt.tether-token.near',
|
|
8908
8964
|
[Blockchain.Optimism]: '0x94b008aA00579c1307B0EF2c499aD98a8ce58e58',
|
|
8909
8965
|
[Blockchain.Polkadot_Asset_Hub]: '1984',
|
|
@@ -8962,6 +9018,7 @@ function parseOrThrow(value, schema, context) {
|
|
|
8962
9018
|
[Blockchain.Arbitrum]: '0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1',
|
|
8963
9019
|
[Blockchain.Avalanche]: '0xd586E7F844cEa2F87f50152665BCbc2C279D8d70',
|
|
8964
9020
|
[Blockchain.Base]: '0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb',
|
|
9021
|
+
[Blockchain.Cronos]: '0xF2001B145b43032AAF5Ee2884e456CCd805F677D',
|
|
8965
9022
|
[Blockchain.Ethereum]: '0x6B175474E89094C44Da98b954EedeAC495271d0F',
|
|
8966
9023
|
[Blockchain.Linea]: '0x4AF15ec2A0BD43Db75dd04E62FAA3B8EF36b00d5',
|
|
8967
9024
|
[Blockchain.Optimism]: '0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1',
|
|
@@ -9024,7 +9081,9 @@ function parseOrThrow(value, schema, context) {
|
|
|
9024
9081
|
[Blockchain.Arbitrum]: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1',
|
|
9025
9082
|
[Blockchain.Avalanche]: '0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB',
|
|
9026
9083
|
[Blockchain.Base]: '0x4200000000000000000000000000000000000006',
|
|
9084
|
+
[Blockchain.Cronos]: '0xe44Fd7fCb2b1581822D0c862B68222998a0c299a',
|
|
9027
9085
|
[Blockchain.Ethereum]: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
|
|
9086
|
+
[Blockchain.Morph]: '0x5300000000000000000000000000000000000011',
|
|
9028
9087
|
[Blockchain.Optimism]: '0x4200000000000000000000000000000000000006',
|
|
9029
9088
|
[Blockchain.Polygon]: '0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619',
|
|
9030
9089
|
[Blockchain.Solana]: '7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs'
|
|
@@ -9043,6 +9102,7 @@ function parseOrThrow(value, schema, context) {
|
|
|
9043
9102
|
locators: {
|
|
9044
9103
|
[Blockchain.Ethereum]: '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599',
|
|
9045
9104
|
[Blockchain.Arbitrum]: '0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f',
|
|
9105
|
+
[Blockchain.Cronos]: '0x062E66477Faf219F25D27dCED647BF57C3107d52',
|
|
9046
9106
|
[Blockchain.Avalanche]: '0x50b7545627a5162F82A992c33b87aDc75187B218'
|
|
9047
9107
|
}
|
|
9048
9108
|
};
|
|
@@ -10139,7 +10199,7 @@ function resolveOptions(options) {
|
|
|
10139
10199
|
}
|
|
10140
10200
|
|
|
10141
10201
|
var name$3 = "@circle-fin/bridge-kit";
|
|
10142
|
-
var version$3 = "1.15.
|
|
10202
|
+
var version$3 = "1.15.3";
|
|
10143
10203
|
var pkg$3 = {
|
|
10144
10204
|
name: name$3,
|
|
10145
10205
|
version: version$3};
|
|
@@ -12218,7 +12278,7 @@ const validateQuoteItemSchema = z.object({
|
|
|
12218
12278
|
registerKit(`${pkg$3.name}/${pkg$3.version}`);
|
|
12219
12279
|
|
|
12220
12280
|
var name$2 = "@circle-fin/swap-kit";
|
|
12221
|
-
var version$2 = "1.
|
|
12281
|
+
var version$2 = "1.8.0";
|
|
12222
12282
|
var pkg$2 = {
|
|
12223
12283
|
name: name$2,
|
|
12224
12284
|
version: version$2};
|
|
@@ -12560,6 +12620,64 @@ const optionalChainIdentifierField = chainIdentifierField.optional();
|
|
|
12560
12620
|
}, {
|
|
12561
12621
|
message: 'fee amount must be non-negative (>= 0)'
|
|
12562
12622
|
});
|
|
12623
|
+
/**
|
|
12624
|
+
* Parses a display-only field leniently: a value `schema` rejects is replaced
|
|
12625
|
+
* with `fallback` instead of failing the response that carries it.
|
|
12626
|
+
* Implemented with `preprocess` rather than Zod's `.catch()` because static
|
|
12627
|
+
* analysis misreads `.catch` on the schema chain as an unhandled Promise
|
|
12628
|
+
* (S7785).
|
|
12629
|
+
*/ const withFallback = (schema, fallback)=>z.preprocess((value)=>schema.safeParse(value).success ? value : fallback, schema);
|
|
12630
|
+
const swapRouteTokenSchema = z.object({
|
|
12631
|
+
symbol: z.string(),
|
|
12632
|
+
address: z.string(),
|
|
12633
|
+
decimals: z.number()
|
|
12634
|
+
});
|
|
12635
|
+
const swapRouteMetadataSchema = z.record(z.unknown()).optional();
|
|
12636
|
+
const swapRouteStepSchema = z.object({
|
|
12637
|
+
type: z.string(),
|
|
12638
|
+
tool: z.string(),
|
|
12639
|
+
toolName: z.string(),
|
|
12640
|
+
fromToken: swapRouteTokenSchema,
|
|
12641
|
+
toToken: swapRouteTokenSchema,
|
|
12642
|
+
estimate: z.object({
|
|
12643
|
+
fromAmount: z.string(),
|
|
12644
|
+
toAmount: z.string(),
|
|
12645
|
+
gasCostUSD: z.string().optional()
|
|
12646
|
+
}),
|
|
12647
|
+
metadata: swapRouteMetadataSchema
|
|
12648
|
+
});
|
|
12649
|
+
/**
|
|
12650
|
+
* Strict schema for a `SwapRoute`. Module-private: service responses
|
|
12651
|
+
* parse routes leniently through {@link responseSwapRouteSchema}.
|
|
12652
|
+
*/ const swapRouteSchema = z.object({
|
|
12653
|
+
provider: z.string().min(1, 'provider must be a non-empty string'),
|
|
12654
|
+
steps: z.array(swapRouteStepSchema),
|
|
12655
|
+
metadata: swapRouteMetadataSchema
|
|
12656
|
+
});
|
|
12657
|
+
/**
|
|
12658
|
+
* Route details are display-only, so service responses parse them leniently:
|
|
12659
|
+
* steps or metadata in a shape the SDK does not know are dropped rather than
|
|
12660
|
+
* failing the quote or swap they describe. Steps are all-or-nothing: if any
|
|
12661
|
+
* step is malformed, `steps` is empty, so a route never silently loses a hop.
|
|
12662
|
+
*/ const responseSwapRouteSchema = swapRouteSchema.extend({
|
|
12663
|
+
steps: withFallback(swapRouteSchema.shape.steps, []),
|
|
12664
|
+
metadata: withFallback(swapRouteMetadataSchema, undefined)
|
|
12665
|
+
});
|
|
12666
|
+
const createSwapFeeItemSchema = z.object({
|
|
12667
|
+
token: z.string({
|
|
12668
|
+
required_error: 'fee token is required',
|
|
12669
|
+
invalid_type_error: 'fee token must be a string'
|
|
12670
|
+
}).min(1, 'fee token must be a non-empty string'),
|
|
12671
|
+
amount: feeAmountSchema,
|
|
12672
|
+
decimals: z.number().int('fee token decimals must be an integer').nonnegative('fee token decimals must be a non-negative integer').optional(),
|
|
12673
|
+
symbol: z.string({
|
|
12674
|
+
invalid_type_error: 'fee token symbol must be a string'
|
|
12675
|
+
}).min(1, 'fee token symbol must be a non-empty string').optional(),
|
|
12676
|
+
// Descriptive metadata: a value the SDK cannot use is dropped rather than
|
|
12677
|
+
// failing the response that carries the fee.
|
|
12678
|
+
type: withFallback(z.string().min(1).optional(), undefined),
|
|
12679
|
+
chain: withFallback(z.string().min(1).optional(), undefined)
|
|
12680
|
+
});
|
|
12563
12681
|
/**
|
|
12564
12682
|
* Zod schema for validating API keys.
|
|
12565
12683
|
*
|
|
@@ -12645,10 +12763,7 @@ const optionalChainIdentifierField = chainIdentifierField.optional();
|
|
|
12645
12763
|
/** Quote information with estimated amounts and route */ quote: z.object({
|
|
12646
12764
|
/** Estimated output amount (base units) */ estimatedAmount: z.string().min(1, 'estimatedAmount must be a non-empty string').regex(/^\d+$/, 'estimatedAmount must be a numeric string'),
|
|
12647
12765
|
/** Guaranteed minimum output amount (base units) */ minAmount: z.string().min(1, 'minAmount must be a non-empty string').regex(/^\d+$/, 'minAmount must be a numeric string'),
|
|
12648
|
-
/** Route information from DEX aggregator */ route:
|
|
12649
|
-
provider: z.string().min(1, 'provider must be a non-empty string'),
|
|
12650
|
-
steps: z.array(z.unknown())
|
|
12651
|
-
})
|
|
12766
|
+
/** Route information from DEX aggregator */ route: responseSwapRouteSchema
|
|
12652
12767
|
}),
|
|
12653
12768
|
/** Fee context indicating where fees should be collected */ feeContext: quoteFeeContextSchema
|
|
12654
12769
|
});
|
|
@@ -12864,19 +12979,6 @@ getQuoteRequestBaseSchema.superRefine(requireCrossChainQuoteToAddress);
|
|
|
12864
12979
|
}).min(1, 'toChain must be a non-empty string if provided').optional(),
|
|
12865
12980
|
apiKey: apiKeySchema.optional()
|
|
12866
12981
|
});
|
|
12867
|
-
/**
|
|
12868
|
-
* Zod schema for validating CreateSwapResponse payloads.
|
|
12869
|
-
*/ const createSwapFeeItemSchema = z.object({
|
|
12870
|
-
token: z.string({
|
|
12871
|
-
required_error: 'fee token is required',
|
|
12872
|
-
invalid_type_error: 'fee token must be a string'
|
|
12873
|
-
}).min(1, 'fee token must be a non-empty string'),
|
|
12874
|
-
amount: feeAmountSchema,
|
|
12875
|
-
decimals: z.number().int('fee token decimals must be an integer').nonnegative('fee token decimals must be a non-negative integer').optional(),
|
|
12876
|
-
symbol: z.string({
|
|
12877
|
-
invalid_type_error: 'fee token symbol must be a string'
|
|
12878
|
-
}).min(1, 'fee token symbol must be a non-empty string').optional()
|
|
12879
|
-
});
|
|
12880
12982
|
/**
|
|
12881
12983
|
* Developer fee item schema with basis field.
|
|
12882
12984
|
*/ const createSwapDeveloperFeeItemSchema = createSwapFeeItemSchema.extend({
|
|
@@ -13014,6 +13116,8 @@ getQuoteRequestBaseSchema.superRefine(requireCrossChainQuoteToAddress);
|
|
|
13014
13116
|
correlationId: z.preprocess((value)=>z.string().uuid().safeParse(value).success ? value : undefined, z.string().optional()),
|
|
13015
13117
|
config: createSwapRequestBaseSchema.shape.config.optional(),
|
|
13016
13118
|
fees: createSwapFeesSchema.optional(),
|
|
13119
|
+
// A route the SDK cannot parse is dropped instead of failing the swap.
|
|
13120
|
+
route: withFallback(responseSwapRouteSchema.optional(), undefined),
|
|
13017
13121
|
transaction: createSwapTransactionSchema
|
|
13018
13122
|
});
|
|
13019
13123
|
|
|
@@ -16256,6 +16360,16 @@ createTokenRegistry();
|
|
|
16256
16360
|
name: 'USDC',
|
|
16257
16361
|
version: '2'
|
|
16258
16362
|
},
|
|
16363
|
+
Cronos: {
|
|
16364
|
+
chainId: Cronos.chainId,
|
|
16365
|
+
name: 'USDC',
|
|
16366
|
+
version: '2'
|
|
16367
|
+
},
|
|
16368
|
+
Morph: {
|
|
16369
|
+
chainId: Morph.chainId,
|
|
16370
|
+
name: 'USDC',
|
|
16371
|
+
version: '2'
|
|
16372
|
+
},
|
|
16259
16373
|
Arc_Testnet: {
|
|
16260
16374
|
chainId: ArcTestnet.chainId,
|
|
16261
16375
|
name: 'USDC',
|
|
@@ -16344,6 +16458,7 @@ const optionalSwapChainIdentifierField = swapChainIdentifierField.optional();
|
|
|
16344
16458
|
* - customFee: Optional fee configuration
|
|
16345
16459
|
* - apiKey: Optional credential string
|
|
16346
16460
|
* - kitKey: Optional credential string (deprecated alias for apiKey)
|
|
16461
|
+
* - batchTransactions: Optional boolean to opt out of atomic batching
|
|
16347
16462
|
*/ const swapConfigSchema = z.object({
|
|
16348
16463
|
allowanceStrategy: allowanceStrategySchema.optional(),
|
|
16349
16464
|
slippageBps: z.number().int().min(0).optional(),
|
|
@@ -16354,7 +16469,10 @@ const optionalSwapChainIdentifierField = swapChainIdentifierField.optional();
|
|
|
16354
16469
|
})(z.string())).optional(),
|
|
16355
16470
|
customFee: swapCustomFeeSchema.optional(),
|
|
16356
16471
|
apiKey: z.string().optional(),
|
|
16357
|
-
kitKey: z.string().optional()
|
|
16472
|
+
kitKey: z.string().optional(),
|
|
16473
|
+
batchTransactions: z.boolean({
|
|
16474
|
+
invalid_type_error: 'batchTransactions must be a boolean'
|
|
16475
|
+
}).optional()
|
|
16358
16476
|
});
|
|
16359
16477
|
const swapDestinationSchema = z.object({
|
|
16360
16478
|
chain: optionalSwapChainIdentifierField,
|
|
@@ -16547,7 +16665,7 @@ new Set(Object.values(Blockchain));
|
|
|
16547
16665
|
registerKit(`${pkg$2.name}/${pkg$2.version}`);
|
|
16548
16666
|
|
|
16549
16667
|
var name$1 = "@circle-fin/earn-kit";
|
|
16550
|
-
var version$1 = "1.
|
|
16668
|
+
var version$1 = "1.9.0";
|
|
16551
16669
|
var pkg$1 = {
|
|
16552
16670
|
name: name$1,
|
|
16553
16671
|
version: version$1};
|
|
@@ -18051,7 +18169,7 @@ registerKit(`${pkg$1.name}/${pkg$1.version}`);
|
|
|
18051
18169
|
};
|
|
18052
18170
|
|
|
18053
18171
|
var name = "@circle-fin/borrow-kit";
|
|
18054
|
-
var version = "1.
|
|
18172
|
+
var version = "1.1.0";
|
|
18055
18173
|
var pkg = {
|
|
18056
18174
|
name: name,
|
|
18057
18175
|
version: version};
|