carbon-js-sdk 0.2.14-dev.2 → 0.2.14-dev.4
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/lib/codec/cdp/query.d.ts +4 -3
- package/lib/codec/cdp/query.js +41 -12
- package/lib/codec/cdp/reward_scheme.d.ts +0 -2
- package/lib/codec/cdp/reward_scheme.js +7 -36
- package/lib/codec/cdp/tx.d.ts +21 -0
- package/lib/codec/cdp/tx.js +84 -1
- package/lib/codec/index.d.ts +13 -2
- package/lib/codec/index.js +231 -195
- package/lib/codec/pricing/event.d.ts +45 -0
- package/lib/codec/pricing/event.js +247 -1
- package/lib/codec/pricing/pricing.d.ts +1 -0
- package/lib/codec/pricing/pricing.js +20 -0
- package/lib/codec/pricing/tx.d.ts +96 -0
- package/lib/codec/pricing/tx.js +399 -1
- package/lib/modules/admin.d.ts +64 -6
- package/lib/modules/admin.js +114 -10
- package/lib/modules/cdp.d.ts +32 -1
- package/lib/modules/cdp.js +77 -3
- package/lib/provider/amino/types/admin.js +36 -12
- package/lib/provider/amino/types/cdp.js +30 -0
- package/lib/util/tx.d.ts +10 -0
- package/lib/websocket/types.d.ts +5 -0
- package/package.json +1 -1
package/lib/codec/cdp/query.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ import { PageRequest, PageResponse } from "../cosmos/base/query/v1beta1/paginati
|
|
|
6
6
|
import { AssetParams } from "./asset_params";
|
|
7
7
|
import { DebtInfo } from "./debt_info";
|
|
8
8
|
import { StablecoinDebtInfo } from "./stablecoin_debt_info";
|
|
9
|
-
import { PageRequest as PageRequest1, PageResponse as PageResponse2 } from "../query/pagination";
|
|
10
9
|
import { Coin } from "../cosmos/base/v1beta1/coin";
|
|
11
10
|
import { RewardScheme, RewardDebt } from "./reward_scheme";
|
|
12
11
|
export declare const protobufPackage = "Switcheo.carbon.cdp";
|
|
@@ -135,11 +134,13 @@ export interface CdpPosition {
|
|
|
135
134
|
borrow: Coin[];
|
|
136
135
|
}
|
|
137
136
|
export interface QueryCdpPositionsRequest {
|
|
138
|
-
pagination?:
|
|
137
|
+
pagination?: PageRequest;
|
|
138
|
+
maxHealthFactor: string;
|
|
139
|
+
minHealthFactor: string;
|
|
139
140
|
}
|
|
140
141
|
export interface QueryCdpPositionsResponse {
|
|
141
142
|
positions: CdpPosition[];
|
|
142
|
-
pagination?:
|
|
143
|
+
pagination?: PageResponse;
|
|
143
144
|
}
|
|
144
145
|
export interface QueryRewardSchemesAllRequest {
|
|
145
146
|
pagination?: PageRequest;
|
package/lib/codec/cdp/query.js
CHANGED
|
@@ -13,7 +13,6 @@ const pagination_1 = require("../cosmos/base/query/v1beta1/pagination");
|
|
|
13
13
|
const asset_params_1 = require("./asset_params");
|
|
14
14
|
const debt_info_1 = require("./debt_info");
|
|
15
15
|
const stablecoin_debt_info_1 = require("./stablecoin_debt_info");
|
|
16
|
-
const pagination_2 = require("../query/pagination");
|
|
17
16
|
const coin_1 = require("../cosmos/base/v1beta1/coin");
|
|
18
17
|
const reward_scheme_1 = require("./reward_scheme");
|
|
19
18
|
exports.protobufPackage = "Switcheo.carbon.cdp";
|
|
@@ -1923,11 +1922,20 @@ exports.CdpPosition = {
|
|
|
1923
1922
|
return message;
|
|
1924
1923
|
},
|
|
1925
1924
|
};
|
|
1926
|
-
const baseQueryCdpPositionsRequest = {
|
|
1925
|
+
const baseQueryCdpPositionsRequest = {
|
|
1926
|
+
maxHealthFactor: "",
|
|
1927
|
+
minHealthFactor: "",
|
|
1928
|
+
};
|
|
1927
1929
|
exports.QueryCdpPositionsRequest = {
|
|
1928
1930
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1929
1931
|
if (message.pagination !== undefined) {
|
|
1930
|
-
|
|
1932
|
+
pagination_1.PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim();
|
|
1933
|
+
}
|
|
1934
|
+
if (message.maxHealthFactor !== "") {
|
|
1935
|
+
writer.uint32(18).string(message.maxHealthFactor);
|
|
1936
|
+
}
|
|
1937
|
+
if (message.minHealthFactor !== "") {
|
|
1938
|
+
writer.uint32(26).string(message.minHealthFactor);
|
|
1931
1939
|
}
|
|
1932
1940
|
return writer;
|
|
1933
1941
|
},
|
|
@@ -1939,7 +1947,13 @@ exports.QueryCdpPositionsRequest = {
|
|
|
1939
1947
|
const tag = reader.uint32();
|
|
1940
1948
|
switch (tag >>> 3) {
|
|
1941
1949
|
case 1:
|
|
1942
|
-
message.pagination =
|
|
1950
|
+
message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32());
|
|
1951
|
+
break;
|
|
1952
|
+
case 2:
|
|
1953
|
+
message.maxHealthFactor = reader.string();
|
|
1954
|
+
break;
|
|
1955
|
+
case 3:
|
|
1956
|
+
message.minHealthFactor = reader.string();
|
|
1943
1957
|
break;
|
|
1944
1958
|
default:
|
|
1945
1959
|
reader.skipType(tag & 7);
|
|
@@ -1952,24 +1966,39 @@ exports.QueryCdpPositionsRequest = {
|
|
|
1952
1966
|
const message = Object.assign({}, baseQueryCdpPositionsRequest);
|
|
1953
1967
|
message.pagination =
|
|
1954
1968
|
object.pagination !== undefined && object.pagination !== null
|
|
1955
|
-
?
|
|
1969
|
+
? pagination_1.PageRequest.fromJSON(object.pagination)
|
|
1956
1970
|
: undefined;
|
|
1971
|
+
message.maxHealthFactor =
|
|
1972
|
+
object.maxHealthFactor !== undefined && object.maxHealthFactor !== null
|
|
1973
|
+
? String(object.maxHealthFactor)
|
|
1974
|
+
: "";
|
|
1975
|
+
message.minHealthFactor =
|
|
1976
|
+
object.minHealthFactor !== undefined && object.minHealthFactor !== null
|
|
1977
|
+
? String(object.minHealthFactor)
|
|
1978
|
+
: "";
|
|
1957
1979
|
return message;
|
|
1958
1980
|
},
|
|
1959
1981
|
toJSON(message) {
|
|
1960
1982
|
const obj = {};
|
|
1961
1983
|
message.pagination !== undefined &&
|
|
1962
1984
|
(obj.pagination = message.pagination
|
|
1963
|
-
?
|
|
1985
|
+
? pagination_1.PageRequest.toJSON(message.pagination)
|
|
1964
1986
|
: undefined);
|
|
1987
|
+
message.maxHealthFactor !== undefined &&
|
|
1988
|
+
(obj.maxHealthFactor = message.maxHealthFactor);
|
|
1989
|
+
message.minHealthFactor !== undefined &&
|
|
1990
|
+
(obj.minHealthFactor = message.minHealthFactor);
|
|
1965
1991
|
return obj;
|
|
1966
1992
|
},
|
|
1967
1993
|
fromPartial(object) {
|
|
1994
|
+
var _a, _b;
|
|
1968
1995
|
const message = Object.assign({}, baseQueryCdpPositionsRequest);
|
|
1969
1996
|
message.pagination =
|
|
1970
1997
|
object.pagination !== undefined && object.pagination !== null
|
|
1971
|
-
?
|
|
1998
|
+
? pagination_1.PageRequest.fromPartial(object.pagination)
|
|
1972
1999
|
: undefined;
|
|
2000
|
+
message.maxHealthFactor = (_a = object.maxHealthFactor) !== null && _a !== void 0 ? _a : "";
|
|
2001
|
+
message.minHealthFactor = (_b = object.minHealthFactor) !== null && _b !== void 0 ? _b : "";
|
|
1973
2002
|
return message;
|
|
1974
2003
|
},
|
|
1975
2004
|
};
|
|
@@ -1980,7 +2009,7 @@ exports.QueryCdpPositionsResponse = {
|
|
|
1980
2009
|
exports.CdpPosition.encode(v, writer.uint32(10).fork()).ldelim();
|
|
1981
2010
|
}
|
|
1982
2011
|
if (message.pagination !== undefined) {
|
|
1983
|
-
|
|
2012
|
+
pagination_1.PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
1984
2013
|
}
|
|
1985
2014
|
return writer;
|
|
1986
2015
|
},
|
|
@@ -1996,7 +2025,7 @@ exports.QueryCdpPositionsResponse = {
|
|
|
1996
2025
|
message.positions.push(exports.CdpPosition.decode(reader, reader.uint32()));
|
|
1997
2026
|
break;
|
|
1998
2027
|
case 2:
|
|
1999
|
-
message.pagination =
|
|
2028
|
+
message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32());
|
|
2000
2029
|
break;
|
|
2001
2030
|
default:
|
|
2002
2031
|
reader.skipType(tag & 7);
|
|
@@ -2011,7 +2040,7 @@ exports.QueryCdpPositionsResponse = {
|
|
|
2011
2040
|
message.positions = ((_a = object.positions) !== null && _a !== void 0 ? _a : []).map((e) => exports.CdpPosition.fromJSON(e));
|
|
2012
2041
|
message.pagination =
|
|
2013
2042
|
object.pagination !== undefined && object.pagination !== null
|
|
2014
|
-
?
|
|
2043
|
+
? pagination_1.PageResponse.fromJSON(object.pagination)
|
|
2015
2044
|
: undefined;
|
|
2016
2045
|
return message;
|
|
2017
2046
|
},
|
|
@@ -2025,7 +2054,7 @@ exports.QueryCdpPositionsResponse = {
|
|
|
2025
2054
|
}
|
|
2026
2055
|
message.pagination !== undefined &&
|
|
2027
2056
|
(obj.pagination = message.pagination
|
|
2028
|
-
?
|
|
2057
|
+
? pagination_1.PageResponse.toJSON(message.pagination)
|
|
2029
2058
|
: undefined);
|
|
2030
2059
|
return obj;
|
|
2031
2060
|
},
|
|
@@ -2035,7 +2064,7 @@ exports.QueryCdpPositionsResponse = {
|
|
|
2035
2064
|
message.positions = ((_a = object.positions) !== null && _a !== void 0 ? _a : []).map((e) => exports.CdpPosition.fromPartial(e));
|
|
2036
2065
|
message.pagination =
|
|
2037
2066
|
object.pagination !== undefined && object.pagination !== null
|
|
2038
|
-
?
|
|
2067
|
+
? pagination_1.PageResponse.fromPartial(object.pagination)
|
|
2039
2068
|
: undefined;
|
|
2040
2069
|
return message;
|
|
2041
2070
|
},
|
|
@@ -10,7 +10,6 @@ export interface RewardScheme {
|
|
|
10
10
|
rewardAmountPerSecond: string;
|
|
11
11
|
startTime?: Date;
|
|
12
12
|
endTime?: Date;
|
|
13
|
-
rewardReserveAmount: string;
|
|
14
13
|
rewardPerShareLastUpdatedAt?: Date;
|
|
15
14
|
rewardPerShare: string;
|
|
16
15
|
}
|
|
@@ -21,7 +20,6 @@ export interface CreateRewardSchemeParams {
|
|
|
21
20
|
rewardAmountPerSecond: string;
|
|
22
21
|
startTime?: Date;
|
|
23
22
|
endTime?: Date;
|
|
24
|
-
reservesAmount: string;
|
|
25
23
|
}
|
|
26
24
|
export interface UpdateRewardSchemeParams {
|
|
27
25
|
rewardSchemeId: Long;
|
|
@@ -17,7 +17,6 @@ const baseRewardScheme = {
|
|
|
17
17
|
assetDenom: "",
|
|
18
18
|
rewardType: "",
|
|
19
19
|
rewardAmountPerSecond: "",
|
|
20
|
-
rewardReserveAmount: "",
|
|
21
20
|
rewardPerShare: "",
|
|
22
21
|
};
|
|
23
22
|
exports.RewardScheme = {
|
|
@@ -46,14 +45,11 @@ exports.RewardScheme = {
|
|
|
46
45
|
if (message.endTime !== undefined) {
|
|
47
46
|
timestamp_1.Timestamp.encode(toTimestamp(message.endTime), writer.uint32(66).fork()).ldelim();
|
|
48
47
|
}
|
|
49
|
-
if (message.rewardReserveAmount !== "") {
|
|
50
|
-
writer.uint32(74).string(message.rewardReserveAmount);
|
|
51
|
-
}
|
|
52
48
|
if (message.rewardPerShareLastUpdatedAt !== undefined) {
|
|
53
|
-
timestamp_1.Timestamp.encode(toTimestamp(message.rewardPerShareLastUpdatedAt), writer.uint32(
|
|
49
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.rewardPerShareLastUpdatedAt), writer.uint32(74).fork()).ldelim();
|
|
54
50
|
}
|
|
55
51
|
if (message.rewardPerShare !== "") {
|
|
56
|
-
writer.uint32(
|
|
52
|
+
writer.uint32(82).string(message.rewardPerShare);
|
|
57
53
|
}
|
|
58
54
|
return writer;
|
|
59
55
|
},
|
|
@@ -89,12 +85,9 @@ exports.RewardScheme = {
|
|
|
89
85
|
message.endTime = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
90
86
|
break;
|
|
91
87
|
case 9:
|
|
92
|
-
message.rewardReserveAmount = reader.string();
|
|
93
|
-
break;
|
|
94
|
-
case 10:
|
|
95
88
|
message.rewardPerShareLastUpdatedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
96
89
|
break;
|
|
97
|
-
case
|
|
90
|
+
case 10:
|
|
98
91
|
message.rewardPerShare = reader.string();
|
|
99
92
|
break;
|
|
100
93
|
default:
|
|
@@ -139,11 +132,6 @@ exports.RewardScheme = {
|
|
|
139
132
|
object.endTime !== undefined && object.endTime !== null
|
|
140
133
|
? fromJsonTimestamp(object.endTime)
|
|
141
134
|
: undefined;
|
|
142
|
-
message.rewardReserveAmount =
|
|
143
|
-
object.rewardReserveAmount !== undefined &&
|
|
144
|
-
object.rewardReserveAmount !== null
|
|
145
|
-
? String(object.rewardReserveAmount)
|
|
146
|
-
: "";
|
|
147
135
|
message.rewardPerShareLastUpdatedAt =
|
|
148
136
|
object.rewardPerShareLastUpdatedAt !== undefined &&
|
|
149
137
|
object.rewardPerShareLastUpdatedAt !== null
|
|
@@ -170,8 +158,6 @@ exports.RewardScheme = {
|
|
|
170
158
|
(obj.startTime = message.startTime.toISOString());
|
|
171
159
|
message.endTime !== undefined &&
|
|
172
160
|
(obj.endTime = message.endTime.toISOString());
|
|
173
|
-
message.rewardReserveAmount !== undefined &&
|
|
174
|
-
(obj.rewardReserveAmount = message.rewardReserveAmount);
|
|
175
161
|
message.rewardPerShareLastUpdatedAt !== undefined &&
|
|
176
162
|
(obj.rewardPerShareLastUpdatedAt =
|
|
177
163
|
message.rewardPerShareLastUpdatedAt.toISOString());
|
|
@@ -180,7 +166,7 @@ exports.RewardScheme = {
|
|
|
180
166
|
return obj;
|
|
181
167
|
},
|
|
182
168
|
fromPartial(object) {
|
|
183
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
|
169
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
184
170
|
const message = Object.assign({}, baseRewardScheme);
|
|
185
171
|
message.id =
|
|
186
172
|
object.id !== undefined && object.id !== null
|
|
@@ -193,10 +179,9 @@ exports.RewardScheme = {
|
|
|
193
179
|
message.rewardAmountPerSecond = (_e = object.rewardAmountPerSecond) !== null && _e !== void 0 ? _e : "";
|
|
194
180
|
message.startTime = (_f = object.startTime) !== null && _f !== void 0 ? _f : undefined;
|
|
195
181
|
message.endTime = (_g = object.endTime) !== null && _g !== void 0 ? _g : undefined;
|
|
196
|
-
message.rewardReserveAmount = (_h = object.rewardReserveAmount) !== null && _h !== void 0 ? _h : "";
|
|
197
182
|
message.rewardPerShareLastUpdatedAt =
|
|
198
|
-
(
|
|
199
|
-
message.rewardPerShare = (
|
|
183
|
+
(_h = object.rewardPerShareLastUpdatedAt) !== null && _h !== void 0 ? _h : undefined;
|
|
184
|
+
message.rewardPerShare = (_j = object.rewardPerShare) !== null && _j !== void 0 ? _j : "";
|
|
200
185
|
return message;
|
|
201
186
|
},
|
|
202
187
|
};
|
|
@@ -205,7 +190,6 @@ const baseCreateRewardSchemeParams = {
|
|
|
205
190
|
assetDenom: "",
|
|
206
191
|
rewardType: "",
|
|
207
192
|
rewardAmountPerSecond: "",
|
|
208
|
-
reservesAmount: "",
|
|
209
193
|
};
|
|
210
194
|
exports.CreateRewardSchemeParams = {
|
|
211
195
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
@@ -227,9 +211,6 @@ exports.CreateRewardSchemeParams = {
|
|
|
227
211
|
if (message.endTime !== undefined) {
|
|
228
212
|
timestamp_1.Timestamp.encode(toTimestamp(message.endTime), writer.uint32(50).fork()).ldelim();
|
|
229
213
|
}
|
|
230
|
-
if (message.reservesAmount !== "") {
|
|
231
|
-
writer.uint32(58).string(message.reservesAmount);
|
|
232
|
-
}
|
|
233
214
|
return writer;
|
|
234
215
|
},
|
|
235
216
|
decode(input, length) {
|
|
@@ -257,9 +238,6 @@ exports.CreateRewardSchemeParams = {
|
|
|
257
238
|
case 6:
|
|
258
239
|
message.endTime = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
259
240
|
break;
|
|
260
|
-
case 7:
|
|
261
|
-
message.reservesAmount = reader.string();
|
|
262
|
-
break;
|
|
263
241
|
default:
|
|
264
242
|
reader.skipType(tag & 7);
|
|
265
243
|
break;
|
|
@@ -294,10 +272,6 @@ exports.CreateRewardSchemeParams = {
|
|
|
294
272
|
object.endTime !== undefined && object.endTime !== null
|
|
295
273
|
? fromJsonTimestamp(object.endTime)
|
|
296
274
|
: undefined;
|
|
297
|
-
message.reservesAmount =
|
|
298
|
-
object.reservesAmount !== undefined && object.reservesAmount !== null
|
|
299
|
-
? String(object.reservesAmount)
|
|
300
|
-
: "";
|
|
301
275
|
return message;
|
|
302
276
|
},
|
|
303
277
|
toJSON(message) {
|
|
@@ -312,12 +286,10 @@ exports.CreateRewardSchemeParams = {
|
|
|
312
286
|
(obj.startTime = message.startTime.toISOString());
|
|
313
287
|
message.endTime !== undefined &&
|
|
314
288
|
(obj.endTime = message.endTime.toISOString());
|
|
315
|
-
message.reservesAmount !== undefined &&
|
|
316
|
-
(obj.reservesAmount = message.reservesAmount);
|
|
317
289
|
return obj;
|
|
318
290
|
},
|
|
319
291
|
fromPartial(object) {
|
|
320
|
-
var _a, _b, _c, _d, _e, _f
|
|
292
|
+
var _a, _b, _c, _d, _e, _f;
|
|
321
293
|
const message = Object.assign({}, baseCreateRewardSchemeParams);
|
|
322
294
|
message.rewardDenom = (_a = object.rewardDenom) !== null && _a !== void 0 ? _a : "";
|
|
323
295
|
message.assetDenom = (_b = object.assetDenom) !== null && _b !== void 0 ? _b : "";
|
|
@@ -325,7 +297,6 @@ exports.CreateRewardSchemeParams = {
|
|
|
325
297
|
message.rewardAmountPerSecond = (_d = object.rewardAmountPerSecond) !== null && _d !== void 0 ? _d : "";
|
|
326
298
|
message.startTime = (_e = object.startTime) !== null && _e !== void 0 ? _e : undefined;
|
|
327
299
|
message.endTime = (_f = object.endTime) !== null && _f !== void 0 ? _f : undefined;
|
|
328
|
-
message.reservesAmount = (_g = object.reservesAmount) !== null && _g !== void 0 ? _g : "";
|
|
329
300
|
return message;
|
|
330
301
|
},
|
|
331
302
|
};
|
package/lib/codec/cdp/tx.d.ts
CHANGED
|
@@ -237,6 +237,11 @@ export interface MsgAddRewardReserve {
|
|
|
237
237
|
}
|
|
238
238
|
export interface MsgAddRewardReserveResponse {
|
|
239
239
|
}
|
|
240
|
+
export interface MsgClaimRewards {
|
|
241
|
+
creator: string;
|
|
242
|
+
}
|
|
243
|
+
export interface MsgClaimRewardsResponse {
|
|
244
|
+
}
|
|
240
245
|
export declare const MsgAddRateStrategy: {
|
|
241
246
|
encode(message: MsgAddRateStrategy, writer?: _m0.Writer): _m0.Writer;
|
|
242
247
|
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgAddRateStrategy;
|
|
@@ -657,6 +662,20 @@ export declare const MsgAddRewardReserveResponse: {
|
|
|
657
662
|
toJSON(_: MsgAddRewardReserveResponse): unknown;
|
|
658
663
|
fromPartial(_: DeepPartial<MsgAddRewardReserveResponse>): MsgAddRewardReserveResponse;
|
|
659
664
|
};
|
|
665
|
+
export declare const MsgClaimRewards: {
|
|
666
|
+
encode(message: MsgClaimRewards, writer?: _m0.Writer): _m0.Writer;
|
|
667
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgClaimRewards;
|
|
668
|
+
fromJSON(object: any): MsgClaimRewards;
|
|
669
|
+
toJSON(message: MsgClaimRewards): unknown;
|
|
670
|
+
fromPartial(object: DeepPartial<MsgClaimRewards>): MsgClaimRewards;
|
|
671
|
+
};
|
|
672
|
+
export declare const MsgClaimRewardsResponse: {
|
|
673
|
+
encode(_: MsgClaimRewardsResponse, writer?: _m0.Writer): _m0.Writer;
|
|
674
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgClaimRewardsResponse;
|
|
675
|
+
fromJSON(_: any): MsgClaimRewardsResponse;
|
|
676
|
+
toJSON(_: MsgClaimRewardsResponse): unknown;
|
|
677
|
+
fromPartial(_: DeepPartial<MsgClaimRewardsResponse>): MsgClaimRewardsResponse;
|
|
678
|
+
};
|
|
660
679
|
/** Msg defines the Msg service. */
|
|
661
680
|
export interface Msg {
|
|
662
681
|
AddRateStrategy(request: MsgAddRateStrategy): Promise<MsgAddRateStrategyResponse>;
|
|
@@ -680,6 +699,7 @@ export interface Msg {
|
|
|
680
699
|
CreateRewardScheme(request: MsgCreateRewardScheme): Promise<MsgCreateRewardSchemeResponse>;
|
|
681
700
|
UpdateRewardScheme(request: MsgUpdateRewardScheme): Promise<MsgUpdateRewardSchemeResponse>;
|
|
682
701
|
AddReserve(request: MsgAddRewardReserve): Promise<MsgAddRewardReserveResponse>;
|
|
702
|
+
ClaimRewards(request: MsgClaimRewards): Promise<MsgClaimRewardsResponse>;
|
|
683
703
|
SetStablecoinInterestRate(request: MsgSetStablecoinInterestRate): Promise<MsgSetStablecoinInterestRateResponse>;
|
|
684
704
|
MintStablecoin(request: MsgMintStablecoin): Promise<MsgMintStablecoinResponse>;
|
|
685
705
|
ReturnStablecoin(request: MsgReturnStablecoin): Promise<MsgReturnStablecoinResponse>;
|
|
@@ -715,6 +735,7 @@ export declare class MsgClientImpl implements Msg {
|
|
|
715
735
|
CreateRewardScheme(request: MsgCreateRewardScheme): Promise<MsgCreateRewardSchemeResponse>;
|
|
716
736
|
UpdateRewardScheme(request: MsgUpdateRewardScheme): Promise<MsgUpdateRewardSchemeResponse>;
|
|
717
737
|
AddReserve(request: MsgAddRewardReserve): Promise<MsgAddRewardReserveResponse>;
|
|
738
|
+
ClaimRewards(request: MsgClaimRewards): Promise<MsgClaimRewardsResponse>;
|
|
718
739
|
SetStablecoinInterestRate(request: MsgSetStablecoinInterestRate): Promise<MsgSetStablecoinInterestRateResponse>;
|
|
719
740
|
MintStablecoin(request: MsgMintStablecoin): Promise<MsgMintStablecoinResponse>;
|
|
720
741
|
ReturnStablecoin(request: MsgReturnStablecoin): Promise<MsgReturnStablecoinResponse>;
|
package/lib/codec/cdp/tx.js
CHANGED
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.MsgLiquidateCollateralWithCdpTokens = exports.MsgSetSmallLiquidationSizeResponse = exports.MsgSetSmallLiquidationSize = exports.MsgSetMinimumCloseFactorResponse = exports.MsgSetMinimumCloseFactor = exports.MsgSetCompleteLiquidationThresholdResponse = exports.MsgSetCompleteLiquidationThreshold = exports.MsgReturnStablecoinResponse = exports.MsgReturnStablecoin = exports.MsgMintStablecoinResponse = exports.MsgMintStablecoin = exports.MsgSetStablecoinInterestRateResponse = exports.MsgSetStablecoinInterestRate = exports.MsgRepayAssetWithCollateralResponse = exports.MsgRepayAssetWithCollateral = exports.MsgRepayAssetWithCdpTokensResponse = exports.MsgRepayAssetWithCdpTokens = exports.MsgSetInterestFeeResponse = exports.MsgSetInterestFee = exports.MsgSetLiquidationFeeResponse = exports.MsgSetLiquidationFee = exports.MsgLiquidateCollateralResponse = exports.MsgLiquidateCollateral = exports.MsgUnlockCollateralAndWithdrawAssetResponse = exports.MsgUnlockCollateralAndWithdrawAsset = exports.MsgSupplyAssetAndLockCollateralResponse = exports.MsgSupplyAssetAndLockCollateral = exports.MsgRepayAssetResponse = exports.MsgRepayAsset = exports.MsgBorrowAssetResponse = exports.MsgBorrowAsset = exports.MsgUnlockCollateralResponse = exports.MsgUnlockCollateral = exports.MsgLockCollateralResponse = exports.MsgLockCollateral = exports.MsgWithdrawAssetResponse = exports.MsgWithdrawAsset = exports.MsgSupplyAssetResponse = exports.MsgSupplyAsset = exports.MsgUpdateAssetResponse = exports.MsgUpdateAsset = exports.MsgAddAssetResponse = exports.MsgAddAsset = exports.MsgRemoveRateStrategyResponse = exports.MsgRemoveRateStrategy = exports.MsgUpdateRateStrategyResponse = exports.MsgUpdateRateStrategy = exports.MsgAddRateStrategyResponse = exports.MsgAddRateStrategy = exports.protobufPackage = void 0;
|
|
7
|
-
exports.MsgClientImpl = exports.MsgAddRewardReserveResponse = exports.MsgAddRewardReserve = exports.MsgUpdateRewardSchemeResponse = exports.MsgUpdateRewardScheme = exports.MsgCreateRewardSchemeResponse = exports.MsgCreateRewardScheme = exports.MsgLiquidateCollateralWithStablecoinResponse = exports.MsgLiquidateCollateralWithStablecoin = exports.MsgLiquidateCollateralWithCollateralResponse = exports.MsgLiquidateCollateralWithCollateral = exports.MsgLiquidateCollateralWithCdpTokensResponse = void 0;
|
|
7
|
+
exports.MsgClientImpl = exports.MsgClaimRewardsResponse = exports.MsgClaimRewards = exports.MsgAddRewardReserveResponse = exports.MsgAddRewardReserve = exports.MsgUpdateRewardSchemeResponse = exports.MsgUpdateRewardScheme = exports.MsgCreateRewardSchemeResponse = exports.MsgCreateRewardScheme = exports.MsgLiquidateCollateralWithStablecoinResponse = exports.MsgLiquidateCollateralWithStablecoin = exports.MsgLiquidateCollateralWithCollateralResponse = exports.MsgLiquidateCollateralWithCollateral = exports.MsgLiquidateCollateralWithCdpTokensResponse = void 0;
|
|
8
8
|
/* eslint-disable */
|
|
9
9
|
const long_1 = __importDefault(require("long"));
|
|
10
10
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
@@ -3534,6 +3534,83 @@ exports.MsgAddRewardReserveResponse = {
|
|
|
3534
3534
|
return message;
|
|
3535
3535
|
},
|
|
3536
3536
|
};
|
|
3537
|
+
const baseMsgClaimRewards = { creator: "" };
|
|
3538
|
+
exports.MsgClaimRewards = {
|
|
3539
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
3540
|
+
if (message.creator !== "") {
|
|
3541
|
+
writer.uint32(10).string(message.creator);
|
|
3542
|
+
}
|
|
3543
|
+
return writer;
|
|
3544
|
+
},
|
|
3545
|
+
decode(input, length) {
|
|
3546
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
3547
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3548
|
+
const message = Object.assign({}, baseMsgClaimRewards);
|
|
3549
|
+
while (reader.pos < end) {
|
|
3550
|
+
const tag = reader.uint32();
|
|
3551
|
+
switch (tag >>> 3) {
|
|
3552
|
+
case 1:
|
|
3553
|
+
message.creator = reader.string();
|
|
3554
|
+
break;
|
|
3555
|
+
default:
|
|
3556
|
+
reader.skipType(tag & 7);
|
|
3557
|
+
break;
|
|
3558
|
+
}
|
|
3559
|
+
}
|
|
3560
|
+
return message;
|
|
3561
|
+
},
|
|
3562
|
+
fromJSON(object) {
|
|
3563
|
+
const message = Object.assign({}, baseMsgClaimRewards);
|
|
3564
|
+
message.creator =
|
|
3565
|
+
object.creator !== undefined && object.creator !== null
|
|
3566
|
+
? String(object.creator)
|
|
3567
|
+
: "";
|
|
3568
|
+
return message;
|
|
3569
|
+
},
|
|
3570
|
+
toJSON(message) {
|
|
3571
|
+
const obj = {};
|
|
3572
|
+
message.creator !== undefined && (obj.creator = message.creator);
|
|
3573
|
+
return obj;
|
|
3574
|
+
},
|
|
3575
|
+
fromPartial(object) {
|
|
3576
|
+
var _a;
|
|
3577
|
+
const message = Object.assign({}, baseMsgClaimRewards);
|
|
3578
|
+
message.creator = (_a = object.creator) !== null && _a !== void 0 ? _a : "";
|
|
3579
|
+
return message;
|
|
3580
|
+
},
|
|
3581
|
+
};
|
|
3582
|
+
const baseMsgClaimRewardsResponse = {};
|
|
3583
|
+
exports.MsgClaimRewardsResponse = {
|
|
3584
|
+
encode(_, writer = minimal_1.default.Writer.create()) {
|
|
3585
|
+
return writer;
|
|
3586
|
+
},
|
|
3587
|
+
decode(input, length) {
|
|
3588
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
3589
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3590
|
+
const message = Object.assign({}, baseMsgClaimRewardsResponse);
|
|
3591
|
+
while (reader.pos < end) {
|
|
3592
|
+
const tag = reader.uint32();
|
|
3593
|
+
switch (tag >>> 3) {
|
|
3594
|
+
default:
|
|
3595
|
+
reader.skipType(tag & 7);
|
|
3596
|
+
break;
|
|
3597
|
+
}
|
|
3598
|
+
}
|
|
3599
|
+
return message;
|
|
3600
|
+
},
|
|
3601
|
+
fromJSON(_) {
|
|
3602
|
+
const message = Object.assign({}, baseMsgClaimRewardsResponse);
|
|
3603
|
+
return message;
|
|
3604
|
+
},
|
|
3605
|
+
toJSON(_) {
|
|
3606
|
+
const obj = {};
|
|
3607
|
+
return obj;
|
|
3608
|
+
},
|
|
3609
|
+
fromPartial(_) {
|
|
3610
|
+
const message = Object.assign({}, baseMsgClaimRewardsResponse);
|
|
3611
|
+
return message;
|
|
3612
|
+
},
|
|
3613
|
+
};
|
|
3537
3614
|
class MsgClientImpl {
|
|
3538
3615
|
constructor(rpc) {
|
|
3539
3616
|
this.rpc = rpc;
|
|
@@ -3560,6 +3637,7 @@ class MsgClientImpl {
|
|
|
3560
3637
|
this.CreateRewardScheme = this.CreateRewardScheme.bind(this);
|
|
3561
3638
|
this.UpdateRewardScheme = this.UpdateRewardScheme.bind(this);
|
|
3562
3639
|
this.AddReserve = this.AddReserve.bind(this);
|
|
3640
|
+
this.ClaimRewards = this.ClaimRewards.bind(this);
|
|
3563
3641
|
this.SetStablecoinInterestRate = this.SetStablecoinInterestRate.bind(this);
|
|
3564
3642
|
this.MintStablecoin = this.MintStablecoin.bind(this);
|
|
3565
3643
|
this.ReturnStablecoin = this.ReturnStablecoin.bind(this);
|
|
@@ -3679,6 +3757,11 @@ class MsgClientImpl {
|
|
|
3679
3757
|
const promise = this.rpc.request("Switcheo.carbon.cdp.Msg", "AddReserve", data);
|
|
3680
3758
|
return promise.then((data) => exports.MsgAddRewardReserveResponse.decode(new minimal_1.default.Reader(data)));
|
|
3681
3759
|
}
|
|
3760
|
+
ClaimRewards(request) {
|
|
3761
|
+
const data = exports.MsgClaimRewards.encode(request).finish();
|
|
3762
|
+
const promise = this.rpc.request("Switcheo.carbon.cdp.Msg", "ClaimRewards", data);
|
|
3763
|
+
return promise.then((data) => exports.MsgClaimRewardsResponse.decode(new minimal_1.default.Reader(data)));
|
|
3764
|
+
}
|
|
3682
3765
|
SetStablecoinInterestRate(request) {
|
|
3683
3766
|
const data = exports.MsgSetStablecoinInterestRate.encode(request).finish();
|
|
3684
3767
|
const promise = this.rpc.request("Switcheo.carbon.cdp.Msg", "SetStablecoinInterestRate", data);
|
package/lib/codec/index.d.ts
CHANGED
|
@@ -74,6 +74,8 @@ export declare const TxTypes: {
|
|
|
74
74
|
MsgUpdateRewardSchemeResponse: string;
|
|
75
75
|
MsgAddRewardReserve: string;
|
|
76
76
|
MsgAddRewardReserveResponse: string;
|
|
77
|
+
MsgClaimRewards: string;
|
|
78
|
+
MsgClaimRewardsResponse: string;
|
|
77
79
|
MsgSyncGenesis: string;
|
|
78
80
|
MsgSyncGenesisResponse: string;
|
|
79
81
|
MsgSyncHeaders: string;
|
|
@@ -292,6 +294,14 @@ export declare const TxTypes: {
|
|
|
292
294
|
SetCommitmentCurveProposal: string;
|
|
293
295
|
SetRewardsWeightsProposal: string;
|
|
294
296
|
UpdatePoolProposal: string;
|
|
297
|
+
MsgSetBackfillTimeInterval: string;
|
|
298
|
+
MsgSetBackfillTimeIntervalResponse: string;
|
|
299
|
+
MsgSetSmoothenBand: string;
|
|
300
|
+
MsgSetSmoothenBandResponse: string;
|
|
301
|
+
MsgSetImpactBand: string;
|
|
302
|
+
MsgSetImpactBandResponse: string;
|
|
303
|
+
MsgSetStaleIndexAllowance: string;
|
|
304
|
+
MsgSetStaleIndexAllowanceResponse: string;
|
|
295
305
|
SettlementPriceProposal: string;
|
|
296
306
|
MsgSetWrapperMapping: string;
|
|
297
307
|
MsgSetWrapperMappingResponse: string;
|
|
@@ -309,7 +319,7 @@ export { Params as OrderParams, Order, DBOrder, OrdersForMarket, OrderIDsForMark
|
|
|
309
319
|
export { QueryGetOrderRequest, QueryGetOrderResponse, QueryAllOrderRequest, QueryAllOrderResponse, QueryAccountOpenOrdersRequest, QueryAccountOpenOrdersResponse, QueryParamsRequest as QueryOrderParamsRequest, QueryParamsResponse as QueryOrderParamsResponse, QueryOrderAllocatedMarginRequest, QueryOrderAllocatedMarginResponse } from "./order/query";
|
|
310
320
|
export { OrderEvent } from "./order/event";
|
|
311
321
|
export { DebtInfo } from "./cdp/debt_info";
|
|
312
|
-
export { MsgAddRateStrategy, MsgAddRateStrategyResponse, MsgUpdateRateStrategy, MsgUpdateRateStrategyResponse, MsgRemoveRateStrategy, MsgRemoveRateStrategyResponse, MsgAddAsset, MsgAddAssetResponse, MsgUpdateAsset, MsgUpdateAssetResponse, MsgSupplyAsset, MsgSupplyAssetResponse, MsgWithdrawAsset, MsgWithdrawAssetResponse, MsgLockCollateral, MsgLockCollateralResponse, MsgUnlockCollateral, MsgUnlockCollateralResponse, MsgBorrowAsset, MsgBorrowAssetResponse, MsgRepayAsset, MsgRepayAssetResponse, MsgSupplyAssetAndLockCollateral, MsgSupplyAssetAndLockCollateralResponse, MsgUnlockCollateralAndWithdrawAsset, MsgUnlockCollateralAndWithdrawAssetResponse, MsgLiquidateCollateral, MsgLiquidateCollateralResponse, MsgSetLiquidationFee, MsgSetLiquidationFeeResponse, MsgSetInterestFee, MsgSetInterestFeeResponse, MsgRepayAssetWithCdpTokens, MsgRepayAssetWithCdpTokensResponse, MsgRepayAssetWithCollateral, MsgRepayAssetWithCollateralResponse, MsgSetStablecoinInterestRate, MsgSetStablecoinInterestRateResponse, MsgMintStablecoin, MsgMintStablecoinResponse, MsgReturnStablecoin, MsgReturnStablecoinResponse, MsgSetCompleteLiquidationThreshold, MsgSetCompleteLiquidationThresholdResponse, MsgSetMinimumCloseFactor, MsgSetMinimumCloseFactorResponse, MsgSetSmallLiquidationSize, MsgSetSmallLiquidationSizeResponse, MsgLiquidateCollateralWithCdpTokens, MsgLiquidateCollateralWithCdpTokensResponse, MsgLiquidateCollateralWithCollateral, MsgLiquidateCollateralWithCollateralResponse, MsgLiquidateCollateralWithStablecoin, MsgLiquidateCollateralWithStablecoinResponse, MsgCreateRewardScheme, MsgCreateRewardSchemeResponse, MsgUpdateRewardScheme, MsgUpdateRewardSchemeResponse, MsgAddRewardReserve, MsgAddRewardReserveResponse } from "./cdp/tx";
|
|
322
|
+
export { MsgAddRateStrategy, MsgAddRateStrategyResponse, MsgUpdateRateStrategy, MsgUpdateRateStrategyResponse, MsgRemoveRateStrategy, MsgRemoveRateStrategyResponse, MsgAddAsset, MsgAddAssetResponse, MsgUpdateAsset, MsgUpdateAssetResponse, MsgSupplyAsset, MsgSupplyAssetResponse, MsgWithdrawAsset, MsgWithdrawAssetResponse, MsgLockCollateral, MsgLockCollateralResponse, MsgUnlockCollateral, MsgUnlockCollateralResponse, MsgBorrowAsset, MsgBorrowAssetResponse, MsgRepayAsset, MsgRepayAssetResponse, MsgSupplyAssetAndLockCollateral, MsgSupplyAssetAndLockCollateralResponse, MsgUnlockCollateralAndWithdrawAsset, MsgUnlockCollateralAndWithdrawAssetResponse, MsgLiquidateCollateral, MsgLiquidateCollateralResponse, MsgSetLiquidationFee, MsgSetLiquidationFeeResponse, MsgSetInterestFee, MsgSetInterestFeeResponse, MsgRepayAssetWithCdpTokens, MsgRepayAssetWithCdpTokensResponse, MsgRepayAssetWithCollateral, MsgRepayAssetWithCollateralResponse, MsgSetStablecoinInterestRate, MsgSetStablecoinInterestRateResponse, MsgMintStablecoin, MsgMintStablecoinResponse, MsgReturnStablecoin, MsgReturnStablecoinResponse, MsgSetCompleteLiquidationThreshold, MsgSetCompleteLiquidationThresholdResponse, MsgSetMinimumCloseFactor, MsgSetMinimumCloseFactorResponse, MsgSetSmallLiquidationSize, MsgSetSmallLiquidationSizeResponse, MsgLiquidateCollateralWithCdpTokens, MsgLiquidateCollateralWithCdpTokensResponse, MsgLiquidateCollateralWithCollateral, MsgLiquidateCollateralWithCollateralResponse, MsgLiquidateCollateralWithStablecoin, MsgLiquidateCollateralWithStablecoinResponse, MsgCreateRewardScheme, MsgCreateRewardSchemeResponse, MsgUpdateRewardScheme, MsgUpdateRewardSchemeResponse, MsgAddRewardReserve, MsgAddRewardReserveResponse, MsgClaimRewards, MsgClaimRewardsResponse } from "./cdp/tx";
|
|
313
323
|
export { AssetParams, AssetUtilization } from "./cdp/asset_params";
|
|
314
324
|
export { RateStrategyParams } from "./cdp/rate_strategy_params";
|
|
315
325
|
export { StablecoinDebtInfo } from "./cdp/stablecoin_debt_info";
|
|
@@ -392,7 +402,8 @@ export { PoolEvent, TotalCommitmentChangeEvent, RewardsWeightChangeEvent, Commit
|
|
|
392
402
|
export { QueryCoinBalancesRequest, QueryCoinBalancesResponse } from "./insurance/query";
|
|
393
403
|
export { EventDataInsuranceFundTransfer } from "./insurance/event";
|
|
394
404
|
export { FundByMarket, Fund } from "./insurance/fund";
|
|
405
|
+
export { MsgSetBackfillTimeInterval, MsgSetBackfillTimeIntervalResponse, MsgSetSmoothenBand, MsgSetSmoothenBandResponse, MsgSetImpactBand, MsgSetImpactBandResponse, MsgSetStaleIndexAllowance, MsgSetStaleIndexAllowanceResponse } from "./pricing/tx";
|
|
395
406
|
export { Params as PricingParams, PriceSet, TokenPrice } from "./pricing/pricing";
|
|
396
407
|
export { SettlementPriceProposal, SettlementPriceParams } from "./pricing/proposal";
|
|
397
408
|
export { QueryPriceTokenRequest, QueryPriceTokenResponse, QueryPriceSetRequest, QueryPriceSetResponse, QueryAllPriceSetRequest, QueryAllPriceSetResponse, QueryRateRequest, QueryRateResponse, QueryParamsRequest as QueryPricingParamsRequest, QueryParamsResponse as QueryPricingParamsResponse, QueryTokenPriceRequest, QueryTokenPriceResponse, QueryTokenPriceAllRequest, QueryTokenPriceAllResponse } from "./pricing/query";
|
|
398
|
-
export { PriceUpdateEvent, TokenPriceUpdateEvent } from "./pricing/event";
|
|
409
|
+
export { PriceUpdateEvent, TokenPriceUpdateEvent, SetImpactBandEvent, SetSmoothenBandEvent, SetStaleIndexAllowanceEvent, SetBackfillTimeIntervalEvent } from "./pricing/event";
|