@suilend/sdk 11.0.0 → 11.0.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/package.json +1 -1
- package/strategies.js +91 -50
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@suilend/sdk","version":"11.0.
|
|
1
|
+
{"name":"@suilend/sdk","version":"11.0.1","private":false,"description":"A TypeScript SDK for interacting with the Suilend program","author":"Suilend","license":"MIT","main":"./index.js","exports":{".":"./index.js","./client":"./client.js","./mmt":"./mmt.js","./strategies":"./strategies.js","./api/events":"./api/events.js","./api":"./api/index.js","./lib/constants":"./lib/constants.js","./lib":"./lib/index.js","./lib/initialize":"./lib/initialize.js","./lib/liquidityMining":"./lib/liquidityMining.js","./lib/proCompatible":"./lib/proCompatible.js","./lib/pyth":"./lib/pyth.js","./lib/strategyOwnerCap":"./lib/strategyOwnerCap.js","./lib/transactions":"./lib/transactions.js","./lib/types":"./lib/types.js","./margin":"./margin/index.js","./parsers/apiReserveAssetDataEvent":"./parsers/apiReserveAssetDataEvent.js","./parsers":"./parsers/index.js","./parsers/lendingMarket":"./parsers/lendingMarket.js","./parsers/obligation":"./parsers/obligation.js","./parsers/rateLimiter":"./parsers/rateLimiter.js","./parsers/reserve":"./parsers/reserve.js","./swap":"./swap/index.js","./swap/quote":"./swap/quote.js","./swap/transaction":"./swap/transaction.js","./utils/events":"./utils/events.js","./utils/feedId":"./utils/feedId.js","./utils":"./utils/index.js","./utils/obligation":"./utils/obligation.js","./utils/simulate":"./utils/simulate.js","./_generated/_framework/reified":"./_generated/_framework/reified.js","./_generated/_framework/util":"./_generated/_framework/util.js","./_generated/_framework/vector":"./_generated/_framework/vector.js","./_generated/suilend":"./_generated/suilend/index.js","./margin/margin/admin_cap":"./margin/margin/admin_cap.js","./margin/margin/market":"./margin/margin/market.js","./margin/margin/permissions":"./margin/margin/permissions.js","./margin/margin/position":"./margin/margin/position.js","./margin/margin/router":"./margin/margin/router.js","./margin/margin/version":"./margin/margin/version.js","./margin/utils":"./margin/utils/index.js","./_generated/suilend/cell/structs":"./_generated/suilend/cell/structs.js","./_generated/suilend/decimal/structs":"./_generated/suilend/decimal/structs.js","./_generated/suilend/lending-market/functions":"./_generated/suilend/lending-market/functions.js","./_generated/suilend/lending-market/structs":"./_generated/suilend/lending-market/structs.js","./_generated/suilend/lending-market-registry/functions":"./_generated/suilend/lending-market-registry/functions.js","./_generated/suilend/liquidity-mining/structs":"./_generated/suilend/liquidity-mining/structs.js","./_generated/suilend/obligation/structs":"./_generated/suilend/obligation/structs.js","./_generated/suilend/rate-limiter/functions":"./_generated/suilend/rate-limiter/functions.js","./_generated/suilend/rate-limiter/structs":"./_generated/suilend/rate-limiter/structs.js","./_generated/suilend/reserve/structs":"./_generated/suilend/reserve/structs.js","./_generated/suilend/reserve-config/functions":"./_generated/suilend/reserve-config/functions.js","./_generated/suilend/reserve-config/structs":"./_generated/suilend/reserve-config/structs.js","./_generated/_dependencies/source/0x1":"./_generated/_dependencies/source/0x1/index.js","./_generated/_dependencies/source/0x2":"./_generated/_dependencies/source/0x2/index.js","./_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e":"./_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/index.js","./margin/margin/deps/std/type_name":"./margin/margin/deps/std/type_name.js","./margin/margin/deps/sui/vec_set":"./margin/margin/deps/sui/vec_set.js","./margin/margin/deps/suilend/lending_market":"./margin/margin/deps/suilend/lending_market.js","./_generated/_dependencies/source/0x1/ascii/structs":"./_generated/_dependencies/source/0x1/ascii/structs.js","./_generated/_dependencies/source/0x1/option/structs":"./_generated/_dependencies/source/0x1/option/structs.js","./_generated/_dependencies/source/0x1/type-name/structs":"./_generated/_dependencies/source/0x1/type-name/structs.js","./_generated/_dependencies/source/0x2/bag/structs":"./_generated/_dependencies/source/0x2/bag/structs.js","./_generated/_dependencies/source/0x2/balance/structs":"./_generated/_dependencies/source/0x2/balance/structs.js","./_generated/_dependencies/source/0x2/object/structs":"./_generated/_dependencies/source/0x2/object/structs.js","./_generated/_dependencies/source/0x2/object-table/structs":"./_generated/_dependencies/source/0x2/object-table/structs.js","./_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-identifier/structs":"./_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-identifier/structs.js"},"types":"./index.d.ts","scripts":{"build":"rm -rf ./dist && tsc && node ./fix-esm-imports.js","typecheck":"tsc --noEmit && tsc --noEmit -p tsconfig.test.json","test":"vitest run","lint:ci":"yarn run typecheck","prettier":"prettier --write src/ tests/","release":"yarn run build && node ./release.js && cd ./dist && npm publish --access public"},"repository":{"type":"git","url":"git+https://github.com/fireflyprotocol/lending-mono.git","directory":"ts/sdks/sdk"},"dependencies":{"@bluefin-exchange/bluefin7k-aggregator-sdk":"^7.5.0","@cetusprotocol/aggregator-sdk":"^1.5.7","@flowx-finance/sdk":"^2.1.0","@pythnetwork/hermes-client":"3.1.0","@pythnetwork/pyth-sui-js":"4.0.0","@suilend/springsui-sdk":"^4.0.0","bignumber.js":"^11.1.5","bn.js":"^5.2.2","crypto-js":"^4.2.0","lodash":"^4.17.21","p-limit":"7.3.1","uuid":"^14.0.1"},"devDependencies":{"@mysten/bcs":"^2.0.5","@mysten/sui":"2.23.2","@suilend/sui-core":"^1.0.0","@tsconfig/recommended":"^1.0.8","@types/bn.js":"^5.2.0","@types/lodash":"^4.17.25","@types/node":"^26.2.0","fast-check":"^4.9.0","prettier":"^3.3.3","ts-node":"^10.9.2","typescript":"^6.0.3","vitest":"4.1.10"},"peerDependencies":{"@mysten/bcs":"^2.0.5","@mysten/sui":">=2.22.1 <3","@suilend/sui-core":"^1.0.0"},"type":"module"}
|
package/strategies.js
CHANGED
|
@@ -2460,6 +2460,11 @@ lstMap, strategyType, suiGrpcClient, suilendClient, cetusSdk, cetusPartnerId, _a
|
|
|
2460
2460
|
let borrowedAmount = _borrowedAmount;
|
|
2461
2461
|
// 1) Flash loan base
|
|
2462
2462
|
const flashLoanObj = STRATEGY_TYPE_FLASH_LOAN_OBJ_MAP[strategyType];
|
|
2463
|
+
const flashLoanCoinType = flashLoanObj.borrowA
|
|
2464
|
+
? flashLoanObj.coinTypeA
|
|
2465
|
+
: flashLoanObj.coinTypeB;
|
|
2466
|
+
const flashLoanCoinReserve = reserveMap[flashLoanCoinType] ?? depositReserves.base;
|
|
2467
|
+
const needsFlashLoanCoinSwap = flashLoanCoinType !== depositReserves.base.coinType;
|
|
2463
2468
|
let borrowedBalanceA, borrowedBalanceB, receipt;
|
|
2464
2469
|
if (flashLoanObj.provider === StrategyFlashLoanProvider.MMT) {
|
|
2465
2470
|
[borrowedBalanceA, borrowedBalanceB, receipt] = transaction.moveCall({
|
|
@@ -2469,14 +2474,14 @@ lstMap, strategyType, suiGrpcClient, suilendClient, cetusSdk, cetusPartnerId, _a
|
|
|
2469
2474
|
transaction.object(flashLoanObj.poolId),
|
|
2470
2475
|
transaction.pure.u64(flashLoanObj.borrowA
|
|
2471
2476
|
? flashLoanBorrowedAmount
|
|
2472
|
-
.times(10 **
|
|
2477
|
+
.times(10 ** flashLoanCoinReserve.token.decimals)
|
|
2473
2478
|
.integerValue(BigNumber.ROUND_DOWN)
|
|
2474
2479
|
.toString()
|
|
2475
2480
|
: 0),
|
|
2476
2481
|
transaction.pure.u64(flashLoanObj.borrowA
|
|
2477
2482
|
? 0
|
|
2478
2483
|
: flashLoanBorrowedAmount
|
|
2479
|
-
.times(10 **
|
|
2484
|
+
.times(10 ** flashLoanCoinReserve.token.decimals)
|
|
2480
2485
|
.integerValue(BigNumber.ROUND_DOWN)
|
|
2481
2486
|
.toString()),
|
|
2482
2487
|
transaction.object(MMT_VERSION_OBJECT_ID),
|
|
@@ -2495,42 +2500,44 @@ lstMap, strategyType, suiGrpcClient, suilendClient, cetusSdk, cetusPartnerId, _a
|
|
|
2495
2500
|
});
|
|
2496
2501
|
// 2) Swap flash loaned base for borrow
|
|
2497
2502
|
// 2.1) Get routers
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2503
|
+
let swapCoin = flashLoanBorrowedCoin;
|
|
2504
|
+
if (flashLoanCoinType !== borrowReserve.coinType) {
|
|
2505
|
+
const routers = await cetusSdk.findRouters({
|
|
2506
|
+
from: flashLoanCoinType,
|
|
2507
|
+
target: borrowReserve.coinType,
|
|
2508
|
+
amount: new BN(flashLoanBorrowedAmount
|
|
2509
|
+
.times(10 ** flashLoanCoinReserve.token.decimals)
|
|
2510
|
+
.integerValue(BigNumber.ROUND_DOWN)
|
|
2511
|
+
.toString()),
|
|
2512
|
+
byAmountIn: true,
|
|
2513
|
+
});
|
|
2514
|
+
if (!routers)
|
|
2515
|
+
throw new Error("No swap quote found");
|
|
2516
|
+
console.log(`[strategyAdjustRepay] swap_flash_loan_base_for_borrows.get_routers`, {
|
|
2517
|
+
routers,
|
|
2518
|
+
amountIn: new BigNumber(routers.amountIn.toString())
|
|
2519
|
+
.div(10 ** flashLoanCoinReserve.token.decimals)
|
|
2520
|
+
.decimalPlaces(flashLoanCoinReserve.token.decimals, BigNumber.ROUND_DOWN)
|
|
2521
|
+
.toFixed(20),
|
|
2522
|
+
amountOut: new BigNumber(routers.amountOut.toString())
|
|
2523
|
+
.div(10 ** borrowReserve.token.decimals)
|
|
2524
|
+
.decimalPlaces(borrowReserve.token.decimals, BigNumber.ROUND_DOWN)
|
|
2525
|
+
.toFixed(20),
|
|
2526
|
+
});
|
|
2527
|
+
// 2.2) Swap
|
|
2528
|
+
const { slippagePercent: adjustRepaySlippagePercent } = resolveSwapSlippage(new BigNumber(routers.amountIn.toString()).div(10 ** flashLoanCoinReserve.token.decimals), new BigNumber(routers.amountOut.toString()).div(10 ** borrowReserve.token.decimals), flashLoanCoinReserve, borrowReserve);
|
|
2529
|
+
try {
|
|
2530
|
+
swapCoin = (await cetusSdk.fixableRouterSwapV3({
|
|
2531
|
+
router: routers,
|
|
2532
|
+
inputCoin: flashLoanBorrowedCoin,
|
|
2533
|
+
slippage: adjustRepaySlippagePercent / 100,
|
|
2534
|
+
txb: transaction,
|
|
2535
|
+
partner: cetusPartnerId,
|
|
2536
|
+
}));
|
|
2537
|
+
}
|
|
2538
|
+
catch (err) {
|
|
2539
|
+
throw new Error("No swap quote found");
|
|
2540
|
+
}
|
|
2534
2541
|
}
|
|
2535
2542
|
// 3) Fully repay borrows
|
|
2536
2543
|
// 3.1) Repay
|
|
@@ -2556,10 +2563,14 @@ lstMap, strategyType, suiGrpcClient, suilendClient, cetusSdk, cetusPartnerId, _a
|
|
|
2556
2563
|
const flashLoanRepayAmount = new BigNumber(bcs
|
|
2557
2564
|
.u64()
|
|
2558
2565
|
.parse(dryRunResults.commandResults?.[receiptDebts.Result]?.returnValues?.[flashLoanObj.borrowA ? 0 : 1]?.bcs ?? new Uint8Array([0])))
|
|
2559
|
-
.div(10 **
|
|
2560
|
-
.decimalPlaces(
|
|
2566
|
+
.div(10 ** flashLoanCoinReserve.token.decimals)
|
|
2567
|
+
.decimalPlaces(flashLoanCoinReserve.token.decimals, BigNumber.ROUND_UP);
|
|
2561
2568
|
// 5.1) Withdraw base + fee
|
|
2562
|
-
|
|
2569
|
+
let withdrawnAmount = flashLoanRepayAmount;
|
|
2570
|
+
if (needsFlashLoanCoinSwap)
|
|
2571
|
+
withdrawnAmount = flashLoanRepayAmount
|
|
2572
|
+
.times(1.01) // Buffer for swap slippage
|
|
2573
|
+
.decimalPlaces(depositReserves.base.token.decimals, BigNumber.ROUND_UP);
|
|
2563
2574
|
const { deposits: newDeposits2, borrowedAmount: newBorrowedAmount2, transaction: newTransaction2, withdrawnCoin, } = await strategyWithdrawTx(reserveMap, lstMap, strategyType, suiGrpcClient, suilendClient, cetusSdk, cetusPartnerId, _address, strategyOwnerCapId, obligationId, deposits, borrowedAmount, {
|
|
2564
2575
|
coinType: depositReserves.base.coinType,
|
|
2565
2576
|
withdrawnAmount,
|
|
@@ -2571,7 +2582,34 @@ lstMap, strategyType, suiGrpcClient, suilendClient, cetusSdk, cetusPartnerId, _a
|
|
|
2571
2582
|
borrowedAmount = newBorrowedAmount2;
|
|
2572
2583
|
transaction = newTransaction2;
|
|
2573
2584
|
// 5.3) Repay flash loan
|
|
2574
|
-
|
|
2585
|
+
let flashLoanRepayCoin = withdrawnCoin;
|
|
2586
|
+
if (needsFlashLoanCoinSwap) {
|
|
2587
|
+
const repayRouters = await cetusSdk.findRouters({
|
|
2588
|
+
from: depositReserves.base.coinType,
|
|
2589
|
+
target: flashLoanCoinType,
|
|
2590
|
+
amount: new BN(withdrawnAmount
|
|
2591
|
+
.times(10 ** depositReserves.base.token.decimals)
|
|
2592
|
+
.integerValue(BigNumber.ROUND_DOWN)
|
|
2593
|
+
.toString()),
|
|
2594
|
+
byAmountIn: true,
|
|
2595
|
+
splitCount: 0,
|
|
2596
|
+
});
|
|
2597
|
+
if (!repayRouters)
|
|
2598
|
+
throw new Error("No swap quote found");
|
|
2599
|
+
const { slippagePercent: repayLegSlippagePercent } = resolveSwapSlippage(new BigNumber(repayRouters.amountIn.toString()).div(10 ** depositReserves.base.token.decimals), new BigNumber(repayRouters.amountOut.toString()).div(10 ** flashLoanCoinReserve.token.decimals), depositReserves.base, flashLoanCoinReserve);
|
|
2600
|
+
try {
|
|
2601
|
+
flashLoanRepayCoin = (await cetusSdk.fixableRouterSwapV3({
|
|
2602
|
+
router: repayRouters,
|
|
2603
|
+
inputCoin: flashLoanRepayCoin,
|
|
2604
|
+
slippage: repayLegSlippagePercent / 100,
|
|
2605
|
+
txb: transaction,
|
|
2606
|
+
partner: cetusPartnerId,
|
|
2607
|
+
}));
|
|
2608
|
+
}
|
|
2609
|
+
catch (err) {
|
|
2610
|
+
throw new Error("No swap quote found");
|
|
2611
|
+
}
|
|
2612
|
+
}
|
|
2575
2613
|
const flashLoanRepayBalance = transaction.moveCall({
|
|
2576
2614
|
target: "0x2::coin::into_balance",
|
|
2577
2615
|
typeArguments: [
|
|
@@ -2622,6 +2660,7 @@ lstMap, strategyType, suiGrpcClient, suilendClient, cetusSdk, cetusPartnerId, _a
|
|
|
2622
2660
|
flashLoanBorrowedAmount: flashLoanBorrowedAmount.toFixed(20),
|
|
2623
2661
|
}, null, 2));
|
|
2624
2662
|
const depositReserve = (depositReserves.base ?? depositReserves.lst); // Must have LST if no base
|
|
2663
|
+
const isLstDepositReserve = !depositReserves.base;
|
|
2625
2664
|
//
|
|
2626
2665
|
let deposits = cloneDeep(_deposits);
|
|
2627
2666
|
let borrowedAmount = _borrowedAmount;
|
|
@@ -2631,8 +2670,10 @@ lstMap, strategyType, suiGrpcClient, suilendClient, cetusSdk, cetusPartnerId, _a
|
|
|
2631
2670
|
? flashLoanObj.coinTypeA
|
|
2632
2671
|
: flashLoanObj.coinTypeB;
|
|
2633
2672
|
const flashLoanCoinReserve = reserveMap[flashLoanCoinType] ?? depositReserve;
|
|
2634
|
-
|
|
2635
|
-
|
|
2673
|
+
if (isLstDepositReserve && !isSui(flashLoanCoinType))
|
|
2674
|
+
throw new Error(`Cannot mint ${depositReserve.token.symbol} from flash-loaned ${flashLoanCoinReserve.token.symbol}`);
|
|
2675
|
+
const needsFlashLoanCoinSwap = !isLstDepositReserve && flashLoanCoinType !== depositReserve.coinType;
|
|
2676
|
+
if (isLstDepositReserve) {
|
|
2636
2677
|
// TODO: Account for LST mint fees
|
|
2637
2678
|
flashLoanBorrowedAmount = flashLoanBorrowedAmount
|
|
2638
2679
|
.times(lst?.lstToSuiExchangeRate ?? 1)
|
|
@@ -2654,7 +2695,7 @@ lstMap, strategyType, suiGrpcClient, suilendClient, cetusSdk, cetusPartnerId, _a
|
|
|
2654
2695
|
transaction.pure.u64(flashLoanObj.borrowA
|
|
2655
2696
|
? flashLoanBorrowAmountForLoan
|
|
2656
2697
|
.times(10 **
|
|
2657
|
-
(
|
|
2698
|
+
(isLstDepositReserve
|
|
2658
2699
|
? SUI_DECIMALS
|
|
2659
2700
|
: depositReserve.token.decimals))
|
|
2660
2701
|
.integerValue(BigNumber.ROUND_DOWN)
|
|
@@ -2664,7 +2705,7 @@ lstMap, strategyType, suiGrpcClient, suilendClient, cetusSdk, cetusPartnerId, _a
|
|
|
2664
2705
|
? 0
|
|
2665
2706
|
: flashLoanBorrowAmountForLoan
|
|
2666
2707
|
.times(10 **
|
|
2667
|
-
(
|
|
2708
|
+
(isLstDepositReserve
|
|
2668
2709
|
? SUI_DECIMALS
|
|
2669
2710
|
: flashLoanCoinReserve.token.decimals))
|
|
2670
2711
|
.integerValue(BigNumber.ROUND_DOWN)
|
|
@@ -2679,7 +2720,7 @@ lstMap, strategyType, suiGrpcClient, suilendClient, cetusSdk, cetusPartnerId, _a
|
|
|
2679
2720
|
// 2) Deposit additional (to get back up to 100% health, so the user can then unloop back down to the max leverage shown in the UI)
|
|
2680
2721
|
// 2.1) Deposit
|
|
2681
2722
|
let depositedAmount = flashLoanBorrowedAmount;
|
|
2682
|
-
if (
|
|
2723
|
+
if (isLstDepositReserve)
|
|
2683
2724
|
depositedAmount = new BigNumber(depositedAmount.minus(getStrategyLstMintFee(lstMap, depositReserve.coinType, depositedAmount)))
|
|
2684
2725
|
.times(lst?.suiToLstExchangeRate ?? 1)
|
|
2685
2726
|
.decimalPlaces(depositReserve.token.decimals, BigNumber.ROUND_DOWN);
|
|
@@ -2690,7 +2731,7 @@ lstMap, strategyType, suiGrpcClient, suilendClient, cetusSdk, cetusPartnerId, _a
|
|
|
2690
2731
|
],
|
|
2691
2732
|
arguments: [flashLoanObj.borrowA ? borrowedBalanceA : borrowedBalanceB],
|
|
2692
2733
|
});
|
|
2693
|
-
if (
|
|
2734
|
+
if (isLstDepositReserve)
|
|
2694
2735
|
flashLoanBorrowedCoin = lst.client.mint(transaction, flashLoanBorrowedCoin);
|
|
2695
2736
|
if (needsFlashLoanCoinSwap) {
|
|
2696
2737
|
const depositRouters = await cetusSdk.findRouters({
|
|
@@ -2752,7 +2793,7 @@ lstMap, strategyType, suiGrpcClient, suilendClient, cetusSdk, cetusPartnerId, _a
|
|
|
2752
2793
|
withdrawnAmount = flashLoanRepayAmount
|
|
2753
2794
|
.times(1.01) // Buffer for swap slippage
|
|
2754
2795
|
.decimalPlaces(depositReserve.token.decimals, BigNumber.ROUND_UP);
|
|
2755
|
-
else if (
|
|
2796
|
+
else if (isLstDepositReserve)
|
|
2756
2797
|
withdrawnAmount = withdrawnAmount
|
|
2757
2798
|
.div(1 - +(lst?.redeemFeePercent ?? 0) / 100) // Potential rounding issue (max 1 MIST)
|
|
2758
2799
|
.decimalPlaces(depositReserve.token.decimals, BigNumber.ROUND_UP);
|
|
@@ -2768,7 +2809,7 @@ lstMap, strategyType, suiGrpcClient, suilendClient, cetusSdk, cetusPartnerId, _a
|
|
|
2768
2809
|
transaction = newTransaction2;
|
|
2769
2810
|
// 4.3) Repay flash loan
|
|
2770
2811
|
let flashLoanRepayCoin = withdrawnCoin;
|
|
2771
|
-
if (
|
|
2812
|
+
if (isLstDepositReserve)
|
|
2772
2813
|
flashLoanRepayCoin = lst.client.redeem(transaction, flashLoanRepayCoin);
|
|
2773
2814
|
if (needsFlashLoanCoinSwap) {
|
|
2774
2815
|
const repayRouters = await cetusSdk.findRouters({
|