@scallop-io/sui-scallop-sdk 0.46.55 → 0.46.56
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/dist/constants/common.d.ts +1 -1
- package/dist/constants/pyth.d.ts +1 -1
- package/dist/index.js +1752 -1602
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1720 -1570
- package/dist/index.mjs.map +1 -1
- package/dist/models/scallop.d.ts +1 -1
- package/dist/models/scallopAddress.d.ts +4 -4
- package/dist/models/scallopBuilder.d.ts +2 -2
- package/dist/models/scallopCache.d.ts +2 -2
- package/dist/models/scallopClient.d.ts +7 -2
- package/dist/models/scallopIndexer.d.ts +3 -3
- package/dist/models/scallopPrice.d.ts +0 -0
- package/dist/models/scallopQuery.d.ts +10 -4
- package/dist/models/scallopUtils.d.ts +8 -7
- package/dist/queries/borrowIncentiveQuery.d.ts +10 -4
- package/dist/queries/coreQuery.d.ts +8 -4
- package/dist/queries/priceQuery.d.ts +7 -3
- package/dist/queries/referralQuery.d.ts +2 -2
- package/dist/queries/sCoinQuery.d.ts +18 -4
- package/dist/queries/spoolQuery.d.ts +10 -4
- package/dist/queries/vescaQuery.d.ts +7 -5
- package/dist/types/builder/vesca.d.ts +2 -1
- package/dist/types/model.d.ts +27 -12
- package/dist/types/query/core.d.ts +1 -0
- package/package.json +1 -1
- package/src/builders/borrowIncentiveBuilder.ts +19 -21
- package/src/builders/coreBuilder.ts +10 -8
- package/src/builders/spoolBuilder.ts +2 -2
- package/src/builders/vescaBuilder.ts +12 -4
- package/src/constants/common.ts +2 -0
- package/src/constants/enum.ts +4 -0
- package/src/constants/pyth.ts +2 -2
- package/src/models/scallop.ts +14 -20
- package/src/models/scallopAddress.ts +15 -5
- package/src/models/scallopBuilder.ts +29 -25
- package/src/models/scallopCache.ts +2 -2
- package/src/models/scallopClient.ts +91 -32
- package/src/models/scallopIndexer.ts +15 -8
- package/src/models/scallopPrice.ts +0 -0
- package/src/models/scallopQuery.ts +47 -25
- package/src/models/scallopUtils.ts +75 -74
- package/src/queries/borrowIncentiveQuery.ts +40 -29
- package/src/queries/coreQuery.ts +38 -24
- package/src/queries/portfolioQuery.ts +1 -2
- package/src/queries/priceQuery.ts +20 -9
- package/src/queries/referralQuery.ts +4 -4
- package/src/queries/sCoinQuery.ts +95 -17
- package/src/queries/spoolQuery.ts +26 -14
- package/src/queries/vescaQuery.ts +32 -26
- package/src/types/builder/vesca.ts +8 -1
- package/src/types/model.ts +40 -11
- package/src/types/query/core.ts +1 -0
package/src/types/model.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import type { SuiTransactionBlockResponse } from '@mysten/sui.js/client';
|
|
2
|
-
import type {
|
|
2
|
+
import type {
|
|
3
|
+
TransactionBlock,
|
|
4
|
+
TransactionResult,
|
|
5
|
+
} from '@mysten/sui.js/transactions';
|
|
3
6
|
import type { SuiKit, SuiKitParams, NetworkType } from '@scallop-io/sui-kit';
|
|
4
7
|
import type {
|
|
5
8
|
ScallopAddress,
|
|
6
9
|
ScallopQuery,
|
|
7
10
|
ScallopUtils,
|
|
8
11
|
ScallopBuilder,
|
|
12
|
+
ScallopIndexer,
|
|
9
13
|
} from '../models';
|
|
10
14
|
import { ScallopCache } from 'src/models/scallopCache';
|
|
11
15
|
|
|
@@ -13,13 +17,42 @@ export type ScallopClientFnReturnType<T extends boolean> = T extends true
|
|
|
13
17
|
? SuiTransactionBlockResponse
|
|
14
18
|
: TransactionBlock;
|
|
15
19
|
|
|
16
|
-
export type
|
|
20
|
+
export type ScallopClientVeScaReturnType<T extends boolean> = T extends true
|
|
21
|
+
? SuiTransactionBlockResponse
|
|
22
|
+
: {
|
|
23
|
+
tx: TransactionBlock;
|
|
24
|
+
scaCoin: TransactionResult;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type ScallopBaseInstanceParams = {
|
|
17
28
|
suiKit?: SuiKit;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export type ScallopCacheInstanceParams = ScallopBaseInstanceParams;
|
|
32
|
+
|
|
33
|
+
export type ScallopAddressInstanceParams = ScallopBaseInstanceParams & {
|
|
34
|
+
cache?: ScallopCache;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export type ScallopIndexerInstanceParams = {
|
|
38
|
+
cache?: ScallopCache;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export type ScallopUtilsInstanceParams = ScallopBaseInstanceParams & {
|
|
18
42
|
address?: ScallopAddress;
|
|
19
|
-
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export type ScallopQueryInstanceParams = ScallopBaseInstanceParams & {
|
|
20
46
|
utils?: ScallopUtils;
|
|
47
|
+
indexer?: ScallopIndexer;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export type ScallopBuilderInstanceParams = ScallopBaseInstanceParams & {
|
|
51
|
+
query?: ScallopQuery;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export type ScallopClientInstanceParams = ScallopBaseInstanceParams & {
|
|
21
55
|
builder?: ScallopBuilder;
|
|
22
|
-
cache: ScallopCache;
|
|
23
56
|
};
|
|
24
57
|
|
|
25
58
|
export type ScallopAddressParams = {
|
|
@@ -30,20 +63,16 @@ export type ScallopAddressParams = {
|
|
|
30
63
|
|
|
31
64
|
export type ScallopParams = {
|
|
32
65
|
addressesId?: string;
|
|
66
|
+
walletAddress?: string;
|
|
33
67
|
} & SuiKitParams;
|
|
34
68
|
|
|
35
|
-
export type ScallopClientParams = ScallopParams
|
|
36
|
-
walletAddress?: string;
|
|
37
|
-
};
|
|
69
|
+
export type ScallopClientParams = ScallopParams;
|
|
38
70
|
|
|
39
71
|
export type ScallopBuilderParams = ScallopParams & {
|
|
40
|
-
walletAddress?: string;
|
|
41
72
|
pythEndpoints?: string[];
|
|
42
73
|
};
|
|
43
74
|
|
|
44
|
-
export type ScallopQueryParams = ScallopParams
|
|
45
|
-
walletAddress?: string;
|
|
46
|
-
};
|
|
75
|
+
export type ScallopQueryParams = ScallopParams;
|
|
47
76
|
|
|
48
77
|
export type ScallopUtilsParams = ScallopParams & {
|
|
49
78
|
pythEndpoints?: string[];
|