@suilend/sdk 12.7.0 → 13.0.0-next.g803bba0

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.
Files changed (84) hide show
  1. package/_generated/_dependencies/pyth-2/price-identifier/structs.d.ts +46 -0
  2. package/_generated/_dependencies/{source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e → pyth-2}/price-identifier/structs.js +45 -25
  3. package/_generated/_dependencies/std/ascii/structs.d.ts +100 -0
  4. package/_generated/_dependencies/{source/0x1 → std}/ascii/structs.js +153 -103
  5. package/_generated/_dependencies/{source/0x1 → std}/option/structs.d.ts +29 -21
  6. package/_generated/_dependencies/std/option/structs.js +155 -0
  7. package/_generated/_dependencies/std/type-name/structs.d.ts +65 -0
  8. package/_generated/_dependencies/{source/0x1 → std}/type-name/structs.js +49 -22
  9. package/_generated/_dependencies/sui/bag/structs.d.ts +75 -0
  10. package/_generated/_dependencies/sui/bag/structs.js +154 -0
  11. package/_generated/_dependencies/{source/0x2 → sui}/balance/structs.d.ts +80 -60
  12. package/_generated/_dependencies/sui/balance/structs.js +306 -0
  13. package/_generated/_dependencies/sui/object/structs.d.ts +104 -0
  14. package/_generated/_dependencies/{source/0x2 → sui}/object/structs.js +98 -46
  15. package/_generated/_dependencies/{source/0x2 → sui}/object-table/structs.d.ts +37 -30
  16. package/_generated/_dependencies/sui/object-table/structs.js +164 -0
  17. package/_generated/_envs/index.d.ts +3 -0
  18. package/_generated/_envs/index.js +18 -0
  19. package/_generated/_envs/mainnet.d.ts +2 -0
  20. package/_generated/_envs/mainnet.js +490 -0
  21. package/_generated/_framework/env.d.ts +137 -0
  22. package/_generated/_framework/env.js +261 -0
  23. package/_generated/_framework/reified.d.ts +68 -36
  24. package/_generated/_framework/reified.js +110 -98
  25. package/_generated/_framework/util.d.ts +4 -4
  26. package/_generated/_framework/util.js +82 -79
  27. package/_generated/_framework/vector.d.ts +11 -9
  28. package/_generated/_framework/vector.js +10 -10
  29. package/_generated/suilend/cell/structs.d.ts +24 -22
  30. package/_generated/suilend/cell/structs.js +68 -24
  31. package/_generated/suilend/decimal/structs.d.ts +28 -24
  32. package/_generated/suilend/decimal/structs.js +45 -24
  33. package/_generated/suilend/index.d.ts +5 -6
  34. package/_generated/suilend/index.js +10 -19
  35. package/_generated/suilend/lending-market/functions.d.ts +1123 -149
  36. package/_generated/suilend/lending-market/functions.js +1121 -207
  37. package/_generated/suilend/lending-market/structs.d.ts +985 -1290
  38. package/_generated/suilend/lending-market/structs.js +2482 -1282
  39. package/_generated/suilend/lending-market-registry/functions.d.ts +32 -3
  40. package/_generated/suilend/lending-market-registry/functions.js +30 -6
  41. package/_generated/suilend/liquidity-mining/structs.d.ts +200 -333
  42. package/_generated/suilend/liquidity-mining/structs.js +449 -319
  43. package/_generated/suilend/obligation/structs.d.ts +406 -918
  44. package/_generated/suilend/obligation/structs.js +786 -596
  45. package/_generated/suilend/rate-limiter/functions.d.ts +134 -15
  46. package/_generated/suilend/rate-limiter/functions.js +139 -21
  47. package/_generated/suilend/rate-limiter/structs.d.ts +72 -80
  48. package/_generated/suilend/rate-limiter/structs.js +98 -48
  49. package/_generated/suilend/reserve/structs.d.ts +611 -904
  50. package/_generated/suilend/reserve/structs.js +1528 -736
  51. package/_generated/suilend/reserve-config/functions.d.ts +718 -96
  52. package/_generated/suilend/reserve-config/functions.js +751 -157
  53. package/_generated/suilend/reserve-config/structs.d.ts +148 -163
  54. package/_generated/suilend/reserve-config/structs.js +260 -94
  55. package/client.d.ts +2 -2
  56. package/client.js +22 -39
  57. package/lib/initialize.d.ts +76 -76
  58. package/lib/initialize.js +10 -10
  59. package/lib/proCompatible.js +5 -5
  60. package/package.json +1 -1
  61. package/parsers/lendingMarket.d.ts +9 -9
  62. package/parsers/obligation.d.ts +14 -14
  63. package/parsers/obligation.js +4 -4
  64. package/parsers/rateLimiter.d.ts +1 -1
  65. package/parsers/reserve.d.ts +12 -12
  66. package/parsers/reserve.js +2 -2
  67. package/strategies.d.ts +14 -14
  68. package/utils/simulate.d.ts +1 -1
  69. package/utils/simulate.js +5 -5
  70. package/_generated/_dependencies/source/0x1/ascii/structs.d.ts +0 -84
  71. package/_generated/_dependencies/source/0x1/index.d.ts +0 -3
  72. package/_generated/_dependencies/source/0x1/index.js +0 -3
  73. package/_generated/_dependencies/source/0x1/option/structs.js +0 -110
  74. package/_generated/_dependencies/source/0x1/type-name/structs.d.ts +0 -47
  75. package/_generated/_dependencies/source/0x2/bag/structs.d.ts +0 -52
  76. package/_generated/_dependencies/source/0x2/bag/structs.js +0 -113
  77. package/_generated/_dependencies/source/0x2/balance/structs.js +0 -210
  78. package/_generated/_dependencies/source/0x2/index.d.ts +0 -3
  79. package/_generated/_dependencies/source/0x2/index.js +0 -3
  80. package/_generated/_dependencies/source/0x2/object/structs.d.ts +0 -82
  81. package/_generated/_dependencies/source/0x2/object-table/structs.js +0 -115
  82. package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/index.d.ts +0 -4
  83. package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/index.js +0 -4
  84. package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-identifier/structs.d.ts +0 -46
@@ -161,7 +161,7 @@ export declare const initializeSuilendAll: (suiGrpcClient: SuiGrpcClient, market
161
161
  version: bigint;
162
162
  reserves: {
163
163
  config: {
164
- $typeName: string;
164
+ $typeName: `${string}::reserve_config::ReserveConfig`;
165
165
  openLtvPct: number;
166
166
  closeLtvPct: number;
167
167
  maxCloseLtvPct: number;
@@ -178,14 +178,14 @@ export declare const initializeSuilendAll: (suiGrpcClient: SuiGrpcClient, market
178
178
  isolated: boolean;
179
179
  openAttributedBorrowLimitUsd: number;
180
180
  closeAttributedBorrowLimitUsd: number;
181
- additionalFields: import("../_generated/_dependencies/source/0x2/bag/structs").Bag;
181
+ additionalFields: import("../_generated/_dependencies/sui/bag/structs").Bag;
182
182
  interestRate: {
183
183
  id: string;
184
184
  utilPercent: BigNumber;
185
185
  aprPercent: BigNumber;
186
186
  }[];
187
187
  };
188
- $typeName: string;
188
+ $typeName: `${string}::reserve::Reserve`;
189
189
  id: string;
190
190
  arrayIndex: bigint;
191
191
  coinType: string;
@@ -204,11 +204,11 @@ export declare const initializeSuilendAll: (suiGrpcClient: SuiGrpcClient, market
204
204
  unclaimedSpreadFees: BigNumber;
205
205
  attributedBorrowValue: BigNumber;
206
206
  depositsPoolRewardManager: {
207
- $typeName: string;
207
+ $typeName: `${string}::liquidity_mining::PoolRewardManager`;
208
208
  id: string;
209
209
  totalShares: bigint;
210
210
  poolRewards: {
211
- $typeName: string;
211
+ $typeName: `${string}::liquidity_mining::PoolReward`;
212
212
  id: string;
213
213
  poolRewardManagerId: string;
214
214
  coinType: string;
@@ -225,11 +225,11 @@ export declare const initializeSuilendAll: (suiGrpcClient: SuiGrpcClient, market
225
225
  lastUpdateTimeMs: bigint;
226
226
  };
227
227
  borrowsPoolRewardManager: {
228
- $typeName: string;
228
+ $typeName: `${string}::liquidity_mining::PoolRewardManager`;
229
229
  id: string;
230
230
  totalShares: bigint;
231
231
  poolRewards: {
232
- $typeName: string;
232
+ $typeName: `${string}::liquidity_mining::PoolReward`;
233
233
  id: string;
234
234
  poolRewardManagerId: string;
235
235
  coinType: string;
@@ -268,13 +268,13 @@ export declare const initializeSuilendAll: (suiGrpcClient: SuiGrpcClient, market
268
268
  description: string;
269
269
  totalDeposits: BigNumber;
270
270
  }[];
271
- obligations: import("../_generated/_dependencies/source/0x2/object-table/structs").ObjectTable<"0x2::object::ID", `0x1f54a9a2d71799553197e9ea24557797c6398d6a65f2d4d3818c9304b75d5e21::obligation::Obligation<${string}>` | `0xf95b06141ed4a174f239417323bde3f209b972f5930d8521ea38a52aff3a6ddf::obligation::Obligation<${string}>`>;
271
+ obligations: import("../_generated/_dependencies/sui/object-table/structs").ObjectTable<"0x2::object::ID", `${string}::obligation::Obligation<${string}>`>;
272
272
  rateLimiter: {
273
273
  config: {
274
274
  windowDuration: bigint;
275
275
  maxOutflow: bigint;
276
276
  };
277
- $typeName: string;
277
+ $typeName: `${string}::rate_limiter::RateLimiter`;
278
278
  prevQty: bigint;
279
279
  windowStart: bigint;
280
280
  curQty: bigint;
@@ -301,7 +301,7 @@ export declare const initializeSuilendAll: (suiGrpcClient: SuiGrpcClient, market
301
301
  unpricedCoinTypes: string[];
302
302
  reserveMap: Record<string, {
303
303
  config: {
304
- $typeName: string;
304
+ $typeName: `${string}::reserve_config::ReserveConfig`;
305
305
  openLtvPct: number;
306
306
  closeLtvPct: number;
307
307
  maxCloseLtvPct: number;
@@ -318,14 +318,14 @@ export declare const initializeSuilendAll: (suiGrpcClient: SuiGrpcClient, market
318
318
  isolated: boolean;
319
319
  openAttributedBorrowLimitUsd: number;
320
320
  closeAttributedBorrowLimitUsd: number;
321
- additionalFields: import("../_generated/_dependencies/source/0x2/bag/structs").Bag;
321
+ additionalFields: import("../_generated/_dependencies/sui/bag/structs").Bag;
322
322
  interestRate: {
323
323
  id: string;
324
324
  utilPercent: BigNumber;
325
325
  aprPercent: BigNumber;
326
326
  }[];
327
327
  };
328
- $typeName: string;
328
+ $typeName: `${string}::reserve::Reserve`;
329
329
  id: string;
330
330
  arrayIndex: bigint;
331
331
  coinType: string;
@@ -344,11 +344,11 @@ export declare const initializeSuilendAll: (suiGrpcClient: SuiGrpcClient, market
344
344
  unclaimedSpreadFees: BigNumber;
345
345
  attributedBorrowValue: BigNumber;
346
346
  depositsPoolRewardManager: {
347
- $typeName: string;
347
+ $typeName: `${string}::liquidity_mining::PoolRewardManager`;
348
348
  id: string;
349
349
  totalShares: bigint;
350
350
  poolRewards: {
351
- $typeName: string;
351
+ $typeName: `${string}::liquidity_mining::PoolReward`;
352
352
  id: string;
353
353
  poolRewardManagerId: string;
354
354
  coinType: string;
@@ -365,11 +365,11 @@ export declare const initializeSuilendAll: (suiGrpcClient: SuiGrpcClient, market
365
365
  lastUpdateTimeMs: bigint;
366
366
  };
367
367
  borrowsPoolRewardManager: {
368
- $typeName: string;
368
+ $typeName: `${string}::liquidity_mining::PoolRewardManager`;
369
369
  id: string;
370
370
  totalShares: bigint;
371
371
  poolRewards: {
372
- $typeName: string;
372
+ $typeName: `${string}::liquidity_mining::PoolReward`;
373
373
  id: string;
374
374
  poolRewardManagerId: string;
375
375
  coinType: string;
@@ -420,7 +420,7 @@ export declare const initializeSuilendWithRewardsAll: (suiGrpcClient: SuiGrpcCli
420
420
  version: bigint;
421
421
  reserves: {
422
422
  config: {
423
- $typeName: string;
423
+ $typeName: `${string}::reserve_config::ReserveConfig`;
424
424
  openLtvPct: number;
425
425
  closeLtvPct: number;
426
426
  maxCloseLtvPct: number;
@@ -437,14 +437,14 @@ export declare const initializeSuilendWithRewardsAll: (suiGrpcClient: SuiGrpcCli
437
437
  isolated: boolean;
438
438
  openAttributedBorrowLimitUsd: number;
439
439
  closeAttributedBorrowLimitUsd: number;
440
- additionalFields: import("../_generated/_dependencies/source/0x2/bag/structs").Bag;
440
+ additionalFields: import("../_generated/_dependencies/sui/bag/structs").Bag;
441
441
  interestRate: {
442
442
  id: string;
443
443
  utilPercent: BigNumber;
444
444
  aprPercent: BigNumber;
445
445
  }[];
446
446
  };
447
- $typeName: string;
447
+ $typeName: `${string}::reserve::Reserve`;
448
448
  id: string;
449
449
  arrayIndex: bigint;
450
450
  coinType: string;
@@ -463,11 +463,11 @@ export declare const initializeSuilendWithRewardsAll: (suiGrpcClient: SuiGrpcCli
463
463
  unclaimedSpreadFees: BigNumber;
464
464
  attributedBorrowValue: BigNumber;
465
465
  depositsPoolRewardManager: {
466
- $typeName: string;
466
+ $typeName: `${string}::liquidity_mining::PoolRewardManager`;
467
467
  id: string;
468
468
  totalShares: bigint;
469
469
  poolRewards: {
470
- $typeName: string;
470
+ $typeName: `${string}::liquidity_mining::PoolReward`;
471
471
  id: string;
472
472
  poolRewardManagerId: string;
473
473
  coinType: string;
@@ -484,11 +484,11 @@ export declare const initializeSuilendWithRewardsAll: (suiGrpcClient: SuiGrpcCli
484
484
  lastUpdateTimeMs: bigint;
485
485
  };
486
486
  borrowsPoolRewardManager: {
487
- $typeName: string;
487
+ $typeName: `${string}::liquidity_mining::PoolRewardManager`;
488
488
  id: string;
489
489
  totalShares: bigint;
490
490
  poolRewards: {
491
- $typeName: string;
491
+ $typeName: `${string}::liquidity_mining::PoolReward`;
492
492
  id: string;
493
493
  poolRewardManagerId: string;
494
494
  coinType: string;
@@ -527,13 +527,13 @@ export declare const initializeSuilendWithRewardsAll: (suiGrpcClient: SuiGrpcCli
527
527
  description: string;
528
528
  totalDeposits: BigNumber;
529
529
  }[];
530
- obligations: import("../_generated/_dependencies/source/0x2/object-table/structs").ObjectTable<"0x2::object::ID", `0x1f54a9a2d71799553197e9ea24557797c6398d6a65f2d4d3818c9304b75d5e21::obligation::Obligation<${string}>` | `0xf95b06141ed4a174f239417323bde3f209b972f5930d8521ea38a52aff3a6ddf::obligation::Obligation<${string}>`>;
530
+ obligations: import("../_generated/_dependencies/sui/object-table/structs").ObjectTable<"0x2::object::ID", `${string}::obligation::Obligation<${string}>`>;
531
531
  rateLimiter: {
532
532
  config: {
533
533
  windowDuration: bigint;
534
534
  maxOutflow: bigint;
535
535
  };
536
- $typeName: string;
536
+ $typeName: `${string}::rate_limiter::RateLimiter`;
537
537
  prevQty: bigint;
538
538
  windowStart: bigint;
539
539
  curQty: bigint;
@@ -560,7 +560,7 @@ export declare const initializeSuilendWithRewardsAll: (suiGrpcClient: SuiGrpcCli
560
560
  unpricedCoinTypes: string[];
561
561
  reserveMap: Record<string, {
562
562
  config: {
563
- $typeName: string;
563
+ $typeName: `${string}::reserve_config::ReserveConfig`;
564
564
  openLtvPct: number;
565
565
  closeLtvPct: number;
566
566
  maxCloseLtvPct: number;
@@ -577,14 +577,14 @@ export declare const initializeSuilendWithRewardsAll: (suiGrpcClient: SuiGrpcCli
577
577
  isolated: boolean;
578
578
  openAttributedBorrowLimitUsd: number;
579
579
  closeAttributedBorrowLimitUsd: number;
580
- additionalFields: import("../_generated/_dependencies/source/0x2/bag/structs").Bag;
580
+ additionalFields: import("../_generated/_dependencies/sui/bag/structs").Bag;
581
581
  interestRate: {
582
582
  id: string;
583
583
  utilPercent: BigNumber;
584
584
  aprPercent: BigNumber;
585
585
  }[];
586
586
  };
587
- $typeName: string;
587
+ $typeName: `${string}::reserve::Reserve`;
588
588
  id: string;
589
589
  arrayIndex: bigint;
590
590
  coinType: string;
@@ -603,11 +603,11 @@ export declare const initializeSuilendWithRewardsAll: (suiGrpcClient: SuiGrpcCli
603
603
  unclaimedSpreadFees: BigNumber;
604
604
  attributedBorrowValue: BigNumber;
605
605
  depositsPoolRewardManager: {
606
- $typeName: string;
606
+ $typeName: `${string}::liquidity_mining::PoolRewardManager`;
607
607
  id: string;
608
608
  totalShares: bigint;
609
609
  poolRewards: {
610
- $typeName: string;
610
+ $typeName: `${string}::liquidity_mining::PoolReward`;
611
611
  id: string;
612
612
  poolRewardManagerId: string;
613
613
  coinType: string;
@@ -624,11 +624,11 @@ export declare const initializeSuilendWithRewardsAll: (suiGrpcClient: SuiGrpcCli
624
624
  lastUpdateTimeMs: bigint;
625
625
  };
626
626
  borrowsPoolRewardManager: {
627
- $typeName: string;
627
+ $typeName: `${string}::liquidity_mining::PoolRewardManager`;
628
628
  id: string;
629
629
  totalShares: bigint;
630
630
  poolRewards: {
631
- $typeName: string;
631
+ $typeName: `${string}::liquidity_mining::PoolReward`;
632
632
  id: string;
633
633
  poolRewardManagerId: string;
634
634
  coinType: string;
@@ -678,7 +678,7 @@ export declare const initializeSuilend: (suiGrpcClient: SuiGrpcClient, suilendCl
678
678
  version: bigint;
679
679
  reserves: {
680
680
  config: {
681
- $typeName: string;
681
+ $typeName: `${string}::reserve_config::ReserveConfig`;
682
682
  openLtvPct: number;
683
683
  closeLtvPct: number;
684
684
  maxCloseLtvPct: number;
@@ -695,14 +695,14 @@ export declare const initializeSuilend: (suiGrpcClient: SuiGrpcClient, suilendCl
695
695
  isolated: boolean;
696
696
  openAttributedBorrowLimitUsd: number;
697
697
  closeAttributedBorrowLimitUsd: number;
698
- additionalFields: import("../_generated/_dependencies/source/0x2/bag/structs").Bag;
698
+ additionalFields: import("../_generated/_dependencies/sui/bag/structs").Bag;
699
699
  interestRate: {
700
700
  id: string;
701
701
  utilPercent: BigNumber;
702
702
  aprPercent: BigNumber;
703
703
  }[];
704
704
  };
705
- $typeName: string;
705
+ $typeName: `${string}::reserve::Reserve`;
706
706
  id: string;
707
707
  arrayIndex: bigint;
708
708
  coinType: string;
@@ -721,11 +721,11 @@ export declare const initializeSuilend: (suiGrpcClient: SuiGrpcClient, suilendCl
721
721
  unclaimedSpreadFees: BigNumber;
722
722
  attributedBorrowValue: BigNumber;
723
723
  depositsPoolRewardManager: {
724
- $typeName: string;
724
+ $typeName: `${string}::liquidity_mining::PoolRewardManager`;
725
725
  id: string;
726
726
  totalShares: bigint;
727
727
  poolRewards: {
728
- $typeName: string;
728
+ $typeName: `${string}::liquidity_mining::PoolReward`;
729
729
  id: string;
730
730
  poolRewardManagerId: string;
731
731
  coinType: string;
@@ -742,11 +742,11 @@ export declare const initializeSuilend: (suiGrpcClient: SuiGrpcClient, suilendCl
742
742
  lastUpdateTimeMs: bigint;
743
743
  };
744
744
  borrowsPoolRewardManager: {
745
- $typeName: string;
745
+ $typeName: `${string}::liquidity_mining::PoolRewardManager`;
746
746
  id: string;
747
747
  totalShares: bigint;
748
748
  poolRewards: {
749
- $typeName: string;
749
+ $typeName: `${string}::liquidity_mining::PoolReward`;
750
750
  id: string;
751
751
  poolRewardManagerId: string;
752
752
  coinType: string;
@@ -785,13 +785,13 @@ export declare const initializeSuilend: (suiGrpcClient: SuiGrpcClient, suilendCl
785
785
  description: string;
786
786
  totalDeposits: BigNumber;
787
787
  }[];
788
- obligations: import("../_generated/_dependencies/source/0x2/object-table/structs").ObjectTable<"0x2::object::ID", `0x1f54a9a2d71799553197e9ea24557797c6398d6a65f2d4d3818c9304b75d5e21::obligation::Obligation<${string}>` | `0xf95b06141ed4a174f239417323bde3f209b972f5930d8521ea38a52aff3a6ddf::obligation::Obligation<${string}>`>;
788
+ obligations: import("../_generated/_dependencies/sui/object-table/structs").ObjectTable<"0x2::object::ID", `${string}::obligation::Obligation<${string}>`>;
789
789
  rateLimiter: {
790
790
  config: {
791
791
  windowDuration: bigint;
792
792
  maxOutflow: bigint;
793
793
  };
794
- $typeName: string;
794
+ $typeName: `${string}::rate_limiter::RateLimiter`;
795
795
  prevQty: bigint;
796
796
  windowStart: bigint;
797
797
  curQty: bigint;
@@ -818,7 +818,7 @@ export declare const initializeSuilend: (suiGrpcClient: SuiGrpcClient, suilendCl
818
818
  unpricedCoinTypes: string[];
819
819
  reserveMap: Record<string, {
820
820
  config: {
821
- $typeName: string;
821
+ $typeName: `${string}::reserve_config::ReserveConfig`;
822
822
  openLtvPct: number;
823
823
  closeLtvPct: number;
824
824
  maxCloseLtvPct: number;
@@ -835,14 +835,14 @@ export declare const initializeSuilend: (suiGrpcClient: SuiGrpcClient, suilendCl
835
835
  isolated: boolean;
836
836
  openAttributedBorrowLimitUsd: number;
837
837
  closeAttributedBorrowLimitUsd: number;
838
- additionalFields: import("../_generated/_dependencies/source/0x2/bag/structs").Bag;
838
+ additionalFields: import("../_generated/_dependencies/sui/bag/structs").Bag;
839
839
  interestRate: {
840
840
  id: string;
841
841
  utilPercent: BigNumber;
842
842
  aprPercent: BigNumber;
843
843
  }[];
844
844
  };
845
- $typeName: string;
845
+ $typeName: `${string}::reserve::Reserve`;
846
846
  id: string;
847
847
  arrayIndex: bigint;
848
848
  coinType: string;
@@ -861,11 +861,11 @@ export declare const initializeSuilend: (suiGrpcClient: SuiGrpcClient, suilendCl
861
861
  unclaimedSpreadFees: BigNumber;
862
862
  attributedBorrowValue: BigNumber;
863
863
  depositsPoolRewardManager: {
864
- $typeName: string;
864
+ $typeName: `${string}::liquidity_mining::PoolRewardManager`;
865
865
  id: string;
866
866
  totalShares: bigint;
867
867
  poolRewards: {
868
- $typeName: string;
868
+ $typeName: `${string}::liquidity_mining::PoolReward`;
869
869
  id: string;
870
870
  poolRewardManagerId: string;
871
871
  coinType: string;
@@ -882,11 +882,11 @@ export declare const initializeSuilend: (suiGrpcClient: SuiGrpcClient, suilendCl
882
882
  lastUpdateTimeMs: bigint;
883
883
  };
884
884
  borrowsPoolRewardManager: {
885
- $typeName: string;
885
+ $typeName: `${string}::liquidity_mining::PoolRewardManager`;
886
886
  id: string;
887
887
  totalShares: bigint;
888
888
  poolRewards: {
889
- $typeName: string;
889
+ $typeName: `${string}::liquidity_mining::PoolReward`;
890
890
  id: string;
891
891
  poolRewardManagerId: string;
892
892
  coinType: string;
@@ -965,7 +965,7 @@ export declare const initializeObligations: (suiGrpcClient: SuiGrpcClient, suile
965
965
  depositedCtokenAmount: BigNumber;
966
966
  reserve: {
967
967
  config: {
968
- $typeName: string;
968
+ $typeName: `${string}::reserve_config::ReserveConfig`;
969
969
  openLtvPct: number;
970
970
  closeLtvPct: number;
971
971
  maxCloseLtvPct: number;
@@ -982,14 +982,14 @@ export declare const initializeObligations: (suiGrpcClient: SuiGrpcClient, suile
982
982
  isolated: boolean;
983
983
  openAttributedBorrowLimitUsd: number;
984
984
  closeAttributedBorrowLimitUsd: number;
985
- additionalFields: import("../_generated/_dependencies/source/0x2/bag/structs").Bag;
985
+ additionalFields: import("../_generated/_dependencies/sui/bag/structs").Bag;
986
986
  interestRate: {
987
987
  id: string;
988
988
  utilPercent: BigNumber;
989
989
  aprPercent: BigNumber;
990
990
  }[];
991
991
  };
992
- $typeName: string;
992
+ $typeName: `${string}::reserve::Reserve`;
993
993
  id: string;
994
994
  arrayIndex: bigint;
995
995
  coinType: string;
@@ -1008,11 +1008,11 @@ export declare const initializeObligations: (suiGrpcClient: SuiGrpcClient, suile
1008
1008
  unclaimedSpreadFees: BigNumber;
1009
1009
  attributedBorrowValue: BigNumber;
1010
1010
  depositsPoolRewardManager: {
1011
- $typeName: string;
1011
+ $typeName: `${string}::liquidity_mining::PoolRewardManager`;
1012
1012
  id: string;
1013
1013
  totalShares: bigint;
1014
1014
  poolRewards: {
1015
- $typeName: string;
1015
+ $typeName: `${string}::liquidity_mining::PoolReward`;
1016
1016
  id: string;
1017
1017
  poolRewardManagerId: string;
1018
1018
  coinType: string;
@@ -1029,11 +1029,11 @@ export declare const initializeObligations: (suiGrpcClient: SuiGrpcClient, suile
1029
1029
  lastUpdateTimeMs: bigint;
1030
1030
  };
1031
1031
  borrowsPoolRewardManager: {
1032
- $typeName: string;
1032
+ $typeName: `${string}::liquidity_mining::PoolRewardManager`;
1033
1033
  id: string;
1034
1034
  totalShares: bigint;
1035
1035
  poolRewards: {
1036
- $typeName: string;
1036
+ $typeName: `${string}::liquidity_mining::PoolReward`;
1037
1037
  id: string;
1038
1038
  poolRewardManagerId: string;
1039
1039
  coinType: string;
@@ -1083,7 +1083,7 @@ export declare const initializeObligations: (suiGrpcClient: SuiGrpcClient, suile
1083
1083
  borrowedAmountUsd: BigNumber;
1084
1084
  reserve: {
1085
1085
  config: {
1086
- $typeName: string;
1086
+ $typeName: `${string}::reserve_config::ReserveConfig`;
1087
1087
  openLtvPct: number;
1088
1088
  closeLtvPct: number;
1089
1089
  maxCloseLtvPct: number;
@@ -1100,14 +1100,14 @@ export declare const initializeObligations: (suiGrpcClient: SuiGrpcClient, suile
1100
1100
  isolated: boolean;
1101
1101
  openAttributedBorrowLimitUsd: number;
1102
1102
  closeAttributedBorrowLimitUsd: number;
1103
- additionalFields: import("../_generated/_dependencies/source/0x2/bag/structs").Bag;
1103
+ additionalFields: import("../_generated/_dependencies/sui/bag/structs").Bag;
1104
1104
  interestRate: {
1105
1105
  id: string;
1106
1106
  utilPercent: BigNumber;
1107
1107
  aprPercent: BigNumber;
1108
1108
  }[];
1109
1109
  };
1110
- $typeName: string;
1110
+ $typeName: `${string}::reserve::Reserve`;
1111
1111
  id: string;
1112
1112
  arrayIndex: bigint;
1113
1113
  coinType: string;
@@ -1126,11 +1126,11 @@ export declare const initializeObligations: (suiGrpcClient: SuiGrpcClient, suile
1126
1126
  unclaimedSpreadFees: BigNumber;
1127
1127
  attributedBorrowValue: BigNumber;
1128
1128
  depositsPoolRewardManager: {
1129
- $typeName: string;
1129
+ $typeName: `${string}::liquidity_mining::PoolRewardManager`;
1130
1130
  id: string;
1131
1131
  totalShares: bigint;
1132
1132
  poolRewards: {
1133
- $typeName: string;
1133
+ $typeName: `${string}::liquidity_mining::PoolReward`;
1134
1134
  id: string;
1135
1135
  poolRewardManagerId: string;
1136
1136
  coinType: string;
@@ -1147,11 +1147,11 @@ export declare const initializeObligations: (suiGrpcClient: SuiGrpcClient, suile
1147
1147
  lastUpdateTimeMs: bigint;
1148
1148
  };
1149
1149
  borrowsPoolRewardManager: {
1150
- $typeName: string;
1150
+ $typeName: `${string}::liquidity_mining::PoolRewardManager`;
1151
1151
  id: string;
1152
1152
  totalShares: bigint;
1153
1153
  poolRewards: {
1154
- $typeName: string;
1154
+ $typeName: `${string}::liquidity_mining::PoolReward`;
1155
1155
  id: string;
1156
1156
  poolRewardManagerId: string;
1157
1157
  coinType: string;
@@ -1225,7 +1225,7 @@ export declare const initializeObligations: (suiGrpcClient: SuiGrpcClient, suile
1225
1225
  depositedCtokenAmount: BigNumber;
1226
1226
  reserve: {
1227
1227
  config: {
1228
- $typeName: string;
1228
+ $typeName: `${string}::reserve_config::ReserveConfig`;
1229
1229
  openLtvPct: number;
1230
1230
  closeLtvPct: number;
1231
1231
  maxCloseLtvPct: number;
@@ -1242,14 +1242,14 @@ export declare const initializeObligations: (suiGrpcClient: SuiGrpcClient, suile
1242
1242
  isolated: boolean;
1243
1243
  openAttributedBorrowLimitUsd: number;
1244
1244
  closeAttributedBorrowLimitUsd: number;
1245
- additionalFields: import("../_generated/_dependencies/source/0x2/bag/structs").Bag;
1245
+ additionalFields: import("../_generated/_dependencies/sui/bag/structs").Bag;
1246
1246
  interestRate: {
1247
1247
  id: string;
1248
1248
  utilPercent: BigNumber;
1249
1249
  aprPercent: BigNumber;
1250
1250
  }[];
1251
1251
  };
1252
- $typeName: string;
1252
+ $typeName: `${string}::reserve::Reserve`;
1253
1253
  id: string;
1254
1254
  arrayIndex: bigint;
1255
1255
  coinType: string;
@@ -1268,11 +1268,11 @@ export declare const initializeObligations: (suiGrpcClient: SuiGrpcClient, suile
1268
1268
  unclaimedSpreadFees: BigNumber;
1269
1269
  attributedBorrowValue: BigNumber;
1270
1270
  depositsPoolRewardManager: {
1271
- $typeName: string;
1271
+ $typeName: `${string}::liquidity_mining::PoolRewardManager`;
1272
1272
  id: string;
1273
1273
  totalShares: bigint;
1274
1274
  poolRewards: {
1275
- $typeName: string;
1275
+ $typeName: `${string}::liquidity_mining::PoolReward`;
1276
1276
  id: string;
1277
1277
  poolRewardManagerId: string;
1278
1278
  coinType: string;
@@ -1289,11 +1289,11 @@ export declare const initializeObligations: (suiGrpcClient: SuiGrpcClient, suile
1289
1289
  lastUpdateTimeMs: bigint;
1290
1290
  };
1291
1291
  borrowsPoolRewardManager: {
1292
- $typeName: string;
1292
+ $typeName: `${string}::liquidity_mining::PoolRewardManager`;
1293
1293
  id: string;
1294
1294
  totalShares: bigint;
1295
1295
  poolRewards: {
1296
- $typeName: string;
1296
+ $typeName: `${string}::liquidity_mining::PoolReward`;
1297
1297
  id: string;
1298
1298
  poolRewardManagerId: string;
1299
1299
  coinType: string;
@@ -1343,7 +1343,7 @@ export declare const initializeObligations: (suiGrpcClient: SuiGrpcClient, suile
1343
1343
  borrowedAmountUsd: BigNumber;
1344
1344
  reserve: {
1345
1345
  config: {
1346
- $typeName: string;
1346
+ $typeName: `${string}::reserve_config::ReserveConfig`;
1347
1347
  openLtvPct: number;
1348
1348
  closeLtvPct: number;
1349
1349
  maxCloseLtvPct: number;
@@ -1360,14 +1360,14 @@ export declare const initializeObligations: (suiGrpcClient: SuiGrpcClient, suile
1360
1360
  isolated: boolean;
1361
1361
  openAttributedBorrowLimitUsd: number;
1362
1362
  closeAttributedBorrowLimitUsd: number;
1363
- additionalFields: import("../_generated/_dependencies/source/0x2/bag/structs").Bag;
1363
+ additionalFields: import("../_generated/_dependencies/sui/bag/structs").Bag;
1364
1364
  interestRate: {
1365
1365
  id: string;
1366
1366
  utilPercent: BigNumber;
1367
1367
  aprPercent: BigNumber;
1368
1368
  }[];
1369
1369
  };
1370
- $typeName: string;
1370
+ $typeName: `${string}::reserve::Reserve`;
1371
1371
  id: string;
1372
1372
  arrayIndex: bigint;
1373
1373
  coinType: string;
@@ -1386,11 +1386,11 @@ export declare const initializeObligations: (suiGrpcClient: SuiGrpcClient, suile
1386
1386
  unclaimedSpreadFees: BigNumber;
1387
1387
  attributedBorrowValue: BigNumber;
1388
1388
  depositsPoolRewardManager: {
1389
- $typeName: string;
1389
+ $typeName: `${string}::liquidity_mining::PoolRewardManager`;
1390
1390
  id: string;
1391
1391
  totalShares: bigint;
1392
1392
  poolRewards: {
1393
- $typeName: string;
1393
+ $typeName: `${string}::liquidity_mining::PoolReward`;
1394
1394
  id: string;
1395
1395
  poolRewardManagerId: string;
1396
1396
  coinType: string;
@@ -1407,11 +1407,11 @@ export declare const initializeObligations: (suiGrpcClient: SuiGrpcClient, suile
1407
1407
  lastUpdateTimeMs: bigint;
1408
1408
  };
1409
1409
  borrowsPoolRewardManager: {
1410
- $typeName: string;
1410
+ $typeName: `${string}::liquidity_mining::PoolRewardManager`;
1411
1411
  id: string;
1412
1412
  totalShares: bigint;
1413
1413
  poolRewards: {
1414
- $typeName: string;
1414
+ $typeName: `${string}::liquidity_mining::PoolReward`;
1415
1415
  id: string;
1416
1416
  poolRewardManagerId: string;
1417
1417
  coinType: string;
package/lib/initialize.js CHANGED
@@ -216,7 +216,7 @@ export const refreshReservesForInitialize = async (reserves, pythConnection, tol
216
216
  */
217
217
  export const priceTemporaryPythFeedReserves = async (reserves, fetchPrices = getPrices) => {
218
218
  const fabricatedPriceCoinTypes = [];
219
- const coinTypes = reserves.map((reserve) => normalizeStructTag(reserve.coinType.name));
219
+ const coinTypes = reserves.map((reserve) => normalizeStructTag(reserve.coinType));
220
220
  let cachedUsdPrices = {};
221
221
  try {
222
222
  cachedUsdPrices = await fetchPrices(Array.from(new Set(coinTypes)));
@@ -241,7 +241,7 @@ export const priceTemporaryPythFeedReserves = async (reserves, fetchPrices = get
241
241
  };
242
242
  export const priceTemporaryPythFeedReservesAll = async (reservesByMarket, fetchPrices = getPrices) => {
243
243
  const fabricatedPriceCoinTypes = new Set(await priceTemporaryPythFeedReserves(reservesByMarket.flat(), fetchPrices));
244
- return reservesByMarket.map((reserves) => Array.from(new Set(reserves.map((reserve) => normalizeStructTag(reserve.coinType.name)))).filter((coinType) => fabricatedPriceCoinTypes.has(coinType)));
244
+ return reservesByMarket.map((reserves) => Array.from(new Set(reserves.map((reserve) => normalizeStructTag(reserve.coinType)))).filter((coinType) => fabricatedPriceCoinTypes.has(coinType)));
245
245
  };
246
246
  const marketCoinTypes = (reserves, nowMs) => {
247
247
  const miscCoinTypes = [
@@ -253,7 +253,7 @@ const marketCoinTypes = (reserves, nowMs) => {
253
253
  const rewardCoinTypes = [];
254
254
  const activeRewardCoinTypes = [];
255
255
  reserves.forEach((r) => {
256
- reserveCoinTypes.push(normalizeStructTag(r.coinType.name));
256
+ reserveCoinTypes.push(normalizeStructTag(r.coinType));
257
257
  [
258
258
  ...r.depositsPoolRewardManager.poolRewards,
259
259
  ...r.borrowsPoolRewardManager.poolRewards,
@@ -261,9 +261,9 @@ const marketCoinTypes = (reserves, nowMs) => {
261
261
  if (!pr)
262
262
  return;
263
263
  const isActive = nowMs >= Number(pr.startTimeMs) && nowMs < Number(pr.endTimeMs);
264
- rewardCoinTypes.push(normalizeStructTag(pr.coinType.name));
264
+ rewardCoinTypes.push(normalizeStructTag(pr.coinType));
265
265
  if (isActive)
266
- activeRewardCoinTypes.push(normalizeStructTag(pr.coinType.name));
266
+ activeRewardCoinTypes.push(normalizeStructTag(pr.coinType));
267
267
  });
268
268
  });
269
269
  return {
@@ -277,7 +277,7 @@ const isUnpricedRewardCoinType = (coinType) => isSendPoints(coinType) ||
277
277
  isSteammPoints(coinType) ||
278
278
  coinType === NORMALIZED_MAYA_COINTYPE ||
279
279
  coinType === NORMALIZED_mPOINTS_COINTYPE;
280
- const isTemporaryPythFeedReserve = (reserve) => TEMPORARY_PYTH_PRICE_FEED_COINTYPES.includes(normalizeStructTag(reserve.coinType.name));
280
+ const isTemporaryPythFeedReserve = (reserve) => TEMPORARY_PYTH_PRICE_FEED_COINTYPES.includes(normalizeStructTag(reserve.coinType));
281
281
  const reservelessActiveRewardCoinTypes = ({ uniqueReserveCoinTypes, uniqueActiveRewardsCoinTypes, }) => uniqueActiveRewardsCoinTypes.filter((coinType) => !isUnpricedRewardCoinType(coinType) &&
282
282
  coinType !== NORMALIZED_TREATS_COINTYPE &&
283
283
  !uniqueReserveCoinTypes.includes(coinType));
@@ -287,7 +287,7 @@ export const getInitializePriceInputs = (lendingMarkets, nowMs) => {
287
287
  priceFeedIds: simulate.reservePriceFeedIds(reserves.filter((reserve) => !isTemporaryPythFeedReserve(reserve))),
288
288
  temporaryPythFeedCoinTypes: Array.from(new Set(reserves
289
289
  .filter(isTemporaryPythFeedReserve)
290
- .map((reserve) => normalizeStructTag(reserve.coinType.name)))),
290
+ .map((reserve) => normalizeStructTag(reserve.coinType)))),
291
291
  rewardCoinTypes: Array.from(new Set(lendingMarkets.flatMap((lendingMarket) => reservelessActiveRewardCoinTypes(marketCoinTypes(lendingMarket.reserves, nowMs))))),
292
292
  };
293
293
  };
@@ -354,13 +354,13 @@ const initializeSuilendMarkets = async (markets, fallbackPythEndpoint, options,
354
354
  // the caller knows whether a given reserve can safely hold such a price.
355
355
  //
356
356
  // Normalized, matching `reserveMap` / `reserveCoinTypes` keys. Entries in
357
- // `refreshedRawReserves` carry the RAW on-chain `coinType.name`, which never
357
+ // `refreshedRawReserves` carry the RAW on-chain `coinType`, which never
358
358
  // compares equal to these (no `0x` prefix), so filtering that array means
359
359
  // normalizing first:
360
360
  //
361
361
  // const unpriced = new Set(unpricedCoinTypes);
362
362
  // refreshedRawReserves.filter(
363
- // (r) => !unpriced.has(normalizeStructTag(r.coinType.name)),
363
+ // (r) => !unpriced.has(normalizeStructTag(r.coinType)),
364
364
  // );
365
365
  const unpricedCoinTypes = [
366
366
  ...refreshedWithoutTemporaryByMarket[index].unpricedCoinTypes,
@@ -377,7 +377,7 @@ const initializeSuilendMarkets = async (markets, fallbackPythEndpoint, options,
377
377
  const initialized = prepared.map(({ suilendClient, lendingMarketMetadata, refreshedRawReserves, unpricedCoinTypes, uniqueReserveCoinTypes, uniqueRewardCoinTypes, uniqueActiveRewardsCoinTypes, }, index) => {
378
378
  const { coinMetadataMap, reserveCoinMetadataMap, rewardCoinMetadataMap } = coinMetadataByMarket[index];
379
379
  // const walReserve = refreshedRawReserves.find(
380
- // (r) => normalizeStructTag(r.coinType.name) === NORMALIZED_WAL_COINTYPE,
380
+ // (r) => normalizeStructTag(r.coinType) === NORMALIZED_WAL_COINTYPE,
381
381
  // );
382
382
  // if (walReserve) {
383
383
  // const walPrice = BigInt(