@gearbox-protocol/sdk 14.0.0-next.9 → 14.1.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/abi/kyc/iDSRegistryService.js +149 -0
- package/dist/cjs/abi/kyc/iDSToken.js +71 -0
- package/dist/cjs/abi/kyc/iKYCCompressor.js +196 -0
- package/dist/cjs/abi/kyc/iKYCFactory.js +122 -0
- package/dist/cjs/abi/kyc/iKYCUnderlying.js +401 -0
- package/dist/cjs/abi/kyc/iSecuritizeDegenNFT.js +326 -0
- package/dist/cjs/abi/kyc/iSecuritizeKYCFactory.js +319 -0
- package/dist/cjs/dev/AccountOpener.js +45 -5
- package/dist/cjs/rewards/rewards/extra-apy.js +1 -1
- package/dist/cjs/sdk/MultichainSDK.js +5 -0
- package/dist/cjs/sdk/OnchainSDK.js +55 -6
- package/dist/cjs/sdk/accounts/AbstractCreditAccountsService.js +335 -21
- package/dist/cjs/sdk/accounts/CreditAccountsServiceV310.js +7 -1
- package/dist/cjs/sdk/base/TokensMeta.js +22 -42
- package/dist/cjs/sdk/base/token-types.js +9 -0
- package/dist/cjs/sdk/chain/chains.js +18 -1
- package/dist/cjs/sdk/constants/address-provider.js +3 -0
- package/dist/cjs/sdk/market/MarketRegister.js +70 -116
- package/dist/cjs/sdk/market/MarketSuite.js +3 -0
- package/dist/cjs/sdk/market/index.js +2 -0
- package/dist/cjs/sdk/market/kyc/KYCRegistry.js +269 -0
- package/dist/cjs/sdk/market/kyc/index.js +26 -0
- package/dist/cjs/sdk/market/kyc/securitize/SecuritizeKYCFactory.js +242 -0
- package/dist/cjs/sdk/market/kyc/securitize/constants.js +28 -0
- package/dist/cjs/sdk/market/kyc/securitize/index.js +26 -0
- package/dist/cjs/sdk/market/kyc/securitize/types.js +16 -0
- package/dist/cjs/sdk/{accounts/utils.js → market/kyc/types.js} +11 -15
- package/dist/cjs/sdk/market/pool/PoolSuite.js +3 -0
- package/dist/cjs/sdk/market/pool/PoolV310Contract.js +11 -2
- package/dist/cjs/sdk/market/pool/index.js +2 -0
- package/dist/cjs/sdk/market/pricefeeds/PriceFeedsRegister.js +3 -3
- package/dist/cjs/sdk/options.js +6 -0
- package/dist/cjs/sdk/pools/PoolService.js +104 -12
- package/dist/cjs/sdk/utils/viem/executeDelegatedMulticalls.js +38 -0
- package/dist/cjs/sdk/utils/viem/index.js +2 -4
- package/dist/esm/abi/kyc/iDSRegistryService.js +125 -0
- package/dist/esm/abi/kyc/iDSToken.js +47 -0
- package/dist/esm/abi/kyc/iKYCCompressor.js +172 -0
- package/dist/esm/abi/kyc/iKYCFactory.js +98 -0
- package/dist/esm/abi/kyc/iKYCUnderlying.js +377 -0
- package/dist/esm/abi/kyc/iSecuritizeDegenNFT.js +302 -0
- package/dist/esm/abi/kyc/iSecuritizeKYCFactory.js +295 -0
- package/dist/esm/dev/AccountOpener.js +47 -6
- package/dist/esm/rewards/rewards/extra-apy.js +1 -1
- package/dist/esm/sdk/MultichainSDK.js +5 -0
- package/dist/esm/sdk/OnchainSDK.js +58 -7
- package/dist/esm/sdk/accounts/AbstractCreditAccountsService.js +336 -22
- package/dist/esm/sdk/accounts/CreditAccountsServiceV310.js +7 -1
- package/dist/esm/sdk/base/TokensMeta.js +22 -44
- package/dist/esm/sdk/base/token-types.js +6 -0
- package/dist/esm/sdk/chain/chains.js +18 -1
- package/dist/esm/sdk/constants/address-provider.js +2 -0
- package/dist/esm/sdk/market/MarketRegister.js +74 -118
- package/dist/esm/sdk/market/MarketSuite.js +3 -0
- package/dist/esm/sdk/market/index.js +1 -0
- package/dist/esm/sdk/market/kyc/KYCRegistry.js +253 -0
- package/dist/esm/sdk/market/kyc/index.js +3 -0
- package/dist/esm/sdk/market/kyc/securitize/SecuritizeKYCFactory.js +218 -0
- package/dist/esm/sdk/market/kyc/securitize/constants.js +4 -0
- package/dist/esm/sdk/market/kyc/securitize/index.js +3 -0
- package/dist/esm/sdk/market/kyc/securitize/types.js +0 -0
- package/dist/esm/sdk/market/kyc/types.js +9 -0
- package/dist/esm/sdk/market/pool/PoolSuite.js +3 -0
- package/dist/esm/sdk/market/pool/PoolV310Contract.js +11 -2
- package/dist/esm/sdk/market/pool/index.js +1 -0
- package/dist/esm/sdk/market/pricefeeds/PriceFeedsRegister.js +3 -3
- package/dist/esm/sdk/options.js +6 -0
- package/dist/esm/sdk/pools/PoolService.js +109 -13
- package/dist/esm/sdk/utils/viem/executeDelegatedMulticalls.js +14 -0
- package/dist/esm/sdk/utils/viem/index.js +1 -2
- package/dist/types/abi/kyc/iDSRegistryService.d.ts +191 -0
- package/dist/types/abi/kyc/iDSToken.d.ts +67 -0
- package/dist/types/abi/kyc/iKYCCompressor.d.ts +228 -0
- package/dist/types/abi/kyc/iKYCFactory.d.ts +139 -0
- package/dist/types/abi/kyc/iKYCUnderlying.d.ts +548 -0
- package/dist/types/abi/kyc/iSecuritizeDegenNFT.d.ts +404 -0
- package/dist/types/abi/kyc/iSecuritizeKYCFactory.d.ts +376 -0
- package/dist/types/sdk/OnchainSDK.d.ts +19 -1
- package/dist/types/sdk/accounts/AbstractCreditAccountsService.d.ts +59 -6
- package/dist/types/sdk/accounts/CreditAccountsServiceV310.d.ts +1 -1
- package/dist/types/sdk/accounts/types.d.ts +114 -14
- package/dist/types/sdk/base/TokensMeta.d.ts +14 -3
- package/dist/types/sdk/base/token-types.d.ts +44 -4
- package/dist/types/sdk/base/types.d.ts +116 -2
- package/dist/types/sdk/chain/chains.d.ts +5 -1
- package/dist/types/sdk/constants/address-provider.d.ts +1 -0
- package/dist/types/sdk/market/MarketRegister.d.ts +6 -9
- package/dist/types/sdk/market/MarketSuite.d.ts +2 -0
- package/dist/types/sdk/market/index.d.ts +1 -0
- package/dist/types/sdk/market/kyc/KYCRegistry.d.ts +52 -0
- package/dist/types/sdk/market/kyc/index.d.ts +3 -0
- package/dist/types/sdk/market/kyc/securitize/SecuritizeKYCFactory.d.ts +429 -0
- package/dist/types/sdk/market/kyc/securitize/constants.d.ts +1 -0
- package/dist/types/sdk/market/kyc/securitize/index.d.ts +3 -0
- package/dist/types/sdk/market/kyc/securitize/types.d.ts +136 -0
- package/dist/types/sdk/market/kyc/types.d.ts +171 -0
- package/dist/types/sdk/market/oracle/PriceOracleBaseContract.d.ts +3 -2
- package/dist/types/sdk/market/oracle/types.d.ts +3 -10
- package/dist/types/sdk/market/pool/PoolSuite.d.ts +2 -0
- package/dist/types/sdk/market/pool/PoolV310Contract.d.ts +6 -2
- package/dist/types/sdk/market/pool/index.d.ts +1 -0
- package/dist/types/sdk/market/pricefeeds/PriceFeedsRegister.d.ts +1 -1
- package/dist/types/sdk/market/types.d.ts +1 -1
- package/dist/types/sdk/options.d.ts +1 -0
- package/dist/types/sdk/pools/PoolService.d.ts +8 -8
- package/dist/types/sdk/pools/types.d.ts +1 -1
- package/dist/types/sdk/types/state-human.d.ts +2 -0
- package/dist/types/sdk/types/state.d.ts +5 -0
- package/dist/types/sdk/utils/viem/executeDelegatedMulticalls.d.ts +28 -0
- package/dist/types/sdk/utils/viem/index.d.ts +1 -2
- package/package.json +4 -4
- package/dist/cjs/sdk/utils/viem/getLogsPaginated.js +0 -62
- package/dist/cjs/sdk/utils/viem/getLogsSafe.js +0 -87
- package/dist/esm/sdk/accounts/utils.js +0 -14
- package/dist/esm/sdk/utils/viem/getLogsPaginated.js +0 -38
- package/dist/esm/sdk/utils/viem/getLogsSafe.js +0 -65
- package/dist/types/sdk/accounts/utils.d.ts +0 -2
- package/dist/types/sdk/utils/viem/getLogsPaginated.d.ts +0 -12
- package/dist/types/sdk/utils/viem/getLogsSafe.d.ts +0 -3
|
@@ -52,6 +52,7 @@ class AccountOpener extends import_sdk.SDKConstruct {
|
|
|
52
52
|
#minDebtMultiplier;
|
|
53
53
|
#allowMint;
|
|
54
54
|
#leverageDelta;
|
|
55
|
+
#poolService;
|
|
55
56
|
constructor(service, options_ = {}) {
|
|
56
57
|
super(service.sdk);
|
|
57
58
|
const {
|
|
@@ -77,6 +78,7 @@ class AccountOpener extends import_sdk.SDKConstruct {
|
|
|
77
78
|
this.#poolDepositMultiplier = BigInt(poolDepositMultiplier);
|
|
78
79
|
this.#minDebtMultiplier = BigInt(minDebtMultiplier);
|
|
79
80
|
this.#leverageDelta = BigInt(leverageDelta);
|
|
81
|
+
this.#poolService = new import_sdk.PoolService(service.sdk);
|
|
80
82
|
this.#logger?.info(
|
|
81
83
|
{
|
|
82
84
|
borrower: (0, import_accounts.privateKeyToAccount)(this.borrowerKey).address,
|
|
@@ -114,6 +116,10 @@ class AccountOpener extends import_sdk.SDKConstruct {
|
|
|
114
116
|
},
|
|
115
117
|
"opening credit accounts"
|
|
116
118
|
);
|
|
119
|
+
await Promise.all([
|
|
120
|
+
this.sdk.tokensMeta.loadTokenData(),
|
|
121
|
+
this.sdk.marketRegister.loadZappers()
|
|
122
|
+
]);
|
|
117
123
|
let deposits = [];
|
|
118
124
|
if (depositIntoPools) {
|
|
119
125
|
try {
|
|
@@ -465,9 +471,34 @@ class AccountOpener extends import_sdk.SDKConstruct {
|
|
|
465
471
|
this.#logger?.debug(
|
|
466
472
|
`depositor balance in underlying: ${this.sdk.tokensMeta.formatBN(pool.underlying, allowance, { symbol: true })}`
|
|
467
473
|
);
|
|
474
|
+
const tokensOut = this.#poolService.getDepositTokensOut(
|
|
475
|
+
address,
|
|
476
|
+
underlying
|
|
477
|
+
);
|
|
478
|
+
this.#logger?.debug(
|
|
479
|
+
{ tokensOut: tokensOut.map((t) => this.labelAddress(t)) },
|
|
480
|
+
"deposit tokens out"
|
|
481
|
+
);
|
|
482
|
+
if (tokensOut.length === 0) {
|
|
483
|
+
throw new Error(`no tokens out found for pool ${poolName}`);
|
|
484
|
+
}
|
|
485
|
+
const tokenOut = tokensOut[0];
|
|
486
|
+
const metadata = this.#poolService.getDepositMetadata(
|
|
487
|
+
address,
|
|
488
|
+
underlying,
|
|
489
|
+
tokenOut
|
|
490
|
+
);
|
|
491
|
+
this.logger?.debug(
|
|
492
|
+
{
|
|
493
|
+
underlying: this.labelAddress(underlying),
|
|
494
|
+
tokenOut: this.labelAddress(tokenOut),
|
|
495
|
+
...metadata
|
|
496
|
+
},
|
|
497
|
+
"pool deposit metadata"
|
|
498
|
+
);
|
|
468
499
|
txHash = await this.#anvil.writeContract({
|
|
469
500
|
account: depositor,
|
|
470
|
-
address:
|
|
501
|
+
address: metadata.approveTarget,
|
|
471
502
|
abi: import_iERC20.ierc20Abi,
|
|
472
503
|
functionName: "approve",
|
|
473
504
|
args: [address, allowance],
|
|
@@ -484,12 +515,21 @@ class AccountOpener extends import_sdk.SDKConstruct {
|
|
|
484
515
|
this.#logger?.debug(
|
|
485
516
|
`depositor approved underlying for pool ${poolName}: ${txHash}`
|
|
486
517
|
);
|
|
518
|
+
const depositCall = this.#poolService.addLiquidity({
|
|
519
|
+
collateral: { token: underlying, balance: amount },
|
|
520
|
+
pool: address,
|
|
521
|
+
wallet: depositor.address,
|
|
522
|
+
meta: metadata
|
|
523
|
+
});
|
|
524
|
+
if (!depositCall) {
|
|
525
|
+
throw new Error(`no deposit call could be created for ${poolName}`);
|
|
526
|
+
}
|
|
487
527
|
txHash = await this.#anvil.writeContract({
|
|
488
528
|
account: depositor,
|
|
489
|
-
address,
|
|
490
|
-
abi:
|
|
491
|
-
functionName:
|
|
492
|
-
args:
|
|
529
|
+
address: depositCall.target,
|
|
530
|
+
abi: depositCall.abi,
|
|
531
|
+
functionName: depositCall.functionName,
|
|
532
|
+
args: depositCall.args,
|
|
493
533
|
chain: this.#anvil.chain
|
|
494
534
|
});
|
|
495
535
|
receipt = await this.#anvil.waitForTransactionReceipt({ hash: txHash });
|
|
@@ -66,7 +66,7 @@ class PoolPointsAPI {
|
|
|
66
66
|
}
|
|
67
67
|
static async getTokenTotal(token, network, tokensList) {
|
|
68
68
|
const chainId = import_sdk.chains[network]?.id;
|
|
69
|
-
const url = `https://
|
|
69
|
+
const url = `https://api.gearbox.foundation/v1/getBalanceAt?asset=${token}&chainId=${chainId}`;
|
|
70
70
|
const result = await import_axios.default.get(url);
|
|
71
71
|
const balance = result.data.result.reduce(
|
|
72
72
|
(sum, r) => r.effective_balance + sum,
|
|
@@ -29,8 +29,10 @@ class MultichainSDK {
|
|
|
29
29
|
#chains;
|
|
30
30
|
#redstoneCache;
|
|
31
31
|
#pythCache;
|
|
32
|
+
#logger;
|
|
32
33
|
constructor(options) {
|
|
33
34
|
this.#chains = /* @__PURE__ */ new Map();
|
|
35
|
+
this.#logger = options.logger;
|
|
34
36
|
for (const [network, chainConfig] of Object.entries(options.chains)) {
|
|
35
37
|
const { gasLimit, ...clientOptions } = chainConfig;
|
|
36
38
|
let plugins;
|
|
@@ -92,6 +94,7 @@ class MultichainSDK {
|
|
|
92
94
|
});
|
|
93
95
|
})
|
|
94
96
|
);
|
|
97
|
+
this.#logger?.info("Attached all chains");
|
|
95
98
|
}
|
|
96
99
|
/**
|
|
97
100
|
* Hydrate all configured chains from serialised state.
|
|
@@ -142,6 +145,7 @@ class MultichainSDK {
|
|
|
142
145
|
}
|
|
143
146
|
});
|
|
144
147
|
}
|
|
148
|
+
this.#logger?.info("Hydrated all chains");
|
|
145
149
|
}
|
|
146
150
|
/**
|
|
147
151
|
* Returns the {@link OnchainSDK} for a given network or chain ID.
|
|
@@ -200,6 +204,7 @@ class MultichainSDK {
|
|
|
200
204
|
if (Object.keys(errors).length > 0) {
|
|
201
205
|
throw new import_core.SdkSyncFailedError(errors);
|
|
202
206
|
}
|
|
207
|
+
this.#logger?.info("Synced state for all chains");
|
|
203
208
|
}
|
|
204
209
|
/**
|
|
205
210
|
* Serialisable snapshot of all chains' state.
|
|
@@ -27,6 +27,7 @@ var import_base = require("./base/index.js");
|
|
|
27
27
|
var import_chain = require("./chain/index.js");
|
|
28
28
|
var import_constants = require("./constants/index.js");
|
|
29
29
|
var import_core = require("./core/index.js");
|
|
30
|
+
var import_market = require("./market/index.js");
|
|
30
31
|
var import_MarketRegister = require("./market/MarketRegister.js");
|
|
31
32
|
var import_pricefeeds = require("./market/pricefeeds/index.js");
|
|
32
33
|
var import_plugins = require("./plugins/index.js");
|
|
@@ -61,6 +62,7 @@ class OnchainSDK extends import_base.ChainContractsRegister {
|
|
|
61
62
|
#syncing = false;
|
|
62
63
|
#attached = false;
|
|
63
64
|
#addressProvider;
|
|
65
|
+
#kyc;
|
|
64
66
|
#marketRegister;
|
|
65
67
|
#priceFeeds;
|
|
66
68
|
/**
|
|
@@ -88,6 +90,7 @@ class OnchainSDK extends import_base.ChainContractsRegister {
|
|
|
88
90
|
super(client, options?.logger);
|
|
89
91
|
this.strictContractTypes = options?.strictContractTypes ?? false;
|
|
90
92
|
this.plugins = options?.plugins ?? {};
|
|
93
|
+
this.#kyc = new import_market.KYCRegistry(this);
|
|
91
94
|
for (const plugin of Object.values(this.plugins)) {
|
|
92
95
|
plugin.sdk = this;
|
|
93
96
|
}
|
|
@@ -117,6 +120,7 @@ class OnchainSDK extends import_base.ChainContractsRegister {
|
|
|
117
120
|
const marketConfigurators = mcs ?? import_utils.TypedObjectUtils.keys(
|
|
118
121
|
this.client.chain.defaultMarketConfigurators
|
|
119
122
|
);
|
|
123
|
+
const kycFactories = options?.kycFactories ?? this.client.chain.kycFactories;
|
|
120
124
|
this.logger?.info(
|
|
121
125
|
{
|
|
122
126
|
networkType: this.networkType,
|
|
@@ -154,10 +158,33 @@ class OnchainSDK extends import_base.ChainContractsRegister {
|
|
|
154
158
|
);
|
|
155
159
|
await this.#addressProvider.syncState(this.currentBlock);
|
|
156
160
|
this.#marketRegister = new import_MarketRegister.MarketRegister(this, ignoreMarkets);
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
+
if (!marketConfigurators.length) {
|
|
162
|
+
this.logger?.warn(
|
|
163
|
+
"no market configurators provided, skipping market loading"
|
|
164
|
+
);
|
|
165
|
+
} else {
|
|
166
|
+
const delegated = [
|
|
167
|
+
...this.#marketRegister.getLoadMulticalls(marketConfigurators),
|
|
168
|
+
...this.#kyc.getLoadMulticalls(marketConfigurators, kycFactories)
|
|
169
|
+
];
|
|
170
|
+
let txs = [];
|
|
171
|
+
if (!ignoreUpdateablePrices) {
|
|
172
|
+
const updatables = await this.#priceFeeds.getPartialUpdatablePriceFeeds(
|
|
173
|
+
marketConfigurators
|
|
174
|
+
);
|
|
175
|
+
const updates = await this.#priceFeeds.generatePriceFeedsUpdateTxs(updatables);
|
|
176
|
+
txs = updates.txs;
|
|
177
|
+
}
|
|
178
|
+
this.logger?.debug(
|
|
179
|
+
{ configurators: marketConfigurators },
|
|
180
|
+
`calling getMarkets with ${txs.length} price updates in block ${this.currentBlock}`
|
|
181
|
+
);
|
|
182
|
+
await (0, import_viem2.executeDelegatedMulticalls)(this.client, delegated, {
|
|
183
|
+
priceUpdates: txs,
|
|
184
|
+
blockNumber: this.currentBlock,
|
|
185
|
+
gas: this.gasLimit
|
|
186
|
+
});
|
|
187
|
+
}
|
|
161
188
|
const pluginsList = import_utils.TypedObjectUtils.entries(this.plugins);
|
|
162
189
|
const pluginResponse = await Promise.allSettled(
|
|
163
190
|
pluginsList.map(([name, plugin]) => {
|
|
@@ -210,6 +237,8 @@ class OnchainSDK extends import_base.ChainContractsRegister {
|
|
|
210
237
|
);
|
|
211
238
|
this.#marketRegister = new import_MarketRegister.MarketRegister(this, ignoreMarkets);
|
|
212
239
|
this.#marketRegister.hydrate(state.markets);
|
|
240
|
+
this.#kyc = new import_market.KYCRegistry(this);
|
|
241
|
+
this.#kyc.setState(state.kyc);
|
|
213
242
|
for (const [name, plugin] of import_utils.TypedObjectUtils.entries(this.plugins)) {
|
|
214
243
|
const pluginState = state.plugins[name];
|
|
215
244
|
if (plugin.hydrate && pluginState) {
|
|
@@ -253,6 +282,7 @@ class OnchainSDK extends import_base.ChainContractsRegister {
|
|
|
253
282
|
addressProviderV3: this.addressProvider.stateHuman(raw)
|
|
254
283
|
},
|
|
255
284
|
tokens: this.tokensMeta.values(),
|
|
285
|
+
kyc: this.#kyc.stateHuman(raw),
|
|
256
286
|
plugins: Object.fromEntries(
|
|
257
287
|
import_utils.TypedObjectUtils.entries(this.plugins).map(([name, plugin]) => [
|
|
258
288
|
name,
|
|
@@ -272,6 +302,7 @@ class OnchainSDK extends import_base.ChainContractsRegister {
|
|
|
272
302
|
timestamp: this.timestamp,
|
|
273
303
|
addressProvider: this.addressProvider.state,
|
|
274
304
|
markets: this.marketRegister.state,
|
|
305
|
+
kyc: this.#kyc.state,
|
|
275
306
|
plugins: Object.fromEntries(
|
|
276
307
|
import_utils.TypedObjectUtils.entries(this.plugins).map(([name, plugin]) => [
|
|
277
308
|
name,
|
|
@@ -326,7 +357,7 @@ class OnchainSDK extends import_base.ChainContractsRegister {
|
|
|
326
357
|
this.logger?.debug(
|
|
327
358
|
`getting logs from ${watchAddresses.length} addresses in [${fromBlock}:${blockNumber}]`
|
|
328
359
|
);
|
|
329
|
-
const logs = await
|
|
360
|
+
const logs = await this.client.getLogs({
|
|
330
361
|
fromBlock,
|
|
331
362
|
toBlock: blockNumber,
|
|
332
363
|
address: watchAddresses
|
|
@@ -439,9 +470,27 @@ class OnchainSDK extends import_base.ChainContractsRegister {
|
|
|
439
470
|
return this.#marketRegister;
|
|
440
471
|
}
|
|
441
472
|
/**
|
|
473
|
+
* KYC register for KYC-wrapped underlying tokens and factories.
|
|
474
|
+
*
|
|
475
|
+
* @throws If the SDK has not been attached or hydrated yet.
|
|
476
|
+
**/
|
|
477
|
+
get kyc() {
|
|
478
|
+
if (this.#kyc === void 0) {
|
|
479
|
+
throw new import_core.SdkNotAttachedError();
|
|
480
|
+
}
|
|
481
|
+
return this.#kyc;
|
|
482
|
+
}
|
|
483
|
+
/**
|
|
484
|
+
* @internal
|
|
442
485
|
* Resolves the appropriate router contract for a given credit manager,
|
|
443
486
|
* credit facade, or explicit version range.
|
|
444
|
-
|
|
487
|
+
*
|
|
488
|
+
* @param params - Identifies the context: a credit manager address/state,
|
|
489
|
+
* a credit facade address/state, or a {@link VersionRange}.
|
|
490
|
+
* @returns The matching router contract instance.
|
|
491
|
+
* @throws If the credit facade version is unsupported or no router is
|
|
492
|
+
* registered for the resolved version range.
|
|
493
|
+
**/
|
|
445
494
|
routerFor(params) {
|
|
446
495
|
let routerRange;
|
|
447
496
|
if (Array.isArray(params)) {
|