carbon-js-sdk 0.2.14-dev.1 → 0.2.14-dev.3
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/event.d.ts +24 -0
- package/lib/codec/cdp/event.js +244 -1
- package/lib/codec/cdp/query.d.ts +4 -3
- package/lib/codec/cdp/query.js +41 -12
- package/lib/codec/cdp/tx.d.ts +51 -1
- package/lib/codec/cdp/tx.js +280 -1
- package/lib/codec/index.d.ts +16 -3
- package/lib/codec/index.js +236 -193
- 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 +33 -1
- package/lib/modules/cdp.js +99 -15
- package/lib/modules/fee.d.ts +2 -0
- package/lib/modules/liquiditypool.d.ts +3 -0
- package/lib/modules/oracle.d.ts +3 -0
- package/lib/modules/oracle.js +2 -0
- package/lib/modules/order.d.ts +3 -0
- package/lib/modules/order.js +2 -0
- package/lib/modules/position.d.ts +3 -0
- package/lib/modules/position.js +2 -0
- package/lib/modules/profile.d.ts +3 -0
- package/lib/modules/profile.js +2 -0
- package/lib/modules/subaccount.d.ts +3 -0
- package/lib/modules/subaccount.js +2 -0
- package/lib/provider/amino/types/admin.js +36 -12
- package/lib/provider/amino/types/cdp.js +30 -0
- package/lib/util/tx.d.ts +12 -0
- package/lib/websocket/models.d.ts +1 -0
- package/lib/websocket/types.d.ts +5 -0
- package/package.json +1 -1
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.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"));
|
|
@@ -2954,6 +2954,195 @@ exports.MsgLiquidateCollateralWithCollateralResponse = {
|
|
|
2954
2954
|
return message;
|
|
2955
2955
|
},
|
|
2956
2956
|
};
|
|
2957
|
+
const baseMsgLiquidateCollateralWithStablecoin = {
|
|
2958
|
+
creator: "",
|
|
2959
|
+
debtor: "",
|
|
2960
|
+
collateralDenom: "",
|
|
2961
|
+
minCollateralAmount: "",
|
|
2962
|
+
debtDenom: "",
|
|
2963
|
+
debtAmount: "",
|
|
2964
|
+
principalAmount: "",
|
|
2965
|
+
interestDenom: "",
|
|
2966
|
+
interestAmount: "",
|
|
2967
|
+
};
|
|
2968
|
+
exports.MsgLiquidateCollateralWithStablecoin = {
|
|
2969
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
2970
|
+
if (message.creator !== "") {
|
|
2971
|
+
writer.uint32(10).string(message.creator);
|
|
2972
|
+
}
|
|
2973
|
+
if (message.debtor !== "") {
|
|
2974
|
+
writer.uint32(18).string(message.debtor);
|
|
2975
|
+
}
|
|
2976
|
+
if (message.collateralDenom !== "") {
|
|
2977
|
+
writer.uint32(26).string(message.collateralDenom);
|
|
2978
|
+
}
|
|
2979
|
+
if (message.minCollateralAmount !== "") {
|
|
2980
|
+
writer.uint32(34).string(message.minCollateralAmount);
|
|
2981
|
+
}
|
|
2982
|
+
if (message.debtDenom !== "") {
|
|
2983
|
+
writer.uint32(42).string(message.debtDenom);
|
|
2984
|
+
}
|
|
2985
|
+
if (message.debtAmount !== "") {
|
|
2986
|
+
writer.uint32(50).string(message.debtAmount);
|
|
2987
|
+
}
|
|
2988
|
+
if (message.principalAmount !== "") {
|
|
2989
|
+
writer.uint32(58).string(message.principalAmount);
|
|
2990
|
+
}
|
|
2991
|
+
if (message.interestDenom !== "") {
|
|
2992
|
+
writer.uint32(66).string(message.interestDenom);
|
|
2993
|
+
}
|
|
2994
|
+
if (message.interestAmount !== "") {
|
|
2995
|
+
writer.uint32(74).string(message.interestAmount);
|
|
2996
|
+
}
|
|
2997
|
+
return writer;
|
|
2998
|
+
},
|
|
2999
|
+
decode(input, length) {
|
|
3000
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
3001
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3002
|
+
const message = Object.assign({}, baseMsgLiquidateCollateralWithStablecoin);
|
|
3003
|
+
while (reader.pos < end) {
|
|
3004
|
+
const tag = reader.uint32();
|
|
3005
|
+
switch (tag >>> 3) {
|
|
3006
|
+
case 1:
|
|
3007
|
+
message.creator = reader.string();
|
|
3008
|
+
break;
|
|
3009
|
+
case 2:
|
|
3010
|
+
message.debtor = reader.string();
|
|
3011
|
+
break;
|
|
3012
|
+
case 3:
|
|
3013
|
+
message.collateralDenom = reader.string();
|
|
3014
|
+
break;
|
|
3015
|
+
case 4:
|
|
3016
|
+
message.minCollateralAmount = reader.string();
|
|
3017
|
+
break;
|
|
3018
|
+
case 5:
|
|
3019
|
+
message.debtDenom = reader.string();
|
|
3020
|
+
break;
|
|
3021
|
+
case 6:
|
|
3022
|
+
message.debtAmount = reader.string();
|
|
3023
|
+
break;
|
|
3024
|
+
case 7:
|
|
3025
|
+
message.principalAmount = reader.string();
|
|
3026
|
+
break;
|
|
3027
|
+
case 8:
|
|
3028
|
+
message.interestDenom = reader.string();
|
|
3029
|
+
break;
|
|
3030
|
+
case 9:
|
|
3031
|
+
message.interestAmount = reader.string();
|
|
3032
|
+
break;
|
|
3033
|
+
default:
|
|
3034
|
+
reader.skipType(tag & 7);
|
|
3035
|
+
break;
|
|
3036
|
+
}
|
|
3037
|
+
}
|
|
3038
|
+
return message;
|
|
3039
|
+
},
|
|
3040
|
+
fromJSON(object) {
|
|
3041
|
+
const message = Object.assign({}, baseMsgLiquidateCollateralWithStablecoin);
|
|
3042
|
+
message.creator =
|
|
3043
|
+
object.creator !== undefined && object.creator !== null
|
|
3044
|
+
? String(object.creator)
|
|
3045
|
+
: "";
|
|
3046
|
+
message.debtor =
|
|
3047
|
+
object.debtor !== undefined && object.debtor !== null
|
|
3048
|
+
? String(object.debtor)
|
|
3049
|
+
: "";
|
|
3050
|
+
message.collateralDenom =
|
|
3051
|
+
object.collateralDenom !== undefined && object.collateralDenom !== null
|
|
3052
|
+
? String(object.collateralDenom)
|
|
3053
|
+
: "";
|
|
3054
|
+
message.minCollateralAmount =
|
|
3055
|
+
object.minCollateralAmount !== undefined &&
|
|
3056
|
+
object.minCollateralAmount !== null
|
|
3057
|
+
? String(object.minCollateralAmount)
|
|
3058
|
+
: "";
|
|
3059
|
+
message.debtDenom =
|
|
3060
|
+
object.debtDenom !== undefined && object.debtDenom !== null
|
|
3061
|
+
? String(object.debtDenom)
|
|
3062
|
+
: "";
|
|
3063
|
+
message.debtAmount =
|
|
3064
|
+
object.debtAmount !== undefined && object.debtAmount !== null
|
|
3065
|
+
? String(object.debtAmount)
|
|
3066
|
+
: "";
|
|
3067
|
+
message.principalAmount =
|
|
3068
|
+
object.principalAmount !== undefined && object.principalAmount !== null
|
|
3069
|
+
? String(object.principalAmount)
|
|
3070
|
+
: "";
|
|
3071
|
+
message.interestDenom =
|
|
3072
|
+
object.interestDenom !== undefined && object.interestDenom !== null
|
|
3073
|
+
? String(object.interestDenom)
|
|
3074
|
+
: "";
|
|
3075
|
+
message.interestAmount =
|
|
3076
|
+
object.interestAmount !== undefined && object.interestAmount !== null
|
|
3077
|
+
? String(object.interestAmount)
|
|
3078
|
+
: "";
|
|
3079
|
+
return message;
|
|
3080
|
+
},
|
|
3081
|
+
toJSON(message) {
|
|
3082
|
+
const obj = {};
|
|
3083
|
+
message.creator !== undefined && (obj.creator = message.creator);
|
|
3084
|
+
message.debtor !== undefined && (obj.debtor = message.debtor);
|
|
3085
|
+
message.collateralDenom !== undefined &&
|
|
3086
|
+
(obj.collateralDenom = message.collateralDenom);
|
|
3087
|
+
message.minCollateralAmount !== undefined &&
|
|
3088
|
+
(obj.minCollateralAmount = message.minCollateralAmount);
|
|
3089
|
+
message.debtDenom !== undefined && (obj.debtDenom = message.debtDenom);
|
|
3090
|
+
message.debtAmount !== undefined && (obj.debtAmount = message.debtAmount);
|
|
3091
|
+
message.principalAmount !== undefined &&
|
|
3092
|
+
(obj.principalAmount = message.principalAmount);
|
|
3093
|
+
message.interestDenom !== undefined &&
|
|
3094
|
+
(obj.interestDenom = message.interestDenom);
|
|
3095
|
+
message.interestAmount !== undefined &&
|
|
3096
|
+
(obj.interestAmount = message.interestAmount);
|
|
3097
|
+
return obj;
|
|
3098
|
+
},
|
|
3099
|
+
fromPartial(object) {
|
|
3100
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
3101
|
+
const message = Object.assign({}, baseMsgLiquidateCollateralWithStablecoin);
|
|
3102
|
+
message.creator = (_a = object.creator) !== null && _a !== void 0 ? _a : "";
|
|
3103
|
+
message.debtor = (_b = object.debtor) !== null && _b !== void 0 ? _b : "";
|
|
3104
|
+
message.collateralDenom = (_c = object.collateralDenom) !== null && _c !== void 0 ? _c : "";
|
|
3105
|
+
message.minCollateralAmount = (_d = object.minCollateralAmount) !== null && _d !== void 0 ? _d : "";
|
|
3106
|
+
message.debtDenom = (_e = object.debtDenom) !== null && _e !== void 0 ? _e : "";
|
|
3107
|
+
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 : "";
|
|
3111
|
+
return message;
|
|
3112
|
+
},
|
|
3113
|
+
};
|
|
3114
|
+
const baseMsgLiquidateCollateralWithStablecoinResponse = {};
|
|
3115
|
+
exports.MsgLiquidateCollateralWithStablecoinResponse = {
|
|
3116
|
+
encode(_, writer = minimal_1.default.Writer.create()) {
|
|
3117
|
+
return writer;
|
|
3118
|
+
},
|
|
3119
|
+
decode(input, length) {
|
|
3120
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
3121
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3122
|
+
const message = Object.assign({}, baseMsgLiquidateCollateralWithStablecoinResponse);
|
|
3123
|
+
while (reader.pos < end) {
|
|
3124
|
+
const tag = reader.uint32();
|
|
3125
|
+
switch (tag >>> 3) {
|
|
3126
|
+
default:
|
|
3127
|
+
reader.skipType(tag & 7);
|
|
3128
|
+
break;
|
|
3129
|
+
}
|
|
3130
|
+
}
|
|
3131
|
+
return message;
|
|
3132
|
+
},
|
|
3133
|
+
fromJSON(_) {
|
|
3134
|
+
const message = Object.assign({}, baseMsgLiquidateCollateralWithStablecoinResponse);
|
|
3135
|
+
return message;
|
|
3136
|
+
},
|
|
3137
|
+
toJSON(_) {
|
|
3138
|
+
const obj = {};
|
|
3139
|
+
return obj;
|
|
3140
|
+
},
|
|
3141
|
+
fromPartial(_) {
|
|
3142
|
+
const message = Object.assign({}, baseMsgLiquidateCollateralWithStablecoinResponse);
|
|
3143
|
+
return message;
|
|
3144
|
+
},
|
|
3145
|
+
};
|
|
2957
3146
|
const baseMsgCreateRewardScheme = { creator: "" };
|
|
2958
3147
|
exports.MsgCreateRewardScheme = {
|
|
2959
3148
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
@@ -3345,6 +3534,83 @@ exports.MsgAddRewardReserveResponse = {
|
|
|
3345
3534
|
return message;
|
|
3346
3535
|
},
|
|
3347
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
|
+
};
|
|
3348
3614
|
class MsgClientImpl {
|
|
3349
3615
|
constructor(rpc) {
|
|
3350
3616
|
this.rpc = rpc;
|
|
@@ -3371,6 +3637,7 @@ class MsgClientImpl {
|
|
|
3371
3637
|
this.CreateRewardScheme = this.CreateRewardScheme.bind(this);
|
|
3372
3638
|
this.UpdateRewardScheme = this.UpdateRewardScheme.bind(this);
|
|
3373
3639
|
this.AddReserve = this.AddReserve.bind(this);
|
|
3640
|
+
this.ClaimRewards = this.ClaimRewards.bind(this);
|
|
3374
3641
|
this.SetStablecoinInterestRate = this.SetStablecoinInterestRate.bind(this);
|
|
3375
3642
|
this.MintStablecoin = this.MintStablecoin.bind(this);
|
|
3376
3643
|
this.ReturnStablecoin = this.ReturnStablecoin.bind(this);
|
|
@@ -3382,6 +3649,8 @@ class MsgClientImpl {
|
|
|
3382
3649
|
this.LiquidateCollateralWithCdpTokens.bind(this);
|
|
3383
3650
|
this.LiquidateCollateralWithCollateral =
|
|
3384
3651
|
this.LiquidateCollateralWithCollateral.bind(this);
|
|
3652
|
+
this.LiquidateCollateralWithStablecoin =
|
|
3653
|
+
this.LiquidateCollateralWithStablecoin.bind(this);
|
|
3385
3654
|
}
|
|
3386
3655
|
AddRateStrategy(request) {
|
|
3387
3656
|
const data = exports.MsgAddRateStrategy.encode(request).finish();
|
|
@@ -3488,6 +3757,11 @@ class MsgClientImpl {
|
|
|
3488
3757
|
const promise = this.rpc.request("Switcheo.carbon.cdp.Msg", "AddReserve", data);
|
|
3489
3758
|
return promise.then((data) => exports.MsgAddRewardReserveResponse.decode(new minimal_1.default.Reader(data)));
|
|
3490
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
|
+
}
|
|
3491
3765
|
SetStablecoinInterestRate(request) {
|
|
3492
3766
|
const data = exports.MsgSetStablecoinInterestRate.encode(request).finish();
|
|
3493
3767
|
const promise = this.rpc.request("Switcheo.carbon.cdp.Msg", "SetStablecoinInterestRate", data);
|
|
@@ -3528,6 +3802,11 @@ class MsgClientImpl {
|
|
|
3528
3802
|
const promise = this.rpc.request("Switcheo.carbon.cdp.Msg", "LiquidateCollateralWithCollateral", data);
|
|
3529
3803
|
return promise.then((data) => exports.MsgLiquidateCollateralWithCollateralResponse.decode(new minimal_1.default.Reader(data)));
|
|
3530
3804
|
}
|
|
3805
|
+
LiquidateCollateralWithStablecoin(request) {
|
|
3806
|
+
const data = exports.MsgLiquidateCollateralWithStablecoin.encode(request).finish();
|
|
3807
|
+
const promise = this.rpc.request("Switcheo.carbon.cdp.Msg", "LiquidateCollateralWithStablecoin", data);
|
|
3808
|
+
return promise.then((data) => exports.MsgLiquidateCollateralWithStablecoinResponse.decode(new minimal_1.default.Reader(data)));
|
|
3809
|
+
}
|
|
3531
3810
|
}
|
|
3532
3811
|
exports.MsgClientImpl = MsgClientImpl;
|
|
3533
3812
|
function toTimestamp(date) {
|
package/lib/codec/index.d.ts
CHANGED
|
@@ -66,12 +66,16 @@ export declare const TxTypes: {
|
|
|
66
66
|
MsgLiquidateCollateralWithCdpTokensResponse: string;
|
|
67
67
|
MsgLiquidateCollateralWithCollateral: string;
|
|
68
68
|
MsgLiquidateCollateralWithCollateralResponse: string;
|
|
69
|
+
MsgLiquidateCollateralWithStablecoin: string;
|
|
70
|
+
MsgLiquidateCollateralWithStablecoinResponse: string;
|
|
69
71
|
MsgCreateRewardScheme: string;
|
|
70
72
|
MsgCreateRewardSchemeResponse: string;
|
|
71
73
|
MsgUpdateRewardScheme: string;
|
|
72
74
|
MsgUpdateRewardSchemeResponse: string;
|
|
73
75
|
MsgAddRewardReserve: string;
|
|
74
76
|
MsgAddRewardReserveResponse: string;
|
|
77
|
+
MsgClaimRewards: string;
|
|
78
|
+
MsgClaimRewardsResponse: string;
|
|
75
79
|
MsgSyncGenesis: string;
|
|
76
80
|
MsgSyncGenesisResponse: string;
|
|
77
81
|
MsgSyncHeaders: string;
|
|
@@ -290,6 +294,14 @@ export declare const TxTypes: {
|
|
|
290
294
|
SetCommitmentCurveProposal: string;
|
|
291
295
|
SetRewardsWeightsProposal: string;
|
|
292
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;
|
|
293
305
|
SettlementPriceProposal: string;
|
|
294
306
|
MsgSetWrapperMapping: string;
|
|
295
307
|
MsgSetWrapperMappingResponse: string;
|
|
@@ -307,13 +319,13 @@ export { Params as OrderParams, Order, DBOrder, OrdersForMarket, OrderIDsForMark
|
|
|
307
319
|
export { QueryGetOrderRequest, QueryGetOrderResponse, QueryAllOrderRequest, QueryAllOrderResponse, QueryAccountOpenOrdersRequest, QueryAccountOpenOrdersResponse, QueryParamsRequest as QueryOrderParamsRequest, QueryParamsResponse as QueryOrderParamsResponse, QueryOrderAllocatedMarginRequest, QueryOrderAllocatedMarginResponse } from "./order/query";
|
|
308
320
|
export { OrderEvent } from "./order/event";
|
|
309
321
|
export { DebtInfo } from "./cdp/debt_info";
|
|
310
|
-
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, 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";
|
|
311
323
|
export { AssetParams, AssetUtilization } from "./cdp/asset_params";
|
|
312
324
|
export { RateStrategyParams } from "./cdp/rate_strategy_params";
|
|
313
325
|
export { StablecoinDebtInfo } from "./cdp/stablecoin_debt_info";
|
|
314
326
|
export { RewardScheme, CreateRewardSchemeParams, UpdateRewardSchemeParams, AddReservesParams, RewardDebt } from "./cdp/reward_scheme";
|
|
315
327
|
export { QueryParamsRequest as QueryCdpParamsRequest, QueryParamsResponse as QueryCdpParamsResponse, QueryRateStrategyRequest, QueryRateStrategyResponse, QueryRateStrategyAllRequest, QueryRateStrategyAllResponse, QueryAccountDataRequest, QueryAccountDataResponse, QueryAccountCollateralRequest, QueryAccountCollateralResponse, QueryAccountCollateralAllRequest, QueryAccountCollateralAllResponse, Collateral, QueryAccountDebtRequest, QueryAccountDebtResponse, QueryAccountDebtAllRequest, QueryAccountDebtAllResponse, Debt, QueryAccountStablecoinRequest, QueryAccountStablecoinResponse, QueryAssetRequest, QueryAssetResponse, QueryAssetAllRequest, QueryAssetAllResponse, QueryTokenDebtRequest, QueryTokenDebtResponse, QueryTokenDebtAllRequest, QueryTokenDebtAllResponse, QueryStablecoinDebtRequest, QueryStablecoinDebtResponse, CdpPositionItem, CdpPosition, QueryCdpPositionsRequest, QueryCdpPositionsResponse, QueryRewardSchemesAllRequest, QueryRewardSchemesAllResponse, QueryRewardDebtsRequest, QueryRewardDebtsResponse } from "./cdp/query";
|
|
316
|
-
export { NewRateStrategyParamsEvent, UpdateRateStrategyParamsEvent, RemoveRateStrategyParamsEvent, NewAssetParamsEvent, UpdateAssetParamsEvent, SetInterestFeeEvent, SetLiquidationFeeEvent, SetStablecoinInterestRateEvent, SetCompleteLiquidationThresholdEvent, SetMinimumCloseFactorEvent, SetSmallLiquidationSizeEvent, SupplyAssetEvent, WithdrawAssetEvent, BorrowAssetEvent, RepayAssetEvent, LockCollateralEvent, UnlockCollateralEvent, UpdateDebtInfoEvent, UpdateStablecoinDebtInfoEvent, MintStablecoinEvent, ReturnStablecoinEvent, LiquidateCollateralEvent, ClaimRewardEvent, RewardDebtEvent, RewardSchemeEvent, AddReserveEvent } from "./cdp/event";
|
|
328
|
+
export { NewRateStrategyParamsEvent, UpdateRateStrategyParamsEvent, RemoveRateStrategyParamsEvent, NewAssetParamsEvent, UpdateAssetParamsEvent, SetInterestFeeEvent, SetLiquidationFeeEvent, SetStablecoinInterestRateEvent, SetCompleteLiquidationThresholdEvent, SetMinimumCloseFactorEvent, SetSmallLiquidationSizeEvent, SupplyAssetEvent, WithdrawAssetEvent, BorrowAssetEvent, RepayAssetEvent, LockCollateralEvent, UnlockCollateralEvent, UpdateDebtInfoEvent, UpdateStablecoinDebtInfoEvent, MintStablecoinEvent, ReturnStablecoinEvent, LiquidateCollateralEvent, LiquidateCollateralWithStablecoinEvent, ClaimRewardEvent, RewardDebtEvent, RewardSchemeEvent, AddReserveEvent } from "./cdp/event";
|
|
317
329
|
export { Params as CdpParams } from "./cdp/params";
|
|
318
330
|
export { HashOp, hashOpFromJSON, hashOpToJSON, LengthOp, lengthOpFromJSON, lengthOpToJSON, ExistenceProof, NonExistenceProof, CommitmentProof, LeafOp, InnerOp, ProofSpec, InnerSpec, BatchProof, BatchEntry, CompressedBatchProof, CompressedBatchEntry, CompressedExistenceProof, CompressedNonExistenceProof } from "./proofs";
|
|
319
331
|
export { LiquidatorPosition, MsgInitiateLiquidation, MsgInitiateLiquidationResponse } from "./broker/tx";
|
|
@@ -390,7 +402,8 @@ export { PoolEvent, TotalCommitmentChangeEvent, RewardsWeightChangeEvent, Commit
|
|
|
390
402
|
export { QueryCoinBalancesRequest, QueryCoinBalancesResponse } from "./insurance/query";
|
|
391
403
|
export { EventDataInsuranceFundTransfer } from "./insurance/event";
|
|
392
404
|
export { FundByMarket, Fund } from "./insurance/fund";
|
|
405
|
+
export { MsgSetBackfillTimeInterval, MsgSetBackfillTimeIntervalResponse, MsgSetSmoothenBand, MsgSetSmoothenBandResponse, MsgSetImpactBand, MsgSetImpactBandResponse, MsgSetStaleIndexAllowance, MsgSetStaleIndexAllowanceResponse } from "./pricing/tx";
|
|
393
406
|
export { Params as PricingParams, PriceSet, TokenPrice } from "./pricing/pricing";
|
|
394
407
|
export { SettlementPriceProposal, SettlementPriceParams } from "./pricing/proposal";
|
|
395
408
|
export { QueryPriceTokenRequest, QueryPriceTokenResponse, QueryPriceSetRequest, QueryPriceSetResponse, QueryAllPriceSetRequest, QueryAllPriceSetResponse, QueryRateRequest, QueryRateResponse, QueryParamsRequest as QueryPricingParamsRequest, QueryParamsResponse as QueryPricingParamsResponse, QueryTokenPriceRequest, QueryTokenPriceResponse, QueryTokenPriceAllRequest, QueryTokenPriceAllResponse } from "./pricing/query";
|
|
396
|
-
export { PriceUpdateEvent, TokenPriceUpdateEvent } from "./pricing/event";
|
|
409
|
+
export { PriceUpdateEvent, TokenPriceUpdateEvent, SetImpactBandEvent, SetSmoothenBandEvent, SetStaleIndexAllowanceEvent, SetBackfillTimeIntervalEvent } from "./pricing/event";
|