@scallop-io/scallop-swap-sdk 5.1.1 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -139,9 +139,14 @@ type AllSwapSdkPoolStatusEvent = {
139
139
  name: string;
140
140
  enabled: boolean;
141
141
  };
142
+ type SupportedPoolsChangedEvent<PoolType> = {
143
+ name: string;
144
+ pools: PoolType[];
145
+ };
142
146
  type SwapSdkEvents<PoolType> = {
143
147
  poolStatusChanged: SwapSdkPoolStatusEvent<PoolType>;
144
148
  allPoolStatusChanged: AllSwapSdkPoolStatusEvent;
149
+ supportedPoolsChanged: SupportedPoolsChangedEvent<PoolType>;
145
150
  };
146
151
  type SlippageChangedEvent = {
147
152
  slippageInDecimal: number;
@@ -156,6 +161,7 @@ type AggregatorEvent = {
156
161
  type AggregatorEvents<PoolType> = {
157
162
  poolStatusChanged: SwapSdkPoolStatusEvent<PoolType>;
158
163
  allPoolStatusChanged: AllSwapSdkPoolStatusEvent;
164
+ supportedPoolsChanged: SupportedPoolsChangedEvent<PoolType>;
159
165
  aggregatorStatusChanged: AggregatorStatusEvent;
160
166
  aggregatorRemoved: AggregatorEvent;
161
167
  aggregatorAdded: AggregatorEvent;
@@ -194,6 +200,22 @@ declare abstract class SwapSdkBase<PoolType = string, RawRouteResultType = any,
194
200
  setWalletAddress(address: string): void;
195
201
  setSuiClient(client: ClientWithCoreApi): void;
196
202
  abstract calcSlippage(slippageInDecimal: number): number;
203
+ /**
204
+ * Declares the full set of pools this aggregator supports. `pools` is authoritative: statuses of
205
+ * pools already in the map are kept, and entries for pools missing from `pools` are dropped, so a
206
+ * persisted preference for a pool this version no longer supports does not linger in the map (it
207
+ * re-defaults to enabled if that pool comes back).
208
+ *
209
+ * Aggregators whose pool list is only known once their client is created must not skip this
210
+ * when the map is non-empty: consumers restore persisted pool preferences before the client
211
+ * exists, so the map can hold a handful of previously toggled pools while the rest of the list
212
+ * has never been seen. Bailing out in that case leaves the aggregator permanently unaware of
213
+ * every other pool, which empties `getEnabledPools()` and stops it routing.
214
+ *
215
+ * Emits `supportedPoolsChanged` so consumers that rendered `pools` before the client existed can
216
+ * re-read the now-complete list.
217
+ */
218
+ protected setSupportedPools(pools: PoolType[]): void;
197
219
  togglePoolStatus(pool: PoolType, enabled?: boolean): void;
198
220
  toggleAllPoolStatus(enabled: boolean): void;
199
221
  getEnabledPools(): PoolType[];
@@ -208,4 +230,4 @@ declare abstract class SwapSdkBase<PoolType = string, RawRouteResultType = any,
208
230
  }>;
209
231
  }
210
232
 
211
- export { type AggregatorEvents as A, type Coin as C, type FetchRouteParams as F, SwapSdkBase as S, TypedEventEmitter as T, type SwapSdkConstructorParams as a, type FetchRouteResult as b, type SwapParams as c, type FormattedRouteResult as d, type SwapRoute as e, type FetchRoutesOptions as f, type SwapBuildResult as g, type AggregatorEvent as h, type AggregatorStatusEvent as i, type AllSwapSdkPoolStatusEvent as j, type SlippageChangedEvent as k, type SwapCoinInfo as l, type SwapPath as m, type SwapSdkBaseInterface as n, type SwapSdkEvents as o, type SwapSdkPoolStatusEvent as p };
233
+ export { type AggregatorEvents as A, type Coin as C, type FetchRouteParams as F, SwapSdkBase as S, TypedEventEmitter as T, type SwapSdkConstructorParams as a, type FetchRouteResult as b, type SwapParams as c, type FormattedRouteResult as d, type SwapRoute as e, type FetchRoutesOptions as f, type SwapBuildResult as g, type AggregatorEvent as h, type AggregatorStatusEvent as i, type AllSwapSdkPoolStatusEvent as j, type SlippageChangedEvent as k, type SupportedPoolsChangedEvent as l, type SwapCoinInfo as m, type SwapPath as n, type SwapSdkBaseInterface as o, type SwapSdkEvents as p, type SwapSdkPoolStatusEvent as q };
@@ -139,9 +139,14 @@ type AllSwapSdkPoolStatusEvent = {
139
139
  name: string;
140
140
  enabled: boolean;
141
141
  };
142
+ type SupportedPoolsChangedEvent<PoolType> = {
143
+ name: string;
144
+ pools: PoolType[];
145
+ };
142
146
  type SwapSdkEvents<PoolType> = {
143
147
  poolStatusChanged: SwapSdkPoolStatusEvent<PoolType>;
144
148
  allPoolStatusChanged: AllSwapSdkPoolStatusEvent;
149
+ supportedPoolsChanged: SupportedPoolsChangedEvent<PoolType>;
145
150
  };
146
151
  type SlippageChangedEvent = {
147
152
  slippageInDecimal: number;
@@ -156,6 +161,7 @@ type AggregatorEvent = {
156
161
  type AggregatorEvents<PoolType> = {
157
162
  poolStatusChanged: SwapSdkPoolStatusEvent<PoolType>;
158
163
  allPoolStatusChanged: AllSwapSdkPoolStatusEvent;
164
+ supportedPoolsChanged: SupportedPoolsChangedEvent<PoolType>;
159
165
  aggregatorStatusChanged: AggregatorStatusEvent;
160
166
  aggregatorRemoved: AggregatorEvent;
161
167
  aggregatorAdded: AggregatorEvent;
@@ -194,6 +200,22 @@ declare abstract class SwapSdkBase<PoolType = string, RawRouteResultType = any,
194
200
  setWalletAddress(address: string): void;
195
201
  setSuiClient(client: ClientWithCoreApi): void;
196
202
  abstract calcSlippage(slippageInDecimal: number): number;
203
+ /**
204
+ * Declares the full set of pools this aggregator supports. `pools` is authoritative: statuses of
205
+ * pools already in the map are kept, and entries for pools missing from `pools` are dropped, so a
206
+ * persisted preference for a pool this version no longer supports does not linger in the map (it
207
+ * re-defaults to enabled if that pool comes back).
208
+ *
209
+ * Aggregators whose pool list is only known once their client is created must not skip this
210
+ * when the map is non-empty: consumers restore persisted pool preferences before the client
211
+ * exists, so the map can hold a handful of previously toggled pools while the rest of the list
212
+ * has never been seen. Bailing out in that case leaves the aggregator permanently unaware of
213
+ * every other pool, which empties `getEnabledPools()` and stops it routing.
214
+ *
215
+ * Emits `supportedPoolsChanged` so consumers that rendered `pools` before the client existed can
216
+ * re-read the now-complete list.
217
+ */
218
+ protected setSupportedPools(pools: PoolType[]): void;
197
219
  togglePoolStatus(pool: PoolType, enabled?: boolean): void;
198
220
  toggleAllPoolStatus(enabled: boolean): void;
199
221
  getEnabledPools(): PoolType[];
@@ -208,4 +230,4 @@ declare abstract class SwapSdkBase<PoolType = string, RawRouteResultType = any,
208
230
  }>;
209
231
  }
210
232
 
211
- export { type AggregatorEvents as A, type Coin as C, type FetchRouteParams as F, SwapSdkBase as S, TypedEventEmitter as T, type SwapSdkConstructorParams as a, type FetchRouteResult as b, type SwapParams as c, type FormattedRouteResult as d, type SwapRoute as e, type FetchRoutesOptions as f, type SwapBuildResult as g, type AggregatorEvent as h, type AggregatorStatusEvent as i, type AllSwapSdkPoolStatusEvent as j, type SlippageChangedEvent as k, type SwapCoinInfo as l, type SwapPath as m, type SwapSdkBaseInterface as n, type SwapSdkEvents as o, type SwapSdkPoolStatusEvent as p };
233
+ export { type AggregatorEvents as A, type Coin as C, type FetchRouteParams as F, SwapSdkBase as S, TypedEventEmitter as T, type SwapSdkConstructorParams as a, type FetchRouteResult as b, type SwapParams as c, type FormattedRouteResult as d, type SwapRoute as e, type FetchRoutesOptions as f, type SwapBuildResult as g, type AggregatorEvent as h, type AggregatorStatusEvent as i, type AllSwapSdkPoolStatusEvent as j, type SlippageChangedEvent as k, type SupportedPoolsChangedEvent as l, type SwapCoinInfo as m, type SwapPath as n, type SwapSdkBaseInterface as o, type SwapSdkEvents as p, type SwapSdkPoolStatusEvent as q };
@@ -0,0 +1,2 @@
1
+ 'use strict';var utils=require('@mysten/sui/utils'),events=require('events'),grpc=require('@mysten/sui/grpc'),jsonRpc=require('@mysten/sui/jsonRpc'),bignumber_js=require('bignumber.js'),suiKit=require('@scallop-io/sui-kit');var y=utils.normalizeStructTag(utils.SUI_TYPE_ARG),p=n=>utils.normalizeStructTag(n)===y,h=async(n,t,e,s,r)=>{try{if(p(s))n.mergeCoins(n.gas,[t]);else {let{objects:i}=await e.core.listCoins({coinType:s,owner:r,limit:1});if(!i.length)throw new Error(`No existing ${s} coin found to merge with`);let a=n.objectRef({objectId:i[0].objectId,version:i[0].version,digest:i[0].digest});i.length===1?n.mergeCoins(a,[t]):n.mergeCoins(a,[t,...i.slice(1).map(o=>n.objectRef({objectId:o.objectId,version:o.version,digest:o.digest}))]);}}catch{n.transferObjects([t],n.pure.address(r));}},v=n=>n[0].toUpperCase()+n.slice(1),k=n=>n.split("_").map(v).join(" ");var u=class extends events.EventEmitter{on(t,e){return super.on(t,e)}once(t,e){return super.once(t,e)}off(t,e){return super.off(t,e)}emit(t,e){return super.emit(t,e)}};var f=class{rawRouteResult;suiGrpcClient;name="";events=new u;client;suiClient;fetchTimeoutInMs;walletAddress;fetchSettings;poolsMap=new Map;constructor(t,e){let s=e.suiClient?.network??"mainnet",r=new grpc.SuiGrpcClient({baseUrl:jsonRpc.getJsonRpcFullnodeUrl(s),network:s});this.suiGrpcClient=e.suiGrpcClient??r,this.suiClient=e.suiClient??r.core,this.fetchTimeoutInMs=e.fetchTimeoutInMs??4e3,this.walletAddress=e.walletAddress,this.name=t.toLowerCase(),e.fetchSettings&&this.setFetchRouteSettings(e.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(t){this.walletAddress=t;}setSuiClient(t){this.suiClient=t;}setSupportedPools(t){this.poolsMap=new Map(t.map(e=>[e,this.poolsMap.get(e)??true])),this.events.emit("supportedPoolsChanged",{name:this.name,pools:this.pools});}togglePoolStatus(t,e){let s=e??!(this.poolsMap.get(t)??true);this.poolsMap.set(t,s),this.events.emit("poolStatusChanged",{name:this.name,pool:t,enabled:s});}toggleAllPoolStatus(t){this.pools.forEach(e=>{this.poolsMap.set(e,t);}),this.events.emit("allPoolStatusChanged",{name:this.name,enabled:t});}getEnabledPools(){return Array.from(this.poolsMap.entries()).filter(([t,e])=>e).map(([t,e])=>t)}normalizeFetchRouteParams(t){return {...t,coinInType:utils.normalizeStructTag(t.coinInType),coinOutType:utils.normalizeStructTag(t.coinOutType)}}async withTimeout(t,e){let s,r,i=[t,new Promise((a,o)=>{s=setTimeout(()=>{o(new Error(`${this.name} fetch route timeout`));},this.fetchTimeoutInMs);})];e&&i.push(new Promise((a,o)=>{if(e.aborted){o(e.reason??new Error(`${this.name} fetch route aborted`));return}r=()=>o(e.reason??new Error(`${this.name} fetch route aborted`)),e.addEventListener("abort",r,{once:true});}));try{return await Promise.race(i)}finally{s&&clearTimeout(s),e&&r&&e.removeEventListener("abort",r);}}async selectCoinInForSwap(t,e,s){return t.coin({type:s,balance:e,useGasCoin:p(s)})}};var g=class{constructor(t,e){this.client=t;e&&e.forEach(s=>this.cache.set(s.coinType,s));}client;cache=new Map;setClient(t){this.client=t;}async getCoinMetadata(t){let e=utils.normalizeStructTag(t);if(this.cache.has(e))return this.cache.get(e);let{coinMetadata:s}=await this.client.core.getCoinMetadata({coinType:e}),r=s;if(!r)throw new Error(`Coin metadata not found for coin type: ${e}`);return this.cache.set(e,r),r}};var S=class{coinMetadata;suiKit;events=new u;_slippage=.003;signerMode=false;aggregatorMap=new Map;activeAggregator=new Map;_fetchingStatus=new Map;poolStatusForwarders=new Map;allPoolStatusForwarders=new Map;supportedPoolsForwarders=new Map;walletAddress;client;constructor(t){if(this.client=t.client??new grpc.SuiGrpcClient({baseUrl:t.fullnodeUrl||"https://fullnode.mainnet.sui.io:443",network:"mainnet"}),this.coinMetadata=new g(this.client),this.signerMode=!!(t.secretKey||t.mnemonics),t.secretKey||t.mnemonics)this.suiKit=new suiKit.SuiKit({...t,suiClients:[this.client]}),this.walletAddress=this.suiKit.currentAddress;else if(t.walletAddress!==void 0)this.walletAddress=t.walletAddress;else throw new Error("One of secretKey, mnemonics or walletAddress must be provided")}async init(){await Promise.all(this.aggregators.map(t=>t.ensureClient()));}forwardPoolStatusChangeEvent(t){this.events.emit("poolStatusChanged",t);}addAggregator(t){for(let e of t)if(!this.aggregatorMap.has(e.name)){this.aggregatorMap.set(e.name,e),this.activeAggregator.set(e.name,true),this._fetchingStatus.set(e.name,false);let s=a=>this.forwardPoolStatusChangeEvent(a);this.poolStatusForwarders.set(e.name,s),e.events.on("poolStatusChanged",s);let r=a=>this.events.emit("allPoolStatusChanged",a);this.allPoolStatusForwarders.set(e.name,r),e.events.on("allPoolStatusChanged",r);let i=a=>this.events.emit("supportedPoolsChanged",a);this.supportedPoolsForwarders.set(e.name,i),e.events.on("supportedPoolsChanged",i),this.events.emit("aggregatorAdded",{name:e.name});}}getActiveAggregators(){return Array.from(this.activeAggregator.entries()).filter(([t,e])=>e).map(([t,e])=>t)}getAggregator(t){return this.aggregatorMap.get(t)}toggleAggregator(t,e){if(!this.activeAggregator.has(t))throw new Error(`Aggregator ${t} not found`);this.activeAggregator.set(t,e),this.events.emit("aggregatorStatusChanged",{name:t,enabled:e});}removeAggregator(t){let e=this.aggregatorMap.get(t);if(!e)throw new Error(`Aggregator ${t} not found`);let s=this.poolStatusForwarders.get(t);s&&e.events.off("poolStatusChanged",s),this.poolStatusForwarders.delete(t);let r=this.allPoolStatusForwarders.get(t);r&&e.events.off("allPoolStatusChanged",r),this.allPoolStatusForwarders.delete(t);let i=this.supportedPoolsForwarders.get(t);i&&e.events.off("supportedPoolsChanged",i),this.supportedPoolsForwarders.delete(t),this.aggregatorMap.delete(t),this.activeAggregator.delete(t),this._fetchingStatus.delete(t),this.events.emit("aggregatorRemoved",{name:t});}get aggregators(){return Array.from(this.aggregatorMap.values())}get fetchingStatus(){return Object.fromEntries(this._fetchingStatus)}get slippage(){return this._slippage}setSlippage(t){this._slippage=t,this.events.emit("aggregatorSlippageChanged",{slippageInDecimal:t});}setFetchTimeoutInMs(t){this.aggregators.forEach(e=>{e.fetchTimeoutInMs=t;});}#t(){if(!this.suiKit)throw new Error("SuiKit is not initialized.")}setSuiClient(t){this.aggregators.forEach(e=>{e.setSuiClient(t);}),this.coinMetadata.setClient(t),this.client=t;}setWalletAddress(t){if(this.signerMode)throw new Error("Cannot change wallet address when SuiKit is initialized with secretKey or mnemonics.");this.walletAddress=t,this.aggregators.forEach(e=>{e.setWalletAddress(t);});}async getCoinMetadata(t){return this.coinMetadata.getCoinMetadata(t)}async fetchRoutes(t,e){let s=this.aggregators.filter(({name:o})=>this.activeAggregator.get(o)===true),r=[],i=[],a=s.map(async o=>{this._fetchingStatus.set(o.name,true),this.events.emit("aggregatorFetchStart",{name:o.name});try{let l=await o.fetchRoute(t,e?.abortSignal);r.push(l),e?.onRouteFound?.(l);}catch(l){let c={name:o.name,reason:l};i.push(c),e?.onError?.(c);}finally{this._fetchingStatus.set(o.name,false),this.events.emit("aggregatorFetchEnd",{name:o.name});}});return await Promise.all(a),{routes:r.sort((o,l)=>bignumber_js.BigNumber(l.formattedResult.coinOut.amount).comparedTo(o.formattedResult.coinOut.amount)??0),errors:i}}async buildRouteTransaction(t,e={}){let{mergeResult:s=true,txExtensionParams:r}=e,i=this.aggregatorMap.get(t.formattedResult.name);if(!i)throw new Error(`Aggregator ${t.formattedResult.name} not found in the aggregator list`);let{tx:a,coinOut:o}=await i.buildSwapTransaction({route:t,slippage:e.slippage??this.slippage,txExtensionParams:r}),l=t.formattedResult.coinOut.type;return s?(await h(a,o,this.client,l,this.walletAddress),{tx:a,coinOutType:l}):{tx:a,coinOut:o,coinOutType:l}}async executeSwapTransaction(t,e=false){return this.#t(),e?(t.setSender(this.walletAddress),this.suiKit.dryRunTxn(t)):this.suiKit.signAndSendTxn(t)}};
2
+ exports.a=p;exports.b=h;exports.c=k;exports.d=u;exports.e=f;exports.f=g;exports.g=S;
@@ -0,0 +1,2 @@
1
+ import {normalizeStructTag,SUI_TYPE_ARG}from'@mysten/sui/utils';import {EventEmitter}from'events';import {SuiGrpcClient}from'@mysten/sui/grpc';import {getJsonRpcFullnodeUrl}from'@mysten/sui/jsonRpc';import {BigNumber}from'bignumber.js';import {SuiKit}from'@scallop-io/sui-kit';var y=normalizeStructTag(SUI_TYPE_ARG),p=n=>normalizeStructTag(n)===y,h=async(n,t,e,s,r)=>{try{if(p(s))n.mergeCoins(n.gas,[t]);else {let{objects:i}=await e.core.listCoins({coinType:s,owner:r,limit:1});if(!i.length)throw new Error(`No existing ${s} coin found to merge with`);let a=n.objectRef({objectId:i[0].objectId,version:i[0].version,digest:i[0].digest});i.length===1?n.mergeCoins(a,[t]):n.mergeCoins(a,[t,...i.slice(1).map(o=>n.objectRef({objectId:o.objectId,version:o.version,digest:o.digest}))]);}}catch{n.transferObjects([t],n.pure.address(r));}},v=n=>n[0].toUpperCase()+n.slice(1),k=n=>n.split("_").map(v).join(" ");var u=class extends EventEmitter{on(t,e){return super.on(t,e)}once(t,e){return super.once(t,e)}off(t,e){return super.off(t,e)}emit(t,e){return super.emit(t,e)}};var f=class{rawRouteResult;suiGrpcClient;name="";events=new u;client;suiClient;fetchTimeoutInMs;walletAddress;fetchSettings;poolsMap=new Map;constructor(t,e){let s=e.suiClient?.network??"mainnet",r=new SuiGrpcClient({baseUrl:getJsonRpcFullnodeUrl(s),network:s});this.suiGrpcClient=e.suiGrpcClient??r,this.suiClient=e.suiClient??r.core,this.fetchTimeoutInMs=e.fetchTimeoutInMs??4e3,this.walletAddress=e.walletAddress,this.name=t.toLowerCase(),e.fetchSettings&&this.setFetchRouteSettings(e.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(t){this.walletAddress=t;}setSuiClient(t){this.suiClient=t;}setSupportedPools(t){this.poolsMap=new Map(t.map(e=>[e,this.poolsMap.get(e)??true])),this.events.emit("supportedPoolsChanged",{name:this.name,pools:this.pools});}togglePoolStatus(t,e){let s=e??!(this.poolsMap.get(t)??true);this.poolsMap.set(t,s),this.events.emit("poolStatusChanged",{name:this.name,pool:t,enabled:s});}toggleAllPoolStatus(t){this.pools.forEach(e=>{this.poolsMap.set(e,t);}),this.events.emit("allPoolStatusChanged",{name:this.name,enabled:t});}getEnabledPools(){return Array.from(this.poolsMap.entries()).filter(([t,e])=>e).map(([t,e])=>t)}normalizeFetchRouteParams(t){return {...t,coinInType:normalizeStructTag(t.coinInType),coinOutType:normalizeStructTag(t.coinOutType)}}async withTimeout(t,e){let s,r,i=[t,new Promise((a,o)=>{s=setTimeout(()=>{o(new Error(`${this.name} fetch route timeout`));},this.fetchTimeoutInMs);})];e&&i.push(new Promise((a,o)=>{if(e.aborted){o(e.reason??new Error(`${this.name} fetch route aborted`));return}r=()=>o(e.reason??new Error(`${this.name} fetch route aborted`)),e.addEventListener("abort",r,{once:true});}));try{return await Promise.race(i)}finally{s&&clearTimeout(s),e&&r&&e.removeEventListener("abort",r);}}async selectCoinInForSwap(t,e,s){return t.coin({type:s,balance:e,useGasCoin:p(s)})}};var g=class{constructor(t,e){this.client=t;e&&e.forEach(s=>this.cache.set(s.coinType,s));}client;cache=new Map;setClient(t){this.client=t;}async getCoinMetadata(t){let e=normalizeStructTag(t);if(this.cache.has(e))return this.cache.get(e);let{coinMetadata:s}=await this.client.core.getCoinMetadata({coinType:e}),r=s;if(!r)throw new Error(`Coin metadata not found for coin type: ${e}`);return this.cache.set(e,r),r}};var S=class{coinMetadata;suiKit;events=new u;_slippage=.003;signerMode=false;aggregatorMap=new Map;activeAggregator=new Map;_fetchingStatus=new Map;poolStatusForwarders=new Map;allPoolStatusForwarders=new Map;supportedPoolsForwarders=new Map;walletAddress;client;constructor(t){if(this.client=t.client??new SuiGrpcClient({baseUrl:t.fullnodeUrl||"https://fullnode.mainnet.sui.io:443",network:"mainnet"}),this.coinMetadata=new g(this.client),this.signerMode=!!(t.secretKey||t.mnemonics),t.secretKey||t.mnemonics)this.suiKit=new SuiKit({...t,suiClients:[this.client]}),this.walletAddress=this.suiKit.currentAddress;else if(t.walletAddress!==void 0)this.walletAddress=t.walletAddress;else throw new Error("One of secretKey, mnemonics or walletAddress must be provided")}async init(){await Promise.all(this.aggregators.map(t=>t.ensureClient()));}forwardPoolStatusChangeEvent(t){this.events.emit("poolStatusChanged",t);}addAggregator(t){for(let e of t)if(!this.aggregatorMap.has(e.name)){this.aggregatorMap.set(e.name,e),this.activeAggregator.set(e.name,true),this._fetchingStatus.set(e.name,false);let s=a=>this.forwardPoolStatusChangeEvent(a);this.poolStatusForwarders.set(e.name,s),e.events.on("poolStatusChanged",s);let r=a=>this.events.emit("allPoolStatusChanged",a);this.allPoolStatusForwarders.set(e.name,r),e.events.on("allPoolStatusChanged",r);let i=a=>this.events.emit("supportedPoolsChanged",a);this.supportedPoolsForwarders.set(e.name,i),e.events.on("supportedPoolsChanged",i),this.events.emit("aggregatorAdded",{name:e.name});}}getActiveAggregators(){return Array.from(this.activeAggregator.entries()).filter(([t,e])=>e).map(([t,e])=>t)}getAggregator(t){return this.aggregatorMap.get(t)}toggleAggregator(t,e){if(!this.activeAggregator.has(t))throw new Error(`Aggregator ${t} not found`);this.activeAggregator.set(t,e),this.events.emit("aggregatorStatusChanged",{name:t,enabled:e});}removeAggregator(t){let e=this.aggregatorMap.get(t);if(!e)throw new Error(`Aggregator ${t} not found`);let s=this.poolStatusForwarders.get(t);s&&e.events.off("poolStatusChanged",s),this.poolStatusForwarders.delete(t);let r=this.allPoolStatusForwarders.get(t);r&&e.events.off("allPoolStatusChanged",r),this.allPoolStatusForwarders.delete(t);let i=this.supportedPoolsForwarders.get(t);i&&e.events.off("supportedPoolsChanged",i),this.supportedPoolsForwarders.delete(t),this.aggregatorMap.delete(t),this.activeAggregator.delete(t),this._fetchingStatus.delete(t),this.events.emit("aggregatorRemoved",{name:t});}get aggregators(){return Array.from(this.aggregatorMap.values())}get fetchingStatus(){return Object.fromEntries(this._fetchingStatus)}get slippage(){return this._slippage}setSlippage(t){this._slippage=t,this.events.emit("aggregatorSlippageChanged",{slippageInDecimal:t});}setFetchTimeoutInMs(t){this.aggregators.forEach(e=>{e.fetchTimeoutInMs=t;});}#t(){if(!this.suiKit)throw new Error("SuiKit is not initialized.")}setSuiClient(t){this.aggregators.forEach(e=>{e.setSuiClient(t);}),this.coinMetadata.setClient(t),this.client=t;}setWalletAddress(t){if(this.signerMode)throw new Error("Cannot change wallet address when SuiKit is initialized with secretKey or mnemonics.");this.walletAddress=t,this.aggregators.forEach(e=>{e.setWalletAddress(t);});}async getCoinMetadata(t){return this.coinMetadata.getCoinMetadata(t)}async fetchRoutes(t,e){let s=this.aggregators.filter(({name:o})=>this.activeAggregator.get(o)===true),r=[],i=[],a=s.map(async o=>{this._fetchingStatus.set(o.name,true),this.events.emit("aggregatorFetchStart",{name:o.name});try{let l=await o.fetchRoute(t,e?.abortSignal);r.push(l),e?.onRouteFound?.(l);}catch(l){let c={name:o.name,reason:l};i.push(c),e?.onError?.(c);}finally{this._fetchingStatus.set(o.name,false),this.events.emit("aggregatorFetchEnd",{name:o.name});}});return await Promise.all(a),{routes:r.sort((o,l)=>BigNumber(l.formattedResult.coinOut.amount).comparedTo(o.formattedResult.coinOut.amount)??0),errors:i}}async buildRouteTransaction(t,e={}){let{mergeResult:s=true,txExtensionParams:r}=e,i=this.aggregatorMap.get(t.formattedResult.name);if(!i)throw new Error(`Aggregator ${t.formattedResult.name} not found in the aggregator list`);let{tx:a,coinOut:o}=await i.buildSwapTransaction({route:t,slippage:e.slippage??this.slippage,txExtensionParams:r}),l=t.formattedResult.coinOut.type;return s?(await h(a,o,this.client,l,this.walletAddress),{tx:a,coinOutType:l}):{tx:a,coinOut:o,coinOutType:l}}async executeSwapTransaction(t,e=false){return this.#t(),e?(t.setSender(this.walletAddress),this.suiKit.dryRunTxn(t)):this.suiKit.signAndSendTxn(t)}};
2
+ export{p as a,h as b,k as c,u as d,f as e,g as f,S as g};
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- 'use strict';var chunkWXCBWCRW_cjs=require('./chunk-WXCBWCRW.cjs');Object.defineProperty(exports,"Aggregator",{enumerable:true,get:function(){return chunkWXCBWCRW_cjs.g}});Object.defineProperty(exports,"CoinMetadataRegistry",{enumerable:true,get:function(){return chunkWXCBWCRW_cjs.f}});Object.defineProperty(exports,"SwapSdkBase",{enumerable:true,get:function(){return chunkWXCBWCRW_cjs.e}});Object.defineProperty(exports,"TypedEventEmitter",{enumerable:true,get:function(){return chunkWXCBWCRW_cjs.d}});Object.defineProperty(exports,"isSuiType",{enumerable:true,get:function(){return chunkWXCBWCRW_cjs.a}});Object.defineProperty(exports,"mergeWithExistingOrTransfer",{enumerable:true,get:function(){return chunkWXCBWCRW_cjs.b}});Object.defineProperty(exports,"transformProperCase",{enumerable:true,get:function(){return chunkWXCBWCRW_cjs.c}});
1
+ 'use strict';var chunk4KW3TLDS_cjs=require('./chunk-4KW3TLDS.cjs');Object.defineProperty(exports,"Aggregator",{enumerable:true,get:function(){return chunk4KW3TLDS_cjs.g}});Object.defineProperty(exports,"CoinMetadataRegistry",{enumerable:true,get:function(){return chunk4KW3TLDS_cjs.f}});Object.defineProperty(exports,"SwapSdkBase",{enumerable:true,get:function(){return chunk4KW3TLDS_cjs.e}});Object.defineProperty(exports,"TypedEventEmitter",{enumerable:true,get:function(){return chunk4KW3TLDS_cjs.d}});Object.defineProperty(exports,"isSuiType",{enumerable:true,get:function(){return chunk4KW3TLDS_cjs.a}});Object.defineProperty(exports,"mergeWithExistingOrTransfer",{enumerable:true,get:function(){return chunk4KW3TLDS_cjs.b}});Object.defineProperty(exports,"transformProperCase",{enumerable:true,get:function(){return chunk4KW3TLDS_cjs.c}});
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { T as TypedEventEmitter, A as AggregatorEvents, S as SwapSdkBase, F as FetchRouteParams, f as FetchRoutesOptions, b as FetchRouteResult, g as SwapBuildResult } from './base-CwUCfqut.cjs';
2
- export { h as AggregatorEvent, i as AggregatorStatusEvent, j as AllSwapSdkPoolStatusEvent, C as Coin, d as FormattedRouteResult, k as SlippageChangedEvent, l as SwapCoinInfo, c as SwapParams, m as SwapPath, e as SwapRoute, n as SwapSdkBaseInterface, a as SwapSdkConstructorParams, o as SwapSdkEvents, p as SwapSdkPoolStatusEvent } from './base-CwUCfqut.cjs';
1
+ import { T as TypedEventEmitter, A as AggregatorEvents, S as SwapSdkBase, F as FetchRouteParams, f as FetchRoutesOptions, b as FetchRouteResult, g as SwapBuildResult } from './base-BayfFTQS.cjs';
2
+ export { h as AggregatorEvent, i as AggregatorStatusEvent, j as AllSwapSdkPoolStatusEvent, C as Coin, d as FormattedRouteResult, k as SlippageChangedEvent, l as SupportedPoolsChangedEvent, m as SwapCoinInfo, c as SwapParams, n as SwapPath, e as SwapRoute, o as SwapSdkBaseInterface, a as SwapSdkConstructorParams, p as SwapSdkEvents, q as SwapSdkPoolStatusEvent } from './base-BayfFTQS.cjs';
3
3
  import * as _mysten_sui_client from '@mysten/sui/client';
4
4
  import { ClientWithCoreApi, SuiClientTypes } from '@mysten/sui/client';
5
5
  import { Transaction, TransactionObjectArgument } from '@mysten/sui/transactions';
@@ -72,6 +72,7 @@ declare class Aggregator {
72
72
  private _fetchingStatus;
73
73
  private poolStatusForwarders;
74
74
  private allPoolStatusForwarders;
75
+ private supportedPoolsForwarders;
75
76
  walletAddress: string;
76
77
  client: ClientWithCoreApi;
77
78
  constructor(params: AggregatorConstructorParams);
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { T as TypedEventEmitter, A as AggregatorEvents, S as SwapSdkBase, F as FetchRouteParams, f as FetchRoutesOptions, b as FetchRouteResult, g as SwapBuildResult } from './base-CwUCfqut.js';
2
- export { h as AggregatorEvent, i as AggregatorStatusEvent, j as AllSwapSdkPoolStatusEvent, C as Coin, d as FormattedRouteResult, k as SlippageChangedEvent, l as SwapCoinInfo, c as SwapParams, m as SwapPath, e as SwapRoute, n as SwapSdkBaseInterface, a as SwapSdkConstructorParams, o as SwapSdkEvents, p as SwapSdkPoolStatusEvent } from './base-CwUCfqut.js';
1
+ import { T as TypedEventEmitter, A as AggregatorEvents, S as SwapSdkBase, F as FetchRouteParams, f as FetchRoutesOptions, b as FetchRouteResult, g as SwapBuildResult } from './base-BayfFTQS.js';
2
+ export { h as AggregatorEvent, i as AggregatorStatusEvent, j as AllSwapSdkPoolStatusEvent, C as Coin, d as FormattedRouteResult, k as SlippageChangedEvent, l as SupportedPoolsChangedEvent, m as SwapCoinInfo, c as SwapParams, n as SwapPath, e as SwapRoute, o as SwapSdkBaseInterface, a as SwapSdkConstructorParams, p as SwapSdkEvents, q as SwapSdkPoolStatusEvent } from './base-BayfFTQS.js';
3
3
  import * as _mysten_sui_client from '@mysten/sui/client';
4
4
  import { ClientWithCoreApi, SuiClientTypes } from '@mysten/sui/client';
5
5
  import { Transaction, TransactionObjectArgument } from '@mysten/sui/transactions';
@@ -72,6 +72,7 @@ declare class Aggregator {
72
72
  private _fetchingStatus;
73
73
  private poolStatusForwarders;
74
74
  private allPoolStatusForwarders;
75
+ private supportedPoolsForwarders;
75
76
  walletAddress: string;
76
77
  client: ClientWithCoreApi;
77
78
  constructor(params: AggregatorConstructorParams);
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export{g as Aggregator,f as CoinMetadataRegistry,e as SwapSdkBase,d as TypedEventEmitter,a as isSuiType,b as mergeWithExistingOrTransfer,c as transformProperCase}from'./chunk-2L6A2K5X.js';
1
+ export{g as Aggregator,f as CoinMetadataRegistry,e as SwapSdkBase,d as TypedEventEmitter,a as isSuiType,b as mergeWithExistingOrTransfer,c as transformProperCase}from'./chunk-YSJBIM7C.js';
@@ -1 +1 @@
1
- 'use strict';var chunkYKJ7DP7U_cjs=require('../chunk-YKJ7DP7U.cjs'),chunkWXCBWCRW_cjs=require('../chunk-WXCBWCRW.cjs'),grpc=require('@mysten/sui/grpc'),jsonRpc=require('@mysten/sui/jsonRpc'),transactions=require('@mysten/sui/transactions'),utils=require('@mysten/sui/utils'),bignumber_js=require('bignumber.js');var s={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]}'}},scallop:{objects:{version:"",afSuiMarket:"",coinDecimalsRegistry:"",xOracle:""}},nftAmm:{packages:{nftAmm:""},objects:{protocolFeeVault:"",treasury:"",insuranceFund:"",referralVault:""}},nfts:{packages:{mystenTransferPolicy:"0x0cb4bcc0560340eb1a1b929cabe56b33fc6449820ec8c1980d69bb98b649b802"}}};var u=chunkYKJ7DP7U_cjs.a("aftermath-ts-sdk",()=>import('aftermath-ts-sdk')),p=["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"],r=class extends chunkWXCBWCRW_cjs.e{constructor(A){super("aftermath",A);this.params=A;this.poolsMap=new Map(p.map(e=>[e,true])),this.params.addresses||(console.warn("[AftermathSwap] No custom addresses provided, using default config addresses. If you are using a different deployment of Aftermath, please provide the corresponding addresses in the constructor params."),this.params.addresses=s);}params;afApi;async ensureClient(A){if(!this.client||A){let{AftermathApi:e,Aftermath:a}=await u(),c=this.suiClient.network;this.afApi=new e(new grpc.SuiGrpcClient({baseUrl:jsonRpc.getJsonRpcFullnodeUrl(c),network:c}),this.params.addresses??s),this.client=await a.create({network:"MAINNET",addresses:this.params.addresses??s,api:this.afApi});}return this.client}async setSuiClient(A){super.setSuiClient(A),await this.ensureClient(true).catch(e=>{console.error("Failed to initialize Aftermath client with new Sui client",e);});}async getRouter(){return (await this.ensureClient()).Router()}setFetchRouteSettings(A){this.fetchSettings=A;}calcSlippage(A){return A}parseRawRouteToFormattedResult(A){let e=A.coinIn.amount,a={...A,name:this.name};return a.routes.forEach(c=>{let t=c.paths[0].coinIn.amount;c.splitPercentage=bignumber_js.BigNumber(t.toString()).div(e.toString()).times(100).toNumber();}),a}async fetchRoute(A,e){let a=await this.getRouter(),c=this.normalizeFetchRouteParams(A),{coinInType:t,coinOutType:b,swapAmount:d}=c;this.rawRouteResult=void 0;let f=await this.withTimeout(a.getCompleteTradeRouteGivenAmountIn({...this.fetchSettings,protocolWhitelist:this.getEnabledPools(),coinInType:t,coinOutType:b,coinInAmount:d},e));if(!f)throw new Error(`${this.name} fetch route returned empty response`);return this.rawRouteResult=f,{formattedResult:this.parseRawRouteToFormattedResult(f),rawRouteResult:f}}async buildSwapTransaction(A){this.validateWalletAddress();let e=await this.getRouter(),{txExtensionParams:a,slippage:c,route:t}=A,b=t?.rawRouteResult??this.rawRouteResult;if(!b)throw new Error(`${this.name} build swap transaction failed: no route available`);let d=null,f=null;if(a){let{initTx:i,coinIn:g}=a;d=i,f=g;}else d=new transactions.Transaction,d.setSender(this.walletAddress),f=await this.selectCoinInForSwap(d,BigInt(b.coinIn.amount.toString()),utils.normalizeStructTag(b.coinIn.type));d.setSenderIfNotSet(this.walletAddress),await d.prepareForSerialization({client:this.suiClient});let{tx:x,coinOutId:o}=await e.addTransactionForCompleteTradeRoute({walletAddress:this.walletAddress,completeRoute:b,slippage:this.calcSlippage(c),tx:d,coinInId:f});if(!o)throw new Error(`${this.name} build swap transaction failed`);return {tx:x,coinOut:o}}};exports.AftermathSwap=r;
1
+ 'use strict';var chunkYKJ7DP7U_cjs=require('../chunk-YKJ7DP7U.cjs'),chunk4KW3TLDS_cjs=require('../chunk-4KW3TLDS.cjs'),grpc=require('@mysten/sui/grpc'),jsonRpc=require('@mysten/sui/jsonRpc'),transactions=require('@mysten/sui/transactions'),utils=require('@mysten/sui/utils'),bignumber_js=require('bignumber.js');var s={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]}'}},scallop:{objects:{version:"",afSuiMarket:"",coinDecimalsRegistry:"",xOracle:""}},nftAmm:{packages:{nftAmm:""},objects:{protocolFeeVault:"",treasury:"",insuranceFund:"",referralVault:""}},nfts:{packages:{mystenTransferPolicy:"0x0cb4bcc0560340eb1a1b929cabe56b33fc6449820ec8c1980d69bb98b649b802"}}};var u=chunkYKJ7DP7U_cjs.a("aftermath-ts-sdk",()=>import('aftermath-ts-sdk')),p=["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"],r=class extends chunk4KW3TLDS_cjs.e{constructor(A){super("aftermath",A);this.params=A;this.setSupportedPools(p),this.params.addresses||(console.warn("[AftermathSwap] No custom addresses provided, using default config addresses. If you are using a different deployment of Aftermath, please provide the corresponding addresses in the constructor params."),this.params.addresses=s);}params;afApi;async ensureClient(A){if(!this.client||A){let{AftermathApi:e,Aftermath:a}=await u(),c=this.suiClient.network;this.afApi=new e(new grpc.SuiGrpcClient({baseUrl:jsonRpc.getJsonRpcFullnodeUrl(c),network:c}),this.params.addresses??s),this.client=await a.create({network:"MAINNET",addresses:this.params.addresses??s,api:this.afApi});}return this.client}async setSuiClient(A){super.setSuiClient(A),await this.ensureClient(true).catch(e=>{console.error("Failed to initialize Aftermath client with new Sui client",e);});}async getRouter(){return (await this.ensureClient()).Router()}setFetchRouteSettings(A){this.fetchSettings=A;}calcSlippage(A){return A}parseRawRouteToFormattedResult(A){let e=A.coinIn.amount,a={...A,name:this.name};return a.routes.forEach(c=>{let t=c.paths[0].coinIn.amount;c.splitPercentage=bignumber_js.BigNumber(t.toString()).div(e.toString()).times(100).toNumber();}),a}async fetchRoute(A,e){let a=await this.getRouter(),c=this.normalizeFetchRouteParams(A),{coinInType:t,coinOutType:f,swapAmount:b}=c;this.rawRouteResult=void 0;let d=await this.withTimeout(a.getCompleteTradeRouteGivenAmountIn({...this.fetchSettings,protocolWhitelist:this.getEnabledPools(),coinInType:t,coinOutType:f,coinInAmount:b},e));if(!d)throw new Error(`${this.name} fetch route returned empty response`);return this.rawRouteResult=d,{formattedResult:this.parseRawRouteToFormattedResult(d),rawRouteResult:d}}async buildSwapTransaction(A){this.validateWalletAddress();let e=await this.getRouter(),{txExtensionParams:a,slippage:c,route:t}=A,f=t?.rawRouteResult??this.rawRouteResult;if(!f)throw new Error(`${this.name} build swap transaction failed: no route available`);let b=null,d=null;if(a){let{initTx:g,coinIn:i}=a;b=g,d=i;}else b=new transactions.Transaction,b.setSender(this.walletAddress),d=await this.selectCoinInForSwap(b,BigInt(f.coinIn.amount.toString()),utils.normalizeStructTag(f.coinIn.type));let{tx:x,coinOutId:o}=await e.addTransactionForCompleteTradeRoute({walletAddress:this.walletAddress,completeRoute:f,slippage:this.calcSlippage(c),tx:b,coinInId:d});if(!o)throw new Error(`${this.name} build swap transaction failed`);return {tx:x,coinOut:o}}};exports.AftermathSwap=r;
@@ -2,7 +2,7 @@ import { ClientWithCoreApi } from '@mysten/sui/client';
2
2
  import { Transaction, TransactionObjectArgument } from '@mysten/sui/transactions';
3
3
  import { RouterProtocolName, RouterCompleteTradeRoute, ApiRouterPartialCompleteTradeRouteBody, Aftermath, ConfigAddresses } from 'aftermath-ts-sdk';
4
4
  export { Aftermath, RouterCompleteTradeRoute } from 'aftermath-ts-sdk';
5
- import { S as SwapSdkBase, a as SwapSdkConstructorParams, F as FetchRouteParams, b as FetchRouteResult, c as SwapParams } from '../base-CwUCfqut.cjs';
5
+ import { S as SwapSdkBase, a as SwapSdkConstructorParams, F as FetchRouteParams, b as FetchRouteResult, c as SwapParams } from '../base-BayfFTQS.cjs';
6
6
  import '@mysten/sui/grpc';
7
7
  import 'events';
8
8
 
@@ -2,7 +2,7 @@ import { ClientWithCoreApi } from '@mysten/sui/client';
2
2
  import { Transaction, TransactionObjectArgument } from '@mysten/sui/transactions';
3
3
  import { RouterProtocolName, RouterCompleteTradeRoute, ApiRouterPartialCompleteTradeRouteBody, Aftermath, ConfigAddresses } from 'aftermath-ts-sdk';
4
4
  export { Aftermath, RouterCompleteTradeRoute } from 'aftermath-ts-sdk';
5
- import { S as SwapSdkBase, a as SwapSdkConstructorParams, F as FetchRouteParams, b as FetchRouteResult, c as SwapParams } from '../base-CwUCfqut.js';
5
+ import { S as SwapSdkBase, a as SwapSdkConstructorParams, F as FetchRouteParams, b as FetchRouteResult, c as SwapParams } from '../base-BayfFTQS.js';
6
6
  import '@mysten/sui/grpc';
7
7
  import 'events';
8
8
 
@@ -1 +1 @@
1
- import {a}from'../chunk-5N4RDKGD.js';import {e}from'../chunk-2L6A2K5X.js';import {SuiGrpcClient}from'@mysten/sui/grpc';import {getJsonRpcFullnodeUrl}from'@mysten/sui/jsonRpc';import {Transaction}from'@mysten/sui/transactions';import {normalizeStructTag}from'@mysten/sui/utils';import {BigNumber}from'bignumber.js';var s={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]}'}},scallop:{objects:{version:"",afSuiMarket:"",coinDecimalsRegistry:"",xOracle:""}},nftAmm:{packages:{nftAmm:""},objects:{protocolFeeVault:"",treasury:"",insuranceFund:"",referralVault:""}},nfts:{packages:{mystenTransferPolicy:"0x0cb4bcc0560340eb1a1b929cabe56b33fc6449820ec8c1980d69bb98b649b802"}}};var u=a("aftermath-ts-sdk",()=>import('aftermath-ts-sdk')),p=["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"],r=class extends e{constructor(A){super("aftermath",A);this.params=A;this.poolsMap=new Map(p.map(e=>[e,true])),this.params.addresses||(console.warn("[AftermathSwap] No custom addresses provided, using default config addresses. If you are using a different deployment of Aftermath, please provide the corresponding addresses in the constructor params."),this.params.addresses=s);}params;afApi;async ensureClient(A){if(!this.client||A){let{AftermathApi:e,Aftermath:a}=await u(),c=this.suiClient.network;this.afApi=new e(new SuiGrpcClient({baseUrl:getJsonRpcFullnodeUrl(c),network:c}),this.params.addresses??s),this.client=await a.create({network:"MAINNET",addresses:this.params.addresses??s,api:this.afApi});}return this.client}async setSuiClient(A){super.setSuiClient(A),await this.ensureClient(true).catch(e=>{console.error("Failed to initialize Aftermath client with new Sui client",e);});}async getRouter(){return (await this.ensureClient()).Router()}setFetchRouteSettings(A){this.fetchSettings=A;}calcSlippage(A){return A}parseRawRouteToFormattedResult(A){let e=A.coinIn.amount,a={...A,name:this.name};return a.routes.forEach(c=>{let t=c.paths[0].coinIn.amount;c.splitPercentage=BigNumber(t.toString()).div(e.toString()).times(100).toNumber();}),a}async fetchRoute(A,e){let a=await this.getRouter(),c=this.normalizeFetchRouteParams(A),{coinInType:t,coinOutType:b,swapAmount:d}=c;this.rawRouteResult=void 0;let f=await this.withTimeout(a.getCompleteTradeRouteGivenAmountIn({...this.fetchSettings,protocolWhitelist:this.getEnabledPools(),coinInType:t,coinOutType:b,coinInAmount:d},e));if(!f)throw new Error(`${this.name} fetch route returned empty response`);return this.rawRouteResult=f,{formattedResult:this.parseRawRouteToFormattedResult(f),rawRouteResult:f}}async buildSwapTransaction(A){this.validateWalletAddress();let e=await this.getRouter(),{txExtensionParams:a,slippage:c,route:t}=A,b=t?.rawRouteResult??this.rawRouteResult;if(!b)throw new Error(`${this.name} build swap transaction failed: no route available`);let d=null,f=null;if(a){let{initTx:i,coinIn:g}=a;d=i,f=g;}else d=new Transaction,d.setSender(this.walletAddress),f=await this.selectCoinInForSwap(d,BigInt(b.coinIn.amount.toString()),normalizeStructTag(b.coinIn.type));d.setSenderIfNotSet(this.walletAddress),await d.prepareForSerialization({client:this.suiClient});let{tx:x,coinOutId:o}=await e.addTransactionForCompleteTradeRoute({walletAddress:this.walletAddress,completeRoute:b,slippage:this.calcSlippage(c),tx:d,coinInId:f});if(!o)throw new Error(`${this.name} build swap transaction failed`);return {tx:x,coinOut:o}}};export{r as AftermathSwap};
1
+ import {a}from'../chunk-5N4RDKGD.js';import {e}from'../chunk-YSJBIM7C.js';import {SuiGrpcClient}from'@mysten/sui/grpc';import {getJsonRpcFullnodeUrl}from'@mysten/sui/jsonRpc';import {Transaction}from'@mysten/sui/transactions';import {normalizeStructTag}from'@mysten/sui/utils';import {BigNumber}from'bignumber.js';var s={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]}'}},scallop:{objects:{version:"",afSuiMarket:"",coinDecimalsRegistry:"",xOracle:""}},nftAmm:{packages:{nftAmm:""},objects:{protocolFeeVault:"",treasury:"",insuranceFund:"",referralVault:""}},nfts:{packages:{mystenTransferPolicy:"0x0cb4bcc0560340eb1a1b929cabe56b33fc6449820ec8c1980d69bb98b649b802"}}};var u=a("aftermath-ts-sdk",()=>import('aftermath-ts-sdk')),p=["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"],r=class extends e{constructor(A){super("aftermath",A);this.params=A;this.setSupportedPools(p),this.params.addresses||(console.warn("[AftermathSwap] No custom addresses provided, using default config addresses. If you are using a different deployment of Aftermath, please provide the corresponding addresses in the constructor params."),this.params.addresses=s);}params;afApi;async ensureClient(A){if(!this.client||A){let{AftermathApi:e,Aftermath:a}=await u(),c=this.suiClient.network;this.afApi=new e(new SuiGrpcClient({baseUrl:getJsonRpcFullnodeUrl(c),network:c}),this.params.addresses??s),this.client=await a.create({network:"MAINNET",addresses:this.params.addresses??s,api:this.afApi});}return this.client}async setSuiClient(A){super.setSuiClient(A),await this.ensureClient(true).catch(e=>{console.error("Failed to initialize Aftermath client with new Sui client",e);});}async getRouter(){return (await this.ensureClient()).Router()}setFetchRouteSettings(A){this.fetchSettings=A;}calcSlippage(A){return A}parseRawRouteToFormattedResult(A){let e=A.coinIn.amount,a={...A,name:this.name};return a.routes.forEach(c=>{let t=c.paths[0].coinIn.amount;c.splitPercentage=BigNumber(t.toString()).div(e.toString()).times(100).toNumber();}),a}async fetchRoute(A,e){let a=await this.getRouter(),c=this.normalizeFetchRouteParams(A),{coinInType:t,coinOutType:f,swapAmount:b}=c;this.rawRouteResult=void 0;let d=await this.withTimeout(a.getCompleteTradeRouteGivenAmountIn({...this.fetchSettings,protocolWhitelist:this.getEnabledPools(),coinInType:t,coinOutType:f,coinInAmount:b},e));if(!d)throw new Error(`${this.name} fetch route returned empty response`);return this.rawRouteResult=d,{formattedResult:this.parseRawRouteToFormattedResult(d),rawRouteResult:d}}async buildSwapTransaction(A){this.validateWalletAddress();let e=await this.getRouter(),{txExtensionParams:a,slippage:c,route:t}=A,f=t?.rawRouteResult??this.rawRouteResult;if(!f)throw new Error(`${this.name} build swap transaction failed: no route available`);let b=null,d=null;if(a){let{initTx:g,coinIn:i}=a;b=g,d=i;}else b=new Transaction,b.setSender(this.walletAddress),d=await this.selectCoinInForSwap(b,BigInt(f.coinIn.amount.toString()),normalizeStructTag(f.coinIn.type));let{tx:x,coinOutId:o}=await e.addTransactionForCompleteTradeRoute({walletAddress:this.walletAddress,completeRoute:f,slippage:this.calcSlippage(c),tx:b,coinInId:d});if(!o)throw new Error(`${this.name} build swap transaction failed`);return {tx:x,coinOut:o}}};export{r as AftermathSwap};
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkYKJ7DP7U_cjs=require('../chunk-YKJ7DP7U.cjs'),chunkWXCBWCRW_cjs=require('../chunk-WXCBWCRW.cjs'),transactions=require('@mysten/sui/transactions'),R=require('bn.js'),bignumber_js=require('bignumber.js'),utils=require('@mysten/sui/utils'),jsonRpc=require('@mysten/sui/jsonRpc'),grpc=require('@mysten/sui/grpc');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var R__default=/*#__PURE__*/_interopDefault(R);var C=chunkYKJ7DP7U_cjs.a("@cetusprotocol/aggregator-sdk",()=>import('@cetusprotocol/aggregator-sdk')),c=class extends chunkWXCBWCRW_cjs.e{constructor(e){super("cetus",e);this.params=e;}params;async ensureClient(e){if(!this.client||e){let{AggregatorClient:n,ALL_DEXES:a,Env:i}=await C(),o=this.suiClient.network;this.client=new n({endpoint:"https://api-sui.cetus.zone/router_v3/find_routes",signer:this.walletAddress,env:i.Mainnet,...this.params,client:this.params.suiGrpcClient??new grpc.SuiGrpcClient({baseUrl:jsonRpc.getJsonRpcFullnodeUrl(o),network:o})}),this.poolsMap.size===0&&(this.poolsMap=new Map(a.map(r=>[r,true])));}return this.client}async setSuiClient(e){super.setSuiClient(e),await this.ensureClient(true).catch(n=>{console.error("Failed to initialize Cetus AggregatorClient with new Sui client",n);});}createRoute(e,n,a){let i=[],o=null;for(let t of e)t.from===n&&(o={paths:[],coinIn:{type:t.from,amount:BigInt(t.amountIn)},coinOut:{type:t.target,amount:BigInt(t.amountOut)}},i.push(o)),o&&(o.paths.push({protocolName:t.provider,coinIn:{type:t.from,amount:BigInt(t.amountIn)},coinOut:{type:t.target,amount:BigInt(t.amountOut)}}),o.coinOut={type:t.target,amount:BigInt(t.amountOut)},t.target===a&&(o=null));let r=i.reduce((t,s)=>t+s.coinIn.amount,BigInt(0)).toString();return r!=="0"&&i.forEach(t=>{t.splitPercentage=bignumber_js.BigNumber(t.coinIn.amount.toString()).div(r).times(100).toNumber();}),i}parseRawToFormattedResult({routerData:e,coinInType:n,coinOutType:a}){return {coinIn:{type:n,amount:BigInt(e.amountIn.toString()??"0")},coinOut:{type:a,amount:BigInt(e.amountOut.toString()??"0")},routes:this.createRoute(e.paths,n,a)}}setFetchRouteSettings(e){this.fetchSettings=e;}calcSlippage(e){return e}async fetchRoute(e,n){let a=await this.ensureClient(),i=this.normalizeFetchRouteParams(e),{coinInType:o,coinOutType:r,swapAmount:t}=i;this.rawRouteResult=void 0;let s=await this.withTimeout(a.findRouters({...this.fetchSettings,from:utils.normalizeStructTag(o),target:utils.normalizeStructTag(r),amount:new R__default.default(t.toString()),byAmountIn:true,providers:this.getEnabledPools()}),n);if(!s)throw new Error(`${this.name} fetch route returned empty response`);return this.rawRouteResult=s,{formattedResult:{...this.parseRawToFormattedResult({routerData:s,coinInType:o,coinOutType:r}),name:this.name},rawRouteResult:s}}async buildSwapTransaction(e){this.validateWalletAddress();let n=await this.ensureClient(),{txExtensionParams:a,slippage:i,route:o}=e,r=o?.rawRouteResult??this.rawRouteResult;if(!r)throw new Error(`${this.name} buildSwapTransaction requires a route, but none was provided or fetched.`);let t=null,s=null;if(a){let{initTx:g,coinIn:h}=a;t=g,s=h;}else t=new transactions.Transaction,t.setSender(this.walletAddress),s=await this.selectCoinInForSwap(t,BigInt(r.amountIn.toString()),utils.normalizeStructTag(r.paths[0].from));let l=await n.routerSwap({router:r,txb:t,slippage:this.calcSlippage(i),inputCoin:s});return {tx:t,coinOut:l}}};
2
- exports.CetusSwap=c;
1
+ 'use strict';var chunkYKJ7DP7U_cjs=require('../chunk-YKJ7DP7U.cjs'),chunk4KW3TLDS_cjs=require('../chunk-4KW3TLDS.cjs'),transactions=require('@mysten/sui/transactions'),w=require('bn.js'),bignumber_js=require('bignumber.js'),utils=require('@mysten/sui/utils'),jsonRpc=require('@mysten/sui/jsonRpc'),grpc=require('@mysten/sui/grpc');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var w__default=/*#__PURE__*/_interopDefault(w);var C=chunkYKJ7DP7U_cjs.a("@cetusprotocol/aggregator-sdk",()=>import('@cetusprotocol/aggregator-sdk')),l=class extends chunk4KW3TLDS_cjs.e{constructor(e){super("cetus",e);this.params=e;}params;async ensureClient(e){if(!this.client||e){let{AggregatorClient:n,ALL_DEXES:r,Env:a}=await C(),o=this.suiClient.network;this.client=new n({endpoint:"https://api-sui.cetus.zone/router_v3/find_routes",signer:this.walletAddress,env:a.Mainnet,...this.params,client:this.params.suiGrpcClient??new grpc.SuiGrpcClient({baseUrl:jsonRpc.getJsonRpcFullnodeUrl(o),network:o})}),this.setSupportedPools(r);}return this.client}async setSuiClient(e){super.setSuiClient(e),await this.ensureClient(true).catch(n=>{console.error("Failed to initialize Cetus AggregatorClient with new Sui client",n);});}createRoute(e,n,r){let a=[],o=null;for(let t of e)t.from===n&&(o={paths:[],coinIn:{type:t.from,amount:BigInt(t.amountIn)},coinOut:{type:t.target,amount:BigInt(t.amountOut)}},a.push(o)),o&&(o.paths.push({protocolName:t.provider,coinIn:{type:t.from,amount:BigInt(t.amountIn)},coinOut:{type:t.target,amount:BigInt(t.amountOut)}}),o.coinOut={type:t.target,amount:BigInt(t.amountOut)},t.target===r&&(o=null));let i=a.reduce((t,s)=>t+s.coinIn.amount,BigInt(0)).toString();return i!=="0"&&a.forEach(t=>{t.splitPercentage=bignumber_js.BigNumber(t.coinIn.amount.toString()).div(i).times(100).toNumber();}),a}parseRawToFormattedResult({routerData:e,coinInType:n,coinOutType:r}){return {coinIn:{type:n,amount:BigInt(e.amountIn.toString()??"0")},coinOut:{type:r,amount:BigInt(e.amountOut.toString()??"0")},routes:this.createRoute(e.paths,n,r)}}setFetchRouteSettings(e){this.fetchSettings=e;}calcSlippage(e){return e}async fetchRoute(e,n){let r=await this.ensureClient(),a=this.normalizeFetchRouteParams(e),{coinInType:o,coinOutType:i,swapAmount:t}=a;this.rawRouteResult=void 0;let s=await this.withTimeout(r.findRouters({...this.fetchSettings,from:utils.normalizeStructTag(o),target:utils.normalizeStructTag(i),amount:new w__default.default(t.toString()),byAmountIn:true,providers:this.getEnabledPools()}),n);if(!s)throw new Error(`${this.name} fetch route returned empty response`);return this.rawRouteResult=s,{formattedResult:{...this.parseRawToFormattedResult({routerData:s,coinInType:o,coinOutType:i}),name:this.name},rawRouteResult:s}}async buildSwapTransaction(e){this.validateWalletAddress();let n=await this.ensureClient(),{txExtensionParams:r,slippage:a,route:o}=e,i=o?.rawRouteResult??this.rawRouteResult;if(!i)throw new Error(`${this.name} buildSwapTransaction requires a route, but none was provided or fetched.`);let t=null,s=null;if(r){let{initTx:g,coinIn:h}=r;t=g,s=h;}else t=new transactions.Transaction,t.setSender(this.walletAddress),s=await this.selectCoinInForSwap(t,BigInt(i.amountIn.toString()),utils.normalizeStructTag(i.paths[0].from));let p=await n.routerSwap({router:i,txb:t,slippage:this.calcSlippage(a),inputCoin:s});return {tx:t,coinOut:p}}};
2
+ exports.CetusSwap=l;
@@ -1,5 +1,5 @@
1
1
  import { ClientWithCoreApi } from '@mysten/sui/client';
2
- import { S as SwapSdkBase, a as SwapSdkConstructorParams, d as FormattedRouteResult, F as FetchRouteParams, e as SwapRoute, C as Coin, c as SwapParams } from '../base-CwUCfqut.cjs';
2
+ import { S as SwapSdkBase, a as SwapSdkConstructorParams, d as FormattedRouteResult, F as FetchRouteParams, e as SwapRoute, C as Coin, c as SwapParams } from '../base-BayfFTQS.cjs';
3
3
  import { Transaction, TransactionObjectArgument } from '@mysten/sui/transactions';
4
4
  import { RouterDataV3, FindRouterParams, AggregatorClient, AggregatorClientParams } from '@cetusprotocol/aggregator-sdk';
5
5
  export { AggregatorClient, RouterDataV3 } from '@cetusprotocol/aggregator-sdk';
@@ -1,5 +1,5 @@
1
1
  import { ClientWithCoreApi } from '@mysten/sui/client';
2
- import { S as SwapSdkBase, a as SwapSdkConstructorParams, d as FormattedRouteResult, F as FetchRouteParams, e as SwapRoute, C as Coin, c as SwapParams } from '../base-CwUCfqut.js';
2
+ import { S as SwapSdkBase, a as SwapSdkConstructorParams, d as FormattedRouteResult, F as FetchRouteParams, e as SwapRoute, C as Coin, c as SwapParams } from '../base-BayfFTQS.js';
3
3
  import { Transaction, TransactionObjectArgument } from '@mysten/sui/transactions';
4
4
  import { RouterDataV3, FindRouterParams, AggregatorClient, AggregatorClientParams } from '@cetusprotocol/aggregator-sdk';
5
5
  export { AggregatorClient, RouterDataV3 } from '@cetusprotocol/aggregator-sdk';
package/dist/sdk/cetus.js CHANGED
@@ -1,2 +1,2 @@
1
- import {a}from'../chunk-5N4RDKGD.js';import {e}from'../chunk-2L6A2K5X.js';import {Transaction}from'@mysten/sui/transactions';import R from'bn.js';import {BigNumber}from'bignumber.js';import {normalizeStructTag}from'@mysten/sui/utils';import {getJsonRpcFullnodeUrl}from'@mysten/sui/jsonRpc';import {SuiGrpcClient}from'@mysten/sui/grpc';var C=a("@cetusprotocol/aggregator-sdk",()=>import('@cetusprotocol/aggregator-sdk')),c=class extends e{constructor(e){super("cetus",e);this.params=e;}params;async ensureClient(e){if(!this.client||e){let{AggregatorClient:n,ALL_DEXES:a,Env:i}=await C(),o=this.suiClient.network;this.client=new n({endpoint:"https://api-sui.cetus.zone/router_v3/find_routes",signer:this.walletAddress,env:i.Mainnet,...this.params,client:this.params.suiGrpcClient??new SuiGrpcClient({baseUrl:getJsonRpcFullnodeUrl(o),network:o})}),this.poolsMap.size===0&&(this.poolsMap=new Map(a.map(r=>[r,true])));}return this.client}async setSuiClient(e){super.setSuiClient(e),await this.ensureClient(true).catch(n=>{console.error("Failed to initialize Cetus AggregatorClient with new Sui client",n);});}createRoute(e,n,a){let i=[],o=null;for(let t of e)t.from===n&&(o={paths:[],coinIn:{type:t.from,amount:BigInt(t.amountIn)},coinOut:{type:t.target,amount:BigInt(t.amountOut)}},i.push(o)),o&&(o.paths.push({protocolName:t.provider,coinIn:{type:t.from,amount:BigInt(t.amountIn)},coinOut:{type:t.target,amount:BigInt(t.amountOut)}}),o.coinOut={type:t.target,amount:BigInt(t.amountOut)},t.target===a&&(o=null));let r=i.reduce((t,s)=>t+s.coinIn.amount,BigInt(0)).toString();return r!=="0"&&i.forEach(t=>{t.splitPercentage=BigNumber(t.coinIn.amount.toString()).div(r).times(100).toNumber();}),i}parseRawToFormattedResult({routerData:e,coinInType:n,coinOutType:a}){return {coinIn:{type:n,amount:BigInt(e.amountIn.toString()??"0")},coinOut:{type:a,amount:BigInt(e.amountOut.toString()??"0")},routes:this.createRoute(e.paths,n,a)}}setFetchRouteSettings(e){this.fetchSettings=e;}calcSlippage(e){return e}async fetchRoute(e,n){let a=await this.ensureClient(),i=this.normalizeFetchRouteParams(e),{coinInType:o,coinOutType:r,swapAmount:t}=i;this.rawRouteResult=void 0;let s=await this.withTimeout(a.findRouters({...this.fetchSettings,from:normalizeStructTag(o),target:normalizeStructTag(r),amount:new R(t.toString()),byAmountIn:true,providers:this.getEnabledPools()}),n);if(!s)throw new Error(`${this.name} fetch route returned empty response`);return this.rawRouteResult=s,{formattedResult:{...this.parseRawToFormattedResult({routerData:s,coinInType:o,coinOutType:r}),name:this.name},rawRouteResult:s}}async buildSwapTransaction(e){this.validateWalletAddress();let n=await this.ensureClient(),{txExtensionParams:a,slippage:i,route:o}=e,r=o?.rawRouteResult??this.rawRouteResult;if(!r)throw new Error(`${this.name} buildSwapTransaction requires a route, but none was provided or fetched.`);let t=null,s=null;if(a){let{initTx:g,coinIn:h}=a;t=g,s=h;}else t=new Transaction,t.setSender(this.walletAddress),s=await this.selectCoinInForSwap(t,BigInt(r.amountIn.toString()),normalizeStructTag(r.paths[0].from));let l=await n.routerSwap({router:r,txb:t,slippage:this.calcSlippage(i),inputCoin:s});return {tx:t,coinOut:l}}};
2
- export{c as CetusSwap};
1
+ import {a}from'../chunk-5N4RDKGD.js';import {e}from'../chunk-YSJBIM7C.js';import {Transaction}from'@mysten/sui/transactions';import w from'bn.js';import {BigNumber}from'bignumber.js';import {normalizeStructTag}from'@mysten/sui/utils';import {getJsonRpcFullnodeUrl}from'@mysten/sui/jsonRpc';import {SuiGrpcClient}from'@mysten/sui/grpc';var C=a("@cetusprotocol/aggregator-sdk",()=>import('@cetusprotocol/aggregator-sdk')),l=class extends e{constructor(e){super("cetus",e);this.params=e;}params;async ensureClient(e){if(!this.client||e){let{AggregatorClient:n,ALL_DEXES:r,Env:a}=await C(),o=this.suiClient.network;this.client=new n({endpoint:"https://api-sui.cetus.zone/router_v3/find_routes",signer:this.walletAddress,env:a.Mainnet,...this.params,client:this.params.suiGrpcClient??new SuiGrpcClient({baseUrl:getJsonRpcFullnodeUrl(o),network:o})}),this.setSupportedPools(r);}return this.client}async setSuiClient(e){super.setSuiClient(e),await this.ensureClient(true).catch(n=>{console.error("Failed to initialize Cetus AggregatorClient with new Sui client",n);});}createRoute(e,n,r){let a=[],o=null;for(let t of e)t.from===n&&(o={paths:[],coinIn:{type:t.from,amount:BigInt(t.amountIn)},coinOut:{type:t.target,amount:BigInt(t.amountOut)}},a.push(o)),o&&(o.paths.push({protocolName:t.provider,coinIn:{type:t.from,amount:BigInt(t.amountIn)},coinOut:{type:t.target,amount:BigInt(t.amountOut)}}),o.coinOut={type:t.target,amount:BigInt(t.amountOut)},t.target===r&&(o=null));let i=a.reduce((t,s)=>t+s.coinIn.amount,BigInt(0)).toString();return i!=="0"&&a.forEach(t=>{t.splitPercentage=BigNumber(t.coinIn.amount.toString()).div(i).times(100).toNumber();}),a}parseRawToFormattedResult({routerData:e,coinInType:n,coinOutType:r}){return {coinIn:{type:n,amount:BigInt(e.amountIn.toString()??"0")},coinOut:{type:r,amount:BigInt(e.amountOut.toString()??"0")},routes:this.createRoute(e.paths,n,r)}}setFetchRouteSettings(e){this.fetchSettings=e;}calcSlippage(e){return e}async fetchRoute(e,n){let r=await this.ensureClient(),a=this.normalizeFetchRouteParams(e),{coinInType:o,coinOutType:i,swapAmount:t}=a;this.rawRouteResult=void 0;let s=await this.withTimeout(r.findRouters({...this.fetchSettings,from:normalizeStructTag(o),target:normalizeStructTag(i),amount:new w(t.toString()),byAmountIn:true,providers:this.getEnabledPools()}),n);if(!s)throw new Error(`${this.name} fetch route returned empty response`);return this.rawRouteResult=s,{formattedResult:{...this.parseRawToFormattedResult({routerData:s,coinInType:o,coinOutType:i}),name:this.name},rawRouteResult:s}}async buildSwapTransaction(e){this.validateWalletAddress();let n=await this.ensureClient(),{txExtensionParams:r,slippage:a,route:o}=e,i=o?.rawRouteResult??this.rawRouteResult;if(!i)throw new Error(`${this.name} buildSwapTransaction requires a route, but none was provided or fetched.`);let t=null,s=null;if(r){let{initTx:g,coinIn:h}=r;t=g,s=h;}else t=new Transaction,t.setSender(this.walletAddress),s=await this.selectCoinInForSwap(t,BigInt(i.amountIn.toString()),normalizeStructTag(i.paths[0].from));let p=await n.routerSwap({router:i,txb:t,slippage:this.calcSlippage(a),inputCoin:s});return {tx:t,coinOut:p}}};
2
+ export{l as CetusSwap};
@@ -1 +1 @@
1
- 'use strict';var chunkYKJ7DP7U_cjs=require('../chunk-YKJ7DP7U.cjs'),chunkWXCBWCRW_cjs=require('../chunk-WXCBWCRW.cjs'),transactions=require('@mysten/sui/transactions'),utils=require('@mysten/sui/utils'),bignumber_js=require('bignumber.js');var h=chunkYKJ7DP7U_cjs.a("@flowx-finance/sdk",()=>import('@flowx-finance/sdk')),d=class extends chunkWXCBWCRW_cjs.e{commission;constructor(t){super("flowx",t),this.commission=t.commission;}async ensureClient(){if(!this.client){let{AggregatorQuoter:t,Protocol:n}=await h();this.client=new t("mainnet"),this.poolsMap.size===0&&(this.poolsMap=new Map(Object.values(n).map(e=>[e,true])));}return this.client}setFetchRouteSettings(t){this.fetchSettings=t;}calcSlippage(t){return bignumber_js.BigNumber(t).multipliedBy(1e6).integerValue().toNumber()}parseRawRouteToFormattedResult(t){let n=[];for(let e of t.routes)n.push({paths:e.paths.map(o=>({protocolName:chunkWXCBWCRW_cjs.c(o.protocol()?.toLowerCase()??""),coinIn:{amount:BigInt((o.amountIn??0).toString()),type:o.input.coinType},coinOut:{amount:BigInt((o.amountOut??0).toString()),type:o.output.coinType}})),splitPercentage:Number(e.amountIn??0)/Number(this.rawRouteResult?.amountIn??1)*100,coinIn:{amount:BigInt(e.amountIn.toString()),type:utils.normalizeStructTag(e.input.coinType)},coinOut:{amount:BigInt(e.amountOut.toString()),type:utils.normalizeStructTag(e.output.coinType)}});return {routes:n,coinIn:{type:utils.normalizeStructTag(t.coinIn.coinType),amount:BigInt(t.amountIn.toString())},coinOut:{type:utils.normalizeStructTag(t.coinOut.coinType),amount:BigInt(t.amountOut.toString())},name:this.name}}async fetchRoute(t,n){let e=await this.ensureClient(),o=this.normalizeFetchRouteParams(t);this.rawRouteResult=void 0;let{coinInType:u,coinOutType:r,swapAmount:i}=o,s=await this.withTimeout(e.getRoutes({...this.fetchSettings,tokenIn:u,tokenOut:r,amountIn:i.toString(),commission:this.commission,includeSources:this.getEnabledPools()}),n);if(!s)throw new Error(`${this.name} fetch route returned empty response`);return this.rawRouteResult=s,{formattedResult:this.parseRawRouteToFormattedResult(s),rawRouteResult:s}}async buildSwapTransaction(t){this.validateWalletAddress();let{TradeBuilder:n}=await h(),{txExtensionParams:e,slippage:o,route:u}=t,r=u?.rawRouteResult??this.rawRouteResult;if(!r)throw new Error(`${this.name} build swap transaction failed: no route available`);let i=null,s=null;if(e){let{initTx:R,coinIn:w}=e;i=R,s=w;}else i=new transactions.Transaction,i.setSender(this.walletAddress),s=await this.selectCoinInForSwap(i,BigInt(r.amountIn.toString()),utils.normalizeStructTag(r.coinIn.coinType));let c=new n("mainnet",r.routes).sender(this.walletAddress).slippage(this.calcSlippage(o)).deadline(Date.now()+3600*1e3),m=await(this.commission?c.commission(this.commission).build():c.build()).swap({client:this.suiGrpcClient,tx:i,coinIn:s});if(!m)throw new Error(`${this.name} build swap transaction failed`);return {tx:i,coinOut:m}}};exports.FlowXSwap=d;
1
+ 'use strict';var chunkYKJ7DP7U_cjs=require('../chunk-YKJ7DP7U.cjs'),chunk4KW3TLDS_cjs=require('../chunk-4KW3TLDS.cjs'),transactions=require('@mysten/sui/transactions'),utils=require('@mysten/sui/utils'),bignumber_js=require('bignumber.js');var d=chunkYKJ7DP7U_cjs.a("@flowx-finance/sdk",()=>import('@flowx-finance/sdk')),h=class extends chunk4KW3TLDS_cjs.e{commission;constructor(t){super("flowx",t),this.commission=t.commission;}async ensureClient(){if(!this.client){let{AggregatorQuoter:t,Protocol:n}=await d();this.client=new t("mainnet"),this.setSupportedPools(Object.values(n));}return this.client}setFetchRouteSettings(t){this.fetchSettings=t;}calcSlippage(t){return bignumber_js.BigNumber(t).multipliedBy(1e6).integerValue().toNumber()}parseRawRouteToFormattedResult(t){let n=[];for(let e of t.routes)n.push({paths:e.paths.map(o=>({protocolName:chunk4KW3TLDS_cjs.c(o.protocol()?.toLowerCase()??""),coinIn:{amount:BigInt((o.amountIn??0).toString()),type:o.input.coinType},coinOut:{amount:BigInt((o.amountOut??0).toString()),type:o.output.coinType}})),splitPercentage:Number(e.amountIn??0)/Number(this.rawRouteResult?.amountIn??1)*100,coinIn:{amount:BigInt(e.amountIn.toString()),type:utils.normalizeStructTag(e.input.coinType)},coinOut:{amount:BigInt(e.amountOut.toString()),type:utils.normalizeStructTag(e.output.coinType)}});return {routes:n,coinIn:{type:utils.normalizeStructTag(t.coinIn.coinType),amount:BigInt(t.amountIn.toString())},coinOut:{type:utils.normalizeStructTag(t.coinOut.coinType),amount:BigInt(t.amountOut.toString())},name:this.name}}async fetchRoute(t,n){let e=await this.ensureClient(),o=this.normalizeFetchRouteParams(t);this.rawRouteResult=void 0;let{coinInType:u,coinOutType:r,swapAmount:i}=o,s=await this.withTimeout(e.getRoutes({...this.fetchSettings,tokenIn:u,tokenOut:r,amountIn:i.toString(),commission:this.commission,includeSources:this.getEnabledPools()}),n);if(!s)throw new Error(`${this.name} fetch route returned empty response`);return this.rawRouteResult=s,{formattedResult:this.parseRawRouteToFormattedResult(s),rawRouteResult:s}}async buildSwapTransaction(t){this.validateWalletAddress();let{TradeBuilder:n}=await d(),{txExtensionParams:e,slippage:o,route:u}=t,r=u?.rawRouteResult??this.rawRouteResult;if(!r)throw new Error(`${this.name} build swap transaction failed: no route available`);let i=null,s=null;if(e){let{initTx:R,coinIn:w}=e;i=R,s=w;}else i=new transactions.Transaction,i.setSender(this.walletAddress),s=await this.selectCoinInForSwap(i,BigInt(r.amountIn.toString()),utils.normalizeStructTag(r.coinIn.coinType));let c=new n("mainnet",r.routes).sender(this.walletAddress).slippage(this.calcSlippage(o)).deadline(Date.now()+3600*1e3),m=await(this.commission?c.commission(this.commission).build():c.build()).swap({client:this.suiGrpcClient,tx:i,coinIn:s});if(!m)throw new Error(`${this.name} build swap transaction failed`);return {tx:i,coinOut:m}}};exports.FlowXSwap=h;
@@ -1,7 +1,7 @@
1
1
  import { Protocol, GetRoutesResult, Coin, SingleQuoteQueryParams, AggregatorQuoter, Commission } from '@flowx-finance/sdk';
2
2
  export { AggregatorQuoter, GetRoutesResult } from '@flowx-finance/sdk';
3
3
  import { Transaction, TransactionObjectArgument } from '@mysten/sui/transactions';
4
- import { S as SwapSdkBase, a as SwapSdkConstructorParams, d as FormattedRouteResult, F as FetchRouteParams, b as FetchRouteResult, c as SwapParams } from '../base-CwUCfqut.cjs';
4
+ import { S as SwapSdkBase, a as SwapSdkConstructorParams, d as FormattedRouteResult, F as FetchRouteParams, b as FetchRouteResult, c as SwapParams } from '../base-BayfFTQS.cjs';
5
5
  import '@mysten/sui/client';
6
6
  import '@mysten/sui/grpc';
7
7
  import 'events';
@@ -1,7 +1,7 @@
1
1
  import { Protocol, GetRoutesResult, Coin, SingleQuoteQueryParams, AggregatorQuoter, Commission } from '@flowx-finance/sdk';
2
2
  export { AggregatorQuoter, GetRoutesResult } from '@flowx-finance/sdk';
3
3
  import { Transaction, TransactionObjectArgument } from '@mysten/sui/transactions';
4
- import { S as SwapSdkBase, a as SwapSdkConstructorParams, d as FormattedRouteResult, F as FetchRouteParams, b as FetchRouteResult, c as SwapParams } from '../base-CwUCfqut.js';
4
+ import { S as SwapSdkBase, a as SwapSdkConstructorParams, d as FormattedRouteResult, F as FetchRouteParams, b as FetchRouteResult, c as SwapParams } from '../base-BayfFTQS.js';
5
5
  import '@mysten/sui/client';
6
6
  import '@mysten/sui/grpc';
7
7
  import 'events';
package/dist/sdk/flowx.js CHANGED
@@ -1 +1 @@
1
- import {a}from'../chunk-5N4RDKGD.js';import {e,c}from'../chunk-2L6A2K5X.js';import {Transaction}from'@mysten/sui/transactions';import {normalizeStructTag}from'@mysten/sui/utils';import {BigNumber}from'bignumber.js';var h=a("@flowx-finance/sdk",()=>import('@flowx-finance/sdk')),d=class extends e{commission;constructor(t){super("flowx",t),this.commission=t.commission;}async ensureClient(){if(!this.client){let{AggregatorQuoter:t,Protocol:n}=await h();this.client=new t("mainnet"),this.poolsMap.size===0&&(this.poolsMap=new Map(Object.values(n).map(e=>[e,true])));}return this.client}setFetchRouteSettings(t){this.fetchSettings=t;}calcSlippage(t){return BigNumber(t).multipliedBy(1e6).integerValue().toNumber()}parseRawRouteToFormattedResult(t){let n=[];for(let e of t.routes)n.push({paths:e.paths.map(o=>({protocolName:c(o.protocol()?.toLowerCase()??""),coinIn:{amount:BigInt((o.amountIn??0).toString()),type:o.input.coinType},coinOut:{amount:BigInt((o.amountOut??0).toString()),type:o.output.coinType}})),splitPercentage:Number(e.amountIn??0)/Number(this.rawRouteResult?.amountIn??1)*100,coinIn:{amount:BigInt(e.amountIn.toString()),type:normalizeStructTag(e.input.coinType)},coinOut:{amount:BigInt(e.amountOut.toString()),type:normalizeStructTag(e.output.coinType)}});return {routes:n,coinIn:{type:normalizeStructTag(t.coinIn.coinType),amount:BigInt(t.amountIn.toString())},coinOut:{type:normalizeStructTag(t.coinOut.coinType),amount:BigInt(t.amountOut.toString())},name:this.name}}async fetchRoute(t,n){let e=await this.ensureClient(),o=this.normalizeFetchRouteParams(t);this.rawRouteResult=void 0;let{coinInType:u,coinOutType:r,swapAmount:i}=o,s=await this.withTimeout(e.getRoutes({...this.fetchSettings,tokenIn:u,tokenOut:r,amountIn:i.toString(),commission:this.commission,includeSources:this.getEnabledPools()}),n);if(!s)throw new Error(`${this.name} fetch route returned empty response`);return this.rawRouteResult=s,{formattedResult:this.parseRawRouteToFormattedResult(s),rawRouteResult:s}}async buildSwapTransaction(t){this.validateWalletAddress();let{TradeBuilder:n}=await h(),{txExtensionParams:e,slippage:o,route:u}=t,r=u?.rawRouteResult??this.rawRouteResult;if(!r)throw new Error(`${this.name} build swap transaction failed: no route available`);let i=null,s=null;if(e){let{initTx:R,coinIn:w}=e;i=R,s=w;}else i=new Transaction,i.setSender(this.walletAddress),s=await this.selectCoinInForSwap(i,BigInt(r.amountIn.toString()),normalizeStructTag(r.coinIn.coinType));let c=new n("mainnet",r.routes).sender(this.walletAddress).slippage(this.calcSlippage(o)).deadline(Date.now()+3600*1e3),m=await(this.commission?c.commission(this.commission).build():c.build()).swap({client:this.suiGrpcClient,tx:i,coinIn:s});if(!m)throw new Error(`${this.name} build swap transaction failed`);return {tx:i,coinOut:m}}};export{d as FlowXSwap};
1
+ import {a}from'../chunk-5N4RDKGD.js';import {e,c}from'../chunk-YSJBIM7C.js';import {Transaction}from'@mysten/sui/transactions';import {normalizeStructTag}from'@mysten/sui/utils';import {BigNumber}from'bignumber.js';var d=a("@flowx-finance/sdk",()=>import('@flowx-finance/sdk')),h=class extends e{commission;constructor(t){super("flowx",t),this.commission=t.commission;}async ensureClient(){if(!this.client){let{AggregatorQuoter:t,Protocol:n}=await d();this.client=new t("mainnet"),this.setSupportedPools(Object.values(n));}return this.client}setFetchRouteSettings(t){this.fetchSettings=t;}calcSlippage(t){return BigNumber(t).multipliedBy(1e6).integerValue().toNumber()}parseRawRouteToFormattedResult(t){let n=[];for(let e of t.routes)n.push({paths:e.paths.map(o=>({protocolName:c(o.protocol()?.toLowerCase()??""),coinIn:{amount:BigInt((o.amountIn??0).toString()),type:o.input.coinType},coinOut:{amount:BigInt((o.amountOut??0).toString()),type:o.output.coinType}})),splitPercentage:Number(e.amountIn??0)/Number(this.rawRouteResult?.amountIn??1)*100,coinIn:{amount:BigInt(e.amountIn.toString()),type:normalizeStructTag(e.input.coinType)},coinOut:{amount:BigInt(e.amountOut.toString()),type:normalizeStructTag(e.output.coinType)}});return {routes:n,coinIn:{type:normalizeStructTag(t.coinIn.coinType),amount:BigInt(t.amountIn.toString())},coinOut:{type:normalizeStructTag(t.coinOut.coinType),amount:BigInt(t.amountOut.toString())},name:this.name}}async fetchRoute(t,n){let e=await this.ensureClient(),o=this.normalizeFetchRouteParams(t);this.rawRouteResult=void 0;let{coinInType:u,coinOutType:r,swapAmount:i}=o,s=await this.withTimeout(e.getRoutes({...this.fetchSettings,tokenIn:u,tokenOut:r,amountIn:i.toString(),commission:this.commission,includeSources:this.getEnabledPools()}),n);if(!s)throw new Error(`${this.name} fetch route returned empty response`);return this.rawRouteResult=s,{formattedResult:this.parseRawRouteToFormattedResult(s),rawRouteResult:s}}async buildSwapTransaction(t){this.validateWalletAddress();let{TradeBuilder:n}=await d(),{txExtensionParams:e,slippage:o,route:u}=t,r=u?.rawRouteResult??this.rawRouteResult;if(!r)throw new Error(`${this.name} build swap transaction failed: no route available`);let i=null,s=null;if(e){let{initTx:R,coinIn:w}=e;i=R,s=w;}else i=new Transaction,i.setSender(this.walletAddress),s=await this.selectCoinInForSwap(i,BigInt(r.amountIn.toString()),normalizeStructTag(r.coinIn.coinType));let c=new n("mainnet",r.routes).sender(this.walletAddress).slippage(this.calcSlippage(o)).deadline(Date.now()+3600*1e3),m=await(this.commission?c.commission(this.commission).build():c.build()).swap({client:this.suiGrpcClient,tx:i,coinIn:s});if(!m)throw new Error(`${this.name} build swap transaction failed`);return {tx:i,coinOut:m}}};export{h as FlowXSwap};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scallop-io/scallop-swap-sdk",
3
- "version": "5.1.1",
3
+ "version": "5.2.0",
4
4
  "description": "Scallop Swap Meta Aggregator SDK for Sui Blockchain developed by Scallop Labs.",
5
5
  "keywords": [
6
6
  "sui",
@@ -90,7 +90,7 @@
90
90
  "@bluefin-exchange/bluefin7k-aggregator-sdk": "^5.5.1",
91
91
  "@cetusprotocol/aggregator-sdk": "^1.7.2",
92
92
  "@flowx-finance/sdk": "^2.1.0",
93
- "aftermath-ts-sdk": "^3.3.3"
93
+ "aftermath-ts-sdk": "^4.0.0"
94
94
  },
95
95
  "devDependencies": {
96
96
  "@commitlint/cli": "^18.0.0",
@@ -23,6 +23,7 @@ import { mergeWithExistingOrTransfer } from 'src/utils';
23
23
  import {
24
24
  AggregatorEvents,
25
25
  AllSwapSdkPoolStatusEvent,
26
+ SupportedPoolsChangedEvent,
26
27
  SwapSdkPoolStatusEvent,
27
28
  } from 'src/types';
28
29
  import { TypedEventEmitter } from './event';
@@ -56,6 +57,10 @@ export class Aggregator {
56
57
  string,
57
58
  (e: AllSwapSdkPoolStatusEvent) => void
58
59
  >();
60
+ private supportedPoolsForwarders = new Map<
61
+ string,
62
+ (e: SupportedPoolsChangedEvent<string>) => void
63
+ >();
59
64
 
60
65
  walletAddress: string;
61
66
  client: ClientWithCoreApi;
@@ -114,6 +119,13 @@ export class Aggregator {
114
119
  this.allPoolStatusForwarders.set(agg.name, allPoolHandler);
115
120
  agg.events.on('allPoolStatusChanged', allPoolHandler);
116
121
 
122
+ // Forward supportedPoolsChanged events
123
+ const supportedPoolsHandler = (
124
+ evt: SupportedPoolsChangedEvent<string>
125
+ ) => this.events.emit('supportedPoolsChanged', evt);
126
+ this.supportedPoolsForwarders.set(agg.name, supportedPoolsHandler);
127
+ agg.events.on('supportedPoolsChanged', supportedPoolsHandler);
128
+
117
129
  this.events.emit('aggregatorAdded', { name: agg.name });
118
130
  }
119
131
  }
@@ -155,6 +167,11 @@ export class Aggregator {
155
167
  if (allPoolHandler) agg.events.off('allPoolStatusChanged', allPoolHandler);
156
168
  this.allPoolStatusForwarders.delete(name);
157
169
 
170
+ const supportedPoolsHandler = this.supportedPoolsForwarders.get(name);
171
+ if (supportedPoolsHandler)
172
+ agg.events.off('supportedPoolsChanged', supportedPoolsHandler);
173
+ this.supportedPoolsForwarders.delete(name);
174
+
158
175
  // Remove from lists
159
176
  this.aggregatorMap.delete(name);
160
177
  this.activeAggregator.delete(name);
package/src/class/base.ts CHANGED
@@ -94,6 +94,31 @@ export abstract class SwapSdkBase<
94
94
 
95
95
  abstract calcSlippage(slippageInDecimal: number): number;
96
96
 
97
+ /**
98
+ * Declares the full set of pools this aggregator supports. `pools` is authoritative: statuses of
99
+ * pools already in the map are kept, and entries for pools missing from `pools` are dropped, so a
100
+ * persisted preference for a pool this version no longer supports does not linger in the map (it
101
+ * re-defaults to enabled if that pool comes back).
102
+ *
103
+ * Aggregators whose pool list is only known once their client is created must not skip this
104
+ * when the map is non-empty: consumers restore persisted pool preferences before the client
105
+ * exists, so the map can hold a handful of previously toggled pools while the rest of the list
106
+ * has never been seen. Bailing out in that case leaves the aggregator permanently unaware of
107
+ * every other pool, which empties `getEnabledPools()` and stops it routing.
108
+ *
109
+ * Emits `supportedPoolsChanged` so consumers that rendered `pools` before the client existed can
110
+ * re-read the now-complete list.
111
+ */
112
+ protected setSupportedPools(pools: PoolType[]) {
113
+ this.poolsMap = new Map(
114
+ pools.map((pool) => [pool, this.poolsMap.get(pool) ?? true])
115
+ );
116
+ this.events.emit('supportedPoolsChanged', {
117
+ name: this.name,
118
+ pools: this.pools,
119
+ });
120
+ }
121
+
97
122
  togglePoolStatus(pool: PoolType, enabled?: boolean) {
98
123
  const newStatus = enabled ?? !(this.poolsMap.get(pool) ?? true);
99
124
  this.poolsMap.set(pool, newStatus);
@@ -91,7 +91,7 @@ export class AftermathSwap extends SwapSdkBase<
91
91
  }
92
92
  ) {
93
93
  super('aftermath', params);
94
- this.poolsMap = new Map(pools.map((pool) => [pool, true]));
94
+ this.setSupportedPools(pools);
95
95
 
96
96
  if (!this.params.addresses) {
97
97
  console.warn(
@@ -226,12 +226,6 @@ export class AftermathSwap extends SwapSdkBase<
226
226
  );
227
227
  }
228
228
 
229
- // Aftermath serializes the tx with the v1 format, which cannot represent
230
- // unresolved intent commands (e.g. the CoinWithBalance intent added by
231
- // `tx.coin()`). Resolve them into concrete commands first.
232
- tx.setSenderIfNotSet(this.walletAddress);
233
- await tx.prepareForSerialization({ client: this.suiClient });
234
-
235
229
  const { tx: nextTx, coinOutId: outputCoin } =
236
230
  await router.addTransactionForCompleteTradeRoute({
237
231
  walletAddress: this.walletAddress,
package/src/sdk/cetus.ts CHANGED
@@ -73,9 +73,7 @@ export class CetusSwap extends SwapSdkBase<
73
73
  network,
74
74
  }),
75
75
  });
76
- if (this.poolsMap.size === 0) {
77
- this.poolsMap = new Map(ALL_DEXES.map((dex) => [dex, true]));
78
- }
76
+ this.setSupportedPools(ALL_DEXES);
79
77
  }
80
78
  return this.client;
81
79
  }
package/src/sdk/flowx.ts CHANGED
@@ -61,9 +61,7 @@ export class FlowXSwap extends SwapSdkBase<
61
61
  if (!this.client) {
62
62
  const { AggregatorQuoter, Protocol } = await loadFlowxModule();
63
63
  this.client = new AggregatorQuoter('mainnet');
64
- if (this.poolsMap.size === 0) {
65
- this.poolsMap = new Map(Object.values(Protocol).map((p) => [p, true]));
66
- }
64
+ this.setSupportedPools(Object.values(Protocol));
67
65
  }
68
66
  return this.client;
69
67
  }
package/src/types.ts CHANGED
@@ -9,9 +9,15 @@ export type AllSwapSdkPoolStatusEvent = {
9
9
  enabled: boolean;
10
10
  };
11
11
 
12
+ export type SupportedPoolsChangedEvent<PoolType> = {
13
+ name: string;
14
+ pools: PoolType[];
15
+ };
16
+
12
17
  export type SwapSdkEvents<PoolType> = {
13
18
  poolStatusChanged: SwapSdkPoolStatusEvent<PoolType>;
14
19
  allPoolStatusChanged: AllSwapSdkPoolStatusEvent;
20
+ supportedPoolsChanged: SupportedPoolsChangedEvent<PoolType>;
15
21
  };
16
22
 
17
23
  export type SlippageChangedEvent = {
@@ -30,6 +36,7 @@ export type AggregatorEvent = {
30
36
  export type AggregatorEvents<PoolType> = {
31
37
  poolStatusChanged: SwapSdkPoolStatusEvent<PoolType>;
32
38
  allPoolStatusChanged: AllSwapSdkPoolStatusEvent;
39
+ supportedPoolsChanged: SupportedPoolsChangedEvent<PoolType>;
33
40
  aggregatorStatusChanged: AggregatorStatusEvent;
34
41
  aggregatorRemoved: AggregatorEvent;
35
42
  aggregatorAdded: AggregatorEvent;
@@ -1,2 +0,0 @@
1
- import {normalizeStructTag,SUI_TYPE_ARG}from'@mysten/sui/utils';import {EventEmitter}from'events';import {SuiGrpcClient}from'@mysten/sui/grpc';import {getJsonRpcFullnodeUrl}from'@mysten/sui/jsonRpc';import {BigNumber}from'bignumber.js';import {SuiKit}from'@scallop-io/sui-kit';var y=normalizeStructTag(SUI_TYPE_ARG),d=i=>normalizeStructTag(i)===y,h=async(i,t,e,s,r)=>{try{if(d(s))i.mergeCoins(i.gas,[t]);else {let{objects:n}=await e.core.listCoins({coinType:s,owner:r,limit:1});if(!n.length)throw new Error(`No existing ${s} coin found to merge with`);let a=i.objectRef({objectId:n[0].objectId,version:n[0].version,digest:n[0].digest});n.length===1?i.mergeCoins(a,[t]):i.mergeCoins(a,[t,...n.slice(1).map(o=>i.objectRef({objectId:o.objectId,version:o.version,digest:o.digest}))]);}}catch{i.transferObjects([t],i.pure.address(r));}},C=i=>i[0].toUpperCase()+i.slice(1),k=i=>i.split("_").map(C).join(" ");var u=class extends EventEmitter{on(t,e){return super.on(t,e)}once(t,e){return super.once(t,e)}off(t,e){return super.off(t,e)}emit(t,e){return super.emit(t,e)}};var f=class{rawRouteResult;suiGrpcClient;name="";events=new u;client;suiClient;fetchTimeoutInMs;walletAddress;fetchSettings;poolsMap=new Map;constructor(t,e){let s=e.suiClient?.network??"mainnet",r=new SuiGrpcClient({baseUrl:getJsonRpcFullnodeUrl(s),network:s});this.suiGrpcClient=e.suiGrpcClient??r,this.suiClient=e.suiClient??r.core,this.fetchTimeoutInMs=e.fetchTimeoutInMs??4e3,this.walletAddress=e.walletAddress,this.name=t.toLowerCase(),e.fetchSettings&&this.setFetchRouteSettings(e.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(t){this.walletAddress=t;}setSuiClient(t){this.suiClient=t;}togglePoolStatus(t,e){let s=e??!(this.poolsMap.get(t)??true);this.poolsMap.set(t,s),this.events.emit("poolStatusChanged",{name:this.name,pool:t,enabled:s});}toggleAllPoolStatus(t){this.pools.forEach(e=>{this.poolsMap.set(e,t);}),this.events.emit("allPoolStatusChanged",{name:this.name,enabled:t});}getEnabledPools(){return Array.from(this.poolsMap.entries()).filter(([t,e])=>e).map(([t,e])=>t)}normalizeFetchRouteParams(t){return {...t,coinInType:normalizeStructTag(t.coinInType),coinOutType:normalizeStructTag(t.coinOutType)}}async withTimeout(t,e){let s,r,n=[t,new Promise((a,o)=>{s=setTimeout(()=>{o(new Error(`${this.name} fetch route timeout`));},this.fetchTimeoutInMs);})];e&&n.push(new Promise((a,o)=>{if(e.aborted){o(e.reason??new Error(`${this.name} fetch route aborted`));return}r=()=>o(e.reason??new Error(`${this.name} fetch route aborted`)),e.addEventListener("abort",r,{once:true});}));try{return await Promise.race(n)}finally{s&&clearTimeout(s),e&&r&&e.removeEventListener("abort",r);}}async selectCoinInForSwap(t,e,s){return t.coin({type:s,balance:e,useGasCoin:d(s)})}};var c=class{constructor(t,e){this.client=t;e&&e.forEach(s=>this.cache.set(s.coinType,s));}client;cache=new Map;setClient(t){this.client=t;}async getCoinMetadata(t){let e=normalizeStructTag(t);if(this.cache.has(e))return this.cache.get(e);let{coinMetadata:s}=await this.client.core.getCoinMetadata({coinType:e}),r=s;if(!r)throw new Error(`Coin metadata not found for coin type: ${e}`);return this.cache.set(e,r),r}};var S=class{coinMetadata;suiKit;events=new u;_slippage=.003;signerMode=false;aggregatorMap=new Map;activeAggregator=new Map;_fetchingStatus=new Map;poolStatusForwarders=new Map;allPoolStatusForwarders=new Map;walletAddress;client;constructor(t){if(this.client=t.client??new SuiGrpcClient({baseUrl:t.fullnodeUrl||"https://fullnode.mainnet.sui.io:443",network:"mainnet"}),this.coinMetadata=new c(this.client),this.signerMode=!!(t.secretKey||t.mnemonics),t.secretKey||t.mnemonics)this.suiKit=new SuiKit({...t,suiClients:[this.client]}),this.walletAddress=this.suiKit.currentAddress;else if(t.walletAddress!==void 0)this.walletAddress=t.walletAddress;else throw new Error("One of secretKey, mnemonics or walletAddress must be provided")}async init(){await Promise.all(this.aggregators.map(t=>t.ensureClient()));}forwardPoolStatusChangeEvent(t){this.events.emit("poolStatusChanged",t);}addAggregator(t){for(let e of t)if(!this.aggregatorMap.has(e.name)){this.aggregatorMap.set(e.name,e),this.activeAggregator.set(e.name,true),this._fetchingStatus.set(e.name,false);let s=n=>this.forwardPoolStatusChangeEvent(n);this.poolStatusForwarders.set(e.name,s),e.events.on("poolStatusChanged",s);let r=n=>this.events.emit("allPoolStatusChanged",n);this.allPoolStatusForwarders.set(e.name,r),e.events.on("allPoolStatusChanged",r),this.events.emit("aggregatorAdded",{name:e.name});}}getActiveAggregators(){return Array.from(this.activeAggregator.entries()).filter(([t,e])=>e).map(([t,e])=>t)}getAggregator(t){return this.aggregatorMap.get(t)}toggleAggregator(t,e){if(!this.activeAggregator.has(t))throw new Error(`Aggregator ${t} not found`);this.activeAggregator.set(t,e),this.events.emit("aggregatorStatusChanged",{name:t,enabled:e});}removeAggregator(t){let e=this.aggregatorMap.get(t);if(!e)throw new Error(`Aggregator ${t} not found`);let s=this.poolStatusForwarders.get(t);s&&e.events.off("poolStatusChanged",s),this.poolStatusForwarders.delete(t);let r=this.allPoolStatusForwarders.get(t);r&&e.events.off("allPoolStatusChanged",r),this.allPoolStatusForwarders.delete(t),this.aggregatorMap.delete(t),this.activeAggregator.delete(t),this._fetchingStatus.delete(t),this.events.emit("aggregatorRemoved",{name:t});}get aggregators(){return Array.from(this.aggregatorMap.values())}get fetchingStatus(){return Object.fromEntries(this._fetchingStatus)}get slippage(){return this._slippage}setSlippage(t){this._slippage=t,this.events.emit("aggregatorSlippageChanged",{slippageInDecimal:t});}setFetchTimeoutInMs(t){this.aggregators.forEach(e=>{e.fetchTimeoutInMs=t;});}#t(){if(!this.suiKit)throw new Error("SuiKit is not initialized.")}setSuiClient(t){this.aggregators.forEach(e=>{e.setSuiClient(t);}),this.coinMetadata.setClient(t),this.client=t;}setWalletAddress(t){if(this.signerMode)throw new Error("Cannot change wallet address when SuiKit is initialized with secretKey or mnemonics.");this.walletAddress=t,this.aggregators.forEach(e=>{e.setWalletAddress(t);});}async getCoinMetadata(t){return this.coinMetadata.getCoinMetadata(t)}async fetchRoutes(t,e){let s=this.aggregators.filter(({name:o})=>this.activeAggregator.get(o)===true),r=[],n=[],a=s.map(async o=>{this._fetchingStatus.set(o.name,true),this.events.emit("aggregatorFetchStart",{name:o.name});try{let l=await o.fetchRoute(t,e?.abortSignal);r.push(l),e?.onRouteFound?.(l);}catch(l){let g={name:o.name,reason:l};n.push(g),e?.onError?.(g);}finally{this._fetchingStatus.set(o.name,false),this.events.emit("aggregatorFetchEnd",{name:o.name});}});return await Promise.all(a),{routes:r.sort((o,l)=>BigNumber(l.formattedResult.coinOut.amount).comparedTo(o.formattedResult.coinOut.amount)??0),errors:n}}async buildRouteTransaction(t,e={}){let{mergeResult:s=true,txExtensionParams:r}=e,n=this.aggregatorMap.get(t.formattedResult.name);if(!n)throw new Error(`Aggregator ${t.formattedResult.name} not found in the aggregator list`);let{tx:a,coinOut:o}=await n.buildSwapTransaction({route:t,slippage:e.slippage??this.slippage,txExtensionParams:r}),l=t.formattedResult.coinOut.type;return s?(await h(a,o,this.client,l,this.walletAddress),{tx:a,coinOutType:l}):{tx:a,coinOut:o,coinOutType:l}}async executeSwapTransaction(t,e=false){return this.#t(),e?(t.setSender(this.walletAddress),this.suiKit.dryRunTxn(t)):this.suiKit.signAndSendTxn(t)}};
2
- export{d as a,h as b,k as c,u as d,f as e,c as f,S as g};
@@ -1,2 +0,0 @@
1
- 'use strict';var utils=require('@mysten/sui/utils'),events=require('events'),grpc=require('@mysten/sui/grpc'),jsonRpc=require('@mysten/sui/jsonRpc'),bignumber_js=require('bignumber.js'),suiKit=require('@scallop-io/sui-kit');var y=utils.normalizeStructTag(utils.SUI_TYPE_ARG),d=i=>utils.normalizeStructTag(i)===y,h=async(i,t,e,s,r)=>{try{if(d(s))i.mergeCoins(i.gas,[t]);else {let{objects:n}=await e.core.listCoins({coinType:s,owner:r,limit:1});if(!n.length)throw new Error(`No existing ${s} coin found to merge with`);let a=i.objectRef({objectId:n[0].objectId,version:n[0].version,digest:n[0].digest});n.length===1?i.mergeCoins(a,[t]):i.mergeCoins(a,[t,...n.slice(1).map(o=>i.objectRef({objectId:o.objectId,version:o.version,digest:o.digest}))]);}}catch{i.transferObjects([t],i.pure.address(r));}},C=i=>i[0].toUpperCase()+i.slice(1),k=i=>i.split("_").map(C).join(" ");var u=class extends events.EventEmitter{on(t,e){return super.on(t,e)}once(t,e){return super.once(t,e)}off(t,e){return super.off(t,e)}emit(t,e){return super.emit(t,e)}};var f=class{rawRouteResult;suiGrpcClient;name="";events=new u;client;suiClient;fetchTimeoutInMs;walletAddress;fetchSettings;poolsMap=new Map;constructor(t,e){let s=e.suiClient?.network??"mainnet",r=new grpc.SuiGrpcClient({baseUrl:jsonRpc.getJsonRpcFullnodeUrl(s),network:s});this.suiGrpcClient=e.suiGrpcClient??r,this.suiClient=e.suiClient??r.core,this.fetchTimeoutInMs=e.fetchTimeoutInMs??4e3,this.walletAddress=e.walletAddress,this.name=t.toLowerCase(),e.fetchSettings&&this.setFetchRouteSettings(e.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(t){this.walletAddress=t;}setSuiClient(t){this.suiClient=t;}togglePoolStatus(t,e){let s=e??!(this.poolsMap.get(t)??true);this.poolsMap.set(t,s),this.events.emit("poolStatusChanged",{name:this.name,pool:t,enabled:s});}toggleAllPoolStatus(t){this.pools.forEach(e=>{this.poolsMap.set(e,t);}),this.events.emit("allPoolStatusChanged",{name:this.name,enabled:t});}getEnabledPools(){return Array.from(this.poolsMap.entries()).filter(([t,e])=>e).map(([t,e])=>t)}normalizeFetchRouteParams(t){return {...t,coinInType:utils.normalizeStructTag(t.coinInType),coinOutType:utils.normalizeStructTag(t.coinOutType)}}async withTimeout(t,e){let s,r,n=[t,new Promise((a,o)=>{s=setTimeout(()=>{o(new Error(`${this.name} fetch route timeout`));},this.fetchTimeoutInMs);})];e&&n.push(new Promise((a,o)=>{if(e.aborted){o(e.reason??new Error(`${this.name} fetch route aborted`));return}r=()=>o(e.reason??new Error(`${this.name} fetch route aborted`)),e.addEventListener("abort",r,{once:true});}));try{return await Promise.race(n)}finally{s&&clearTimeout(s),e&&r&&e.removeEventListener("abort",r);}}async selectCoinInForSwap(t,e,s){return t.coin({type:s,balance:e,useGasCoin:d(s)})}};var c=class{constructor(t,e){this.client=t;e&&e.forEach(s=>this.cache.set(s.coinType,s));}client;cache=new Map;setClient(t){this.client=t;}async getCoinMetadata(t){let e=utils.normalizeStructTag(t);if(this.cache.has(e))return this.cache.get(e);let{coinMetadata:s}=await this.client.core.getCoinMetadata({coinType:e}),r=s;if(!r)throw new Error(`Coin metadata not found for coin type: ${e}`);return this.cache.set(e,r),r}};var S=class{coinMetadata;suiKit;events=new u;_slippage=.003;signerMode=false;aggregatorMap=new Map;activeAggregator=new Map;_fetchingStatus=new Map;poolStatusForwarders=new Map;allPoolStatusForwarders=new Map;walletAddress;client;constructor(t){if(this.client=t.client??new grpc.SuiGrpcClient({baseUrl:t.fullnodeUrl||"https://fullnode.mainnet.sui.io:443",network:"mainnet"}),this.coinMetadata=new c(this.client),this.signerMode=!!(t.secretKey||t.mnemonics),t.secretKey||t.mnemonics)this.suiKit=new suiKit.SuiKit({...t,suiClients:[this.client]}),this.walletAddress=this.suiKit.currentAddress;else if(t.walletAddress!==void 0)this.walletAddress=t.walletAddress;else throw new Error("One of secretKey, mnemonics or walletAddress must be provided")}async init(){await Promise.all(this.aggregators.map(t=>t.ensureClient()));}forwardPoolStatusChangeEvent(t){this.events.emit("poolStatusChanged",t);}addAggregator(t){for(let e of t)if(!this.aggregatorMap.has(e.name)){this.aggregatorMap.set(e.name,e),this.activeAggregator.set(e.name,true),this._fetchingStatus.set(e.name,false);let s=n=>this.forwardPoolStatusChangeEvent(n);this.poolStatusForwarders.set(e.name,s),e.events.on("poolStatusChanged",s);let r=n=>this.events.emit("allPoolStatusChanged",n);this.allPoolStatusForwarders.set(e.name,r),e.events.on("allPoolStatusChanged",r),this.events.emit("aggregatorAdded",{name:e.name});}}getActiveAggregators(){return Array.from(this.activeAggregator.entries()).filter(([t,e])=>e).map(([t,e])=>t)}getAggregator(t){return this.aggregatorMap.get(t)}toggleAggregator(t,e){if(!this.activeAggregator.has(t))throw new Error(`Aggregator ${t} not found`);this.activeAggregator.set(t,e),this.events.emit("aggregatorStatusChanged",{name:t,enabled:e});}removeAggregator(t){let e=this.aggregatorMap.get(t);if(!e)throw new Error(`Aggregator ${t} not found`);let s=this.poolStatusForwarders.get(t);s&&e.events.off("poolStatusChanged",s),this.poolStatusForwarders.delete(t);let r=this.allPoolStatusForwarders.get(t);r&&e.events.off("allPoolStatusChanged",r),this.allPoolStatusForwarders.delete(t),this.aggregatorMap.delete(t),this.activeAggregator.delete(t),this._fetchingStatus.delete(t),this.events.emit("aggregatorRemoved",{name:t});}get aggregators(){return Array.from(this.aggregatorMap.values())}get fetchingStatus(){return Object.fromEntries(this._fetchingStatus)}get slippage(){return this._slippage}setSlippage(t){this._slippage=t,this.events.emit("aggregatorSlippageChanged",{slippageInDecimal:t});}setFetchTimeoutInMs(t){this.aggregators.forEach(e=>{e.fetchTimeoutInMs=t;});}#t(){if(!this.suiKit)throw new Error("SuiKit is not initialized.")}setSuiClient(t){this.aggregators.forEach(e=>{e.setSuiClient(t);}),this.coinMetadata.setClient(t),this.client=t;}setWalletAddress(t){if(this.signerMode)throw new Error("Cannot change wallet address when SuiKit is initialized with secretKey or mnemonics.");this.walletAddress=t,this.aggregators.forEach(e=>{e.setWalletAddress(t);});}async getCoinMetadata(t){return this.coinMetadata.getCoinMetadata(t)}async fetchRoutes(t,e){let s=this.aggregators.filter(({name:o})=>this.activeAggregator.get(o)===true),r=[],n=[],a=s.map(async o=>{this._fetchingStatus.set(o.name,true),this.events.emit("aggregatorFetchStart",{name:o.name});try{let l=await o.fetchRoute(t,e?.abortSignal);r.push(l),e?.onRouteFound?.(l);}catch(l){let g={name:o.name,reason:l};n.push(g),e?.onError?.(g);}finally{this._fetchingStatus.set(o.name,false),this.events.emit("aggregatorFetchEnd",{name:o.name});}});return await Promise.all(a),{routes:r.sort((o,l)=>bignumber_js.BigNumber(l.formattedResult.coinOut.amount).comparedTo(o.formattedResult.coinOut.amount)??0),errors:n}}async buildRouteTransaction(t,e={}){let{mergeResult:s=true,txExtensionParams:r}=e,n=this.aggregatorMap.get(t.formattedResult.name);if(!n)throw new Error(`Aggregator ${t.formattedResult.name} not found in the aggregator list`);let{tx:a,coinOut:o}=await n.buildSwapTransaction({route:t,slippage:e.slippage??this.slippage,txExtensionParams:r}),l=t.formattedResult.coinOut.type;return s?(await h(a,o,this.client,l,this.walletAddress),{tx:a,coinOutType:l}):{tx:a,coinOut:o,coinOutType:l}}async executeSwapTransaction(t,e=false){return this.#t(),e?(t.setSender(this.walletAddress),this.suiKit.dryRunTxn(t)):this.suiKit.signAndSendTxn(t)}};
2
- exports.a=d;exports.b=h;exports.c=k;exports.d=u;exports.e=f;exports.f=c;exports.g=S;