@scallop-io/sui-scallop-sdk 4.1.2 → 4.3.0
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/README.md +356 -140
- package/dist/builder.cjs +5 -4
- package/dist/builder.d.cts +2 -2
- package/dist/builder.d.ts +2 -2
- package/dist/builder.js +2 -2
- package/dist/chunk-FNZDTB3A.js +16 -0
- package/dist/chunk-UCRLKWQI.js +11 -0
- package/dist/{chunk-VTGQACWU.js → chunk-ZAFUZGSI.js} +2 -2
- package/dist/client.cjs +5 -4
- package/dist/client.d.cts +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.js +3 -3
- package/dist/index.cjs +24 -23
- package/dist/index.d.cts +2 -6
- package/dist/index.d.ts +2 -6
- package/dist/index.js +4 -4
- package/dist/{query-DkitepDi.d.ts → query-b84awDFp.d.ts} +80 -9
- package/dist/query.cjs +5 -4
- package/dist/query.d.cts +1 -1
- package/dist/query.d.ts +1 -1
- package/dist/query.js +1 -1
- package/dist/types.d.cts +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +4 -2
- package/src/constants/queryKeys.ts +0 -12
- package/src/constants/testAddress.ts +9 -1
- package/src/datasources/api.ts +3 -3
- package/src/models/scallop.ts +0 -1
- package/src/models/scallopAddress/const.ts +5 -0
- package/src/models/scallopAddress/index.ts +2 -2
- package/src/models/scallopAddress/types.ts +5 -0
- package/src/models/scallopQuery/index.ts +10 -0
- package/src/models/scallopUtils/index.ts +3 -3
- package/src/models/scallopUtils/types.ts +1 -1
- package/src/repositories/addressApi/types.ts +4 -0
- package/src/repositories/obligation/helpers.ts +59 -0
- package/src/repositories/obligation/index.ts +5 -0
- package/src/repositories/obligation/types.ts +17 -1
- package/src/repositories/obligation/utils.ts +22 -0
- package/src/repositories/price/helpers.ts +7 -2
- package/src/repositories/price/types.ts +2 -2
- package/src/repositories/wiring/metadata.ts +1 -0
- package/src/txBuilders/index.ts +8 -1
- package/src/txBuilders/manifest.ts +8 -1
- package/src/txBuilders/modules.ts +6 -0
- package/src/txBuilders/obligationNaming/index.ts +46 -0
- package/src/txBuilders/obligationNaming/moveCalls.ts +33 -0
- package/src/txBuilders/oracles/pyth.ts +1 -5
- package/src/types/builder/index.ts +5 -1
- package/src/types/builder/modules.ts +3 -0
- package/src/types/builder/obligationNaming.ts +18 -0
- package/dist/chunk-33AK5RWM.js +0 -15
- package/dist/chunk-DIC6P5HB.js +0 -11
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SuiClientTypes } from '@mysten/sui/client';
|
|
2
2
|
import { SuiObjectArg, SuiTxArg, SuiAmountsArg, NetworkType } from '@scallop-io/sui-kit';
|
|
3
|
-
import { c as SuiObjectDataOptions, G as GetDynamicFieldsParams, d as GetDynamicFieldObjectParams, e as SuiObjectData, S as ScallopBuilder, f as ScallopQuery, g as ScallopUtils, h as ScallopConstants, A as AddressesInterface, x as xOracleListType, P as PoolAddress, W as Whitelist, i as AddressStringPath } from './query-
|
|
4
|
-
export { B as BaseScallopTxBlock, j as BorrowIncentiveAccounts, k as BorrowIncentiveIds, l as BorrowIncentiveModule, m as BorrowIncentiveNormalMethods, n as BorrowIncentivePool, o as BorrowIncentivePoolPoints, p as BorrowIncentivePools, q as BorrowIncentiveQuickMethods, r as BorrowIncentiveTxBlock, C as CalculatedSpoolData, s as CalculatedSpoolRewardPoolData, t as CoinBalance, u as CoinPrices, v as CoinWrappedType, w as CoreIds, y as CoreModule, z as CoreNormalMethods, D as CoreQuickMethods, E as CoreTxBlock, F as DevInspectResults, H as DynamicFieldPage, I as EncodeDynamicFieldNameInput, J as GenerateBorrowIncentiveNormalMethod, K as GenerateBorrowIncentiveQuickMethod, L as GenerateCoreNormalMethod, M as GenerateCoreQuickMethod, N as GenerateLoyaltyProgramNormalMethod, O as GenerateLoyaltyProgramQuickMethod, Q as
|
|
3
|
+
import { c as SuiObjectDataOptions, G as GetDynamicFieldsParams, d as GetDynamicFieldObjectParams, e as SuiObjectData, S as ScallopBuilder, f as ScallopQuery, g as ScallopUtils, h as ScallopConstants, A as AddressesInterface, x as xOracleListType, P as PoolAddress, W as Whitelist, i as AddressStringPath } from './query-b84awDFp.js';
|
|
4
|
+
export { B as BaseScallopTxBlock, j as BorrowIncentiveAccounts, k as BorrowIncentiveIds, l as BorrowIncentiveModule, m as BorrowIncentiveNormalMethods, n as BorrowIncentivePool, o as BorrowIncentivePoolPoints, p as BorrowIncentivePools, q as BorrowIncentiveQuickMethods, r as BorrowIncentiveTxBlock, C as CalculatedSpoolData, s as CalculatedSpoolRewardPoolData, t as CoinBalance, u as CoinPrices, v as CoinWrappedType, w as CoreIds, y as CoreModule, z as CoreNormalMethods, D as CoreQuickMethods, E as CoreTxBlock, F as DevInspectResults, H as DynamicFieldPage, I as EncodeDynamicFieldNameInput, J as GenerateBorrowIncentiveNormalMethod, K as GenerateBorrowIncentiveQuickMethod, L as GenerateCoreNormalMethod, M as GenerateCoreQuickMethod, N as GenerateLoyaltyProgramNormalMethod, O as GenerateLoyaltyProgramQuickMethod, Q as GenerateObligationNamingNormalMethod, R as GenerateReferralNormalMethod, T as GenerateReferralQuickMethod, U as GenerateSCoinNormalMethod, V as GenerateSCoinQuickMethod, X as GenerateSpoolNormalMethod, Y as GenerateSpoolQuickMethod, Z as GenerateVeScaNormalMethod, _ as GenerateVeScaQuickMethod, $ as GetBalanceParams, a0 as GetOwnedObjectsParams, a1 as InspectTxnParsedJson, a2 as Lending, a3 as Lendings, a4 as LoyaltyModule, a5 as LoyaltyProgramInfo, a6 as LoyaltyProgramNormalMethods, a7 as LoyaltyProgramQuickMethods, a8 as LoyaltyProgramTxBlock, a9 as Market, aa as MarketCollateral, ab as MarketCollaterals, ac as MarketPool, ad as MarketPools, ae as Markets, af as NestedResult, ag as ObligationAccount, ah as ObligationAccounts, ai as ObligationBorrowIncentive, aj as ObligationBorrowIncentiveReward, ak as ObligationCollateral, al as ObligationDebt, am as ObligationNamingModule, an as ObligationNamingNormalMethods, ao as ObligationNamingTxBlock, ap as OptionalKeys, aq as OriginSpoolData, ar as OriginSpoolRewardPoolData, as as PaginatedObjectsResponse, at as ParsedBorrowIncentiveAccountData, au as ParsedBorrowIncentiveAccountPoolData, av as ParsedSpoolData, aw as ParsedSpoolRewardPoolData, ax as QuickMethodReturnType, ay as ReferralIds, az as ReferralModule, aA as ReferralNormalMethods, aB as ReferralQuickMethods, aC as ReferralTxBlock, aD as SCoinActionContext, aE as SCoinModule, aF as SCoinTxBlock, aG as ScallopAddress, a as ScallopTxBlock, aH as ScallopTxBlockModules, aI as Spool, aJ as SpoolActionContext, aK as SpoolData, aL as SpoolIds, aM as SpoolModule, aN as SpoolNormalMethods, aO as SpoolQuickMethods, aP as SpoolRewardPool, aQ as SpoolTxBlock, aR as Spools, aS as StakeAccount, aT as StakeAccounts, aU as StakePool, aV as StakePools, aW as StakeRewardPool, aX as StakeRewardPools, aY as SuiKitTransactionExecutor, aZ as SuiObjectRef, a_ as SuiObjectResponse, a$ as SuiParsedData, b0 as SuiTxBlockWithBorrowIncentiveNormalMethods, b1 as SuiTxBlockWithCoreNormalMethods, b2 as SuiTxBlockWithLoyaltyProgramNormalMethods, b3 as SuiTxBlockWithObligationNamingNormalMethods, b4 as SuiTxBlockWithReferralNormalMethods, b5 as SuiTxBlockWithSCoin, b6 as SuiTxBlockWithSCoinNormalMethods, b7 as SuiTxBlockWithSpool, b8 as SuiTxBlockWithSpoolNormalMethods, b9 as SuiTxBlockWithVeScaNormalMethods, ba as SupportOracleType, bb as TotalValueLocked, bc as TransactionCommand, bd as VeSca, be as VeScaLoyaltyProgramInfo, bf as VeScaModule, bg as VeScaNormalMethods, bh as VeScaQuickMethods, bi as VeScaTreasuryInfo, bj as VeScaTxBlock, bd as Vesca, bk as _SUPPORT_ORACLES, bl as sCoinNormalMethods, bm as sCoinPkgIds, bn as sCoinQuickMethods, bo as xOracleRuleType, bp as xOracleRules } from './query-b84awDFp.js';
|
|
5
5
|
import { ScallopClient, ScallopClientConstructorParams } from './client.cjs';
|
|
6
6
|
export { AssetCoinIds, AssetCoins, BorrowIncentiveRewardCoins, CoinAmounts, Coins, MarketCoinAmounts, MarketCoins, Obligation, ObligationQueryInterface, SCoinAmounts, SCoinConverterTreasury, SCoinIds, SCoinTreasuryCaps, SCoins, StakeMarketCoins, StakeRewardCoins, SuiBridgeCoins, SuiBridgedCoinPackageIds, VoloCoinIds, WormholeCoinIds, sCoinBalance } from './types.cjs';
|
|
7
7
|
export { ScallopConfigError, ScallopError, ScallopErrorCode, ScallopErrorOptions, ScallopIndexerError, ScallopParseError, ScallopRpcError, ScallopTransactionBuildError } from './errors.cjs';
|
|
@@ -89,7 +89,6 @@ declare const queryKeys: {
|
|
|
89
89
|
getPoolAddresses: () => string[];
|
|
90
90
|
getMarkets: () => string[];
|
|
91
91
|
getSpools: () => string[];
|
|
92
|
-
getBorrowIncentivePools: () => string[];
|
|
93
92
|
getTotalValueLocked: () => string[];
|
|
94
93
|
};
|
|
95
94
|
rpc: {
|
|
@@ -107,11 +106,9 @@ declare const queryKeys: {
|
|
|
107
106
|
})[];
|
|
108
107
|
getCoinBalance: (props?: QueryKeys.RPC.GetCoinBalance) => (string | QueryKeys.RPC.GetCoinBalance | undefined)[];
|
|
109
108
|
getAllCoinBalances: (props?: QueryKeys.RPC.GetAllCoinBalances) => (string | QueryKeys.RPC.GetAllCoinBalances | undefined)[];
|
|
110
|
-
getNormalizedMoveFunction: (props?: QueryKeys.RPC.GetNormalizedMoveFunction) => (string | QueryKeys.RPC.GetNormalizedMoveFunction | undefined)[];
|
|
111
109
|
};
|
|
112
110
|
oracle: {
|
|
113
111
|
getPythLatestPriceFeeds: (endpoint?: string, priceIds?: string[]) => (string | string[] | undefined)[];
|
|
114
|
-
getCoinPrices: (priceIds: string[]) => (string | string[])[];
|
|
115
112
|
};
|
|
116
113
|
};
|
|
117
114
|
|
|
@@ -130,7 +127,6 @@ declare const RPC_PROVIDERS: string[];
|
|
|
130
127
|
* const scallopConstants = await sdk.getScallopConstants();
|
|
131
128
|
* const scallopBuilder = await sdk.createScallopBuilder();
|
|
132
129
|
* const scallopClient = await sdk.createScallopClient();
|
|
133
|
-
* const scallopIndexer = await sdk.createScallopIndexer();
|
|
134
130
|
* const scallopUtils = await sdk.createScallopUtils();
|
|
135
131
|
* ```
|
|
136
132
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SuiClientTypes } from '@mysten/sui/client';
|
|
2
2
|
import { SuiObjectArg, SuiTxArg, SuiAmountsArg, NetworkType } from '@scallop-io/sui-kit';
|
|
3
|
-
import { c as SuiObjectDataOptions, G as GetDynamicFieldsParams, d as GetDynamicFieldObjectParams, e as SuiObjectData, S as ScallopBuilder, f as ScallopQuery, g as ScallopUtils, h as ScallopConstants, A as AddressesInterface, x as xOracleListType, P as PoolAddress, W as Whitelist, i as AddressStringPath } from './query-
|
|
4
|
-
export { B as BaseScallopTxBlock, j as BorrowIncentiveAccounts, k as BorrowIncentiveIds, l as BorrowIncentiveModule, m as BorrowIncentiveNormalMethods, n as BorrowIncentivePool, o as BorrowIncentivePoolPoints, p as BorrowIncentivePools, q as BorrowIncentiveQuickMethods, r as BorrowIncentiveTxBlock, C as CalculatedSpoolData, s as CalculatedSpoolRewardPoolData, t as CoinBalance, u as CoinPrices, v as CoinWrappedType, w as CoreIds, y as CoreModule, z as CoreNormalMethods, D as CoreQuickMethods, E as CoreTxBlock, F as DevInspectResults, H as DynamicFieldPage, I as EncodeDynamicFieldNameInput, J as GenerateBorrowIncentiveNormalMethod, K as GenerateBorrowIncentiveQuickMethod, L as GenerateCoreNormalMethod, M as GenerateCoreQuickMethod, N as GenerateLoyaltyProgramNormalMethod, O as GenerateLoyaltyProgramQuickMethod, Q as
|
|
3
|
+
import { c as SuiObjectDataOptions, G as GetDynamicFieldsParams, d as GetDynamicFieldObjectParams, e as SuiObjectData, S as ScallopBuilder, f as ScallopQuery, g as ScallopUtils, h as ScallopConstants, A as AddressesInterface, x as xOracleListType, P as PoolAddress, W as Whitelist, i as AddressStringPath } from './query-b84awDFp.js';
|
|
4
|
+
export { B as BaseScallopTxBlock, j as BorrowIncentiveAccounts, k as BorrowIncentiveIds, l as BorrowIncentiveModule, m as BorrowIncentiveNormalMethods, n as BorrowIncentivePool, o as BorrowIncentivePoolPoints, p as BorrowIncentivePools, q as BorrowIncentiveQuickMethods, r as BorrowIncentiveTxBlock, C as CalculatedSpoolData, s as CalculatedSpoolRewardPoolData, t as CoinBalance, u as CoinPrices, v as CoinWrappedType, w as CoreIds, y as CoreModule, z as CoreNormalMethods, D as CoreQuickMethods, E as CoreTxBlock, F as DevInspectResults, H as DynamicFieldPage, I as EncodeDynamicFieldNameInput, J as GenerateBorrowIncentiveNormalMethod, K as GenerateBorrowIncentiveQuickMethod, L as GenerateCoreNormalMethod, M as GenerateCoreQuickMethod, N as GenerateLoyaltyProgramNormalMethod, O as GenerateLoyaltyProgramQuickMethod, Q as GenerateObligationNamingNormalMethod, R as GenerateReferralNormalMethod, T as GenerateReferralQuickMethod, U as GenerateSCoinNormalMethod, V as GenerateSCoinQuickMethod, X as GenerateSpoolNormalMethod, Y as GenerateSpoolQuickMethod, Z as GenerateVeScaNormalMethod, _ as GenerateVeScaQuickMethod, $ as GetBalanceParams, a0 as GetOwnedObjectsParams, a1 as InspectTxnParsedJson, a2 as Lending, a3 as Lendings, a4 as LoyaltyModule, a5 as LoyaltyProgramInfo, a6 as LoyaltyProgramNormalMethods, a7 as LoyaltyProgramQuickMethods, a8 as LoyaltyProgramTxBlock, a9 as Market, aa as MarketCollateral, ab as MarketCollaterals, ac as MarketPool, ad as MarketPools, ae as Markets, af as NestedResult, ag as ObligationAccount, ah as ObligationAccounts, ai as ObligationBorrowIncentive, aj as ObligationBorrowIncentiveReward, ak as ObligationCollateral, al as ObligationDebt, am as ObligationNamingModule, an as ObligationNamingNormalMethods, ao as ObligationNamingTxBlock, ap as OptionalKeys, aq as OriginSpoolData, ar as OriginSpoolRewardPoolData, as as PaginatedObjectsResponse, at as ParsedBorrowIncentiveAccountData, au as ParsedBorrowIncentiveAccountPoolData, av as ParsedSpoolData, aw as ParsedSpoolRewardPoolData, ax as QuickMethodReturnType, ay as ReferralIds, az as ReferralModule, aA as ReferralNormalMethods, aB as ReferralQuickMethods, aC as ReferralTxBlock, aD as SCoinActionContext, aE as SCoinModule, aF as SCoinTxBlock, aG as ScallopAddress, a as ScallopTxBlock, aH as ScallopTxBlockModules, aI as Spool, aJ as SpoolActionContext, aK as SpoolData, aL as SpoolIds, aM as SpoolModule, aN as SpoolNormalMethods, aO as SpoolQuickMethods, aP as SpoolRewardPool, aQ as SpoolTxBlock, aR as Spools, aS as StakeAccount, aT as StakeAccounts, aU as StakePool, aV as StakePools, aW as StakeRewardPool, aX as StakeRewardPools, aY as SuiKitTransactionExecutor, aZ as SuiObjectRef, a_ as SuiObjectResponse, a$ as SuiParsedData, b0 as SuiTxBlockWithBorrowIncentiveNormalMethods, b1 as SuiTxBlockWithCoreNormalMethods, b2 as SuiTxBlockWithLoyaltyProgramNormalMethods, b3 as SuiTxBlockWithObligationNamingNormalMethods, b4 as SuiTxBlockWithReferralNormalMethods, b5 as SuiTxBlockWithSCoin, b6 as SuiTxBlockWithSCoinNormalMethods, b7 as SuiTxBlockWithSpool, b8 as SuiTxBlockWithSpoolNormalMethods, b9 as SuiTxBlockWithVeScaNormalMethods, ba as SupportOracleType, bb as TotalValueLocked, bc as TransactionCommand, bd as VeSca, be as VeScaLoyaltyProgramInfo, bf as VeScaModule, bg as VeScaNormalMethods, bh as VeScaQuickMethods, bi as VeScaTreasuryInfo, bj as VeScaTxBlock, bd as Vesca, bk as _SUPPORT_ORACLES, bl as sCoinNormalMethods, bm as sCoinPkgIds, bn as sCoinQuickMethods, bo as xOracleRuleType, bp as xOracleRules } from './query-b84awDFp.js';
|
|
5
5
|
import { ScallopClient, ScallopClientConstructorParams } from './client.js';
|
|
6
6
|
export { AssetCoinIds, AssetCoins, BorrowIncentiveRewardCoins, CoinAmounts, Coins, MarketCoinAmounts, MarketCoins, Obligation, ObligationQueryInterface, SCoinAmounts, SCoinConverterTreasury, SCoinIds, SCoinTreasuryCaps, SCoins, StakeMarketCoins, StakeRewardCoins, SuiBridgeCoins, SuiBridgedCoinPackageIds, VoloCoinIds, WormholeCoinIds, sCoinBalance } from './types.js';
|
|
7
7
|
export { ScallopConfigError, ScallopError, ScallopErrorCode, ScallopErrorOptions, ScallopIndexerError, ScallopParseError, ScallopRpcError, ScallopTransactionBuildError } from './errors.js';
|
|
@@ -89,7 +89,6 @@ declare const queryKeys: {
|
|
|
89
89
|
getPoolAddresses: () => string[];
|
|
90
90
|
getMarkets: () => string[];
|
|
91
91
|
getSpools: () => string[];
|
|
92
|
-
getBorrowIncentivePools: () => string[];
|
|
93
92
|
getTotalValueLocked: () => string[];
|
|
94
93
|
};
|
|
95
94
|
rpc: {
|
|
@@ -107,11 +106,9 @@ declare const queryKeys: {
|
|
|
107
106
|
})[];
|
|
108
107
|
getCoinBalance: (props?: QueryKeys.RPC.GetCoinBalance) => (string | QueryKeys.RPC.GetCoinBalance | undefined)[];
|
|
109
108
|
getAllCoinBalances: (props?: QueryKeys.RPC.GetAllCoinBalances) => (string | QueryKeys.RPC.GetAllCoinBalances | undefined)[];
|
|
110
|
-
getNormalizedMoveFunction: (props?: QueryKeys.RPC.GetNormalizedMoveFunction) => (string | QueryKeys.RPC.GetNormalizedMoveFunction | undefined)[];
|
|
111
109
|
};
|
|
112
110
|
oracle: {
|
|
113
111
|
getPythLatestPriceFeeds: (endpoint?: string, priceIds?: string[]) => (string | string[] | undefined)[];
|
|
114
|
-
getCoinPrices: (priceIds: string[]) => (string | string[])[];
|
|
115
112
|
};
|
|
116
113
|
};
|
|
117
114
|
|
|
@@ -130,7 +127,6 @@ declare const RPC_PROVIDERS: string[];
|
|
|
130
127
|
* const scallopConstants = await sdk.getScallopConstants();
|
|
131
128
|
* const scallopBuilder = await sdk.createScallopBuilder();
|
|
132
129
|
* const scallopClient = await sdk.createScallopClient();
|
|
133
|
-
* const scallopIndexer = await sdk.createScallopIndexer();
|
|
134
130
|
* const scallopUtils = await sdk.createScallopUtils();
|
|
135
131
|
* ```
|
|
136
132
|
*/
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as a$1 } from './chunk-
|
|
2
|
-
export { a as ScallopClient } from './chunk-
|
|
3
|
-
export { c as ScallopBuilder, b as SuiKitTransactionExecutor } from './chunk-
|
|
4
|
-
export { a as API_BASE_URL, c as DEFAULT_CACHE_OPTIONS, e as IS_VE_SCA_TEST, o as MAX_LOCK_DURATION, n as MAX_LOCK_ROUNDS, p as MIN_INITIAL_LOCK_AMOUNT, q as MIN_TOP_UP_AMOUNT, g as OLD_BORROW_INCENTIVE_PROTOCOL_ID, l as POOL_ADDRESSES, J as REQUIRED_CORE_PATHS, K as REQUIRED_WHITELIST_KEYS, i as RPC_PROVIDERS, d as SCA_COIN_TYPE, b as SDK_API_BASE_URL, F as ScallopAddress, P as ScallopConstants, R as ScallopQuery, Q as ScallopUtils, j as TEST_ADDRESSES, m as UNLOCK_ROUND_DURATION, f as USE_TEST_ADDRESS, k as WHITELIST, M as assertConfigSnapshot, G as createLiveAddressConfigSource, H as createLivePoolAddressConfigSource, I as createLiveWhitelistConfigSource, O as createScallopConfigSnapshot, N as loadScallopConfigSnapshot, h as queryKeys, L as validateConfigSnapshot, r as xOracleList } from './chunk-
|
|
1
|
+
import { a as a$1 } from './chunk-ZAFUZGSI.js';
|
|
2
|
+
export { a as ScallopClient } from './chunk-ZAFUZGSI.js';
|
|
3
|
+
export { c as ScallopBuilder, b as SuiKitTransactionExecutor } from './chunk-UCRLKWQI.js';
|
|
4
|
+
export { a as API_BASE_URL, c as DEFAULT_CACHE_OPTIONS, e as IS_VE_SCA_TEST, o as MAX_LOCK_DURATION, n as MAX_LOCK_ROUNDS, p as MIN_INITIAL_LOCK_AMOUNT, q as MIN_TOP_UP_AMOUNT, g as OLD_BORROW_INCENTIVE_PROTOCOL_ID, l as POOL_ADDRESSES, J as REQUIRED_CORE_PATHS, K as REQUIRED_WHITELIST_KEYS, i as RPC_PROVIDERS, d as SCA_COIN_TYPE, b as SDK_API_BASE_URL, F as ScallopAddress, P as ScallopConstants, R as ScallopQuery, Q as ScallopUtils, j as TEST_ADDRESSES, m as UNLOCK_ROUND_DURATION, f as USE_TEST_ADDRESS, k as WHITELIST, M as assertConfigSnapshot, G as createLiveAddressConfigSource, H as createLivePoolAddressConfigSource, I as createLiveWhitelistConfigSource, O as createScallopConfigSnapshot, N as loadScallopConfigSnapshot, h as queryKeys, L as validateConfigSnapshot, r as xOracleList } from './chunk-FNZDTB3A.js';
|
|
5
5
|
export { e as ScallopConfigError, a as ScallopError, c as ScallopIndexerError, d as ScallopParseError, b as ScallopRpcError, f as ScallopTransactionBuildError } from './chunk-S34VOEZN.js';
|
|
6
6
|
export { b as consoleLogger, a as noopLogger } from './chunk-6UQ4NWEU.js';
|
|
7
7
|
|
|
@@ -8,7 +8,7 @@ import { SuiTxBlock, DerivePathParams, SuiKit, Transaction as Transaction$1, Sui
|
|
|
8
8
|
import { AxiosInstance } from 'axios';
|
|
9
9
|
import { SignatureWithBytes, Signer } from '@mysten/sui/cryptography';
|
|
10
10
|
import { Transaction, TransactionObjectArgument, Argument, TransactionResult } from '@mysten/sui/transactions';
|
|
11
|
-
import {
|
|
11
|
+
import { HermesClientConfig } from '@pythnetwork/pyth-sui-js';
|
|
12
12
|
|
|
13
13
|
/** Sui Object with content and json (from getObject, listOwnedObjects, etc.) */
|
|
14
14
|
type SuiObjectData = SuiClientTypes.Object<{
|
|
@@ -187,12 +187,12 @@ declare class OnChainDataSource {
|
|
|
187
187
|
|
|
188
188
|
type ApiDataSourceParams = {
|
|
189
189
|
url?: string;
|
|
190
|
-
|
|
190
|
+
httpClient?: AxiosInstance;
|
|
191
191
|
timeout?: number;
|
|
192
192
|
};
|
|
193
193
|
declare class ApiDataSource {
|
|
194
194
|
private readonly client;
|
|
195
|
-
constructor({ url,
|
|
195
|
+
constructor({ url, httpClient, timeout }?: ApiDataSourceParams);
|
|
196
196
|
get<T>(urlPath: string): Promise<T>;
|
|
197
197
|
}
|
|
198
198
|
|
|
@@ -346,6 +346,10 @@ interface AddressesInterface$1 {
|
|
|
346
346
|
veScaRewardPool: string;
|
|
347
347
|
veScaRewardTableId: string;
|
|
348
348
|
};
|
|
349
|
+
obligationNaming: {
|
|
350
|
+
id: string;
|
|
351
|
+
namingRegistry: string;
|
|
352
|
+
};
|
|
349
353
|
scoin: {
|
|
350
354
|
id: string;
|
|
351
355
|
coins: Partial<Record<string, {
|
|
@@ -507,6 +511,11 @@ interface AddressesInterface {
|
|
|
507
511
|
veScaRewardPool: string;
|
|
508
512
|
veScaRewardTableId: string;
|
|
509
513
|
};
|
|
514
|
+
obligationNaming: {
|
|
515
|
+
id: string;
|
|
516
|
+
namingRegistry: string;
|
|
517
|
+
registryTableId: string;
|
|
518
|
+
};
|
|
510
519
|
scoin: {
|
|
511
520
|
id: string;
|
|
512
521
|
coins: Partial<Record<string, {
|
|
@@ -531,7 +540,7 @@ declare class ScallopAddress {
|
|
|
531
540
|
private logger;
|
|
532
541
|
private currentAddresses?;
|
|
533
542
|
private readonly addressMap;
|
|
534
|
-
constructor({ addressId, url, timeout,
|
|
543
|
+
constructor({ addressId, url, timeout, httpClient, network, logger, forceAddressesInterface, }: ScallopAddressConstructorParams);
|
|
535
544
|
private initializeForcedAddresses;
|
|
536
545
|
/**
|
|
537
546
|
* Read and synchronizes all addresses from the API into instance.
|
|
@@ -620,9 +629,14 @@ type XOracleRepoParams = BaseRepoParams & {
|
|
|
620
629
|
};
|
|
621
630
|
|
|
622
631
|
type ObligationKeys = 'protocolObjectId' | 'queryPackageId' | 'version' | 'market';
|
|
632
|
+
type ObligationNamingAddresses = {
|
|
633
|
+
obligationNaming: {
|
|
634
|
+
registryTableId: string;
|
|
635
|
+
};
|
|
636
|
+
};
|
|
623
637
|
type ObligationAddresses<T extends ObligationKeys = ObligationKeys> = Record<T, string>;
|
|
624
638
|
type ObligationRepoMetadata = {
|
|
625
|
-
addresses: ObligationAddresses;
|
|
639
|
+
addresses: ObligationAddresses & ObligationNamingAddresses;
|
|
626
640
|
};
|
|
627
641
|
type ObligationRepoContext = BaseContext & {
|
|
628
642
|
onchain: OnChainDataSource;
|
|
@@ -884,7 +898,7 @@ type ScallopUtilsConstructorParams = {
|
|
|
884
898
|
walletAddress: string;
|
|
885
899
|
scallopConstants?: ScallopConstants;
|
|
886
900
|
logger?: Logger;
|
|
887
|
-
|
|
901
|
+
suiClient?: ClientWithCoreApi;
|
|
888
902
|
tokensPerSecond?: number;
|
|
889
903
|
} & {
|
|
890
904
|
network: SuiClientTypes.Network;
|
|
@@ -1389,6 +1403,9 @@ declare class ObligationRepository extends BaseRepository<ObligationRepoContext,
|
|
|
1389
1403
|
getObligationData(obligationId: string): Promise<MappedObligationQueryData | undefined>;
|
|
1390
1404
|
getObligationLocked(obligationId: string): Promise<boolean>;
|
|
1391
1405
|
getObligationObjects(ids: string[]): Promise<(SuiObjectData | null)[]>;
|
|
1406
|
+
getObligationNames(address: string): Promise<{
|
|
1407
|
+
[k: string]: string;
|
|
1408
|
+
}>;
|
|
1392
1409
|
}
|
|
1393
1410
|
|
|
1394
1411
|
type BorrowIncentivePools = OptionalKeys$1<Record<string, BorrowIncentivePool>>;
|
|
@@ -1934,7 +1951,7 @@ type PriceRepositoryMetadata = {
|
|
|
1934
1951
|
};
|
|
1935
1952
|
type PriceApiConfig = {
|
|
1936
1953
|
endpoint: string;
|
|
1937
|
-
config:
|
|
1954
|
+
config: HermesClientConfig;
|
|
1938
1955
|
};
|
|
1939
1956
|
type PriceRepositoryContext = BaseContext & {
|
|
1940
1957
|
metadata: PriceRepositoryMetadata;
|
|
@@ -2088,6 +2105,15 @@ declare class ScallopQuery implements ScallopQueryInterface {
|
|
|
2088
2105
|
* @return Obligations data.
|
|
2089
2106
|
*/
|
|
2090
2107
|
getObligations(ownerAddress?: string): Promise<Obligation$1[]>;
|
|
2108
|
+
/**
|
|
2109
|
+
* Get the on-chain names for an address's obligations.
|
|
2110
|
+
*
|
|
2111
|
+
* @param ownerAddress - The owner address.
|
|
2112
|
+
* @return A map of obligation id to its registered name (unnamed obligations are omitted).
|
|
2113
|
+
*/
|
|
2114
|
+
getObligationNames(ownerAddress?: string): Promise<{
|
|
2115
|
+
[k: string]: string;
|
|
2116
|
+
}>;
|
|
2091
2117
|
/**
|
|
2092
2118
|
* Query obligation data.
|
|
2093
2119
|
*
|
|
@@ -3058,6 +3084,30 @@ type GenerateVeScaQuickMethod = (params: {
|
|
|
3058
3084
|
txBlock: SuiTxBlockWithVeScaNormalMethods;
|
|
3059
3085
|
}) => VeScaQuickMethods;
|
|
3060
3086
|
|
|
3087
|
+
/**
|
|
3088
|
+
* The explicit orchestration toolkit a referral quick method needs.
|
|
3089
|
+
*
|
|
3090
|
+
* @description
|
|
3091
|
+
* Narrow context injected into {@link generateReferralQuickMethod}. Built once
|
|
3092
|
+
* from `builder` in the factory and passed (instead of `builder`) into the quick
|
|
3093
|
+
* generator. Exposes only the coin selection / parsing helpers and the lending
|
|
3094
|
+
* whitelist slice that `claimReferralRevenueQuick` actually reads.
|
|
3095
|
+
*/
|
|
3096
|
+
type ReferralActionContext = {
|
|
3097
|
+
utils: ScallopBuilder['utils'];
|
|
3098
|
+
constants: {
|
|
3099
|
+
whitelist: ScallopBuilder['constants']['whitelist'];
|
|
3100
|
+
};
|
|
3101
|
+
};
|
|
3102
|
+
|
|
3103
|
+
type ReferralIds = {
|
|
3104
|
+
referralPgkId: string;
|
|
3105
|
+
referralBindings: string;
|
|
3106
|
+
referralRevenuePool: string;
|
|
3107
|
+
referralTiers: string;
|
|
3108
|
+
authorizedWitnessList: string;
|
|
3109
|
+
version: string;
|
|
3110
|
+
};
|
|
3061
3111
|
type ReferralNormalMethods = {
|
|
3062
3112
|
bindToReferral: (veScaKeyId: string) => void;
|
|
3063
3113
|
claimReferralTicket: (poolCoinName: string) => TransactionResult$1;
|
|
@@ -3070,6 +3120,14 @@ type ReferralQuickMethods = {
|
|
|
3070
3120
|
};
|
|
3071
3121
|
type SuiTxBlockWithReferralNormalMethods = SuiTxBlock & ReferralNormalMethods;
|
|
3072
3122
|
type ReferralTxBlock = SuiTxBlockWithReferralNormalMethods & ReferralQuickMethods;
|
|
3123
|
+
type GenerateReferralNormalMethod = (params: {
|
|
3124
|
+
ctx: MoveCallContext;
|
|
3125
|
+
txBlock: SuiTxBlock;
|
|
3126
|
+
}) => ReferralNormalMethods;
|
|
3127
|
+
type GenerateReferralQuickMethod = (params: {
|
|
3128
|
+
ctx: ReferralActionContext;
|
|
3129
|
+
txBlock: SuiTxBlockWithReferralNormalMethods;
|
|
3130
|
+
}) => ReferralQuickMethods;
|
|
3073
3131
|
|
|
3074
3132
|
/**
|
|
3075
3133
|
* The explicit orchestration toolkit a loyalty-program quick method needs.
|
|
@@ -3158,6 +3216,17 @@ type GenerateSCoinQuickMethod = (params: {
|
|
|
3158
3216
|
txBlock: SuiTxBlockWithSCoinNormalMethods;
|
|
3159
3217
|
}) => sCoinQuickMethods;
|
|
3160
3218
|
|
|
3219
|
+
type ObligationNamingNormalMethods = {
|
|
3220
|
+
setObligationName: (obligationKey: SuiObjectArg, name: string) => void;
|
|
3221
|
+
removeObligationName: (obligationKey: SuiObjectArg) => void;
|
|
3222
|
+
};
|
|
3223
|
+
type GenerateObligationNamingNormalMethod = (params: {
|
|
3224
|
+
ctx: MoveCallContext;
|
|
3225
|
+
txBlock: SuiTxBlock;
|
|
3226
|
+
}) => ObligationNamingNormalMethods;
|
|
3227
|
+
type SuiTxBlockWithObligationNamingNormalMethods = SuiTxBlock & ObligationNamingNormalMethods;
|
|
3228
|
+
type ObligationNamingTxBlock = SuiTxBlockWithObligationNamingNormalMethods;
|
|
3229
|
+
|
|
3161
3230
|
/**
|
|
3162
3231
|
* Per-domain method bundles. Each bundle is the union of a module's normal
|
|
3163
3232
|
* and quick methods, without SuiTxBlock/runtime-proxy noise.
|
|
@@ -3178,6 +3247,7 @@ type VeScaModule = VeScaNormalMethods & VeScaQuickMethods;
|
|
|
3178
3247
|
type ReferralModule = ReferralNormalMethods & ReferralQuickMethods;
|
|
3179
3248
|
type LoyaltyModule = LoyaltyProgramNormalMethods & LoyaltyProgramQuickMethods;
|
|
3180
3249
|
type SCoinModule = sCoinNormalMethods & sCoinQuickMethods;
|
|
3250
|
+
type ObligationNamingModule = ObligationNamingNormalMethods;
|
|
3181
3251
|
interface ScallopTxBlockModules {
|
|
3182
3252
|
readonly core: CoreModule;
|
|
3183
3253
|
readonly spool: SpoolModule;
|
|
@@ -3186,9 +3256,10 @@ interface ScallopTxBlockModules {
|
|
|
3186
3256
|
readonly referral: ReferralModule;
|
|
3187
3257
|
readonly loyalty: LoyaltyModule;
|
|
3188
3258
|
readonly sCoin: SCoinModule;
|
|
3259
|
+
readonly obligationNaming: ObligationNamingModule;
|
|
3189
3260
|
}
|
|
3190
3261
|
|
|
3191
|
-
type BaseScallopTxBlock = ReferralTxBlock & LoyaltyProgramTxBlock & BorrowIncentiveTxBlock & VeScaTxBlock;
|
|
3262
|
+
type BaseScallopTxBlock = ReferralTxBlock & LoyaltyProgramTxBlock & BorrowIncentiveTxBlock & VeScaTxBlock & ObligationNamingTxBlock;
|
|
3192
3263
|
type SuiTxBlockWithSCoin = BaseScallopTxBlock & SCoinTxBlock;
|
|
3193
3264
|
type SuiTxBlockWithSpool = SuiTxBlockWithSCoin & SpoolTxBlock;
|
|
3194
3265
|
type ScallopTxBlock = SuiTxBlockWithSpool & CoreTxBlock & ScallopTxBlockModules;
|
|
@@ -3302,4 +3373,4 @@ type ObligationBorrowIncentive = {
|
|
|
3302
3373
|
rewards: ObligationBorrowIncentiveReward[];
|
|
3303
3374
|
};
|
|
3304
3375
|
|
|
3305
|
-
export { type
|
|
3376
|
+
export { type GetBalanceParams as $, type AddressesInterface as A, type BaseScallopTxBlock as B, type CalculatedSpoolData as C, type CoreQuickMethods as D, type CoreTxBlock as E, type DevInspectResults as F, type GetDynamicFieldsParams as G, type DynamicFieldPage as H, type EncodeDynamicFieldNameInput as I, type GenerateBorrowIncentiveNormalMethod as J, type GenerateBorrowIncentiveQuickMethod as K, type GenerateCoreNormalMethod as L, type GenerateCoreQuickMethod as M, type GenerateLoyaltyProgramNormalMethod as N, type GenerateLoyaltyProgramQuickMethod as O, type PoolAddress as P, type GenerateObligationNamingNormalMethod as Q, type GenerateReferralNormalMethod as R, ScallopBuilder as S, type GenerateReferralQuickMethod as T, type GenerateSCoinNormalMethod as U, type GenerateSCoinQuickMethod as V, type Whitelist as W, type GenerateSpoolNormalMethod as X, type GenerateSpoolQuickMethod as Y, type GenerateVeScaNormalMethod as Z, type GenerateVeScaQuickMethod as _, type ScallopTxBlock as a, type SuiParsedData as a$, type GetOwnedObjectsParams as a0, type InspectTxnParsedJson as a1, type Lending as a2, type Lendings as a3, type LoyaltyModule as a4, type LoyaltyProgramInfo as a5, type LoyaltyProgramNormalMethods as a6, type LoyaltyProgramQuickMethods as a7, type LoyaltyProgramTxBlock as a8, type Market as a9, type ReferralNormalMethods as aA, type ReferralQuickMethods as aB, type ReferralTxBlock as aC, type SCoinActionContext as aD, type SCoinModule as aE, type SCoinTxBlock as aF, ScallopAddress as aG, type ScallopTxBlockModules as aH, type Spool as aI, type SpoolActionContext as aJ, type SpoolData as aK, type SpoolIds as aL, type SpoolModule as aM, type SpoolNormalMethods as aN, type SpoolQuickMethods as aO, type SpoolRewardPool as aP, type SpoolTxBlock as aQ, type Spools as aR, type StakeAccount as aS, type StakeAccounts as aT, type StakePool as aU, type StakePools as aV, type StakeRewardPool as aW, type StakeRewardPools as aX, SuiKitTransactionExecutor as aY, type SuiObjectRef as aZ, type SuiObjectResponse as a_, type MarketCollateral as aa, type MarketCollaterals as ab, type MarketPool as ac, type MarketPools as ad, type Markets as ae, type NestedResult as af, type ObligationAccount as ag, type ObligationAccounts as ah, type ObligationBorrowIncentive as ai, type ObligationBorrowIncentiveReward as aj, type ObligationCollateral as ak, type ObligationDebt as al, type ObligationNamingModule as am, type ObligationNamingNormalMethods as an, type ObligationNamingTxBlock as ao, type OptionalKeys$1 as ap, type OriginSpoolData as aq, type OriginSpoolRewardPoolData as ar, type PaginatedObjectsResponse as as, type ParsedBorrowIncentiveAccountData as at, type ParsedBorrowIncentiveAccountPoolData as au, type ParsedSpoolData as av, type ParsedSpoolRewardPoolData as aw, type QuickMethodReturnType as ax, type ReferralIds as ay, type ReferralModule as az, type ScallopBuilderConstructorParams as b, type SuiTxBlockWithBorrowIncentiveNormalMethods as b0, type SuiTxBlockWithCoreNormalMethods as b1, type SuiTxBlockWithLoyaltyProgramNormalMethods as b2, type SuiTxBlockWithObligationNamingNormalMethods as b3, type SuiTxBlockWithReferralNormalMethods as b4, type SuiTxBlockWithSCoin as b5, type SuiTxBlockWithSCoinNormalMethods as b6, type SuiTxBlockWithSpool as b7, type SuiTxBlockWithSpoolNormalMethods as b8, type SuiTxBlockWithVeScaNormalMethods as b9, type SupportOracleType as ba, type TotalValueLocked as bb, type TransactionCommand as bc, type VeSca as bd, type VeScaLoyaltyProgramInfo as be, type VeScaModule as bf, type VeScaNormalMethods as bg, type VeScaQuickMethods as bh, type VeScaTreasuryInfo as bi, type VeScaTxBlock as bj, _SUPPORT_ORACLES as bk, type sCoinNormalMethods as bl, type sCoinPkgIds as bm, type sCoinQuickMethods as bn, type xOracleRuleType as bo, type xOracleRules as bp, type TransactionExecutor as bq, type DefaultTxInclude as br, type ScallopClientInterface as bs, OnChainDataSource as bt, type ScallopQueryConstructorParams as bu, type SuiObjectDataOptions as c, type GetDynamicFieldObjectParams as d, type SuiObjectData as e, ScallopQuery as f, ScallopUtils as g, ScallopConstants as h, type AddressStringPath as i, type BorrowIncentiveAccounts as j, type BorrowIncentiveIds as k, type BorrowIncentiveModule as l, type BorrowIncentiveNormalMethods as m, type BorrowIncentivePool as n, type BorrowIncentivePoolPoints as o, type BorrowIncentivePools as p, type BorrowIncentiveQuickMethods as q, type BorrowIncentiveTxBlock as r, type CalculatedSpoolRewardPoolData as s, type CoinBalance as t, type CoinPrices as u, type CoinWrappedType as v, type CoreIds as w, type xOracleListType as x, type CoreModule as y, type CoreNormalMethods as z };
|