@suilend/sdk 1.1.0 → 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 +18 -2
- package/core/parsers/lendingMarket.d.ts +1 -1
- package/core/parsers/lendingMarket.js +1 -1
- package/core/parsers/obligation.d.ts +1 -1
- package/core/parsers/rateLimiter.d.ts +2 -2
- package/core/parsers/reserve.d.ts +4 -4
- package/core/types.d.ts +13 -0
- package/core/types.js +9 -2
- package/core/utils/events.js +3 -3
- package/mainnet/_generated/_dependencies/source/0x1/ascii/structs.d.ts +3 -3
- package/mainnet/_generated/_dependencies/source/0x1/ascii/structs.js +7 -7
- 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 +3 -3
- package/mainnet/_generated/_dependencies/source/0x1/option/structs.js +4 -4
- package/mainnet/_generated/_dependencies/source/0x1/type-name/structs.d.ts +2 -2
- package/mainnet/_generated/_dependencies/source/0x1/type-name/structs.js +4 -4
- package/mainnet/_generated/_dependencies/source/0x2/bag/structs.d.ts +2 -2
- package/mainnet/_generated/_dependencies/source/0x2/bag/structs.js +4 -4
- package/mainnet/_generated/_dependencies/source/0x2/balance/structs.d.ts +3 -3
- package/mainnet/_generated/_dependencies/source/0x2/balance/structs.js +7 -7
- 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 +7 -7
- package/mainnet/_generated/_dependencies/source/0x2/object-table/structs.d.ts +2 -2
- package/mainnet/_generated/_dependencies/source/0x2/object-table/structs.js +4 -4
- package/mainnet/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-identifier/structs.js +2 -2
- package/mainnet/_generated/_framework/reified.js +10 -10
- package/mainnet/_generated/_framework/util.d.ts +11 -5
- package/mainnet/_generated/_framework/util.js +13 -12
- package/mainnet/_generated/_framework/vector.d.ts +1 -1
- package/mainnet/_generated/_framework/vector.js +2 -2
- package/mainnet/_generated/suilend/cell/structs.d.ts +1 -1
- package/mainnet/_generated/suilend/cell/structs.js +2 -2
- package/mainnet/_generated/suilend/decimal/structs.js +2 -2
- package/mainnet/_generated/suilend/index.d.ts +1 -1
- package/mainnet/_generated/suilend/index.js +1 -1
- package/mainnet/_generated/suilend/lending-market/functions.d.ts +14 -0
- package/mainnet/_generated/suilend/lending-market/functions.js +57 -30
- package/mainnet/_generated/suilend/lending-market/structs.js +15 -15
- package/mainnet/_generated/suilend/lending-market-registry/functions.js +3 -2
- package/mainnet/_generated/suilend/liquidity-mining/structs.js +6 -6
- package/mainnet/_generated/suilend/obligation/structs.js +7 -7
- package/mainnet/_generated/suilend/rate-limiter/functions.js +7 -6
- package/mainnet/_generated/suilend/rate-limiter/structs.js +3 -3
- package/mainnet/_generated/suilend/reserve/structs.js +7 -7
- package/mainnet/_generated/suilend/reserve-config/functions.js +40 -39
- package/mainnet/_generated/suilend/reserve-config/structs.js +3 -3
- package/mainnet/client.js +1 -0
- package/mainnet/utils/obligation.js +6 -5
- 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`,
|
|
@@ -311,7 +327,7 @@ class SuilendClient {
|
|
|
311
327
|
reserveArrayIndexToPriceId.set(extraReserveArrayIndex, (0, utils_1.toHex)(new Uint8Array(reserve.priceIdentifier.bytes)));
|
|
312
328
|
}
|
|
313
329
|
const tuples = Array.from(reserveArrayIndexToPriceId.entries()).sort();
|
|
314
|
-
const priceIds = Array.from(
|
|
330
|
+
const priceIds = Array.from(tuples.map((tuple) => tuple[1]));
|
|
315
331
|
const priceUpdateData = yield this.pythConnection.getPriceFeedsUpdateData(priceIds);
|
|
316
332
|
const priceInfoObjectIds = yield this.pythClient.updatePriceFeeds(transaction, priceUpdateData, priceIds);
|
|
317
333
|
for (let i = 0; i < tuples.length; i++) {
|
|
@@ -2,7 +2,7 @@ import { CoinMetadata } from "@mysten/sui/client";
|
|
|
2
2
|
import BigNumber from "bignumber.js";
|
|
3
3
|
import { Deps } from "./deps";
|
|
4
4
|
export type ParsedLendingMarket = ReturnType<typeof parseLendingMarket>;
|
|
5
|
-
export declare const parseLendingMarket: ({ LendingMarket, Reserve, PoolRewardManager, PoolReward, simulate, RateLimiter, }: Pick<Deps, "LendingMarket" | "Reserve" | "PoolRewardManager" | "PoolReward" | "simulate" | "RateLimiter">, lendingMarket:
|
|
5
|
+
export declare const parseLendingMarket: ({ LendingMarket, Reserve, PoolRewardManager, PoolReward, simulate, RateLimiter, }: Pick<Deps, "LendingMarket" | "Reserve" | "PoolRewardManager" | "PoolReward" | "simulate" | "RateLimiter">, lendingMarket: any, reserves: any[], coinMetadataMap: Record<string, CoinMetadata>, currentTime: number) => {
|
|
6
6
|
id: any;
|
|
7
7
|
version: any;
|
|
8
8
|
reserves: {
|
|
@@ -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)
|
|
@@ -3,7 +3,7 @@ import { Deps } from "./deps";
|
|
|
3
3
|
import { ParsedReserve } from "./reserve";
|
|
4
4
|
export type ParsedObligation = ReturnType<typeof parseObligation>;
|
|
5
5
|
export type ParsedPosition = ParsedObligation["deposits"][0] | ParsedObligation["borrows"][0];
|
|
6
|
-
export declare const parseObligation: ({ Obligation }: Pick<Deps, "Obligation">, obligation:
|
|
6
|
+
export declare const parseObligation: ({ Obligation }: Pick<Deps, "Obligation">, obligation: any, parsedReserveMap: {
|
|
7
7
|
[coinType: string]: ParsedReserve;
|
|
8
8
|
}) => {
|
|
9
9
|
id: any;
|
|
@@ -2,7 +2,7 @@ import BigNumber from "bignumber.js";
|
|
|
2
2
|
import { Deps } from "./deps";
|
|
3
3
|
export type ParsedRateLimiter = ReturnType<typeof parseRateLimiter>;
|
|
4
4
|
export type ParsedRateLimiterConfig = ReturnType<typeof parseRateLimiterConfig>;
|
|
5
|
-
export declare const parseRateLimiter: ({ RateLimiter }: Pick<Deps, "RateLimiter">, rateLimiter:
|
|
5
|
+
export declare const parseRateLimiter: ({ RateLimiter }: Pick<Deps, "RateLimiter">, rateLimiter: any, currentTime: number) => {
|
|
6
6
|
config: {
|
|
7
7
|
windowDuration: any;
|
|
8
8
|
maxOutflow: any;
|
|
@@ -13,7 +13,7 @@ export declare const parseRateLimiter: ({ RateLimiter }: Pick<Deps, "RateLimiter
|
|
|
13
13
|
curQty: any;
|
|
14
14
|
remainingOutflow: BigNumber;
|
|
15
15
|
};
|
|
16
|
-
export declare const parseRateLimiterConfig: ({ RateLimiter }: Pick<Deps, "RateLimiter">, rateLimiter:
|
|
16
|
+
export declare const parseRateLimiterConfig: ({ RateLimiter }: Pick<Deps, "RateLimiter">, rateLimiter: any) => {
|
|
17
17
|
windowDuration: any;
|
|
18
18
|
maxOutflow: any;
|
|
19
19
|
};
|
|
@@ -5,7 +5,7 @@ export type ParsedReserve = ReturnType<typeof parseReserve>;
|
|
|
5
5
|
export type ParsedReserveConfig = ReturnType<typeof parseReserveConfig>;
|
|
6
6
|
export type ParsedPoolRewardManager = ReturnType<typeof parsePoolRewardManager>;
|
|
7
7
|
export type ParsedPoolReward = NonNullable<ReturnType<typeof parsePoolReward>>;
|
|
8
|
-
export declare const parseReserve: ({ Reserve, PoolRewardManager, PoolReward, simulate, }: Pick<Deps, "Reserve" | "PoolRewardManager" | "PoolReward" | "simulate">, reserve:
|
|
8
|
+
export declare const parseReserve: ({ Reserve, PoolRewardManager, PoolReward, simulate, }: Pick<Deps, "Reserve" | "PoolRewardManager" | "PoolReward" | "simulate">, reserve: any, coinMetadataMap: Record<string, CoinMetadata>) => {
|
|
9
9
|
config: {
|
|
10
10
|
$typeName: any;
|
|
11
11
|
openLtvPct: any;
|
|
@@ -107,7 +107,7 @@ export declare const parseReserve: ({ Reserve, PoolRewardManager, PoolReward, si
|
|
|
107
107
|
*/
|
|
108
108
|
totalDeposits: BigNumber;
|
|
109
109
|
};
|
|
110
|
-
export declare const parseReserveConfig: ({ Reserve }: Pick<Deps, "Reserve">, reserve:
|
|
110
|
+
export declare const parseReserveConfig: ({ Reserve }: Pick<Deps, "Reserve">, reserve: any) => {
|
|
111
111
|
$typeName: any;
|
|
112
112
|
openLtvPct: any;
|
|
113
113
|
closeLtvPct: any;
|
|
@@ -131,7 +131,7 @@ export declare const parseReserveConfig: ({ Reserve }: Pick<Deps, "Reserve">, re
|
|
|
131
131
|
aprPercent: BigNumber;
|
|
132
132
|
}[];
|
|
133
133
|
};
|
|
134
|
-
export declare const parsePoolRewardManager: ({ PoolRewardManager, PoolReward, }: Pick<Deps, "PoolRewardManager" | "PoolReward">, poolRewardManager:
|
|
134
|
+
export declare const parsePoolRewardManager: ({ PoolRewardManager, PoolReward, }: Pick<Deps, "PoolRewardManager" | "PoolReward">, poolRewardManager: any, coinMetadataMap: Record<string, CoinMetadata>) => {
|
|
135
135
|
$typeName: any;
|
|
136
136
|
id: any;
|
|
137
137
|
totalShares: any;
|
|
@@ -152,7 +152,7 @@ export declare const parsePoolRewardManager: ({ PoolRewardManager, PoolReward, }
|
|
|
152
152
|
}[];
|
|
153
153
|
lastUpdateTimeMs: any;
|
|
154
154
|
};
|
|
155
|
-
export declare const parsePoolReward: ({ PoolReward }: Pick<Deps, "PoolReward">, poolReward:
|
|
155
|
+
export declare const parsePoolReward: ({ PoolReward }: Pick<Deps, "PoolReward">, poolReward: any, rewardIndex: number, coinMetadataMap: Record<string, CoinMetadata>) => {
|
|
156
156
|
$typeName: any;
|
|
157
157
|
id: any;
|
|
158
158
|
poolRewardManagerId: any;
|
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,8 +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.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
|
-
exports.load = load;
|
|
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;
|
|
14
13
|
const bcs_1 = require("@mysten/bcs");
|
|
15
14
|
const utils_1 = require("@mysten/sui/utils");
|
|
16
15
|
exports.ID = bcs_1.bcs.struct("ID", {
|
|
@@ -117,9 +116,17 @@ function load(client, type, id) {
|
|
|
117
116
|
return type.parse((0, utils_1.fromBase64)(data.data.bcs.bcsBytes));
|
|
118
117
|
});
|
|
119
118
|
}
|
|
119
|
+
exports.load = load;
|
|
120
120
|
//
|
|
121
121
|
var Side;
|
|
122
122
|
(function (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 = {}));
|
package/core/utils/events.js
CHANGED
|
@@ -9,9 +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.ObligationDataEvent = exports.ClaimRewardEvent = exports.LiquidateEvent = exports.RepayEvent = exports.BorrowEvent = exports.WithdrawEvent = exports.DepositEvent = exports.RedeemEvent = exports.MintEvent = exports.ReserveAssetDataEvent = exports.InterestUpdateEvent = exports.GenericSuilendEvent = exports.SuilendTransactionModule = exports.SuilendEventType = void 0;
|
|
13
|
-
exports.getEvents = getEvents;
|
|
14
|
-
exports.getRedeemEvent = getRedeemEvent;
|
|
12
|
+
exports.getRedeemEvent = exports.getEvents = exports.ObligationDataEvent = exports.ClaimRewardEvent = exports.LiquidateEvent = exports.RepayEvent = exports.BorrowEvent = exports.WithdrawEvent = exports.DepositEvent = exports.RedeemEvent = exports.MintEvent = exports.ReserveAssetDataEvent = exports.InterestUpdateEvent = exports.GenericSuilendEvent = exports.SuilendTransactionModule = exports.SuilendEventType = void 0;
|
|
15
13
|
var SuilendEventType;
|
|
16
14
|
(function (SuilendEventType) {
|
|
17
15
|
SuilendEventType["InterestUpdateEvent"] = "InterestUpdateEvent";
|
|
@@ -91,6 +89,7 @@ function getEvents(client, digest) {
|
|
|
91
89
|
return events;
|
|
92
90
|
});
|
|
93
91
|
}
|
|
92
|
+
exports.getEvents = getEvents;
|
|
94
93
|
function getRedeemEvent(client, digest) {
|
|
95
94
|
return __awaiter(this, void 0, void 0, function* () {
|
|
96
95
|
const events = yield getEvents(client, digest);
|
|
@@ -102,3 +101,4 @@ function getRedeemEvent(client, digest) {
|
|
|
102
101
|
return null;
|
|
103
102
|
});
|
|
104
103
|
}
|
|
104
|
+
exports.getRedeemEvent = getRedeemEvent;
|
|
@@ -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">>;
|
|
@@ -32,9 +32,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.String = exports.Char = void 0;
|
|
36
|
-
exports.isChar = isChar;
|
|
37
|
-
exports.isString = isString;
|
|
35
|
+
exports.String = exports.isString = exports.Char = exports.isChar = void 0;
|
|
38
36
|
const reified = __importStar(require("../../../../_framework/reified"));
|
|
39
37
|
const reified_1 = require("../../../../_framework/reified");
|
|
40
38
|
const util_1 = require("../../../../_framework/util");
|
|
@@ -44,8 +42,9 @@ const utils_1 = require("@mysten/sui/utils");
|
|
|
44
42
|
/* ============================== Char =============================== */
|
|
45
43
|
function isChar(type) {
|
|
46
44
|
type = (0, util_1.compressSuiType)(type);
|
|
47
|
-
return type === `${index_1.
|
|
45
|
+
return type === `${index_1.PKG_V10}::ascii::Char`;
|
|
48
46
|
}
|
|
47
|
+
exports.isChar = isChar;
|
|
49
48
|
class Char {
|
|
50
49
|
constructor(typeArgs, fields) {
|
|
51
50
|
this.__StructClass = true;
|
|
@@ -159,14 +158,15 @@ class Char {
|
|
|
159
158
|
}
|
|
160
159
|
}
|
|
161
160
|
exports.Char = Char;
|
|
162
|
-
Char.$typeName = `${index_1.
|
|
161
|
+
Char.$typeName = `${index_1.PKG_V10}::ascii::Char`;
|
|
163
162
|
Char.$numTypeParams = 0;
|
|
164
163
|
Char.$isPhantom = [];
|
|
165
164
|
/* ============================== String =============================== */
|
|
166
165
|
function isString(type) {
|
|
167
166
|
type = (0, util_1.compressSuiType)(type);
|
|
168
|
-
return type === `${index_1.
|
|
167
|
+
return type === `${index_1.PKG_V10}::ascii::String`;
|
|
169
168
|
}
|
|
169
|
+
exports.isString = isString;
|
|
170
170
|
class String {
|
|
171
171
|
constructor(typeArgs, fields) {
|
|
172
172
|
this.__StructClass = true;
|
|
@@ -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>>;
|
|
@@ -26,7 +26,7 @@ export declare class Option<Element extends TypeArgument> implements StructClass
|
|
|
26
26
|
static get r(): typeof Option.reified;
|
|
27
27
|
static phantom<Element extends Reified<TypeArgument, any>>(Element: Element): PhantomReified<ToTypeStr<Option<ToTypeArgument<Element>>>>;
|
|
28
28
|
static get p(): typeof Option.phantom;
|
|
29
|
-
static get bcs(): <Element extends BcsType<any>>(Element: Element) => BcsType<{
|
|
29
|
+
static get bcs(): <Element extends BcsType<any, any>>(Element: Element) => BcsType<{
|
|
30
30
|
vec: any[];
|
|
31
31
|
}, {
|
|
32
32
|
vec: Iterable<any> & {
|
|
@@ -32,8 +32,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.Option = void 0;
|
|
36
|
-
exports.isOption = isOption;
|
|
35
|
+
exports.Option = exports.isOption = void 0;
|
|
37
36
|
const reified = __importStar(require("../../../../_framework/reified"));
|
|
38
37
|
const reified_1 = require("../../../../_framework/reified");
|
|
39
38
|
const util_1 = require("../../../../_framework/util");
|
|
@@ -43,8 +42,9 @@ const utils_1 = require("@mysten/sui/utils");
|
|
|
43
42
|
/* ============================== Option =============================== */
|
|
44
43
|
function isOption(type) {
|
|
45
44
|
type = (0, util_1.compressSuiType)(type);
|
|
46
|
-
return type.startsWith(`${index_1.
|
|
45
|
+
return type.startsWith(`${index_1.PKG_V10}::option::Option` + "<");
|
|
47
46
|
}
|
|
47
|
+
exports.isOption = isOption;
|
|
48
48
|
class Option {
|
|
49
49
|
constructor(typeArgs, fields) {
|
|
50
50
|
this.__StructClass = true;
|
|
@@ -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>;
|
|
@@ -9,8 +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.TypeName = void 0;
|
|
13
|
-
exports.isTypeName = isTypeName;
|
|
12
|
+
exports.TypeName = exports.isTypeName = void 0;
|
|
14
13
|
const reified_1 = require("../../../../_framework/reified");
|
|
15
14
|
const util_1 = require("../../../../_framework/util");
|
|
16
15
|
const structs_1 = require("../ascii/structs");
|
|
@@ -20,8 +19,9 @@ const utils_1 = require("@mysten/sui/utils");
|
|
|
20
19
|
/* ============================== TypeName =============================== */
|
|
21
20
|
function isTypeName(type) {
|
|
22
21
|
type = (0, util_1.compressSuiType)(type);
|
|
23
|
-
return type === `${index_1.
|
|
22
|
+
return type === `${index_1.PKG_V10}::type_name::TypeName`;
|
|
24
23
|
}
|
|
24
|
+
exports.isTypeName = isTypeName;
|
|
25
25
|
class TypeName {
|
|
26
26
|
constructor(typeArgs, fields) {
|
|
27
27
|
this.__StructClass = true;
|
|
@@ -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>;
|
|
@@ -9,8 +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.Bag = void 0;
|
|
13
|
-
exports.isBag = isBag;
|
|
12
|
+
exports.Bag = exports.isBag = void 0;
|
|
14
13
|
const reified_1 = require("../../../../_framework/reified");
|
|
15
14
|
const util_1 = require("../../../../_framework/util");
|
|
16
15
|
const index_1 = require("../index");
|
|
@@ -20,8 +19,9 @@ const utils_1 = require("@mysten/sui/utils");
|
|
|
20
19
|
/* ============================== Bag =============================== */
|
|
21
20
|
function isBag(type) {
|
|
22
21
|
type = (0, util_1.compressSuiType)(type);
|
|
23
|
-
return type === `${index_1.
|
|
22
|
+
return type === `${index_1.PKG_V28}::bag::Bag`;
|
|
24
23
|
}
|
|
24
|
+
exports.isBag = isBag;
|
|
25
25
|
class Bag {
|
|
26
26
|
constructor(typeArgs, fields) {
|
|
27
27
|
this.__StructClass = true;
|
|
@@ -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">;
|
|
@@ -9,9 +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.Supply = exports.Balance = void 0;
|
|
13
|
-
exports.isBalance = isBalance;
|
|
14
|
-
exports.isSupply = isSupply;
|
|
12
|
+
exports.Supply = exports.isSupply = exports.Balance = exports.isBalance = void 0;
|
|
15
13
|
const reified_1 = require("../../../../_framework/reified");
|
|
16
14
|
const util_1 = require("../../../../_framework/util");
|
|
17
15
|
const index_1 = require("../index");
|
|
@@ -20,8 +18,9 @@ const utils_1 = require("@mysten/sui/utils");
|
|
|
20
18
|
/* ============================== Balance =============================== */
|
|
21
19
|
function isBalance(type) {
|
|
22
20
|
type = (0, util_1.compressSuiType)(type);
|
|
23
|
-
return type.startsWith(`${index_1.
|
|
21
|
+
return type.startsWith(`${index_1.PKG_V28}::balance::Balance` + "<");
|
|
24
22
|
}
|
|
23
|
+
exports.isBalance = isBalance;
|
|
25
24
|
class Balance {
|
|
26
25
|
constructor(typeArgs, fields) {
|
|
27
26
|
this.__StructClass = true;
|
|
@@ -150,14 +149,15 @@ class Balance {
|
|
|
150
149
|
}
|
|
151
150
|
}
|
|
152
151
|
exports.Balance = Balance;
|
|
153
|
-
Balance.$typeName = `${index_1.
|
|
152
|
+
Balance.$typeName = `${index_1.PKG_V28}::balance::Balance`;
|
|
154
153
|
Balance.$numTypeParams = 1;
|
|
155
154
|
Balance.$isPhantom = [true];
|
|
156
155
|
/* ============================== Supply =============================== */
|
|
157
156
|
function isSupply(type) {
|
|
158
157
|
type = (0, util_1.compressSuiType)(type);
|
|
159
|
-
return type.startsWith(`${index_1.
|
|
158
|
+
return type.startsWith(`${index_1.PKG_V28}::balance::Supply` + "<");
|
|
160
159
|
}
|
|
160
|
+
exports.isSupply = isSupply;
|
|
161
161
|
class Supply {
|
|
162
162
|
constructor(typeArgs, fields) {
|
|
163
163
|
this.__StructClass = true;
|
|
@@ -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>;
|