@suilend/sdk 13.6.0 → 13.7.0-next.g7a9fc12
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/client.d.ts +7 -0
- package/client.js +12 -2
- package/package.json +1 -1
- package/utils/events.d.ts +13 -12
package/client.d.ts
CHANGED
|
@@ -128,6 +128,13 @@ export declare class SuilendClient {
|
|
|
128
128
|
claimRewardsAndDeposit(ownerId: string, obligationOwnerCap: TransactionObjectInput, rewards: ClaimRewardsReward[], transaction: Transaction): Transaction;
|
|
129
129
|
findReserveArrayIndex(coinType: string): bigint;
|
|
130
130
|
private submitReserveConfigUpdate;
|
|
131
|
+
/**
|
|
132
|
+
* From market version 8, sets every `CreateReserveConfigArgs` field on a
|
|
133
|
+
* builder seeded from the reserve's live config, so `additionalFields`
|
|
134
|
+
* entries (confidence multiplier, oracle thresholds, stable pause) keep
|
|
135
|
+
* their current values: version 8 installs only `build` output. At version
|
|
136
|
+
* 7 it replaces the whole config, which resets those entries.
|
|
137
|
+
*/
|
|
131
138
|
updateReserveConfig(lendingMarketOwnerCapId: string, transaction: Transaction, coinType: string, createReserveConfigArgs: CreateReserveConfigArgs): import("@mysten/sui/transactions").TransactionResult;
|
|
132
139
|
/**
|
|
133
140
|
* Updates a subset of a reserve's config fields, leaving every unspecified
|
package/client.js
CHANGED
|
@@ -650,9 +650,19 @@ export class SuilendClient {
|
|
|
650
650
|
config: transaction.object(config),
|
|
651
651
|
});
|
|
652
652
|
}
|
|
653
|
+
/**
|
|
654
|
+
* From market version 8, sets every `CreateReserveConfigArgs` field on a
|
|
655
|
+
* builder seeded from the reserve's live config, so `additionalFields`
|
|
656
|
+
* entries (confidence multiplier, oracle thresholds, stable pause) keep
|
|
657
|
+
* their current values: version 8 installs only `build` output. At version
|
|
658
|
+
* 7 it replaces the whole config, which resets those entries.
|
|
659
|
+
*/
|
|
653
660
|
updateReserveConfig(lendingMarketOwnerCapId, transaction, coinType, createReserveConfigArgs) {
|
|
654
|
-
|
|
655
|
-
|
|
661
|
+
if (this.lendingMarket.version < 8n) {
|
|
662
|
+
const [config] = createReserveConfig(transaction, createReserveConfigArgs);
|
|
663
|
+
return this.submitReserveConfigUpdate(lendingMarketOwnerCapId, transaction, coinType, config);
|
|
664
|
+
}
|
|
665
|
+
return this.patchReserveConfig(lendingMarketOwnerCapId, transaction, coinType, createReserveConfigArgs);
|
|
656
666
|
}
|
|
657
667
|
/**
|
|
658
668
|
* Updates a subset of a reserve's config fields, leaving every unspecified
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@suilend/sdk","version":"13.
|
|
1
|
+
{"name":"@suilend/sdk","version":"13.7.0-next.g7a9fc12","private":false,"description":"A TypeScript SDK for interacting with the Suilend program","author":"Suilend","license":"MIT","main":"./index.js","exports":{".":"./index.js","./client":"./client.js","./mmt":"./mmt.js","./strategies":"./strategies.js","./api/events":"./api/events.js","./api":"./api/index.js","./lib/constants":"./lib/constants.js","./lib":"./lib/index.js","./lib/initialize":"./lib/initialize.js","./lib/liquidityMining":"./lib/liquidityMining.js","./lib/proCompatible":"./lib/proCompatible.js","./lib/pyth":"./lib/pyth.js","./lib/strategyOwnerCap":"./lib/strategyOwnerCap.js","./lib/transactions":"./lib/transactions.js","./lib/types":"./lib/types.js","./margin":"./margin/index.js","./parsers/apiReserveAssetDataEvent":"./parsers/apiReserveAssetDataEvent.js","./parsers":"./parsers/index.js","./parsers/lendingMarket":"./parsers/lendingMarket.js","./parsers/obligation":"./parsers/obligation.js","./parsers/rateLimiter":"./parsers/rateLimiter.js","./parsers/reserve":"./parsers/reserve.js","./swap":"./swap/index.js","./swap/quote":"./swap/quote.js","./swap/transaction":"./swap/transaction.js","./utils/events":"./utils/events.js","./utils/feedId":"./utils/feedId.js","./utils":"./utils/index.js","./utils/interpolate":"./utils/interpolate.js","./utils/obligation":"./utils/obligation.js","./utils/priceGuard":"./utils/priceGuard.js","./utils/simulate":"./utils/simulate.js","./_generated/_envs":"./_generated/_envs/index.js","./_generated/_envs/mainnet":"./_generated/_envs/mainnet.js","./_generated/_framework/env":"./_generated/_framework/env.js","./_generated/_framework/reified":"./_generated/_framework/reified.js","./_generated/_framework/util":"./_generated/_framework/util.js","./_generated/_framework/vector":"./_generated/_framework/vector.js","./_generated/suilend":"./_generated/suilend/index.js","./margin/margin/admin_cap":"./margin/margin/admin_cap.js","./margin/margin/market":"./margin/margin/market.js","./margin/margin/permissions":"./margin/margin/permissions.js","./margin/margin/position":"./margin/margin/position.js","./margin/margin/router":"./margin/margin/router.js","./margin/margin/version":"./margin/margin/version.js","./margin/utils":"./margin/utils/index.js","./_generated/suilend/cell/structs":"./_generated/suilend/cell/structs.js","./_generated/suilend/decimal/structs":"./_generated/suilend/decimal/structs.js","./_generated/suilend/lending-market/functions":"./_generated/suilend/lending-market/functions.js","./_generated/suilend/lending-market/structs":"./_generated/suilend/lending-market/structs.js","./_generated/suilend/lending-market-registry/functions":"./_generated/suilend/lending-market-registry/functions.js","./_generated/suilend/liquidity-mining/structs":"./_generated/suilend/liquidity-mining/structs.js","./_generated/suilend/obligation/structs":"./_generated/suilend/obligation/structs.js","./_generated/suilend/rate-limiter/functions":"./_generated/suilend/rate-limiter/functions.js","./_generated/suilend/rate-limiter/structs":"./_generated/suilend/rate-limiter/structs.js","./_generated/suilend/reserve/structs":"./_generated/suilend/reserve/structs.js","./_generated/suilend/reserve-config/functions":"./_generated/suilend/reserve-config/functions.js","./_generated/suilend/reserve-config/structs":"./_generated/suilend/reserve-config/structs.js","./_generated/_dependencies/pyth-2/price-identifier/structs":"./_generated/_dependencies/pyth-2/price-identifier/structs.js","./_generated/_dependencies/std/ascii/structs":"./_generated/_dependencies/std/ascii/structs.js","./_generated/_dependencies/std/option/structs":"./_generated/_dependencies/std/option/structs.js","./_generated/_dependencies/std/type-name/structs":"./_generated/_dependencies/std/type-name/structs.js","./_generated/_dependencies/sui/bag/structs":"./_generated/_dependencies/sui/bag/structs.js","./_generated/_dependencies/sui/balance/structs":"./_generated/_dependencies/sui/balance/structs.js","./_generated/_dependencies/sui/object/structs":"./_generated/_dependencies/sui/object/structs.js","./_generated/_dependencies/sui/object-table/structs":"./_generated/_dependencies/sui/object-table/structs.js","./margin/margin/deps/std/type_name":"./margin/margin/deps/std/type_name.js","./margin/margin/deps/sui/vec_set":"./margin/margin/deps/sui/vec_set.js","./margin/margin/deps/suilend/lending_market":"./margin/margin/deps/suilend/lending_market.js"},"types":"./index.d.ts","scripts":{"codegen":"node ./codegen.js","codegen:install":"node ./install-codegen.js","build":"rm -rf ./dist && tsc && node ./fix-esm-imports.js","typecheck":"tsc --noEmit && tsc --noEmit -p tsconfig.test.json","test":"vitest run","lint:ci":"yarn run typecheck","prettier":"prettier --write src/ tests/","release":"yarn run build && node ./release.js && cd ./dist && npm publish --access public"},"repository":{"type":"git","url":"git+https://github.com/fireflyprotocol/lending-mono.git","directory":"ts/sdks/sdk"},"dependencies":{"@bluefin-exchange/bluefin7k-aggregator-sdk":"7.7.0","@cetusprotocol/aggregator-sdk":"1.7.3","@flowx-finance/sdk":"2.1.0","@pythnetwork/hermes-client":"3.1.0","@pythnetwork/pyth-sui-js":"4.0.0","@suilend/springsui-sdk":"4.1.0","bignumber.js":"11.1.5","bn.js":"5.2.5","crypto-js":"4.2.0","lodash":"4.18.1","p-limit":"7.3.3","uuid":"14.0.2"},"devDependencies":{"@mysten/bcs":"2.1.2","@mysten/sui":"2.35.0","@suilend/sui-core":"2.2.0","@tsconfig/recommended":"1.0.13","@types/bn.js":"5.2.0","@types/lodash":"4.17.26","@types/node":"26.6.5","fast-check":"4.10.2","prettier":"3.9.10","ts-node":"10.9.2","typescript":"6.0.3","vite":"8.3.4","vitest":"5.0.4"},"peerDependencies":{"@mysten/bcs":"^2.1.1","@mysten/sui":">=2.31.3 <3","@suilend/sui-core":"^2.0.1"},"type":"module"}
|
package/utils/events.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ type Decimal = {
|
|
|
8
8
|
};
|
|
9
9
|
type address = string;
|
|
10
10
|
type u64 = string;
|
|
11
|
+
type u256 = string;
|
|
11
12
|
export declare enum SuilendEventType {
|
|
12
13
|
InterestUpdateEvent = "InterestUpdateEvent",
|
|
13
14
|
ReserveAssetDataEvent = "ReserveAssetDataEvent",
|
|
@@ -73,20 +74,20 @@ export declare class ReserveAssetDataEventV2 extends TypedParamsSuiEvent<{
|
|
|
73
74
|
lending_market_id: address;
|
|
74
75
|
coin_type: TypeName;
|
|
75
76
|
reserve_id: address;
|
|
76
|
-
available_amount:
|
|
77
|
-
supply_amount:
|
|
78
|
-
borrowed_amount:
|
|
79
|
-
available_amount_usd_estimate:
|
|
80
|
-
supply_amount_usd_estimate:
|
|
81
|
-
borrowed_amount_usd_estimate:
|
|
82
|
-
borrow_apr:
|
|
83
|
-
supply_apr:
|
|
77
|
+
available_amount: u256;
|
|
78
|
+
supply_amount: u256;
|
|
79
|
+
borrowed_amount: u256;
|
|
80
|
+
available_amount_usd_estimate: u256;
|
|
81
|
+
supply_amount_usd_estimate: u256;
|
|
82
|
+
borrowed_amount_usd_estimate: u256;
|
|
83
|
+
borrow_apr: u256;
|
|
84
|
+
supply_apr: u256;
|
|
84
85
|
ctoken_supply: u64;
|
|
85
|
-
cumulative_borrow_rate:
|
|
86
|
-
price:
|
|
87
|
-
smoothed_price:
|
|
86
|
+
cumulative_borrow_rate: u256;
|
|
87
|
+
price: u256;
|
|
88
|
+
smoothed_price: u256;
|
|
88
89
|
price_last_update_timestamp_s: u64;
|
|
89
|
-
conf:
|
|
90
|
+
conf: u256;
|
|
90
91
|
}> {
|
|
91
92
|
}
|
|
92
93
|
export declare class MintEvent extends TypedParamsSuiEvent<{
|