@suilend/sdk 12.7.0 → 13.0.0-next.g803bba0
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/_generated/_dependencies/pyth-2/price-identifier/structs.d.ts +46 -0
- package/_generated/_dependencies/{source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e → pyth-2}/price-identifier/structs.js +45 -25
- package/_generated/_dependencies/std/ascii/structs.d.ts +100 -0
- package/_generated/_dependencies/{source/0x1 → std}/ascii/structs.js +153 -103
- package/_generated/_dependencies/{source/0x1 → std}/option/structs.d.ts +29 -21
- package/_generated/_dependencies/std/option/structs.js +155 -0
- package/_generated/_dependencies/std/type-name/structs.d.ts +65 -0
- package/_generated/_dependencies/{source/0x1 → std}/type-name/structs.js +49 -22
- package/_generated/_dependencies/sui/bag/structs.d.ts +75 -0
- package/_generated/_dependencies/sui/bag/structs.js +154 -0
- package/_generated/_dependencies/{source/0x2 → sui}/balance/structs.d.ts +80 -60
- package/_generated/_dependencies/sui/balance/structs.js +306 -0
- package/_generated/_dependencies/sui/object/structs.d.ts +104 -0
- package/_generated/_dependencies/{source/0x2 → sui}/object/structs.js +98 -46
- package/_generated/_dependencies/{source/0x2 → sui}/object-table/structs.d.ts +37 -30
- package/_generated/_dependencies/sui/object-table/structs.js +164 -0
- package/_generated/_envs/index.d.ts +3 -0
- package/_generated/_envs/index.js +18 -0
- package/_generated/_envs/mainnet.d.ts +2 -0
- package/_generated/_envs/mainnet.js +490 -0
- package/_generated/_framework/env.d.ts +137 -0
- package/_generated/_framework/env.js +261 -0
- package/_generated/_framework/reified.d.ts +68 -36
- package/_generated/_framework/reified.js +110 -98
- package/_generated/_framework/util.d.ts +4 -4
- package/_generated/_framework/util.js +82 -79
- package/_generated/_framework/vector.d.ts +11 -9
- package/_generated/_framework/vector.js +10 -10
- package/_generated/suilend/cell/structs.d.ts +24 -22
- package/_generated/suilend/cell/structs.js +68 -24
- package/_generated/suilend/decimal/structs.d.ts +28 -24
- package/_generated/suilend/decimal/structs.js +45 -24
- package/_generated/suilend/index.d.ts +5 -6
- package/_generated/suilend/index.js +10 -19
- package/_generated/suilend/lending-market/functions.d.ts +1123 -149
- package/_generated/suilend/lending-market/functions.js +1121 -207
- package/_generated/suilend/lending-market/structs.d.ts +985 -1290
- package/_generated/suilend/lending-market/structs.js +2482 -1282
- package/_generated/suilend/lending-market-registry/functions.d.ts +32 -3
- package/_generated/suilend/lending-market-registry/functions.js +30 -6
- package/_generated/suilend/liquidity-mining/structs.d.ts +200 -333
- package/_generated/suilend/liquidity-mining/structs.js +449 -319
- package/_generated/suilend/obligation/structs.d.ts +406 -918
- package/_generated/suilend/obligation/structs.js +786 -596
- package/_generated/suilend/rate-limiter/functions.d.ts +134 -15
- package/_generated/suilend/rate-limiter/functions.js +139 -21
- package/_generated/suilend/rate-limiter/structs.d.ts +72 -80
- package/_generated/suilend/rate-limiter/structs.js +98 -48
- package/_generated/suilend/reserve/structs.d.ts +611 -904
- package/_generated/suilend/reserve/structs.js +1528 -736
- package/_generated/suilend/reserve-config/functions.d.ts +718 -96
- package/_generated/suilend/reserve-config/functions.js +751 -157
- package/_generated/suilend/reserve-config/structs.d.ts +148 -163
- package/_generated/suilend/reserve-config/structs.js +260 -94
- package/client.d.ts +2 -2
- package/client.js +22 -39
- package/lib/initialize.d.ts +76 -76
- package/lib/initialize.js +10 -10
- package/lib/proCompatible.js +5 -5
- package/package.json +1 -1
- package/parsers/lendingMarket.d.ts +9 -9
- package/parsers/obligation.d.ts +14 -14
- package/parsers/obligation.js +4 -4
- package/parsers/rateLimiter.d.ts +1 -1
- package/parsers/reserve.d.ts +12 -12
- package/parsers/reserve.js +2 -2
- package/strategies.d.ts +14 -14
- package/utils/simulate.d.ts +1 -1
- package/utils/simulate.js +5 -5
- package/_generated/_dependencies/source/0x1/ascii/structs.d.ts +0 -84
- package/_generated/_dependencies/source/0x1/index.d.ts +0 -3
- package/_generated/_dependencies/source/0x1/index.js +0 -3
- package/_generated/_dependencies/source/0x1/option/structs.js +0 -110
- package/_generated/_dependencies/source/0x1/type-name/structs.d.ts +0 -47
- package/_generated/_dependencies/source/0x2/bag/structs.d.ts +0 -52
- package/_generated/_dependencies/source/0x2/bag/structs.js +0 -113
- package/_generated/_dependencies/source/0x2/balance/structs.js +0 -210
- package/_generated/_dependencies/source/0x2/index.d.ts +0 -3
- package/_generated/_dependencies/source/0x2/index.js +0 -3
- package/_generated/_dependencies/source/0x2/object/structs.d.ts +0 -82
- package/_generated/_dependencies/source/0x2/object-table/structs.js +0 -115
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/index.d.ts +0 -4
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/index.js +0 -4
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-identifier/structs.d.ts +0 -46
|
@@ -1,274 +1,228 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
1
|
+
/** A user_reward_manager farms pool_rewards to receive rewards proportional to their stake in the pool. */
|
|
2
|
+
import type { ClientWithCoreApi, SuiClientTypes } from '@mysten/sui/client';
|
|
3
|
+
import { Option } from '../../_dependencies/std/option/structs';
|
|
4
|
+
import { TypeName } from '../../_dependencies/std/type-name/structs';
|
|
5
|
+
import { Bag } from '../../_dependencies/sui/bag/structs';
|
|
6
|
+
import { ID, UID } from '../../_dependencies/sui/object/structs';
|
|
7
|
+
import { PhantomReified, PhantomToTypeStr, PhantomTypeArgument, Reified, StructClass, ToField, ToJSON, ToPhantomTypeArgument, ToTypeStr } from '../../_framework/reified';
|
|
8
|
+
import { FieldsWithTypes } from '../../_framework/util';
|
|
9
|
+
import { Vector } from '../../_framework/vector';
|
|
10
|
+
import { Decimal } from '../decimal/structs';
|
|
11
|
+
export declare function isPoolRewardManager(type: string): boolean;
|
|
12
|
+
export interface PoolRewardManagerFields {
|
|
13
|
+
id: ToField<UID>;
|
|
14
|
+
totalShares: ToField<'u64'>;
|
|
15
|
+
poolRewards: ToField<Vector<Option<PoolReward>>>;
|
|
16
|
+
lastUpdateTimeMs: ToField<'u64'>;
|
|
17
|
+
}
|
|
18
|
+
export type PoolRewardManagerReified = Reified<PoolRewardManager, PoolRewardManagerFields>;
|
|
19
|
+
export type PoolRewardManagerJSONField = {
|
|
20
|
+
id: string;
|
|
21
|
+
totalShares: string;
|
|
22
|
+
poolRewards: (ToJSON<PoolReward> | null)[];
|
|
23
|
+
lastUpdateTimeMs: string;
|
|
24
|
+
};
|
|
25
|
+
export type PoolRewardManagerJSON = {
|
|
26
|
+
$typeName: typeof PoolRewardManager.$typeName;
|
|
27
|
+
$typeArgs: [];
|
|
28
|
+
} & PoolRewardManagerJSONField;
|
|
29
|
+
/** This struct manages all pool_rewards for a given stake pool. */
|
|
30
|
+
export declare class PoolRewardManager implements StructClass {
|
|
31
|
+
__StructClass: true;
|
|
32
|
+
static get $typeName(): `${string}::liquidity_mining::PoolRewardManager`;
|
|
33
|
+
static readonly $numTypeParams = 0;
|
|
34
|
+
static readonly $isPhantom: readonly [];
|
|
35
|
+
readonly $typeName: typeof PoolRewardManager.$typeName;
|
|
36
|
+
readonly $fullTypeName: `${string}::liquidity_mining::PoolRewardManager`;
|
|
37
|
+
readonly $typeArgs: [];
|
|
38
|
+
readonly $isPhantom: typeof PoolRewardManager.$isPhantom;
|
|
39
|
+
readonly id: ToField<UID>;
|
|
40
|
+
readonly totalShares: ToField<'u64'>;
|
|
41
|
+
readonly poolRewards: ToField<Vector<Option<PoolReward>>>;
|
|
42
|
+
readonly lastUpdateTimeMs: ToField<'u64'>;
|
|
43
|
+
private constructor();
|
|
44
|
+
static reified(): PoolRewardManagerReified;
|
|
45
|
+
static get r(): PoolRewardManagerReified;
|
|
46
|
+
static phantom(): PhantomReified<ToTypeStr<PoolRewardManager>>;
|
|
47
|
+
static get p(): PhantomReified<ToTypeStr<PoolRewardManager>>;
|
|
48
|
+
private static instantiateBcs;
|
|
49
|
+
private static cachedBcs;
|
|
50
|
+
static get bcs(): ReturnType<typeof PoolRewardManager.instantiateBcs>;
|
|
51
|
+
static fromFields(fields: Record<string, any>): PoolRewardManager;
|
|
52
|
+
static fromFieldsWithTypes(item: FieldsWithTypes): PoolRewardManager;
|
|
53
|
+
static fromBcs(data: Uint8Array): PoolRewardManager;
|
|
54
|
+
toJSONField(): PoolRewardManagerJSONField;
|
|
55
|
+
toJSON(): PoolRewardManagerJSON;
|
|
56
|
+
static fromJSONField(field: any): PoolRewardManager;
|
|
57
|
+
static fromJSON(json: Record<string, any>): PoolRewardManager;
|
|
58
|
+
static fromCoreObject(obj: SuiClientTypes.Object<{
|
|
59
|
+
content: true;
|
|
60
|
+
}>): PoolRewardManager;
|
|
61
|
+
static fetch(client: ClientWithCoreApi, id: string): Promise<PoolRewardManager>;
|
|
62
|
+
}
|
|
12
63
|
export declare function isPoolReward(type: string): boolean;
|
|
13
64
|
export interface PoolRewardFields {
|
|
14
65
|
id: ToField<UID>;
|
|
15
66
|
poolRewardManagerId: ToField<ID>;
|
|
16
67
|
coinType: ToField<TypeName>;
|
|
17
|
-
startTimeMs: ToField<
|
|
18
|
-
endTimeMs: ToField<
|
|
19
|
-
totalRewards: ToField<
|
|
68
|
+
startTimeMs: ToField<'u64'>;
|
|
69
|
+
endTimeMs: ToField<'u64'>;
|
|
70
|
+
totalRewards: ToField<'u64'>;
|
|
71
|
+
/** amount of rewards that have been earned by users */
|
|
20
72
|
allocatedRewards: ToField<Decimal>;
|
|
21
73
|
cumulativeRewardsPerShare: ToField<Decimal>;
|
|
22
|
-
numUserRewardManagers: ToField<
|
|
74
|
+
numUserRewardManagers: ToField<'u64'>;
|
|
23
75
|
additionalFields: ToField<Bag>;
|
|
24
76
|
}
|
|
25
77
|
export type PoolRewardReified = Reified<PoolReward, PoolRewardFields>;
|
|
78
|
+
export type PoolRewardJSONField = {
|
|
79
|
+
id: string;
|
|
80
|
+
poolRewardManagerId: string;
|
|
81
|
+
coinType: string;
|
|
82
|
+
startTimeMs: string;
|
|
83
|
+
endTimeMs: string;
|
|
84
|
+
totalRewards: string;
|
|
85
|
+
allocatedRewards: ToJSON<Decimal>;
|
|
86
|
+
cumulativeRewardsPerShare: ToJSON<Decimal>;
|
|
87
|
+
numUserRewardManagers: string;
|
|
88
|
+
additionalFields: ToJSON<Bag>;
|
|
89
|
+
};
|
|
90
|
+
export type PoolRewardJSON = {
|
|
91
|
+
$typeName: typeof PoolReward.$typeName;
|
|
92
|
+
$typeArgs: [];
|
|
93
|
+
} & PoolRewardJSONField;
|
|
26
94
|
export declare class PoolReward implements StructClass {
|
|
27
95
|
__StructClass: true;
|
|
28
|
-
static
|
|
96
|
+
static get $typeName(): `${string}::liquidity_mining::PoolReward`;
|
|
29
97
|
static readonly $numTypeParams = 0;
|
|
30
98
|
static readonly $isPhantom: readonly [];
|
|
31
|
-
readonly $typeName:
|
|
32
|
-
readonly $fullTypeName: `${
|
|
99
|
+
readonly $typeName: typeof PoolReward.$typeName;
|
|
100
|
+
readonly $fullTypeName: `${string}::liquidity_mining::PoolReward`;
|
|
33
101
|
readonly $typeArgs: [];
|
|
34
|
-
readonly $isPhantom:
|
|
102
|
+
readonly $isPhantom: typeof PoolReward.$isPhantom;
|
|
35
103
|
readonly id: ToField<UID>;
|
|
36
104
|
readonly poolRewardManagerId: ToField<ID>;
|
|
37
105
|
readonly coinType: ToField<TypeName>;
|
|
38
|
-
readonly startTimeMs: ToField<
|
|
39
|
-
readonly endTimeMs: ToField<
|
|
40
|
-
readonly totalRewards: ToField<
|
|
106
|
+
readonly startTimeMs: ToField<'u64'>;
|
|
107
|
+
readonly endTimeMs: ToField<'u64'>;
|
|
108
|
+
readonly totalRewards: ToField<'u64'>;
|
|
109
|
+
/** amount of rewards that have been earned by users */
|
|
41
110
|
readonly allocatedRewards: ToField<Decimal>;
|
|
42
111
|
readonly cumulativeRewardsPerShare: ToField<Decimal>;
|
|
43
|
-
readonly numUserRewardManagers: ToField<
|
|
112
|
+
readonly numUserRewardManagers: ToField<'u64'>;
|
|
44
113
|
readonly additionalFields: ToField<Bag>;
|
|
45
114
|
private constructor();
|
|
46
115
|
static reified(): PoolRewardReified;
|
|
47
|
-
static get r():
|
|
116
|
+
static get r(): PoolRewardReified;
|
|
48
117
|
static phantom(): PhantomReified<ToTypeStr<PoolReward>>;
|
|
49
|
-
static get p():
|
|
50
|
-
static
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
bytes: import("@mysten/bcs").BcsType<string, string, string>;
|
|
54
|
-
}, string>;
|
|
55
|
-
}, string>;
|
|
56
|
-
pool_reward_manager_id: import("@mysten/bcs").BcsStruct<{
|
|
57
|
-
bytes: import("@mysten/bcs").BcsType<string, string, string>;
|
|
58
|
-
}, string>;
|
|
59
|
-
coin_type: import("@mysten/bcs").BcsStruct<{
|
|
60
|
-
name: import("@mysten/bcs").BcsStruct<{
|
|
61
|
-
bytes: import("@mysten/bcs").BcsType<number[], Iterable<number> & {
|
|
62
|
-
length: number;
|
|
63
|
-
}, string>;
|
|
64
|
-
}, string>;
|
|
65
|
-
}, string>;
|
|
66
|
-
start_time_ms: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
67
|
-
end_time_ms: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
68
|
-
total_rewards: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
69
|
-
allocated_rewards: import("@mysten/bcs").BcsStruct<{
|
|
70
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
71
|
-
}, string>;
|
|
72
|
-
cumulative_rewards_per_share: import("@mysten/bcs").BcsStruct<{
|
|
73
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
74
|
-
}, string>;
|
|
75
|
-
num_user_reward_managers: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
76
|
-
additional_fields: import("@mysten/bcs").BcsStruct<{
|
|
77
|
-
id: import("@mysten/bcs").BcsStruct<{
|
|
78
|
-
id: import("@mysten/bcs").BcsStruct<{
|
|
79
|
-
bytes: import("@mysten/bcs").BcsType<string, string, string>;
|
|
80
|
-
}, string>;
|
|
81
|
-
}, string>;
|
|
82
|
-
size: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
83
|
-
}, string>;
|
|
84
|
-
}, string>;
|
|
118
|
+
static get p(): PhantomReified<ToTypeStr<PoolReward>>;
|
|
119
|
+
private static instantiateBcs;
|
|
120
|
+
private static cachedBcs;
|
|
121
|
+
static get bcs(): ReturnType<typeof PoolReward.instantiateBcs>;
|
|
85
122
|
static fromFields(fields: Record<string, any>): PoolReward;
|
|
86
123
|
static fromFieldsWithTypes(item: FieldsWithTypes): PoolReward;
|
|
87
124
|
static fromBcs(data: Uint8Array): PoolReward;
|
|
88
|
-
toJSONField():
|
|
89
|
-
|
|
90
|
-
poolRewardManagerId: string;
|
|
91
|
-
coinType: {
|
|
92
|
-
name: string;
|
|
93
|
-
};
|
|
94
|
-
startTimeMs: string;
|
|
95
|
-
endTimeMs: string;
|
|
96
|
-
totalRewards: string;
|
|
97
|
-
allocatedRewards: {
|
|
98
|
-
value: string;
|
|
99
|
-
};
|
|
100
|
-
cumulativeRewardsPerShare: {
|
|
101
|
-
value: string;
|
|
102
|
-
};
|
|
103
|
-
numUserRewardManagers: string;
|
|
104
|
-
additionalFields: {
|
|
105
|
-
id: string;
|
|
106
|
-
size: string;
|
|
107
|
-
};
|
|
108
|
-
};
|
|
109
|
-
toJSON(): {
|
|
110
|
-
id: string;
|
|
111
|
-
poolRewardManagerId: string;
|
|
112
|
-
coinType: {
|
|
113
|
-
name: string;
|
|
114
|
-
};
|
|
115
|
-
startTimeMs: string;
|
|
116
|
-
endTimeMs: string;
|
|
117
|
-
totalRewards: string;
|
|
118
|
-
allocatedRewards: {
|
|
119
|
-
value: string;
|
|
120
|
-
};
|
|
121
|
-
cumulativeRewardsPerShare: {
|
|
122
|
-
value: string;
|
|
123
|
-
};
|
|
124
|
-
numUserRewardManagers: string;
|
|
125
|
-
additionalFields: {
|
|
126
|
-
id: string;
|
|
127
|
-
size: string;
|
|
128
|
-
};
|
|
129
|
-
$typeName: string;
|
|
130
|
-
$typeArgs: [];
|
|
131
|
-
};
|
|
125
|
+
toJSONField(): PoolRewardJSONField;
|
|
126
|
+
toJSON(): PoolRewardJSON;
|
|
132
127
|
static fromJSONField(field: any): PoolReward;
|
|
133
128
|
static fromJSON(json: Record<string, any>): PoolReward;
|
|
134
|
-
static
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
id: ToField<UID>;
|
|
139
|
-
totalShares: ToField<"u64">;
|
|
140
|
-
poolRewards: ToField<Vector<Option<PoolReward>>>;
|
|
141
|
-
lastUpdateTimeMs: ToField<"u64">;
|
|
142
|
-
}
|
|
143
|
-
export type PoolRewardManagerReified = Reified<PoolRewardManager, PoolRewardManagerFields>;
|
|
144
|
-
export declare class PoolRewardManager implements StructClass {
|
|
145
|
-
__StructClass: true;
|
|
146
|
-
static readonly $typeName: string;
|
|
147
|
-
static readonly $numTypeParams = 0;
|
|
148
|
-
static readonly $isPhantom: readonly [];
|
|
149
|
-
readonly $typeName: string;
|
|
150
|
-
readonly $fullTypeName: `${typeof PKG_V1}::liquidity_mining::PoolRewardManager`;
|
|
151
|
-
readonly $typeArgs: [];
|
|
152
|
-
readonly $isPhantom: readonly [];
|
|
153
|
-
readonly id: ToField<UID>;
|
|
154
|
-
readonly totalShares: ToField<"u64">;
|
|
155
|
-
readonly poolRewards: ToField<Vector<Option<PoolReward>>>;
|
|
156
|
-
readonly lastUpdateTimeMs: ToField<"u64">;
|
|
157
|
-
private constructor();
|
|
158
|
-
static reified(): PoolRewardManagerReified;
|
|
159
|
-
static get r(): reified.StructClassReified<PoolRewardManager, PoolRewardManagerFields>;
|
|
160
|
-
static phantom(): PhantomReified<ToTypeStr<PoolRewardManager>>;
|
|
161
|
-
static get p(): reified.PhantomReified<"0x1f54a9a2d71799553197e9ea24557797c6398d6a65f2d4d3818c9304b75d5e21::liquidity_mining::PoolRewardManager" | "0xf95b06141ed4a174f239417323bde3f209b972f5930d8521ea38a52aff3a6ddf::liquidity_mining::PoolRewardManager">;
|
|
162
|
-
static get bcs(): import("@mysten/bcs").BcsStruct<{
|
|
163
|
-
id: import("@mysten/bcs").BcsStruct<{
|
|
164
|
-
id: import("@mysten/bcs").BcsStruct<{
|
|
165
|
-
bytes: import("@mysten/bcs").BcsType<string, string, string>;
|
|
166
|
-
}, string>;
|
|
167
|
-
}, string>;
|
|
168
|
-
total_shares: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
169
|
-
pool_rewards: import("@mysten/bcs").BcsType<any[], Iterable<any> & {
|
|
170
|
-
length: number;
|
|
171
|
-
}, string>;
|
|
172
|
-
last_update_time_ms: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
173
|
-
}, string>;
|
|
174
|
-
static fromFields(fields: Record<string, any>): PoolRewardManager;
|
|
175
|
-
static fromFieldsWithTypes(item: FieldsWithTypes): PoolRewardManager;
|
|
176
|
-
static fromBcs(data: Uint8Array): PoolRewardManager;
|
|
177
|
-
toJSONField(): {
|
|
178
|
-
id: string;
|
|
179
|
-
totalShares: string;
|
|
180
|
-
poolRewards: ({
|
|
181
|
-
id: string;
|
|
182
|
-
poolRewardManagerId: string;
|
|
183
|
-
coinType: {
|
|
184
|
-
name: string;
|
|
185
|
-
};
|
|
186
|
-
startTimeMs: string;
|
|
187
|
-
endTimeMs: string;
|
|
188
|
-
totalRewards: string;
|
|
189
|
-
allocatedRewards: {
|
|
190
|
-
value: string;
|
|
191
|
-
};
|
|
192
|
-
cumulativeRewardsPerShare: {
|
|
193
|
-
value: string;
|
|
194
|
-
};
|
|
195
|
-
numUserRewardManagers: string;
|
|
196
|
-
additionalFields: {
|
|
197
|
-
id: string;
|
|
198
|
-
size: string;
|
|
199
|
-
};
|
|
200
|
-
} | null)[];
|
|
201
|
-
lastUpdateTimeMs: string;
|
|
202
|
-
};
|
|
203
|
-
toJSON(): {
|
|
204
|
-
id: string;
|
|
205
|
-
totalShares: string;
|
|
206
|
-
poolRewards: ({
|
|
207
|
-
id: string;
|
|
208
|
-
poolRewardManagerId: string;
|
|
209
|
-
coinType: {
|
|
210
|
-
name: string;
|
|
211
|
-
};
|
|
212
|
-
startTimeMs: string;
|
|
213
|
-
endTimeMs: string;
|
|
214
|
-
totalRewards: string;
|
|
215
|
-
allocatedRewards: {
|
|
216
|
-
value: string;
|
|
217
|
-
};
|
|
218
|
-
cumulativeRewardsPerShare: {
|
|
219
|
-
value: string;
|
|
220
|
-
};
|
|
221
|
-
numUserRewardManagers: string;
|
|
222
|
-
additionalFields: {
|
|
223
|
-
id: string;
|
|
224
|
-
size: string;
|
|
225
|
-
};
|
|
226
|
-
} | null)[];
|
|
227
|
-
lastUpdateTimeMs: string;
|
|
228
|
-
$typeName: string;
|
|
229
|
-
$typeArgs: [];
|
|
230
|
-
};
|
|
231
|
-
static fromJSONField(field: any): PoolRewardManager;
|
|
232
|
-
static fromJSON(json: Record<string, any>): PoolRewardManager;
|
|
233
|
-
static fetch(client: SuiGrpcClient, id: string): Promise<PoolRewardManager>;
|
|
129
|
+
static fromCoreObject(obj: SuiClientTypes.Object<{
|
|
130
|
+
content: true;
|
|
131
|
+
}>): PoolReward;
|
|
132
|
+
static fetch(client: ClientWithCoreApi, id: string): Promise<PoolReward>;
|
|
234
133
|
}
|
|
235
134
|
export declare function isRewardBalance(type: string): boolean;
|
|
236
135
|
export interface RewardBalanceFields<T extends PhantomTypeArgument> {
|
|
237
|
-
dummyField: ToField<
|
|
136
|
+
dummyField: ToField<'bool'>;
|
|
238
137
|
}
|
|
239
138
|
export type RewardBalanceReified<T extends PhantomTypeArgument> = Reified<RewardBalance<T>, RewardBalanceFields<T>>;
|
|
139
|
+
export type RewardBalanceJSONField<T extends PhantomTypeArgument> = {
|
|
140
|
+
dummyField: boolean;
|
|
141
|
+
};
|
|
142
|
+
export type RewardBalanceJSON<T extends PhantomTypeArgument> = {
|
|
143
|
+
$typeName: typeof RewardBalance.$typeName;
|
|
144
|
+
$typeArgs: [PhantomToTypeStr<T>];
|
|
145
|
+
} & RewardBalanceJSONField<T>;
|
|
240
146
|
export declare class RewardBalance<T extends PhantomTypeArgument> implements StructClass {
|
|
241
147
|
__StructClass: true;
|
|
242
|
-
static
|
|
148
|
+
static get $typeName(): `${string}::liquidity_mining::RewardBalance`;
|
|
243
149
|
static readonly $numTypeParams = 1;
|
|
244
150
|
static readonly $isPhantom: readonly [true];
|
|
245
|
-
readonly $typeName:
|
|
246
|
-
readonly $fullTypeName: `${
|
|
151
|
+
readonly $typeName: typeof RewardBalance.$typeName;
|
|
152
|
+
readonly $fullTypeName: `${string}::liquidity_mining::RewardBalance<${PhantomToTypeStr<T>}>`;
|
|
247
153
|
readonly $typeArgs: [PhantomToTypeStr<T>];
|
|
248
|
-
readonly $isPhantom:
|
|
249
|
-
readonly dummyField: ToField<
|
|
154
|
+
readonly $isPhantom: typeof RewardBalance.$isPhantom;
|
|
155
|
+
readonly dummyField: ToField<'bool'>;
|
|
250
156
|
private constructor();
|
|
251
157
|
static reified<T extends PhantomReified<PhantomTypeArgument>>(T: T): RewardBalanceReified<ToPhantomTypeArgument<T>>;
|
|
252
158
|
static get r(): typeof RewardBalance.reified;
|
|
253
159
|
static phantom<T extends PhantomReified<PhantomTypeArgument>>(T: T): PhantomReified<ToTypeStr<RewardBalance<ToPhantomTypeArgument<T>>>>;
|
|
254
160
|
static get p(): typeof RewardBalance.phantom;
|
|
255
|
-
static
|
|
256
|
-
|
|
257
|
-
|
|
161
|
+
private static instantiateBcs;
|
|
162
|
+
private static cachedBcs;
|
|
163
|
+
static get bcs(): ReturnType<typeof RewardBalance.instantiateBcs>;
|
|
258
164
|
static fromFields<T extends PhantomReified<PhantomTypeArgument>>(typeArg: T, fields: Record<string, any>): RewardBalance<ToPhantomTypeArgument<T>>;
|
|
259
165
|
static fromFieldsWithTypes<T extends PhantomReified<PhantomTypeArgument>>(typeArg: T, item: FieldsWithTypes): RewardBalance<ToPhantomTypeArgument<T>>;
|
|
260
166
|
static fromBcs<T extends PhantomReified<PhantomTypeArgument>>(typeArg: T, data: Uint8Array): RewardBalance<ToPhantomTypeArgument<T>>;
|
|
261
|
-
toJSONField():
|
|
262
|
-
|
|
263
|
-
};
|
|
264
|
-
toJSON(): {
|
|
265
|
-
dummyField: boolean;
|
|
266
|
-
$typeName: string;
|
|
267
|
-
$typeArgs: [reified.PhantomToTypeStr<T>];
|
|
268
|
-
};
|
|
167
|
+
toJSONField(): RewardBalanceJSONField<T>;
|
|
168
|
+
toJSON(): RewardBalanceJSON<T>;
|
|
269
169
|
static fromJSONField<T extends PhantomReified<PhantomTypeArgument>>(typeArg: T, field: any): RewardBalance<ToPhantomTypeArgument<T>>;
|
|
270
170
|
static fromJSON<T extends PhantomReified<PhantomTypeArgument>>(typeArg: T, json: Record<string, any>): RewardBalance<ToPhantomTypeArgument<T>>;
|
|
271
|
-
static
|
|
171
|
+
static fromCoreObject<T extends PhantomReified<PhantomTypeArgument>>(typeArg: T, obj: SuiClientTypes.Object<{
|
|
172
|
+
content: true;
|
|
173
|
+
}>): RewardBalance<ToPhantomTypeArgument<T>>;
|
|
174
|
+
static fetch<T extends PhantomReified<PhantomTypeArgument>>(client: ClientWithCoreApi, typeArg: T, id: string): Promise<RewardBalance<ToPhantomTypeArgument<T>>>;
|
|
175
|
+
}
|
|
176
|
+
export declare function isUserRewardManager(type: string): boolean;
|
|
177
|
+
export interface UserRewardManagerFields {
|
|
178
|
+
poolRewardManagerId: ToField<ID>;
|
|
179
|
+
share: ToField<'u64'>;
|
|
180
|
+
rewards: ToField<Vector<Option<UserReward>>>;
|
|
181
|
+
lastUpdateTimeMs: ToField<'u64'>;
|
|
182
|
+
}
|
|
183
|
+
export type UserRewardManagerReified = Reified<UserRewardManager, UserRewardManagerFields>;
|
|
184
|
+
export type UserRewardManagerJSONField = {
|
|
185
|
+
poolRewardManagerId: string;
|
|
186
|
+
share: string;
|
|
187
|
+
rewards: (ToJSON<UserReward> | null)[];
|
|
188
|
+
lastUpdateTimeMs: string;
|
|
189
|
+
};
|
|
190
|
+
export type UserRewardManagerJSON = {
|
|
191
|
+
$typeName: typeof UserRewardManager.$typeName;
|
|
192
|
+
$typeArgs: [];
|
|
193
|
+
} & UserRewardManagerJSONField;
|
|
194
|
+
export declare class UserRewardManager implements StructClass {
|
|
195
|
+
__StructClass: true;
|
|
196
|
+
static get $typeName(): `${string}::liquidity_mining::UserRewardManager`;
|
|
197
|
+
static readonly $numTypeParams = 0;
|
|
198
|
+
static readonly $isPhantom: readonly [];
|
|
199
|
+
readonly $typeName: typeof UserRewardManager.$typeName;
|
|
200
|
+
readonly $fullTypeName: `${string}::liquidity_mining::UserRewardManager`;
|
|
201
|
+
readonly $typeArgs: [];
|
|
202
|
+
readonly $isPhantom: typeof UserRewardManager.$isPhantom;
|
|
203
|
+
readonly poolRewardManagerId: ToField<ID>;
|
|
204
|
+
readonly share: ToField<'u64'>;
|
|
205
|
+
readonly rewards: ToField<Vector<Option<UserReward>>>;
|
|
206
|
+
readonly lastUpdateTimeMs: ToField<'u64'>;
|
|
207
|
+
private constructor();
|
|
208
|
+
static reified(): UserRewardManagerReified;
|
|
209
|
+
static get r(): UserRewardManagerReified;
|
|
210
|
+
static phantom(): PhantomReified<ToTypeStr<UserRewardManager>>;
|
|
211
|
+
static get p(): PhantomReified<ToTypeStr<UserRewardManager>>;
|
|
212
|
+
private static instantiateBcs;
|
|
213
|
+
private static cachedBcs;
|
|
214
|
+
static get bcs(): ReturnType<typeof UserRewardManager.instantiateBcs>;
|
|
215
|
+
static fromFields(fields: Record<string, any>): UserRewardManager;
|
|
216
|
+
static fromFieldsWithTypes(item: FieldsWithTypes): UserRewardManager;
|
|
217
|
+
static fromBcs(data: Uint8Array): UserRewardManager;
|
|
218
|
+
toJSONField(): UserRewardManagerJSONField;
|
|
219
|
+
toJSON(): UserRewardManagerJSON;
|
|
220
|
+
static fromJSONField(field: any): UserRewardManager;
|
|
221
|
+
static fromJSON(json: Record<string, any>): UserRewardManager;
|
|
222
|
+
static fromCoreObject(obj: SuiClientTypes.Object<{
|
|
223
|
+
content: true;
|
|
224
|
+
}>): UserRewardManager;
|
|
225
|
+
static fetch(client: ClientWithCoreApi, id: string): Promise<UserRewardManager>;
|
|
272
226
|
}
|
|
273
227
|
export declare function isUserReward(type: string): boolean;
|
|
274
228
|
export interface UserRewardFields {
|
|
@@ -277,131 +231,44 @@ export interface UserRewardFields {
|
|
|
277
231
|
cumulativeRewardsPerShare: ToField<Decimal>;
|
|
278
232
|
}
|
|
279
233
|
export type UserRewardReified = Reified<UserReward, UserRewardFields>;
|
|
234
|
+
export type UserRewardJSONField = {
|
|
235
|
+
poolRewardId: string;
|
|
236
|
+
earnedRewards: ToJSON<Decimal>;
|
|
237
|
+
cumulativeRewardsPerShare: ToJSON<Decimal>;
|
|
238
|
+
};
|
|
239
|
+
export type UserRewardJSON = {
|
|
240
|
+
$typeName: typeof UserReward.$typeName;
|
|
241
|
+
$typeArgs: [];
|
|
242
|
+
} & UserRewardJSONField;
|
|
280
243
|
export declare class UserReward implements StructClass {
|
|
281
244
|
__StructClass: true;
|
|
282
|
-
static
|
|
245
|
+
static get $typeName(): `${string}::liquidity_mining::UserReward`;
|
|
283
246
|
static readonly $numTypeParams = 0;
|
|
284
247
|
static readonly $isPhantom: readonly [];
|
|
285
|
-
readonly $typeName:
|
|
286
|
-
readonly $fullTypeName: `${
|
|
248
|
+
readonly $typeName: typeof UserReward.$typeName;
|
|
249
|
+
readonly $fullTypeName: `${string}::liquidity_mining::UserReward`;
|
|
287
250
|
readonly $typeArgs: [];
|
|
288
|
-
readonly $isPhantom:
|
|
251
|
+
readonly $isPhantom: typeof UserReward.$isPhantom;
|
|
289
252
|
readonly poolRewardId: ToField<ID>;
|
|
290
253
|
readonly earnedRewards: ToField<Decimal>;
|
|
291
254
|
readonly cumulativeRewardsPerShare: ToField<Decimal>;
|
|
292
255
|
private constructor();
|
|
293
256
|
static reified(): UserRewardReified;
|
|
294
|
-
static get r():
|
|
257
|
+
static get r(): UserRewardReified;
|
|
295
258
|
static phantom(): PhantomReified<ToTypeStr<UserReward>>;
|
|
296
|
-
static get p():
|
|
297
|
-
static
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
}, string>;
|
|
301
|
-
earned_rewards: import("@mysten/bcs").BcsStruct<{
|
|
302
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
303
|
-
}, string>;
|
|
304
|
-
cumulative_rewards_per_share: import("@mysten/bcs").BcsStruct<{
|
|
305
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
306
|
-
}, string>;
|
|
307
|
-
}, string>;
|
|
259
|
+
static get p(): PhantomReified<ToTypeStr<UserReward>>;
|
|
260
|
+
private static instantiateBcs;
|
|
261
|
+
private static cachedBcs;
|
|
262
|
+
static get bcs(): ReturnType<typeof UserReward.instantiateBcs>;
|
|
308
263
|
static fromFields(fields: Record<string, any>): UserReward;
|
|
309
264
|
static fromFieldsWithTypes(item: FieldsWithTypes): UserReward;
|
|
310
265
|
static fromBcs(data: Uint8Array): UserReward;
|
|
311
|
-
toJSONField():
|
|
312
|
-
|
|
313
|
-
earnedRewards: {
|
|
314
|
-
value: string;
|
|
315
|
-
};
|
|
316
|
-
cumulativeRewardsPerShare: {
|
|
317
|
-
value: string;
|
|
318
|
-
};
|
|
319
|
-
};
|
|
320
|
-
toJSON(): {
|
|
321
|
-
poolRewardId: string;
|
|
322
|
-
earnedRewards: {
|
|
323
|
-
value: string;
|
|
324
|
-
};
|
|
325
|
-
cumulativeRewardsPerShare: {
|
|
326
|
-
value: string;
|
|
327
|
-
};
|
|
328
|
-
$typeName: string;
|
|
329
|
-
$typeArgs: [];
|
|
330
|
-
};
|
|
266
|
+
toJSONField(): UserRewardJSONField;
|
|
267
|
+
toJSON(): UserRewardJSON;
|
|
331
268
|
static fromJSONField(field: any): UserReward;
|
|
332
269
|
static fromJSON(json: Record<string, any>): UserReward;
|
|
333
|
-
static
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
poolRewardManagerId: ToField<ID>;
|
|
338
|
-
share: ToField<"u64">;
|
|
339
|
-
rewards: ToField<Vector<Option<UserReward>>>;
|
|
340
|
-
lastUpdateTimeMs: ToField<"u64">;
|
|
341
|
-
}
|
|
342
|
-
export type UserRewardManagerReified = Reified<UserRewardManager, UserRewardManagerFields>;
|
|
343
|
-
export declare class UserRewardManager implements StructClass {
|
|
344
|
-
__StructClass: true;
|
|
345
|
-
static readonly $typeName: string;
|
|
346
|
-
static readonly $numTypeParams = 0;
|
|
347
|
-
static readonly $isPhantom: readonly [];
|
|
348
|
-
readonly $typeName: string;
|
|
349
|
-
readonly $fullTypeName: `${typeof PKG_V1}::liquidity_mining::UserRewardManager`;
|
|
350
|
-
readonly $typeArgs: [];
|
|
351
|
-
readonly $isPhantom: readonly [];
|
|
352
|
-
readonly poolRewardManagerId: ToField<ID>;
|
|
353
|
-
readonly share: ToField<"u64">;
|
|
354
|
-
readonly rewards: ToField<Vector<Option<UserReward>>>;
|
|
355
|
-
readonly lastUpdateTimeMs: ToField<"u64">;
|
|
356
|
-
private constructor();
|
|
357
|
-
static reified(): UserRewardManagerReified;
|
|
358
|
-
static get r(): reified.StructClassReified<UserRewardManager, UserRewardManagerFields>;
|
|
359
|
-
static phantom(): PhantomReified<ToTypeStr<UserRewardManager>>;
|
|
360
|
-
static get p(): reified.PhantomReified<"0x1f54a9a2d71799553197e9ea24557797c6398d6a65f2d4d3818c9304b75d5e21::liquidity_mining::UserRewardManager" | "0xf95b06141ed4a174f239417323bde3f209b972f5930d8521ea38a52aff3a6ddf::liquidity_mining::UserRewardManager">;
|
|
361
|
-
static get bcs(): import("@mysten/bcs").BcsStruct<{
|
|
362
|
-
pool_reward_manager_id: import("@mysten/bcs").BcsStruct<{
|
|
363
|
-
bytes: import("@mysten/bcs").BcsType<string, string, string>;
|
|
364
|
-
}, string>;
|
|
365
|
-
share: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
366
|
-
rewards: import("@mysten/bcs").BcsType<any[], Iterable<any> & {
|
|
367
|
-
length: number;
|
|
368
|
-
}, string>;
|
|
369
|
-
last_update_time_ms: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
370
|
-
}, string>;
|
|
371
|
-
static fromFields(fields: Record<string, any>): UserRewardManager;
|
|
372
|
-
static fromFieldsWithTypes(item: FieldsWithTypes): UserRewardManager;
|
|
373
|
-
static fromBcs(data: Uint8Array): UserRewardManager;
|
|
374
|
-
toJSONField(): {
|
|
375
|
-
poolRewardManagerId: string;
|
|
376
|
-
share: string;
|
|
377
|
-
rewards: ({
|
|
378
|
-
poolRewardId: string;
|
|
379
|
-
earnedRewards: {
|
|
380
|
-
value: string;
|
|
381
|
-
};
|
|
382
|
-
cumulativeRewardsPerShare: {
|
|
383
|
-
value: string;
|
|
384
|
-
};
|
|
385
|
-
} | null)[];
|
|
386
|
-
lastUpdateTimeMs: string;
|
|
387
|
-
};
|
|
388
|
-
toJSON(): {
|
|
389
|
-
poolRewardManagerId: string;
|
|
390
|
-
share: string;
|
|
391
|
-
rewards: ({
|
|
392
|
-
poolRewardId: string;
|
|
393
|
-
earnedRewards: {
|
|
394
|
-
value: string;
|
|
395
|
-
};
|
|
396
|
-
cumulativeRewardsPerShare: {
|
|
397
|
-
value: string;
|
|
398
|
-
};
|
|
399
|
-
} | null)[];
|
|
400
|
-
lastUpdateTimeMs: string;
|
|
401
|
-
$typeName: string;
|
|
402
|
-
$typeArgs: [];
|
|
403
|
-
};
|
|
404
|
-
static fromJSONField(field: any): UserRewardManager;
|
|
405
|
-
static fromJSON(json: Record<string, any>): UserRewardManager;
|
|
406
|
-
static fetch(client: SuiGrpcClient, id: string): Promise<UserRewardManager>;
|
|
270
|
+
static fromCoreObject(obj: SuiClientTypes.Object<{
|
|
271
|
+
content: true;
|
|
272
|
+
}>): UserReward;
|
|
273
|
+
static fetch(client: ClientWithCoreApi, id: string): Promise<UserReward>;
|
|
407
274
|
}
|