@swapkit/helpers 4.12.3 → 4.12.5

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.
@@ -57,7 +57,6 @@ export declare function getSwapQuote(json: QuoteRequest): Promise<{
57
57
  quoteId: string;
58
58
  routes: {
59
59
  buyAsset: string;
60
- destinationAddress: string;
61
60
  expectedBuyAmount: string;
62
61
  expectedBuyAmountMaxSlippage: string;
63
62
  fees: {
@@ -157,13 +156,13 @@ export declare function getSwapQuote(json: QuoteRequest): Promise<{
157
156
  routeId: string;
158
157
  sellAmount: string;
159
158
  sellAsset: string;
160
- sourceAddress: string;
161
159
  totalSlippageBps: number;
162
160
  warnings: {
163
161
  code: import("../..").WarningCodeEnum;
164
162
  display: string;
165
163
  tooltip?: string | undefined;
166
164
  }[];
165
+ destinationAddress?: string | undefined;
167
166
  estimatedTime?: {
168
167
  total: number;
169
168
  inbound?: number | undefined;
@@ -173,6 +172,7 @@ export declare function getSwapQuote(json: QuoteRequest): Promise<{
173
172
  expiration?: string | undefined;
174
173
  inboundAddress?: string | undefined;
175
174
  memo?: string | undefined;
175
+ sourceAddress?: string | undefined;
176
176
  targetAddress?: string | undefined;
177
177
  tx?: string | {
178
178
  data: string;
@@ -222,11 +222,14 @@ export declare function getSwapQuote(json: QuoteRequest): Promise<{
222
222
  sequence: number;
223
223
  } | {
224
224
  raw_data: {
225
+ [x: string]: unknown;
225
226
  contract: any;
226
227
  expiration: number;
227
228
  ref_block_bytes: string;
228
229
  ref_block_hash: string;
229
230
  timestamp: number;
231
+ data?: string | undefined;
232
+ fee_limit?: number | undefined;
230
233
  };
231
234
  raw_data_hex: string;
232
235
  txID: string;
@@ -1 +1 @@
1
- {"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../../../src/api/swapkitApi/endpoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAA4B,MAAM,gBAAgB,CAAC;AAEtE,OAAO,EAAE,UAAU,E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AS,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC,CAsC9E"}
@@ -970,11 +970,13 @@ export type EVMTransaction = z.infer<typeof EVMTransactionSchema>;
970
970
  export declare const TronTransactionSchema: z.ZodObject<{
971
971
  raw_data: z.ZodObject<{
972
972
  contract: z.ZodAny;
973
+ data: z.ZodOptional<z.ZodString>;
973
974
  expiration: z.ZodNumber;
975
+ fee_limit: z.ZodOptional<z.ZodNumber>;
974
976
  ref_block_bytes: z.ZodString;
975
977
  ref_block_hash: z.ZodString;
976
978
  timestamp: z.ZodNumber;
977
- }, z.core.$strip>;
979
+ }, z.core.$loose>;
978
980
  raw_data_hex: z.ZodString;
979
981
  txID: z.ZodString;
980
982
  visible: z.ZodBoolean;
@@ -1286,7 +1288,7 @@ declare const QuoteResponseRouteLegItem: z.ZodObject<{
1286
1288
  }, z.core.$strip>;
1287
1289
  export declare const QuoteResponseRouteItem: z.ZodObject<{
1288
1290
  buyAsset: z.ZodString;
1289
- destinationAddress: z.ZodString;
1291
+ destinationAddress: z.ZodOptional<z.ZodString>;
1290
1292
  estimatedTime: z.ZodOptional<z.ZodObject<{
1291
1293
  inbound: z.ZodOptional<z.ZodNumber>;
1292
1294
  outbound: z.ZodOptional<z.ZodNumber>;
@@ -1395,7 +1397,7 @@ export declare const QuoteResponseRouteItem: z.ZodObject<{
1395
1397
  routeId: z.ZodString;
1396
1398
  sellAmount: z.ZodString;
1397
1399
  sellAsset: z.ZodString;
1398
- sourceAddress: z.ZodString;
1400
+ sourceAddress: z.ZodOptional<z.ZodString>;
1399
1401
  targetAddress: z.ZodOptional<z.ZodString>;
1400
1402
  totalSlippageBps: z.ZodNumber;
1401
1403
  tx: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
@@ -1447,11 +1449,13 @@ export declare const QuoteResponseRouteItem: z.ZodObject<{
1447
1449
  }, z.core.$strip>, z.ZodObject<{
1448
1450
  raw_data: z.ZodObject<{
1449
1451
  contract: z.ZodAny;
1452
+ data: z.ZodOptional<z.ZodString>;
1450
1453
  expiration: z.ZodNumber;
1454
+ fee_limit: z.ZodOptional<z.ZodNumber>;
1451
1455
  ref_block_bytes: z.ZodString;
1452
1456
  ref_block_hash: z.ZodString;
1453
1457
  timestamp: z.ZodNumber;
1454
- }, z.core.$strip>;
1458
+ }, z.core.$loose>;
1455
1459
  raw_data_hex: z.ZodString;
1456
1460
  txID: z.ZodString;
1457
1461
  visible: z.ZodBoolean;
@@ -1482,7 +1486,7 @@ export declare const QuoteResponseSchema: z.ZodObject<{
1482
1486
  quoteId: z.ZodString;
1483
1487
  routes: z.ZodArray<z.ZodObject<{
1484
1488
  buyAsset: z.ZodString;
1485
- destinationAddress: z.ZodString;
1489
+ destinationAddress: z.ZodOptional<z.ZodString>;
1486
1490
  estimatedTime: z.ZodOptional<z.ZodObject<{
1487
1491
  inbound: z.ZodOptional<z.ZodNumber>;
1488
1492
  outbound: z.ZodOptional<z.ZodNumber>;
@@ -1591,7 +1595,7 @@ export declare const QuoteResponseSchema: z.ZodObject<{
1591
1595
  routeId: z.ZodString;
1592
1596
  sellAmount: z.ZodString;
1593
1597
  sellAsset: z.ZodString;
1594
- sourceAddress: z.ZodString;
1598
+ sourceAddress: z.ZodOptional<z.ZodString>;
1595
1599
  targetAddress: z.ZodOptional<z.ZodString>;
1596
1600
  totalSlippageBps: z.ZodNumber;
1597
1601
  tx: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
@@ -1643,11 +1647,13 @@ export declare const QuoteResponseSchema: z.ZodObject<{
1643
1647
  }, z.core.$strip>, z.ZodObject<{
1644
1648
  raw_data: z.ZodObject<{
1645
1649
  contract: z.ZodAny;
1650
+ data: z.ZodOptional<z.ZodString>;
1646
1651
  expiration: z.ZodNumber;
1652
+ fee_limit: z.ZodOptional<z.ZodNumber>;
1647
1653
  ref_block_bytes: z.ZodString;
1648
1654
  ref_block_hash: z.ZodString;
1649
1655
  timestamp: z.ZodNumber;
1650
- }, z.core.$strip>;
1656
+ }, z.core.$loose>;
1651
1657
  raw_data_hex: z.ZodString;
1652
1658
  txID: z.ZodString;
1653
1659
  visible: z.ZodBoolean;
@@ -2080,11 +2086,13 @@ export declare const QuoteRouteV2Response: z.ZodObject<{
2080
2086
  }, z.core.$strip>, z.ZodObject<{
2081
2087
  raw_data: z.ZodObject<{
2082
2088
  contract: z.ZodAny;
2089
+ data: z.ZodOptional<z.ZodString>;
2083
2090
  expiration: z.ZodNumber;
2091
+ fee_limit: z.ZodOptional<z.ZodNumber>;
2084
2092
  ref_block_bytes: z.ZodString;
2085
2093
  ref_block_hash: z.ZodString;
2086
2094
  timestamp: z.ZodNumber;
2087
- }, z.core.$strip>;
2095
+ }, z.core.$loose>;
2088
2096
  raw_data_hex: z.ZodString;
2089
2097
  txID: z.ZodString;
2090
2098
  visible: z.ZodBoolean;
@@ -2284,11 +2292,13 @@ export declare const QuoteV2ResponseSchema: z.ZodObject<{
2284
2292
  }, z.core.$strip>, z.ZodObject<{
2285
2293
  raw_data: z.ZodObject<{
2286
2294
  contract: z.ZodAny;
2295
+ data: z.ZodOptional<z.ZodString>;
2287
2296
  expiration: z.ZodNumber;
2297
+ fee_limit: z.ZodOptional<z.ZodNumber>;
2288
2298
  ref_block_bytes: z.ZodString;
2289
2299
  ref_block_hash: z.ZodString;
2290
2300
  timestamp: z.ZodNumber;
2291
- }, z.core.$strip>;
2301
+ }, z.core.$loose>;
2292
2302
  raw_data_hex: z.ZodString;
2293
2303
  txID: z.ZodString;
2294
2304
  visible: z.ZodBoolean;
@@ -2475,11 +2485,13 @@ export declare const SwapRouteV2ResponseSchema: z.ZodObject<{
2475
2485
  }, z.core.$strip>, z.ZodObject<{
2476
2486
  raw_data: z.ZodObject<{
2477
2487
  contract: z.ZodAny;
2488
+ data: z.ZodOptional<z.ZodString>;
2478
2489
  expiration: z.ZodNumber;
2490
+ fee_limit: z.ZodOptional<z.ZodNumber>;
2479
2491
  ref_block_bytes: z.ZodString;
2480
2492
  ref_block_hash: z.ZodString;
2481
2493
  timestamp: z.ZodNumber;
2482
- }, z.core.$strip>;
2494
+ }, z.core.$loose>;
2483
2495
  raw_data_hex: z.ZodString;
2484
2496
  txID: z.ZodString;
2485
2497
  visible: z.ZodBoolean;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/api/swapkitApi/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAkB,MAAM,EAAoD,KAAK,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AACnH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE3F,oBAAY,aAAa;IACvB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,WAAW,gBAAgB;CAC5B;AAED,oBAAY,gBAAgB;IAC1B,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB;AAED,oBAAY,OAAO;IACjB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,oBAAoB,yBAAyB;IAC7C,WAAW,gBAAgB;IAC3B,KAAK,UAAU;IACf,cAAc,mBAAmB;IACjC,IAAI,SAAS;IACb,eAAe,oBAAoB;IACnC,mBAAmB,wBAAwB;IAC3C,cAAc,mBAAmB;IACjC,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAED,oBAAY,cAAc;IACxB,IAAI,SAAS;IACb,WAAW,gBAAgB;IAC3B,YAAY,iBAAiB;IAC7B,iBAAiB,sBAAsB;IACvC,SAAS,cAAc;IACvB,cAAc,mBAAmB;IACjC,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,KAAK,UAAU;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAW/B,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;iBAKxC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAOhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAGxE,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKpC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
@@ -377,6 +377,8 @@ declare const errorCodes: {
377
377
  readonly toolbox_tron_approve_failed: 50806;
378
378
  readonly toolbox_tron_invalid_token_contract: 50807;
379
379
  readonly toolbox_tron_allowance_check_failed: 50808;
380
+ readonly toolbox_tron_invalid_transaction_integrity: 50809;
381
+ readonly toolbox_tron_broadcast_failed: 50810;
380
382
  /**
381
383
  * Toolboxes - Cardano
382
384
  */
@@ -878,6 +880,8 @@ export declare class SwapKitError extends Error {
878
880
  readonly toolbox_tron_approve_failed: 50806;
879
881
  readonly toolbox_tron_invalid_token_contract: 50807;
880
882
  readonly toolbox_tron_allowance_check_failed: 50808;
883
+ readonly toolbox_tron_invalid_transaction_integrity: 50809;
884
+ readonly toolbox_tron_broadcast_failed: 50810;
881
885
  /**
882
886
  * Toolboxes - Cardano
883
887
  */
@@ -1 +1 @@
1
- {"version":3,"file":"swapKitError.d.ts","sourceRoot":"","sources":["../../../src/modules/swapKitError.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,QAAA,MAAM,UAAU;IACd;;OAEG;;;;;;;;;;;IAWH;;OAEG;;;;;;;;;;;;;;;;;IAiBH;;OAEG;;;;;;;;;IASH;;OAEG;;;;;;;;;;;;;;;;;;IAkBH;;OAEG;;;;;;;IAOH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;IAyBH;;OAEG;;IAEH;;OAEG;;;;;IAKH;;OAEG;;;;;;;IAOH;;OAEG;;;;;;;IAOH;;OAEG;;;IAGH;;OAEG;;IAEH;;OAEG;;;;;;IAMH;;OAEG;;;;;;;;;;;;;;;;;;;IAmBH;;OAEG;;;;IAIH;;OAEG;;;;;;;;;IASH;;OAEG;;;IAGH;;OAEG;;;;;IAKH;;OAEG;;;;;IAKH;;OAEG;;;;;;;;;IASH;;OAEG;IAEH;;OAEG;;;;;IAKH;;OAEG;;;;IAIH;;OAEG;;;IAGH;;OAEG;;;;;IAKH;;OAEG;;IAEH;;OAEG;;;;;IAMH;;OAEG;;;;;;;IAOH;;OAEG;;;IAIH;;OAEG;;;IAGH;;OAEG;;;;;;;;IAQH;;OAEG;;;;IAIH;;OAEG;;;;;;IAMH;;OAEG;;;;;;;;;IASH;;OAEG;;;;;;;;;;;;;;;;;;IAkBH;;OAEG;;;;;;;;;;;;;;;IAeH;;O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AEG;;;;;QAKH;;WAEG;;QAEH;;WAEG;;;;;QAMH;;WAEG;;;;;;;QAOH;;WAEG;;;QAIH;;WAEG;;;QAGH;;WAEG;;;;;;;;QAQH;;WAEG;;;;QAIH;;WAEG;;;;;;QAMH;;WAEG;;;;;;;;;QASH;;WAEG;;;;;;;;;;;;;;;;;;QAkBH;;WAEG;;;;;;;;;;;;;;;QAeH;;WAEG;;QAEH;;WAEG;;;QAGH;;WAEG;;QAEH;;WAEG;;;;;;;;QAQH;;WAEG;;;;;;;;;;;QAWH;;WAEG;;QAEH;;WAEG;;;;;;;;;;;;;;QAcH;;WAEG;;;;;;;;;;;;QAYH;;WAEG;;;;;;QAMH;;WAEG;;;;;;QAMH;;WAEG;;;;;;;;;;;QAWH;;WAEG;;;;;;;QAOH;;WAEG;;;QAGH;;WAEG;;;;;;QAMH;;WAEG;;QAEH;;WAEG;;;QAGH;;WAEG;;;;QAIH;;WAEG;;;;;;;;;;;;;;QAcH;;WAEG;;MAW2B;gBAG5B,eAAe,EAAE,SAAS,GAAG;QAAE,QAAQ,EAAE,SAAS,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;KAAE,EAChF,iBAAiB,CAAC,EAAE,GAAG;CAuB1B"}
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "zustand": "5.0.8"
12
12
  },
13
13
  "description": "SwapKit - Helpers",
14
- "devDependencies": { "@near-js/providers": "2.5.0", "@swapkit/toolboxes": "4.13.1", "ethers": "6.16.0" },
14
+ "devDependencies": { "@near-js/providers": "2.5.0", "@swapkit/toolboxes": "4.13.3", "ethers": "6.16.0" },
15
15
  "exports": {
16
16
  ".": { "default": "./dist/index.js", "require": "./dist/index.cjs", "types": "./dist/types/index.d.ts" },
17
17
  "./api": {
@@ -41,5 +41,5 @@
41
41
  "type-check:go": "tsgo"
42
42
  },
43
43
  "type": "module",
44
- "version": "4.12.3"
44
+ "version": "4.12.5"
45
45
  }
@@ -1,5 +0,0 @@
1
- var rA=Object.defineProperty;var lA=(N)=>N;function iA(N,A){this[N]=lA.bind(null,A)}var cN=(N,A)=>{for(var T in A)rA(N,T,{get:A[T],enumerable:!0,configurable:!0,set:iA.bind(A,T)})};var RN=((N)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(N,{get:(A,T)=>(typeof require<"u"?require:A)[T]}):N)(function(N){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+N+'" is not supported')});import{Chain as QN,getChainConfig as hT}from"@swapkit/types";import{AllChains as WT,Chain as Q,EVMChains as qT,getChainConfig as ON}from"@swapkit/types";import{getAddress as FA}from"ethers";import{match as mN}from"ts-pattern";import{Chain as n,EVMChains as XT,getChainConfig as C,UTXOChains as QT}from"@swapkit/types";import{match as FN}from"ts-pattern";import{AllChains as lN,getChainConfig as HT,StagenetChain as rN,StagenetMAYAConfig as PT,StagenetTHORConfig as LT}from"@swapkit/types";import{createStore as RT}from"zustand/vanilla";import{AllChains as sA,getChainConfig as eA}from"@swapkit/types";var wP=sA.reduce((N,A)=>{return N[A]=eA(A).networkDerivationPath,N},{});var uN;((u)=>{u.unknownError="unknownError";u.test_error="test_error";u.providerDetailsError="providerDetailsError";u.blockHeaderNotFound="blockHeaderNotFound";u.blockHashNotFoundAtHeight="blockHashNotFoundAtHeight";u.blockHashNotFoundAtHash="blockHashNotFoundAtHash";u.txHashMissing="txHashMissing";u.assetValueMissingInfo="assetValueMissingInfo";u.invalidAsset="invalidAsset";u.blockIsRequired="blockIsRequired";u.currentBlockHeaderNotFound="currentBlockHeaderNotFound";u.failedToRetrieveBalance="failedToRetrieveBalance";u.failedToRetrieveBlock="failedToRetrieveBlock";u.failedToRetrieveFees="failedToRetrieveFees";u.notImplementedBCH="notImplementedBCH";u.notImplementedDoge="notImplementedDoge";u.noPoolsFound="noPoolsFound";u.noVaultsFound="noVaultsFound";u.noTxFound="noTxFound";u.noInputCoinFound="noInputCoinFound";u.noBlockDataFound="noBlockDataFound";u.multipleCosmosMessages="multipleCosmosMessages";u.heightOrHashNotProvided="heightOrHashNotProvided";u.unknownDenom="unknownDenom";u.invalidBlockHeight="invalidBlockHeight";u.timestampExtrinsicNoArgumentsForBlock="timestampExtrinsicNoArgumentsForBlock";u.timestampExtrinsicNoTimestampForBlock="timestampExtrinsicNoTimestampForBlock";u.noTimestampExtrinsicForHash="noTimestampExtrinsicForHash";u.timestampExtrinsicNoArgumentsForHash="timestampExtrinsicNoArgumentsForHash";u.txMemoUndefined="txMemoUndefined";u.txMemoIncorrect="txMemoIncorrect";u.txTypeNotFound="txTypeNotFound";u.txNoMessage="txNoMessage";u.txNotFound="txNotFound";u.txReceiptNotFound="txReceiptNotFound";u.txParsingError="txParsingError";u.txLogsParsingError="txLogsParsingError";u.blockNotFound="blockNotFound";u.balanceNotFound="balanceNotFound";u.configError="configError";u.synthSwapDisallowed="synthSwapDisallowed";u.providerQuoteTimeout="providerQuoteTimeout";u.noQuoteResponse="noQuoteResponse";u.noPoolAssetsFound="noPoolAssetsFound";u.noThorchainPools="noThorchainPools";u.noMayachainPools="noMayachainPools";u.noThorchainNetworkInfo="noThorchainNetworkInfo";u.invalidAffiliateFee="invalidAffiliateFee";u.invalidBuyAssetAddress="invalidBuyAssetAddress";u.invalidSellAssetAddress="invalidSellAssetAddress";u.invalidSourceAddress="invalidSourceAddress";u.invalidDestinationAddress="invalidDestinationAddress";u.sourceAddressIsSmartContract="sourceAddressIsSmartContract";u.destinationAddressIsSmartContract="destinationAddressIsSmartContract";u.invalidChainId="invalidChainId";u.unsupportedChainId="unsupportedChainId";u.unsupportedEVMChainId="unsupportedEVMChainId";u.unsupportedMethod="unsupportedMethod";u.unsupportedProvider="unsupportedProvider";u.invalidParamsForMethod="invalidParamsForMethod";u.unsupportedAdapter="unsupportedAdapter";u.noWhitelistTokens="noWhitelistTokens";u.failedFetchGasPrice="failedFetchGasPrice";u.failedToCreateDepositChannel="failedToCreateDepositChannel";u.noProviderDetailsFound="noProviderDetailsFound";u.noTokenListsFound="noTokenListsFound";u.tokenNotFound="tokenNotFound";u.tokenPriceNotFound="tokenPriceNotFound";u.tokenPriceFailedToUpdate="tokenPriceFailedToUpdate";u.swapAmountTooSmall="swapAmountTooSmall";u.legsArrayIsEmpty="legsArrayIsEmpty";u.failedToFetchQuoteForLeg="failedToFetchQuoteForLeg";u.noBlockHeaderFound="noBlockHeaderFound";u.failedToSimulateSwap="failedToSimulateSwap";u.addressScreeningFailed="addressScreeningFailed";u.noLiquidtyProvidersFound="noLiquidtyProvidersFound";u.insufficientLiquidity="insufficientLiquidity";u.noInboundDataFound="noInbounDataFound";u.noInboundAddressesFound="noInboundAddressesFound";u.noInboundAddressFoundForChain="noInboundAddressFoundForChain";u.noLastBlocksFound="noLastBlocksFound";u.noVersionFound="noVersionFound";u.noConstantsFound="noConstantsFound";u.noMimirsFound="noMimirsFound";u.noRoutesFound="noRoutesFound";u.quoteNotFound="quoteNotFound";u.ledgerSignFailed="ledgerSignFailed";u.ledgerWrongPayload="ledgerWrongPayload";u.ledgerFetchSwapFailed="ledgerFetchSwapFailed";u.failedToFetchTx="failedToFetchTx";u.failedBuildTransactionDetails="failedBuildTransactionDetails";u.noLegsForRoute="noLegsForRoute";u.noRouterAddressFound="noRouterAddressFound";u.noAggregatorAddressFound="noAggregatorAddressFound";u.noContractInstanceFound="noContractInstanceFound";u.noContractAddressFound="noContractAddressFound";u.invalidAffiliate="invalidAffiliate";u.thornameAffiliate="thornameAffiliate";u.providerNotfound="No provider found";u.noRecordFound="No Record found";u.slippageTooLow="Slippage too low";u.tradingHalted="tradingHalted";u.noWrappedGasAsset="noWrappedGasAsset";u.aggregatorAddressNotFound="aggregatorAddressNotFound";u.routerAddressNotFound="routerAddressNotFound";u.dummyAddressNotFound="dummyAddressNotFound";u.trackerError="trackerError";u.thorchainPoolUnavailable="thorchainPoolUnavailable";u.noOhlcvDataFound="noOhlcvDataFound";u.noTradingPairs="noTradingPairs";u.noLendingAvailability="noLendingAvailability";u.lendingRepayTooSmall="lendingRepayTooSmall";u.missingState="missingState";u.ledgerSwapNotFound="ledgerSwapNotFound";u.ledgerSwapNotReadyForTracking="ledgerSwapNotReadyForTracking";u.errorEstimatingGas="errorEstimatingGas";u.apiKeyInvalid="apiKeyInvalid";u.apiKeyFailedToUpdate="apiKeyFailedToUpdate";u.apiKeyExpired="apiKeyExpired";u.unauthorized="unauthorized";u.failedToCreateMemo="failedToCreateMemo";u.radixIncorrectInstructions="radixIncorrectInstructions";u.radixTxMissedParam="radixTxMissedParam";u.radixTxMissedAccount="radixTxMissedAccount";u.radixManifestParseError="radixManifestParseError";u.radixManifestBuildError="radixManifestBuildError";u.invalidAddressForChain="invalidAddressForChain";u.riskyAddress="riskyAddress";u.noRoutesToProcess="noRoutesToProcess";u.sellAssetAmountTooSmall="sellAssetAmountTooSmall";u.missingPrivateKey="missingPrivateKey";u.noMemoPriceProtection="noMemoPriceProtection"})(uN||={});var wN;((T)=>{T.highSlippage="highSlippage";T.highPriceImpact="highPriceImpact"})(wN||={});var j;((x)=>{x.CHAINFLIP="CHAINFLIP";x.CHAINFLIP_STREAMING="CHAINFLIP_STREAMING";x.JUPITER="JUPITER";x.MAYACHAIN="MAYACHAIN";x.MAYACHAIN_STREAMING="MAYACHAIN_STREAMING";x.ONEINCH="ONEINCH";x.PANCAKESWAP="PANCAKESWAP";x.SUSHISWAP_V2="SUSHISWAP_V2";x.THORCHAIN="THORCHAIN";x.THORCHAIN_STREAMING="THORCHAIN_STREAMING";x.TRADERJOE_V2="TRADERJOE_V2";x.UNISWAP_V2="UNISWAP_V2";x.UNISWAP_V3="UNISWAP_V3";x.NEAR="NEAR";x.GARDEN="GARDEN";x.OKX="OKX";x.HARBOR="HARBOR"})(j||={});var zN;((G)=>{G.LIQUIDITY="liquidity";G.NETWORK="network";G.INBOUND="inbound";G.OUTBOUND="outbound";G.AFFILIATE="affiliate";G.TAX="tax";G.PRIORITY="priority";G.SERVICE="service"})(zN||={});var aA;((H)=>{H.Average="average";H.Fast="fast";H.Fastest="fastest"})(aA||={});var NT;((T)=>{T.Approve="approve";T.CheckOnly="checkOnly"})(NT||={});var AT;((Y)=>{Y.NAME_REGISTER="~";Y.BOND="BOND";Y.DEPOSIT="+";Y.LEAVE="LEAVE";Y.UNBOND="UNBOND";Y.WITHDRAW="-";Y.RUNEPOOL_DEPOSIT="POOL+";Y.RUNEPOOL_WITHDRAW="POOL-";Y.CLAIM_TCY="tcy";Y.STAKE_TCY="tcy+";Y.UNSTAKE_TCY="tcy-"})(AT||={});import{Chain as _}from"@swapkit/types";var JN;((U)=>{U.BITGET="BITGET";U.BRAVE="BRAVE";U.COINBASE_MOBILE="COINBASE_MOBILE";U.COINBASE_WEB="COINBASE_WEB";U.COSMOSTATION="COSMOSTATION";U.CTRL="CTRL";U.EIP6963="EIP6963";U.EXODUS="EXODUS";U.KEEPKEY="KEEPKEY";U.KEEPKEY_BEX="KEEPKEY_BEX";U.KEPLR="KEPLR";U.KEYSTORE="KEYSTORE";U.LEAP="LEAP";U.LEDGER="LEDGER";U.METAMASK="METAMASK";U.OKX="OKX";U.OKX_MOBILE="OKX_MOBILE";U.ONEKEY="ONEKEY";U.PASSKEYS="PASSKEYS";U.PETRA="PETRA";U.PHANTOM="PHANTOM";U.POLKADOT_JS="POLKADOT_JS";U.RADIX_WALLET="RADIX_WALLET";U.TALISMAN="TALISMAN";U.TREZOR="TREZOR";U.TRONLINK="TRONLINK";U.TRUSTWALLET_WEB="TRUSTWALLET_WEB";U.VULTISIG="VULTISIG";U.WALLETCONNECT="WALLETCONNECT";U.WALLET_SELECTOR="WALLET_SELECTOR";U.XAMAN="XAMAN"})(JN||={});var TT;((H)=>{H[H.NoError=36864]="NoError";H[H.LockedDevice=21781]="LockedDevice";H[H.TC_NotFound=65535]="TC_NotFound"})(TT||={});var J=["BITGET","BRAVE","COINBASE_MOBILE","COINBASE_WEB","COSMOSTATION","CTRL","EIP6963","KEEPKEY","KEEPKEY_BEX","KEYSTORE","LEDGER","METAMASK","OKX","OKX_MOBILE","PASSKEYS","PHANTOM","TALISMAN","TREZOR","TRUSTWALLET_WEB","VULTISIG","WALLETCONNECT"],vP={[_.Arbitrum]:J,[_.Aurora]:J,[_.Avalanche]:J,[_.Base]:J,[_.Berachain]:J,[_.BinanceSmartChain]:J,[_.Botanix]:J,[_.Chainflip]:J,[_.Core]:J,[_.Corn]:J,[_.Cronos]:J,[_.Ethereum]:J,[_.Gnosis]:J,[_.Hyperevm]:J,[_.MegaETH]:J,[_.Monad]:J,[_.Optimism]:J,[_.Polygon]:J,[_.Sonic]:J,[_.Unichain]:J,[_.XLayer]:J,[_.Bitcoin]:["BITGET","KEYSTORE","OKX","ONEKEY","PASSKEYS","PHANTOM"],[_.BitcoinCash]:["KEYSTORE"],[_.Dash]:["KEYSTORE"],[_.Dogecoin]:["KEYSTORE"],[_.Litecoin]:["KEYSTORE"],[_.Zcash]:["KEYSTORE"],[_.Cosmos]:["COSMOSTATION","CTRL","KEPLR","KEYSTORE","LEAP"],[_.Kujira]:["COSMOSTATION","CTRL","KEPLR","KEYSTORE","LEAP"],[_.Maya]:["KEYSTORE"],[_.Noble]:["COSMOSTATION","CTRL","KEPLR","KEYSTORE","LEAP"],[_.THORChain]:["COSMOSTATION","KEPLR","KEYSTORE","LEAP"],[_.Aptos]:["BITGET","KEYSTORE","OKX","PETRA"],[_.Cardano]:["KEYSTORE"],[_.Near]:["KEYSTORE","LEDGER"],[_.Ripple]:["KEYSTORE","LEDGER"],[_.Solana]:["KEYSTORE","PASSKEYS","PHANTOM"],[_.Sui]:["KEYSTORE"],[_.Tron]:["KEYSTORE","LEDGER"],[_.Stellar]:["KEYSTORE"],[_.Starknet]:["KEYSTORE"]};var uT=lN.reduce((N,A)=>{if(!N.THOR_STAGENET)N[rN.Maya]=PT.rpcUrls,N[rN.THORChain]=LT.rpcUrls;return N[A]=HT(A).rpcUrls,N},{}),iN={apiKeys:{blockchair:"",keepKey:"",passkeys:"",swapKit:"",walletConnectProjectId:"",xaman:""},chains:lN,endpoints:{},envs:{apiUrl:"https://api.swapkit.dev",devApiUrl:"https://dev-api.swapkit.dev",isDev:!1,isStagenet:!1},feeMultipliers:void 0,integrations:{radix:{applicationName:"Swapkit Playground",applicationVersion:"0.0.1",dAppDefinitionAddress:"account_rdx128r289p58222hcvev7frs6kue76pl7pdcnw8725aw658v0zggkh9ws",network:{dashboardBase:"https://dashboard.radixdlt.com",networkId:1,networkName:"mainnet"}}},requestOptions:{retry:{backoffMultiplier:2,baseDelay:300,maxDelay:5000,maxRetries:3},timeoutMs:30000},rpcUrls:uT,v3SwapFlow:{enabled:typeof process<"u"&&process.env?.SWAPKIT_V3_SWAP_FLOW==="true"},wallets:Object.values(JN),widgetKey:""},q=RT((N)=>({...iN,setApiKey:(A,T)=>N((H)=>({apiKeys:{...H.apiKeys,[A]:T}})),setConfig:(A)=>N((T)=>({apiKeys:{...T.apiKeys,...A?.apiKeys},chains:T.chains.concat(A?.chains||[]),endpoints:{...T.endpoints,...A?.endpoints},envs:{...T.envs,...A?.envs},feeMultipliers:A?.feeMultipliers||T.feeMultipliers,integrations:{...T.integrations,...A?.integrations},rpcUrls:{...T.rpcUrls,...A?.rpcUrls},v3SwapFlow:{...T.v3SwapFlow,...A?.v3SwapFlow},wallets:T.wallets.concat(A?.wallets||[]),widgetKey:A?.widgetKey||T.widgetKey})),setEndpoint:(A,T)=>N((H)=>({endpoints:{...H.endpoints,[A]:T}})),setEnv:(A,T)=>N((H)=>({envs:{...H.envs,[A]:T}})),setFeeMultipliers:(A)=>N(()=>({feeMultipliers:A})),setIntegrationConfig:(A,T)=>N((H)=>({integrations:{...H.integrations,[A]:T}})),setRequestOptions:(A)=>N((T)=>({requestOptions:{retry:{...T.requestOptions.retry,...A.retry},timeoutMs:A.timeoutMs||T.requestOptions.timeoutMs}})),setRpcUrl:(A,T)=>N((H)=>({rpcUrls:{...H.rpcUrls,[A]:T}})),setWidgetKey:(A)=>N({widgetKey:A})})),E={get:(N)=>q.getState()[N],getState:q.getState,reinitialize:()=>q.setState(iN),set:(N)=>q.getState().setConfig(N),setApiKey:(N,A)=>q.getState().setApiKey(N,A),setEndpoint:(N,A)=>q.getState().setEndpoint(N,A),setEnv:(N,A)=>q.getState().setEnv(N,A),setFeeMultipliers:(N)=>q.getState().setFeeMultipliers(N),setIntegrationConfig:(N,A)=>q.getState().setIntegrationConfig(N,A),setRequestOptions:(N)=>q.getState().setRequestOptions(N),setRpcUrl:(N,A)=>q.getState().setRpcUrl(N,A),setWidgetKey:(N)=>q.getState().setWidgetKey(N)};var FT={core_estimated_max_spendable_chain_not_supported:10001,core_extend_error:10002,core_inbound_data_not_found:10003,core_approve_asset_address_or_from_not_found:10004,core_plugin_not_found:10005,core_plugin_swap_not_found:10006,core_approve_asset_target_invalid:10007,core_explorer_unsupported_chain:10008,core_verify_message_not_supported:10009,core_chain_halted:10010,core_wallet_connection_not_found:10101,core_wallet_ctrl_not_installed:10102,core_wallet_evmwallet_not_installed:10103,core_wallet_walletconnect_not_installed:10104,core_wallet_keystore_not_installed:10105,core_wallet_ledger_not_installed:10106,core_wallet_trezor_not_installed:10107,core_wallet_keplr_not_installed:10108,core_wallet_okx_not_installed:10109,core_wallet_keepkey_not_installed:10110,core_wallet_talisman_not_installed:10111,core_wallet_not_keypair_wallet:10112,core_wallet_sign_message_not_supported:10113,core_wallet_connection_failed:10114,core_wallet_create_not_supported:10115,core_wallet_sign_typed_data_not_supported:10116,core_swap_invalid_params:10201,core_swap_route_not_complete:10202,core_swap_asset_not_recognized:10203,core_swap_contract_not_found:10204,core_swap_route_transaction_not_found:10205,core_swap_contract_not_supported:10206,core_swap_transaction_error:10207,core_swap_quote_mode_not_supported:10208,core_transaction_deposit_error:10301,core_transaction_create_liquidity_base_error:10302,core_transaction_create_liquidity_asset_error:10303,core_transaction_create_liquidity_invalid_params:10304,core_transaction_add_liquidity_invalid_params:10305,core_transaction_add_liquidity_base_address:10306,core_transaction_add_liquidity_base_error:10307,core_transaction_add_liquidity_asset_error:10308,core_transaction_withdraw_error:10309,core_transaction_deposit_to_pool_error:10310,core_transaction_deposit_insufficient_funds_error:10311,core_transaction_deposit_gas_error:10312,core_transaction_invalid_sender_address:10313,core_transaction_deposit_server_error:10314,core_transaction_user_rejected:10315,core_transaction_failed:10316,core_transaction_invalid_recipient_address:10317,wallet_connection_rejected_by_user:20001,wallet_missing_api_key:20002,wallet_chain_not_supported:20003,wallet_missing_params:20004,wallet_provider_not_found:20005,wallet_failed_to_add_or_switch_network:20006,wallet_ledger_connection_error:20101,wallet_ledger_connection_claimed:20102,wallet_ledger_get_address_error:20103,wallet_ledger_device_not_found:20104,wallet_ledger_device_locked:20105,wallet_ledger_transport_error:20106,wallet_ledger_public_key_error:20107,wallet_ledger_derivation_path_error:20108,wallet_ledger_signing_error:20109,wallet_ledger_app_not_open:20110,wallet_ledger_invalid_response:20111,wallet_ledger_method_not_supported:20112,wallet_ledger_invalid_params:20113,wallet_ledger_invalid_signature:20114,wallet_ledger_no_provider:20115,wallet_ledger_pubkey_not_found:20116,wallet_ledger_transport_not_defined:20117,wallet_ledger_webusb_not_supported:20118,wallet_ledger_chain_not_supported:20119,wallet_ledger_invalid_asset:20120,wallet_ledger_invalid_account:20121,wallet_ledger_address_not_found:20122,wallet_ledger_failed_to_get_address:20123,wallet_ledger_webhid_not_supported:20124,wallet_phantom_not_found:20201,wallet_ctrl_not_found:20301,wallet_ctrl_send_transaction_no_address:20302,wallet_ctrl_contract_address_not_provided:20303,wallet_ctrl_asset_not_defined:20304,wallet_walletconnect_project_id_not_specified:20401,wallet_walletconnect_connection_not_established:20402,wallet_walletconnect_namespace_not_supported:20403,wallet_walletconnect_chain_not_supported:20404,wallet_walletconnect_invalid_method:20405,wallet_walletconnect_method_not_supported:20406,wallet_trezor_failed_to_sign_transaction:20501,wallet_trezor_derivation_path_not_supported:20502,wallet_trezor_failed_to_get_address:20503,wallet_trezor_transport_error:20504,wallet_trezor_method_not_supported:20505,wallet_trezor_failed_to_get_public_key:20506,wallet_talisman_not_enabled:20601,wallet_talisman_not_found:20602,wallet_polkadot_not_found:20701,wallet_radix_not_found:20801,wallet_radix_transaction_failed:20802,wallet_radix_invalid_manifest:20803,wallet_radix_method_not_supported:20804,wallet_radix_no_account:20805,wallet_keepkey_not_found:20901,wallet_keepkey_asset_not_defined:20902,wallet_keepkey_contract_address_not_provided:20903,wallet_keepkey_send_transaction_no_address:20904,wallet_keepkey_derivation_path_error:20905,wallet_keepkey_signing_error:20906,wallet_keepkey_transport_error:20907,wallet_keepkey_unsupported_chain:20908,wallet_keepkey_invalid_response:20909,wallet_keepkey_chain_not_supported:20910,wallet_keepkey_signer_not_found:20911,wallet_keepkey_no_accounts:20912,wallet_keepkey_method_not_supported:20913,wallet_keepkey_invalid_params:20914,wallet_keepkey_config_not_found:20915,wallet_keepkey_no_provider:20916,wallet_keepkey_account_not_found:20917,wallet_keepkey_failed_to_get_public_key:20918,wallet_bitkeep_not_found:21001,wallet_bitkeep_failed_to_switch_network:21002,wallet_bitkeep_no_accounts:21003,wallet_passkeys_sign_transaction_error:21101,wallet_passkeys_not_found:21102,wallet_passkeys_no_address:21103,wallet_passkeys_request_canceled:21104,wallet_passkeys_signature_canceled:21105,wallet_passkeys_failed_to_switch_network:21106,wallet_passkeys_chain_not_supported:21107,wallet_passkeys_instance_missing:21108,wallet_onekey_not_found:21201,wallet_onekey_sign_transaction_error:21202,wallet_okx_not_found:21301,wallet_okx_chain_not_supported:21302,wallet_okx_failed_to_switch_network:21303,wallet_okx_no_accounts:21304,wallet_keplr_not_found:21401,wallet_keplr_chain_not_supported:21402,wallet_keplr_signer_not_found:21403,wallet_keplr_no_accounts:21404,wallet_cosmostation_not_found:21501,wallet_cosmostation_chain_not_supported:21502,wallet_cosmostation_evm_provider_not_found:21503,wallet_cosmostation_keplr_provider_not_found:21504,wallet_cosmostation_no_accounts:21505,wallet_cosmostation_no_evm_accounts:21506,wallet_cosmostation_no_evm_address:21507,wallet_cosmostation_signer_not_found:21508,wallet_coinbase_not_found:21701,wallet_coinbase_chain_not_supported:21702,wallet_coinbase_method_not_supported:21703,wallet_coinbase_no_accounts:21704,wallet_evm_extensions_failed_to_switch_network:21801,wallet_evm_extensions_no_provider:21802,wallet_evm_extensions_not_found:21803,wallet_keystore_invalid_password:21901,wallet_keystore_unsupported_version:21902,wallet_near_extensions_failed_to_switch_network:22001,wallet_near_extensions_no_provider:22002,wallet_near_extensions_not_found:22003,wallet_near_method_not_supported:22004,wallet_petra_not_found:22201,wallet_vultisig_not_found:22101,wallet_vultisig_contract_address_not_provided:22102,wallet_vultisig_asset_not_defined:22103,wallet_vultisig_send_transaction_no_address:22104,wallet_xaman_not_configured:23001,wallet_xaman_not_connected:23002,wallet_xaman_auth_failed:23003,wallet_xaman_connection_failed:23004,wallet_xaman_transaction_failed:23005,wallet_xaman_monitoring_failed:23006,wallet_tronlink_request_accounts_failed:24001,wallet_tronlink_locked:24002,chainflip_channel_error:30001,chainflip_unknown_asset:30002,chainflip_broker_invalid_params:30101,chainflip_broker_recipient_error:30102,chainflip_broker_register:30103,chainflip_broker_tx_error:30104,chainflip_broker_withdraw:30105,chainflip_broker_fund_only_flip_supported:30106,chainflip_broker_fund_invalid_address:30107,thorchain_chain_halted:40001,thorchain_trading_halted:40002,thorchain_asset_is_not_tcy:40003,thorchain_swapin_router_required:40101,thorchain_swapin_vault_required:40102,thorchain_swapin_memo_required:40103,thorchain_swapin_token_required:40104,thorchain_preferred_asset_payout_required:40105,toolbox_cosmos_account_not_found:50101,toolbox_cosmos_invalid_fee:50102,toolbox_cosmos_invalid_params:50103,toolbox_cosmos_no_signer:50104,toolbox_cosmos_not_supported:50105,toolbox_cosmos_signer_not_defined:50106,toolbox_cosmos_validate_address_prefix_not_found:50107,toolbox_cosmos_verify_signature_no_pubkey:50108,toolbox_evm_error_estimating_gas_limit:50201,toolbox_evm_error_sending_transaction:50202,toolbox_evm_gas_estimation_error:50203,toolbox_evm_invalid_gas_asset_address:50204,toolbox_evm_invalid_params:50205,toolbox_evm_invalid_transaction:50206,toolbox_evm_no_abi_fragment:50207,toolbox_evm_no_contract_address:50208,toolbox_evm_no_fee_data:50209,toolbox_evm_no_from_address:50210,toolbox_evm_no_gas_price:50211,toolbox_evm_no_signer_address:50212,toolbox_evm_no_signer:50213,toolbox_evm_no_to_address:50214,toolbox_evm_not_supported:50215,toolbox_evm_provider_not_eip1193_compatible:50216,toolbox_evm_invalid_eip7702_authorization:50217,toolbox_utxo_api_error:50301,toolbox_utxo_broadcast_failed:50302,toolbox_utxo_insufficient_balance:50303,toolbox_utxo_invalid_address:50304,toolbox_utxo_invalid_params:50305,toolbox_utxo_invalid_transaction:50306,toolbox_utxo_no_signer:50307,toolbox_utxo_not_supported:50308,toolbox_utxo_tx_not_found:50309,toolbox_utxo_rbf_not_supported:50310,toolbox_utxo_tx_not_replaceable:50311,toolbox_utxo_tx_already_confirmed:50312,toolbox_utxo_rbf_fee_too_low:50313,toolbox_utxo_rbf_insufficient_change:50314,toolbox_solana_no_signer:50401,toolbox_substrate_not_supported:50501,toolbox_substrate_transfer_error:50502,toolbox_radix_method_not_supported:50601,toolbox_ripple_get_balance_error:50701,toolbox_ripple_rpc_not_configured:50702,toolbox_ripple_signer_not_found:50703,toolbox_ripple_asset_not_supported:50704,toolbox_ripple_broadcast_error:50705,toolbox_ripple_get_trust_lines_error:50706,toolbox_ripple_invalid_trust_line_limit:50707,toolbox_tron_no_signer:50801,toolbox_tron_invalid_token_identifier:50802,toolbox_tron_token_transfer_failed:50803,toolbox_tron_transaction_creation_failed:50804,toolbox_tron_trongrid_api_error:50805,toolbox_tron_approve_failed:50806,toolbox_tron_invalid_token_contract:50807,toolbox_tron_allowance_check_failed:50808,toolbox_cardano_sign_transaction_failed:50901,toolbox_near_no_signer:90601,toolbox_near_invalid_address:90602,toolbox_near_invalid_amount:90603,toolbox_near_transfer_failed:90604,toolbox_near_access_key_error:90605,toolbox_near_no_rpc_url:90606,toolbox_near_empty_batch:90607,toolbox_near_balance_failed:90608,toolbox_near_invalid_name:90609,toolbox_near_missing_contract_address:90610,toolbox_near_no_account:90611,toolbox_near_invalid_gas_params:90612,toolbox_near_no_public_key_found:90613,toolbox_sui_address_required:90701,toolbox_sui_keypair_required:90702,toolbox_sui_balance_error:90703,toolbox_sui_transaction_creation_error:90704,toolbox_sui_signing_error:90705,toolbox_sui_broadcast_error:90706,toolbox_sui_no_signer:90707,toolbox_sui_no_sender:90708,toolbox_sui_missing_coin_type:90709,toolbox_sui_no_coins_found:90710,toolbox_sui_insufficient_balance:90711,toolbox_starknet_no_signer:90801,toolbox_starknet_invalid_address:90802,toolbox_starknet_fee_estimation_failed:90803,toolbox_starknet_account_not_deployed:90804,toolbox_starknet_transaction_failed:90805,toolbox_ton_no_signer:90901,toolbox_ton_invalid_address:90902,toolbox_ton_missing_jetton_address:90903,toolbox_ton_jetton_transfer_failed:90904,toolbox_ton_transaction_failed:90905,toolbox_aptos_address_required:91001,toolbox_aptos_keypair_required:91002,toolbox_aptos_balance_error:91003,toolbox_aptos_transaction_creation_error:91004,toolbox_aptos_signing_error:91005,toolbox_aptos_broadcast_error:91006,toolbox_aptos_no_signer:91007,toolbox_aptos_no_sender:91008,toolbox_aptos_missing_asset_type:91009,toolbox_aptos_insufficient_balance:91010,toolbox_stellar_no_signer:91101,toolbox_stellar_broadcast_error:91102,toolbox_stellar_invalid_address:91103,toolbox_stellar_account_not_found:91104,toolbox_stellar_transaction_failed:91105,toolbox_stellar_balance_error:91106,toolbox_not_supported:59901,toolbox_fee_estimation_failed:59902,plugin_near_invalid_name:41001,plugin_near_no_connection:41002,plugin_near_name_unavailable:41003,plugin_near_registration_failed:41004,plugin_near_transfer_failed:41005,plugin_garden_missing_data:42001,plugin_swapkit_swap_invalid_data:43001,plugin_swapkit_invalid_transaction:43002,api_v2_invalid_response:60001,api_v2_server_error:60002,api_v2_invalid_method_key_hash:60003,helpers_invalid_number_different_decimals:70001,helpers_invalid_number_of_years:70002,helpers_invalid_identifier:70003,helpers_invalid_asset_url:70004,helpers_invalid_asset_identifier:70005,helpers_invalid_memo_type:70006,helpers_failed_to_switch_network:70007,helpers_not_found_provider:70008,helpers_chain_not_supported:70009,helpers_invalid_params:70010,helpers_invalid_response:70011,helpers_chain_no_public_or_set_rpc_url:70012,helpers_chain_rpc_connection_failed:70013,not_implemented:99999};function ZN(N){return JSON.stringify(N,(A,T)=>typeof T==="bigint"?T.toString():T)}class D extends Error{static ErrorCode=FT;constructor(N,A){let T=typeof N==="string",H=T?N:N.errorKey,P=T?void 0:N.info,F=`${H}${P?`: ${ZN(P)}`:""}`;super(F);if(Object.setPrototypeOf(this,D.prototype),this.name="SwapKitError",this.cause=A,A){let I=A instanceof Error?`${A.message}${A.cause?` (${A.cause})`:""}`:ZN(A);console.error(`SwapKitError [${H}]: ${I}`)}else if(P)console.error(`SwapKitError [${H}]: ${ZN(P)}`)}}var IT=(N)=>new Promise((A)=>setTimeout(A,N)),nT=(N,{baseDelay:A,backoffMultiplier:T,maxDelay:H})=>Math.min(A*T**N,H);function OT(N,A){if(N instanceof Error&&N.name==="AbortError")return!0;if(N instanceof TypeError)return!0;if(A===429)return!0;if(A&&A>=500&&A<600)return!0;return!1}var BT=async(N,A)=>{let T=await fetch(N,A),H;try{H=await T.json()}catch{if(!T.ok)throw new D({errorKey:"helpers_invalid_response",info:{status:T.status,statusText:T.statusText}},{status:T.status,statusText:T.statusText});return{}}if(!T.ok){let F={data:H?.data,error:H?.error,message:H?.message,status:T.status};throw new D({errorKey:H?.error||"helpers_invalid_response",info:F},F)}let P=H?.routes?.length||H?.result||H?.data&&!H?.error;if(H?.error&&!P){let F={data:H.data,error:H.error,message:H.message,status:T.status};throw new D({errorKey:H.error,info:F},F)}if(H?.providerErrors?.length||H?.error&&P)console.warn("[SwapKit] Partial errors in response:",H.providerErrors||H.error);return H};function _N(N,A={}){return async function(H,P={}){let{searchParams:F,json:I,body:O,headers:G,dynamicHeader:M,retry:b,timeoutMs:Y,abortController:W,onError:S,onSuccess:K,responseHandler:w,...z}={...A,...P},x=E.get("requestOptions"),r={...x.retry,...b},gN=!!I||H.endsWith(".json"),GN=gT(H,F),CN=M?await M():{},LN=$T(gN,{...G,...CN}),l=gN?JSON.stringify(I):O,bN;for(let tN=0;tN<=r.maxRetries;tN++){let dN=W||new AbortController,hN=setTimeout(()=>dN.abort(),Y||x.timeoutMs);try{let p=await BT(GN,{...z,body:l,headers:LN,method:N,signal:dN.signal});return clearTimeout(hN),K?.(p)||w?.(p)||p}catch(p){clearTimeout(hN),bN=p;let cA=p?.cause?.status;if(tN>=r.maxRetries||!OT(p,cA))return S?S(p):Promise.reject(p);await IT(nT(tN,r))}}return S?S(bN):Promise.reject(bN)}}function $T(N,A){return{...A,...N&&{"Content-Type":"application/json"}}}function gT(N,A){let T=new URL(N);if(A)T.search=new URLSearchParams(A).toString();return T.toString()}var g={extend:(N)=>({extend:(A)=>g.extend({...N,...A}),get:_N("GET",N),post:_N("POST",N)}),get:_N("GET"),post:_N("POST")};import{Chain as Z,CosmosChains as GT,EVMChains as tT,StagenetChains as _T,UTXOChains as DT}from"@swapkit/types";import{match as aN}from"ts-pattern";import{Chain as jN}from"@swapkit/types";function sP(N){if(N<0)throw new D({errorKey:"helpers_invalid_number_of_years",info:{numberOfYears:N}});return 10+N}function eP(N){if(N<0)throw new D({errorKey:"helpers_invalid_number_of_years",info:{numberOfYears:N}});return Math.round((10+N*1.0512)*10000000000)/10000000000}function aP(N,A){try{return N()}catch(T){if(A)throw new D(A,T);return}}function NL(N){switch(N){case jN.THORChain:return`${N}.RUNE`;case jN.Cosmos:return`${N}.ATOM`;case jN.BinanceSmartChain:return`${N}`;default:return`${N}.${N}`}}var sN=new Set;function i({condition:N,id:A,warning:T}){if(N){if(sN.has(A))return;console.warn(T),sN.add(A)}}function YT(N){return aN(N).with(...tT,()=>({id:1,jsonrpc:"2.0",method:"eth_blockNumber",params:[]})).with(...DT,()=>({id:"test",jsonrpc:"1.0",method:"getblockchaininfo",params:[]})).with(...GT,..._T,()=>({id:1,jsonrpc:"2.0",method:"status",params:{}})).with(Z.Polkadot,Z.Chainflip,()=>({id:1,jsonrpc:"2.0",method:"system_health",params:[]})).with(Z.Solana,()=>({id:1,jsonrpc:"2.0",method:"getHealth"})).with(Z.Sui,()=>({id:1,jsonrpc:"2.0",method:"sui_getSystemState",params:[]})).with(Z.Ton,()=>({id:1,jsonrpc:"2.0",method:"getAddressInformation",params:{address:""}})).with(Z.Aptos,Z.Tron,Z.Radix,Z.Stellar,()=>"").with(Z.Near,()=>({id:"dontcare",jsonrpc:"2.0",method:"status",params:[]})).with(Z.Ripple,()=>({id:1,jsonrpc:"2.0",method:"ping",params:[{}]})).with(Z.Starknet,()=>({id:1,jsonrpc:"2.0",method:"starknet_chainId",params:[]})).otherwise(()=>{throw new D("helpers_chain_not_supported",{chain:N})})}function UT(N){return aN(N).with(Z.Aptos,()=>"/-/healthy").with(Z.Radix,()=>"/status/network-configuration").with(Z.Stellar,()=>"").with(Z.Tron,()=>"/wallet/getnowblock").otherwise(()=>"")}async function eN(N,A){try{let T=A.startsWith("wss")?A.replace("wss","https"):A;return(await fetch(`${T}${UT(N)}`,{body:JSON.stringify(YT(N)),cache:"no-store",headers:{"Content-Type":"application/json"},method:"POST",signal:AbortSignal.timeout(3000)})).ok}catch{return!1}}var vN=new Map,MT=120000;function ST(N){let[A=""]=E.get("rpcUrls")[N];if(!A)throw i({condition:!0,id:"helpers_chain_no_public_or_set_rpc_url",warning:`No public or set RPC URL found for chain. Please ensure you configured rpcUrls for ${N}.`}),new D("helpers_chain_no_public_or_set_rpc_url",{chain:N});let T=vN.get(N);if(T&&Date.now()-T.timestamp<MT)return T.url;return vN.set(N,{timestamp:Date.now(),url:A}),A}async function s(N){let A=ST(N),[,...T]=E.get("rpcUrls")[N];if(await eN(N,A))return A;for(let P of T)if(await eN(N,P))return vN.set(N,{timestamp:Date.now(),url:P}),P;throw new D("helpers_chain_rpc_connection_failed",{chain:N,fallbackUrls:T,primaryRpcUrl:A})}function uL(N){i({condition:!0,id:"initializeRPCUrlsWithFallback",warning:"initializeRPCUrlsWithFallback is deprecated. Use static { rpcUrls, fallbackRpcUrls } SwapKit init config or dynamic SKConfig.setRpcUrl/setFallbackRpcUrl to configure RPC endpoints."})}var $L=[`${n.Maya}.MAYA`,`${n.Maya}.CACAO`,`${n.Ethereum}.THOR`,`${n.Ethereum}.vTHOR`,`${n.Kujira}.USK`,`${n.Ethereum}.FLIP`,`${n.Radix}.XRD`],TA=[n.Arbitrum,n.Aurora,n.Base,n.Ethereum,n.Optimism];async function xT(N){let{baseDecimal:A}=C(n.Radix);try{let T=await s(n.Radix),{manager:H}=await g.post(`${T}/state/resource`,{body:JSON.stringify({network:"mainnet",resource_address:N}),headers:{Accept:"*/*","Content-Type":"application/json"}});return H?.divisibility?.value?.divisibility}catch(T){let H=T instanceof Error?T.message:String(T);return console.warn(`Failed to fetch Radix asset decimals for ${N}: ${H}`),A}}async function ET(N){try{let A=await s(n.Radix);return(await g.post(`${A}/state/entity/details`,{body:JSON.stringify({addresses:[N],opt_ins:{explicit_metadata:["symbol"]}}),headers:{Accept:"*/*","Content-Type":"application/json"}})).items[0]?.explicit_metadata?.items.find((P)=>P.key==="symbol")?.value.typed.value||void 0}catch(A){let T=A instanceof Error?A.message:String(A);return console.warn(`Failed to fetch Radix asset symbol for ${N}: ${T}`),""}}async function HA({chain:N,address:A,methodHex:T,id:H}){let P=await s(N);return g.post(P,{body:JSON.stringify({id:H,jsonrpc:"2.0",method:"eth_call",params:[{data:T,to:A.toLowerCase()},"latest"]}),headers:{accept:"*/*","cache-control":"no-cache","content-type":"application/json"}})}async function bT(N){if(!N||N==="0x")return"UNKNOWN";try{let{AbiCoder:A}=await import("ethers");return A.defaultAbiCoder().decode(["string"],N)[0].trim()}catch(A){return console.warn(`Failed to decode ABI string from ${N}: ${A}`),"UNKNOWN"}}function wT(N,A){if(!N||N==="0x")return A;try{return Number(N)}catch(T){return console.warn(`Failed to decode ABI uint8 from ${N}: ${T}`),A}}async function zT({chain:N,address:A}){let{baseDecimal:T}=C(N),H=A.toLowerCase();if(A===""||!H.startsWith("0x"))return T;let P=await HA({address:A,chain:N,id:2,methodHex:"0x313ce567"}).catch((I)=>{return console.warn(`Could not fetch decimals for ${A} on ${N}: ${I.message}`),{result:""}});return wT(P.result,T)}async function JT({chain:N,address:A}){let T=A.toLowerCase();if(T===""||!T.startsWith("0x"))return;let H=await HA({address:A,chain:N,id:1,methodHex:"0x95d89b41"}).catch((F)=>{return console.warn(`Could not fetch symbol for ${A} on ${N}: ${F.message}`),{result:""}});return await bT(H.result)}async function NA({rpcUrl:N,contractAddress:A,functionSelector:T}){return(await g.post(`${N}/wallet/triggerconstantcontract`,{body:JSON.stringify({contract_address:A,function_selector:T,owner_address:A,parameter:"",visible:!0}),headers:{accept:"application/json","content-type":"application/json"}}).catch(()=>{return}))?.constant_result?.[0]}function AA(N){let A=N.match(/.{2}/g)?.map((T)=>Number.parseInt(T,16))??[];return new TextDecoder().decode(new Uint8Array(A))}function ZT(N){return FN(N).with(void 0,()=>{return}).when((A)=>A.length>=128,(A)=>{let T=Number.parseInt(A.slice(64,128),16);return AA(A.slice(128,128+T*2))}).when((A)=>A.length===64,(A)=>{let T=A.replace(/0+$/,"");if(T.length>0&&T.length%2===0)return AA(T);return}).otherwise(()=>{return})}function PA({chain:N,address:A}){let{baseDecimal:T}=C(N),H={decimals:T,ticker:void 0};return FN(N).with(...XT,async()=>{try{let{isAddress:P,getAddress:F}=await import("ethers");if(!P(F(A.replace(/^0X/,"0x"))))return H;let[I,O]=await Promise.all([JT({address:A,chain:N}),zT({address:A,chain:N})]);return{decimals:O,ticker:I}}catch(P){return console.warn(`Failed to fetch token info for ${A} on ${N}: ${P?.code} ${P?.message}`),H}}).with(n.Solana,async()=>{if(!A)return H;try{let P=await fetch(`https://lite-api.jup.ag/tokens/v2/search?query=${A}`);if(P.ok){let F=await P.json(),I=Array.isArray(F)?F[0]:F;if(I)return{decimals:I.decimals??T,ticker:I.symbol||void 0}}}catch(P){console.warn(`Failed to fetch Solana token info for ${A}: ${P?.code} ${P?.message}`)}return H}).with(n.Tron,async()=>{if(!A)return H;try{let P=await s(n.Tron),[F,I]=await Promise.all([NA({contractAddress:A,functionSelector:"symbol()",rpcUrl:P}),NA({contractAddress:A,functionSelector:"decimals()",rpcUrl:P})]),O=ZT(F);return{decimals:F!==void 0&&I?Number(BigInt(`0x${I}`)):T,ticker:O}}catch(P){let F=P instanceof Error?P.message:String(P);return console.warn(`Failed to fetch Tron token info for ${A}: ${F}`),H}}).with(n.Near,async()=>{if(!A)return H;try{let{JsonRpcProvider:P}=await import("@near-js/providers"),F=await s(n.Near),O=await new P({url:F}).query({account_id:A,args_base64:Buffer.from("{}").toString("base64"),finality:"final",method_name:"ft_metadata",request_type:"call_function"}),G=JSON.parse(Buffer.from(O.result).toString());return{decimals:G?.decimals||T,ticker:G?.symbol}}catch(P){let F=P instanceof Error?P.message:String(P);return console.warn(`Failed to fetch Near token info for ${A}: ${F}`),H}}).with(n.Radix,async()=>{if(!A)return H;try{let[P,F]=await Promise.all([ET(A),xT(A)]);return{decimals:F,ticker:P}}catch(P){let F=P instanceof Error?P.message:String(P);return console.warn(`Failed to fetch Radix token info for ${A}: ${F}`),H}}).otherwise(async()=>H)}function DN({chain:N,symbol:A}){return FN(N).with(...TA,()=>A==="ETH").with(n.Avalanche,()=>A==="AVAX").with(n.Berachain,()=>A==="BERA").with(n.Hyperevm,()=>A==="HYPE").with(n.BinanceSmartChain,()=>A==="BNB").with(n.Gnosis,()=>A==="xDAI"||A==="XDAI").with(n.Monad,()=>A==="MON").with(n.XLayer,()=>A==="OKB").with(n.Maya,()=>A==="CACAO").with(n.Cosmos,()=>A==="ATOM").with(n.THORChain,()=>A==="RUNE").with(n.Tron,()=>A==="TRX").with(n.Ripple,()=>A==="XRP").with(n.Radix,()=>`${N}.${A}`===YN(N).identifier).otherwise(()=>A===N)}var YN=(N)=>{let{baseDecimal:A}=C(N);return FN(N.toUpperCase()).with(...TA,(H)=>({decimal:A,identifier:`${H}.ETH`})).with(n.THORChain,(H)=>({decimal:A,identifier:`${H}.RUNE`})).with(n.Cosmos,(H)=>({decimal:A,identifier:`${H}.ATOM`})).with(n.Maya,(H)=>({decimal:10,identifier:`${H}.CACAO`})).with(n.BinanceSmartChain,(H)=>({decimal:A,identifier:`${H}.BNB`})).with(n.Monad,(H)=>({decimal:A,identifier:`${H}.MON`})).with(n.Avalanche,(H)=>({decimal:A,identifier:`${H}.AVAX`})).with(n.Gnosis,(H)=>({decimal:A,identifier:`${H}.xDAI`})).with(n.XLayer,(H)=>({decimal:A,identifier:`${H}.OKB`})).with(n.Berachain,(H)=>({decimal:A,identifier:`${H}.BERA`})).with(n.Hyperevm,(H)=>({decimal:A,identifier:`${H}.HYPE`})).with(n.Tron,(H)=>({decimal:A,identifier:`${H}.TRX`})).with(n.Solana,n.Chainflip,n.Kujira,n.Ripple,n.Polkadot,n.Near,...QT,(H)=>({decimal:A,identifier:`${H}.${H}`})).with(n.Radix,"XRD.XRD",()=>({decimal:A,identifier:"XRD.XRD"})).with(n.Polygon,"POL.POL",()=>({decimal:A,identifier:"POL.POL"})).with("KUJI.USK",(H)=>({decimal:6,identifier:H})).with("ETH.FLIP",()=>({decimal:C(n.Ethereum).baseDecimal,identifier:"ETH.FLIP-0x826180541412D574cf1336d22c0C0a287822678A"})).with("ETH.THOR",()=>({decimal:C(n.Ethereum).baseDecimal,identifier:"ETH.THOR-0xa5f2211b9b8170f694421f2046281775e8468044"})).with("ETH.vTHOR",()=>({decimal:C(n.Ethereum).baseDecimal,identifier:"ETH.vTHOR-0x815c23eca83261b6ec689b60cc4a58b54bc24d8d"})).with("MAYA.CACAO",(H)=>({decimal:10,identifier:H})).with("MAYA.MAYA",(H)=>({decimal:4,identifier:H})).otherwise(()=>({decimal:A,identifier:N}))};function VN({chain:N,symbol:A}){if(A.includes("/"))return"Synth";if(A.includes("~"))return"Trade";return FN(N).with(n.Radix,()=>A===n.Radix||`${N}.${A}`===YN(N).identifier).with(n.Arbitrum,n.Optimism,n.Base,n.Aurora,()=>A===n.Ethereum).with(n.Cosmos,()=>A==="ATOM").with(n.BinanceSmartChain,()=>A==="BNB").with(n.Maya,()=>A==="CACAO").with(n.Monad,()=>A==="MON").with(n.THORChain,()=>A==="RUNE").with(n.Tron,()=>A==="TRX").with(n.Hyperevm,()=>A==="HYPE").with(n.XLayer,()=>A==="OKB").otherwise(()=>A===N)?"Native":N}var d=(N)=>{let[A,...T]=N.split("."),H=N.includes("/"),P=T.join("."),F=P?.split("-"),I=F?.length?F.length===1?F[0]:F.slice(0,-1).join("-"):void 0;return{chain:A,symbol:P,synth:H,ticker:I}};function IN(N,A){let H=A===n.Near?N.indexOf("-"):N.lastIndexOf("-");if(H===-1)return{address:void 0,ticker:N};return{address:N.slice(H+1),ticker:N.slice(0,H)}}function gL(N){return`https://storage.googleapis.com/token-list-swapkit-dev/images/${N.toLowerCase()}.png`}async function GL(N){let{loadTokenLists:A}=await import("./tokens.js"),T=await A(),H=Object.values(T).flatMap((F)=>F.tokens);if("identifier"in N)return H.find((F)=>F.identifier===N.identifier)?.identifier;let P=N.contract.toLowerCase();for(let F of H){let{chain:I,symbol:O}=d(F.identifier);if(I!==N.chain)continue;let{address:G}=IN(O,I);if(G?.toLowerCase()===P)return F.identifier}return}var LA=["TERRA",...E.get("chains")];function RA(N=""){let A=N.toUpperCase(),[T]=A.split(".");if(LA.includes(T))return!0;let[H]=A.split("/");if(LA.includes(H))return!0;throw new D({errorKey:"helpers_invalid_identifier",info:{identifier:N,message:`Invalid identifier: ${N}. Expected format: <Chain>.<Ticker> or <Chain>.<Ticker>-<ContractAddress>`}})}function YL(N){if(N.length>30)return!1;let A=/^[a-zA-Z0-9+_-]+$/g;return!!N.match(A)}import{match as UN}from"ts-pattern";var e=8,jT=10;function c({value:N,bigIntDecimal:A=e,decimal:T=e}){if(T===0)return N.toString();let H=N<0n,P=N.toString().substring(H?1:0),F=T-(P.length-1);if(F>0)P="0".repeat(F)+P;let I=P.length-T,O=P.slice(-T);if(Number.parseInt(O[A]||"0",10)>=5){let M=Number.parseInt(O[A-1]||"0",10);O=`${O.substring(0,A-1)}${M+1}`}else O=O.substring(0,A);return`${H?"-":""}${P.slice(0,I)}.${O}`.replace(/\.?0*$/,"")}class y{decimalMultiplier=10n**8n;bigIntValue=0n;decimal;static fromBigInt(N,A){return new y({decimal:A,value:c({bigIntDecimal:A,decimal:A,value:N})})}static shiftDecimals({value:N,from:A,to:T}){return y.fromBigInt(N.getBaseValue("bigint")*h(T)/h(A),T)}constructor(N){let A=WN(N),T=typeof N==="object";this.decimal=T?N.decimal:void 0,this.decimalMultiplier=T&&"decimalMultiplier"in N?N.decimalMultiplier:h(Math.max(uA(MN(A)),this.decimal||0)),this.#P(A)}set(N){return new this.constructor({decimal:this.decimal,identifier:this.toString?.({includeSynthProtocol:!0}),value:N})}add(...N){return this.#A("add",...N)}sub(...N){return this.#A("sub",...N)}mul(...N){return this.#A("mul",...N)}div(...N){return this.#A("div",...N)}gt(N){return this.#N("gt",N)}gte(N){return this.#N("gte",N)}lt(N){return this.#N("lt",N)}lte(N){return this.#N("lte",N)}eqValue(N){return this.#N("eqValue",N)}getValue(N,A){let T=nN(this.decimalMultiplier),H=A!==void 0?A:this.decimal,P=H!==void 0?H:T;if(H!==void 0&&H<T){if(this.formatBigIntToSafeValue(this.bigIntValue,H)==="0"&&this.bigIntValue!==0n)P=T}let F=this.formatBigIntToSafeValue(this.bigIntValue,P);return UN(N).with("number",()=>Number(F)).with("string",()=>F).with("bigint",()=>{return this.bigIntValue*10n**BigInt(this.decimal||8n)/this.decimalMultiplier}).otherwise(()=>F)}getBaseValue(N,A){let T=this.decimalMultiplier/h(A||this.decimal||e),H=VT(this.bigIntValue,T);return UN(N).with("number",()=>Number(H)).with("string",()=>H.toString()).otherwise(()=>H)}getBigIntValue(N,A){if(!A&&typeof N==="object")return N.bigIntValue;let T=WN(N),H=MN(T);if(H==="0"||H==="undefined")return 0n;return this.#H(H,A)}toSignificant(N=6){let A=this.getValue("string"),[T="",H=""]=A.split("."),P=Number.parseInt(T,10)>0;if((P?T.length+H.length:H.length)<=N)return A;if(T.length>=N)return T.slice(0,N).padEnd(T.length,"0");if(P)return`${T}.${H.slice(0,N-T.length)}`;let I=Number.parseInt(H,10).toString(),O=I.slice(0,N),G=H.length-I.length;return`0.${O.padStart(G+O.length,"0")}`}toFixed(N=6){let A=this.getValue("string"),T=A.startsWith("-"),[H="0",P=""]=(T?A.slice(1):A).split("."),F=H==="0"&&Number.parseInt(P.slice(0,N),10)===0,I=T&&!F?"-":"";if(N===0){if(H==="0"&&!P)return"0";return P&&Number.parseInt(P[0]||"0",10)>=5?`${I}${BigInt(H)+1n}.0`:`${I}${H}.0`}if(!P)return`${I}${H}.${"0".repeat(N)}`;let O=P[N];if(!(O&&Number.parseInt(O,10)>=5))return`${I}${H}.${P.slice(0,N).padEnd(N,"0")}`;let M=BigInt(P.slice(0,N).padEnd(N,"0"))+1n,b=10n**BigInt(N);if(M>=b)return`${I}${BigInt(H)+1n}.${"0".repeat(N)}`;return`${I}${H}.${M.toString().padStart(N,"0")}`}toAbbreviation(N=2){let A=this.getValue("string"),T=Number(A),H=["","K","M","B","T","Q","Qi","S"],P=Math.floor(Math.log10(Math.abs(T))/3);if(P===0||!H[P])return A;return`${(T/10**(P*3)).toFixed(N)}${H[P]}`}toCurrency(N="$",{currencyPosition:A="start",decimal:T=2,decimalSeparator:H=".",thousandSeparator:P=",",trimTrailingZeros:F=!0}={}){let I=this.toFixed(T),O=A==="end",[G="0",M=""]=I.split("."),b=G.replace(/\B(?=(\d{3})+(?!\d))/g,P),Y=M&&Number.parseInt(M,10)>0,W=Y?`${b}${H}${M}`:b,K=W.length<100&&F&&Y?W.replace(/\.?0*$/,""):W;return O?`${K}${N}`:`${N}${K}`}formatBigIntToSafeValue(N,A){let T=A||this.decimal||e,H=Math.max(T,nN(this.decimalMultiplier));return c({bigIntDecimal:T,decimal:H,value:N})}#A(N,...A){let T=this.#T(this,...A),H=nN(this.decimalMultiplier),F=Math.max(T,H)+jT,I=h(F),O=A.reduce((M,b)=>{let Y=this.getBigIntValue(b,F);return UN(N).with("add",()=>M+Y).with("sub",()=>M-Y).with("mul",()=>M*Y/I).with("div",()=>{if(Y===0n)throw RangeError("Division by zero");return M*I/Y}).otherwise(()=>M)},this.bigIntValue*I/this.decimalMultiplier),G=c({bigIntDecimal:F,decimal:F,value:O});return new this.constructor({decimal:this.decimal,decimalMultiplier:h(F),identifier:this.toString(),value:G})}#N(N,...A){let T=this.#T(this,...A),H=this.getBigIntValue(A[0]||"0",T),P=this.getBigIntValue(this,T);return UN(N).with("gt",()=>P>H).with("gte",()=>P>=H).with("lt",()=>P<H).with("lte",()=>P<=H).with("eqValue",()=>P===H).otherwise(()=>!1)}#P(N){let A=MN(N)||"0";this.bigIntValue=this.#H(A)}#T(...N){let A=N.map((T)=>{return typeof T==="object"?T.decimal||nN(T.decimalMultiplier):uA(MN(T))}).filter(Boolean);return Math.max(...A,e)}#H(N,A){let T=A?h(A):this.decimalMultiplier,H=nN(T),[P="",F=""]=N.split(".");return BigInt(`${P}${F.padEnd(H,"0")}`)}}var vT=Intl.NumberFormat("fullwide",{maximumFractionDigits:20,useGrouping:!1});function MN(N){let T=`${typeof N==="number"?vT.format(N):WN(N)}`.replaceAll(",",".").split(".");return T.length>1?`${T.slice(0,-1).join("")}.${T.at(-1)}`:T[0]||"0"}function uA(N){let A=N.split(".")[1]?.length||0;return Math.max(A,e)}function WN(N){return typeof N==="object"?"getValue"in N?N.getValue("string"):N.value:N}function VT(N,A){if(A===0n)throw Error("Cannot divide by zero");let T=A/2n;return N>=0n&&A>=0n||N<0n&&A<0n?(N+T)/A:(N-T)/A}function h(N){return 10n**BigInt(N)}function nN(N){return Math.log10(Number.parseFloat(N.toString()))}var f=[Q.Solana,Q.Ton,Q.Tron,Q.Near,Q.Sui,Q.Ripple],kN=[Q.THORChain,Q.Maya],a=new Map,SN=new Map,NN=new Map,mT=3600000;function kT(N){let A=NN.get(N);if(A?.timestamp&&Date.now()-A.timestamp>mT){NN.delete(N);return}return A}function KT(N,A){if(NN.size>1000){let T=NN.keys().next().value;if(T)NN.delete(T)}NN.set(N,{...A,timestamp:Date.now()})}class m extends y{address;chain;isGasAsset=!1;isSynthetic=!1;isTradeAsset=!1;symbol;tax;ticker;type;chainId;constructor({value:N,decimal:A,tax:T,chain:H,symbol:P,identifier:F}){super(typeof N==="object"?N:{decimal:A,value:N});let I=IA(F||`${H}.${P}`);this.type=VN(I),this.tax=T,this.chain=I.chain,this.ticker=I.ticker,this.symbol=I.symbol,this.address=I.address,this.isSynthetic=I.isSynthetic,this.isTradeAsset=I.isTradeAsset,this.isGasAsset=I.isGasAsset,this.chainId=ON(I.chain).chainId}toString({includeSynthProtocol:N}={}){return(this.isSynthetic||this.isTradeAsset)&&!N?this.symbol:`${this.chain}.${this.symbol}`}toUrl(){if(this.isSynthetic)return`${this.chain}.${this.symbol.replace(/\//g,".")}`;if(this.isTradeAsset)return`${this.chain}.${this.symbol.replace(/~/g,"..")}`;let N=this.symbol.replace(/\./g,"__");return`${this.chain}.${N}`}getIconUrl(){return a.get(this.toString())?.logoURI}eqAsset({chain:N,symbol:A}){return this.chain===N&&this.symbol===A}eq(N){return this.eqAsset(N)&&this.eqValue(N)}static fromUrl(N,A=0){let T=N.indexOf(".");if(T===-1)throw new D({errorKey:"helpers_invalid_asset_url",info:{urlAsset:N}});let H=N.slice(0,T),P=N.slice(T+1),F=mN({chain:H,rest:P}).when(({rest:I})=>I.includes(".."),({chain:I,rest:O})=>`${I}.${O.replace(/\.\./g,"~")}`).when(({chain:I,rest:O})=>kN.includes(I)&&O.includes("."),({chain:I,rest:O})=>`${I}.${O.replace(/\./g,"/")}`).otherwise(({chain:I,rest:O})=>`${I}.${O.replace(/__/g,".")}`);return m.from({asset:F,value:A})}static from({value:N=0,fromBaseDecimal:A,asyncTokenLookup:T,...H}){let P=N instanceof y?N.getValue("string"):N,F=fT(H),I=!F.startsWith(Q.Sui)&&F.includes(":");if(T&&I){let[LN,l]=F.split(":");return pT({address:l,chain:LN,fromBaseDecimal:A,parsedValue:P})}let O=I?F.split(":").join(".UNKNOWN-"):F,{identifier:G,decimal:M}=YN(O),{chain:b,isSynthetic:Y,isTradeAsset:W,address:S}=IA(G),{baseDecimal:K}=ON(b),w=a.get(f.includes(b)?G:G.toUpperCase());if(!w&&T&&!Y&&!W)return(async()=>{let{ticker:LN}=d(G),l=await nA({address:S,chain:b,ticker:LN});return qN({decimal:l.decimals,identifier:l.identifier,value:A?AN(BigInt(P),A):P})})();let z=w?.decimal||M;i({condition:!z&&!T,id:`assetValue_static_decimal_not_found_${b}`,warning:`Couldn't find static decimal for one or more tokens on ${b} (Using default ${K} decimal as fallback).
2
- This can result in incorrect calculations and mess with amount sent on transactions.
3
- You can load static assets by installing @swapkit/tokens package and calling AssetValue.loadStaticAssets()
4
- or by passing asyncTokenLookup: true to the from() function, which will make it async and return a promise.`});let{decimal:x,identifier:r,tax:gN}=w||{decimal:z||K,identifier:G},GN=A?AN(BigInt(P),A):AN(P,x);return Y||W?oT(r,GN):qN({decimal:x,identifier:r,tax:gN,value:GN})}static async loadStaticAssets(N){let{loadTokenLists:A}=await import("@swapkit/tokens"),T=await A(N);for(let{tokens:H}of Object.values(T))for(let P of H){let{identifier:F}=P,{chain:I,symbol:O}=d(F),{address:G}=IN(O,I),{baseDecimal:M}=ON(I),b=f.includes(I)?F:F.toUpperCase(),Y="decimals"in P&&P.decimals!==void 0?P.decimals:M,W="logoURI"in P&&P.logoURI?P.logoURI:`https://storage.googleapis.com/token-list-swapkit-dev/images/${F.toLowerCase()}.png`,S={decimal:Y,identifier:F,logoURI:W,tax:"tax"in P?P.tax:void 0};if(a.set(b,S),G){let K=f.includes(I)?`${I}:${G}`:`${I}:${G.toUpperCase()}`;SN.set(K,F)}}return!0}static setStaticAssets(N){a.clear(),SN.clear();for(let[A,T]of N.entries()){let{identifier:H}=T,{chain:P,symbol:F}=d(H),{address:I}=IN(F,P),{baseDecimal:O}=ON(P),G=T.chain??P,M=T.address??I,b=f.includes(G)?H:H.toUpperCase(),Y=T.decimals??T.decimal??O,W=T.logoURI??`https://storage.googleapis.com/token-list-swapkit-dev/images/${H.toLowerCase()}.png`,S={decimal:Y,identifier:b,logoURI:W,tax:T.tax};if(a.set(b,S),M){let K=f.includes(G)?`${G}:${M}`:`${G}:${M.toUpperCase()}`;SN.set(K,H)}}return!0}static get staticAssets(){return a}}function ZL(N){let A=m.from({chain:N});return mN(N).with(Q.Bitcoin,Q.Litecoin,Q.BitcoinCash,Q.Dash,()=>A.set(0.00010001)).with(Q.Dogecoin,()=>A.set(1.00000001)).with(Q.Avalanche,Q.Ethereum,Q.Arbitrum,Q.BinanceSmartChain,()=>A.set(0.00000001)).with(Q.THORChain,Q.Maya,()=>A.set(0)).with(Q.Cosmos,Q.Kujira,()=>A.set(0.000001)).otherwise(()=>A.set(0.00000001))}async function nA({chain:N,address:A,ticker:T}){let P=f.includes(N)?`${N}:${A||T}`:`${N}:${A||T}`.toUpperCase(),F=kT(P);if(F)return F;if(!A){let{baseDecimal:G}=ON(N);return{decimals:G,identifier:`${N}.${T||"UNKNOWN"}`}}let I=await PA({address:A,chain:N}),O=`${N}.${I.ticker||T||"UNKNOWN"}-${A}`;return i({condition:!!(!I.ticker&&T),id:`async_token_lookup_failed_${N}_${A}`,warning:`Could not fetch token metadata for ${N}:${A} from chain. Using user-provided ticker (${T}) with baseDecimal (${I.decimals}).`}),I.ticker&&KT(P,{decimals:I.decimals,identifier:O}),{decimals:I.decimals,identifier:O}}function qN({identifier:N,decimal:A,value:T,tax:H}){return RA(N),new m({decimal:A,identifier:N,tax:H,value:AN(T,A)})}function oT(N,A=0){let T=N.includes(".")?N.split(".")?.[0]?.toUpperCase():void 0,H=T?kN.includes(T):!1,P=N.slice(0,14).includes("~")?"~":"/",[F,I]=H?N.split(".").slice(1).join().split(P):N.split(P);if(!(F&&I))throw new D({errorKey:"helpers_invalid_asset_identifier",info:{identifier:N}});return new m({decimal:8,identifier:`${T||Q.THORChain}.${F}${P}${I}`,value:AN(A,8)})}async function pT({address:N,chain:A,fromBaseDecimal:T,parsedValue:H}){let{decimals:P,identifier:F}=await nA({address:N,chain:A}),I=T?AN(BigInt(H),T):H;return qN({decimal:P,identifier:F,value:I})}function AN(N,A){return typeof N==="bigint"?c({bigIntDecimal:A,decimal:A,value:N}):N}function yT(N){let A=mN(N).when((T)=>("chain"in T)&&T.chain!==void 0,({chain:T})=>T).otherwise((T)=>{let H=d(T.asset);return H.synth?Q.THORChain:H.chain});if(!WT.includes(A.toUpperCase()))throw new D({errorKey:"helpers_invalid_asset_identifier",info:{message:"Please use the AssetValue constructor for unsupported chains"}})}function fT(N){if(yT(N),"chain"in N){let{chain:P,address:F}=N;if(F){let I=f.includes(P)?`${P}:${F}`:`${P}:${F.toUpperCase()}`,O=SN.get(I);if(O)return O;return I}return P}let{chain:A,symbol:T}=d(N.asset);return VN({chain:A,symbol:T})==="Native"?A:N.asset}function CT(N,A,T){let H=N.split("."),P=H[0]?.toUpperCase(),F=kN.includes(P),I=T?"~":"/",[O,G=""]=F?H.slice(1).join(".").split(I):N.split(I);if(!(O&&G))throw new D({errorKey:"helpers_invalid_asset_identifier",info:{identifier:N}});let{ticker:M,address:b}=OA({chain:O,symbol:G}),Y=`${O}${I}${G}`;return{address:b,chain:P,isGasAsset:!1,isSynthetic:A,isTradeAsset:T,symbol:Y,ticker:M}}function dT(N){let A=N.indexOf("."),T=(A===-1?N:N.slice(0,A)).toUpperCase(),H=A===-1?N:N.slice(A+1),{address:P,ticker:F}=OA({chain:T,symbol:H}),I;try{I=P&&qT.includes(T)&&FA(P)?FA(P):P}catch{I=P}let O=I?`${F}-${I}`:H;return{address:I,chain:T,isGasAsset:DN({chain:T,symbol:H}),isSynthetic:!1,isTradeAsset:!1,symbol:O,ticker:F}}function IA(N){let A=N.slice(0,14),T=A.includes("/"),H=A.includes("~");if(T||H)return CT(N,T,H);return dT(N)}function OA({symbol:N,chain:A}){let{ticker:T,address:H}=IN(N,A);return{address:H&&!f.includes(A)?H.toLowerCase():H,ticker:T}}class XN extends y{eq(N){return this.eqValue(N)}static fromBigInt(N,A){return new XN({decimal:A,value:c({bigIntDecimal:A,decimal:A,value:N})})}}function BA(N=!0){return N?"https://midgard.ninerealms.com":"https://midgard.mayachain.info"}function cT(N=!0){let A=BA(N);return N?`${A}/v2/thorname`:`${A}/v2/mayaname`}function rT(N){return function(T){let H=T?`?status=${T}`:"";return g.get(`${N}/v2/pools${H}`)}}function lT(N){return function(T){return g.get(`${N}/v2/pool/${T}`)}}function iT(N){return function(T,H){let P=H?`?period=${H}`:"";return g.get(`${N}/v2/pool/${T}/stats${P}`)}}function sT(N){return function(T,H){let P=new URLSearchParams;if(H?.interval)P.append("interval",H.interval);if(H?.count)P.append("count",H.count.toString());if(H?.from)P.append("from",H.from.toString());if(H?.to)P.append("to",H.to.toString());let F=P.toString()?`?${P.toString()}`:"";return g.get(`${N}/v2/history/depths/${T}${F}`)}}function eT(N){return function(){return g.get(`${N}/v2/network`)}}function aT(N){return function(){return g.get(`${N}/v2/health`)}}function NH(N){return function(){return g.get(`${N}/v2/nodes`)}}function AH(N){return function(T){return g.get(`${N}/v2/node/${T}`)}}function TH(N){return function(){return g.get(`${N}/v2/mimir/votes`)}}function HH(N){return function(){return g.get(`${N}/v2/mimir`)}}function PH(N){return function(){return g.get(`${N}/v2/constants`)}}function LH(N){return function(){return g.get(`${N}/v2/stats`)}}function RH(N){return function(T){let H=new URLSearchParams;if(T?.interval)H.append("interval",T.interval);if(T?.count)H.append("count",T.count.toString());if(T?.from)H.append("from",T.from.toString());if(T?.to)H.append("to",T.to.toString());let P=H.toString()?`?${H.toString()}`:"";return g.get(`${N}/v2/history/earnings${P}`)}}function uH(N){return function(T,H){let P=new URLSearchParams;if(H?.interval)P.append("interval",H.interval);if(H?.count)P.append("count",H.count.toString());if(H?.from)P.append("from",H.from.toString());if(H?.to)P.append("to",H.to.toString());let F=P.toString()?`?${P.toString()}`:"",I=T?`/swaps/${T}`:"/swaps";return g.get(`${N}/v2/history${I}${F}`)}}function FH(N){return function(T){let H=new URLSearchParams;if(T?.interval)H.append("interval",T.interval);if(T?.count)H.append("count",T.count.toString());if(T?.from)H.append("from",T.from.toString());if(T?.to)H.append("to",T.to.toString());let P=H.toString()?`?${H.toString()}`:"";return g.get(`${N}/v2/history/tvl${P}`)}}function IH(N){if(!N)return"";let A=new URLSearchParams,T=(H,P)=>{if(P!==void 0)A.append(H,typeof P==="number"?P.toString():P)};return T("address",N.address),T("txid",N.txid),T("asset",N.asset),T("type",N.type),T("affiliate",N.affiliate),T("limit",N.limit),T("offset",N.offset),A.toString()?`?${A.toString()}`:""}function nH(N){return function(T){let H=IH(T);return g.get(`${N}/v2/actions${H}`)}}function OH(N){return function(T){return g.get(`${N}/v2/member/${T}`)}}function BH(N){return function(T){let H=T?`/${T}`:"";return g.get(`${N}/v2/members${H}`)}}function $H(N){return function(T,H){let P=H?`&asset=${H}`:"";return g.get(`${N}/v2/saver/${T}${P?`?${P.substring(1)}`:""}`)}}function gH(N){return function(T){return g.get(`${N}/v2/savers/${T}`)}}function GH(N){return function(T,H){let P=new URLSearchParams;if(H?.interval)P.append("interval",H.interval);if(H?.count)P.append("count",H.count.toString());if(H?.from)P.append("from",H.from.toString());if(H?.to)P.append("to",H.to.toString());let F=P.toString()?`?${P.toString()}`:"",I=T?`/savers/${T}`:"/savers";return g.get(`${N}/v2/history${I}${F}`)}}function tH(N){return function(T){return g.get(`${N}/v2/balance/${T}`)}}function _H(N){return async function(T){let H=(P)=>{if(P?.cause?.status===404)return;throw P};return await g.get(`${N}/lookup/${T}`,{onError:H,retry:{maxRetries:1}})}}function DH(N){return async function(T){let H=(P)=>{if(P?.cause?.status===404)return[];throw P};return await g.get(`${N}/rlookup/${T}`,{onError:H,retry:{maxRetries:1}})}}function YH(N){return async function(T){let H=(P)=>{if(P?.cause?.status===404)return[];throw P};return await g.get(`${N}/owner/${T}`,{onError:H,retry:{maxRetries:1}})}}function TN({asset:N,value:A}){return m.from({asset:N,fromBaseDecimal:hT(QN.THORChain).baseDecimal,value:A})}function UH({liquidityPositionGetter:N,isThorchain:A}){return async function(H){let P=await N(H),F=A?"rune":"cacao";return P.pools.map((I)=>({[`${F}Pending`]:TN({asset:"THOR.RUNE",value:I.runePending}),[`${F}RegisteredAddress`]:I.runeAddress,[`${F}Withdrawn`]:TN({asset:"THOR.RUNE",value:I.runeWithdrawn}),[F]:TN({asset:"THOR.RUNE",value:I.runeAdded}),asset:TN({asset:I.pool,value:I.assetAdded}),assetPending:TN({asset:I.pool,value:I.assetPending}),assetRegisteredAddress:I.assetAddress,assetWithdrawn:TN({asset:I.pool,value:I.assetWithdrawn}),dateFirstAdded:I.dateFirstAdded,dateLastAdded:I.dateLastAdded,poolShare:new XN(I.liquidityUnits).div(I.pool)}))}}function $A(N){let A=N===QN.THORChain,T=BA(A),H=cT(A),P=OH(T);return{getActions:nH(T),getBalance:tH(T),getConstants:PH(T),getEarningsHistory:RH(T),getHealth:aT(T),getLiquidityPosition:UH({isThorchain:A,liquidityPositionGetter:P}),getLiquidityPositionRaw:P,getMembers:BH(T),getMimir:HH(T),getMimirVotes:TH(T),getNameDetails:_H(H),getNamesByAddress:DH(H),getNamesByOwner:YH(H),getNetworkInfo:eT(T),getNode:AH(T),getNodes:NH(T),getPool:lT(T),getPoolDepthHistory:sT(T),getPoolStats:iT(T),getPools:rT(T),getSaverDetails:$H(T),getSavers:gH(T),getSaversHistory:GH(T),getStats:LH(T),getSwapHistory:uH(T),getTVLHistory:FH(T)}}var gA=$A(QN.THORChain),GA=$A(QN.Maya);var yN={};cN(yN,{getTrackerDetails:()=>rH,getTokenListProviders:()=>aH,getTokenList:()=>NP,getTokenApproval:()=>eH,getSwapTo:()=>FP,getSwapQuote:()=>lH,getRouteWithTx:()=>iH,getPrice:()=>AP,getNearDepositChannel:()=>PP,getGasRate:()=>TP,getChainflipDepositChannel:()=>HP,getChainBalance:()=>sH,SKRequestClient:()=>V});import{EVMChains as hH}from"@swapkit/types";import{match as cH,P as $N}from"ts-pattern";async function tA(N,A,T){let H=`${A}:${T}`,P=new TextEncoder,F=await crypto.subtle.importKey("raw",P.encode(N),{hash:"SHA-256",name:"HMAC"},!1,["sign"]),I=await crypto.subtle.sign("HMAC",F,P.encode(H));return Array.from(new Uint8Array(I)).map((O)=>O.toString(16).padStart(2,"0")).join("")}import{Chain as xN,ChainId as BN}from"@swapkit/types";import{array as X,boolean as o,coerce as UA,number as t,object as $,optional as B,string as R,union as KN,unknown as MA,z as L}from"zod/v4";var SA;((H)=>{H.CHEAPEST="CHEAPEST";H.FASTEST="FASTEST";H.RECOMMENDED="RECOMMENDED"})(SA||={});var EN;((P)=>{P.PSBT="PSBT";P.EVM="EVM";P.COSMOS="COSMOS";P.RADIX="RADIX"})(EN||={});var XA;((z)=>{z.approve="approve";z.claim="claim";z.deposit="deposit";z.donate="donate";z.lending="lending";z.lp_action="lp_action";z.native_contract_call="native_contract_call";z.native_send="native_send";z.stake="stake";z.streaming_swap="streaming_swap";z.swap="swap";z.thorname_action="thorname_action";z.token_contract_call="token_contract_call";z.token_transfer="token_transfer";z.unknown="unknown";z.unstake="unstake"})(XA||={});var QA;((S)=>{S.swap="swap";S.aggregation="aggregation";S.addLiquidity="addLiquidity";S.withdrawLiquidity="withdrawLiquidity";S.addSavers="addSavers";S.withdrawSavers="withdrawSavers";S.borrow="borrow";S.repay="repay";S.name="name";S.donate="donate";S.claim="claim";S.stake="stake";S.unstake="unstake"})(QA||={});var xA;((O)=>{O.unknown="unknown";O.not_started="not_started";O.pending="pending";O.swapping="swapping";O.completed="completed";O.refunded="refunded";O.failed="failed"})(xA||={});var EA;((w)=>{w.not_started="not_started";w.starting="starting";w.broadcasted="broadcasted";w.mempool="mempool";w.inbound="inbound";w.outbound="outbound";w.swapping="swapping";w.completed="completed";w.refunded="refunded";w.partially_refunded="partially_refunded";w.dropped="dropped";w.reverted="reverted";w.replaced="replaced";w.retries_exceeded="retries_exceeded";w.parsing_error="parsing_error"})(EA||={});var CL=$({address:B(R()),chain:L.enum(xN).optional(),chainId:L.enum(BN),coingeckoId:B(R()),decimals:UA.number(),extensions:B(L.looseObject({})),identifier:R(),logoURI:B(R()),name:B(R()),shortCode:B(R()),symbol:B(R()),ticker:R()}),dL=L.object({block:L.optional(L.number().describe("Block number. Required for Polkadot chain. e.g. `123456`")),chainId:L.optional(L.string().describe("ChainId for the hash. e.g. `thorchain-1`")),depositChannelId:L.optional(L.string().describe("Deposit channel ID, required for Chainflip if tx was broadcasted without wallet connection")),hash:L.optional(L.string().describe("Hash for the first transaction broadcasted by the end user. e.g. `88D1819378ECD09E5284C54937CDC1E99B52F253C007617A02DD1200710CE677`"))}).refine((N)=>N.hash&&N.chainId||N.depositChannelId,{message:"Either `hash` and `chainId` or `depositChannelId` must be provided"}),hL=L.object({forceUpdate:L.string().toLowerCase().transform((N)=>N==="true").pipe(L.boolean()).optional()}),cL=$({error:R(),message:R()}),HN=$({address:B(R()),chain:L.enum(xN),decimal:B(t()),isGasAsset:o(),isSynthetic:o(),symbol:R(),tax:B($({buy:t(),sell:t()})),ticker:R()}),bA=$({id:R(),market_cap:t(),name:R(),price_change_24h_usd:t(),price_change_percentage_24h_usd:t(),sparkline_in_7d:X(t()),timestamp:R(),total_volume:t()}).partial(),rL=$({cg:B(bA),identifier:R(),price_usd:t(),provider:R(),timestamp:t()}),wA=X($({cg:B(bA),identifier:R(),price_usd:t(),provider:R(),timestamp:t()}).partial()),lL=$({affiliate:B(R().describe("Affiliate thorname")),affiliateFee:B(t().describe("Affiliate fee in basis points").refine((N)=>N===Math.floor(N)&&N>=0,{message:"affiliateFee must be a positive integer",path:["affiliateFee"]})),allowSmartContractReceiver:B(o().describe("Allow smart contract as recipient")),allowSmartContractSender:B(o().describe("Allow smart contract as sender")),buyAsset:R().describe("Asset to buy"),cfBoost:B(o().describe("Set to true to enable CF boost to speed up Chainflip swaps. BTC only.")),destinationAddress:B(R().describe("Address to send asset to")),disableSecurityChecks:B(o().describe("Disable security checks")),includeTx:B(o().describe("Set to true to include an transaction object (EVM only)")),providers:B(X(R().describe("List of providers to use").refine((N)=>j[N]!==void 0,{message:"Invalid provider",path:["providers"]}))),referrer:B(R().describe("Referrer address (referral program)")),sellAmount:R().describe("Amount of asset to sell").refine((N)=>+N>0,{message:"sellAmount must be greater than 0",path:["sellAmount"]}),sellAsset:R().describe("Asset to sell"),slippage:B(t().describe("Slippage tolerance as a percentage. Default is 3%.")),sourceAddress:B(R().describe("Address to send asset from"))}).refine((N)=>N.sellAsset!==N.buyAsset,{message:"Must be different",path:["sellAsset","buyAsset"]}),iL=$({metadata:o(),tokens:X($({identifier:R()}))}),zA=$({destinationAddress:R()}),MH=zA.extend({affiliateFees:X($({brokerAddress:R(),feeBps:t()})).optional(),brokerCommissionBps:t().optional(),buyAsset:$({asset:R(),chain:R()}),channelMetadata:$({cfParameters:R().optional(),gasBudget:R().optional(),message:R().optional()}).optional(),dcaParameters:$({chunkInterval:t().optional(),numberOfChunks:t().optional()}).optional(),maxBoostFeeBps:t().optional(),refundParameters:$({minPrice:R().optional(),refundAddress:R().optional(),retryDuration:t().optional()}).optional(),sellAsset:$({asset:R(),chain:R()})}),JA=$({channelId:R(),depositAddress:R()}),_A=zA.extend({affiliateFees:$({feeBps:t(),nearId:R()}).optional(),buyAsset:R(),sellAmount:R(),sellAsset:R(),slippage:UA.number(),sourceAddress:R()}),DA=$({amountIn:R(),amountInFormatted:R(),amountInUsd:R(),amountOut:R(),amountOutFormatted:R(),amountOutUsd:R(),deadline:R().optional(),minAmountIn:R(),minAmountOut:R(),timeEstimate:t().optional(),timeWhenInactive:R().optional()}),sL=DA.extend({depositAddress:R(),quote:DA,signature:R(),timestamp:R(),tx:MA()}),ZA=$({buyAsset:R(),buyAssetAmount:R(),buyAssetAmountMaxSlippage:R(),deadline:R().optional(),depositAddress:R(),depositAmount:R(),depositAsset:R(),tx:MA()}),SH=$({evmCalldata:L.optional(L.string()),intentHash:L.optional(L.string()),logs:L.optional(L.unknown()),manifest:L.optional(L.unknown()),memo:L.optional(L.string()),spender:L.optional(L.string()),thorname:L.optional(L.string())}),XH=$({currentStage:R(),inboundConfirmation:t(),inboundObservation:t(),outboundDelay:t(),outboundObservation:t(),streamingSwap:t()}),QH=$({count:B(t()),interval:B(t()),quantity:B(t()),subSwapsMap:B(X(t()))}),xH=L.object({currentLegIndex:L.optional(L.number()),estimatedTimeToComplete:L.number(),estimates:L.optional(XH),providerDetails:L.optional(L.object({streamingDetails:L.optional(QH)}))}),EH=$({affiliate:B(HN),liquidity:B(HN),network:B(HN),protocol:B(HN),tax:B(HN)}),bH=$({affiliate:R(),bps:R(),isReferrer:o()}),wH=$({affiliate:B(R()),affiliateFees:B(X(bH)),broadcastedAt:B(t()),explorerUrl:B(R()),fees:B(EH),images:B($({chain:B(R()),from:B(R()),provider:B(R()),to:B(R())})),provider:B(L.enum(j)),providerAction:L.optional(L.enum(QA)),quoteId:B(R()),wallet:B(R())}),PN=L.object({block:L.number(),chainId:L.enum(BN),finalAddress:L.optional(L.string()),finalAsset:L.optional(HN),finalisedAt:L.number(),fromAddress:L.string(),fromAmount:L.string(),fromAsset:L.string(),hash:L.string(),meta:L.optional(wH),payload:L.optional(SH),status:L.enum(xA),toAddress:L.string(),toAmount:L.string(),toAsset:L.string(),trackingStatus:L.optional(L.enum(EA)),transient:L.optional(xH),type:L.enum(XA)}),jA=PN.extend({legs:L.array(PN)}),eL=PN.extend({legs:X(PN)}),aL=PN.extend({legs:X(PN)}),oN=X($({amount:R(),asset:R(),chain:R(),protocol:L.enum(j),type:L.enum(zN)})),pN=L.object({inbound:L.optional(L.number().describe("Time to receive inbound asset in seconds")),outbound:L.optional(L.number().describe("Time to receive outbound asset in seconds")),swap:L.optional(L.number().describe("Time to swap assets in seconds")),total:L.number().describe("Total time in seconds")}),vA=$({data:R().describe("Data to send"),from:R().describe("Address of the sender"),to:R().describe("Address of the recipient"),value:R().describe("Value to send")}),VA=L.object({raw_data:L.object({contract:L.any(),expiration:L.number(),ref_block_bytes:L.string(),ref_block_hash:L.string(),timestamp:L.number()}),raw_data_hex:L.string(),txID:L.string(),visible:L.boolean()}),zH=X(KN([R(),t(),X(R()),$({from:R(),value:R()}).describe("Parameters to pass to the contract method")])),NR=$({approvalSpender:B(R().describe("Address of the spender to approve")),approvalToken:B(R().describe("Address of the token to approve spending of")),contractAddress:R().describe("Address of the contract to interact with"),contractMethod:R().describe("Name of the method to call"),contractParamNames:X(R().describe("Names of the parameters to pass to the contract method")),contractParams:zH}),JH=$({typeUrl:R("/types.MsgDeposit"),value:$({coins:X($({amount:R(),asset:$({chain:R(),symbol:R(),synth:o(),ticker:R()})})),memo:R(),signer:R()})}),ZH=$({typeUrl:R("/types.MsgSend"),value:$({amount:X($({amount:R(),denom:R()})),fromAddress:R(),toAddress:R()})}),jH=$({typeUrl:R(),value:ZH.or(JH)}),vH=$({amount:X($({amount:R(),denom:R()})),gas:R()}),WA=$({accountNumber:t(),chainId:L.enum(BN),fee:vH,memo:R(),msgs:X(jH),sequence:t()}),VH=L.array(L.object({calldata:L.array(L.string()),contractAddress:L.string(),entrypoint:L.string()})),qA=L.array(L.object({address:L.string().describe("Destination address in friendly format"),amount:L.string().describe("Amount in nanotons"),payload:L.string().optional().describe("Base64 BOC of body cell"),stateInit:L.string().optional().describe("Base64 BOC of state init")})),WH=$({affiliate:R().describe("Affiliate address").optional(),affiliateFee:t().describe("Affiliate fee").optional(),buyAsset:R().describe("Asset to buy"),destinationAddress:R().describe("Destination address"),estimatedTime:pN.optional(),provider:L.enum(j),sellAsset:R().describe("Asset to sell"),slipPercentage:t().describe("Slippage as a percentage"),sourceAddress:R().describe("Source address")}),AR=WH.omit({destinationAddress:!0,slipPercentage:!0,sourceAddress:!0}),qH=$({asset:R().describe("Asset name"),image:R().describe("Asset image"),price:t().describe("Price in USD")}),mH=MH,mA=$({assets:B(X(qH)),maxStreamingQuantity:t().optional(),referrer:R().optional(),streamingInterval:t().optional(),tags:X(L.enum(SA))}),kA=mA.extend({affiliate:B(R()),affiliateFee:B(R()),approvalAddress:B(R().describe("Approval address for swap")),chainflip:mH.optional(),garden:_A.optional(),near:_A.optional(),priceImpact:B(t().describe("Price impact")),referrer:B(R()),txType:B(L.enum(EN))}),KA=X($({code:L.enum(wN),display:R(),tooltip:R().optional()})),kH=$({buyAmount:R().describe("Buy amount"),buyAmountMaxSlippage:R().describe("Buy amount max slippage"),buyAsset:R().describe("Asset to buy"),fees:B(oN),provider:L.enum(j),sellAmount:R().describe("Sell amount"),sellAsset:R().describe("Asset to sell")}),KH=$({buyAsset:R().describe("Asset to buy"),destinationAddress:R().describe("Destination address"),estimatedTime:B(pN),expectedBuyAmount:R().describe("Expected Buy amount"),expectedBuyAmountMaxSlippage:R().describe("Expected Buy amount max slippage"),expiration:B(R().describe("Expiration")),fees:oN,inboundAddress:B(R().describe("Inbound address")),legs:X(kH),memo:B(R().describe("Memo")),meta:kA,providers:X(L.enum(j)),routeId:R().describe("Route ID"),sellAmount:R().describe("Sell amount"),sellAsset:R().describe("Asset to sell"),sourceAddress:R().describe("Source address"),targetAddress:B(R().describe("Target address")),totalSlippageBps:t().describe("Total slippage in bps"),tx:B(KN([vA,WA,VA,VH,qA,R()])),txType:B(L.enum(EN)),warnings:KA}),oA=$({error:B(R().describe("Error message")),providerErrors:B(X($({errorCode:B(L.enum(uN)),message:B(R()),provider:L.enum(j).optional()}))),quoteId:R().describe("Quote ID"),routes:X(KH)}),pA=L.object({chainId:L.enum(BN),createdAt:L.date(),id:L.number(),unit:L.string(),value:L.string()}),oH=L.array(pA),yA=L.union([pA,oH]),TR=X($({chain:L.enum(xN),decimal:t(),identifier:R(),symbol:R(),ticker:R(),value:R()})),HR=L.union([L.object({amount:L.string(),spender:L.string(),tokenIdentifier:L.string(),userWalletAddress:L.string()}),L.object({amount:L.string(),chainId:L.enum(BN),spender:L.string(),tokenContractAddress:L.string(),userWalletAddress:L.string()}),L.object({routeId:L.string()})]),PR=L.object({approvalTransaction:L.optional(L.object({data:L.string(),from:L.string(),gasLimit:L.optional(L.string()),gasPrice:L.optional(L.string()),to:L.string(),value:L.string()})),approvedAmount:L.string(),isApproved:L.boolean()}),pH=L.object({data:L.string().describe("Encoded approval call data"),from:L.string().describe("User wallet address"),gasLimit:L.string().optional().describe("Estimated gas limit"),gasPrice:L.string().optional().describe("Current gas price"),to:L.string().describe("Token contract address"),value:L.string().describe("ETH value (always '0' for approvals)")}),YA=L.object({buyAmount:L.string().describe("Buy amount"),buyAmountMaxSlippage:L.string().describe("Buy amount max slippage"),buyAsset:L.string().describe("Asset to buy"),expectedBuyAmount:L.string().describe("Expected Buy amount"),expectedBuyAmountMaxSlippage:L.string().describe("Expected Buy amount max slippage"),fees:oN,provider:L.enum(j),sellAmount:L.string().describe("Sell amount"),sellAsset:L.string().describe("Asset to sell")}),fA=YA.extend({estimatedTime:L.optional(pN),expiration:L.optional(L.string().describe("Expiration")),legs:L.array(YA),providers:L.array(L.enum(j)),routeId:L.string().describe("Route ID"),totalSlippageBps:L.number().describe("Total slippage in bps"),warnings:KA}).omit({provider:!0}),yH=L.object({method:L.string(),payload:L.optional(L.unknown()),url:L.string()}),fH=fA.extend({meta:mA,nextActions:L.optional(L.array(yH))}),LR=L.object({error:L.optional(L.string().describe("Error message")),providerErrors:L.optional(L.array(L.object({errorCode:L.optional(L.enum(uN)),message:L.optional(L.string()),provider:L.enum(j).optional()}))),quoteId:L.string().describe("Quote ID"),routes:L.array(fH)}),RR=L.object({providers:L.array(L.enum(j)).optional().describe("Optional list of providers to query for trading pairs"),sellAsset:L.string().describe("Asset identifier to sell (e.g., 'BTC.BTC' or 'ETH.ETH')")}),CH=L.object({chain:L.enum(xN).describe("Chain the asset is on"),identifier:L.string().describe("Asset identifier (e.g., 'ETH.USDC-0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48')"),providers:L.array(L.enum(j)).describe("Providers that support this trading pair"),symbol:L.string().describe("Asset symbol"),ticker:L.string().describe("Asset ticker")}),uR=L.object({buyAssets:L.array(CH).describe("List of assets that can be swapped to"),sellAsset:L.string().describe("The input sell asset identifier")}),CA=fA.extend({destinationAddress:L.string().describe("Destination address"),inboundAddress:L.optional(L.string().describe("Inbound address")),memo:L.optional(L.string().describe("Memo to include in the transaction")),meta:kA,sourceAddress:L.string().describe("Source address"),targetAddress:L.optional(L.string().describe("Target address")),tx:B(KN([vA,WA,VA,qA,R()])),txType:L.optional(L.enum(EN))}),dH=L.object({data:L.optional(L.record(L.string(),L.string().optional())),errorCode:L.enum(uN),message:L.string().optional(),provider:L.enum(j).optional()}),FR=L.object({error:L.optional(L.string().describe("Error message")),providerErrors:L.optional(L.array(dH)),quoteId:L.string().describe("Quote ID"),routes:L.array(CA)}),dA=CA.extend({approvalTx:pH.optional().describe("Optional approval transaction if ERC-20 approval is required before swap"),swapId:L.string().describe("The unique swap ID for tracking")});var V=g.extend({dynamicHeader:async()=>{let N=E.get("widgetKey");if(N&&typeof window<"u"){let T=Math.floor(Date.now()/1000),H=window.location.origin;return{"X-Signature":await tA(N,H,T),"X-Timestamp":T.toString()}}let{swapKit:A}=E.get("apiKeys");return A?{"x-api-key":A}:{}}});async function rH(N){let A=await V.post(v("/track"),{json:N});try{let T=jA.safeParse(A);if(!T.success)throw new D("api_v2_invalid_response",T.error);return T.data}catch(T){return A}}async function lH(N){let{getQuote:A}=E.get("endpoints");if(A)return A(N);let H=E.get("v3SwapFlow")?.enabled?"/v3/quote":"/quote",P=await V.post(v(H),{json:N});if(P.error)throw new D("api_v2_server_error",{message:P.error});try{let F=oA.safeParse(P);if(!F.success)throw new D("api_v2_invalid_response",F.error);return F.data}catch{return P}}async function iH(N){let{getRouteWithTx:A}=E.get("endpoints");if(A)return A(N);let H=E.get("v3SwapFlow")?.enabled?"/v3/swap":"/swap",P=await V.post(v(H),{json:N});try{let F=dA.safeParse(P);if(!F.success)throw new D("api_v2_invalid_response",F.error);return F.data}catch(F){return console.error(new D("api_v2_invalid_response",F)),P}}async function sH({chain:N,address:A,scamFilter:T=!0}){let{getBalance:H}=E.get("endpoints");if(H)return H({address:A,chain:N});let P=v(`/balance?chain=${N}&address=${A}`),F=await V.get(P),I=Array.isArray(F)?F:[];return T?uP(I):I}function eH(N){let A=cH(N).with({routeId:$N.string,spender:$N.string},({routeId:T,spender:H})=>v(`/approve?routeId=${T}&sourceAddress=${H}`)).with({assetValue:$N.instanceOf(m),spender:$N.string,userWallet:$N.string},({spender:T,userWallet:H,assetValue:P})=>v(`/approve?tokenIdentifier=${P.toString()}&userWalletAddress=${H}&spender=${T}&amount=${P.getValue("string")}`)).exhaustive();return V.get(A)}function aH(){let N=v("/providers");return V.get(N)}function NP(N){let A=v(`/tokens?provider=${N}`);return V.get(A)}async function AP(N){let A=v("/price"),T=await V.post(A,{json:N});try{let H=wA.safeParse(T);if(!H.success)throw new D("api_v2_invalid_response",H.error);return H.data}catch(H){throw new D("api_v2_invalid_response",H)}}async function TP(){let N=v("/gas"),A=await V.get(N);try{let T=yA.safeParse(A);if(!T.success)throw new D("api_v2_invalid_response",T.error);return Array.isArray(T)?T:[T]}catch(T){throw new D("api_v2_invalid_response",T)}}async function HP(N){let{destinationAddress:A}=N;if(!A)throw new D("chainflip_broker_invalid_params");let T=E.get("integrations").chainflip?.brokerUrl||v("/chainflip/broker/channel"),H=await V.post(T,{json:N});try{let P=JA.safeParse(H);if(!P.success)throw new D("api_v2_invalid_response",P.error);return P.data}catch(P){throw new D("api_v2_invalid_response",P)}}async function PP(N){let{destinationAddress:A}=N;if(!A)throw new D("chainflip_broker_invalid_params");let T=v("/near/channel"),H=await V.post(T,{json:N});try{let P=ZA.safeParse(H);if(!P.success)throw new D("api_v2_invalid_response",P.error);return P.data}catch(P){throw new D("api_v2_invalid_response",P)}}function v(N){let{isDev:A,apiUrl:T,devApiUrl:H}=E.get("envs");return`${A?H:T}${N}`}function LP(N){let[A,T]=N.split(".");if(!hH.includes(A))return!0;let H=T.split("-"),P=H.length===1?void 0:H[H.length-1];return DN({chain:A,symbol:T})||!!P}var RP=new RegExp(/(.)\1{6}|\.ORG|\.NET|\.FINANCE|\.COM|WWW|HTTP|\\\\|\/\/|[\s$%:[\]]/,"gmi");function uP(N){return N.filter((A)=>{return!RP.test(A.identifier)&&LP(A.identifier)})}async function FP(N){let{getSwapTo:A}=E.get("endpoints");if(A)return A(N);let T=new URLSearchParams({sellAsset:N.sellAsset});if(N.providers?.length)for(let I of N.providers)T.append("providers",I);let H=v(`/swapTo?${T.toString()}`),P=await V.get(H);if(!Array.isArray(P))return{buyAssets:[],sellAsset:N.sellAsset};let F=[];for(let I of P)try{let O=m.from({asset:I});F.push({chain:O.chain,identifier:O.toString(),providers:[],symbol:O.symbol,ticker:O.ticker})}catch{}return{buyAssets:F,sellAsset:N.sellAsset}}var fN={};cN(fN,{getThorchainQueue:()=>GP,getTcyStakers:()=>XP,getTcyStaker:()=>SP,getTcyClaimers:()=>xP,getTcyClaimer:()=>QP,getTNSPreferredAsset:()=>YP,getTHORNodeTNSDetails:()=>hA,getRunePoolProviderInfo:()=>MP,getRunePoolInfo:()=>UP,getNodes:()=>tP,getMimirInfo:()=>_P,getLastBlock:()=>gP,getInboundAddresses:()=>DP});import{MAYAConfig as IP,StagenetMAYAConfig as nP,StagenetTHORConfig as OP,THORConfig as BP}from"@swapkit/types";function k(N){let{isStagenet:A}=E.get("envs");switch(N){case"mayachain":return`${A?nP.nodeUrl:IP.nodeUrl}/mayachain`;default:return`${A?OP.nodeUrl:BP.nodeUrl}/thorchain`}}function $P(N){let A=N==="mayachain"?"mayaname":"thorname";return`${k(N)}/${A}`}function gP(N="thorchain"){return g.get(`${k(N)}/lastblock`)}function GP(N){return g.get(`${k(N)}/queue`)}function tP(N){return g.get(`${k(N)}/nodes`)}function _P(N){return g.get(`${k(N)}/mimir`)}function DP(N){return g.get(`${k(N)}/inbound_addresses`)}async function hA({type:N,name:A}){try{return await g.get(`${$P(N)}/${A}`)}catch{return{affiliate_collector_rune:"",aliases:[],expire_block_height:0,name:A,owner:"",preferred_asset:""}}}async function YP({type:N,tns:A}){let T=await hA({name:A,type:N});if(!T.preferred_asset||T.preferred_asset===".")return;return m.from({asset:T.preferred_asset,asyncTokenLookup:!0})}function UP(N){return g.get(`${k(N)}/runepool`)}function MP({type:N,thorAddress:A}){return g.get(`${k(N)}/rune_provider/${A}`)}function SP({type:N,address:A}){return g.get(`${k(N)}/tcy_staker/${A}`)}function XP(N){return g.get(`${k(N)}/tcy_stakers`)}function QP({type:N,address:A}){return g.get(`${k(N)}/tcy_claimer/${A}`)}function xP(N){return g.get(`${k(N)}/tcy_claimers`)}var QR={...yN,mayachainMidgard:GA,thorchainMidgard:gA,thornode:fN};
5
- export{wP as a,uN as b,wN as c,j as d,zN as e,aA as f,NT as g,AT as h,JN as i,TT as j,vP as k,q as l,E as m,D as n,g as o,sP as p,eP as q,aP as r,NL as s,i as t,vN as u,ST as v,s as w,uL as x,$L as y,PA as z,DN as A,YN as B,VN as C,d as D,IN as E,gL as F,GL as G,RA as H,YL as I,c as J,y as K,m as L,ZL as M,XN as N,tA as O,SA as P,EN as Q,XA as R,QA as S,xA as T,EA as U,CL as V,dL as W,hL as X,cL as Y,HN as Z,bA as _,rL as $,wA as aa,lL as ba,iL as ca,zA as da,MH as ea,JA as fa,_A as ga,sL as ha,ZA as ia,jA as ja,eL as ka,aL as la,oN as ma,pN as na,vA as oa,VA as pa,zH as qa,NR as ra,WA as sa,VH as ta,qA as ua,WH as va,AR as wa,qH as xa,mH as ya,mA as za,kA as Aa,KA as Ba,KH as Ca,oA as Da,pA as Ea,yA as Fa,HR as Ga,PR as Ha,pH as Ia,LR as Ja,RR as Ka,CH as La,uR as Ma,CA as Na,dH as Oa,FR as Pa,dA as Qa,QR as Ra};