@galacticcouncil/descriptors 1.1.1 → 1.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.
@@ -0,0 +1,27 @@
1
+ // .papi/descriptors/src/descriptors.ts
2
+ var [minified, commonTrees, tokens] = JSON.parse(`[{"hydration":{"storage":{"0":{"Account":0,"Number":1},"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"21":{"20":10,"AssetLocations":11},"22":0,"23":{"20":12,"HubAssetTradability":1},"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":{"AssetFee":22},"32":0,"33":{"Pools":25,"AssetTradability":26},"34":{"34":28},"35":0,"36":{"PoolData":29},"37":{"PoolAssets":31},"38":0,"39":0,"40":{"TotalIssuance":33,"Accounts":34},"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":{"ValidationData":39},"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0},"tx":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":{"dispatch_as_treasury":7,"dispatch_as_aave_manager":7,"note_aave_manager":8,"dispatch_with_extra_gas":9},"21":0,"22":0,"23":{"62":14,"63":15},"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":{"62":18,"63":19,"sell_all":20},"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":{"schedule":37,"terminate":38},"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0},"events":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":{"Executed":21},"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":{"Log":35},"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0},"constants":{"0":{"BlockWeights":2,"BlockLength":3,"BlockHashCount":1,"DbWeight":4,"Version":5,"SS58Prefix":1},"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"21":0,"22":0,"23":{"64":13,"65":13,"66":13,"HdxAssetId":1,"HubAssetId":1,"MinWithdrawalFee":1,"MinimumPoolLiquidity":13,"NFTCollectionId":13,"BurnProtocolFee":1},"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":{"AssetFeeParameters":23,"ProtocolFeeParameters":23},"32":0,"33":{"67":13,"68":13,"AmplificationRange":27},"34":0,"35":0,"36":{"65":13,"66":13,"67":13,"68":13,"repay_fee":30},"37":{"65":13,"66":13,"67":13,"68":13,"69":1,"GetExchangeFee":30,"OracleSource":32},"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":{"64":13,"69":1,"MaxPriceDifferenceBetweenBlocks":1,"MaxConfigurablePriceDifferenceBetweenBlocks":1,"MaxSchedulePerBlock":1,"MaxNumberOfRetriesOnError":1,"MinimalPeriod":1,"BumpChance":1,"PolkadotNativeAssetId":1,"MinBudgetInNativeCurrency":13,"FeeReceiver":36,"NamedReserveId":32},"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":{"SlotDuration":13},"60":0,"61":0},"viewFns":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0},"apis":{"CurrenciesApi":{"account":40,"accounts":41,"free_balance":42},"DryRunApi":{"dry_run_call":43,"dry_run_xcm":44},"AaveTradeExecutor":{"pairs":45,"liquidity_depth":46,"pool":47,"pools":48}}}},[{}],["System","Balances","MultiTransactionPayment","Treasury","Utility","Preimage","Identity","Democracy","Elections","Council","TechnicalCommittee","Tips","Proxy","Multisig","Uniques","StateTrieMigration","ConvictionVoting","Referenda","Whitelist","Dispatcher","Assets","AssetRegistry","Claims","Omnipool","TransactionPause","Duster","OmnipoolWarehouseLM","OmnipoolLiquidityMining","OTC","CircuitBreaker","Router","DynamicFees","Staking","Stableswap","Bonds","OtcSettlements","LBP","XYK","Referrals","Liquidation","Tokens","Currencies","Vesting","EVM","Ethereum","EVMAccounts","XYKLiquidityMining","XYKWarehouseLM","DCA","Scheduler","ParachainSystem","PolkadotXcm","XcmpQueue","MessageQueue","OrmlXcm","XTokens","UnknownTokens","CollatorSelection","Session","Aura","EmaOracle","Broadcast","sell","buy","MinimumTradingLimit","MaxInRatio","MaxOutRatio","MinPoolLiquidity","MinTradingLimit","NativeAssetId"]]`);
3
+ var replaceTokens = (obj) => Object.fromEntries(
4
+ Object.entries(obj).map(([key, value]) => {
5
+ const unwrappedValue = typeof value === "object" ? replaceTokens(value) : value;
6
+ const numericKey = Number(key);
7
+ if (Number.isNaN(numericKey)) {
8
+ return [key, unwrappedValue];
9
+ }
10
+ return [tokens[numericKey], unwrappedValue];
11
+ })
12
+ );
13
+ var tokenizedCommonTrees = commonTrees.map(replaceTokens);
14
+ var unwrap = (obj, depth) => depth === 0 ? obj : Object.fromEntries(
15
+ Object.entries(obj).map(([key, value]) => [
16
+ key,
17
+ unwrap(
18
+ typeof value === "object" ? value : tokenizedCommonTrees[value],
19
+ depth - 1
20
+ )
21
+ ])
22
+ );
23
+ var getChainDescriptors = (key) => unwrap(replaceTokens(minified[key]), 2);
24
+ var Hydration = getChainDescriptors("hydration");
25
+ export {
26
+ Hydration
27
+ };