@suilend/sdk 1.1.1 → 1.1.2
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/core/client.d.ts +5 -2
- package/core/client.js +17 -1
- package/core/parsers/lendingMarket.js +1 -1
- package/core/types.d.ts +13 -0
- package/core/types.js +8 -1
- package/mainnet/_generated/_dependencies/source/0x1/ascii/structs.d.ts +3 -3
- package/mainnet/_generated/_dependencies/source/0x1/ascii/structs.js +4 -4
- package/mainnet/_generated/_dependencies/source/0x1/index.d.ts +1 -1
- package/mainnet/_generated/_dependencies/source/0x1/index.js +2 -2
- package/mainnet/_generated/_dependencies/source/0x1/option/structs.d.ts +2 -2
- package/mainnet/_generated/_dependencies/source/0x1/option/structs.js +2 -2
- package/mainnet/_generated/_dependencies/source/0x1/type-name/structs.d.ts +2 -2
- package/mainnet/_generated/_dependencies/source/0x1/type-name/structs.js +2 -2
- package/mainnet/_generated/_dependencies/source/0x2/bag/structs.d.ts +2 -2
- package/mainnet/_generated/_dependencies/source/0x2/bag/structs.js +2 -2
- package/mainnet/_generated/_dependencies/source/0x2/balance/structs.d.ts +3 -3
- package/mainnet/_generated/_dependencies/source/0x2/balance/structs.js +4 -4
- package/mainnet/_generated/_dependencies/source/0x2/index.d.ts +1 -1
- package/mainnet/_generated/_dependencies/source/0x2/index.js +2 -2
- package/mainnet/_generated/_dependencies/source/0x2/object/structs.d.ts +3 -3
- package/mainnet/_generated/_dependencies/source/0x2/object/structs.js +4 -4
- package/mainnet/_generated/_dependencies/source/0x2/object-table/structs.d.ts +2 -2
- package/mainnet/_generated/_dependencies/source/0x2/object-table/structs.js +2 -2
- package/mainnet/_generated/suilend/lending-market/functions.d.ts +14 -0
- package/mainnet/_generated/suilend/lending-market/functions.js +27 -1
- package/mainnet/client.js +1 -0
- package/package.json +1 -1
package/core/client.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SuiClient } from "@mysten/sui/client";
|
|
2
2
|
import { Transaction, TransactionObjectInput, TransactionResult } from "@mysten/sui/transactions";
|
|
3
3
|
import { SuiPriceServiceConnection, SuiPythClient } from "@pythnetwork/pyth-sui-js";
|
|
4
|
-
import { AddPoolRewardArgs, AddReserveArgs, BorrowArgs, CancelPoolRewardArgs, ClaimFeesArgs, ClaimRewardsAndDepositArgs, ClaimRewardsArgs, ClosePoolRewardArgs, CreateRateLimiterConfigArgs, CreateReserveConfigArgs, DepositCtokensIntoObligationArgs, DepositLiquidityAndMintCtokensArgs, LiquidateArgs, MigrateArgs, PhantomReified, RedeemCtokensAndWithdrawLiquidityArgs, RefreshReservePriceArgs, RepayArgs, Side, UpdateRateLimiterConfigArgs, UpdateReserveConfigArgs, WithdrawCtokensArgs } from "./types";
|
|
4
|
+
import { AddPoolRewardArgs, AddReserveArgs, BorrowArgs, CancelPoolRewardArgs, ChangeReservePriceFeedArgs, ClaimFeesArgs, ClaimRewardsAndDepositArgs, ClaimRewardsArgs, ClosePoolRewardArgs, CreateRateLimiterConfigArgs, CreateReserveConfigArgs, DepositCtokensIntoObligationArgs, DepositLiquidityAndMintCtokensArgs, LiquidateArgs, MigrateArgs, PhantomReified, RedeemCtokensAndWithdrawLiquidityArgs, RefreshReservePriceArgs, RepayArgs, Side, UpdateRateLimiterConfigArgs, UpdateReserveConfigArgs, WithdrawCtokensArgs } from "./types";
|
|
5
5
|
interface Deps {
|
|
6
6
|
phantom: (phantomType: string) => PhantomReified<string>;
|
|
7
7
|
PACKAGE_ID: string;
|
|
@@ -30,6 +30,7 @@ interface Deps {
|
|
|
30
30
|
migrate: (transaction: Transaction, typeArg: string, args: MigrateArgs) => TransactionResult;
|
|
31
31
|
claimFees: (transaction: Transaction, typeArgs: [string, string], args: ClaimFeesArgs) => TransactionResult;
|
|
32
32
|
redeemCtokensAndWithdrawLiquidity: (transaction: Transaction, typeArgs: [string, string], args: RedeemCtokensAndWithdrawLiquidityArgs) => TransactionResult;
|
|
33
|
+
changeReservePriceFeed: (transaction: Transaction, typeArgs: [string, string], args: ChangeReservePriceFeedArgs) => TransactionResult;
|
|
33
34
|
}
|
|
34
35
|
export declare class SuilendClient {
|
|
35
36
|
lendingMarket: any;
|
|
@@ -63,7 +64,8 @@ export declare class SuilendClient {
|
|
|
63
64
|
migrateFunction: Deps["migrate"];
|
|
64
65
|
claimFeesFunction: Deps["claimFees"];
|
|
65
66
|
redeemCtokensAndWithdrawLiquidityFunction: Deps["redeemCtokensAndWithdrawLiquidity"];
|
|
66
|
-
|
|
67
|
+
changeReservePriceFeedFunction: Deps["changeReservePriceFeed"];
|
|
68
|
+
constructor(lendingMarket: any, client: SuiClient, { phantom, PACKAGE_ID, PUBLISHED_AT, LendingMarket, Obligation, ObligationOwnerCap, createLendingMarket, createReserveConfig, updateReserveConfig, addReserve, addPoolReward, cancelPoolReward, closePoolReward, claimRewards, claimRewardsAndDeposit, createRateLimiterConfig, updateRateLimiterConfig, refreshReservePrice, depositLiquidityAndMintCtokens, depositCtokensIntoObligation, withdrawCtokens, borrow, repay, liquidate, migrate, claimFees, redeemCtokensAndWithdrawLiquidity, changeReservePriceFeed, }: Deps);
|
|
67
69
|
static initialize(lendingMarketId: string, lendingMarketType: string, client: SuiClient, deps: Deps): Promise<SuilendClient>;
|
|
68
70
|
static initializeWithLendingMarket(lendingMarket: any, client: SuiClient, deps: Deps): Promise<SuilendClient>;
|
|
69
71
|
static hasBetaPass(ownerId: string, client: SuiClient): Promise<boolean>;
|
|
@@ -92,6 +94,7 @@ export declare class SuilendClient {
|
|
|
92
94
|
findReserveArrayIndex(coinType: string): bigint;
|
|
93
95
|
updateReserveConfig(ownerId: string, lendingMarketOwnerCapId: string, transaction: Transaction, coinType: string, createReserveConfigArgs: CreateReserveConfigArgs): Promise<TransactionResult>;
|
|
94
96
|
updateRateLimiterConfig(lendingMarketOwnerCapId: string, transaction: Transaction, newRateLimiterConfigArgs: CreateRateLimiterConfigArgs): Promise<TransactionResult>;
|
|
97
|
+
changeReservePriceFeed(lendingMarketOwnerCapId: string, coinType: string, pythPriceId: string, transaction: Transaction): Promise<TransactionResult>;
|
|
95
98
|
createObligation(transaction: Transaction): TransactionResult;
|
|
96
99
|
refreshAll(transaction: Transaction, obligation: typeof this.Obligation, extraReserveArrayIndex?: bigint): Promise<void>;
|
|
97
100
|
refreshReservePrices(transaction: Transaction, priceInfoObjectId: string, reserveArrayIndex: bigint): Promise<void>;
|
package/core/client.js
CHANGED
|
@@ -18,7 +18,7 @@ const WORMHOLE_STATE_ID = "0xaeab97f96cf9877fee2883315d459552b2b921edc16d7ceac6e
|
|
|
18
18
|
const PYTH_STATE_ID = "0x1f9310238ee9298fb703c3419030b35b22bb1cc37113e3bb5007c99aec79e5b8";
|
|
19
19
|
const SUI_COINTYPE = "0x2::sui::SUI";
|
|
20
20
|
class SuilendClient {
|
|
21
|
-
constructor(lendingMarket, client, { phantom, PACKAGE_ID, PUBLISHED_AT, LendingMarket, Obligation, ObligationOwnerCap, createLendingMarket, createReserveConfig, updateReserveConfig, addReserve, addPoolReward, cancelPoolReward, closePoolReward, claimRewards, claimRewardsAndDeposit, createRateLimiterConfig, updateRateLimiterConfig, refreshReservePrice, depositLiquidityAndMintCtokens, depositCtokensIntoObligation, withdrawCtokens, borrow, repay, liquidate, migrate, claimFees, redeemCtokensAndWithdrawLiquidity, }) {
|
|
21
|
+
constructor(lendingMarket, client, { phantom, PACKAGE_ID, PUBLISHED_AT, LendingMarket, Obligation, ObligationOwnerCap, createLendingMarket, createReserveConfig, updateReserveConfig, addReserve, addPoolReward, cancelPoolReward, closePoolReward, claimRewards, claimRewardsAndDeposit, createRateLimiterConfig, updateRateLimiterConfig, refreshReservePrice, depositLiquidityAndMintCtokens, depositCtokensIntoObligation, withdrawCtokens, borrow, repay, liquidate, migrate, claimFees, redeemCtokensAndWithdrawLiquidity, changeReservePriceFeed, }) {
|
|
22
22
|
this.lendingMarket = lendingMarket;
|
|
23
23
|
this.client = client;
|
|
24
24
|
this.pythClient = new pyth_sui_js_1.SuiPythClient(client, PYTH_STATE_ID, WORMHOLE_STATE_ID);
|
|
@@ -52,6 +52,7 @@ class SuilendClient {
|
|
|
52
52
|
this.claimFeesFunction = claimFees;
|
|
53
53
|
this.redeemCtokensAndWithdrawLiquidityFunction =
|
|
54
54
|
redeemCtokensAndWithdrawLiquidity;
|
|
55
|
+
this.changeReservePriceFeedFunction = changeReservePriceFeed;
|
|
55
56
|
}
|
|
56
57
|
static initialize(lendingMarketId, lendingMarketType, client, deps) {
|
|
57
58
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -286,6 +287,21 @@ class SuilendClient {
|
|
|
286
287
|
});
|
|
287
288
|
});
|
|
288
289
|
}
|
|
290
|
+
changeReservePriceFeed(lendingMarketOwnerCapId, coinType, pythPriceId, transaction) {
|
|
291
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
292
|
+
const priceUpdateData = yield this.pythConnection.getPriceFeedsUpdateData([
|
|
293
|
+
pythPriceId,
|
|
294
|
+
]);
|
|
295
|
+
const priceInfoObjectIds = yield this.pythClient.updatePriceFeeds(transaction, priceUpdateData, [pythPriceId]);
|
|
296
|
+
return this.changeReservePriceFeedFunction(transaction, [this.lendingMarket.$typeArgs[0], coinType], {
|
|
297
|
+
lendingMarketOwnerCap: lendingMarketOwnerCapId,
|
|
298
|
+
lendingMarket: this.lendingMarket.id,
|
|
299
|
+
reserveArrayIndex: this.findReserveArrayIndex(coinType),
|
|
300
|
+
priceInfoObj: priceInfoObjectIds[0],
|
|
301
|
+
clock: utils_1.SUI_CLOCK_OBJECT_ID,
|
|
302
|
+
});
|
|
303
|
+
});
|
|
304
|
+
}
|
|
289
305
|
createObligation(transaction) {
|
|
290
306
|
return transaction.moveCall({
|
|
291
307
|
target: `${this.PUBLISHED_AT}::lending_market::create_obligation`,
|
|
@@ -13,7 +13,7 @@ const parseLendingMarket = ({ LendingMarket, Reserve, PoolRewardManager, PoolRew
|
|
|
13
13
|
const parsedReserves = reserves
|
|
14
14
|
.map((reserve) => (0, reserve_1.parseReserve)({ Reserve, PoolRewardManager, PoolReward, simulate }, reserve, coinMetadataMap))
|
|
15
15
|
.sort((a, b) => {
|
|
16
|
-
const customOrder = ["SUI", "
|
|
16
|
+
const customOrder = ["SUI", "USDC", "wUSDC"];
|
|
17
17
|
const aCustomOrderIndex = customOrder.indexOf(a.symbol);
|
|
18
18
|
const bCustomOrderIndex = customOrder.indexOf(b.symbol);
|
|
19
19
|
if (aCustomOrderIndex > -1 && bCustomOrderIndex > -1)
|
package/core/types.d.ts
CHANGED
|
@@ -523,6 +523,12 @@ export declare enum Side {
|
|
|
523
523
|
DEPOSIT = "deposit",
|
|
524
524
|
BORROW = "borrow"
|
|
525
525
|
}
|
|
526
|
+
export declare enum Action {
|
|
527
|
+
DEPOSIT = "deposit",
|
|
528
|
+
WITHDRAW = "withdraw",
|
|
529
|
+
BORROW = "borrow",
|
|
530
|
+
REPAY = "repay"
|
|
531
|
+
}
|
|
526
532
|
export interface PhantomReified<P> {
|
|
527
533
|
phantomType: P;
|
|
528
534
|
kind: "PhantomReified";
|
|
@@ -561,6 +567,13 @@ export interface UpdateReserveConfigArgs {
|
|
|
561
567
|
reserveArrayIndex: bigint | TransactionArgument;
|
|
562
568
|
config: TransactionObjectInput;
|
|
563
569
|
}
|
|
570
|
+
export interface ChangeReservePriceFeedArgs {
|
|
571
|
+
lendingMarketOwnerCap: TransactionObjectInput;
|
|
572
|
+
lendingMarket: TransactionObjectInput;
|
|
573
|
+
reserveArrayIndex: bigint | TransactionArgument;
|
|
574
|
+
priceInfoObj: TransactionObjectInput;
|
|
575
|
+
clock: TransactionObjectInput;
|
|
576
|
+
}
|
|
564
577
|
export interface AddPoolRewardArgs {
|
|
565
578
|
lendingMarketOwnerCap: TransactionObjectInput;
|
|
566
579
|
lendingMarket: TransactionObjectInput;
|
package/core/types.js
CHANGED
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.Side = exports.load = exports.LendingMarket = exports.ObjectBag = exports.Reserve = exports.PriceIdentifier = exports.ReserveConfig = exports.InterestRateModel = exports.Obligation = exports.Bag = exports.Deposit = exports.Borrow = exports.Decimal = exports.ObligationOwnerCap = exports.UID = exports.ID = void 0;
|
|
12
|
+
exports.Action = exports.Side = exports.load = exports.LendingMarket = exports.ObjectBag = exports.Reserve = exports.PriceIdentifier = exports.ReserveConfig = exports.InterestRateModel = exports.Obligation = exports.Bag = exports.Deposit = exports.Borrow = exports.Decimal = exports.ObligationOwnerCap = exports.UID = exports.ID = void 0;
|
|
13
13
|
const bcs_1 = require("@mysten/bcs");
|
|
14
14
|
const utils_1 = require("@mysten/sui/utils");
|
|
15
15
|
exports.ID = bcs_1.bcs.struct("ID", {
|
|
@@ -123,3 +123,10 @@ var Side;
|
|
|
123
123
|
Side["DEPOSIT"] = "deposit";
|
|
124
124
|
Side["BORROW"] = "borrow";
|
|
125
125
|
})(Side || (exports.Side = Side = {}));
|
|
126
|
+
var Action;
|
|
127
|
+
(function (Action) {
|
|
128
|
+
Action["DEPOSIT"] = "deposit";
|
|
129
|
+
Action["WITHDRAW"] = "withdraw";
|
|
130
|
+
Action["BORROW"] = "borrow";
|
|
131
|
+
Action["REPAY"] = "repay";
|
|
132
|
+
})(Action || (exports.Action = Action = {}));
|
|
@@ -2,7 +2,7 @@ import * as reified from "../../../../_framework/reified";
|
|
|
2
2
|
import { PhantomReified, Reified, StructClass, ToField, ToTypeStr } from "../../../../_framework/reified";
|
|
3
3
|
import { FieldsWithTypes } from "../../../../_framework/util";
|
|
4
4
|
import { Vector } from "../../../../_framework/vector";
|
|
5
|
-
import {
|
|
5
|
+
import { PKG_V10 } from "../index";
|
|
6
6
|
import { SuiClient, SuiObjectData, SuiParsedData } from "@mysten/sui/client";
|
|
7
7
|
export declare function isChar(type: string): boolean;
|
|
8
8
|
export interface CharFields {
|
|
@@ -15,7 +15,7 @@ export declare class Char implements StructClass {
|
|
|
15
15
|
static readonly $numTypeParams = 0;
|
|
16
16
|
static readonly $isPhantom: readonly [];
|
|
17
17
|
readonly $typeName = "0x1::ascii::Char";
|
|
18
|
-
readonly $fullTypeName: `${typeof
|
|
18
|
+
readonly $fullTypeName: `${typeof PKG_V10}::ascii::Char`;
|
|
19
19
|
readonly $typeArgs: [];
|
|
20
20
|
readonly $isPhantom: readonly [];
|
|
21
21
|
readonly byte: ToField<"u8">;
|
|
@@ -57,7 +57,7 @@ export declare class String implements StructClass {
|
|
|
57
57
|
static readonly $numTypeParams = 0;
|
|
58
58
|
static readonly $isPhantom: readonly [];
|
|
59
59
|
readonly $typeName = "0x1::ascii::String";
|
|
60
|
-
readonly $fullTypeName: `${typeof
|
|
60
|
+
readonly $fullTypeName: `${typeof PKG_V10}::ascii::String`;
|
|
61
61
|
readonly $typeArgs: [];
|
|
62
62
|
readonly $isPhantom: readonly [];
|
|
63
63
|
readonly bytes: ToField<Vector<"u8">>;
|
|
@@ -42,7 +42,7 @@ const utils_1 = require("@mysten/sui/utils");
|
|
|
42
42
|
/* ============================== Char =============================== */
|
|
43
43
|
function isChar(type) {
|
|
44
44
|
type = (0, util_1.compressSuiType)(type);
|
|
45
|
-
return type === `${index_1.
|
|
45
|
+
return type === `${index_1.PKG_V10}::ascii::Char`;
|
|
46
46
|
}
|
|
47
47
|
exports.isChar = isChar;
|
|
48
48
|
class Char {
|
|
@@ -158,13 +158,13 @@ class Char {
|
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
exports.Char = Char;
|
|
161
|
-
Char.$typeName = `${index_1.
|
|
161
|
+
Char.$typeName = `${index_1.PKG_V10}::ascii::Char`;
|
|
162
162
|
Char.$numTypeParams = 0;
|
|
163
163
|
Char.$isPhantom = [];
|
|
164
164
|
/* ============================== String =============================== */
|
|
165
165
|
function isString(type) {
|
|
166
166
|
type = (0, util_1.compressSuiType)(type);
|
|
167
|
-
return type === `${index_1.
|
|
167
|
+
return type === `${index_1.PKG_V10}::ascii::String`;
|
|
168
168
|
}
|
|
169
169
|
exports.isString = isString;
|
|
170
170
|
class String {
|
|
@@ -284,6 +284,6 @@ class String {
|
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
286
|
exports.String = String;
|
|
287
|
-
String.$typeName = `${index_1.
|
|
287
|
+
String.$typeName = `${index_1.PKG_V10}::ascii::String`;
|
|
288
288
|
String.$numTypeParams = 0;
|
|
289
289
|
String.$isPhantom = [];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.PKG_V10 = exports.PUBLISHED_AT = exports.PACKAGE_ID = void 0;
|
|
4
4
|
exports.PACKAGE_ID = "0x1";
|
|
5
5
|
exports.PUBLISHED_AT = "0x1";
|
|
6
|
-
exports.
|
|
6
|
+
exports.PKG_V10 = "0x1";
|
|
@@ -2,7 +2,7 @@ import * as reified from "../../../../_framework/reified";
|
|
|
2
2
|
import { PhantomReified, Reified, StructClass, ToField, ToTypeArgument, ToTypeStr, TypeArgument } from "../../../../_framework/reified";
|
|
3
3
|
import { FieldsWithTypes } from "../../../../_framework/util";
|
|
4
4
|
import { Vector } from "../../../../_framework/vector";
|
|
5
|
-
import {
|
|
5
|
+
import { PKG_V10 } from "../index";
|
|
6
6
|
import { BcsType } from "@mysten/sui/bcs";
|
|
7
7
|
import { SuiClient, SuiObjectData, SuiParsedData } from "@mysten/sui/client";
|
|
8
8
|
export declare function isOption(type: string): boolean;
|
|
@@ -17,7 +17,7 @@ export declare class Option<Element extends TypeArgument> implements StructClass
|
|
|
17
17
|
static readonly $isPhantom: readonly [false];
|
|
18
18
|
__inner: Element;
|
|
19
19
|
readonly $typeName = "0x1::option::Option";
|
|
20
|
-
readonly $fullTypeName: `${typeof
|
|
20
|
+
readonly $fullTypeName: `${typeof PKG_V10}::option::Option<${ToTypeStr<Element>}>`;
|
|
21
21
|
readonly $typeArgs: [ToTypeStr<Element>];
|
|
22
22
|
readonly $isPhantom: readonly [false];
|
|
23
23
|
readonly vec: ToField<Vector<Element>>;
|
|
@@ -42,7 +42,7 @@ const utils_1 = require("@mysten/sui/utils");
|
|
|
42
42
|
/* ============================== Option =============================== */
|
|
43
43
|
function isOption(type) {
|
|
44
44
|
type = (0, util_1.compressSuiType)(type);
|
|
45
|
-
return type.startsWith(`${index_1.
|
|
45
|
+
return type.startsWith(`${index_1.PKG_V10}::option::Option` + "<");
|
|
46
46
|
}
|
|
47
47
|
exports.isOption = isOption;
|
|
48
48
|
class Option {
|
|
@@ -175,6 +175,6 @@ class Option {
|
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
exports.Option = Option;
|
|
178
|
-
Option.$typeName = `${index_1.
|
|
178
|
+
Option.$typeName = `${index_1.PKG_V10}::option::Option`;
|
|
179
179
|
Option.$numTypeParams = 1;
|
|
180
180
|
Option.$isPhantom = [false];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PhantomReified, Reified, StructClass, ToField, ToTypeStr } from "../../../../_framework/reified";
|
|
2
2
|
import { FieldsWithTypes } from "../../../../_framework/util";
|
|
3
3
|
import { String } from "../ascii/structs";
|
|
4
|
-
import {
|
|
4
|
+
import { PKG_V10 } from "../index";
|
|
5
5
|
import { SuiClient, SuiObjectData, SuiParsedData } from "@mysten/sui/client";
|
|
6
6
|
export declare function isTypeName(type: string): boolean;
|
|
7
7
|
export interface TypeNameFields {
|
|
@@ -14,7 +14,7 @@ export declare class TypeName implements StructClass {
|
|
|
14
14
|
static readonly $numTypeParams = 0;
|
|
15
15
|
static readonly $isPhantom: readonly [];
|
|
16
16
|
readonly $typeName = "0x1::type_name::TypeName";
|
|
17
|
-
readonly $fullTypeName: `${typeof
|
|
17
|
+
readonly $fullTypeName: `${typeof PKG_V10}::type_name::TypeName`;
|
|
18
18
|
readonly $typeArgs: [];
|
|
19
19
|
readonly $isPhantom: readonly [];
|
|
20
20
|
readonly name: ToField<String>;
|
|
@@ -19,7 +19,7 @@ const utils_1 = require("@mysten/sui/utils");
|
|
|
19
19
|
/* ============================== TypeName =============================== */
|
|
20
20
|
function isTypeName(type) {
|
|
21
21
|
type = (0, util_1.compressSuiType)(type);
|
|
22
|
-
return type === `${index_1.
|
|
22
|
+
return type === `${index_1.PKG_V10}::type_name::TypeName`;
|
|
23
23
|
}
|
|
24
24
|
exports.isTypeName = isTypeName;
|
|
25
25
|
class TypeName {
|
|
@@ -139,6 +139,6 @@ class TypeName {
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
exports.TypeName = TypeName;
|
|
142
|
-
TypeName.$typeName = `${index_1.
|
|
142
|
+
TypeName.$typeName = `${index_1.PKG_V10}::type_name::TypeName`;
|
|
143
143
|
TypeName.$numTypeParams = 0;
|
|
144
144
|
TypeName.$isPhantom = [];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PhantomReified, Reified, StructClass, ToField, ToTypeStr } from "../../../../_framework/reified";
|
|
2
2
|
import { FieldsWithTypes } from "../../../../_framework/util";
|
|
3
|
-
import {
|
|
3
|
+
import { PKG_V28 } from "../index";
|
|
4
4
|
import { UID } from "../object/structs";
|
|
5
5
|
import { SuiClient, SuiObjectData, SuiParsedData } from "@mysten/sui/client";
|
|
6
6
|
export declare function isBag(type: string): boolean;
|
|
@@ -15,7 +15,7 @@ export declare class Bag implements StructClass {
|
|
|
15
15
|
static readonly $numTypeParams = 0;
|
|
16
16
|
static readonly $isPhantom: readonly [];
|
|
17
17
|
readonly $typeName = "0x2::bag::Bag";
|
|
18
|
-
readonly $fullTypeName: `${typeof
|
|
18
|
+
readonly $fullTypeName: `${typeof PKG_V28}::bag::Bag`;
|
|
19
19
|
readonly $typeArgs: [];
|
|
20
20
|
readonly $isPhantom: readonly [];
|
|
21
21
|
readonly id: ToField<UID>;
|
|
@@ -19,7 +19,7 @@ const utils_1 = require("@mysten/sui/utils");
|
|
|
19
19
|
/* ============================== Bag =============================== */
|
|
20
20
|
function isBag(type) {
|
|
21
21
|
type = (0, util_1.compressSuiType)(type);
|
|
22
|
-
return type === `${index_1.
|
|
22
|
+
return type === `${index_1.PKG_V28}::bag::Bag`;
|
|
23
23
|
}
|
|
24
24
|
exports.isBag = isBag;
|
|
25
25
|
class Bag {
|
|
@@ -144,6 +144,6 @@ class Bag {
|
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
exports.Bag = Bag;
|
|
147
|
-
Bag.$typeName = `${index_1.
|
|
147
|
+
Bag.$typeName = `${index_1.PKG_V28}::bag::Bag`;
|
|
148
148
|
Bag.$numTypeParams = 0;
|
|
149
149
|
Bag.$isPhantom = [];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PhantomReified, PhantomToTypeStr, PhantomTypeArgument, Reified, StructClass, ToField, ToPhantomTypeArgument, ToTypeStr } from "../../../../_framework/reified";
|
|
2
2
|
import { FieldsWithTypes } from "../../../../_framework/util";
|
|
3
|
-
import {
|
|
3
|
+
import { PKG_V28 } from "../index";
|
|
4
4
|
import { SuiClient, SuiObjectData, SuiParsedData } from "@mysten/sui/client";
|
|
5
5
|
export declare function isBalance(type: string): boolean;
|
|
6
6
|
export interface BalanceFields<T extends PhantomTypeArgument> {
|
|
@@ -13,7 +13,7 @@ export declare class Balance<T extends PhantomTypeArgument> implements StructCla
|
|
|
13
13
|
static readonly $numTypeParams = 1;
|
|
14
14
|
static readonly $isPhantom: readonly [true];
|
|
15
15
|
readonly $typeName = "0x2::balance::Balance";
|
|
16
|
-
readonly $fullTypeName: `${typeof
|
|
16
|
+
readonly $fullTypeName: `${typeof PKG_V28}::balance::Balance<${PhantomToTypeStr<T>}>`;
|
|
17
17
|
readonly $typeArgs: [PhantomToTypeStr<T>];
|
|
18
18
|
readonly $isPhantom: readonly [true];
|
|
19
19
|
readonly value: ToField<"u64">;
|
|
@@ -55,7 +55,7 @@ export declare class Supply<T extends PhantomTypeArgument> implements StructClas
|
|
|
55
55
|
static readonly $numTypeParams = 1;
|
|
56
56
|
static readonly $isPhantom: readonly [true];
|
|
57
57
|
readonly $typeName = "0x2::balance::Supply";
|
|
58
|
-
readonly $fullTypeName: `${typeof
|
|
58
|
+
readonly $fullTypeName: `${typeof PKG_V28}::balance::Supply<${PhantomToTypeStr<T>}>`;
|
|
59
59
|
readonly $typeArgs: [PhantomToTypeStr<T>];
|
|
60
60
|
readonly $isPhantom: readonly [true];
|
|
61
61
|
readonly value: ToField<"u64">;
|
|
@@ -18,7 +18,7 @@ const utils_1 = require("@mysten/sui/utils");
|
|
|
18
18
|
/* ============================== Balance =============================== */
|
|
19
19
|
function isBalance(type) {
|
|
20
20
|
type = (0, util_1.compressSuiType)(type);
|
|
21
|
-
return type.startsWith(`${index_1.
|
|
21
|
+
return type.startsWith(`${index_1.PKG_V28}::balance::Balance` + "<");
|
|
22
22
|
}
|
|
23
23
|
exports.isBalance = isBalance;
|
|
24
24
|
class Balance {
|
|
@@ -149,13 +149,13 @@ class Balance {
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
exports.Balance = Balance;
|
|
152
|
-
Balance.$typeName = `${index_1.
|
|
152
|
+
Balance.$typeName = `${index_1.PKG_V28}::balance::Balance`;
|
|
153
153
|
Balance.$numTypeParams = 1;
|
|
154
154
|
Balance.$isPhantom = [true];
|
|
155
155
|
/* ============================== Supply =============================== */
|
|
156
156
|
function isSupply(type) {
|
|
157
157
|
type = (0, util_1.compressSuiType)(type);
|
|
158
|
-
return type.startsWith(`${index_1.
|
|
158
|
+
return type.startsWith(`${index_1.PKG_V28}::balance::Supply` + "<");
|
|
159
159
|
}
|
|
160
160
|
exports.isSupply = isSupply;
|
|
161
161
|
class Supply {
|
|
@@ -286,6 +286,6 @@ class Supply {
|
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
288
|
exports.Supply = Supply;
|
|
289
|
-
Supply.$typeName = `${index_1.
|
|
289
|
+
Supply.$typeName = `${index_1.PKG_V28}::balance::Supply`;
|
|
290
290
|
Supply.$numTypeParams = 1;
|
|
291
291
|
Supply.$isPhantom = [true];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.PKG_V28 = exports.PUBLISHED_AT = exports.PACKAGE_ID = void 0;
|
|
4
4
|
exports.PACKAGE_ID = "0x2";
|
|
5
5
|
exports.PUBLISHED_AT = "0x2";
|
|
6
|
-
exports.
|
|
6
|
+
exports.PKG_V28 = "0x2";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PhantomReified, Reified, StructClass, ToField, ToTypeStr } from "../../../../_framework/reified";
|
|
2
2
|
import { FieldsWithTypes } from "../../../../_framework/util";
|
|
3
|
-
import {
|
|
3
|
+
import { PKG_V28 } from "../index";
|
|
4
4
|
import { SuiClient, SuiObjectData, SuiParsedData } from "@mysten/sui/client";
|
|
5
5
|
export declare function isID(type: string): boolean;
|
|
6
6
|
export interface IDFields {
|
|
@@ -13,7 +13,7 @@ export declare class ID implements StructClass {
|
|
|
13
13
|
static readonly $numTypeParams = 0;
|
|
14
14
|
static readonly $isPhantom: readonly [];
|
|
15
15
|
readonly $typeName = "0x2::object::ID";
|
|
16
|
-
readonly $fullTypeName: `${typeof
|
|
16
|
+
readonly $fullTypeName: `${typeof PKG_V28}::object::ID`;
|
|
17
17
|
readonly $typeArgs: [];
|
|
18
18
|
readonly $isPhantom: readonly [];
|
|
19
19
|
readonly bytes: ToField<"address">;
|
|
@@ -55,7 +55,7 @@ export declare class UID implements StructClass {
|
|
|
55
55
|
static readonly $numTypeParams = 0;
|
|
56
56
|
static readonly $isPhantom: readonly [];
|
|
57
57
|
readonly $typeName = "0x2::object::UID";
|
|
58
|
-
readonly $fullTypeName: `${typeof
|
|
58
|
+
readonly $fullTypeName: `${typeof PKG_V28}::object::UID`;
|
|
59
59
|
readonly $typeArgs: [];
|
|
60
60
|
readonly $isPhantom: readonly [];
|
|
61
61
|
readonly id: ToField<ID>;
|
|
@@ -18,7 +18,7 @@ const utils_1 = require("@mysten/sui/utils");
|
|
|
18
18
|
/* ============================== ID =============================== */
|
|
19
19
|
function isID(type) {
|
|
20
20
|
type = (0, util_1.compressSuiType)(type);
|
|
21
|
-
return type === `${index_1.
|
|
21
|
+
return type === `${index_1.PKG_V28}::object::ID`;
|
|
22
22
|
}
|
|
23
23
|
exports.isID = isID;
|
|
24
24
|
class ID {
|
|
@@ -142,13 +142,13 @@ class ID {
|
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
exports.ID = ID;
|
|
145
|
-
ID.$typeName = `${index_1.
|
|
145
|
+
ID.$typeName = `${index_1.PKG_V28}::object::ID`;
|
|
146
146
|
ID.$numTypeParams = 0;
|
|
147
147
|
ID.$isPhantom = [];
|
|
148
148
|
/* ============================== UID =============================== */
|
|
149
149
|
function isUID(type) {
|
|
150
150
|
type = (0, util_1.compressSuiType)(type);
|
|
151
|
-
return type === `${index_1.
|
|
151
|
+
return type === `${index_1.PKG_V28}::object::UID`;
|
|
152
152
|
}
|
|
153
153
|
exports.isUID = isUID;
|
|
154
154
|
class UID {
|
|
@@ -265,6 +265,6 @@ class UID {
|
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
267
|
exports.UID = UID;
|
|
268
|
-
UID.$typeName = `${index_1.
|
|
268
|
+
UID.$typeName = `${index_1.PKG_V28}::object::UID`;
|
|
269
269
|
UID.$numTypeParams = 0;
|
|
270
270
|
UID.$isPhantom = [];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PhantomReified, PhantomToTypeStr, PhantomTypeArgument, Reified, StructClass, ToField, ToPhantomTypeArgument, ToTypeStr } from "../../../../_framework/reified";
|
|
2
2
|
import { FieldsWithTypes } from "../../../../_framework/util";
|
|
3
|
-
import {
|
|
3
|
+
import { PKG_V28 } from "../index";
|
|
4
4
|
import { UID } from "../object/structs";
|
|
5
5
|
import { SuiClient, SuiObjectData, SuiParsedData } from "@mysten/sui/client";
|
|
6
6
|
export declare function isObjectTable(type: string): boolean;
|
|
@@ -15,7 +15,7 @@ export declare class ObjectTable<K extends PhantomTypeArgument, V extends Phanto
|
|
|
15
15
|
static readonly $numTypeParams = 2;
|
|
16
16
|
static readonly $isPhantom: readonly [true, true];
|
|
17
17
|
readonly $typeName = "0x2::object_table::ObjectTable";
|
|
18
|
-
readonly $fullTypeName: `${typeof
|
|
18
|
+
readonly $fullTypeName: `${typeof PKG_V28}::object_table::ObjectTable<${PhantomToTypeStr<K>}, ${PhantomToTypeStr<V>}>`;
|
|
19
19
|
readonly $typeArgs: [PhantomToTypeStr<K>, PhantomToTypeStr<V>];
|
|
20
20
|
readonly $isPhantom: readonly [true, true];
|
|
21
21
|
readonly id: ToField<UID>;
|
|
@@ -19,7 +19,7 @@ const utils_1 = require("@mysten/sui/utils");
|
|
|
19
19
|
/* ============================== ObjectTable =============================== */
|
|
20
20
|
function isObjectTable(type) {
|
|
21
21
|
type = (0, util_1.compressSuiType)(type);
|
|
22
|
-
return type.startsWith(`${index_1.
|
|
22
|
+
return type.startsWith(`${index_1.PKG_V28}::object_table::ObjectTable` + "<");
|
|
23
23
|
}
|
|
24
24
|
exports.isObjectTable = isObjectTable;
|
|
25
25
|
class ObjectTable {
|
|
@@ -158,6 +158,6 @@ class ObjectTable {
|
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
exports.ObjectTable = ObjectTable;
|
|
161
|
-
ObjectTable.$typeName = `${index_1.
|
|
161
|
+
ObjectTable.$typeName = `${index_1.PKG_V28}::object_table::ObjectTable`;
|
|
162
162
|
ObjectTable.$numTypeParams = 2;
|
|
163
163
|
ObjectTable.$isPhantom = [true, true];
|
|
@@ -136,6 +136,14 @@ export interface AddReserveArgs {
|
|
|
136
136
|
clock: TransactionObjectInput;
|
|
137
137
|
}
|
|
138
138
|
export declare function addReserve(tx: Transaction, typeArgs: [string, string], args: AddReserveArgs): import("@mysten/sui/transactions").TransactionResult;
|
|
139
|
+
export interface ChangeReservePriceFeedArgs {
|
|
140
|
+
lendingMarketOwnerCap: TransactionObjectInput;
|
|
141
|
+
lendingMarket: TransactionObjectInput;
|
|
142
|
+
reserveArrayIndex: bigint | TransactionArgument;
|
|
143
|
+
priceInfoObj: TransactionObjectInput;
|
|
144
|
+
clock: TransactionObjectInput;
|
|
145
|
+
}
|
|
146
|
+
export declare function changeReservePriceFeed(tx: Transaction, typeArgs: [string, string], args: ChangeReservePriceFeedArgs): import("@mysten/sui/transactions").TransactionResult;
|
|
139
147
|
export interface ClaimRewardsAndDepositArgs {
|
|
140
148
|
lendingMarket: TransactionObjectInput;
|
|
141
149
|
obligationId: string | TransactionArgument;
|
|
@@ -173,6 +181,12 @@ export interface DepositCtokensIntoObligationByIdArgs {
|
|
|
173
181
|
deposit: TransactionObjectInput;
|
|
174
182
|
}
|
|
175
183
|
export declare function depositCtokensIntoObligationById(tx: Transaction, typeArgs: [string, string], args: DepositCtokensIntoObligationByIdArgs): import("@mysten/sui/transactions").TransactionResult;
|
|
184
|
+
export interface NewObligationOwnerCapArgs {
|
|
185
|
+
lendingMarketOwnerCap: TransactionObjectInput;
|
|
186
|
+
lendingMarket: TransactionObjectInput;
|
|
187
|
+
obligationId: string | TransactionArgument;
|
|
188
|
+
}
|
|
189
|
+
export declare function newObligationOwnerCap(tx: Transaction, typeArg: string, args: NewObligationOwnerCapArgs): import("@mysten/sui/transactions").TransactionResult;
|
|
176
190
|
export interface RedeemCtokensAndWithdrawLiquidityArgs {
|
|
177
191
|
lendingMarket: TransactionObjectInput;
|
|
178
192
|
reserveArrayIndex: bigint | TransactionArgument;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateRateLimiterConfig = exports.refreshReservePrice = exports.redeemCtokensAndWithdrawLiquidity = exports.depositCtokensIntoObligationById = exports.depositCtokensIntoObligation = exports.createLendingMarket = exports.claimRewardsByObligationId = exports.claimRewardsAndDeposit = exports.addReserve = exports.obligationId = exports.repay = exports.maxWithdrawAmount = exports.liquidate = exports.forgive = exports.reserveArrayIndex = exports.createObligation = exports.obligation = exports.withdrawCtokens = exports.updateReserveConfig = exports.maxBorrowAmount = exports.depositLiquidityAndMintCtokens = exports.claimFees = exports.reserve = exports.closePoolReward = exports.claimRewards = exports.cancelPoolReward = exports.addPoolReward = exports.init = exports.migrate = exports.borrow = void 0;
|
|
3
|
+
exports.updateRateLimiterConfig = exports.refreshReservePrice = exports.redeemCtokensAndWithdrawLiquidity = exports.newObligationOwnerCap = exports.depositCtokensIntoObligationById = exports.depositCtokensIntoObligation = exports.createLendingMarket = exports.claimRewardsByObligationId = exports.claimRewardsAndDeposit = exports.changeReservePriceFeed = exports.addReserve = exports.obligationId = exports.repay = exports.maxWithdrawAmount = exports.liquidate = exports.forgive = exports.reserveArrayIndex = exports.createObligation = exports.obligation = exports.withdrawCtokens = exports.updateReserveConfig = exports.maxBorrowAmount = exports.depositLiquidityAndMintCtokens = exports.claimFees = exports.reserve = exports.closePoolReward = exports.claimRewards = exports.cancelPoolReward = exports.addPoolReward = exports.init = exports.migrate = exports.borrow = void 0;
|
|
4
4
|
const __1 = require("..");
|
|
5
5
|
const structs_1 = require("../../_dependencies/source/0x2/object/structs");
|
|
6
6
|
const util_1 = require("../../_framework/util");
|
|
@@ -278,6 +278,20 @@ function addReserve(tx, typeArgs, args) {
|
|
|
278
278
|
});
|
|
279
279
|
}
|
|
280
280
|
exports.addReserve = addReserve;
|
|
281
|
+
function changeReservePriceFeed(tx, typeArgs, args) {
|
|
282
|
+
return tx.moveCall({
|
|
283
|
+
target: `${__1.PUBLISHED_AT}::lending_market::change_reserve_price_feed`,
|
|
284
|
+
typeArguments: typeArgs,
|
|
285
|
+
arguments: [
|
|
286
|
+
(0, util_1.obj)(tx, args.lendingMarketOwnerCap),
|
|
287
|
+
(0, util_1.obj)(tx, args.lendingMarket),
|
|
288
|
+
(0, util_1.pure)(tx, args.reserveArrayIndex, `u64`),
|
|
289
|
+
(0, util_1.obj)(tx, args.priceInfoObj),
|
|
290
|
+
(0, util_1.obj)(tx, args.clock),
|
|
291
|
+
],
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
exports.changeReservePriceFeed = changeReservePriceFeed;
|
|
281
295
|
function claimRewardsAndDeposit(tx, typeArgs, args) {
|
|
282
296
|
return tx.moveCall({
|
|
283
297
|
target: `${__1.PUBLISHED_AT}::lending_market::claim_rewards_and_deposit`,
|
|
@@ -346,6 +360,18 @@ function depositCtokensIntoObligationById(tx, typeArgs, args) {
|
|
|
346
360
|
});
|
|
347
361
|
}
|
|
348
362
|
exports.depositCtokensIntoObligationById = depositCtokensIntoObligationById;
|
|
363
|
+
function newObligationOwnerCap(tx, typeArg, args) {
|
|
364
|
+
return tx.moveCall({
|
|
365
|
+
target: `${__1.PUBLISHED_AT}::lending_market::new_obligation_owner_cap`,
|
|
366
|
+
typeArguments: [typeArg],
|
|
367
|
+
arguments: [
|
|
368
|
+
(0, util_1.obj)(tx, args.lendingMarketOwnerCap),
|
|
369
|
+
(0, util_1.obj)(tx, args.lendingMarket),
|
|
370
|
+
(0, util_1.pure)(tx, args.obligationId, `${structs_1.ID.$typeName}`),
|
|
371
|
+
],
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
exports.newObligationOwnerCap = newObligationOwnerCap;
|
|
349
375
|
function redeemCtokensAndWithdrawLiquidity(tx, typeArgs, args) {
|
|
350
376
|
return tx.moveCall({
|
|
351
377
|
target: `${__1.PUBLISHED_AT}::lending_market::redeem_ctokens_and_withdraw_liquidity`,
|
package/mainnet/client.js
CHANGED
|
@@ -49,6 +49,7 @@ const deps = {
|
|
|
49
49
|
migrate: functions_1.migrate,
|
|
50
50
|
claimFees: functions_1.claimFees,
|
|
51
51
|
redeemCtokensAndWithdrawLiquidity: functions_1.redeemCtokensAndWithdrawLiquidity,
|
|
52
|
+
changeReservePriceFeed: functions_1.changeReservePriceFeed,
|
|
52
53
|
};
|
|
53
54
|
class SuilendClient extends client_1.SuilendClient {
|
|
54
55
|
constructor(lendingMarket, client) {
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@suilend/sdk","version":"1.1.
|
|
1
|
+
{"name":"@suilend/sdk","version":"1.1.2","private":false,"description":"A TypeScript SDK for interacting with the Suilend program","author":"Suilend","license":"MIT","main":"./index.js","exports":{".":"./index.js","./mainnet/client":"./mainnet/client.js","./mainnet/constants":"./mainnet/constants.js","./mainnet":"./mainnet/index.js","./mainnet/types":"./mainnet/types.js","./mainnet/utils":"./mainnet/utils/index.js","./mainnet/api/events":"./mainnet/api/events.js","./mainnet/parsers/apiReserveAssetDataEvent":"./mainnet/parsers/apiReserveAssetDataEvent.js","./mainnet/parsers":"./mainnet/parsers/index.js","./mainnet/parsers/lendingMarket":"./mainnet/parsers/lendingMarket.js","./mainnet/parsers/obligation":"./mainnet/parsers/obligation.js","./mainnet/parsers/rateLimiter":"./mainnet/parsers/rateLimiter.js","./mainnet/parsers/reserve":"./mainnet/parsers/reserve.js","./mainnet/utils/events":"./mainnet/utils/events.js","./mainnet/utils/obligation":"./mainnet/utils/obligation.js","./mainnet/utils/simulate":"./mainnet/utils/simulate.js","./mainnet/_generated/_framework/reified":"./mainnet/_generated/_framework/reified.js","./mainnet/_generated/_framework/util":"./mainnet/_generated/_framework/util.js","./mainnet/_generated/_framework/vector":"./mainnet/_generated/_framework/vector.js","./mainnet/_generated/suilend":"./mainnet/_generated/suilend/index.js","./mainnet/_generated/suilend/cell/structs":"./mainnet/_generated/suilend/cell/structs.js","./mainnet/_generated/suilend/decimal/structs":"./mainnet/_generated/suilend/decimal/structs.js","./mainnet/_generated/suilend/lending-market/functions":"./mainnet/_generated/suilend/lending-market/functions.js","./mainnet/_generated/suilend/lending-market/structs":"./mainnet/_generated/suilend/lending-market/structs.js","./mainnet/_generated/suilend/lending-market-registry/functions":"./mainnet/_generated/suilend/lending-market-registry/functions.js","./mainnet/_generated/suilend/liquidity-mining/structs":"./mainnet/_generated/suilend/liquidity-mining/structs.js","./mainnet/_generated/suilend/obligation/structs":"./mainnet/_generated/suilend/obligation/structs.js","./mainnet/_generated/suilend/rate-limiter/functions":"./mainnet/_generated/suilend/rate-limiter/functions.js","./mainnet/_generated/suilend/rate-limiter/structs":"./mainnet/_generated/suilend/rate-limiter/structs.js","./mainnet/_generated/suilend/reserve/structs":"./mainnet/_generated/suilend/reserve/structs.js","./mainnet/_generated/suilend/reserve-config/functions":"./mainnet/_generated/suilend/reserve-config/functions.js","./mainnet/_generated/suilend/reserve-config/structs":"./mainnet/_generated/suilend/reserve-config/structs.js","./mainnet/_generated/_dependencies/source/0x1":"./mainnet/_generated/_dependencies/source/0x1/index.js","./mainnet/_generated/_dependencies/source/0x2":"./mainnet/_generated/_dependencies/source/0x2/index.js","./mainnet/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e":"./mainnet/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/index.js","./mainnet/_generated/_dependencies/source/0x1/ascii/structs":"./mainnet/_generated/_dependencies/source/0x1/ascii/structs.js","./mainnet/_generated/_dependencies/source/0x1/option/structs":"./mainnet/_generated/_dependencies/source/0x1/option/structs.js","./mainnet/_generated/_dependencies/source/0x1/type-name/structs":"./mainnet/_generated/_dependencies/source/0x1/type-name/structs.js","./mainnet/_generated/_dependencies/source/0x2/bag/structs":"./mainnet/_generated/_dependencies/source/0x2/bag/structs.js","./mainnet/_generated/_dependencies/source/0x2/balance/structs":"./mainnet/_generated/_dependencies/source/0x2/balance/structs.js","./mainnet/_generated/_dependencies/source/0x2/object/structs":"./mainnet/_generated/_dependencies/source/0x2/object/structs.js","./mainnet/_generated/_dependencies/source/0x2/object-table/structs":"./mainnet/_generated/_dependencies/source/0x2/object-table/structs.js","./mainnet/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-identifier/structs":"./mainnet/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-identifier/structs.js"},"types":"./index.js","scripts":{"build":"rm -rf ./dist && bun tsc","eslint":"eslint --fix \"./src/**/*.ts\"","prettier":"prettier --write \"./src/**/*\"","lint":"bun eslint && bun prettier && bun tsc","release":"bun run build && bun ts-node ./prepublish.ts && cd ./dist && npm publish --access public"},"repository":{"type":"git","url":"git+https://github.com/solendprotocol/suilend-public.git"},"bugs":{"url":"https://github.com/solendprotocol/suilend-public/issues"},"homepage":"https://github.com/solendprotocol/suilend-public/tree/HEAD/sdk#readme","dependencies":{"@mysten/bcs":"1.1.0","@mysten/sui":"1.12.0","@pythnetwork/pyth-sui-js":"^2.1.0","bignumber.js":"^9.1.2","p-limit":"3.1.0","uuid":"^9.0.1"},"devDependencies":{"@types/node":"^20.12.7","ts-node":"^10.9.2","typescript":"^5.3.3"}}
|