carbon-js-sdk 0.2.14-dev.4 → 0.2.14-dev.6

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.
@@ -8,7 +8,7 @@ export interface AssetParams {
8
8
  allowRepayStablecoinInterestDebt: boolean;
9
9
  loanToValue: string;
10
10
  liquidationThreshold: string;
11
- liquidationBonus: string;
11
+ liquidationDiscount: string;
12
12
  supplyCap: string;
13
13
  borrowCap: string;
14
14
  }
@@ -15,7 +15,7 @@ const baseAssetParams = {
15
15
  allowRepayStablecoinInterestDebt: false,
16
16
  loanToValue: "",
17
17
  liquidationThreshold: "",
18
- liquidationBonus: "",
18
+ liquidationDiscount: "",
19
19
  supplyCap: "",
20
20
  borrowCap: "",
21
21
  };
@@ -39,8 +39,8 @@ exports.AssetParams = {
39
39
  if (message.liquidationThreshold !== "") {
40
40
  writer.uint32(50).string(message.liquidationThreshold);
41
41
  }
42
- if (message.liquidationBonus !== "") {
43
- writer.uint32(58).string(message.liquidationBonus);
42
+ if (message.liquidationDiscount !== "") {
43
+ writer.uint32(58).string(message.liquidationDiscount);
44
44
  }
45
45
  if (message.supplyCap !== "") {
46
46
  writer.uint32(66).string(message.supplyCap);
@@ -76,7 +76,7 @@ exports.AssetParams = {
76
76
  message.liquidationThreshold = reader.string();
77
77
  break;
78
78
  case 7:
79
- message.liquidationBonus = reader.string();
79
+ message.liquidationDiscount = reader.string();
80
80
  break;
81
81
  case 8:
82
82
  message.supplyCap = reader.string();
@@ -119,9 +119,10 @@ exports.AssetParams = {
119
119
  object.liquidationThreshold !== null
120
120
  ? String(object.liquidationThreshold)
121
121
  : "";
122
- message.liquidationBonus =
123
- object.liquidationBonus !== undefined && object.liquidationBonus !== null
124
- ? String(object.liquidationBonus)
122
+ message.liquidationDiscount =
123
+ object.liquidationDiscount !== undefined &&
124
+ object.liquidationDiscount !== null
125
+ ? String(object.liquidationDiscount)
125
126
  : "";
126
127
  message.supplyCap =
127
128
  object.supplyCap !== undefined && object.supplyCap !== null
@@ -146,8 +147,8 @@ exports.AssetParams = {
146
147
  (obj.loanToValue = message.loanToValue);
147
148
  message.liquidationThreshold !== undefined &&
148
149
  (obj.liquidationThreshold = message.liquidationThreshold);
149
- message.liquidationBonus !== undefined &&
150
- (obj.liquidationBonus = message.liquidationBonus);
150
+ message.liquidationDiscount !== undefined &&
151
+ (obj.liquidationDiscount = message.liquidationDiscount);
151
152
  message.supplyCap !== undefined && (obj.supplyCap = message.supplyCap);
152
153
  message.borrowCap !== undefined && (obj.borrowCap = message.borrowCap);
153
154
  return obj;
@@ -162,7 +163,7 @@ exports.AssetParams = {
162
163
  (_d = object.allowRepayStablecoinInterestDebt) !== null && _d !== void 0 ? _d : false;
163
164
  message.loanToValue = (_e = object.loanToValue) !== null && _e !== void 0 ? _e : "";
164
165
  message.liquidationThreshold = (_f = object.liquidationThreshold) !== null && _f !== void 0 ? _f : "";
165
- message.liquidationBonus = (_g = object.liquidationBonus) !== null && _g !== void 0 ? _g : "";
166
+ message.liquidationDiscount = (_g = object.liquidationDiscount) !== null && _g !== void 0 ? _g : "";
166
167
  message.supplyCap = (_h = object.supplyCap) !== null && _h !== void 0 ? _h : "";
167
168
  message.borrowCap = (_j = object.borrowCap) !== null && _j !== void 0 ? _j : "";
168
169
  return message;
@@ -5,6 +5,7 @@ import { StablecoinDebtInfo } from "./stablecoin_debt_info";
5
5
  import { RateStrategyParams } from "./rate_strategy_params";
6
6
  import { AssetParams } from "./asset_params";
7
7
  import { DebtInfo } from "./debt_info";
8
+ import { RewardScheme } from "./reward_scheme";
8
9
  export declare const protobufPackage = "Switcheo.carbon.cdp";
9
10
  /** GenesisState defines the cdp module's genesis state. */
10
11
  export interface GenesisState {
@@ -12,6 +13,8 @@ export interface GenesisState {
12
13
  rateStrategies: RateStrategyParams[];
13
14
  assets: AssetParams[];
14
15
  debtInfos: DebtInfo[];
16
+ rewardSchemes: RewardScheme[];
17
+ sequenceNumber: Long;
15
18
  accountToCollateralized: {
16
19
  [key: string]: Uint8Array;
17
20
  };
@@ -25,10 +28,13 @@ export interface GenesisState {
25
28
  accountToPrincipalStablecoinDebt: {
26
29
  [key: string]: Uint8Array;
27
30
  };
28
- /** this line is used by starport scaffolding # genesis/proto/state */
29
31
  accountToStablecoinInitialCumulativeInterestMultiplier: {
30
32
  [key: string]: Uint8Array;
31
33
  };
34
+ /** this line is used by starport scaffolding # genesis/proto/state */
35
+ accountToRewardDebt: {
36
+ [key: string]: Uint8Array;
37
+ };
32
38
  }
33
39
  export interface GenesisState_AccountToCollateralizedEntry {
34
40
  key: string;
@@ -50,6 +56,10 @@ export interface GenesisState_AccountToStablecoinInitialCumulativeInterestMultip
50
56
  key: string;
51
57
  value: Uint8Array;
52
58
  }
59
+ export interface GenesisState_AccountToRewardDebtEntry {
60
+ key: string;
61
+ value: Uint8Array;
62
+ }
53
63
  export declare const GenesisState: {
54
64
  encode(message: GenesisState, writer?: _m0.Writer): _m0.Writer;
55
65
  decode(input: _m0.Reader | Uint8Array, length?: number | undefined): GenesisState;
@@ -92,6 +102,13 @@ export declare const GenesisState_AccountToStablecoinInitialCumulativeInterestMu
92
102
  toJSON(message: GenesisState_AccountToStablecoinInitialCumulativeInterestMultiplierEntry): unknown;
93
103
  fromPartial(object: DeepPartial<GenesisState_AccountToStablecoinInitialCumulativeInterestMultiplierEntry>): GenesisState_AccountToStablecoinInitialCumulativeInterestMultiplierEntry;
94
104
  };
105
+ export declare const GenesisState_AccountToRewardDebtEntry: {
106
+ encode(message: GenesisState_AccountToRewardDebtEntry, writer?: _m0.Writer): _m0.Writer;
107
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): GenesisState_AccountToRewardDebtEntry;
108
+ fromJSON(object: any): GenesisState_AccountToRewardDebtEntry;
109
+ toJSON(message: GenesisState_AccountToRewardDebtEntry): unknown;
110
+ fromPartial(object: DeepPartial<GenesisState_AccountToRewardDebtEntry>): GenesisState_AccountToRewardDebtEntry;
111
+ };
95
112
  declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
96
113
  export declare type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
97
114
  [K in keyof T]?: DeepPartial<T[K]>;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.GenesisState_AccountToStablecoinInitialCumulativeInterestMultiplierEntry = exports.GenesisState_AccountToPrincipalStablecoinDebtEntry = exports.GenesisState_AccountToInitialCumulativeInterestMultiplierEntry = exports.GenesisState_AccountToPrincipalDebtEntry = exports.GenesisState_AccountToCollateralizedEntry = exports.GenesisState = exports.protobufPackage = void 0;
6
+ exports.GenesisState_AccountToRewardDebtEntry = exports.GenesisState_AccountToStablecoinInitialCumulativeInterestMultiplierEntry = exports.GenesisState_AccountToPrincipalStablecoinDebtEntry = exports.GenesisState_AccountToInitialCumulativeInterestMultiplierEntry = exports.GenesisState_AccountToPrincipalDebtEntry = exports.GenesisState_AccountToCollateralizedEntry = exports.GenesisState = exports.protobufPackage = void 0;
7
7
  /* eslint-disable */
8
8
  const long_1 = __importDefault(require("long"));
9
9
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
@@ -12,8 +12,9 @@ const stablecoin_debt_info_1 = require("./stablecoin_debt_info");
12
12
  const rate_strategy_params_1 = require("./rate_strategy_params");
13
13
  const asset_params_1 = require("./asset_params");
14
14
  const debt_info_1 = require("./debt_info");
15
+ const reward_scheme_1 = require("./reward_scheme");
15
16
  exports.protobufPackage = "Switcheo.carbon.cdp";
16
- const baseGenesisState = {};
17
+ const baseGenesisState = { sequenceNumber: long_1.default.UZERO };
17
18
  exports.GenesisState = {
18
19
  encode(message, writer = minimal_1.default.Writer.create()) {
19
20
  if (message.params !== undefined) {
@@ -28,23 +29,32 @@ exports.GenesisState = {
28
29
  for (const v of message.debtInfos) {
29
30
  debt_info_1.DebtInfo.encode(v, writer.uint32(34).fork()).ldelim();
30
31
  }
32
+ for (const v of message.rewardSchemes) {
33
+ reward_scheme_1.RewardScheme.encode(v, writer.uint32(42).fork()).ldelim();
34
+ }
35
+ if (!message.sequenceNumber.isZero()) {
36
+ writer.uint32(48).uint64(message.sequenceNumber);
37
+ }
31
38
  Object.entries(message.accountToCollateralized).forEach(([key, value]) => {
32
- exports.GenesisState_AccountToCollateralizedEntry.encode({ key: key, value }, writer.uint32(42).fork()).ldelim();
39
+ exports.GenesisState_AccountToCollateralizedEntry.encode({ key: key, value }, writer.uint32(58).fork()).ldelim();
33
40
  });
34
41
  Object.entries(message.accountToPrincipalDebt).forEach(([key, value]) => {
35
- exports.GenesisState_AccountToPrincipalDebtEntry.encode({ key: key, value }, writer.uint32(50).fork()).ldelim();
42
+ exports.GenesisState_AccountToPrincipalDebtEntry.encode({ key: key, value }, writer.uint32(66).fork()).ldelim();
36
43
  });
37
44
  Object.entries(message.accountToInitialCumulativeInterestMultiplier).forEach(([key, value]) => {
38
- exports.GenesisState_AccountToInitialCumulativeInterestMultiplierEntry.encode({ key: key, value }, writer.uint32(58).fork()).ldelim();
45
+ exports.GenesisState_AccountToInitialCumulativeInterestMultiplierEntry.encode({ key: key, value }, writer.uint32(74).fork()).ldelim();
39
46
  });
40
47
  if (message.stablecoinDebtInfo !== undefined) {
41
- stablecoin_debt_info_1.StablecoinDebtInfo.encode(message.stablecoinDebtInfo, writer.uint32(66).fork()).ldelim();
48
+ stablecoin_debt_info_1.StablecoinDebtInfo.encode(message.stablecoinDebtInfo, writer.uint32(82).fork()).ldelim();
42
49
  }
43
50
  Object.entries(message.accountToPrincipalStablecoinDebt).forEach(([key, value]) => {
44
- exports.GenesisState_AccountToPrincipalStablecoinDebtEntry.encode({ key: key, value }, writer.uint32(74).fork()).ldelim();
51
+ exports.GenesisState_AccountToPrincipalStablecoinDebtEntry.encode({ key: key, value }, writer.uint32(90).fork()).ldelim();
45
52
  });
46
53
  Object.entries(message.accountToStablecoinInitialCumulativeInterestMultiplier).forEach(([key, value]) => {
47
- exports.GenesisState_AccountToStablecoinInitialCumulativeInterestMultiplierEntry.encode({ key: key, value }, writer.uint32(82).fork()).ldelim();
54
+ exports.GenesisState_AccountToStablecoinInitialCumulativeInterestMultiplierEntry.encode({ key: key, value }, writer.uint32(98).fork()).ldelim();
55
+ });
56
+ Object.entries(message.accountToRewardDebt).forEach(([key, value]) => {
57
+ exports.GenesisState_AccountToRewardDebtEntry.encode({ key: key, value }, writer.uint32(106).fork()).ldelim();
48
58
  });
49
59
  return writer;
50
60
  },
@@ -55,11 +65,13 @@ exports.GenesisState = {
55
65
  message.rateStrategies = [];
56
66
  message.assets = [];
57
67
  message.debtInfos = [];
68
+ message.rewardSchemes = [];
58
69
  message.accountToCollateralized = {};
59
70
  message.accountToPrincipalDebt = {};
60
71
  message.accountToInitialCumulativeInterestMultiplier = {};
61
72
  message.accountToPrincipalStablecoinDebt = {};
62
73
  message.accountToStablecoinInitialCumulativeInterestMultiplier = {};
74
+ message.accountToRewardDebt = {};
63
75
  while (reader.pos < end) {
64
76
  const tag = reader.uint32();
65
77
  switch (tag >>> 3) {
@@ -76,37 +88,50 @@ exports.GenesisState = {
76
88
  message.debtInfos.push(debt_info_1.DebtInfo.decode(reader, reader.uint32()));
77
89
  break;
78
90
  case 5:
79
- const entry5 = exports.GenesisState_AccountToCollateralizedEntry.decode(reader, reader.uint32());
80
- if (entry5.value !== undefined) {
81
- message.accountToCollateralized[entry5.key] = entry5.value;
82
- }
91
+ message.rewardSchemes.push(reward_scheme_1.RewardScheme.decode(reader, reader.uint32()));
83
92
  break;
84
93
  case 6:
85
- const entry6 = exports.GenesisState_AccountToPrincipalDebtEntry.decode(reader, reader.uint32());
86
- if (entry6.value !== undefined) {
87
- message.accountToPrincipalDebt[entry6.key] = entry6.value;
88
- }
94
+ message.sequenceNumber = reader.uint64();
89
95
  break;
90
96
  case 7:
91
- const entry7 = exports.GenesisState_AccountToInitialCumulativeInterestMultiplierEntry.decode(reader, reader.uint32());
97
+ const entry7 = exports.GenesisState_AccountToCollateralizedEntry.decode(reader, reader.uint32());
92
98
  if (entry7.value !== undefined) {
93
- message.accountToInitialCumulativeInterestMultiplier[entry7.key] =
94
- entry7.value;
99
+ message.accountToCollateralized[entry7.key] = entry7.value;
95
100
  }
96
101
  break;
97
102
  case 8:
98
- message.stablecoinDebtInfo = stablecoin_debt_info_1.StablecoinDebtInfo.decode(reader, reader.uint32());
103
+ const entry8 = exports.GenesisState_AccountToPrincipalDebtEntry.decode(reader, reader.uint32());
104
+ if (entry8.value !== undefined) {
105
+ message.accountToPrincipalDebt[entry8.key] = entry8.value;
106
+ }
99
107
  break;
100
108
  case 9:
101
- const entry9 = exports.GenesisState_AccountToPrincipalStablecoinDebtEntry.decode(reader, reader.uint32());
109
+ const entry9 = exports.GenesisState_AccountToInitialCumulativeInterestMultiplierEntry.decode(reader, reader.uint32());
102
110
  if (entry9.value !== undefined) {
103
- message.accountToPrincipalStablecoinDebt[entry9.key] = entry9.value;
111
+ message.accountToInitialCumulativeInterestMultiplier[entry9.key] =
112
+ entry9.value;
104
113
  }
105
114
  break;
106
115
  case 10:
107
- const entry10 = exports.GenesisState_AccountToStablecoinInitialCumulativeInterestMultiplierEntry.decode(reader, reader.uint32());
108
- if (entry10.value !== undefined) {
109
- message.accountToStablecoinInitialCumulativeInterestMultiplier[entry10.key] = entry10.value;
116
+ message.stablecoinDebtInfo = stablecoin_debt_info_1.StablecoinDebtInfo.decode(reader, reader.uint32());
117
+ break;
118
+ case 11:
119
+ const entry11 = exports.GenesisState_AccountToPrincipalStablecoinDebtEntry.decode(reader, reader.uint32());
120
+ if (entry11.value !== undefined) {
121
+ message.accountToPrincipalStablecoinDebt[entry11.key] =
122
+ entry11.value;
123
+ }
124
+ break;
125
+ case 12:
126
+ const entry12 = exports.GenesisState_AccountToStablecoinInitialCumulativeInterestMultiplierEntry.decode(reader, reader.uint32());
127
+ if (entry12.value !== undefined) {
128
+ message.accountToStablecoinInitialCumulativeInterestMultiplier[entry12.key] = entry12.value;
129
+ }
130
+ break;
131
+ case 13:
132
+ const entry13 = exports.GenesisState_AccountToRewardDebtEntry.decode(reader, reader.uint32());
133
+ if (entry13.value !== undefined) {
134
+ message.accountToRewardDebt[entry13.key] = entry13.value;
110
135
  }
111
136
  break;
112
137
  default:
@@ -117,7 +142,7 @@ exports.GenesisState = {
117
142
  return message;
118
143
  },
119
144
  fromJSON(object) {
120
- var _a, _b, _c, _d, _e, _f, _g, _h;
145
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
121
146
  const message = Object.assign({}, baseGenesisState);
122
147
  message.params =
123
148
  object.params !== undefined && object.params !== null
@@ -126,15 +151,20 @@ exports.GenesisState = {
126
151
  message.rateStrategies = ((_a = object.rateStrategies) !== null && _a !== void 0 ? _a : []).map((e) => rate_strategy_params_1.RateStrategyParams.fromJSON(e));
127
152
  message.assets = ((_b = object.assets) !== null && _b !== void 0 ? _b : []).map((e) => asset_params_1.AssetParams.fromJSON(e));
128
153
  message.debtInfos = ((_c = object.debtInfos) !== null && _c !== void 0 ? _c : []).map((e) => debt_info_1.DebtInfo.fromJSON(e));
129
- message.accountToCollateralized = Object.entries((_d = object.accountToCollateralized) !== null && _d !== void 0 ? _d : {}).reduce((acc, [key, value]) => {
154
+ message.rewardSchemes = ((_d = object.rewardSchemes) !== null && _d !== void 0 ? _d : []).map((e) => reward_scheme_1.RewardScheme.fromJSON(e));
155
+ message.sequenceNumber =
156
+ object.sequenceNumber !== undefined && object.sequenceNumber !== null
157
+ ? long_1.default.fromString(object.sequenceNumber)
158
+ : long_1.default.UZERO;
159
+ message.accountToCollateralized = Object.entries((_e = object.accountToCollateralized) !== null && _e !== void 0 ? _e : {}).reduce((acc, [key, value]) => {
130
160
  acc[key] = bytesFromBase64(value);
131
161
  return acc;
132
162
  }, {});
133
- message.accountToPrincipalDebt = Object.entries((_e = object.accountToPrincipalDebt) !== null && _e !== void 0 ? _e : {}).reduce((acc, [key, value]) => {
163
+ message.accountToPrincipalDebt = Object.entries((_f = object.accountToPrincipalDebt) !== null && _f !== void 0 ? _f : {}).reduce((acc, [key, value]) => {
134
164
  acc[key] = bytesFromBase64(value);
135
165
  return acc;
136
166
  }, {});
137
- message.accountToInitialCumulativeInterestMultiplier = Object.entries((_f = object.accountToInitialCumulativeInterestMultiplier) !== null && _f !== void 0 ? _f : {}).reduce((acc, [key, value]) => {
167
+ message.accountToInitialCumulativeInterestMultiplier = Object.entries((_g = object.accountToInitialCumulativeInterestMultiplier) !== null && _g !== void 0 ? _g : {}).reduce((acc, [key, value]) => {
138
168
  acc[key] = bytesFromBase64(value);
139
169
  return acc;
140
170
  }, {});
@@ -143,15 +173,19 @@ exports.GenesisState = {
143
173
  object.stablecoinDebtInfo !== null
144
174
  ? stablecoin_debt_info_1.StablecoinDebtInfo.fromJSON(object.stablecoinDebtInfo)
145
175
  : undefined;
146
- message.accountToPrincipalStablecoinDebt = Object.entries((_g = object.accountToPrincipalStablecoinDebt) !== null && _g !== void 0 ? _g : {}).reduce((acc, [key, value]) => {
176
+ message.accountToPrincipalStablecoinDebt = Object.entries((_h = object.accountToPrincipalStablecoinDebt) !== null && _h !== void 0 ? _h : {}).reduce((acc, [key, value]) => {
147
177
  acc[key] = bytesFromBase64(value);
148
178
  return acc;
149
179
  }, {});
150
180
  message.accountToStablecoinInitialCumulativeInterestMultiplier =
151
- Object.entries((_h = object.accountToStablecoinInitialCumulativeInterestMultiplier) !== null && _h !== void 0 ? _h : {}).reduce((acc, [key, value]) => {
181
+ Object.entries((_j = object.accountToStablecoinInitialCumulativeInterestMultiplier) !== null && _j !== void 0 ? _j : {}).reduce((acc, [key, value]) => {
152
182
  acc[key] = bytesFromBase64(value);
153
183
  return acc;
154
184
  }, {});
185
+ message.accountToRewardDebt = Object.entries((_k = object.accountToRewardDebt) !== null && _k !== void 0 ? _k : {}).reduce((acc, [key, value]) => {
186
+ acc[key] = bytesFromBase64(value);
187
+ return acc;
188
+ }, {});
155
189
  return message;
156
190
  },
157
191
  toJSON(message) {
@@ -176,6 +210,14 @@ exports.GenesisState = {
176
210
  else {
177
211
  obj.debtInfos = [];
178
212
  }
213
+ if (message.rewardSchemes) {
214
+ obj.rewardSchemes = message.rewardSchemes.map((e) => e ? reward_scheme_1.RewardScheme.toJSON(e) : undefined);
215
+ }
216
+ else {
217
+ obj.rewardSchemes = [];
218
+ }
219
+ message.sequenceNumber !== undefined &&
220
+ (obj.sequenceNumber = (message.sequenceNumber || long_1.default.UZERO).toString());
179
221
  obj.accountToCollateralized = {};
180
222
  if (message.accountToCollateralized) {
181
223
  Object.entries(message.accountToCollateralized).forEach(([k, v]) => {
@@ -212,10 +254,16 @@ exports.GenesisState = {
212
254
  base64FromBytes(v);
213
255
  });
214
256
  }
257
+ obj.accountToRewardDebt = {};
258
+ if (message.accountToRewardDebt) {
259
+ Object.entries(message.accountToRewardDebt).forEach(([k, v]) => {
260
+ obj.accountToRewardDebt[k] = base64FromBytes(v);
261
+ });
262
+ }
215
263
  return obj;
216
264
  },
217
265
  fromPartial(object) {
218
- var _a, _b, _c, _d, _e, _f, _g, _h;
266
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
219
267
  const message = Object.assign({}, baseGenesisState);
220
268
  message.params =
221
269
  object.params !== undefined && object.params !== null
@@ -224,19 +272,24 @@ exports.GenesisState = {
224
272
  message.rateStrategies = ((_a = object.rateStrategies) !== null && _a !== void 0 ? _a : []).map((e) => rate_strategy_params_1.RateStrategyParams.fromPartial(e));
225
273
  message.assets = ((_b = object.assets) !== null && _b !== void 0 ? _b : []).map((e) => asset_params_1.AssetParams.fromPartial(e));
226
274
  message.debtInfos = ((_c = object.debtInfos) !== null && _c !== void 0 ? _c : []).map((e) => debt_info_1.DebtInfo.fromPartial(e));
227
- message.accountToCollateralized = Object.entries((_d = object.accountToCollateralized) !== null && _d !== void 0 ? _d : {}).reduce((acc, [key, value]) => {
275
+ message.rewardSchemes = ((_d = object.rewardSchemes) !== null && _d !== void 0 ? _d : []).map((e) => reward_scheme_1.RewardScheme.fromPartial(e));
276
+ message.sequenceNumber =
277
+ object.sequenceNumber !== undefined && object.sequenceNumber !== null
278
+ ? long_1.default.fromValue(object.sequenceNumber)
279
+ : long_1.default.UZERO;
280
+ message.accountToCollateralized = Object.entries((_e = object.accountToCollateralized) !== null && _e !== void 0 ? _e : {}).reduce((acc, [key, value]) => {
228
281
  if (value !== undefined) {
229
282
  acc[key] = value;
230
283
  }
231
284
  return acc;
232
285
  }, {});
233
- message.accountToPrincipalDebt = Object.entries((_e = object.accountToPrincipalDebt) !== null && _e !== void 0 ? _e : {}).reduce((acc, [key, value]) => {
286
+ message.accountToPrincipalDebt = Object.entries((_f = object.accountToPrincipalDebt) !== null && _f !== void 0 ? _f : {}).reduce((acc, [key, value]) => {
234
287
  if (value !== undefined) {
235
288
  acc[key] = value;
236
289
  }
237
290
  return acc;
238
291
  }, {});
239
- message.accountToInitialCumulativeInterestMultiplier = Object.entries((_f = object.accountToInitialCumulativeInterestMultiplier) !== null && _f !== void 0 ? _f : {}).reduce((acc, [key, value]) => {
292
+ message.accountToInitialCumulativeInterestMultiplier = Object.entries((_g = object.accountToInitialCumulativeInterestMultiplier) !== null && _g !== void 0 ? _g : {}).reduce((acc, [key, value]) => {
240
293
  if (value !== undefined) {
241
294
  acc[key] = value;
242
295
  }
@@ -247,19 +300,25 @@ exports.GenesisState = {
247
300
  object.stablecoinDebtInfo !== null
248
301
  ? stablecoin_debt_info_1.StablecoinDebtInfo.fromPartial(object.stablecoinDebtInfo)
249
302
  : undefined;
250
- message.accountToPrincipalStablecoinDebt = Object.entries((_g = object.accountToPrincipalStablecoinDebt) !== null && _g !== void 0 ? _g : {}).reduce((acc, [key, value]) => {
303
+ message.accountToPrincipalStablecoinDebt = Object.entries((_h = object.accountToPrincipalStablecoinDebt) !== null && _h !== void 0 ? _h : {}).reduce((acc, [key, value]) => {
251
304
  if (value !== undefined) {
252
305
  acc[key] = value;
253
306
  }
254
307
  return acc;
255
308
  }, {});
256
309
  message.accountToStablecoinInitialCumulativeInterestMultiplier =
257
- Object.entries((_h = object.accountToStablecoinInitialCumulativeInterestMultiplier) !== null && _h !== void 0 ? _h : {}).reduce((acc, [key, value]) => {
310
+ Object.entries((_j = object.accountToStablecoinInitialCumulativeInterestMultiplier) !== null && _j !== void 0 ? _j : {}).reduce((acc, [key, value]) => {
258
311
  if (value !== undefined) {
259
312
  acc[key] = value;
260
313
  }
261
314
  return acc;
262
315
  }, {});
316
+ message.accountToRewardDebt = Object.entries((_k = object.accountToRewardDebt) !== null && _k !== void 0 ? _k : {}).reduce((acc, [key, value]) => {
317
+ if (value !== undefined) {
318
+ acc[key] = value;
319
+ }
320
+ return acc;
321
+ }, {});
263
322
  return message;
264
323
  },
265
324
  };
@@ -552,6 +611,63 @@ exports.GenesisState_AccountToStablecoinInitialCumulativeInterestMultiplierEntry
552
611
  return message;
553
612
  },
554
613
  };
614
+ const baseGenesisState_AccountToRewardDebtEntry = { key: "" };
615
+ exports.GenesisState_AccountToRewardDebtEntry = {
616
+ encode(message, writer = minimal_1.default.Writer.create()) {
617
+ if (message.key !== "") {
618
+ writer.uint32(10).string(message.key);
619
+ }
620
+ if (message.value.length !== 0) {
621
+ writer.uint32(18).bytes(message.value);
622
+ }
623
+ return writer;
624
+ },
625
+ decode(input, length) {
626
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
627
+ let end = length === undefined ? reader.len : reader.pos + length;
628
+ const message = Object.assign({}, baseGenesisState_AccountToRewardDebtEntry);
629
+ message.value = new Uint8Array();
630
+ while (reader.pos < end) {
631
+ const tag = reader.uint32();
632
+ switch (tag >>> 3) {
633
+ case 1:
634
+ message.key = reader.string();
635
+ break;
636
+ case 2:
637
+ message.value = reader.bytes();
638
+ break;
639
+ default:
640
+ reader.skipType(tag & 7);
641
+ break;
642
+ }
643
+ }
644
+ return message;
645
+ },
646
+ fromJSON(object) {
647
+ const message = Object.assign({}, baseGenesisState_AccountToRewardDebtEntry);
648
+ message.key =
649
+ object.key !== undefined && object.key !== null ? String(object.key) : "";
650
+ message.value =
651
+ object.value !== undefined && object.value !== null
652
+ ? bytesFromBase64(object.value)
653
+ : new Uint8Array();
654
+ return message;
655
+ },
656
+ toJSON(message) {
657
+ const obj = {};
658
+ message.key !== undefined && (obj.key = message.key);
659
+ message.value !== undefined &&
660
+ (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array()));
661
+ return obj;
662
+ },
663
+ fromPartial(object) {
664
+ var _a, _b;
665
+ const message = Object.assign({}, baseGenesisState_AccountToRewardDebtEntry);
666
+ message.key = (_a = object.key) !== null && _a !== void 0 ? _a : "";
667
+ message.value = (_b = object.value) !== null && _b !== void 0 ? _b : new Uint8Array();
668
+ return message;
669
+ },
670
+ };
555
671
  var globalThis = (() => {
556
672
  if (typeof globalThis !== "undefined")
557
673
  return globalThis;
@@ -206,7 +206,6 @@ export interface MsgLiquidateCollateralWithStablecoin {
206
206
  minCollateralAmount: string;
207
207
  debtDenom: string;
208
208
  debtAmount: string;
209
- principalAmount: string;
210
209
  interestDenom: string;
211
210
  interestAmount: string;
212
211
  }
@@ -2961,7 +2961,6 @@ const baseMsgLiquidateCollateralWithStablecoin = {
2961
2961
  minCollateralAmount: "",
2962
2962
  debtDenom: "",
2963
2963
  debtAmount: "",
2964
- principalAmount: "",
2965
2964
  interestDenom: "",
2966
2965
  interestAmount: "",
2967
2966
  };
@@ -2985,14 +2984,11 @@ exports.MsgLiquidateCollateralWithStablecoin = {
2985
2984
  if (message.debtAmount !== "") {
2986
2985
  writer.uint32(50).string(message.debtAmount);
2987
2986
  }
2988
- if (message.principalAmount !== "") {
2989
- writer.uint32(58).string(message.principalAmount);
2990
- }
2991
2987
  if (message.interestDenom !== "") {
2992
- writer.uint32(66).string(message.interestDenom);
2988
+ writer.uint32(58).string(message.interestDenom);
2993
2989
  }
2994
2990
  if (message.interestAmount !== "") {
2995
- writer.uint32(74).string(message.interestAmount);
2991
+ writer.uint32(66).string(message.interestAmount);
2996
2992
  }
2997
2993
  return writer;
2998
2994
  },
@@ -3022,12 +3018,9 @@ exports.MsgLiquidateCollateralWithStablecoin = {
3022
3018
  message.debtAmount = reader.string();
3023
3019
  break;
3024
3020
  case 7:
3025
- message.principalAmount = reader.string();
3026
- break;
3027
- case 8:
3028
3021
  message.interestDenom = reader.string();
3029
3022
  break;
3030
- case 9:
3023
+ case 8:
3031
3024
  message.interestAmount = reader.string();
3032
3025
  break;
3033
3026
  default:
@@ -3064,10 +3057,6 @@ exports.MsgLiquidateCollateralWithStablecoin = {
3064
3057
  object.debtAmount !== undefined && object.debtAmount !== null
3065
3058
  ? String(object.debtAmount)
3066
3059
  : "";
3067
- message.principalAmount =
3068
- object.principalAmount !== undefined && object.principalAmount !== null
3069
- ? String(object.principalAmount)
3070
- : "";
3071
3060
  message.interestDenom =
3072
3061
  object.interestDenom !== undefined && object.interestDenom !== null
3073
3062
  ? String(object.interestDenom)
@@ -3088,8 +3077,6 @@ exports.MsgLiquidateCollateralWithStablecoin = {
3088
3077
  (obj.minCollateralAmount = message.minCollateralAmount);
3089
3078
  message.debtDenom !== undefined && (obj.debtDenom = message.debtDenom);
3090
3079
  message.debtAmount !== undefined && (obj.debtAmount = message.debtAmount);
3091
- message.principalAmount !== undefined &&
3092
- (obj.principalAmount = message.principalAmount);
3093
3080
  message.interestDenom !== undefined &&
3094
3081
  (obj.interestDenom = message.interestDenom);
3095
3082
  message.interestAmount !== undefined &&
@@ -3097,7 +3084,7 @@ exports.MsgLiquidateCollateralWithStablecoin = {
3097
3084
  return obj;
3098
3085
  },
3099
3086
  fromPartial(object) {
3100
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
3087
+ var _a, _b, _c, _d, _e, _f, _g, _h;
3101
3088
  const message = Object.assign({}, baseMsgLiquidateCollateralWithStablecoin);
3102
3089
  message.creator = (_a = object.creator) !== null && _a !== void 0 ? _a : "";
3103
3090
  message.debtor = (_b = object.debtor) !== null && _b !== void 0 ? _b : "";
@@ -3105,9 +3092,8 @@ exports.MsgLiquidateCollateralWithStablecoin = {
3105
3092
  message.minCollateralAmount = (_d = object.minCollateralAmount) !== null && _d !== void 0 ? _d : "";
3106
3093
  message.debtDenom = (_e = object.debtDenom) !== null && _e !== void 0 ? _e : "";
3107
3094
  message.debtAmount = (_f = object.debtAmount) !== null && _f !== void 0 ? _f : "";
3108
- message.principalAmount = (_g = object.principalAmount) !== null && _g !== void 0 ? _g : "";
3109
- message.interestDenom = (_h = object.interestDenom) !== null && _h !== void 0 ? _h : "";
3110
- message.interestAmount = (_j = object.interestAmount) !== null && _j !== void 0 ? _j : "";
3095
+ message.interestDenom = (_g = object.interestDenom) !== null && _g !== void 0 ? _g : "";
3096
+ message.interestAmount = (_h = object.interestAmount) !== null && _h !== void 0 ? _h : "";
3111
3097
  return message;
3112
3098
  },
3113
3099
  };
@@ -1,6 +1,6 @@
1
1
  import Long from "long";
2
2
  import _m0 from "protobufjs/minimal";
3
- import { GrantAuthorization } from "./authz";
3
+ import { GrantAuthorization } from "../../../cosmos/authz/v1beta1/authz";
4
4
  export declare const protobufPackage = "cosmos.authz.v1beta1";
5
5
  /** Since: cosmos-sdk 0.43 */
6
6
  /** GenesisState defines the authz module's genesis state. */
@@ -7,7 +7,7 @@ exports.GenesisState = exports.protobufPackage = void 0;
7
7
  /* eslint-disable */
8
8
  const long_1 = __importDefault(require("long"));
9
9
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
10
- const authz_1 = require("./authz");
10
+ const authz_1 = require("../../../cosmos/authz/v1beta1/authz");
11
11
  exports.protobufPackage = "cosmos.authz.v1beta1";
12
12
  const baseGenesisState = {};
13
13
  exports.GenesisState = {
@@ -1,7 +1,7 @@
1
1
  import Long from "long";
2
2
  import _m0 from "protobufjs/minimal";
3
3
  import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination";
4
- import { Grant, GrantAuthorization } from "./authz";
4
+ import { Grant, GrantAuthorization } from "../../../cosmos/authz/v1beta1/authz";
5
5
  export declare const protobufPackage = "cosmos.authz.v1beta1";
6
6
  /** Since: cosmos-sdk 0.43 */
7
7
  /** QueryGrantsRequest is the request type for the Query/Grants RPC method. */
@@ -8,7 +8,7 @@ exports.QueryClientImpl = exports.QueryGranteeGrantsResponse = exports.QueryGran
8
8
  const long_1 = __importDefault(require("long"));
9
9
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
10
10
  const pagination_1 = require("../../base/query/v1beta1/pagination");
11
- const authz_1 = require("./authz");
11
+ const authz_1 = require("../../../cosmos/authz/v1beta1/authz");
12
12
  exports.protobufPackage = "cosmos.authz.v1beta1";
13
13
  const baseQueryGrantsRequest = {
14
14
  granter: "",
@@ -2,7 +2,7 @@ import Long from "long";
2
2
  import _m0 from "protobufjs/minimal";
3
3
  import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination";
4
4
  import { TxResponse, GasInfo, Result } from "../../base/abci/v1beta1/abci";
5
- import { Tx } from "../../tx/v1beta1/tx";
5
+ import { Tx } from "./tx";
6
6
  import { BlockID } from "../../../tendermint/types/types";
7
7
  import { Block } from "../../../tendermint/types/block";
8
8
  export declare const protobufPackage = "cosmos.tx.v1beta1";
@@ -9,7 +9,7 @@ const long_1 = __importDefault(require("long"));
9
9
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
10
10
  const pagination_1 = require("../../base/query/v1beta1/pagination");
11
11
  const abci_1 = require("../../base/abci/v1beta1/abci");
12
- const tx_1 = require("../../tx/v1beta1/tx");
12
+ const tx_1 = require("./tx");
13
13
  const types_1 = require("../../../tendermint/types/types");
14
14
  const block_1 = require("../../../tendermint/types/block");
15
15
  exports.protobufPackage = "cosmos.tx.v1beta1";
@@ -406,4 +406,5 @@ export { MsgSetBackfillTimeInterval, MsgSetBackfillTimeIntervalResponse, MsgSetS
406
406
  export { Params as PricingParams, PriceSet, TokenPrice } from "./pricing/pricing";
407
407
  export { SettlementPriceProposal, SettlementPriceParams } from "./pricing/proposal";
408
408
  export { QueryPriceTokenRequest, QueryPriceTokenResponse, QueryPriceSetRequest, QueryPriceSetResponse, QueryAllPriceSetRequest, QueryAllPriceSetResponse, QueryRateRequest, QueryRateResponse, QueryParamsRequest as QueryPricingParamsRequest, QueryParamsResponse as QueryPricingParamsResponse, QueryTokenPriceRequest, QueryTokenPriceResponse, QueryTokenPriceAllRequest, QueryTokenPriceAllResponse } from "./pricing/query";
409
+ export { ParamsV2130 } from "./pricing/legacy";
409
410
  export { PriceUpdateEvent, TokenPriceUpdateEvent, SetImpactBandEvent, SetSmoothenBandEvent, SetStaleIndexAllowanceEvent, SetBackfillTimeIntervalEvent } from "./pricing/event";