@scallop-io/scallop-swap-sdk 2.1.0 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -167,35 +167,32 @@ type SwapSdkPoolStatusEvent<PoolType> = {
167
167
  pool: PoolType;
168
168
  enabled: boolean;
169
169
  };
170
+ type AllSwapSdkPoolStatusEvent = {
171
+ name: string;
172
+ enabled: boolean;
173
+ };
170
174
  type SwapSdkEvents<PoolType> = {
171
175
  poolStatusChanged: SwapSdkPoolStatusEvent<PoolType>;
172
- allPoolStatusChanged: {
173
- name: string;
174
- enabled: boolean;
175
- };
176
+ allPoolStatusChanged: AllSwapSdkPoolStatusEvent;
177
+ };
178
+ type SlippageChangedEvent = {
179
+ slippageInDecimal: number;
176
180
  };
177
181
  type AggregatorStatusEvent = {
178
182
  name: string;
179
183
  enabled: boolean;
180
184
  };
185
+ type AggregatorEvent = {
186
+ name: string;
187
+ };
181
188
  type AggregatorEvents<PoolType> = {
182
189
  poolStatusChanged: SwapSdkPoolStatusEvent<PoolType>;
183
190
  aggregatorStatusChanged: AggregatorStatusEvent;
184
- aggregatorRemoved: {
185
- name: string;
186
- };
187
- aggregatorAdded: {
188
- name: string;
189
- };
190
- aggregatorSlippageChanged: {
191
- slippageInDecimal: number;
192
- };
193
- aggregatorFetchStart: {
194
- name: string;
195
- };
196
- aggregatorFetchEnd: {
197
- name: string;
198
- };
191
+ aggregatorRemoved: AggregatorEvent;
192
+ aggregatorAdded: AggregatorEvent;
193
+ aggregatorSlippageChanged: SlippageChangedEvent;
194
+ aggregatorFetchStart: AggregatorEvent;
195
+ aggregatorFetchEnd: AggregatorEvent;
199
196
  };
200
197
 
201
198
  declare class TypedEventEmitter<Events extends Record<string, any>> extends EventEmitter {
@@ -459,4 +456,4 @@ declare const selectCoins: (client: SuiClient, coinType: string, amount: string,
459
456
  declare const mergeWithExistingOrTransfer: (tx: Transaction, coin: TransactionObjectArgument, client: SuiClient, coinType: string, sender: string) => Promise<void>;
460
457
  declare const transformProperCase: (provider: string) => string;
461
458
 
462
- export { type FetchRouteSettings$2 as AftermathFetchRouteSettings, AftermathSwap, Aggregator, type AggregatorConstructorParams, type AggregatorEvents, type AggregatorStatusEvent, type FetchRouteSettings$3 as CetusFetchRouteSettings, CetusSwap, type Coin, CoinMetadataRegistry, type FetchRouteParams, type FetchRouteResult, type FetchRoutesOptions, type FetchRouteSettings as FlowXFetchRouteSettings, FlowXSwap, type FormattedRouteResult, type SdkName, type SdkRegistry, type SecretKeyOrMnemonicsOrWalletAddress, type SuiClientOrFullnodeUrl, type SwapBuildResult, type SwapCoinInfo, type SwapParams, type SwapPath, type SwapRoute, SwapSdkBase, type SwapSdkBaseInterface, type SwapSdkConstructorParams, type SwapSdkEvents, type SwapSdkPoolStatusEvent, TypedEventEmitter, type FetchRouteSettings$1 as _7kFetchRouteSettings, _7kSwap, isSuiType, mergeWithExistingOrTransfer, selectCoins, transformProperCase };
459
+ export { type FetchRouteSettings$2 as AftermathFetchRouteSettings, AftermathSwap, Aggregator, type AggregatorConstructorParams, type AggregatorEvent, type AggregatorEvents, type AggregatorStatusEvent, type AllSwapSdkPoolStatusEvent, type FetchRouteSettings$3 as CetusFetchRouteSettings, CetusSwap, type Coin, CoinMetadataRegistry, type FetchRouteParams, type FetchRouteResult, type FetchRoutesOptions, type FetchRouteSettings as FlowXFetchRouteSettings, FlowXSwap, type FormattedRouteResult, type SdkName, type SdkRegistry, type SecretKeyOrMnemonicsOrWalletAddress, type SlippageChangedEvent, type SuiClientOrFullnodeUrl, type SwapBuildResult, type SwapCoinInfo, type SwapParams, type SwapPath, type SwapRoute, SwapSdkBase, type SwapSdkBaseInterface, type SwapSdkConstructorParams, type SwapSdkEvents, type SwapSdkPoolStatusEvent, TypedEventEmitter, type FetchRouteSettings$1 as _7kFetchRouteSettings, _7kSwap, isSuiType, mergeWithExistingOrTransfer, selectCoins, transformProperCase };
package/dist/index.d.ts CHANGED
@@ -167,35 +167,32 @@ type SwapSdkPoolStatusEvent<PoolType> = {
167
167
  pool: PoolType;
168
168
  enabled: boolean;
169
169
  };
170
+ type AllSwapSdkPoolStatusEvent = {
171
+ name: string;
172
+ enabled: boolean;
173
+ };
170
174
  type SwapSdkEvents<PoolType> = {
171
175
  poolStatusChanged: SwapSdkPoolStatusEvent<PoolType>;
172
- allPoolStatusChanged: {
173
- name: string;
174
- enabled: boolean;
175
- };
176
+ allPoolStatusChanged: AllSwapSdkPoolStatusEvent;
177
+ };
178
+ type SlippageChangedEvent = {
179
+ slippageInDecimal: number;
176
180
  };
177
181
  type AggregatorStatusEvent = {
178
182
  name: string;
179
183
  enabled: boolean;
180
184
  };
185
+ type AggregatorEvent = {
186
+ name: string;
187
+ };
181
188
  type AggregatorEvents<PoolType> = {
182
189
  poolStatusChanged: SwapSdkPoolStatusEvent<PoolType>;
183
190
  aggregatorStatusChanged: AggregatorStatusEvent;
184
- aggregatorRemoved: {
185
- name: string;
186
- };
187
- aggregatorAdded: {
188
- name: string;
189
- };
190
- aggregatorSlippageChanged: {
191
- slippageInDecimal: number;
192
- };
193
- aggregatorFetchStart: {
194
- name: string;
195
- };
196
- aggregatorFetchEnd: {
197
- name: string;
198
- };
191
+ aggregatorRemoved: AggregatorEvent;
192
+ aggregatorAdded: AggregatorEvent;
193
+ aggregatorSlippageChanged: SlippageChangedEvent;
194
+ aggregatorFetchStart: AggregatorEvent;
195
+ aggregatorFetchEnd: AggregatorEvent;
199
196
  };
200
197
 
201
198
  declare class TypedEventEmitter<Events extends Record<string, any>> extends EventEmitter {
@@ -459,4 +456,4 @@ declare const selectCoins: (client: SuiClient, coinType: string, amount: string,
459
456
  declare const mergeWithExistingOrTransfer: (tx: Transaction, coin: TransactionObjectArgument, client: SuiClient, coinType: string, sender: string) => Promise<void>;
460
457
  declare const transformProperCase: (provider: string) => string;
461
458
 
462
- export { type FetchRouteSettings$2 as AftermathFetchRouteSettings, AftermathSwap, Aggregator, type AggregatorConstructorParams, type AggregatorEvents, type AggregatorStatusEvent, type FetchRouteSettings$3 as CetusFetchRouteSettings, CetusSwap, type Coin, CoinMetadataRegistry, type FetchRouteParams, type FetchRouteResult, type FetchRoutesOptions, type FetchRouteSettings as FlowXFetchRouteSettings, FlowXSwap, type FormattedRouteResult, type SdkName, type SdkRegistry, type SecretKeyOrMnemonicsOrWalletAddress, type SuiClientOrFullnodeUrl, type SwapBuildResult, type SwapCoinInfo, type SwapParams, type SwapPath, type SwapRoute, SwapSdkBase, type SwapSdkBaseInterface, type SwapSdkConstructorParams, type SwapSdkEvents, type SwapSdkPoolStatusEvent, TypedEventEmitter, type FetchRouteSettings$1 as _7kFetchRouteSettings, _7kSwap, isSuiType, mergeWithExistingOrTransfer, selectCoins, transformProperCase };
459
+ export { type FetchRouteSettings$2 as AftermathFetchRouteSettings, AftermathSwap, Aggregator, type AggregatorConstructorParams, type AggregatorEvent, type AggregatorEvents, type AggregatorStatusEvent, type AllSwapSdkPoolStatusEvent, type FetchRouteSettings$3 as CetusFetchRouteSettings, CetusSwap, type Coin, CoinMetadataRegistry, type FetchRouteParams, type FetchRouteResult, type FetchRoutesOptions, type FetchRouteSettings as FlowXFetchRouteSettings, FlowXSwap, type FormattedRouteResult, type SdkName, type SdkRegistry, type SecretKeyOrMnemonicsOrWalletAddress, type SlippageChangedEvent, type SuiClientOrFullnodeUrl, type SwapBuildResult, type SwapCoinInfo, type SwapParams, type SwapPath, type SwapRoute, SwapSdkBase, type SwapSdkBaseInterface, type SwapSdkConstructorParams, type SwapSdkEvents, type SwapSdkPoolStatusEvent, TypedEventEmitter, type FetchRouteSettings$1 as _7kFetchRouteSettings, _7kSwap, isSuiType, mergeWithExistingOrTransfer, selectCoins, transformProperCase };
package/dist/index.js CHANGED
@@ -16,7 +16,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
16
16
 
17
17
  var ___default = /*#__PURE__*/_interopDefault(_);
18
18
 
19
- var Z=utils.normalizeStructTag(utils.SUI_TYPE_ARG),B=r=>utils.normalizeStructTag(r)===Z,E=async(r,e,A,o)=>{let s=[],a=bignumber_js.BigNumber(A),c=null;try{do{let{data:t,hasNextPage:n,nextCursor:i}=await r.getCoins({coinType:e,owner:o,limit:50,cursor:c});if(s.push(...t),a=a.minus(t.reduce((d,u)=>d.plus(bignumber_js.BigNumber(u.balance)),bignumber_js.BigNumber(0))),a.lte(0)||(c=i??null,!n))break}while(c)}catch(t){throw new Error(t?.message??"Failed to fetch coins")}if(s.length===0)throw new Error(`No available coin for type ${e} found in wallet ${o}`);if(a.gt(0))throw new Error(`Insufficient balance for coin type ${e} in wallet ${o}`);return s},S=async(r,e,A,o,s)=>{try{if(B(o))r.mergeCoins(r.gas,[e]);else {let{data:a}=await A.getCoins({coinType:o,owner:s,limit:1});if(!a.length)throw new Error(`No existing ${o} coin found to merge with`);let c=r.objectRef({objectId:a[0].coinObjectId,version:a[0].version,digest:a[0].digest});a.length===1?r.mergeCoins(c,[e]):r.mergeCoins(c,[e,...a.slice(1).map(t=>r.objectRef({objectId:t.coinObjectId,version:t.version,digest:t.digest}))]);}}catch{r.transferObjects([e],r.pure.address(s));}},U=r=>r[0].toUpperCase()+r.slice(1),g=r=>r.split("_").map(U).join(" ");var b=class extends events.EventEmitter{on(e,A){return super.on(e,A)}once(e,A){return super.once(e,A)}off(e,A){return super.off(e,A)}emit(e,A){return super.emit(e,A)}};var f=class{rawRouteResult;name="";events=new b;client;suiClient;fetchTimeoutInMs;walletAddress;fetchSettings;poolsMap=new Map;constructor(e,A){this.suiClient=A.suiClient??new client.SuiClient({url:client.getFullnodeUrl("mainnet")}),this.fetchTimeoutInMs=A.fetchTimeoutInMs??4e3,this.walletAddress=A.walletAddress,this.name=e.toLowerCase(),A.fetchSettings&&this.setFetchRouteSettings(A.fetchSettings);}get pools(){return Array.from(this.poolsMap.keys())}validateWalletAddress(){if(!this.walletAddress||this.walletAddress.length===0)throw new Error("Wallet address is not set")}validateClient(){if(!this.client)throw new Error("SDK client is not set")}setWalletAddress(e){this.walletAddress=e;}setSuiClient(e){this.suiClient=e;}togglePoolStatus(e,A){let o=A??!(this.poolsMap.get(e)??true);this.poolsMap.set(e,o),this.events.emit("poolStatusChanged",{name:this.name,pool:e,enabled:o});}toggleAllPoolStatus(e){this.pools.forEach(A=>{this.poolsMap.set(A,e);}),this.events.emit("allPoolStatusChanged",{name:this.name,enabled:e});}getEnabledPools(){return Array.from(this.poolsMap.entries()).filter(([e,A])=>A).map(([e,A])=>e)}normalizeFetchRouteParams(e){return {...e,coinInType:suiKit.normalizeStructTag(e.coinInType),coinOutType:suiKit.normalizeStructTag(e.coinOutType)}}async withTimeout(e,A){let o,s,a=[e,new Promise((c,t)=>{o=setTimeout(()=>{t(new Error(`${this.name} fetch route timeout`));},this.fetchTimeoutInMs);})];A&&a.push(new Promise((c,t)=>{if(A.aborted){t(A.reason??new Error(`${this.name} fetch route aborted`));return}s=()=>t(A.reason??new Error(`${this.name} fetch route aborted`)),A.addEventListener("abort",s,{once:true});}));try{return await Promise.race(a)}finally{o&&clearTimeout(o),A&&s&&A.removeEventListener("abort",s);}}async selectCoinInForSwap(e,A,o){let s=bignumber_js.BigNumber(A.toString());if(B(o)){let[a]=e.splitCoins(e.gas,[s.toString()]);return a}else {let a=await this.selectCoins(o,s.toString()),c=a.reduce((n,i)=>n.plus(bignumber_js.BigNumber(i.balance)),bignumber_js.BigNumber(0)),t=e.objectRef({objectId:a[0].coinObjectId,version:a[0].version,digest:a[0].digest});if(a.length>1&&e.mergeCoins(t,a.slice(1).map(n=>e.objectRef({objectId:n.coinObjectId,version:n.version,digest:n.digest}))),c.gt(s)){let[n]=e.splitCoins(t,[s.toString()]);return n}else return t}}async selectCoins(e,A){return this.validateWalletAddress(),await E(this.suiClient,e,A,this.walletAddress)}};var p=class{constructor(e,A){this.client=e;A&&A.forEach(o=>this.cache.set(o.coinType,o));}cache=new Map;setClient(e){this.client=e;}async getCoinMetadata(e){let A=utils.normalizeStructTag(e);if(this.cache.has(A))return this.cache.get(A);let o=await this.client.getCoinMetadata({coinType:A});if(!o)throw new Error(`Coin metadata not found for coin type: ${A}`);return this.cache.set(A,o),o}};var F=class{coinMetadata;suiKit;events=new b;_slippage=.003;signerMode=false;aggregatorMap=new Map;activeAggregator=new Map;_fetchingStatus=new Map;poolStatusForwarders=new Map;walletAddress;client;constructor(e){if(this.client=e.client??new client.SuiClient({url:e.fullnodeUrl||"https://fullnode.mainnet.sui.io:443"}),this.coinMetadata=new p(this.client),this.signerMode=!!(e.secretKey||e.mnemonics),e.secretKey||e.mnemonics)this.suiKit=new suiKit.SuiKit({...e,suiClients:[this.client]}),this.walletAddress=this.suiKit.currentAddress;else if(e.walletAddress!==void 0)this.walletAddress=e.walletAddress;else throw new Error("One of secretKey, mnemonics or walletAddress must be provided")}forwardPoolStatusChangeEvent(e){this.events.emit("poolStatusChanged",e);}addAggregator(e){for(let A of e)if(!this.aggregatorMap.has(A.name)){this.aggregatorMap.set(A.name,A),this.activeAggregator.set(A.name,true),this._fetchingStatus.set(A.name,false);let o=s=>this.forwardPoolStatusChangeEvent(s);this.poolStatusForwarders.set(A.name,o),A.events.on("poolStatusChanged",o),this.events.emit("aggregatorAdded",{name:A.name});}}getActiveAggregators(){return Array.from(this.activeAggregator.entries()).filter(([e,A])=>A).map(([e,A])=>e)}getAggregator(e){return this.aggregatorMap.get(e)}toggleAggregator(e,A){if(!this.activeAggregator.has(e))throw new Error(`Aggregator ${e} not found`);this.activeAggregator.set(e,A),this.events.emit("aggregatorStatusChanged",{name:e,enabled:A});}removeAggregator(e){let A=this.aggregatorMap.get(e);if(!A)throw new Error(`Aggregator ${e} not found`);let o=this.poolStatusForwarders.get(e);o&&A.events.off("poolStatusChanged",o),this.poolStatusForwarders.delete(e),this.aggregatorMap.delete(e),this.activeAggregator.delete(e),this._fetchingStatus.delete(e),this.events.emit("aggregatorRemoved",{name:e});}get aggregators(){return Array.from(this.aggregatorMap.values())}get fetchingStatus(){return Object.fromEntries(this._fetchingStatus)}get slippage(){return this._slippage}setSlippage(e){this._slippage=e,this.events.emit("aggregatorSlippageChanged",{slippageInDecimal:e});}setFetchTimeoutInMs(e){this.aggregators.forEach(A=>{A.fetchTimeoutInMs=e;});}#e(){if(!this.suiKit)throw new Error("SuiKit is not initialized.")}setSuiClient(e){this.aggregators.forEach(A=>{A.setSuiClient(e);}),this.coinMetadata.setClient(e),this.client=e;}setWalletAddress(e){if(this.signerMode)throw new Error("Cannot change wallet address when SuiKit is initialized with secretKey or mnemonics.");if(!utils.isValidSuiAddress(e))throw new Error("Invalid Sui wallet address");this.walletAddress=e,this.aggregators.forEach(A=>{A.setWalletAddress(e);});}async getCoinMetadata(e){return this.coinMetadata.getCoinMetadata(e)}async fetchRoutes(e,A){let o=this.aggregators.filter(({name:t})=>this.activeAggregator.get(t)===true),s=[],a=[],c=o.map(async t=>{this._fetchingStatus.set(t.name,true),this.events.emit("aggregatorFetchStart",{name:t.name});try{let n=await t.fetchRoute(e,A?.abortSignal);s.push(n),A?.onRouteFound?.(n);}catch(n){let i={name:t.name,reason:n};a.push(i),A?.onError?.(i);}finally{this._fetchingStatus.set(t.name,false),this.events.emit("aggregatorFetchEnd",{name:t.name});}});return await Promise.all(c),{routes:s.sort((t,n)=>bignumber_js.BigNumber(n.formattedResult.coinOut.amount).comparedTo(t.formattedResult.coinOut.amount)??0),errors:a}}async buildRouteTransaction(e,A={}){let{mergeResult:o=true,txExtensionParams:s}=A,a=this.aggregatorMap.get(e.formattedResult.name);if(!a)throw new Error(`Aggregator ${e.formattedResult.name} not found in the aggregator list`);let{tx:c,coinOut:t}=await a.buildSwapTransaction({route:e,slippage:A.slippage??this.slippage,txExtensionParams:s}),n=e.formattedResult.coinOut.type;return o?(await S(c,t,this.client,n,this.walletAddress),{tx:c,coinOutType:n}):{tx:c,coinOut:t,coinOutType:n}}async executeSwapTransaction(e,A=false){return this.#e(),A?this.suiKit.dryRunTxn(e):this.suiKit.signAndSendTxn(e)}};var y=class extends f{constructor(e){super("cetus",e),this.client=new aggregatorSdk.AggregatorClient({...e,endpoint:e.endpoint??"https://api-sui.cetus.zone/router_v3/find_routes",signer:e.signer??this.walletAddress,client:this.suiClient,env:aggregatorSdk.Env.Mainnet}),this.poolsMap=new Map(aggregatorSdk.ALL_DEXES.map(A=>[A,true]));}createRoute(e,A,o){let s=[],a=null;for(let t of e)t.from===A&&(a={paths:[],coinIn:{type:t.from,amount:BigInt(t.amountIn)},coinOut:{type:t.target,amount:BigInt(t.amountOut)}},s.push(a)),a&&(a.paths.push({protocolName:t.provider,coinIn:{type:t.from,amount:BigInt(t.amountIn)},coinOut:{type:t.target,amount:BigInt(t.amountOut)}}),a.coinOut={type:t.target,amount:BigInt(t.amountOut)},t.target===o&&(a=null));let c=s.reduce((t,n)=>t+n.coinIn.amount,BigInt(0)).toString();return c!=="0"&&s.forEach(t=>{t.splitPercentage=bignumber_js.BigNumber(t.coinIn.amount.toString()).div(c).times(100).toNumber();}),s}parseRawToFormattedResult({routerData:e,coinInType:A,coinOutType:o}){return {coinIn:{type:A,amount:BigInt(e.amountIn.toString()??"0")},coinOut:{type:o,amount:BigInt(e.amountOut.toString()??"0")},routes:this.createRoute(e.paths,A,o)}}setFetchRouteSettings(e){this.fetchSettings=e;}calcSlippage(e){return e}async fetchRoute(e,A){this.validateClient();let o=this.normalizeFetchRouteParams(e),{coinInType:s,coinOutType:a,swapAmount:c}=o,t=await this.withTimeout(this.client.findRouters({...this.fetchSettings,from:utils.normalizeStructTag(s),target:utils.normalizeStructTag(a),amount:new ___default.default(c.toString()),byAmountIn:true,providers:this.getEnabledPools()}),A);if(!t)throw new Error(`${this.name} fetch route returned empty response`);return this.rawRouteResult=t,{formattedResult:{...this.parseRawToFormattedResult({routerData:t,coinInType:s,coinOutType:a}),name:this.name},rawRouteResult:t}}async buildSwapTransaction(e){this.validateWalletAddress(),this.validateClient();let{txExtensionParams:A,slippage:o,route:s}=e,a=s?.rawRouteResult??this.rawRouteResult;if(!a)throw new Error(`${this.name} buildSwapTransaction requires a route, but none was provided or fetched.`);let c=null,t=null;if(A){let{initTx:i,coinIn:d}=A;c=i,t=d;}else c=new transactions.Transaction,c.setSender(this.walletAddress),t=await this.selectCoinInForSwap(c,BigInt(a.amountIn.toString()),utils.normalizeStructTag(a.paths[0].from));let n=await this.client.routerSwap({router:a,txb:c,slippage:this.calcSlippage(o),inputCoin:t});return {tx:c,coinOut:n}}};var Q={faucet:{packages:{faucet:"",suiFrensGenesisWrapper:""},objects:{faucet:"",suiFrensMint:""}},staking:{packages:{events:"0x7f6ce7ade63857c4fd16ef7783fed2dfc4d7fb7e40615abdb653030b76aef0c6",lsd:"0x1575034d2729907aefca1ac757d6ccfcd3fc7e9e77927523c06007d8353ad836",afsui:"0xf325ce1300e8dac124071d3152c5c5ee6174914f8bc2161e88329cf579246efc"},objects:{stakedSuiVault:"0x2f8f6d5da7f13ea37daa397724280483ed062769813b6f31e9788e59cc88994d",stakedSuiVaultState:"0x55486449e41d89cfbdb20e005c1c5c1007858ad5b4d5d7c047d2b3b592fe8791",safe:"0xeb685899830dd5837b47007809c76d91a098d52aabbf61e8ac467c59e5cc4610",treasury:"0xd2b95022244757b0ab9f74e2ee2fb2c3bf29dce5590fa6993a85d64bd219d7e8",referralVault:"0x4ce9a19b594599536c53edb25d22532f82f18038dc8ef618afd00fbbfb9845ef",validatorConfigsTable:"0x8536350cfb8a8efdd133a1e087b55416d431f7e8b894f77b55b20c4b799ebad9",aftermathValidator:"0xd30018ec3f5ff1a3c75656abf927a87d7f0529e6dc89c7ddd1bd27ecb05e3db2"}},pools:{packages:{amm:"0xc4049b2d1cc0f6e017fda8260e4377cecd236bd7f56a54fee120816e72e2e0dd",ammInterface:"0x8d8bba50c626753589aa5abbc006c9fa07736f55f4e6fb57481682997c0b0d52",events:"0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c",eventsV2:"0xc4049b2d1cc0f6e017fda8260e4377cecd236bd7f56a54fee120816e72e2e0dd"},objects:{poolRegistry:"0xfcc774493db2c45c79f688f88d28023a3e7d98e4ee9f48bbf5c7990f651577ae",protocolFeeVault:"0xf194d9b1bcad972e45a7dd67dd49b3ee1e3357a00a50850c52cd51bb450e13b4",treasury:"0x28e499dff5e864a2eafe476269a4f5035f1c16f338da7be18b103499abf271ce",insuranceFund:"0xf0c40d67b078000e18032334c3325c47b9ec9f3d9ae4128be820d54663d14e3b",lpCoinsTable:"0x7f3bb65251feccacc7f48461239be1008233b85594114f7bf304e5e5b340bf59"},other:{createLpCoinPackageCompilations:{0:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEAAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[167,102,246,194,32,223,3,45,134,147,18,9,59,94,154,58,126,34,119,96,13,193,175,198,63,222,118,4,234,110,46,214]}',1:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEBAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[68,93,25,253,95,37,116,117,115,245,79,81,250,68,193,193,125,175,148,139,217,235,215,33,240,45,78,14,3,86,156,253]}',2:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgECAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[226,124,21,102,7,55,200,164,249,68,13,253,43,195,52,31,88,207,26,30,152,251,208,57,135,126,235,45,23,164,119,82]}',3:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEDAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[1,144,16,189,84,90,47,167,188,222,48,174,25,190,46,185,6,221,67,91,132,40,116,30,179,102,100,127,83,12,109,13]}',4:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEEAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[188,181,24,0,200,201,56,67,47,157,254,230,47,200,183,173,203,125,184,180,21,175,170,42,167,82,194,112,35,226,84,160]}',5:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEFAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[139,229,11,229,58,97,20,164,146,173,45,172,225,131,71,62,84,106,77,218,122,249,243,255,146,34,28,60,77,35,55,138]}',6:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEGAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[57,76,77,44,68,157,60,123,68,75,189,64,53,35,82,187,207,42,126,62,112,57,251,96,190,255,39,160,152,130,157,52]}',7:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEHAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[123,60,245,235,196,138,131,187,192,81,41,5,55,144,176,99,178,245,228,90,186,155,175,11,175,182,127,251,112,69,207,36]}',8:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEIAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[62,140,187,2,13,226,252,216,57,79,25,215,73,0,30,117,240,181,17,67,90,160,116,93,0,185,100,177,98,158,120,249]}',9:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEJAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[224,168,250,132,113,73,22,162,90,31,20,5,146,218,102,211,9,26,235,144,153,60,68,242,99,43,182,103,163,123,70,243]}',10:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEKAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[230,2,103,229,53,229,25,139,165,170,103,184,37,95,22,138,144,54,70,94,84,1,166,69,226,228,2,111,190,177,88,67]}',11:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgELAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[47,22,229,32,128,229,189,95,254,208,76,7,63,57,67,181,242,47,139,87,115,116,187,69,186,231,157,193,217,175,119,251]}',12:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEMAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[84,220,49,85,231,231,205,206,223,231,112,68,34,157,61,115,234,156,6,203,2,158,212,203,215,170,136,228,68,193,188,13]}',13:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgENAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[237,140,135,226,69,221,118,110,149,250,210,127,140,11,253,163,73,64,189,152,115,51,234,40,195,87,188,107,171,233,96,99]}',14:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEOAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[178,202,9,164,149,122,241,165,109,17,64,83,161,86,55,194,230,149,60,174,236,221,205,150,98,176,28,228,122,182,83,85]}',15:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEPAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[162,91,42,1,93,167,63,154,173,142,135,15,249,131,197,24,69,164,212,169,231,169,19,38,42,86,25,84,219,229,233,20]}',16:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEQAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[79,121,127,12,72,247,127,165,243,18,184,175,76,20,119,251,245,47,31,190,247,87,15,198,47,204,130,99,18,94,161,74]}',17:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgERAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[40,28,55,168,44,135,53,11,9,113,97,54,212,21,163,15,203,241,151,5,117,250,3,22,135,69,113,175,166,166,111,19]}',18:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgESAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[173,252,173,67,1,192,123,156,242,232,253,247,12,147,190,24,152,41,3,166,219,90,110,43,48,139,30,235,10,219,209,58]}'}}},daoFeePools:{packages:{amm:"0x5ad6890968efcf3d20899e0cec735214f1067b96e77e77d86408989998468bb2",events:"0x6f60a091637054e23915b8745c0c0d47b1d49618ee3435b5f68eccf6a44fb53d"},objects:{version:"0xb4bfb0f917f12ad2a772bea9b4f22431f6f5f9653162c3ae6fae5b99b21392b7"}},farms:{packages:{vaults:"0x7ce31301b506b4ed327523061fe95d9c347082fa60da39733f74ffad9a53f8f5",vaultsInitial:"0x4f0a1a923dd063757fd37e04a9c2cee8980008e94433c9075c390065f98e9e4b",vaultsV2:"0x2d6755e10132fc1eab5e8a4a3e7ddfdacc31884621592d95fce48ecf1e157db9",eventsV2:"0x79ee374b9e3c60c00a19fdbeaea25731bbea8f2cab9bb61bb712543e0ba55b7a"},objects:{version:"0xdc372fa9b6a538382efc560478a786fcf04e6e34850100020056c98c5c387193"}},dca:{packages:{dca:"0x409e2ace51cc5821be41a667e4cb9afa64cde49a7f940c68109db24b39ca93b8",events:"0x002134246a32eec18e68f1f5aadb8edd34856298ae6d32c145d28f3ca46c7fd1",eventsV2:"0x409e2ace51cc5821be41a667e4cb9afa64cde49a7f940c68109db24b39ca93b8"},objects:{config:"0x1b26465e9c688e3a3d2301f26e25091bc0f91708d953dc220f5697faa8ba9bd6"}},limitOrders:{packages:{limitOrders:"0xe57ee3613b7dece546f8a2d8a53145cbab41d32b86037b94f9ebfcbcfa66885a",events:"0xe57ee3613b7dece546f8a2d8a53145cbab41d32b86037b94f9ebfcbcfa66885a"}},sharedCustody:{address:"0xafe2fafac0b048c9c70a61cc1798400a85173df96b30118c40af6f3382b5a777",publicKey:"AMylYwVSuJQmTmDm6KuPlNwLnTtkk63HqOByubxxsVeC"},referralVault:{packages:{referralVault:"0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf"},objects:{referralVault:"0x35d35b0e5b177593d8c3a801462485572fc30861e6ce96a55af6dc4730709278"}},suiFrens:{packages:{suiFrens:"",suiFrensBullshark:"",accessories:"",suiFrensVault:"",suiFrensVaultCapyLabsExtension:""},objects:{capyLabsApp:"",suiFrensVault:"",suiFrensVaultStateV1:"",suiFrensVaultStateV1MetadataTable:"",suiFrensVaultCapyLabsExtension:""}},router:{packages:{utils:"0xdc15721baa82ba64822d585a7349a1508f76d94ae80e899b06e48369c257750e"}},dynamicGas:{sponsorAddress:"0xae4ba5f592e695a46d58a0579aa5d4f6ebead46be0f2d5bd229d5c292290548c"},perpetuals:{packages:{events:"0x21d001e8b07da2e3facb3e2d636bbaef43ba3c978bd84810368840b7d57c5068"},objects:{registry:"0xd0b3ea6b7a2f5887543a5a493aa70bcd0ec1a2d9c03d830504234df3e8c6a609"}},perpetualsVaults:{other:{createLpCoinPackageCompilation:'{"modules":["oRzrCwYAAAAKAQAOAg4eAywsBFgIBWBZB7kB4gEImwOAAQabBGcKggUFDIcFLAASAwcBDQIGAhMCFAIVAAICAAIBBwEAAAMADAEAAQMDDAEAAQUEAgAGBQcAAAoAAQABCwEDAAIRBgcBAAMICQoBAgQOBgEBDAQPDwEBDAUQDA0ABgwEBQACBQMIBAsFDgIIAAcIBAACCwIBCAALAwEIAAECAQoCAQgFAQkAAQsBAQkAAQgABwkAAgoCCgIKAgsBAQgFBwgEAgsDAQkACwIBCQABCwIBCAABBggEAQUBCwMBCAACCQAFDENvaW5NZXRhZGF0YQZPcHRpb24IVEVNUExBVEULVHJlYXN1cnlDYXAJVHhDb250ZXh0A1VybARjb2luCWNvbnN0YW50cw9jcmVhdGVfY3VycmVuY3kLZHVtbXlfZmllbGQEaW5pdAtscF9kZWNpbWFscxVuZXdfdW5zYWZlX2Zyb21fYnl0ZXMGb3B0aW9uFHB1YmxpY19mcmVlemVfb2JqZWN0D3B1YmxpY190cmFuc2ZlcgZzZW5kZXIEc29tZQh0ZW1wbGF0ZQh0cmFuc2Zlcgp0eF9jb250ZXh0A3VybAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAp4geY2XwRD2s2t7PYVDqpJGMi7y/Y2DrXnvMyXUc7wvCgIJCFRFTVBMQVRFCgIKCUNPSU4gTkFNRQoCERBDT0lOIERFU0NSSVBUSU9OCgI3Nmh0dHBzOi8vYWZ0ZXJtYXRoLmZpbmFuY2UvY29pbnMvcGVycGV0dWFscy9kZWZhdWx0LnN2ZwACAQkBAAAAAAIUCwARAQcABwEHAgcDEQc4AAoBOAEMAgwDCwI4AgsDCwEuEQY4AwIA"],"dependencies":["0x46234ba81f3a5ba6571383233df0f9ea5fe60a3a327537be1f5fec447bced693","0x9e20798d97c110f6b36b7b3d8543aa9246322ef2fd8d83ad79ef3325d473bc2f","0xa8172ed2a6f14cd0ee55124326685713d6f765039e7c5339f7a0b57be06fddb5","0x21d001e8b07da2e3facb3e2d636bbaef43ba3c978bd84810368840b7d57c5068","0x0000000000000000000000000000000000000000000000000000000000000001","0x0000000000000000000000000000000000000000000000000000000000000002"],"digest":[197,20,191,110,212,210,250,216,46,69,171,178,75,240,176,17,254,237,222,251,192,94,195,175,10,216,89,18,238,154,114,144]}'}},leveragedStaking:{packages:{leveragedAfSui:"",leveragedAfSuiInitial:""},objects:{leveragedAfSuiState:"",afSuiSuiPoolId:""}},scallop:{objects:{version:"",afSuiMarket:"",coinDecimalsRegistry:"",xOracle:""}},nftAmm:{packages:{nftAmm:""},objects:{protocolFeeVault:"",treasury:"",insuranceFund:"",referralVault:""}},nfts:{packages:{mystenTransferPolicy:"0x0cb4bcc0560340eb1a1b929cabe56b33fc6449820ec8c1980d69bb98b649b802"}}};var h=()=>(...r)=>r;var o0=h()("Aftermath","Bolt","Bluefin","BlueMove","Cetus","DeepBook","DeepBookV3","DoubleUpPump","FlowX","FlowXClmm","FullSail","HopFun","Kriya","KriyaClmm","Magma","Metastable","Momentum","MovePump","Obric","SpringSui","Steamm","SuiAi","SuiSwap","Turbos","TurbosFun","BlastFun"),T=class extends f{afApi;constructor(e){super("aftermath",e),this.afApi=new aftermathTsSdk.AftermathApi(this.suiClient,e.addresses??Q),this.client=new aftermathTsSdk.Aftermath("MAINNET",this.afApi),this.poolsMap=new Map(o0.map(A=>[A,true]));}get router(){return this.validateClient(),this.client.Router()}setFetchRouteSettings(e){this.fetchSettings=e;}calcSlippage(e){return e}parseRawRouteToFormattedResult(e){let A=e.coinIn.amount,o={...e,name:this.name};return o.routes.forEach(s=>{let a=s.paths[0].coinIn.amount;s.splitPercentage=bignumber_js.BigNumber(a.toString()).div(A.toString()).times(100).toNumber();}),o}async fetchRoute(e,A){let o=this.normalizeFetchRouteParams(e),{coinInType:s,coinOutType:a,swapAmount:c}=o,t=await this.withTimeout(this.router.getCompleteTradeRouteGivenAmountIn({...this.fetchSettings,protocolWhitelist:this.getEnabledPools(),coinInType:s,coinOutType:a,coinInAmount:c},A));if(!t)throw new Error(`${this.name} fetch route returned empty response`);return this.rawRouteResult=t,{formattedResult:this.parseRawRouteToFormattedResult(t),rawRouteResult:t}}async buildSwapTransaction(e){this.validateWalletAddress();let{txExtensionParams:A,slippage:o,route:s}=e,a=s?.rawRouteResult??this.rawRouteResult;if(!a)throw new Error(`${this.name} build swap transaction failed: no route available`);let c=null,t=null;if(A){let{initTx:d,coinIn:u}=A;c=d,t=u;}else c=new suiKit.Transaction,c.setSender(this.walletAddress),t=await this.selectCoinInForSwap(c,BigInt(a.coinIn.amount.toString()),suiKit.normalizeStructTag(a.coinIn.type));let{tx:n,coinOutId:i}=await this.router.addTransactionForCompleteTradeRoute({walletAddress:this.walletAddress,completeRoute:a,slippage:this.calcSlippage(o),tx:c,coinInId:t});if(!i)throw new Error(`${this.name} build swap transaction failed`);return {tx:n,coinOut:i}}};var r0=h()("aftermath","bluefin","bluemove","cetus","cetus_dlmm","deepbook_v3","ferra_clmm","ferra_dlmm","flowx","flowx_v3","fullsail","kriya","kriya_v3","magma","obric","springsui","steamm","stsui","suiswap","turbos","bluefinx","steamm_oracle_quoter","haedal_pmm","momentum","steamm_oracle_quoter_v2","sevenk_v1"),P=class extends f{commission;constructor(e){super("7k",e),this.commission=e.commission??{partner:this.walletAddress,commissionBps:0},sdkTs.setSuiClient(this.suiClient),this.poolsMap=new Map(r0.map(A=>[A,true]));}setSuiClient(e){super.setSuiClient(e),sdkTs.setSuiClient(e);}setFetchRouteSettings(e){this.fetchSettings=e;}calcSlippage(e){return e}createRoute(e,A,o){let s=[];e.forEach((c,t)=>{s.push({paths:[],coinIn:{type:c.tokenIn,amount:BigInt(bignumber_js.BigNumber(c.tokenInAmount).multipliedBy(A).integerValue().toString())},coinOut:{type:c.tokenOut,amount:BigInt(bignumber_js.BigNumber(c.tokenOutAmount).multipliedBy(o).integerValue().toString())}}),c.hops.forEach(n=>{s[t].paths.push({protocolName:g(n.pool.type.toLowerCase()),coinIn:{type:n.tokenIn,amount:BigInt(bignumber_js.BigNumber(n.tokenInAmount).multipliedBy(A).integerValue().toString())},coinOut:{type:n.tokenOut,amount:BigInt(bignumber_js.BigNumber(n.tokenOutAmount).multipliedBy(o).integerValue().toString())}});});});let a=s.reduce((c,t)=>c+t.coinIn.amount,BigInt(0)).toString();return s.forEach(c=>{c.splitPercentage=bignumber_js.BigNumber(c.coinIn.amount.toString()).div(a).times(100).toNumber();}),s}parseRawRouteToFormattedResult(e){if(!e.routes)throw new Error(`${this.name} fetch route returned empty sorRoute`);return {routes:this.createRoute(e.routes,bignumber_js.BigNumber(e.swapAmountWithDecimal).dividedBy(e.swapAmount).toNumber(),bignumber_js.BigNumber(e.returnAmountAfterCommissionWithDecimal).dividedBy(e.returnAmount).toNumber()),coinIn:{type:e.tokenIn,amount:BigInt(e.swapAmountWithDecimal)},coinOut:{type:e.tokenOut,amount:BigInt(e.returnAmountAfterCommissionWithDecimal)},name:this.name}}async fetchRoute(e,A){let o=this.normalizeFetchRouteParams(e),{coinInType:s,coinOutType:a,swapAmount:c}=o,t=await this.withTimeout(sdkTs.getQuote({...this.fetchSettings,tokenIn:s,tokenOut:a,amountIn:c.toString(),sources:this.getEnabledPools()}),A);if(!t)throw new Error(`${this.name} fetch route returned empty response`);return this.rawRouteResult=t,{formattedResult:this.parseRawRouteToFormattedResult(t),rawRouteResult:t}}async buildSwapTransaction(e){this.validateWalletAddress();let{txExtensionParams:A,slippage:o,route:s}=e,a=s?.rawRouteResult??this.rawRouteResult;if(!a)throw new Error(`${this.name} build swap transaction failed: no route available`);let c=null,t=null;if(A){let{initTx:d,coinIn:u}=A;c=d,t=u;}else c=new suiKit.Transaction,c.setSender(this.walletAddress),t=await this.selectCoinInForSwap(c,BigInt(a.swapAmountWithDecimal),suiKit.normalizeStructTag(a.tokenIn));let{tx:n,coinOut:i}=await sdkTs.buildTx({quoteResponse:a,slippage:this.calcSlippage(o),commission:this.commission,accountAddress:this.walletAddress,extendTx:{tx:c,coinIn:t}});if(!i)throw new Error(`${this.name} build swap transaction failed`);return {tx:"txBytes"in n?suiKit.Transaction.from(n.txBytes):n,coinOut:i}}};var Y=class extends f{client=new sdk.AggregatorQuoter("mainnet");commission;constructor(e){super("flowx",e),this.commission=e.commission,this.poolsMap=new Map(Object.values(sdk.Protocol).map(A=>[A,true]));}setFetchRouteSettings(e){this.fetchSettings=e;}calcSlippage(e){return bignumber_js.BigNumber(e).multipliedBy(1e6).integerValue().toNumber()}parseRawRouteToFormattedResult(e){let A=[];for(let o of e.routes)A.push({paths:o.paths.map(s=>({protocolName:g(s.protocol()?.toLowerCase()??""),coinIn:{amount:BigInt((s.amountIn??0).toString()),type:s.input.coinType},coinOut:{amount:BigInt((s.amountOut??0).toString()),type:s.output.coinType}})),splitPercentage:Number(o.amountIn??0)/Number(this.rawRouteResult?.amountIn??1)*100,coinIn:{amount:BigInt(o.amountIn.toString()),type:utils.normalizeStructTag(o.input.coinType)},coinOut:{amount:BigInt(o.amountOut.toString()),type:utils.normalizeStructTag(o.output.coinType)}});return {routes:A,coinIn:{type:utils.normalizeStructTag(e.coinIn.coinType),amount:BigInt(e.amountIn.toString())},coinOut:{type:utils.normalizeStructTag(e.coinOut.coinType),amount:BigInt(e.amountOut.toString())},name:this.name}}async fetchRoute(e,A){this.validateClient();let o=this.normalizeFetchRouteParams(e),{coinInType:s,coinOutType:a,swapAmount:c}=o,t=await this.withTimeout(this.client.getRoutes({...this.fetchSettings,tokenIn:s,tokenOut:a,amountIn:c.toString(),commission:this.commission,includeSources:this.getEnabledPools()}),A);if(!t)throw new Error(`${this.name} fetch route returned empty response`);return this.rawRouteResult=t,{formattedResult:this.parseRawRouteToFormattedResult(t),rawRouteResult:t}}async buildSwapTransaction(e){this.validateWalletAddress();let{txExtensionParams:A,slippage:o,route:s}=e,a=s?.rawRouteResult??this.rawRouteResult;if(!a)throw new Error(`${this.name} build swap transaction failed: no route available`);let c=null,t=null;if(A){let{initTx:u,coinIn:V}=A;c=u,t=V;}else c=new transactions.Transaction,c.setSender(this.walletAddress),t=await this.selectCoinInForSwap(c,BigInt(a.amountIn.toString()),utils.normalizeStructTag(a.coinIn.coinType));let n=new sdk.TradeBuilder("mainnet",a.routes).sender(this.walletAddress).slippage(this.calcSlippage(o)).deadline(Date.now()+60*60*1e3),d=await(this.commission?n.commission(this.commission).build():n.build()).swap({client:this.suiClient,tx:c,coinIn:t});if(!d)throw new Error(`${this.name} build swap transaction failed`);return {tx:c,coinOut:d}}};
19
+ var Z=utils.normalizeStructTag(utils.SUI_TYPE_ARG),B=r=>utils.normalizeStructTag(r)===Z,E=async(r,e,A,o)=>{let c=[],a=bignumber_js.BigNumber(A),s=null;try{do{let{data:t,hasNextPage:n,nextCursor:i}=await r.getCoins({coinType:e,owner:o,limit:50,cursor:s});if(c.push(...t),a=a.minus(t.reduce((d,u)=>d.plus(bignumber_js.BigNumber(u.balance)),bignumber_js.BigNumber(0))),a.lte(0)||(s=i??null,!n))break}while(s)}catch(t){throw new Error(t?.message??"Failed to fetch coins")}if(c.length===0)throw new Error(`No available coin for type ${e} found in wallet ${o}`);if(a.gt(0))throw new Error(`Insufficient balance for coin type ${e} in wallet ${o}`);return c},S=async(r,e,A,o,c)=>{try{if(B(o))r.mergeCoins(r.gas,[e]);else {let{data:a}=await A.getCoins({coinType:o,owner:c,limit:1});if(!a.length)throw new Error(`No existing ${o} coin found to merge with`);let s=r.objectRef({objectId:a[0].coinObjectId,version:a[0].version,digest:a[0].digest});a.length===1?r.mergeCoins(s,[e]):r.mergeCoins(s,[e,...a.slice(1).map(t=>r.objectRef({objectId:t.coinObjectId,version:t.version,digest:t.digest}))]);}}catch{r.transferObjects([e],r.pure.address(c));}},U=r=>r[0].toUpperCase()+r.slice(1),g=r=>r.split("_").map(U).join(" ");var b=class extends events.EventEmitter{on(e,A){return super.on(e,A)}once(e,A){return super.once(e,A)}off(e,A){return super.off(e,A)}emit(e,A){return super.emit(e,A)}};var f=class{rawRouteResult;name="";events=new b;client;suiClient;fetchTimeoutInMs;walletAddress;fetchSettings;poolsMap=new Map;constructor(e,A){this.suiClient=A.suiClient??new client.SuiClient({url:client.getFullnodeUrl("mainnet")}),this.fetchTimeoutInMs=A.fetchTimeoutInMs??4e3,this.walletAddress=A.walletAddress,this.name=e.toLowerCase(),A.fetchSettings&&this.setFetchRouteSettings(A.fetchSettings);}get pools(){return Array.from(this.poolsMap.keys())}validateWalletAddress(){if(!this.walletAddress||this.walletAddress.length===0)throw new Error("Wallet address is not set")}validateClient(){if(!this.client)throw new Error("SDK client is not set")}setWalletAddress(e){this.walletAddress=e;}setSuiClient(e){this.suiClient=e;}togglePoolStatus(e,A){let o=A??!(this.poolsMap.get(e)??true);this.poolsMap.set(e,o),this.events.emit("poolStatusChanged",{name:this.name,pool:e,enabled:o});}toggleAllPoolStatus(e){this.pools.forEach(A=>{this.poolsMap.set(A,e);}),this.events.emit("allPoolStatusChanged",{name:this.name,enabled:e});}getEnabledPools(){return Array.from(this.poolsMap.entries()).filter(([e,A])=>A).map(([e,A])=>e)}normalizeFetchRouteParams(e){return {...e,coinInType:suiKit.normalizeStructTag(e.coinInType),coinOutType:suiKit.normalizeStructTag(e.coinOutType)}}async withTimeout(e,A){let o,c,a=[e,new Promise((s,t)=>{o=setTimeout(()=>{t(new Error(`${this.name} fetch route timeout`));},this.fetchTimeoutInMs);})];A&&a.push(new Promise((s,t)=>{if(A.aborted){t(A.reason??new Error(`${this.name} fetch route aborted`));return}c=()=>t(A.reason??new Error(`${this.name} fetch route aborted`)),A.addEventListener("abort",c,{once:true});}));try{return await Promise.race(a)}finally{o&&clearTimeout(o),A&&c&&A.removeEventListener("abort",c);}}async selectCoinInForSwap(e,A,o){let c=bignumber_js.BigNumber(A.toString());if(B(o)){let[a]=e.splitCoins(e.gas,[c.toString()]);return a}else {let a=await this.selectCoins(o,c.toString()),s=a.reduce((n,i)=>n.plus(bignumber_js.BigNumber(i.balance)),bignumber_js.BigNumber(0)),t=e.objectRef({objectId:a[0].coinObjectId,version:a[0].version,digest:a[0].digest});if(a.length>1&&e.mergeCoins(t,a.slice(1).map(n=>e.objectRef({objectId:n.coinObjectId,version:n.version,digest:n.digest}))),s.gt(c)){let[n]=e.splitCoins(t,[c.toString()]);return n}else return t}}async selectCoins(e,A){return this.validateWalletAddress(),await E(this.suiClient,e,A,this.walletAddress)}};var p=class{constructor(e,A){this.client=e;A&&A.forEach(o=>this.cache.set(o.coinType,o));}cache=new Map;setClient(e){this.client=e;}async getCoinMetadata(e){let A=utils.normalizeStructTag(e);if(this.cache.has(A))return this.cache.get(A);let o=await this.client.getCoinMetadata({coinType:A});if(!o)throw new Error(`Coin metadata not found for coin type: ${A}`);return this.cache.set(A,o),o}};var F=class{coinMetadata;suiKit;events=new b;_slippage=.003;signerMode=false;aggregatorMap=new Map;activeAggregator=new Map;_fetchingStatus=new Map;poolStatusForwarders=new Map;walletAddress;client;constructor(e){if(this.client=e.client??new client.SuiClient({url:e.fullnodeUrl||"https://fullnode.mainnet.sui.io:443"}),this.coinMetadata=new p(this.client),this.signerMode=!!(e.secretKey||e.mnemonics),e.secretKey||e.mnemonics)this.suiKit=new suiKit.SuiKit({...e,suiClients:[this.client]}),this.walletAddress=this.suiKit.currentAddress;else if(e.walletAddress!==void 0)this.walletAddress=e.walletAddress;else throw new Error("One of secretKey, mnemonics or walletAddress must be provided")}forwardPoolStatusChangeEvent(e){this.events.emit("poolStatusChanged",e);}addAggregator(e){for(let A of e)if(!this.aggregatorMap.has(A.name)){this.aggregatorMap.set(A.name,A),this.activeAggregator.set(A.name,true),this._fetchingStatus.set(A.name,false);let o=c=>this.forwardPoolStatusChangeEvent(c);this.poolStatusForwarders.set(A.name,o),A.events.on("poolStatusChanged",o),this.events.emit("aggregatorAdded",{name:A.name});}}getActiveAggregators(){return Array.from(this.activeAggregator.entries()).filter(([e,A])=>A).map(([e,A])=>e)}getAggregator(e){return this.aggregatorMap.get(e)}toggleAggregator(e,A){if(!this.activeAggregator.has(e))throw new Error(`Aggregator ${e} not found`);this.activeAggregator.set(e,A),this.events.emit("aggregatorStatusChanged",{name:e,enabled:A});}removeAggregator(e){let A=this.aggregatorMap.get(e);if(!A)throw new Error(`Aggregator ${e} not found`);let o=this.poolStatusForwarders.get(e);o&&A.events.off("poolStatusChanged",o),this.poolStatusForwarders.delete(e),this.aggregatorMap.delete(e),this.activeAggregator.delete(e),this._fetchingStatus.delete(e),this.events.emit("aggregatorRemoved",{name:e});}get aggregators(){return Array.from(this.aggregatorMap.values())}get fetchingStatus(){return Object.fromEntries(this._fetchingStatus)}get slippage(){return this._slippage}setSlippage(e){this._slippage=e,this.events.emit("aggregatorSlippageChanged",{slippageInDecimal:e});}setFetchTimeoutInMs(e){this.aggregators.forEach(A=>{A.fetchTimeoutInMs=e;});}#e(){if(!this.suiKit)throw new Error("SuiKit is not initialized.")}setSuiClient(e){this.aggregators.forEach(A=>{A.setSuiClient(e);}),this.coinMetadata.setClient(e),this.client=e;}setWalletAddress(e){if(this.signerMode)throw new Error("Cannot change wallet address when SuiKit is initialized with secretKey or mnemonics.");if(!utils.isValidSuiAddress(e))throw new Error("Invalid Sui wallet address");this.walletAddress=e,this.aggregators.forEach(A=>{A.setWalletAddress(e);});}async getCoinMetadata(e){return this.coinMetadata.getCoinMetadata(e)}async fetchRoutes(e,A){let o=this.aggregators.filter(({name:t})=>this.activeAggregator.get(t)===true),c=[],a=[],s=o.map(async t=>{this._fetchingStatus.set(t.name,true),this.events.emit("aggregatorFetchStart",{name:t.name});try{let n=await t.fetchRoute(e,A?.abortSignal);c.push(n),A?.onRouteFound?.(n);}catch(n){let i={name:t.name,reason:n};a.push(i),A?.onError?.(i);}finally{this._fetchingStatus.set(t.name,false),this.events.emit("aggregatorFetchEnd",{name:t.name});}});return await Promise.all(s),{routes:c.sort((t,n)=>bignumber_js.BigNumber(n.formattedResult.coinOut.amount).comparedTo(t.formattedResult.coinOut.amount)??0),errors:a}}async buildRouteTransaction(e,A={}){let{mergeResult:o=true,txExtensionParams:c}=A,a=this.aggregatorMap.get(e.formattedResult.name);if(!a)throw new Error(`Aggregator ${e.formattedResult.name} not found in the aggregator list`);let{tx:s,coinOut:t}=await a.buildSwapTransaction({route:e,slippage:A.slippage??this.slippage,txExtensionParams:c}),n=e.formattedResult.coinOut.type;return o?(await S(s,t,this.client,n,this.walletAddress),{tx:s,coinOutType:n}):{tx:s,coinOut:t,coinOutType:n}}async executeSwapTransaction(e,A=false){return this.#e(),A?this.suiKit.dryRunTxn(e):this.suiKit.signAndSendTxn(e)}};var y=class extends f{constructor(e){super("cetus",e),this.client=new aggregatorSdk.AggregatorClient({...e,endpoint:e.endpoint??"https://api-sui.cetus.zone/router_v3/find_routes",signer:e.signer??this.walletAddress,client:this.suiClient,env:aggregatorSdk.Env.Mainnet}),this.poolsMap=new Map(aggregatorSdk.ALL_DEXES.map(A=>[A,true]));}createRoute(e,A,o){let c=[],a=null;for(let t of e)t.from===A&&(a={paths:[],coinIn:{type:t.from,amount:BigInt(t.amountIn)},coinOut:{type:t.target,amount:BigInt(t.amountOut)}},c.push(a)),a&&(a.paths.push({protocolName:t.provider,coinIn:{type:t.from,amount:BigInt(t.amountIn)},coinOut:{type:t.target,amount:BigInt(t.amountOut)}}),a.coinOut={type:t.target,amount:BigInt(t.amountOut)},t.target===o&&(a=null));let s=c.reduce((t,n)=>t+n.coinIn.amount,BigInt(0)).toString();return s!=="0"&&c.forEach(t=>{t.splitPercentage=bignumber_js.BigNumber(t.coinIn.amount.toString()).div(s).times(100).toNumber();}),c}parseRawToFormattedResult({routerData:e,coinInType:A,coinOutType:o}){return {coinIn:{type:A,amount:BigInt(e.amountIn.toString()??"0")},coinOut:{type:o,amount:BigInt(e.amountOut.toString()??"0")},routes:this.createRoute(e.paths,A,o)}}setFetchRouteSettings(e){this.fetchSettings=e;}calcSlippage(e){return e}async fetchRoute(e,A){this.validateClient();let o=this.normalizeFetchRouteParams(e),{coinInType:c,coinOutType:a,swapAmount:s}=o;this.rawRouteResult=void 0;let t=await this.withTimeout(this.client.findRouters({...this.fetchSettings,from:utils.normalizeStructTag(c),target:utils.normalizeStructTag(a),amount:new ___default.default(s.toString()),byAmountIn:true,providers:this.getEnabledPools()}),A);if(!t)throw new Error(`${this.name} fetch route returned empty response`);return this.rawRouteResult=t,{formattedResult:{...this.parseRawToFormattedResult({routerData:t,coinInType:c,coinOutType:a}),name:this.name},rawRouteResult:t}}async buildSwapTransaction(e){this.validateWalletAddress(),this.validateClient();let{txExtensionParams:A,slippage:o,route:c}=e,a=c?.rawRouteResult??this.rawRouteResult;if(!a)throw new Error(`${this.name} buildSwapTransaction requires a route, but none was provided or fetched.`);let s=null,t=null;if(A){let{initTx:i,coinIn:d}=A;s=i,t=d;}else s=new transactions.Transaction,s.setSender(this.walletAddress),t=await this.selectCoinInForSwap(s,BigInt(a.amountIn.toString()),utils.normalizeStructTag(a.paths[0].from));let n=await this.client.routerSwap({router:a,txb:s,slippage:this.calcSlippage(o),inputCoin:t});return {tx:s,coinOut:n}}};var Q={faucet:{packages:{faucet:"",suiFrensGenesisWrapper:""},objects:{faucet:"",suiFrensMint:""}},staking:{packages:{events:"0x7f6ce7ade63857c4fd16ef7783fed2dfc4d7fb7e40615abdb653030b76aef0c6",lsd:"0x1575034d2729907aefca1ac757d6ccfcd3fc7e9e77927523c06007d8353ad836",afsui:"0xf325ce1300e8dac124071d3152c5c5ee6174914f8bc2161e88329cf579246efc"},objects:{stakedSuiVault:"0x2f8f6d5da7f13ea37daa397724280483ed062769813b6f31e9788e59cc88994d",stakedSuiVaultState:"0x55486449e41d89cfbdb20e005c1c5c1007858ad5b4d5d7c047d2b3b592fe8791",safe:"0xeb685899830dd5837b47007809c76d91a098d52aabbf61e8ac467c59e5cc4610",treasury:"0xd2b95022244757b0ab9f74e2ee2fb2c3bf29dce5590fa6993a85d64bd219d7e8",referralVault:"0x4ce9a19b594599536c53edb25d22532f82f18038dc8ef618afd00fbbfb9845ef",validatorConfigsTable:"0x8536350cfb8a8efdd133a1e087b55416d431f7e8b894f77b55b20c4b799ebad9",aftermathValidator:"0xd30018ec3f5ff1a3c75656abf927a87d7f0529e6dc89c7ddd1bd27ecb05e3db2"}},pools:{packages:{amm:"0xc4049b2d1cc0f6e017fda8260e4377cecd236bd7f56a54fee120816e72e2e0dd",ammInterface:"0x8d8bba50c626753589aa5abbc006c9fa07736f55f4e6fb57481682997c0b0d52",events:"0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c",eventsV2:"0xc4049b2d1cc0f6e017fda8260e4377cecd236bd7f56a54fee120816e72e2e0dd"},objects:{poolRegistry:"0xfcc774493db2c45c79f688f88d28023a3e7d98e4ee9f48bbf5c7990f651577ae",protocolFeeVault:"0xf194d9b1bcad972e45a7dd67dd49b3ee1e3357a00a50850c52cd51bb450e13b4",treasury:"0x28e499dff5e864a2eafe476269a4f5035f1c16f338da7be18b103499abf271ce",insuranceFund:"0xf0c40d67b078000e18032334c3325c47b9ec9f3d9ae4128be820d54663d14e3b",lpCoinsTable:"0x7f3bb65251feccacc7f48461239be1008233b85594114f7bf304e5e5b340bf59"},other:{createLpCoinPackageCompilations:{0:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEAAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[167,102,246,194,32,223,3,45,134,147,18,9,59,94,154,58,126,34,119,96,13,193,175,198,63,222,118,4,234,110,46,214]}',1:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEBAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[68,93,25,253,95,37,116,117,115,245,79,81,250,68,193,193,125,175,148,139,217,235,215,33,240,45,78,14,3,86,156,253]}',2:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgECAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[226,124,21,102,7,55,200,164,249,68,13,253,43,195,52,31,88,207,26,30,152,251,208,57,135,126,235,45,23,164,119,82]}',3:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEDAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[1,144,16,189,84,90,47,167,188,222,48,174,25,190,46,185,6,221,67,91,132,40,116,30,179,102,100,127,83,12,109,13]}',4:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEEAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[188,181,24,0,200,201,56,67,47,157,254,230,47,200,183,173,203,125,184,180,21,175,170,42,167,82,194,112,35,226,84,160]}',5:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEFAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[139,229,11,229,58,97,20,164,146,173,45,172,225,131,71,62,84,106,77,218,122,249,243,255,146,34,28,60,77,35,55,138]}',6:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEGAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[57,76,77,44,68,157,60,123,68,75,189,64,53,35,82,187,207,42,126,62,112,57,251,96,190,255,39,160,152,130,157,52]}',7:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEHAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[123,60,245,235,196,138,131,187,192,81,41,5,55,144,176,99,178,245,228,90,186,155,175,11,175,182,127,251,112,69,207,36]}',8:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEIAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[62,140,187,2,13,226,252,216,57,79,25,215,73,0,30,117,240,181,17,67,90,160,116,93,0,185,100,177,98,158,120,249]}',9:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEJAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[224,168,250,132,113,73,22,162,90,31,20,5,146,218,102,211,9,26,235,144,153,60,68,242,99,43,182,103,163,123,70,243]}',10:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEKAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[230,2,103,229,53,229,25,139,165,170,103,184,37,95,22,138,144,54,70,94,84,1,166,69,226,228,2,111,190,177,88,67]}',11:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgELAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[47,22,229,32,128,229,189,95,254,208,76,7,63,57,67,181,242,47,139,87,115,116,187,69,186,231,157,193,217,175,119,251]}',12:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEMAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[84,220,49,85,231,231,205,206,223,231,112,68,34,157,61,115,234,156,6,203,2,158,212,203,215,170,136,228,68,193,188,13]}',13:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgENAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[237,140,135,226,69,221,118,110,149,250,210,127,140,11,253,163,73,64,189,152,115,51,234,40,195,87,188,107,171,233,96,99]}',14:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEOAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[178,202,9,164,149,122,241,165,109,17,64,83,161,86,55,194,230,149,60,174,236,221,205,150,98,176,28,228,122,182,83,85]}',15:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEPAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[162,91,42,1,93,167,63,154,173,142,135,15,249,131,197,24,69,164,212,169,231,169,19,38,42,86,25,84,219,229,233,20]}',16:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEQAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[79,121,127,12,72,247,127,165,243,18,184,175,76,20,119,251,245,47,31,190,247,87,15,198,47,204,130,99,18,94,161,74]}',17:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgERAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[40,28,55,168,44,135,53,11,9,113,97,54,212,21,163,15,203,241,151,5,117,250,3,22,135,69,113,175,166,166,111,19]}',18:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgESAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[173,252,173,67,1,192,123,156,242,232,253,247,12,147,190,24,152,41,3,166,219,90,110,43,48,139,30,235,10,219,209,58]}'}}},daoFeePools:{packages:{amm:"0x5ad6890968efcf3d20899e0cec735214f1067b96e77e77d86408989998468bb2",events:"0x6f60a091637054e23915b8745c0c0d47b1d49618ee3435b5f68eccf6a44fb53d"},objects:{version:"0xb4bfb0f917f12ad2a772bea9b4f22431f6f5f9653162c3ae6fae5b99b21392b7"}},farms:{packages:{vaults:"0x7ce31301b506b4ed327523061fe95d9c347082fa60da39733f74ffad9a53f8f5",vaultsInitial:"0x4f0a1a923dd063757fd37e04a9c2cee8980008e94433c9075c390065f98e9e4b",vaultsV2:"0x2d6755e10132fc1eab5e8a4a3e7ddfdacc31884621592d95fce48ecf1e157db9",eventsV2:"0x79ee374b9e3c60c00a19fdbeaea25731bbea8f2cab9bb61bb712543e0ba55b7a"},objects:{version:"0xdc372fa9b6a538382efc560478a786fcf04e6e34850100020056c98c5c387193"}},dca:{packages:{dca:"0x409e2ace51cc5821be41a667e4cb9afa64cde49a7f940c68109db24b39ca93b8",events:"0x002134246a32eec18e68f1f5aadb8edd34856298ae6d32c145d28f3ca46c7fd1",eventsV2:"0x409e2ace51cc5821be41a667e4cb9afa64cde49a7f940c68109db24b39ca93b8"},objects:{config:"0x1b26465e9c688e3a3d2301f26e25091bc0f91708d953dc220f5697faa8ba9bd6"}},limitOrders:{packages:{limitOrders:"0xe57ee3613b7dece546f8a2d8a53145cbab41d32b86037b94f9ebfcbcfa66885a",events:"0xe57ee3613b7dece546f8a2d8a53145cbab41d32b86037b94f9ebfcbcfa66885a"}},sharedCustody:{address:"0xafe2fafac0b048c9c70a61cc1798400a85173df96b30118c40af6f3382b5a777",publicKey:"AMylYwVSuJQmTmDm6KuPlNwLnTtkk63HqOByubxxsVeC"},referralVault:{packages:{referralVault:"0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf"},objects:{referralVault:"0x35d35b0e5b177593d8c3a801462485572fc30861e6ce96a55af6dc4730709278"}},suiFrens:{packages:{suiFrens:"",suiFrensBullshark:"",accessories:"",suiFrensVault:"",suiFrensVaultCapyLabsExtension:""},objects:{capyLabsApp:"",suiFrensVault:"",suiFrensVaultStateV1:"",suiFrensVaultStateV1MetadataTable:"",suiFrensVaultCapyLabsExtension:""}},router:{packages:{utils:"0xdc15721baa82ba64822d585a7349a1508f76d94ae80e899b06e48369c257750e"}},dynamicGas:{sponsorAddress:"0xae4ba5f592e695a46d58a0579aa5d4f6ebead46be0f2d5bd229d5c292290548c"},perpetuals:{packages:{events:"0x21d001e8b07da2e3facb3e2d636bbaef43ba3c978bd84810368840b7d57c5068"},objects:{registry:"0xd0b3ea6b7a2f5887543a5a493aa70bcd0ec1a2d9c03d830504234df3e8c6a609"}},perpetualsVaults:{other:{createLpCoinPackageCompilation:'{"modules":["oRzrCwYAAAAKAQAOAg4eAywsBFgIBWBZB7kB4gEImwOAAQabBGcKggUFDIcFLAASAwcBDQIGAhMCFAIVAAICAAIBBwEAAAMADAEAAQMDDAEAAQUEAgAGBQcAAAoAAQABCwEDAAIRBgcBAAMICQoBAgQOBgEBDAQPDwEBDAUQDA0ABgwEBQACBQMIBAsFDgIIAAcIBAACCwIBCAALAwEIAAECAQoCAQgFAQkAAQsBAQkAAQgABwkAAgoCCgIKAgsBAQgFBwgEAgsDAQkACwIBCQABCwIBCAABBggEAQUBCwMBCAACCQAFDENvaW5NZXRhZGF0YQZPcHRpb24IVEVNUExBVEULVHJlYXN1cnlDYXAJVHhDb250ZXh0A1VybARjb2luCWNvbnN0YW50cw9jcmVhdGVfY3VycmVuY3kLZHVtbXlfZmllbGQEaW5pdAtscF9kZWNpbWFscxVuZXdfdW5zYWZlX2Zyb21fYnl0ZXMGb3B0aW9uFHB1YmxpY19mcmVlemVfb2JqZWN0D3B1YmxpY190cmFuc2ZlcgZzZW5kZXIEc29tZQh0ZW1wbGF0ZQh0cmFuc2Zlcgp0eF9jb250ZXh0A3VybAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAp4geY2XwRD2s2t7PYVDqpJGMi7y/Y2DrXnvMyXUc7wvCgIJCFRFTVBMQVRFCgIKCUNPSU4gTkFNRQoCERBDT0lOIERFU0NSSVBUSU9OCgI3Nmh0dHBzOi8vYWZ0ZXJtYXRoLmZpbmFuY2UvY29pbnMvcGVycGV0dWFscy9kZWZhdWx0LnN2ZwACAQkBAAAAAAIUCwARAQcABwEHAgcDEQc4AAoBOAEMAgwDCwI4AgsDCwEuEQY4AwIA"],"dependencies":["0x46234ba81f3a5ba6571383233df0f9ea5fe60a3a327537be1f5fec447bced693","0x9e20798d97c110f6b36b7b3d8543aa9246322ef2fd8d83ad79ef3325d473bc2f","0xa8172ed2a6f14cd0ee55124326685713d6f765039e7c5339f7a0b57be06fddb5","0x21d001e8b07da2e3facb3e2d636bbaef43ba3c978bd84810368840b7d57c5068","0x0000000000000000000000000000000000000000000000000000000000000001","0x0000000000000000000000000000000000000000000000000000000000000002"],"digest":[197,20,191,110,212,210,250,216,46,69,171,178,75,240,176,17,254,237,222,251,192,94,195,175,10,216,89,18,238,154,114,144]}'}},leveragedStaking:{packages:{leveragedAfSui:"",leveragedAfSuiInitial:""},objects:{leveragedAfSuiState:"",afSuiSuiPoolId:""}},scallop:{objects:{version:"",afSuiMarket:"",coinDecimalsRegistry:"",xOracle:""}},nftAmm:{packages:{nftAmm:""},objects:{protocolFeeVault:"",treasury:"",insuranceFund:"",referralVault:""}},nfts:{packages:{mystenTransferPolicy:"0x0cb4bcc0560340eb1a1b929cabe56b33fc6449820ec8c1980d69bb98b649b802"}}};var h=()=>(...r)=>r;var o0=h()("Aftermath","Bolt","Bluefin","BlueMove","Cetus","DeepBook","DeepBookV3","DoubleUpPump","FlowX","FlowXClmm","FullSail","HopFun","Kriya","KriyaClmm","Magma","Metastable","Momentum","MovePump","Obric","SpringSui","Steamm","SuiAi","SuiSwap","Turbos","TurbosFun","BlastFun"),T=class extends f{afApi;constructor(e){super("aftermath",e),this.afApi=new aftermathTsSdk.AftermathApi(this.suiClient,e.addresses??Q),this.client=new aftermathTsSdk.Aftermath("MAINNET",this.afApi),this.poolsMap=new Map(o0.map(A=>[A,true]));}get router(){return this.validateClient(),this.client.Router()}setFetchRouteSettings(e){this.fetchSettings=e;}calcSlippage(e){return e}parseRawRouteToFormattedResult(e){let A=e.coinIn.amount,o={...e,name:this.name};return o.routes.forEach(c=>{let a=c.paths[0].coinIn.amount;c.splitPercentage=bignumber_js.BigNumber(a.toString()).div(A.toString()).times(100).toNumber();}),o}async fetchRoute(e,A){let o=this.normalizeFetchRouteParams(e),{coinInType:c,coinOutType:a,swapAmount:s}=o;this.rawRouteResult=void 0;let t=await this.withTimeout(this.router.getCompleteTradeRouteGivenAmountIn({...this.fetchSettings,protocolWhitelist:this.getEnabledPools(),coinInType:c,coinOutType:a,coinInAmount:s},A));if(!t)throw new Error(`${this.name} fetch route returned empty response`);return this.rawRouteResult=t,{formattedResult:this.parseRawRouteToFormattedResult(t),rawRouteResult:t}}async buildSwapTransaction(e){this.validateWalletAddress();let{txExtensionParams:A,slippage:o,route:c}=e,a=c?.rawRouteResult??this.rawRouteResult;if(!a)throw new Error(`${this.name} build swap transaction failed: no route available`);let s=null,t=null;if(A){let{initTx:d,coinIn:u}=A;s=d,t=u;}else s=new suiKit.Transaction,s.setSender(this.walletAddress),t=await this.selectCoinInForSwap(s,BigInt(a.coinIn.amount.toString()),suiKit.normalizeStructTag(a.coinIn.type));let{tx:n,coinOutId:i}=await this.router.addTransactionForCompleteTradeRoute({walletAddress:this.walletAddress,completeRoute:a,slippage:this.calcSlippage(o),tx:s,coinInId:t});if(!i)throw new Error(`${this.name} build swap transaction failed`);return {tx:n,coinOut:i}}};var r0=h()("aftermath","bluefin","bluemove","cetus","cetus_dlmm","deepbook_v3","ferra_clmm","ferra_dlmm","flowx","flowx_v3","fullsail","kriya","kriya_v3","magma","obric","springsui","steamm","stsui","suiswap","turbos","bluefinx","steamm_oracle_quoter","haedal_pmm","momentum","steamm_oracle_quoter_v2","sevenk_v1"),P=class extends f{commission;constructor(e){super("7k",e),this.commission=e.commission??{partner:this.walletAddress,commissionBps:0},sdkTs.setSuiClient(this.suiClient),this.poolsMap=new Map(r0.map(A=>[A,true]));}setSuiClient(e){super.setSuiClient(e),sdkTs.setSuiClient(e);}setFetchRouteSettings(e){this.fetchSettings=e;}calcSlippage(e){return e}createRoute(e,A,o){let c=[];e.forEach((s,t)=>{c.push({paths:[],coinIn:{type:s.tokenIn,amount:BigInt(bignumber_js.BigNumber(s.tokenInAmount).multipliedBy(A).integerValue().toString())},coinOut:{type:s.tokenOut,amount:BigInt(bignumber_js.BigNumber(s.tokenOutAmount).multipliedBy(o).integerValue().toString())}}),s.hops.forEach(n=>{c[t].paths.push({protocolName:g(n.pool.type.toLowerCase()),coinIn:{type:n.tokenIn,amount:BigInt(bignumber_js.BigNumber(n.tokenInAmount).multipliedBy(A).integerValue().toString())},coinOut:{type:n.tokenOut,amount:BigInt(bignumber_js.BigNumber(n.tokenOutAmount).multipliedBy(o).integerValue().toString())}});});});let a=c.reduce((s,t)=>s+t.coinIn.amount,BigInt(0)).toString();return c.forEach(s=>{s.splitPercentage=bignumber_js.BigNumber(s.coinIn.amount.toString()).div(a).times(100).toNumber();}),c}parseRawRouteToFormattedResult(e){if(!e.routes)throw new Error(`${this.name} fetch route returned empty sorRoute`);return {routes:this.createRoute(e.routes,bignumber_js.BigNumber(e.swapAmountWithDecimal).dividedBy(e.swapAmount).toNumber(),bignumber_js.BigNumber(e.returnAmountAfterCommissionWithDecimal).dividedBy(e.returnAmount).toNumber()),coinIn:{type:e.tokenIn,amount:BigInt(e.swapAmountWithDecimal)},coinOut:{type:e.tokenOut,amount:BigInt(e.returnAmountAfterCommissionWithDecimal)},name:this.name}}async fetchRoute(e,A){let o=this.normalizeFetchRouteParams(e),{coinInType:c,coinOutType:a,swapAmount:s}=o;this.rawRouteResult=void 0;let t=await this.withTimeout(sdkTs.getQuote({...this.fetchSettings,tokenIn:c,tokenOut:a,amountIn:s.toString(),sources:this.getEnabledPools()}),A);if(!t)throw new Error(`${this.name} fetch route returned empty response`);return this.rawRouteResult=t,{formattedResult:this.parseRawRouteToFormattedResult(t),rawRouteResult:t}}async buildSwapTransaction(e){this.validateWalletAddress();let{txExtensionParams:A,slippage:o,route:c}=e,a=c?.rawRouteResult??this.rawRouteResult;if(!a)throw new Error(`${this.name} build swap transaction failed: no route available`);let s=null,t=null;if(A){let{initTx:d,coinIn:u}=A;s=d,t=u;}else s=new suiKit.Transaction,s.setSender(this.walletAddress),t=await this.selectCoinInForSwap(s,BigInt(a.swapAmountWithDecimal),suiKit.normalizeStructTag(a.tokenIn));let{tx:n,coinOut:i}=await sdkTs.buildTx({quoteResponse:a,slippage:this.calcSlippage(o),commission:this.commission,accountAddress:this.walletAddress,extendTx:{tx:s,coinIn:t}});if(!i)throw new Error(`${this.name} build swap transaction failed`);return {tx:"txBytes"in n?suiKit.Transaction.from(n.txBytes):n,coinOut:i}}};var Y=class extends f{client=new sdk.AggregatorQuoter("mainnet");commission;constructor(e){super("flowx",e),this.commission=e.commission,this.poolsMap=new Map(Object.values(sdk.Protocol).map(A=>[A,true]));}setFetchRouteSettings(e){this.fetchSettings=e;}calcSlippage(e){return bignumber_js.BigNumber(e).multipliedBy(1e6).integerValue().toNumber()}parseRawRouteToFormattedResult(e){let A=[];for(let o of e.routes)A.push({paths:o.paths.map(c=>({protocolName:g(c.protocol()?.toLowerCase()??""),coinIn:{amount:BigInt((c.amountIn??0).toString()),type:c.input.coinType},coinOut:{amount:BigInt((c.amountOut??0).toString()),type:c.output.coinType}})),splitPercentage:Number(o.amountIn??0)/Number(this.rawRouteResult?.amountIn??1)*100,coinIn:{amount:BigInt(o.amountIn.toString()),type:utils.normalizeStructTag(o.input.coinType)},coinOut:{amount:BigInt(o.amountOut.toString()),type:utils.normalizeStructTag(o.output.coinType)}});return {routes:A,coinIn:{type:utils.normalizeStructTag(e.coinIn.coinType),amount:BigInt(e.amountIn.toString())},coinOut:{type:utils.normalizeStructTag(e.coinOut.coinType),amount:BigInt(e.amountOut.toString())},name:this.name}}async fetchRoute(e,A){this.validateClient();let o=this.normalizeFetchRouteParams(e);this.rawRouteResult=void 0;let{coinInType:c,coinOutType:a,swapAmount:s}=o,t=await this.withTimeout(this.client.getRoutes({...this.fetchSettings,tokenIn:c,tokenOut:a,amountIn:s.toString(),commission:this.commission,includeSources:this.getEnabledPools()}),A);if(!t)throw new Error(`${this.name} fetch route returned empty response`);return this.rawRouteResult=t,{formattedResult:this.parseRawRouteToFormattedResult(t),rawRouteResult:t}}async buildSwapTransaction(e){this.validateWalletAddress();let{txExtensionParams:A,slippage:o,route:c}=e,a=c?.rawRouteResult??this.rawRouteResult;if(!a)throw new Error(`${this.name} build swap transaction failed: no route available`);let s=null,t=null;if(A){let{initTx:u,coinIn:V}=A;s=u,t=V;}else s=new transactions.Transaction,s.setSender(this.walletAddress),t=await this.selectCoinInForSwap(s,BigInt(a.amountIn.toString()),utils.normalizeStructTag(a.coinIn.coinType));let n=new sdk.TradeBuilder("mainnet",a.routes).sender(this.walletAddress).slippage(this.calcSlippage(o)).deadline(Date.now()+60*60*1e3),d=await(this.commission?n.commission(this.commission).build():n.build()).swap({client:this.suiClient,tx:s,coinIn:t});if(!d)throw new Error(`${this.name} build swap transaction failed`);return {tx:s,coinOut:d}}};
20
20
 
21
21
  exports.AftermathSwap = T;
22
22
  exports.Aggregator = F;
package/dist/index.mjs CHANGED
@@ -10,6 +10,6 @@ import { AftermathApi, Aftermath } from 'aftermath-ts-sdk';
10
10
  import { setSuiClient, getQuote, buildTx } from '@7kprotocol/sdk-ts';
11
11
  import { AggregatorQuoter, Protocol, TradeBuilder } from '@flowx-finance/sdk';
12
12
 
13
- var Z=normalizeStructTag(SUI_TYPE_ARG),B=r=>normalizeStructTag(r)===Z,E=async(r,e,A,o)=>{let s=[],a=BigNumber(A),c=null;try{do{let{data:t,hasNextPage:n,nextCursor:i}=await r.getCoins({coinType:e,owner:o,limit:50,cursor:c});if(s.push(...t),a=a.minus(t.reduce((d,u)=>d.plus(BigNumber(u.balance)),BigNumber(0))),a.lte(0)||(c=i??null,!n))break}while(c)}catch(t){throw new Error(t?.message??"Failed to fetch coins")}if(s.length===0)throw new Error(`No available coin for type ${e} found in wallet ${o}`);if(a.gt(0))throw new Error(`Insufficient balance for coin type ${e} in wallet ${o}`);return s},S=async(r,e,A,o,s)=>{try{if(B(o))r.mergeCoins(r.gas,[e]);else {let{data:a}=await A.getCoins({coinType:o,owner:s,limit:1});if(!a.length)throw new Error(`No existing ${o} coin found to merge with`);let c=r.objectRef({objectId:a[0].coinObjectId,version:a[0].version,digest:a[0].digest});a.length===1?r.mergeCoins(c,[e]):r.mergeCoins(c,[e,...a.slice(1).map(t=>r.objectRef({objectId:t.coinObjectId,version:t.version,digest:t.digest}))]);}}catch{r.transferObjects([e],r.pure.address(s));}},U=r=>r[0].toUpperCase()+r.slice(1),g=r=>r.split("_").map(U).join(" ");var b=class extends EventEmitter{on(e,A){return super.on(e,A)}once(e,A){return super.once(e,A)}off(e,A){return super.off(e,A)}emit(e,A){return super.emit(e,A)}};var f=class{rawRouteResult;name="";events=new b;client;suiClient;fetchTimeoutInMs;walletAddress;fetchSettings;poolsMap=new Map;constructor(e,A){this.suiClient=A.suiClient??new SuiClient({url:getFullnodeUrl("mainnet")}),this.fetchTimeoutInMs=A.fetchTimeoutInMs??4e3,this.walletAddress=A.walletAddress,this.name=e.toLowerCase(),A.fetchSettings&&this.setFetchRouteSettings(A.fetchSettings);}get pools(){return Array.from(this.poolsMap.keys())}validateWalletAddress(){if(!this.walletAddress||this.walletAddress.length===0)throw new Error("Wallet address is not set")}validateClient(){if(!this.client)throw new Error("SDK client is not set")}setWalletAddress(e){this.walletAddress=e;}setSuiClient(e){this.suiClient=e;}togglePoolStatus(e,A){let o=A??!(this.poolsMap.get(e)??true);this.poolsMap.set(e,o),this.events.emit("poolStatusChanged",{name:this.name,pool:e,enabled:o});}toggleAllPoolStatus(e){this.pools.forEach(A=>{this.poolsMap.set(A,e);}),this.events.emit("allPoolStatusChanged",{name:this.name,enabled:e});}getEnabledPools(){return Array.from(this.poolsMap.entries()).filter(([e,A])=>A).map(([e,A])=>e)}normalizeFetchRouteParams(e){return {...e,coinInType:normalizeStructTag$1(e.coinInType),coinOutType:normalizeStructTag$1(e.coinOutType)}}async withTimeout(e,A){let o,s,a=[e,new Promise((c,t)=>{o=setTimeout(()=>{t(new Error(`${this.name} fetch route timeout`));},this.fetchTimeoutInMs);})];A&&a.push(new Promise((c,t)=>{if(A.aborted){t(A.reason??new Error(`${this.name} fetch route aborted`));return}s=()=>t(A.reason??new Error(`${this.name} fetch route aborted`)),A.addEventListener("abort",s,{once:true});}));try{return await Promise.race(a)}finally{o&&clearTimeout(o),A&&s&&A.removeEventListener("abort",s);}}async selectCoinInForSwap(e,A,o){let s=BigNumber(A.toString());if(B(o)){let[a]=e.splitCoins(e.gas,[s.toString()]);return a}else {let a=await this.selectCoins(o,s.toString()),c=a.reduce((n,i)=>n.plus(BigNumber(i.balance)),BigNumber(0)),t=e.objectRef({objectId:a[0].coinObjectId,version:a[0].version,digest:a[0].digest});if(a.length>1&&e.mergeCoins(t,a.slice(1).map(n=>e.objectRef({objectId:n.coinObjectId,version:n.version,digest:n.digest}))),c.gt(s)){let[n]=e.splitCoins(t,[s.toString()]);return n}else return t}}async selectCoins(e,A){return this.validateWalletAddress(),await E(this.suiClient,e,A,this.walletAddress)}};var p=class{constructor(e,A){this.client=e;A&&A.forEach(o=>this.cache.set(o.coinType,o));}cache=new Map;setClient(e){this.client=e;}async getCoinMetadata(e){let A=normalizeStructTag(e);if(this.cache.has(A))return this.cache.get(A);let o=await this.client.getCoinMetadata({coinType:A});if(!o)throw new Error(`Coin metadata not found for coin type: ${A}`);return this.cache.set(A,o),o}};var F=class{coinMetadata;suiKit;events=new b;_slippage=.003;signerMode=false;aggregatorMap=new Map;activeAggregator=new Map;_fetchingStatus=new Map;poolStatusForwarders=new Map;walletAddress;client;constructor(e){if(this.client=e.client??new SuiClient({url:e.fullnodeUrl||"https://fullnode.mainnet.sui.io:443"}),this.coinMetadata=new p(this.client),this.signerMode=!!(e.secretKey||e.mnemonics),e.secretKey||e.mnemonics)this.suiKit=new SuiKit({...e,suiClients:[this.client]}),this.walletAddress=this.suiKit.currentAddress;else if(e.walletAddress!==void 0)this.walletAddress=e.walletAddress;else throw new Error("One of secretKey, mnemonics or walletAddress must be provided")}forwardPoolStatusChangeEvent(e){this.events.emit("poolStatusChanged",e);}addAggregator(e){for(let A of e)if(!this.aggregatorMap.has(A.name)){this.aggregatorMap.set(A.name,A),this.activeAggregator.set(A.name,true),this._fetchingStatus.set(A.name,false);let o=s=>this.forwardPoolStatusChangeEvent(s);this.poolStatusForwarders.set(A.name,o),A.events.on("poolStatusChanged",o),this.events.emit("aggregatorAdded",{name:A.name});}}getActiveAggregators(){return Array.from(this.activeAggregator.entries()).filter(([e,A])=>A).map(([e,A])=>e)}getAggregator(e){return this.aggregatorMap.get(e)}toggleAggregator(e,A){if(!this.activeAggregator.has(e))throw new Error(`Aggregator ${e} not found`);this.activeAggregator.set(e,A),this.events.emit("aggregatorStatusChanged",{name:e,enabled:A});}removeAggregator(e){let A=this.aggregatorMap.get(e);if(!A)throw new Error(`Aggregator ${e} not found`);let o=this.poolStatusForwarders.get(e);o&&A.events.off("poolStatusChanged",o),this.poolStatusForwarders.delete(e),this.aggregatorMap.delete(e),this.activeAggregator.delete(e),this._fetchingStatus.delete(e),this.events.emit("aggregatorRemoved",{name:e});}get aggregators(){return Array.from(this.aggregatorMap.values())}get fetchingStatus(){return Object.fromEntries(this._fetchingStatus)}get slippage(){return this._slippage}setSlippage(e){this._slippage=e,this.events.emit("aggregatorSlippageChanged",{slippageInDecimal:e});}setFetchTimeoutInMs(e){this.aggregators.forEach(A=>{A.fetchTimeoutInMs=e;});}#e(){if(!this.suiKit)throw new Error("SuiKit is not initialized.")}setSuiClient(e){this.aggregators.forEach(A=>{A.setSuiClient(e);}),this.coinMetadata.setClient(e),this.client=e;}setWalletAddress(e){if(this.signerMode)throw new Error("Cannot change wallet address when SuiKit is initialized with secretKey or mnemonics.");if(!isValidSuiAddress(e))throw new Error("Invalid Sui wallet address");this.walletAddress=e,this.aggregators.forEach(A=>{A.setWalletAddress(e);});}async getCoinMetadata(e){return this.coinMetadata.getCoinMetadata(e)}async fetchRoutes(e,A){let o=this.aggregators.filter(({name:t})=>this.activeAggregator.get(t)===true),s=[],a=[],c=o.map(async t=>{this._fetchingStatus.set(t.name,true),this.events.emit("aggregatorFetchStart",{name:t.name});try{let n=await t.fetchRoute(e,A?.abortSignal);s.push(n),A?.onRouteFound?.(n);}catch(n){let i={name:t.name,reason:n};a.push(i),A?.onError?.(i);}finally{this._fetchingStatus.set(t.name,false),this.events.emit("aggregatorFetchEnd",{name:t.name});}});return await Promise.all(c),{routes:s.sort((t,n)=>BigNumber(n.formattedResult.coinOut.amount).comparedTo(t.formattedResult.coinOut.amount)??0),errors:a}}async buildRouteTransaction(e,A={}){let{mergeResult:o=true,txExtensionParams:s}=A,a=this.aggregatorMap.get(e.formattedResult.name);if(!a)throw new Error(`Aggregator ${e.formattedResult.name} not found in the aggregator list`);let{tx:c,coinOut:t}=await a.buildSwapTransaction({route:e,slippage:A.slippage??this.slippage,txExtensionParams:s}),n=e.formattedResult.coinOut.type;return o?(await S(c,t,this.client,n,this.walletAddress),{tx:c,coinOutType:n}):{tx:c,coinOut:t,coinOutType:n}}async executeSwapTransaction(e,A=false){return this.#e(),A?this.suiKit.dryRunTxn(e):this.suiKit.signAndSendTxn(e)}};var y=class extends f{constructor(e){super("cetus",e),this.client=new AggregatorClient({...e,endpoint:e.endpoint??"https://api-sui.cetus.zone/router_v3/find_routes",signer:e.signer??this.walletAddress,client:this.suiClient,env:Env.Mainnet}),this.poolsMap=new Map(ALL_DEXES.map(A=>[A,true]));}createRoute(e,A,o){let s=[],a=null;for(let t of e)t.from===A&&(a={paths:[],coinIn:{type:t.from,amount:BigInt(t.amountIn)},coinOut:{type:t.target,amount:BigInt(t.amountOut)}},s.push(a)),a&&(a.paths.push({protocolName:t.provider,coinIn:{type:t.from,amount:BigInt(t.amountIn)},coinOut:{type:t.target,amount:BigInt(t.amountOut)}}),a.coinOut={type:t.target,amount:BigInt(t.amountOut)},t.target===o&&(a=null));let c=s.reduce((t,n)=>t+n.coinIn.amount,BigInt(0)).toString();return c!=="0"&&s.forEach(t=>{t.splitPercentage=BigNumber(t.coinIn.amount.toString()).div(c).times(100).toNumber();}),s}parseRawToFormattedResult({routerData:e,coinInType:A,coinOutType:o}){return {coinIn:{type:A,amount:BigInt(e.amountIn.toString()??"0")},coinOut:{type:o,amount:BigInt(e.amountOut.toString()??"0")},routes:this.createRoute(e.paths,A,o)}}setFetchRouteSettings(e){this.fetchSettings=e;}calcSlippage(e){return e}async fetchRoute(e,A){this.validateClient();let o=this.normalizeFetchRouteParams(e),{coinInType:s,coinOutType:a,swapAmount:c}=o,t=await this.withTimeout(this.client.findRouters({...this.fetchSettings,from:normalizeStructTag(s),target:normalizeStructTag(a),amount:new _(c.toString()),byAmountIn:true,providers:this.getEnabledPools()}),A);if(!t)throw new Error(`${this.name} fetch route returned empty response`);return this.rawRouteResult=t,{formattedResult:{...this.parseRawToFormattedResult({routerData:t,coinInType:s,coinOutType:a}),name:this.name},rawRouteResult:t}}async buildSwapTransaction(e){this.validateWalletAddress(),this.validateClient();let{txExtensionParams:A,slippage:o,route:s}=e,a=s?.rawRouteResult??this.rawRouteResult;if(!a)throw new Error(`${this.name} buildSwapTransaction requires a route, but none was provided or fetched.`);let c=null,t=null;if(A){let{initTx:i,coinIn:d}=A;c=i,t=d;}else c=new Transaction,c.setSender(this.walletAddress),t=await this.selectCoinInForSwap(c,BigInt(a.amountIn.toString()),normalizeStructTag(a.paths[0].from));let n=await this.client.routerSwap({router:a,txb:c,slippage:this.calcSlippage(o),inputCoin:t});return {tx:c,coinOut:n}}};var Q={faucet:{packages:{faucet:"",suiFrensGenesisWrapper:""},objects:{faucet:"",suiFrensMint:""}},staking:{packages:{events:"0x7f6ce7ade63857c4fd16ef7783fed2dfc4d7fb7e40615abdb653030b76aef0c6",lsd:"0x1575034d2729907aefca1ac757d6ccfcd3fc7e9e77927523c06007d8353ad836",afsui:"0xf325ce1300e8dac124071d3152c5c5ee6174914f8bc2161e88329cf579246efc"},objects:{stakedSuiVault:"0x2f8f6d5da7f13ea37daa397724280483ed062769813b6f31e9788e59cc88994d",stakedSuiVaultState:"0x55486449e41d89cfbdb20e005c1c5c1007858ad5b4d5d7c047d2b3b592fe8791",safe:"0xeb685899830dd5837b47007809c76d91a098d52aabbf61e8ac467c59e5cc4610",treasury:"0xd2b95022244757b0ab9f74e2ee2fb2c3bf29dce5590fa6993a85d64bd219d7e8",referralVault:"0x4ce9a19b594599536c53edb25d22532f82f18038dc8ef618afd00fbbfb9845ef",validatorConfigsTable:"0x8536350cfb8a8efdd133a1e087b55416d431f7e8b894f77b55b20c4b799ebad9",aftermathValidator:"0xd30018ec3f5ff1a3c75656abf927a87d7f0529e6dc89c7ddd1bd27ecb05e3db2"}},pools:{packages:{amm:"0xc4049b2d1cc0f6e017fda8260e4377cecd236bd7f56a54fee120816e72e2e0dd",ammInterface:"0x8d8bba50c626753589aa5abbc006c9fa07736f55f4e6fb57481682997c0b0d52",events:"0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c",eventsV2:"0xc4049b2d1cc0f6e017fda8260e4377cecd236bd7f56a54fee120816e72e2e0dd"},objects:{poolRegistry:"0xfcc774493db2c45c79f688f88d28023a3e7d98e4ee9f48bbf5c7990f651577ae",protocolFeeVault:"0xf194d9b1bcad972e45a7dd67dd49b3ee1e3357a00a50850c52cd51bb450e13b4",treasury:"0x28e499dff5e864a2eafe476269a4f5035f1c16f338da7be18b103499abf271ce",insuranceFund:"0xf0c40d67b078000e18032334c3325c47b9ec9f3d9ae4128be820d54663d14e3b",lpCoinsTable:"0x7f3bb65251feccacc7f48461239be1008233b85594114f7bf304e5e5b340bf59"},other:{createLpCoinPackageCompilations:{0:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEAAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[167,102,246,194,32,223,3,45,134,147,18,9,59,94,154,58,126,34,119,96,13,193,175,198,63,222,118,4,234,110,46,214]}',1:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEBAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[68,93,25,253,95,37,116,117,115,245,79,81,250,68,193,193,125,175,148,139,217,235,215,33,240,45,78,14,3,86,156,253]}',2:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgECAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[226,124,21,102,7,55,200,164,249,68,13,253,43,195,52,31,88,207,26,30,152,251,208,57,135,126,235,45,23,164,119,82]}',3:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEDAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[1,144,16,189,84,90,47,167,188,222,48,174,25,190,46,185,6,221,67,91,132,40,116,30,179,102,100,127,83,12,109,13]}',4:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEEAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[188,181,24,0,200,201,56,67,47,157,254,230,47,200,183,173,203,125,184,180,21,175,170,42,167,82,194,112,35,226,84,160]}',5:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEFAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[139,229,11,229,58,97,20,164,146,173,45,172,225,131,71,62,84,106,77,218,122,249,243,255,146,34,28,60,77,35,55,138]}',6:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEGAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[57,76,77,44,68,157,60,123,68,75,189,64,53,35,82,187,207,42,126,62,112,57,251,96,190,255,39,160,152,130,157,52]}',7:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEHAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[123,60,245,235,196,138,131,187,192,81,41,5,55,144,176,99,178,245,228,90,186,155,175,11,175,182,127,251,112,69,207,36]}',8:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEIAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[62,140,187,2,13,226,252,216,57,79,25,215,73,0,30,117,240,181,17,67,90,160,116,93,0,185,100,177,98,158,120,249]}',9:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEJAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[224,168,250,132,113,73,22,162,90,31,20,5,146,218,102,211,9,26,235,144,153,60,68,242,99,43,182,103,163,123,70,243]}',10:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEKAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[230,2,103,229,53,229,25,139,165,170,103,184,37,95,22,138,144,54,70,94,84,1,166,69,226,228,2,111,190,177,88,67]}',11:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgELAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[47,22,229,32,128,229,189,95,254,208,76,7,63,57,67,181,242,47,139,87,115,116,187,69,186,231,157,193,217,175,119,251]}',12:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEMAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[84,220,49,85,231,231,205,206,223,231,112,68,34,157,61,115,234,156,6,203,2,158,212,203,215,170,136,228,68,193,188,13]}',13:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgENAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[237,140,135,226,69,221,118,110,149,250,210,127,140,11,253,163,73,64,189,152,115,51,234,40,195,87,188,107,171,233,96,99]}',14:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEOAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[178,202,9,164,149,122,241,165,109,17,64,83,161,86,55,194,230,149,60,174,236,221,205,150,98,176,28,228,122,182,83,85]}',15:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEPAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[162,91,42,1,93,167,63,154,173,142,135,15,249,131,197,24,69,164,212,169,231,169,19,38,42,86,25,84,219,229,233,20]}',16:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEQAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[79,121,127,12,72,247,127,165,243,18,184,175,76,20,119,251,245,47,31,190,247,87,15,198,47,204,130,99,18,94,161,74]}',17:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgERAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[40,28,55,168,44,135,53,11,9,113,97,54,212,21,163,15,203,241,151,5,117,250,3,22,135,69,113,175,166,166,111,19]}',18:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgESAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[173,252,173,67,1,192,123,156,242,232,253,247,12,147,190,24,152,41,3,166,219,90,110,43,48,139,30,235,10,219,209,58]}'}}},daoFeePools:{packages:{amm:"0x5ad6890968efcf3d20899e0cec735214f1067b96e77e77d86408989998468bb2",events:"0x6f60a091637054e23915b8745c0c0d47b1d49618ee3435b5f68eccf6a44fb53d"},objects:{version:"0xb4bfb0f917f12ad2a772bea9b4f22431f6f5f9653162c3ae6fae5b99b21392b7"}},farms:{packages:{vaults:"0x7ce31301b506b4ed327523061fe95d9c347082fa60da39733f74ffad9a53f8f5",vaultsInitial:"0x4f0a1a923dd063757fd37e04a9c2cee8980008e94433c9075c390065f98e9e4b",vaultsV2:"0x2d6755e10132fc1eab5e8a4a3e7ddfdacc31884621592d95fce48ecf1e157db9",eventsV2:"0x79ee374b9e3c60c00a19fdbeaea25731bbea8f2cab9bb61bb712543e0ba55b7a"},objects:{version:"0xdc372fa9b6a538382efc560478a786fcf04e6e34850100020056c98c5c387193"}},dca:{packages:{dca:"0x409e2ace51cc5821be41a667e4cb9afa64cde49a7f940c68109db24b39ca93b8",events:"0x002134246a32eec18e68f1f5aadb8edd34856298ae6d32c145d28f3ca46c7fd1",eventsV2:"0x409e2ace51cc5821be41a667e4cb9afa64cde49a7f940c68109db24b39ca93b8"},objects:{config:"0x1b26465e9c688e3a3d2301f26e25091bc0f91708d953dc220f5697faa8ba9bd6"}},limitOrders:{packages:{limitOrders:"0xe57ee3613b7dece546f8a2d8a53145cbab41d32b86037b94f9ebfcbcfa66885a",events:"0xe57ee3613b7dece546f8a2d8a53145cbab41d32b86037b94f9ebfcbcfa66885a"}},sharedCustody:{address:"0xafe2fafac0b048c9c70a61cc1798400a85173df96b30118c40af6f3382b5a777",publicKey:"AMylYwVSuJQmTmDm6KuPlNwLnTtkk63HqOByubxxsVeC"},referralVault:{packages:{referralVault:"0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf"},objects:{referralVault:"0x35d35b0e5b177593d8c3a801462485572fc30861e6ce96a55af6dc4730709278"}},suiFrens:{packages:{suiFrens:"",suiFrensBullshark:"",accessories:"",suiFrensVault:"",suiFrensVaultCapyLabsExtension:""},objects:{capyLabsApp:"",suiFrensVault:"",suiFrensVaultStateV1:"",suiFrensVaultStateV1MetadataTable:"",suiFrensVaultCapyLabsExtension:""}},router:{packages:{utils:"0xdc15721baa82ba64822d585a7349a1508f76d94ae80e899b06e48369c257750e"}},dynamicGas:{sponsorAddress:"0xae4ba5f592e695a46d58a0579aa5d4f6ebead46be0f2d5bd229d5c292290548c"},perpetuals:{packages:{events:"0x21d001e8b07da2e3facb3e2d636bbaef43ba3c978bd84810368840b7d57c5068"},objects:{registry:"0xd0b3ea6b7a2f5887543a5a493aa70bcd0ec1a2d9c03d830504234df3e8c6a609"}},perpetualsVaults:{other:{createLpCoinPackageCompilation:'{"modules":["oRzrCwYAAAAKAQAOAg4eAywsBFgIBWBZB7kB4gEImwOAAQabBGcKggUFDIcFLAASAwcBDQIGAhMCFAIVAAICAAIBBwEAAAMADAEAAQMDDAEAAQUEAgAGBQcAAAoAAQABCwEDAAIRBgcBAAMICQoBAgQOBgEBDAQPDwEBDAUQDA0ABgwEBQACBQMIBAsFDgIIAAcIBAACCwIBCAALAwEIAAECAQoCAQgFAQkAAQsBAQkAAQgABwkAAgoCCgIKAgsBAQgFBwgEAgsDAQkACwIBCQABCwIBCAABBggEAQUBCwMBCAACCQAFDENvaW5NZXRhZGF0YQZPcHRpb24IVEVNUExBVEULVHJlYXN1cnlDYXAJVHhDb250ZXh0A1VybARjb2luCWNvbnN0YW50cw9jcmVhdGVfY3VycmVuY3kLZHVtbXlfZmllbGQEaW5pdAtscF9kZWNpbWFscxVuZXdfdW5zYWZlX2Zyb21fYnl0ZXMGb3B0aW9uFHB1YmxpY19mcmVlemVfb2JqZWN0D3B1YmxpY190cmFuc2ZlcgZzZW5kZXIEc29tZQh0ZW1wbGF0ZQh0cmFuc2Zlcgp0eF9jb250ZXh0A3VybAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAp4geY2XwRD2s2t7PYVDqpJGMi7y/Y2DrXnvMyXUc7wvCgIJCFRFTVBMQVRFCgIKCUNPSU4gTkFNRQoCERBDT0lOIERFU0NSSVBUSU9OCgI3Nmh0dHBzOi8vYWZ0ZXJtYXRoLmZpbmFuY2UvY29pbnMvcGVycGV0dWFscy9kZWZhdWx0LnN2ZwACAQkBAAAAAAIUCwARAQcABwEHAgcDEQc4AAoBOAEMAgwDCwI4AgsDCwEuEQY4AwIA"],"dependencies":["0x46234ba81f3a5ba6571383233df0f9ea5fe60a3a327537be1f5fec447bced693","0x9e20798d97c110f6b36b7b3d8543aa9246322ef2fd8d83ad79ef3325d473bc2f","0xa8172ed2a6f14cd0ee55124326685713d6f765039e7c5339f7a0b57be06fddb5","0x21d001e8b07da2e3facb3e2d636bbaef43ba3c978bd84810368840b7d57c5068","0x0000000000000000000000000000000000000000000000000000000000000001","0x0000000000000000000000000000000000000000000000000000000000000002"],"digest":[197,20,191,110,212,210,250,216,46,69,171,178,75,240,176,17,254,237,222,251,192,94,195,175,10,216,89,18,238,154,114,144]}'}},leveragedStaking:{packages:{leveragedAfSui:"",leveragedAfSuiInitial:""},objects:{leveragedAfSuiState:"",afSuiSuiPoolId:""}},scallop:{objects:{version:"",afSuiMarket:"",coinDecimalsRegistry:"",xOracle:""}},nftAmm:{packages:{nftAmm:""},objects:{protocolFeeVault:"",treasury:"",insuranceFund:"",referralVault:""}},nfts:{packages:{mystenTransferPolicy:"0x0cb4bcc0560340eb1a1b929cabe56b33fc6449820ec8c1980d69bb98b649b802"}}};var h=()=>(...r)=>r;var o0=h()("Aftermath","Bolt","Bluefin","BlueMove","Cetus","DeepBook","DeepBookV3","DoubleUpPump","FlowX","FlowXClmm","FullSail","HopFun","Kriya","KriyaClmm","Magma","Metastable","Momentum","MovePump","Obric","SpringSui","Steamm","SuiAi","SuiSwap","Turbos","TurbosFun","BlastFun"),T=class extends f{afApi;constructor(e){super("aftermath",e),this.afApi=new AftermathApi(this.suiClient,e.addresses??Q),this.client=new Aftermath("MAINNET",this.afApi),this.poolsMap=new Map(o0.map(A=>[A,true]));}get router(){return this.validateClient(),this.client.Router()}setFetchRouteSettings(e){this.fetchSettings=e;}calcSlippage(e){return e}parseRawRouteToFormattedResult(e){let A=e.coinIn.amount,o={...e,name:this.name};return o.routes.forEach(s=>{let a=s.paths[0].coinIn.amount;s.splitPercentage=BigNumber(a.toString()).div(A.toString()).times(100).toNumber();}),o}async fetchRoute(e,A){let o=this.normalizeFetchRouteParams(e),{coinInType:s,coinOutType:a,swapAmount:c}=o,t=await this.withTimeout(this.router.getCompleteTradeRouteGivenAmountIn({...this.fetchSettings,protocolWhitelist:this.getEnabledPools(),coinInType:s,coinOutType:a,coinInAmount:c},A));if(!t)throw new Error(`${this.name} fetch route returned empty response`);return this.rawRouteResult=t,{formattedResult:this.parseRawRouteToFormattedResult(t),rawRouteResult:t}}async buildSwapTransaction(e){this.validateWalletAddress();let{txExtensionParams:A,slippage:o,route:s}=e,a=s?.rawRouteResult??this.rawRouteResult;if(!a)throw new Error(`${this.name} build swap transaction failed: no route available`);let c=null,t=null;if(A){let{initTx:d,coinIn:u}=A;c=d,t=u;}else c=new Transaction$1,c.setSender(this.walletAddress),t=await this.selectCoinInForSwap(c,BigInt(a.coinIn.amount.toString()),normalizeStructTag$1(a.coinIn.type));let{tx:n,coinOutId:i}=await this.router.addTransactionForCompleteTradeRoute({walletAddress:this.walletAddress,completeRoute:a,slippage:this.calcSlippage(o),tx:c,coinInId:t});if(!i)throw new Error(`${this.name} build swap transaction failed`);return {tx:n,coinOut:i}}};var r0=h()("aftermath","bluefin","bluemove","cetus","cetus_dlmm","deepbook_v3","ferra_clmm","ferra_dlmm","flowx","flowx_v3","fullsail","kriya","kriya_v3","magma","obric","springsui","steamm","stsui","suiswap","turbos","bluefinx","steamm_oracle_quoter","haedal_pmm","momentum","steamm_oracle_quoter_v2","sevenk_v1"),P=class extends f{commission;constructor(e){super("7k",e),this.commission=e.commission??{partner:this.walletAddress,commissionBps:0},setSuiClient(this.suiClient),this.poolsMap=new Map(r0.map(A=>[A,true]));}setSuiClient(e){super.setSuiClient(e),setSuiClient(e);}setFetchRouteSettings(e){this.fetchSettings=e;}calcSlippage(e){return e}createRoute(e,A,o){let s=[];e.forEach((c,t)=>{s.push({paths:[],coinIn:{type:c.tokenIn,amount:BigInt(BigNumber(c.tokenInAmount).multipliedBy(A).integerValue().toString())},coinOut:{type:c.tokenOut,amount:BigInt(BigNumber(c.tokenOutAmount).multipliedBy(o).integerValue().toString())}}),c.hops.forEach(n=>{s[t].paths.push({protocolName:g(n.pool.type.toLowerCase()),coinIn:{type:n.tokenIn,amount:BigInt(BigNumber(n.tokenInAmount).multipliedBy(A).integerValue().toString())},coinOut:{type:n.tokenOut,amount:BigInt(BigNumber(n.tokenOutAmount).multipliedBy(o).integerValue().toString())}});});});let a=s.reduce((c,t)=>c+t.coinIn.amount,BigInt(0)).toString();return s.forEach(c=>{c.splitPercentage=BigNumber(c.coinIn.amount.toString()).div(a).times(100).toNumber();}),s}parseRawRouteToFormattedResult(e){if(!e.routes)throw new Error(`${this.name} fetch route returned empty sorRoute`);return {routes:this.createRoute(e.routes,BigNumber(e.swapAmountWithDecimal).dividedBy(e.swapAmount).toNumber(),BigNumber(e.returnAmountAfterCommissionWithDecimal).dividedBy(e.returnAmount).toNumber()),coinIn:{type:e.tokenIn,amount:BigInt(e.swapAmountWithDecimal)},coinOut:{type:e.tokenOut,amount:BigInt(e.returnAmountAfterCommissionWithDecimal)},name:this.name}}async fetchRoute(e,A){let o=this.normalizeFetchRouteParams(e),{coinInType:s,coinOutType:a,swapAmount:c}=o,t=await this.withTimeout(getQuote({...this.fetchSettings,tokenIn:s,tokenOut:a,amountIn:c.toString(),sources:this.getEnabledPools()}),A);if(!t)throw new Error(`${this.name} fetch route returned empty response`);return this.rawRouteResult=t,{formattedResult:this.parseRawRouteToFormattedResult(t),rawRouteResult:t}}async buildSwapTransaction(e){this.validateWalletAddress();let{txExtensionParams:A,slippage:o,route:s}=e,a=s?.rawRouteResult??this.rawRouteResult;if(!a)throw new Error(`${this.name} build swap transaction failed: no route available`);let c=null,t=null;if(A){let{initTx:d,coinIn:u}=A;c=d,t=u;}else c=new Transaction$1,c.setSender(this.walletAddress),t=await this.selectCoinInForSwap(c,BigInt(a.swapAmountWithDecimal),normalizeStructTag$1(a.tokenIn));let{tx:n,coinOut:i}=await buildTx({quoteResponse:a,slippage:this.calcSlippage(o),commission:this.commission,accountAddress:this.walletAddress,extendTx:{tx:c,coinIn:t}});if(!i)throw new Error(`${this.name} build swap transaction failed`);return {tx:"txBytes"in n?Transaction$1.from(n.txBytes):n,coinOut:i}}};var Y=class extends f{client=new AggregatorQuoter("mainnet");commission;constructor(e){super("flowx",e),this.commission=e.commission,this.poolsMap=new Map(Object.values(Protocol).map(A=>[A,true]));}setFetchRouteSettings(e){this.fetchSettings=e;}calcSlippage(e){return BigNumber(e).multipliedBy(1e6).integerValue().toNumber()}parseRawRouteToFormattedResult(e){let A=[];for(let o of e.routes)A.push({paths:o.paths.map(s=>({protocolName:g(s.protocol()?.toLowerCase()??""),coinIn:{amount:BigInt((s.amountIn??0).toString()),type:s.input.coinType},coinOut:{amount:BigInt((s.amountOut??0).toString()),type:s.output.coinType}})),splitPercentage:Number(o.amountIn??0)/Number(this.rawRouteResult?.amountIn??1)*100,coinIn:{amount:BigInt(o.amountIn.toString()),type:normalizeStructTag(o.input.coinType)},coinOut:{amount:BigInt(o.amountOut.toString()),type:normalizeStructTag(o.output.coinType)}});return {routes:A,coinIn:{type:normalizeStructTag(e.coinIn.coinType),amount:BigInt(e.amountIn.toString())},coinOut:{type:normalizeStructTag(e.coinOut.coinType),amount:BigInt(e.amountOut.toString())},name:this.name}}async fetchRoute(e,A){this.validateClient();let o=this.normalizeFetchRouteParams(e),{coinInType:s,coinOutType:a,swapAmount:c}=o,t=await this.withTimeout(this.client.getRoutes({...this.fetchSettings,tokenIn:s,tokenOut:a,amountIn:c.toString(),commission:this.commission,includeSources:this.getEnabledPools()}),A);if(!t)throw new Error(`${this.name} fetch route returned empty response`);return this.rawRouteResult=t,{formattedResult:this.parseRawRouteToFormattedResult(t),rawRouteResult:t}}async buildSwapTransaction(e){this.validateWalletAddress();let{txExtensionParams:A,slippage:o,route:s}=e,a=s?.rawRouteResult??this.rawRouteResult;if(!a)throw new Error(`${this.name} build swap transaction failed: no route available`);let c=null,t=null;if(A){let{initTx:u,coinIn:V}=A;c=u,t=V;}else c=new Transaction,c.setSender(this.walletAddress),t=await this.selectCoinInForSwap(c,BigInt(a.amountIn.toString()),normalizeStructTag(a.coinIn.coinType));let n=new TradeBuilder("mainnet",a.routes).sender(this.walletAddress).slippage(this.calcSlippage(o)).deadline(Date.now()+60*60*1e3),d=await(this.commission?n.commission(this.commission).build():n.build()).swap({client:this.suiClient,tx:c,coinIn:t});if(!d)throw new Error(`${this.name} build swap transaction failed`);return {tx:c,coinOut:d}}};
13
+ var Z=normalizeStructTag(SUI_TYPE_ARG),B=r=>normalizeStructTag(r)===Z,E=async(r,e,A,o)=>{let c=[],a=BigNumber(A),s=null;try{do{let{data:t,hasNextPage:n,nextCursor:i}=await r.getCoins({coinType:e,owner:o,limit:50,cursor:s});if(c.push(...t),a=a.minus(t.reduce((d,u)=>d.plus(BigNumber(u.balance)),BigNumber(0))),a.lte(0)||(s=i??null,!n))break}while(s)}catch(t){throw new Error(t?.message??"Failed to fetch coins")}if(c.length===0)throw new Error(`No available coin for type ${e} found in wallet ${o}`);if(a.gt(0))throw new Error(`Insufficient balance for coin type ${e} in wallet ${o}`);return c},S=async(r,e,A,o,c)=>{try{if(B(o))r.mergeCoins(r.gas,[e]);else {let{data:a}=await A.getCoins({coinType:o,owner:c,limit:1});if(!a.length)throw new Error(`No existing ${o} coin found to merge with`);let s=r.objectRef({objectId:a[0].coinObjectId,version:a[0].version,digest:a[0].digest});a.length===1?r.mergeCoins(s,[e]):r.mergeCoins(s,[e,...a.slice(1).map(t=>r.objectRef({objectId:t.coinObjectId,version:t.version,digest:t.digest}))]);}}catch{r.transferObjects([e],r.pure.address(c));}},U=r=>r[0].toUpperCase()+r.slice(1),g=r=>r.split("_").map(U).join(" ");var b=class extends EventEmitter{on(e,A){return super.on(e,A)}once(e,A){return super.once(e,A)}off(e,A){return super.off(e,A)}emit(e,A){return super.emit(e,A)}};var f=class{rawRouteResult;name="";events=new b;client;suiClient;fetchTimeoutInMs;walletAddress;fetchSettings;poolsMap=new Map;constructor(e,A){this.suiClient=A.suiClient??new SuiClient({url:getFullnodeUrl("mainnet")}),this.fetchTimeoutInMs=A.fetchTimeoutInMs??4e3,this.walletAddress=A.walletAddress,this.name=e.toLowerCase(),A.fetchSettings&&this.setFetchRouteSettings(A.fetchSettings);}get pools(){return Array.from(this.poolsMap.keys())}validateWalletAddress(){if(!this.walletAddress||this.walletAddress.length===0)throw new Error("Wallet address is not set")}validateClient(){if(!this.client)throw new Error("SDK client is not set")}setWalletAddress(e){this.walletAddress=e;}setSuiClient(e){this.suiClient=e;}togglePoolStatus(e,A){let o=A??!(this.poolsMap.get(e)??true);this.poolsMap.set(e,o),this.events.emit("poolStatusChanged",{name:this.name,pool:e,enabled:o});}toggleAllPoolStatus(e){this.pools.forEach(A=>{this.poolsMap.set(A,e);}),this.events.emit("allPoolStatusChanged",{name:this.name,enabled:e});}getEnabledPools(){return Array.from(this.poolsMap.entries()).filter(([e,A])=>A).map(([e,A])=>e)}normalizeFetchRouteParams(e){return {...e,coinInType:normalizeStructTag$1(e.coinInType),coinOutType:normalizeStructTag$1(e.coinOutType)}}async withTimeout(e,A){let o,c,a=[e,new Promise((s,t)=>{o=setTimeout(()=>{t(new Error(`${this.name} fetch route timeout`));},this.fetchTimeoutInMs);})];A&&a.push(new Promise((s,t)=>{if(A.aborted){t(A.reason??new Error(`${this.name} fetch route aborted`));return}c=()=>t(A.reason??new Error(`${this.name} fetch route aborted`)),A.addEventListener("abort",c,{once:true});}));try{return await Promise.race(a)}finally{o&&clearTimeout(o),A&&c&&A.removeEventListener("abort",c);}}async selectCoinInForSwap(e,A,o){let c=BigNumber(A.toString());if(B(o)){let[a]=e.splitCoins(e.gas,[c.toString()]);return a}else {let a=await this.selectCoins(o,c.toString()),s=a.reduce((n,i)=>n.plus(BigNumber(i.balance)),BigNumber(0)),t=e.objectRef({objectId:a[0].coinObjectId,version:a[0].version,digest:a[0].digest});if(a.length>1&&e.mergeCoins(t,a.slice(1).map(n=>e.objectRef({objectId:n.coinObjectId,version:n.version,digest:n.digest}))),s.gt(c)){let[n]=e.splitCoins(t,[c.toString()]);return n}else return t}}async selectCoins(e,A){return this.validateWalletAddress(),await E(this.suiClient,e,A,this.walletAddress)}};var p=class{constructor(e,A){this.client=e;A&&A.forEach(o=>this.cache.set(o.coinType,o));}cache=new Map;setClient(e){this.client=e;}async getCoinMetadata(e){let A=normalizeStructTag(e);if(this.cache.has(A))return this.cache.get(A);let o=await this.client.getCoinMetadata({coinType:A});if(!o)throw new Error(`Coin metadata not found for coin type: ${A}`);return this.cache.set(A,o),o}};var F=class{coinMetadata;suiKit;events=new b;_slippage=.003;signerMode=false;aggregatorMap=new Map;activeAggregator=new Map;_fetchingStatus=new Map;poolStatusForwarders=new Map;walletAddress;client;constructor(e){if(this.client=e.client??new SuiClient({url:e.fullnodeUrl||"https://fullnode.mainnet.sui.io:443"}),this.coinMetadata=new p(this.client),this.signerMode=!!(e.secretKey||e.mnemonics),e.secretKey||e.mnemonics)this.suiKit=new SuiKit({...e,suiClients:[this.client]}),this.walletAddress=this.suiKit.currentAddress;else if(e.walletAddress!==void 0)this.walletAddress=e.walletAddress;else throw new Error("One of secretKey, mnemonics or walletAddress must be provided")}forwardPoolStatusChangeEvent(e){this.events.emit("poolStatusChanged",e);}addAggregator(e){for(let A of e)if(!this.aggregatorMap.has(A.name)){this.aggregatorMap.set(A.name,A),this.activeAggregator.set(A.name,true),this._fetchingStatus.set(A.name,false);let o=c=>this.forwardPoolStatusChangeEvent(c);this.poolStatusForwarders.set(A.name,o),A.events.on("poolStatusChanged",o),this.events.emit("aggregatorAdded",{name:A.name});}}getActiveAggregators(){return Array.from(this.activeAggregator.entries()).filter(([e,A])=>A).map(([e,A])=>e)}getAggregator(e){return this.aggregatorMap.get(e)}toggleAggregator(e,A){if(!this.activeAggregator.has(e))throw new Error(`Aggregator ${e} not found`);this.activeAggregator.set(e,A),this.events.emit("aggregatorStatusChanged",{name:e,enabled:A});}removeAggregator(e){let A=this.aggregatorMap.get(e);if(!A)throw new Error(`Aggregator ${e} not found`);let o=this.poolStatusForwarders.get(e);o&&A.events.off("poolStatusChanged",o),this.poolStatusForwarders.delete(e),this.aggregatorMap.delete(e),this.activeAggregator.delete(e),this._fetchingStatus.delete(e),this.events.emit("aggregatorRemoved",{name:e});}get aggregators(){return Array.from(this.aggregatorMap.values())}get fetchingStatus(){return Object.fromEntries(this._fetchingStatus)}get slippage(){return this._slippage}setSlippage(e){this._slippage=e,this.events.emit("aggregatorSlippageChanged",{slippageInDecimal:e});}setFetchTimeoutInMs(e){this.aggregators.forEach(A=>{A.fetchTimeoutInMs=e;});}#e(){if(!this.suiKit)throw new Error("SuiKit is not initialized.")}setSuiClient(e){this.aggregators.forEach(A=>{A.setSuiClient(e);}),this.coinMetadata.setClient(e),this.client=e;}setWalletAddress(e){if(this.signerMode)throw new Error("Cannot change wallet address when SuiKit is initialized with secretKey or mnemonics.");if(!isValidSuiAddress(e))throw new Error("Invalid Sui wallet address");this.walletAddress=e,this.aggregators.forEach(A=>{A.setWalletAddress(e);});}async getCoinMetadata(e){return this.coinMetadata.getCoinMetadata(e)}async fetchRoutes(e,A){let o=this.aggregators.filter(({name:t})=>this.activeAggregator.get(t)===true),c=[],a=[],s=o.map(async t=>{this._fetchingStatus.set(t.name,true),this.events.emit("aggregatorFetchStart",{name:t.name});try{let n=await t.fetchRoute(e,A?.abortSignal);c.push(n),A?.onRouteFound?.(n);}catch(n){let i={name:t.name,reason:n};a.push(i),A?.onError?.(i);}finally{this._fetchingStatus.set(t.name,false),this.events.emit("aggregatorFetchEnd",{name:t.name});}});return await Promise.all(s),{routes:c.sort((t,n)=>BigNumber(n.formattedResult.coinOut.amount).comparedTo(t.formattedResult.coinOut.amount)??0),errors:a}}async buildRouteTransaction(e,A={}){let{mergeResult:o=true,txExtensionParams:c}=A,a=this.aggregatorMap.get(e.formattedResult.name);if(!a)throw new Error(`Aggregator ${e.formattedResult.name} not found in the aggregator list`);let{tx:s,coinOut:t}=await a.buildSwapTransaction({route:e,slippage:A.slippage??this.slippage,txExtensionParams:c}),n=e.formattedResult.coinOut.type;return o?(await S(s,t,this.client,n,this.walletAddress),{tx:s,coinOutType:n}):{tx:s,coinOut:t,coinOutType:n}}async executeSwapTransaction(e,A=false){return this.#e(),A?this.suiKit.dryRunTxn(e):this.suiKit.signAndSendTxn(e)}};var y=class extends f{constructor(e){super("cetus",e),this.client=new AggregatorClient({...e,endpoint:e.endpoint??"https://api-sui.cetus.zone/router_v3/find_routes",signer:e.signer??this.walletAddress,client:this.suiClient,env:Env.Mainnet}),this.poolsMap=new Map(ALL_DEXES.map(A=>[A,true]));}createRoute(e,A,o){let c=[],a=null;for(let t of e)t.from===A&&(a={paths:[],coinIn:{type:t.from,amount:BigInt(t.amountIn)},coinOut:{type:t.target,amount:BigInt(t.amountOut)}},c.push(a)),a&&(a.paths.push({protocolName:t.provider,coinIn:{type:t.from,amount:BigInt(t.amountIn)},coinOut:{type:t.target,amount:BigInt(t.amountOut)}}),a.coinOut={type:t.target,amount:BigInt(t.amountOut)},t.target===o&&(a=null));let s=c.reduce((t,n)=>t+n.coinIn.amount,BigInt(0)).toString();return s!=="0"&&c.forEach(t=>{t.splitPercentage=BigNumber(t.coinIn.amount.toString()).div(s).times(100).toNumber();}),c}parseRawToFormattedResult({routerData:e,coinInType:A,coinOutType:o}){return {coinIn:{type:A,amount:BigInt(e.amountIn.toString()??"0")},coinOut:{type:o,amount:BigInt(e.amountOut.toString()??"0")},routes:this.createRoute(e.paths,A,o)}}setFetchRouteSettings(e){this.fetchSettings=e;}calcSlippage(e){return e}async fetchRoute(e,A){this.validateClient();let o=this.normalizeFetchRouteParams(e),{coinInType:c,coinOutType:a,swapAmount:s}=o;this.rawRouteResult=void 0;let t=await this.withTimeout(this.client.findRouters({...this.fetchSettings,from:normalizeStructTag(c),target:normalizeStructTag(a),amount:new _(s.toString()),byAmountIn:true,providers:this.getEnabledPools()}),A);if(!t)throw new Error(`${this.name} fetch route returned empty response`);return this.rawRouteResult=t,{formattedResult:{...this.parseRawToFormattedResult({routerData:t,coinInType:c,coinOutType:a}),name:this.name},rawRouteResult:t}}async buildSwapTransaction(e){this.validateWalletAddress(),this.validateClient();let{txExtensionParams:A,slippage:o,route:c}=e,a=c?.rawRouteResult??this.rawRouteResult;if(!a)throw new Error(`${this.name} buildSwapTransaction requires a route, but none was provided or fetched.`);let s=null,t=null;if(A){let{initTx:i,coinIn:d}=A;s=i,t=d;}else s=new Transaction,s.setSender(this.walletAddress),t=await this.selectCoinInForSwap(s,BigInt(a.amountIn.toString()),normalizeStructTag(a.paths[0].from));let n=await this.client.routerSwap({router:a,txb:s,slippage:this.calcSlippage(o),inputCoin:t});return {tx:s,coinOut:n}}};var Q={faucet:{packages:{faucet:"",suiFrensGenesisWrapper:""},objects:{faucet:"",suiFrensMint:""}},staking:{packages:{events:"0x7f6ce7ade63857c4fd16ef7783fed2dfc4d7fb7e40615abdb653030b76aef0c6",lsd:"0x1575034d2729907aefca1ac757d6ccfcd3fc7e9e77927523c06007d8353ad836",afsui:"0xf325ce1300e8dac124071d3152c5c5ee6174914f8bc2161e88329cf579246efc"},objects:{stakedSuiVault:"0x2f8f6d5da7f13ea37daa397724280483ed062769813b6f31e9788e59cc88994d",stakedSuiVaultState:"0x55486449e41d89cfbdb20e005c1c5c1007858ad5b4d5d7c047d2b3b592fe8791",safe:"0xeb685899830dd5837b47007809c76d91a098d52aabbf61e8ac467c59e5cc4610",treasury:"0xd2b95022244757b0ab9f74e2ee2fb2c3bf29dce5590fa6993a85d64bd219d7e8",referralVault:"0x4ce9a19b594599536c53edb25d22532f82f18038dc8ef618afd00fbbfb9845ef",validatorConfigsTable:"0x8536350cfb8a8efdd133a1e087b55416d431f7e8b894f77b55b20c4b799ebad9",aftermathValidator:"0xd30018ec3f5ff1a3c75656abf927a87d7f0529e6dc89c7ddd1bd27ecb05e3db2"}},pools:{packages:{amm:"0xc4049b2d1cc0f6e017fda8260e4377cecd236bd7f56a54fee120816e72e2e0dd",ammInterface:"0x8d8bba50c626753589aa5abbc006c9fa07736f55f4e6fb57481682997c0b0d52",events:"0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c",eventsV2:"0xc4049b2d1cc0f6e017fda8260e4377cecd236bd7f56a54fee120816e72e2e0dd"},objects:{poolRegistry:"0xfcc774493db2c45c79f688f88d28023a3e7d98e4ee9f48bbf5c7990f651577ae",protocolFeeVault:"0xf194d9b1bcad972e45a7dd67dd49b3ee1e3357a00a50850c52cd51bb450e13b4",treasury:"0x28e499dff5e864a2eafe476269a4f5035f1c16f338da7be18b103499abf271ce",insuranceFund:"0xf0c40d67b078000e18032334c3325c47b9ec9f3d9ae4128be820d54663d14e3b",lpCoinsTable:"0x7f3bb65251feccacc7f48461239be1008233b85594114f7bf304e5e5b340bf59"},other:{createLpCoinPackageCompilations:{0:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEAAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[167,102,246,194,32,223,3,45,134,147,18,9,59,94,154,58,126,34,119,96,13,193,175,198,63,222,118,4,234,110,46,214]}',1:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEBAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[68,93,25,253,95,37,116,117,115,245,79,81,250,68,193,193,125,175,148,139,217,235,215,33,240,45,78,14,3,86,156,253]}',2:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgECAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[226,124,21,102,7,55,200,164,249,68,13,253,43,195,52,31,88,207,26,30,152,251,208,57,135,126,235,45,23,164,119,82]}',3:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEDAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[1,144,16,189,84,90,47,167,188,222,48,174,25,190,46,185,6,221,67,91,132,40,116,30,179,102,100,127,83,12,109,13]}',4:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEEAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[188,181,24,0,200,201,56,67,47,157,254,230,47,200,183,173,203,125,184,180,21,175,170,42,167,82,194,112,35,226,84,160]}',5:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEFAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[139,229,11,229,58,97,20,164,146,173,45,172,225,131,71,62,84,106,77,218,122,249,243,255,146,34,28,60,77,35,55,138]}',6:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEGAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[57,76,77,44,68,157,60,123,68,75,189,64,53,35,82,187,207,42,126,62,112,57,251,96,190,255,39,160,152,130,157,52]}',7:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEHAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[123,60,245,235,196,138,131,187,192,81,41,5,55,144,176,99,178,245,228,90,186,155,175,11,175,182,127,251,112,69,207,36]}',8:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEIAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[62,140,187,2,13,226,252,216,57,79,25,215,73,0,30,117,240,181,17,67,90,160,116,93,0,185,100,177,98,158,120,249]}',9:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEJAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[224,168,250,132,113,73,22,162,90,31,20,5,146,218,102,211,9,26,235,144,153,60,68,242,99,43,182,103,163,123,70,243]}',10:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEKAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[230,2,103,229,53,229,25,139,165,170,103,184,37,95,22,138,144,54,70,94,84,1,166,69,226,228,2,111,190,177,88,67]}',11:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgELAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[47,22,229,32,128,229,189,95,254,208,76,7,63,57,67,181,242,47,139,87,115,116,187,69,186,231,157,193,217,175,119,251]}',12:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEMAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[84,220,49,85,231,231,205,206,223,231,112,68,34,157,61,115,234,156,6,203,2,158,212,203,215,170,136,228,68,193,188,13]}',13:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgENAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[237,140,135,226,69,221,118,110,149,250,210,127,140,11,253,163,73,64,189,152,115,51,234,40,195,87,188,107,171,233,96,99]}',14:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEOAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[178,202,9,164,149,122,241,165,109,17,64,83,161,86,55,194,230,149,60,174,236,221,205,150,98,176,28,228,122,182,83,85]}',15:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEPAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[162,91,42,1,93,167,63,154,173,142,135,15,249,131,197,24,69,164,212,169,231,169,19,38,42,86,25,84,219,229,233,20]}',16:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgEQAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[79,121,127,12,72,247,127,165,243,18,184,175,76,20,119,251,245,47,31,190,247,87,15,198,47,204,130,99,18,94,161,74]}',17:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgERAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[40,28,55,168,44,135,53,11,9,113,97,54,212,21,163,15,203,241,151,5,117,250,3,22,135,69,113,175,166,166,111,19]}',18:'{"modules":["oRzrCwYAAAAKAQAGAgYIAw4LBBkCBRsRByxPCHtgBtsBAwreAQUM4wEPAAICAwEHAAACAAIBAgAABgABAAEEAwEBAgECAggABwgBAAEIAAMJAAIHCAEFQUZfTFAJVHhDb250ZXh0BWFmX2xwDWFtbV9pbnRlcmZhY2UOY3JlYXRlX2xwX2NvaW4LZHVtbXlfZmllbGQEaW5pdAp0eF9jb250ZXh0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgYl3CzUCu45mKHWYg3oiSlkwVBm4KKF2LVzkQ7Ux11QAgESAAIBBQEAAAAAAQULAAcACwE4AAIA"],"dependencies":["0xefe170ec0be4d762196bedecd7a065816576198a6527c99282a2551aaa7da38c","0x0625dc2cd40aee3998a1d6620de8892964c15066e0a285d8b573910ed4c75d50","0x712579292f80c11a0c9de4ff553d6e5c4757105e83a8a3129823d2b39e65d062","0xa6baab1e668c7868991c1c3c11e144100f5734c407d020f72a01b9d1a8bcb97f","0x0000000000000000000000000000000000000000000000000000000000000001","0x2d9316f1f1a95f6d7c85a4e690ef7c359e6649773ef2c37ad7d9857adb6bef06","0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf","0x0000000000000000000000000000000000000000000000000000000000000002","0x64213b0e4a52bac468d4ac3f140242f70714381653a1919a6d57cd49c628207a","0x73baa782c55003b3a359dec04b189312565d18e7309d4a51f5f112f891e3b2ab"],"digest":[173,252,173,67,1,192,123,156,242,232,253,247,12,147,190,24,152,41,3,166,219,90,110,43,48,139,30,235,10,219,209,58]}'}}},daoFeePools:{packages:{amm:"0x5ad6890968efcf3d20899e0cec735214f1067b96e77e77d86408989998468bb2",events:"0x6f60a091637054e23915b8745c0c0d47b1d49618ee3435b5f68eccf6a44fb53d"},objects:{version:"0xb4bfb0f917f12ad2a772bea9b4f22431f6f5f9653162c3ae6fae5b99b21392b7"}},farms:{packages:{vaults:"0x7ce31301b506b4ed327523061fe95d9c347082fa60da39733f74ffad9a53f8f5",vaultsInitial:"0x4f0a1a923dd063757fd37e04a9c2cee8980008e94433c9075c390065f98e9e4b",vaultsV2:"0x2d6755e10132fc1eab5e8a4a3e7ddfdacc31884621592d95fce48ecf1e157db9",eventsV2:"0x79ee374b9e3c60c00a19fdbeaea25731bbea8f2cab9bb61bb712543e0ba55b7a"},objects:{version:"0xdc372fa9b6a538382efc560478a786fcf04e6e34850100020056c98c5c387193"}},dca:{packages:{dca:"0x409e2ace51cc5821be41a667e4cb9afa64cde49a7f940c68109db24b39ca93b8",events:"0x002134246a32eec18e68f1f5aadb8edd34856298ae6d32c145d28f3ca46c7fd1",eventsV2:"0x409e2ace51cc5821be41a667e4cb9afa64cde49a7f940c68109db24b39ca93b8"},objects:{config:"0x1b26465e9c688e3a3d2301f26e25091bc0f91708d953dc220f5697faa8ba9bd6"}},limitOrders:{packages:{limitOrders:"0xe57ee3613b7dece546f8a2d8a53145cbab41d32b86037b94f9ebfcbcfa66885a",events:"0xe57ee3613b7dece546f8a2d8a53145cbab41d32b86037b94f9ebfcbcfa66885a"}},sharedCustody:{address:"0xafe2fafac0b048c9c70a61cc1798400a85173df96b30118c40af6f3382b5a777",publicKey:"AMylYwVSuJQmTmDm6KuPlNwLnTtkk63HqOByubxxsVeC"},referralVault:{packages:{referralVault:"0xc66fabf1a9253e43c70f1cc02d40a1d18db183140ecaae2a3f58fa6b66c55acf"},objects:{referralVault:"0x35d35b0e5b177593d8c3a801462485572fc30861e6ce96a55af6dc4730709278"}},suiFrens:{packages:{suiFrens:"",suiFrensBullshark:"",accessories:"",suiFrensVault:"",suiFrensVaultCapyLabsExtension:""},objects:{capyLabsApp:"",suiFrensVault:"",suiFrensVaultStateV1:"",suiFrensVaultStateV1MetadataTable:"",suiFrensVaultCapyLabsExtension:""}},router:{packages:{utils:"0xdc15721baa82ba64822d585a7349a1508f76d94ae80e899b06e48369c257750e"}},dynamicGas:{sponsorAddress:"0xae4ba5f592e695a46d58a0579aa5d4f6ebead46be0f2d5bd229d5c292290548c"},perpetuals:{packages:{events:"0x21d001e8b07da2e3facb3e2d636bbaef43ba3c978bd84810368840b7d57c5068"},objects:{registry:"0xd0b3ea6b7a2f5887543a5a493aa70bcd0ec1a2d9c03d830504234df3e8c6a609"}},perpetualsVaults:{other:{createLpCoinPackageCompilation:'{"modules":["oRzrCwYAAAAKAQAOAg4eAywsBFgIBWBZB7kB4gEImwOAAQabBGcKggUFDIcFLAASAwcBDQIGAhMCFAIVAAICAAIBBwEAAAMADAEAAQMDDAEAAQUEAgAGBQcAAAoAAQABCwEDAAIRBgcBAAMICQoBAgQOBgEBDAQPDwEBDAUQDA0ABgwEBQACBQMIBAsFDgIIAAcIBAACCwIBCAALAwEIAAECAQoCAQgFAQkAAQsBAQkAAQgABwkAAgoCCgIKAgsBAQgFBwgEAgsDAQkACwIBCQABCwIBCAABBggEAQUBCwMBCAACCQAFDENvaW5NZXRhZGF0YQZPcHRpb24IVEVNUExBVEULVHJlYXN1cnlDYXAJVHhDb250ZXh0A1VybARjb2luCWNvbnN0YW50cw9jcmVhdGVfY3VycmVuY3kLZHVtbXlfZmllbGQEaW5pdAtscF9kZWNpbWFscxVuZXdfdW5zYWZlX2Zyb21fYnl0ZXMGb3B0aW9uFHB1YmxpY19mcmVlemVfb2JqZWN0D3B1YmxpY190cmFuc2ZlcgZzZW5kZXIEc29tZQh0ZW1wbGF0ZQh0cmFuc2Zlcgp0eF9jb250ZXh0A3VybAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAp4geY2XwRD2s2t7PYVDqpJGMi7y/Y2DrXnvMyXUc7wvCgIJCFRFTVBMQVRFCgIKCUNPSU4gTkFNRQoCERBDT0lOIERFU0NSSVBUSU9OCgI3Nmh0dHBzOi8vYWZ0ZXJtYXRoLmZpbmFuY2UvY29pbnMvcGVycGV0dWFscy9kZWZhdWx0LnN2ZwACAQkBAAAAAAIUCwARAQcABwEHAgcDEQc4AAoBOAEMAgwDCwI4AgsDCwEuEQY4AwIA"],"dependencies":["0x46234ba81f3a5ba6571383233df0f9ea5fe60a3a327537be1f5fec447bced693","0x9e20798d97c110f6b36b7b3d8543aa9246322ef2fd8d83ad79ef3325d473bc2f","0xa8172ed2a6f14cd0ee55124326685713d6f765039e7c5339f7a0b57be06fddb5","0x21d001e8b07da2e3facb3e2d636bbaef43ba3c978bd84810368840b7d57c5068","0x0000000000000000000000000000000000000000000000000000000000000001","0x0000000000000000000000000000000000000000000000000000000000000002"],"digest":[197,20,191,110,212,210,250,216,46,69,171,178,75,240,176,17,254,237,222,251,192,94,195,175,10,216,89,18,238,154,114,144]}'}},leveragedStaking:{packages:{leveragedAfSui:"",leveragedAfSuiInitial:""},objects:{leveragedAfSuiState:"",afSuiSuiPoolId:""}},scallop:{objects:{version:"",afSuiMarket:"",coinDecimalsRegistry:"",xOracle:""}},nftAmm:{packages:{nftAmm:""},objects:{protocolFeeVault:"",treasury:"",insuranceFund:"",referralVault:""}},nfts:{packages:{mystenTransferPolicy:"0x0cb4bcc0560340eb1a1b929cabe56b33fc6449820ec8c1980d69bb98b649b802"}}};var h=()=>(...r)=>r;var o0=h()("Aftermath","Bolt","Bluefin","BlueMove","Cetus","DeepBook","DeepBookV3","DoubleUpPump","FlowX","FlowXClmm","FullSail","HopFun","Kriya","KriyaClmm","Magma","Metastable","Momentum","MovePump","Obric","SpringSui","Steamm","SuiAi","SuiSwap","Turbos","TurbosFun","BlastFun"),T=class extends f{afApi;constructor(e){super("aftermath",e),this.afApi=new AftermathApi(this.suiClient,e.addresses??Q),this.client=new Aftermath("MAINNET",this.afApi),this.poolsMap=new Map(o0.map(A=>[A,true]));}get router(){return this.validateClient(),this.client.Router()}setFetchRouteSettings(e){this.fetchSettings=e;}calcSlippage(e){return e}parseRawRouteToFormattedResult(e){let A=e.coinIn.amount,o={...e,name:this.name};return o.routes.forEach(c=>{let a=c.paths[0].coinIn.amount;c.splitPercentage=BigNumber(a.toString()).div(A.toString()).times(100).toNumber();}),o}async fetchRoute(e,A){let o=this.normalizeFetchRouteParams(e),{coinInType:c,coinOutType:a,swapAmount:s}=o;this.rawRouteResult=void 0;let t=await this.withTimeout(this.router.getCompleteTradeRouteGivenAmountIn({...this.fetchSettings,protocolWhitelist:this.getEnabledPools(),coinInType:c,coinOutType:a,coinInAmount:s},A));if(!t)throw new Error(`${this.name} fetch route returned empty response`);return this.rawRouteResult=t,{formattedResult:this.parseRawRouteToFormattedResult(t),rawRouteResult:t}}async buildSwapTransaction(e){this.validateWalletAddress();let{txExtensionParams:A,slippage:o,route:c}=e,a=c?.rawRouteResult??this.rawRouteResult;if(!a)throw new Error(`${this.name} build swap transaction failed: no route available`);let s=null,t=null;if(A){let{initTx:d,coinIn:u}=A;s=d,t=u;}else s=new Transaction$1,s.setSender(this.walletAddress),t=await this.selectCoinInForSwap(s,BigInt(a.coinIn.amount.toString()),normalizeStructTag$1(a.coinIn.type));let{tx:n,coinOutId:i}=await this.router.addTransactionForCompleteTradeRoute({walletAddress:this.walletAddress,completeRoute:a,slippage:this.calcSlippage(o),tx:s,coinInId:t});if(!i)throw new Error(`${this.name} build swap transaction failed`);return {tx:n,coinOut:i}}};var r0=h()("aftermath","bluefin","bluemove","cetus","cetus_dlmm","deepbook_v3","ferra_clmm","ferra_dlmm","flowx","flowx_v3","fullsail","kriya","kriya_v3","magma","obric","springsui","steamm","stsui","suiswap","turbos","bluefinx","steamm_oracle_quoter","haedal_pmm","momentum","steamm_oracle_quoter_v2","sevenk_v1"),P=class extends f{commission;constructor(e){super("7k",e),this.commission=e.commission??{partner:this.walletAddress,commissionBps:0},setSuiClient(this.suiClient),this.poolsMap=new Map(r0.map(A=>[A,true]));}setSuiClient(e){super.setSuiClient(e),setSuiClient(e);}setFetchRouteSettings(e){this.fetchSettings=e;}calcSlippage(e){return e}createRoute(e,A,o){let c=[];e.forEach((s,t)=>{c.push({paths:[],coinIn:{type:s.tokenIn,amount:BigInt(BigNumber(s.tokenInAmount).multipliedBy(A).integerValue().toString())},coinOut:{type:s.tokenOut,amount:BigInt(BigNumber(s.tokenOutAmount).multipliedBy(o).integerValue().toString())}}),s.hops.forEach(n=>{c[t].paths.push({protocolName:g(n.pool.type.toLowerCase()),coinIn:{type:n.tokenIn,amount:BigInt(BigNumber(n.tokenInAmount).multipliedBy(A).integerValue().toString())},coinOut:{type:n.tokenOut,amount:BigInt(BigNumber(n.tokenOutAmount).multipliedBy(o).integerValue().toString())}});});});let a=c.reduce((s,t)=>s+t.coinIn.amount,BigInt(0)).toString();return c.forEach(s=>{s.splitPercentage=BigNumber(s.coinIn.amount.toString()).div(a).times(100).toNumber();}),c}parseRawRouteToFormattedResult(e){if(!e.routes)throw new Error(`${this.name} fetch route returned empty sorRoute`);return {routes:this.createRoute(e.routes,BigNumber(e.swapAmountWithDecimal).dividedBy(e.swapAmount).toNumber(),BigNumber(e.returnAmountAfterCommissionWithDecimal).dividedBy(e.returnAmount).toNumber()),coinIn:{type:e.tokenIn,amount:BigInt(e.swapAmountWithDecimal)},coinOut:{type:e.tokenOut,amount:BigInt(e.returnAmountAfterCommissionWithDecimal)},name:this.name}}async fetchRoute(e,A){let o=this.normalizeFetchRouteParams(e),{coinInType:c,coinOutType:a,swapAmount:s}=o;this.rawRouteResult=void 0;let t=await this.withTimeout(getQuote({...this.fetchSettings,tokenIn:c,tokenOut:a,amountIn:s.toString(),sources:this.getEnabledPools()}),A);if(!t)throw new Error(`${this.name} fetch route returned empty response`);return this.rawRouteResult=t,{formattedResult:this.parseRawRouteToFormattedResult(t),rawRouteResult:t}}async buildSwapTransaction(e){this.validateWalletAddress();let{txExtensionParams:A,slippage:o,route:c}=e,a=c?.rawRouteResult??this.rawRouteResult;if(!a)throw new Error(`${this.name} build swap transaction failed: no route available`);let s=null,t=null;if(A){let{initTx:d,coinIn:u}=A;s=d,t=u;}else s=new Transaction$1,s.setSender(this.walletAddress),t=await this.selectCoinInForSwap(s,BigInt(a.swapAmountWithDecimal),normalizeStructTag$1(a.tokenIn));let{tx:n,coinOut:i}=await buildTx({quoteResponse:a,slippage:this.calcSlippage(o),commission:this.commission,accountAddress:this.walletAddress,extendTx:{tx:s,coinIn:t}});if(!i)throw new Error(`${this.name} build swap transaction failed`);return {tx:"txBytes"in n?Transaction$1.from(n.txBytes):n,coinOut:i}}};var Y=class extends f{client=new AggregatorQuoter("mainnet");commission;constructor(e){super("flowx",e),this.commission=e.commission,this.poolsMap=new Map(Object.values(Protocol).map(A=>[A,true]));}setFetchRouteSettings(e){this.fetchSettings=e;}calcSlippage(e){return BigNumber(e).multipliedBy(1e6).integerValue().toNumber()}parseRawRouteToFormattedResult(e){let A=[];for(let o of e.routes)A.push({paths:o.paths.map(c=>({protocolName:g(c.protocol()?.toLowerCase()??""),coinIn:{amount:BigInt((c.amountIn??0).toString()),type:c.input.coinType},coinOut:{amount:BigInt((c.amountOut??0).toString()),type:c.output.coinType}})),splitPercentage:Number(o.amountIn??0)/Number(this.rawRouteResult?.amountIn??1)*100,coinIn:{amount:BigInt(o.amountIn.toString()),type:normalizeStructTag(o.input.coinType)},coinOut:{amount:BigInt(o.amountOut.toString()),type:normalizeStructTag(o.output.coinType)}});return {routes:A,coinIn:{type:normalizeStructTag(e.coinIn.coinType),amount:BigInt(e.amountIn.toString())},coinOut:{type:normalizeStructTag(e.coinOut.coinType),amount:BigInt(e.amountOut.toString())},name:this.name}}async fetchRoute(e,A){this.validateClient();let o=this.normalizeFetchRouteParams(e);this.rawRouteResult=void 0;let{coinInType:c,coinOutType:a,swapAmount:s}=o,t=await this.withTimeout(this.client.getRoutes({...this.fetchSettings,tokenIn:c,tokenOut:a,amountIn:s.toString(),commission:this.commission,includeSources:this.getEnabledPools()}),A);if(!t)throw new Error(`${this.name} fetch route returned empty response`);return this.rawRouteResult=t,{formattedResult:this.parseRawRouteToFormattedResult(t),rawRouteResult:t}}async buildSwapTransaction(e){this.validateWalletAddress();let{txExtensionParams:A,slippage:o,route:c}=e,a=c?.rawRouteResult??this.rawRouteResult;if(!a)throw new Error(`${this.name} build swap transaction failed: no route available`);let s=null,t=null;if(A){let{initTx:u,coinIn:V}=A;s=u,t=V;}else s=new Transaction,s.setSender(this.walletAddress),t=await this.selectCoinInForSwap(s,BigInt(a.amountIn.toString()),normalizeStructTag(a.coinIn.coinType));let n=new TradeBuilder("mainnet",a.routes).sender(this.walletAddress).slippage(this.calcSlippage(o)).deadline(Date.now()+60*60*1e3),d=await(this.commission?n.commission(this.commission).build():n.build()).swap({client:this.suiClient,tx:s,coinIn:t});if(!d)throw new Error(`${this.name} build swap transaction failed`);return {tx:s,coinOut:d}}};
14
14
 
15
15
  export { T as AftermathSwap, F as Aggregator, y as CetusSwap, p as CoinMetadataRegistry, Y as FlowXSwap, f as SwapSdkBase, b as TypedEventEmitter, P as _7kSwap, B as isSuiType, S as mergeWithExistingOrTransfer, E as selectCoins, g as transformProperCase };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scallop-io/scallop-swap-sdk",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "Scallop Swap Meta Aggregator SDK for Sui Blockchain developed by Scallop Labs.",
5
5
  "keywords": [
6
6
  "sui",
package/src/sdk/7k.ts CHANGED
@@ -215,8 +215,9 @@ export class _7kSwap extends SwapSdkBase<
215
215
  abortSignal?: AbortSignal
216
216
  ): Promise<FetchRouteResult<QuoteResponse>> {
217
217
  const normalizedParams = this.normalizeFetchRouteParams(params);
218
-
219
218
  const { coinInType, coinOutType, swapAmount } = normalizedParams;
219
+ this.rawRouteResult = undefined;
220
+
220
221
  const rawRouteResult = await this.withTimeout(
221
222
  getQuote({
222
223
  ...this.fetchSettings,
@@ -116,8 +116,9 @@ export class AftermathSwap extends SwapSdkBase<
116
116
  abortSignal?: AbortSignal
117
117
  ): Promise<FetchRouteResult<RouterCompleteTradeRoute>> {
118
118
  const normalizedParams = this.normalizeFetchRouteParams(params);
119
-
120
119
  const { coinInType, coinOutType, swapAmount } = normalizedParams;
120
+ this.rawRouteResult = undefined;
121
+
121
122
  const rawRouteResult = await this.withTimeout(
122
123
  this.router.getCompleteTradeRouteGivenAmountIn(
123
124
  {
package/src/sdk/cetus.ts CHANGED
@@ -153,6 +153,8 @@ export class CetusSwap extends SwapSdkBase<
153
153
  this.validateClient();
154
154
  const normalizedParams = this.normalizeFetchRouteParams(params);
155
155
  const { coinInType, coinOutType, swapAmount } = normalizedParams;
156
+ this.rawRouteResult = undefined;
157
+
156
158
  const rawRouteResult = await this.withTimeout(
157
159
  this.client.findRouters({
158
160
  ...this.fetchSettings,
package/src/sdk/flowx.ts CHANGED
@@ -124,6 +124,7 @@ export class FlowXSwap extends SwapSdkBase<
124
124
  ): Promise<FetchRouteResult<GetRoutesResult<Coin, Coin>>> {
125
125
  this.validateClient();
126
126
  const normalizedParams = this.normalizeFetchRouteParams(params);
127
+ this.rawRouteResult = undefined;
127
128
 
128
129
  const { coinInType, coinOutType, swapAmount } = normalizedParams;
129
130
  const rawRouteResult = await this.withTimeout(
package/src/types.ts CHANGED
@@ -4,9 +4,18 @@ export type SwapSdkPoolStatusEvent<PoolType> = {
4
4
  enabled: boolean;
5
5
  };
6
6
 
7
+ export type AllSwapSdkPoolStatusEvent = {
8
+ name: string;
9
+ enabled: boolean;
10
+ };
11
+
7
12
  export type SwapSdkEvents<PoolType> = {
8
13
  poolStatusChanged: SwapSdkPoolStatusEvent<PoolType>;
9
- allPoolStatusChanged: { name: string; enabled: boolean };
14
+ allPoolStatusChanged: AllSwapSdkPoolStatusEvent;
15
+ };
16
+
17
+ export type SlippageChangedEvent = {
18
+ slippageInDecimal: number;
10
19
  };
11
20
 
12
21
  export type AggregatorStatusEvent = {
@@ -14,12 +23,16 @@ export type AggregatorStatusEvent = {
14
23
  enabled: boolean;
15
24
  };
16
25
 
26
+ export type AggregatorEvent = {
27
+ name: string;
28
+ };
29
+
17
30
  export type AggregatorEvents<PoolType> = {
18
31
  poolStatusChanged: SwapSdkPoolStatusEvent<PoolType>;
19
32
  aggregatorStatusChanged: AggregatorStatusEvent;
20
- aggregatorRemoved: { name: string };
21
- aggregatorAdded: { name: string };
22
- aggregatorSlippageChanged: { slippageInDecimal: number };
23
- aggregatorFetchStart: { name: string };
24
- aggregatorFetchEnd: { name: string };
33
+ aggregatorRemoved: AggregatorEvent;
34
+ aggregatorAdded: AggregatorEvent;
35
+ aggregatorSlippageChanged: SlippageChangedEvent;
36
+ aggregatorFetchStart: AggregatorEvent;
37
+ aggregatorFetchEnd: AggregatorEvent;
25
38
  };