@injectivelabs/sdk-ts 1.16.14 → 1.16.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/core/modules/distribution/index.d.ts +2 -1
- package/dist/cjs/core/modules/distribution/index.js +3 -1
- package/dist/cjs/core/modules/distribution/msgs/MsgFundCommunityPool.d.ts +39 -0
- package/dist/cjs/core/modules/distribution/msgs/MsgFundCommunityPool.js +65 -0
- package/dist/cjs/core/modules/exchange/index.d.ts +2 -1
- package/dist/cjs/core/modules/exchange/index.js +3 -1
- package/dist/cjs/core/modules/exchange/msgs/MsgUpdateDerivativeMarketV2.d.ts +92 -0
- package/dist/cjs/core/modules/exchange/msgs/MsgUpdateDerivativeMarketV2.js +106 -0
- package/dist/cjs/core/modules/exchange/msgs/MsgUpdateSpotMarketV2.js +0 -1
- package/dist/cjs/core/modules/msgs.d.ts +52 -42
- package/dist/cjs/core/tx/eip712/maps.js +2 -0
- package/dist/esm/core/modules/distribution/index.d.ts +2 -1
- package/dist/esm/core/modules/distribution/index.js +2 -1
- package/dist/esm/core/modules/distribution/msgs/MsgFundCommunityPool.d.ts +39 -0
- package/dist/esm/core/modules/distribution/msgs/MsgFundCommunityPool.js +59 -0
- package/dist/esm/core/modules/exchange/index.d.ts +2 -1
- package/dist/esm/core/modules/exchange/index.js +2 -1
- package/dist/esm/core/modules/exchange/msgs/MsgUpdateDerivativeMarketV2.d.ts +92 -0
- package/dist/esm/core/modules/exchange/msgs/MsgUpdateDerivativeMarketV2.js +100 -0
- package/dist/esm/core/modules/exchange/msgs/MsgUpdateSpotMarketV2.js +0 -1
- package/dist/esm/core/modules/msgs.d.ts +52 -42
- package/dist/esm/core/tx/eip712/maps.js +2 -0
- package/package.json +6 -6
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import MsgFundCommunityPool from './msgs/MsgFundCommunityPool.js';
|
|
1
2
|
import MsgWithdrawDelegatorReward from './msgs/MsgWithdrawDelegatorReward.js';
|
|
2
3
|
import MsgWithdrawValidatorCommission from './msgs/MsgWithdrawValidatorCommission.js';
|
|
3
|
-
export { MsgWithdrawDelegatorReward, MsgWithdrawValidatorCommission };
|
|
4
|
+
export { MsgFundCommunityPool, MsgWithdrawDelegatorReward, MsgWithdrawValidatorCommission, };
|
|
@@ -3,7 +3,9 @@ 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.MsgWithdrawValidatorCommission = exports.MsgWithdrawDelegatorReward = void 0;
|
|
6
|
+
exports.MsgWithdrawValidatorCommission = exports.MsgWithdrawDelegatorReward = exports.MsgFundCommunityPool = void 0;
|
|
7
|
+
const MsgFundCommunityPool_js_1 = __importDefault(require("./msgs/MsgFundCommunityPool.js"));
|
|
8
|
+
exports.MsgFundCommunityPool = MsgFundCommunityPool_js_1.default;
|
|
7
9
|
const MsgWithdrawDelegatorReward_js_1 = __importDefault(require("./msgs/MsgWithdrawDelegatorReward.js"));
|
|
8
10
|
exports.MsgWithdrawDelegatorReward = MsgWithdrawDelegatorReward_js_1.default;
|
|
9
11
|
const MsgWithdrawValidatorCommission_js_1 = __importDefault(require("./msgs/MsgWithdrawValidatorCommission.js"));
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { CosmosBaseV1Beta1Coin, CosmosDistributionV1Beta1Tx } from '@injectivelabs/core-proto-ts';
|
|
2
|
+
import { MsgBase } from '../../MsgBase.js';
|
|
3
|
+
import type { Coin } from '@injectivelabs/ts-types';
|
|
4
|
+
export declare namespace MsgFundCommunityPool {
|
|
5
|
+
interface Params {
|
|
6
|
+
amount: Coin[];
|
|
7
|
+
depositor: string;
|
|
8
|
+
}
|
|
9
|
+
type Proto = CosmosDistributionV1Beta1Tx.MsgFundCommunityPool;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @category Messages
|
|
13
|
+
*/
|
|
14
|
+
export default class MsgFundCommunityPool extends MsgBase<MsgFundCommunityPool.Params, MsgFundCommunityPool.Proto> {
|
|
15
|
+
static fromJSON(params: MsgFundCommunityPool.Params): MsgFundCommunityPool;
|
|
16
|
+
toProto(): CosmosDistributionV1Beta1Tx.MsgFundCommunityPool;
|
|
17
|
+
toData(): {
|
|
18
|
+
amount: CosmosBaseV1Beta1Coin.Coin[];
|
|
19
|
+
depositor: string;
|
|
20
|
+
'@type': string;
|
|
21
|
+
};
|
|
22
|
+
toAmino(): {
|
|
23
|
+
type: string;
|
|
24
|
+
value: {
|
|
25
|
+
amount: CosmosBaseV1Beta1Coin.Coin[];
|
|
26
|
+
depositor: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
toWeb3Gw(): {
|
|
30
|
+
amount: CosmosBaseV1Beta1Coin.Coin[];
|
|
31
|
+
depositor: string;
|
|
32
|
+
'@type': string;
|
|
33
|
+
};
|
|
34
|
+
toDirectSign(): {
|
|
35
|
+
type: string;
|
|
36
|
+
message: CosmosDistributionV1Beta1Tx.MsgFundCommunityPool;
|
|
37
|
+
};
|
|
38
|
+
toBinary(): Uint8Array;
|
|
39
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const snakecase_keys_1 = __importDefault(require("snakecase-keys"));
|
|
7
|
+
const core_proto_ts_1 = require("@injectivelabs/core-proto-ts");
|
|
8
|
+
const MsgBase_js_1 = require("../../MsgBase.js");
|
|
9
|
+
/**
|
|
10
|
+
* @category Messages
|
|
11
|
+
*/
|
|
12
|
+
class MsgFundCommunityPool extends MsgBase_js_1.MsgBase {
|
|
13
|
+
static fromJSON(params) {
|
|
14
|
+
return new MsgFundCommunityPool(params);
|
|
15
|
+
}
|
|
16
|
+
toProto() {
|
|
17
|
+
const { params } = this;
|
|
18
|
+
const message = core_proto_ts_1.CosmosDistributionV1Beta1Tx.MsgFundCommunityPool.create();
|
|
19
|
+
message.depositor = params.depositor;
|
|
20
|
+
const coins = params.amount.map((amount) => {
|
|
21
|
+
const coin = core_proto_ts_1.CosmosBaseV1Beta1Coin.Coin.create();
|
|
22
|
+
coin.denom = amount.denom;
|
|
23
|
+
coin.amount = amount.amount;
|
|
24
|
+
return coin;
|
|
25
|
+
});
|
|
26
|
+
message.amount = coins;
|
|
27
|
+
return core_proto_ts_1.CosmosDistributionV1Beta1Tx.MsgFundCommunityPool.fromPartial(message);
|
|
28
|
+
}
|
|
29
|
+
toData() {
|
|
30
|
+
const proto = this.toProto();
|
|
31
|
+
return {
|
|
32
|
+
'@type': '/cosmos.distribution.v1beta1.MsgFundCommunityPool',
|
|
33
|
+
...proto,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
toAmino() {
|
|
37
|
+
const proto = this.toProto();
|
|
38
|
+
const message = {
|
|
39
|
+
...(0, snakecase_keys_1.default)(proto),
|
|
40
|
+
};
|
|
41
|
+
return {
|
|
42
|
+
type: 'cosmos-sdk/MsgFundCommunityPool',
|
|
43
|
+
value: message,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
toWeb3Gw() {
|
|
47
|
+
const amino = this.toAmino();
|
|
48
|
+
const { value } = amino;
|
|
49
|
+
return {
|
|
50
|
+
'@type': '/cosmos.distribution.v1beta1.MsgFundCommunityPool',
|
|
51
|
+
...value,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
toDirectSign() {
|
|
55
|
+
const proto = this.toProto();
|
|
56
|
+
return {
|
|
57
|
+
type: '/cosmos.distribution.v1beta1.MsgFundCommunityPool',
|
|
58
|
+
message: proto,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
toBinary() {
|
|
62
|
+
return core_proto_ts_1.CosmosDistributionV1Beta1Tx.MsgFundCommunityPool.encode(this.toProto()).finish();
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
exports.default = MsgFundCommunityPool;
|
|
@@ -15,6 +15,7 @@ import MsgCancelDerivativeOrder from './msgs/MsgCancelDerivativeOrder.js';
|
|
|
15
15
|
import MsgCreateSpotMarketOrder from './msgs/MsgCreateSpotMarketOrder.js';
|
|
16
16
|
import MsgIncreasePositionMargin from './msgs/MsgIncreasePositionMargin.js';
|
|
17
17
|
import MsgInstantSpotMarketLaunch from './msgs/MsgInstantSpotMarketLaunch.js';
|
|
18
|
+
import MsgUpdateDerivativeMarketV2 from './msgs/MsgUpdateDerivativeMarketV2.js';
|
|
18
19
|
import MsgCancelBinaryOptionsOrder from './msgs/MsgCancelBinaryOptionsOrder.js';
|
|
19
20
|
import MsgCreateDerivativeLimitOrder from './msgs/MsgCreateDerivativeLimitOrder.js';
|
|
20
21
|
import MsgBatchCancelDerivativeOrders from './msgs/MsgBatchCancelDerivativeOrders.js';
|
|
@@ -25,5 +26,5 @@ import MsgBatchCancelBinaryOptionsOrders from './msgs/MsgBatchCancelBinaryOption
|
|
|
25
26
|
import MsgCreateBinaryOptionsMarketOrder from './msgs/MsgCreateBinaryOptionsMarketOrder.js';
|
|
26
27
|
import MsgSetDelegationTransferReceivers from './msgs/MsgSetDelegationTransferReceivers.js';
|
|
27
28
|
import MsgInstantBinaryOptionsMarketLaunch from './msgs/MsgInstantBinaryOptionsMarketLaunch.js';
|
|
28
|
-
export { MsgDeposit, MsgWithdraw, MsgSignData, MsgRewardsOptOut, MsgCancelSpotOrder, MsgExternalTransfer, MsgLiquidatePosition, MsgBatchUpdateOrders, MsgUpdateSpotMarketV2, MsgReclaimLockedFunds, MsgAuthorizeStakeGrants, MsgCreateSpotLimitOrder, MsgCancelDerivativeOrder, MsgBatchCancelSpotOrders, MsgCreateSpotMarketOrder, MsgIncreasePositionMargin, MsgInstantSpotMarketLaunch, MsgCancelBinaryOptionsOrder, MsgCreateDerivativeLimitOrder, MsgCreateDerivativeMarketOrder, MsgBatchCancelDerivativeOrders, MsgCreateBinaryOptionsLimitOrder, MsgAdminUpdateBinaryOptionsMarket, MsgCreateBinaryOptionsMarketOrder, MsgBatchCancelBinaryOptionsOrders, MsgSetDelegationTransferReceivers, MsgInstantBinaryOptionsMarketLaunch, };
|
|
29
|
+
export { MsgDeposit, MsgWithdraw, MsgSignData, MsgRewardsOptOut, MsgCancelSpotOrder, MsgExternalTransfer, MsgLiquidatePosition, MsgBatchUpdateOrders, MsgUpdateSpotMarketV2, MsgReclaimLockedFunds, MsgAuthorizeStakeGrants, MsgCreateSpotLimitOrder, MsgCancelDerivativeOrder, MsgBatchCancelSpotOrders, MsgCreateSpotMarketOrder, MsgIncreasePositionMargin, MsgInstantSpotMarketLaunch, MsgCancelBinaryOptionsOrder, MsgUpdateDerivativeMarketV2, MsgCreateDerivativeLimitOrder, MsgCreateDerivativeMarketOrder, MsgBatchCancelDerivativeOrders, MsgCreateBinaryOptionsLimitOrder, MsgAdminUpdateBinaryOptionsMarket, MsgCreateBinaryOptionsMarketOrder, MsgBatchCancelBinaryOptionsOrders, MsgSetDelegationTransferReceivers, MsgInstantBinaryOptionsMarketLaunch, };
|
|
29
30
|
export * from './utils/index.js';
|
|
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.MsgInstantBinaryOptionsMarketLaunch = exports.MsgSetDelegationTransferReceivers = exports.MsgBatchCancelBinaryOptionsOrders = exports.MsgCreateBinaryOptionsMarketOrder = exports.MsgAdminUpdateBinaryOptionsMarket = exports.MsgCreateBinaryOptionsLimitOrder = exports.MsgBatchCancelDerivativeOrders = exports.MsgCreateDerivativeMarketOrder = exports.MsgCreateDerivativeLimitOrder = exports.MsgCancelBinaryOptionsOrder = exports.MsgInstantSpotMarketLaunch = exports.MsgIncreasePositionMargin = exports.MsgCreateSpotMarketOrder = exports.MsgBatchCancelSpotOrders = exports.MsgCancelDerivativeOrder = exports.MsgCreateSpotLimitOrder = exports.MsgAuthorizeStakeGrants = exports.MsgReclaimLockedFunds = exports.MsgUpdateSpotMarketV2 = exports.MsgBatchUpdateOrders = exports.MsgLiquidatePosition = exports.MsgExternalTransfer = exports.MsgCancelSpotOrder = exports.MsgRewardsOptOut = exports.MsgSignData = exports.MsgWithdraw = exports.MsgDeposit = void 0;
|
|
20
|
+
exports.MsgInstantBinaryOptionsMarketLaunch = exports.MsgSetDelegationTransferReceivers = exports.MsgBatchCancelBinaryOptionsOrders = exports.MsgCreateBinaryOptionsMarketOrder = exports.MsgAdminUpdateBinaryOptionsMarket = exports.MsgCreateBinaryOptionsLimitOrder = exports.MsgBatchCancelDerivativeOrders = exports.MsgCreateDerivativeMarketOrder = exports.MsgCreateDerivativeLimitOrder = exports.MsgUpdateDerivativeMarketV2 = exports.MsgCancelBinaryOptionsOrder = exports.MsgInstantSpotMarketLaunch = exports.MsgIncreasePositionMargin = exports.MsgCreateSpotMarketOrder = exports.MsgBatchCancelSpotOrders = exports.MsgCancelDerivativeOrder = exports.MsgCreateSpotLimitOrder = exports.MsgAuthorizeStakeGrants = exports.MsgReclaimLockedFunds = exports.MsgUpdateSpotMarketV2 = exports.MsgBatchUpdateOrders = exports.MsgLiquidatePosition = exports.MsgExternalTransfer = exports.MsgCancelSpotOrder = exports.MsgRewardsOptOut = exports.MsgSignData = exports.MsgWithdraw = exports.MsgDeposit = void 0;
|
|
21
21
|
const MsgDeposit_js_1 = __importDefault(require("./msgs/MsgDeposit.js"));
|
|
22
22
|
exports.MsgDeposit = MsgDeposit_js_1.default;
|
|
23
23
|
const MsgSignData_js_1 = __importDefault(require("./msgs/MsgSignData.js"));
|
|
@@ -52,6 +52,8 @@ const MsgIncreasePositionMargin_js_1 = __importDefault(require("./msgs/MsgIncrea
|
|
|
52
52
|
exports.MsgIncreasePositionMargin = MsgIncreasePositionMargin_js_1.default;
|
|
53
53
|
const MsgInstantSpotMarketLaunch_js_1 = __importDefault(require("./msgs/MsgInstantSpotMarketLaunch.js"));
|
|
54
54
|
exports.MsgInstantSpotMarketLaunch = MsgInstantSpotMarketLaunch_js_1.default;
|
|
55
|
+
const MsgUpdateDerivativeMarketV2_js_1 = __importDefault(require("./msgs/MsgUpdateDerivativeMarketV2.js"));
|
|
56
|
+
exports.MsgUpdateDerivativeMarketV2 = MsgUpdateDerivativeMarketV2_js_1.default;
|
|
55
57
|
const MsgCancelBinaryOptionsOrder_js_1 = __importDefault(require("./msgs/MsgCancelBinaryOptionsOrder.js"));
|
|
56
58
|
exports.MsgCancelBinaryOptionsOrder = MsgCancelBinaryOptionsOrder_js_1.default;
|
|
57
59
|
const MsgCreateDerivativeLimitOrder_js_1 = __importDefault(require("./msgs/MsgCreateDerivativeLimitOrder.js"));
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { InjectiveExchangeV2Tx } from '@injectivelabs/core-proto-ts';
|
|
2
|
+
import { MsgBase } from '../../MsgBase.js';
|
|
3
|
+
export declare namespace MsgUpdateDerivativeMarketV2 {
|
|
4
|
+
interface Params {
|
|
5
|
+
admin: string;
|
|
6
|
+
marketId: string;
|
|
7
|
+
newTicker?: string;
|
|
8
|
+
newMinNotional?: string;
|
|
9
|
+
newMinPriceTickSize?: string;
|
|
10
|
+
newMinQuantityTickSize?: string;
|
|
11
|
+
newInitialMarginRatio?: string;
|
|
12
|
+
newMaintenanceMarginRatio?: string;
|
|
13
|
+
newReduceMarginRatio?: string;
|
|
14
|
+
}
|
|
15
|
+
type Proto = InjectiveExchangeV2Tx.MsgUpdateDerivativeMarket;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @category Messages
|
|
19
|
+
*/
|
|
20
|
+
export default class MsgUpdateDerivativeMarketV2 extends MsgBase<MsgUpdateDerivativeMarketV2.Params, MsgUpdateDerivativeMarketV2.Proto> {
|
|
21
|
+
static fromJSON(params: MsgUpdateDerivativeMarketV2.Params): MsgUpdateDerivativeMarketV2;
|
|
22
|
+
toProto(): InjectiveExchangeV2Tx.MsgUpdateDerivativeMarket;
|
|
23
|
+
toData(): {
|
|
24
|
+
admin: string;
|
|
25
|
+
marketId: string;
|
|
26
|
+
newTicker: string;
|
|
27
|
+
newMinPriceTickSize: string;
|
|
28
|
+
newMinQuantityTickSize: string;
|
|
29
|
+
newMinNotional: string;
|
|
30
|
+
newInitialMarginRatio: string;
|
|
31
|
+
newMaintenanceMarginRatio: string;
|
|
32
|
+
newReduceMarginRatio: string;
|
|
33
|
+
'@type': string;
|
|
34
|
+
};
|
|
35
|
+
toAmino(): {
|
|
36
|
+
type: string;
|
|
37
|
+
value: {
|
|
38
|
+
admin: string;
|
|
39
|
+
market_id: string;
|
|
40
|
+
new_ticker: string;
|
|
41
|
+
new_min_price_tick_size: string;
|
|
42
|
+
new_min_quantity_tick_size: string;
|
|
43
|
+
new_min_notional: string;
|
|
44
|
+
new_initial_margin_ratio: string;
|
|
45
|
+
new_maintenance_margin_ratio: string;
|
|
46
|
+
new_reduce_margin_ratio: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
toWeb3Gw(): {
|
|
50
|
+
admin: string;
|
|
51
|
+
market_id: string;
|
|
52
|
+
new_ticker: string;
|
|
53
|
+
new_min_price_tick_size: string;
|
|
54
|
+
new_min_quantity_tick_size: string;
|
|
55
|
+
new_min_notional: string;
|
|
56
|
+
new_initial_margin_ratio: string;
|
|
57
|
+
new_maintenance_margin_ratio: string;
|
|
58
|
+
new_reduce_margin_ratio: string;
|
|
59
|
+
'@type': string;
|
|
60
|
+
};
|
|
61
|
+
toEip712(): {
|
|
62
|
+
type: string;
|
|
63
|
+
value: {
|
|
64
|
+
admin: string;
|
|
65
|
+
market_id: string;
|
|
66
|
+
new_ticker: string;
|
|
67
|
+
new_min_price_tick_size: string;
|
|
68
|
+
new_min_quantity_tick_size: string;
|
|
69
|
+
new_min_notional: string;
|
|
70
|
+
new_initial_margin_ratio: string;
|
|
71
|
+
new_maintenance_margin_ratio: string;
|
|
72
|
+
new_reduce_margin_ratio: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
toEip712V2(): {
|
|
76
|
+
new_min_price_tick_size: string;
|
|
77
|
+
new_min_quantity_tick_size: string;
|
|
78
|
+
new_min_notional: string;
|
|
79
|
+
new_initial_margin_ratio: string;
|
|
80
|
+
new_maintenance_margin_ratio: string;
|
|
81
|
+
new_reduce_margin_ratio: string;
|
|
82
|
+
admin: string;
|
|
83
|
+
market_id: string;
|
|
84
|
+
new_ticker: string;
|
|
85
|
+
'@type': string;
|
|
86
|
+
};
|
|
87
|
+
toDirectSign(): {
|
|
88
|
+
type: string;
|
|
89
|
+
message: InjectiveExchangeV2Tx.MsgUpdateDerivativeMarket;
|
|
90
|
+
};
|
|
91
|
+
toBinary(): Uint8Array;
|
|
92
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const snakecase_keys_1 = __importDefault(require("snakecase-keys"));
|
|
7
|
+
const utils_1 = require("@injectivelabs/utils");
|
|
8
|
+
const core_proto_ts_1 = require("@injectivelabs/core-proto-ts");
|
|
9
|
+
const MsgBase_js_1 = require("../../MsgBase.js");
|
|
10
|
+
const numbers_js_1 = require("../../../../utils/numbers.js");
|
|
11
|
+
const createMessage = (params) => {
|
|
12
|
+
const message = core_proto_ts_1.InjectiveExchangeV2Tx.MsgUpdateDerivativeMarket.create();
|
|
13
|
+
message.admin = params.admin;
|
|
14
|
+
message.marketId = params.marketId;
|
|
15
|
+
message.newTicker = params.newTicker || '';
|
|
16
|
+
message.newMinNotional = params.newMinNotional || '0';
|
|
17
|
+
message.newMinPriceTickSize = params.newMinPriceTickSize || '0';
|
|
18
|
+
message.newMinQuantityTickSize = params.newMinQuantityTickSize || '0';
|
|
19
|
+
message.newInitialMarginRatio = params.newInitialMarginRatio || '0';
|
|
20
|
+
message.newMaintenanceMarginRatio = params.newMaintenanceMarginRatio || '0';
|
|
21
|
+
message.newReduceMarginRatio = params.newReduceMarginRatio || '0';
|
|
22
|
+
return core_proto_ts_1.InjectiveExchangeV2Tx.MsgUpdateDerivativeMarket.fromPartial(message);
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* @category Messages
|
|
26
|
+
*/
|
|
27
|
+
class MsgUpdateDerivativeMarketV2 extends MsgBase_js_1.MsgBase {
|
|
28
|
+
static fromJSON(params) {
|
|
29
|
+
return new MsgUpdateDerivativeMarketV2(params);
|
|
30
|
+
}
|
|
31
|
+
toProto() {
|
|
32
|
+
const { params: initialParams } = this;
|
|
33
|
+
const params = {
|
|
34
|
+
...initialParams,
|
|
35
|
+
newMinNotional: (0, utils_1.toChainFormat)(initialParams.newMinNotional || '0').toFixed(),
|
|
36
|
+
newMinQuantityTickSize: (0, utils_1.toChainFormat)(initialParams.newMinQuantityTickSize || '0').toFixed(),
|
|
37
|
+
newMinPriceTickSize: (0, utils_1.toChainFormat)(initialParams.newMinPriceTickSize || '0').toFixed(),
|
|
38
|
+
newInitialMarginRatio: (0, utils_1.toChainFormat)(initialParams.newInitialMarginRatio || '0').toFixed(),
|
|
39
|
+
newMaintenanceMarginRatio: (0, utils_1.toChainFormat)(initialParams.newMaintenanceMarginRatio || '0').toFixed(),
|
|
40
|
+
newReduceMarginRatio: (0, utils_1.toChainFormat)(initialParams.newReduceMarginRatio || '0').toFixed(),
|
|
41
|
+
};
|
|
42
|
+
return createMessage(params);
|
|
43
|
+
}
|
|
44
|
+
toData() {
|
|
45
|
+
const proto = this.toProto();
|
|
46
|
+
return {
|
|
47
|
+
'@type': '/injective.exchange.v2.MsgUpdateDerivativeMarket',
|
|
48
|
+
...proto,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
toAmino() {
|
|
52
|
+
const { params } = this;
|
|
53
|
+
const msg = createMessage(params);
|
|
54
|
+
const message = {
|
|
55
|
+
...(0, snakecase_keys_1.default)(msg),
|
|
56
|
+
};
|
|
57
|
+
return {
|
|
58
|
+
type: 'exchange/MsgUpdateDerivativeMarket',
|
|
59
|
+
value: message,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
toWeb3Gw() {
|
|
63
|
+
const amino = this.toAmino();
|
|
64
|
+
const { value } = amino;
|
|
65
|
+
return {
|
|
66
|
+
'@type': '/injective.exchange.v2.MsgUpdateDerivativeMarket',
|
|
67
|
+
...value,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
toEip712() {
|
|
71
|
+
const amino = this.toAmino();
|
|
72
|
+
const { type, value } = amino;
|
|
73
|
+
const messageAdjusted = {
|
|
74
|
+
...value,
|
|
75
|
+
};
|
|
76
|
+
return {
|
|
77
|
+
type,
|
|
78
|
+
value: messageAdjusted,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
toEip712V2() {
|
|
82
|
+
const { params } = this;
|
|
83
|
+
const web3gw = this.toWeb3Gw();
|
|
84
|
+
const messageAdjusted = {
|
|
85
|
+
...web3gw,
|
|
86
|
+
new_min_price_tick_size: (0, numbers_js_1.numberToCosmosSdkDecString)(params.newMinPriceTickSize || '0'),
|
|
87
|
+
new_min_quantity_tick_size: (0, numbers_js_1.numberToCosmosSdkDecString)(params.newMinQuantityTickSize || '0'),
|
|
88
|
+
new_min_notional: (0, numbers_js_1.numberToCosmosSdkDecString)(params.newMinNotional || '0'),
|
|
89
|
+
new_initial_margin_ratio: (0, numbers_js_1.numberToCosmosSdkDecString)(params.newInitialMarginRatio || '0'),
|
|
90
|
+
new_maintenance_margin_ratio: (0, numbers_js_1.numberToCosmosSdkDecString)(params.newMaintenanceMarginRatio || '0'),
|
|
91
|
+
new_reduce_margin_ratio: (0, numbers_js_1.numberToCosmosSdkDecString)(params.newReduceMarginRatio || '0'),
|
|
92
|
+
};
|
|
93
|
+
return messageAdjusted;
|
|
94
|
+
}
|
|
95
|
+
toDirectSign() {
|
|
96
|
+
const proto = this.toProto();
|
|
97
|
+
return {
|
|
98
|
+
type: '/injective.exchange.v2.MsgUpdateDerivativeMarket',
|
|
99
|
+
message: proto,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
toBinary() {
|
|
103
|
+
return core_proto_ts_1.InjectiveExchangeV2Tx.MsgUpdateDerivativeMarket.encode(this.toProto()).finish();
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
exports.default = MsgUpdateDerivativeMarketV2;
|
|
@@ -27,7 +27,6 @@ class MsgUpdateSpotMarketV2 extends MsgBase_js_1.MsgBase {
|
|
|
27
27
|
}
|
|
28
28
|
toProto() {
|
|
29
29
|
const { params: initialParams } = this;
|
|
30
|
-
console.log({ initialParams });
|
|
31
30
|
const params = {
|
|
32
31
|
...initialParams,
|
|
33
32
|
newMinNotional: (0, utils_1.toChainFormat)(initialParams.newMinNotional || '0').toFixed(),
|
|
@@ -1,72 +1,82 @@
|
|
|
1
|
-
import type MsgVote from './gov/msgs/MsgVote.js';
|
|
2
|
-
import type MsgSend from './bank/msgs/MsgSend.js';
|
|
3
1
|
import type MsgBid from './auction/msgs/MsgBid.js';
|
|
4
2
|
import type MsgGrant from './authz/msgs/MsgGrant.js';
|
|
5
3
|
import type MsgRevoke from './authz/msgs/MsgRevoke.js';
|
|
6
4
|
import type MsgAuthzExec from './authz/msgs/MsgExec.js';
|
|
7
|
-
import type
|
|
8
|
-
import type
|
|
9
|
-
import type MsgGovDeposit from './gov/msgs/MsgDeposit.js';
|
|
10
|
-
import type MsgBurn from './tokenfactory/msgs/MsgBurn.js';
|
|
11
|
-
import type MsgMint from './tokenfactory/msgs/MsgMint.js';
|
|
5
|
+
import type MsgGrantWithAuthorization from './authz/msgs/MsgGrantWithAuthorization.js';
|
|
6
|
+
import type MsgSend from './bank/msgs/MsgSend.js';
|
|
12
7
|
import type MsgMultiSend from './bank/msgs/MsgMultiSend.js';
|
|
8
|
+
import type MsgFundCommunityPool from './distribution/msgs/MsgFundCommunityPool.js';
|
|
9
|
+
import type MsgWithdrawDelegatorReward from './distribution/msgs/MsgWithdrawDelegatorReward.js';
|
|
10
|
+
import type MsgWithdrawValidatorCommission from './distribution/msgs/MsgWithdrawValidatorCommission.js';
|
|
13
11
|
import type MsgDeposit from './exchange/msgs/MsgDeposit.js';
|
|
14
|
-
import type MsgStoreCode from './wasm/msgs/MsgStoreCode.js';
|
|
15
|
-
import type MsgSendToEth from './peggy/msgs/MsgSendToEth.js';
|
|
16
|
-
import type MsgDelegate from './staking/msgs/MsgDelegate.js';
|
|
17
12
|
import type MsgSignData from './exchange/msgs/MsgSignData.js';
|
|
18
13
|
import type MsgWithdraw from './exchange/msgs/MsgWithdraw.js';
|
|
19
|
-
import type MsgUpdateAdmin from './wasm/msgs/MsgUpdateAdmin.js';
|
|
20
|
-
import type MsgUndelegate from './staking/msgs/MsgUndelegate.js';
|
|
21
|
-
import type MsgUnderwrite from './insurance/msgs/MsgUnderwrite.js';
|
|
22
|
-
import type MsgEditValidator from './staking/msgs/MsgEditValidator.js';
|
|
23
|
-
import type MsgExec from './wasm/msgs/MsgPrivilegedExecuteContract.js';
|
|
24
14
|
import type MsgRewardsOptOut from './exchange/msgs/MsgRewardsOptOut.js';
|
|
25
|
-
import type MsgChangeAdmin from './tokenfactory/msgs/MsgChangeAdmin.js';
|
|
26
|
-
import type MsgCreateDenom from './tokenfactory/msgs/MsgCreateDenom.js';
|
|
27
|
-
import type MsgExecuteContract from './wasm/msgs/MsgExecuteContract.js';
|
|
28
|
-
import type MsgMigrateContract from './wasm/msgs/MsgMigrateContract.js';
|
|
29
|
-
import type MsgGrantAllowance from './feegrant/msgs/MsgGrantAllowance.js';
|
|
30
|
-
import type MsgBeginRedelegate from './staking/msgs/MsgBeginRedelegate.js';
|
|
31
|
-
import type MsgCreateValidator from './staking/msgs/MsgCreateValidator.js';
|
|
32
15
|
import type MsgCancelSpotOrder from './exchange/msgs/MsgCancelSpotOrder.js';
|
|
33
|
-
import type MsgRevokeAllowance from './feegrant/msgs/MsgRevokeAllowance.js';
|
|
34
16
|
import type MsgExternalTransfer from './exchange/msgs/MsgExternalTransfer.js';
|
|
35
17
|
import type MsgBatchUpdateOrders from './exchange/msgs/MsgBatchUpdateOrders.js';
|
|
36
18
|
import type MsgLiquidatePosition from './exchange/msgs/MsgLiquidatePosition.js';
|
|
37
|
-
import type MsgInstantiateContract from './wasm/msgs/MsgInstantiateContract.js';
|
|
38
|
-
import type MsgTransferDelegation from './staking/msgs/MsgTransferDelegation.js';
|
|
39
|
-
import type MsgRequestRedemption from './insurance/msgs/MsgRequestRedemption.js';
|
|
40
19
|
import type MsgReclaimLockedFunds from './exchange/msgs/MsgReclaimLockedFunds.js';
|
|
41
|
-
import type MsgSetDenomMetadata from './tokenfactory/msgs/MsgSetDenomMetadata.js';
|
|
42
|
-
import type MsgUpdateSpotMarketV2 from './exchange/msgs/MsgUpdateSpotMarketV2.js';
|
|
43
|
-
import type MsgExecuteContractCompat from './wasm/msgs/MsgExecuteContractCompat.js';
|
|
44
|
-
import type MsgCreateInsuranceFund from './insurance/msgs/MsgCreateInsuranceFund.js';
|
|
45
20
|
import type MsgAuthorizeStakeGrants from './exchange/msgs/MsgAuthorizeStakeGrants.js';
|
|
46
21
|
import type MsgCreateSpotLimitOrder from './exchange/msgs/MsgCreateSpotLimitOrder.js';
|
|
47
|
-
import type MsgGrantWithAuthorization from './authz/msgs/MsgGrantWithAuthorization.js';
|
|
48
22
|
import type MsgBatchCancelSpotOrders from './exchange/msgs/MsgBatchCancelSpotOrders.js';
|
|
49
23
|
import type MsgCancelDerivativeOrder from './exchange/msgs/MsgCancelDerivativeOrder.js';
|
|
50
24
|
import type MsgCreateSpotMarketOrder from './exchange/msgs/MsgCreateSpotMarketOrder.js';
|
|
51
25
|
import type MsgIncreasePositionMargin from './exchange/msgs/MsgIncreasePositionMargin.js';
|
|
52
26
|
import type MsgInstantSpotMarketLaunch from './exchange/msgs/MsgInstantSpotMarketLaunch.js';
|
|
53
27
|
import type MsgCancelBinaryOptionsOrder from './exchange/msgs/MsgCancelBinaryOptionsOrder.js';
|
|
54
|
-
import type MsgCancelUnbondingDelegation from './staking/msgs/MsgCancelUnbondingDelegation.js';
|
|
55
|
-
import type MsgWithdrawDelegatorReward from './distribution/msgs/MsgWithdrawDelegatorReward.js';
|
|
56
28
|
import type MsgCreateDerivativeLimitOrder from './exchange/msgs/MsgCreateDerivativeLimitOrder.js';
|
|
57
29
|
import type MsgBatchCancelDerivativeOrders from './exchange/msgs/MsgBatchCancelDerivativeOrders.js';
|
|
58
30
|
import type MsgCreateDerivativeMarketOrder from './exchange/msgs/MsgCreateDerivativeMarketOrder.js';
|
|
59
|
-
import type MsgWithdrawValidatorCommission from './distribution/msgs/MsgWithdrawValidatorCommission.js';
|
|
60
31
|
import type MsgCreateBinaryOptionsLimitOrder from './exchange/msgs/MsgCreateBinaryOptionsLimitOrder.js';
|
|
61
32
|
import type MsgAdminUpdateBinaryOptionsMarket from './exchange/msgs/MsgAdminUpdateBinaryOptionsMarket.js';
|
|
62
33
|
import type MsgBatchCancelBinaryOptionsOrders from './exchange/msgs/MsgBatchCancelBinaryOptionsOrders.js';
|
|
63
34
|
import type MsgCreateBinaryOptionsMarketOrder from './exchange/msgs/MsgCreateBinaryOptionsMarketOrder.js';
|
|
64
35
|
import type MsgSetDelegationTransferReceivers from './exchange/msgs/MsgSetDelegationTransferReceivers.js';
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
36
|
+
import type MsgUpdateSpotMarketV2 from './exchange/msgs/MsgUpdateSpotMarketV2.js';
|
|
37
|
+
import type MsgUpdateDerivativeMarketV2 from './exchange/msgs/MsgUpdateDerivativeMarketV2.js';
|
|
38
|
+
import type MsgGrantAllowance from './feegrant/msgs/MsgGrantAllowance.js';
|
|
39
|
+
import type MsgRevokeAllowance from './feegrant/msgs/MsgRevokeAllowance.js';
|
|
40
|
+
import type MsgVote from './gov/msgs/MsgVote.js';
|
|
41
|
+
import type { MsgSubmitProposal } from './gov/index.js';
|
|
42
|
+
import type MsgGovDeposit from './gov/msgs/MsgDeposit.js';
|
|
43
|
+
import type MsgTransfer from './ibc/msgs/MsgTransfer.js';
|
|
44
|
+
import type MsgUnderwrite from './insurance/msgs/MsgUnderwrite.js';
|
|
45
|
+
import type MsgRequestRedemption from './insurance/msgs/MsgRequestRedemption.js';
|
|
46
|
+
import type MsgCreateInsuranceFund from './insurance/msgs/MsgCreateInsuranceFund.js';
|
|
47
|
+
import type MsgSendToEth from './peggy/msgs/MsgSendToEth.js';
|
|
48
|
+
import type MsgDelegate from './staking/msgs/MsgDelegate.js';
|
|
49
|
+
import type MsgUndelegate from './staking/msgs/MsgUndelegate.js';
|
|
50
|
+
import type MsgEditValidator from './staking/msgs/MsgEditValidator.js';
|
|
51
|
+
import type MsgBeginRedelegate from './staking/msgs/MsgBeginRedelegate.js';
|
|
52
|
+
import type MsgCreateValidator from './staking/msgs/MsgCreateValidator.js';
|
|
53
|
+
import type MsgTransferDelegation from './staking/msgs/MsgTransferDelegation.js';
|
|
54
|
+
import type MsgCancelUnbondingDelegation from './staking/msgs/MsgCancelUnbondingDelegation.js';
|
|
55
|
+
import type MsgBurn from './tokenfactory/msgs/MsgBurn.js';
|
|
56
|
+
import type MsgMint from './tokenfactory/msgs/MsgMint.js';
|
|
57
|
+
import type MsgChangeAdmin from './tokenfactory/msgs/MsgChangeAdmin.js';
|
|
58
|
+
import type MsgCreateDenom from './tokenfactory/msgs/MsgCreateDenom.js';
|
|
59
|
+
import type MsgSetDenomMetadata from './tokenfactory/msgs/MsgSetDenomMetadata.js';
|
|
60
|
+
import type MsgStoreCode from './wasm/msgs/MsgStoreCode.js';
|
|
61
|
+
import type MsgUpdateAdmin from './wasm/msgs/MsgUpdateAdmin.js';
|
|
62
|
+
import type MsgExec from './wasm/msgs/MsgPrivilegedExecuteContract.js';
|
|
63
|
+
import type MsgExecuteContract from './wasm/msgs/MsgExecuteContract.js';
|
|
64
|
+
import type MsgMigrateContract from './wasm/msgs/MsgMigrateContract.js';
|
|
65
|
+
import type MsgInstantiateContract from './wasm/msgs/MsgInstantiateContract.js';
|
|
66
|
+
import type MsgExecuteContractCompat from './wasm/msgs/MsgExecuteContractCompat.js';
|
|
67
|
+
export type AuctionMsgs = MsgBid;
|
|
68
|
+
export type AuthzMsgs = MsgGrant | MsgRevoke | MsgAuthzExec | MsgGrantWithAuthorization;
|
|
69
|
+
export type BankMsgs = MsgSend | MsgMultiSend;
|
|
70
|
+
export type DistributionMsgs = MsgFundCommunityPool | MsgWithdrawDelegatorReward | MsgWithdrawValidatorCommission;
|
|
71
|
+
export type ExchangeV1Msgs = MsgDeposit | MsgSignData | MsgWithdraw | MsgRewardsOptOut | MsgCancelSpotOrder | MsgExternalTransfer | MsgBatchUpdateOrders | MsgLiquidatePosition | MsgReclaimLockedFunds | MsgAuthorizeStakeGrants | MsgCreateSpotLimitOrder | MsgBatchCancelSpotOrders | MsgCancelDerivativeOrder | MsgCreateSpotMarketOrder | MsgIncreasePositionMargin | MsgInstantSpotMarketLaunch | MsgCancelBinaryOptionsOrder | MsgCreateDerivativeLimitOrder | MsgBatchCancelDerivativeOrders | MsgCreateDerivativeMarketOrder | MsgCreateBinaryOptionsLimitOrder | MsgAdminUpdateBinaryOptionsMarket | MsgBatchCancelBinaryOptionsOrders | MsgCreateBinaryOptionsMarketOrder | MsgSetDelegationTransferReceivers;
|
|
72
|
+
export type ExchangeV2Msgs = MsgUpdateSpotMarketV2 | MsgUpdateDerivativeMarketV2;
|
|
73
|
+
export type FeegrantMsgs = MsgGrantAllowance | MsgRevokeAllowance;
|
|
74
|
+
export type GovMsgs = MsgVote | MsgSubmitProposal | MsgGovDeposit;
|
|
75
|
+
export type IbcMsgs = MsgTransfer;
|
|
76
|
+
export type InsuranceMsgs = MsgUnderwrite | MsgRequestRedemption | MsgCreateInsuranceFund;
|
|
77
|
+
export type PeggyMsgs = MsgSendToEth;
|
|
78
|
+
export type StakingMsgs = MsgDelegate | MsgUndelegate | MsgEditValidator | MsgBeginRedelegate | MsgCreateValidator | MsgTransferDelegation | MsgCancelUnbondingDelegation;
|
|
79
|
+
export type TokenFactoryMsgs = MsgBurn | MsgMint | MsgChangeAdmin | MsgCreateDenom | MsgSetDenomMetadata;
|
|
80
|
+
export type WasmMsgs = MsgStoreCode | MsgUpdateAdmin | MsgExec | MsgExecuteContract | MsgMigrateContract | MsgInstantiateContract | MsgExecuteContractCompat;
|
|
81
|
+
export type Msgs = AuctionMsgs | AuthzMsgs | BankMsgs | DistributionMsgs | ExchangeV1Msgs | ExchangeV2Msgs | FeegrantMsgs | GovMsgs | IbcMsgs | InsuranceMsgs | PeggyMsgs | StakingMsgs | TokenFactoryMsgs | WasmMsgs;
|
|
82
|
+
export type ExchangeMsgs = ExchangeV1Msgs | ExchangeV2Msgs;
|
|
@@ -377,6 +377,8 @@ const protoTypeToAminoType = (type) => {
|
|
|
377
377
|
return 'exchange/MsgTransferAndExecute';
|
|
378
378
|
case 'injective.exchange.v2.MsgUpdateSpotMarket':
|
|
379
379
|
return 'exchange/MsgUpdateSpotMarket';
|
|
380
|
+
case 'injective.exchange.v2.MsgUpdateDerivativeMarket':
|
|
381
|
+
return 'exchange/MsgUpdateDerivativeMarket';
|
|
380
382
|
case 'injective.exchange.v1beta1.CreateSpotLimitOrderAuthz':
|
|
381
383
|
return 'exchange/CreateSpotLimitOrderAuthz';
|
|
382
384
|
case 'injective.exchange.v1beta1.CreateSpotMarketOrderAuthz':
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import MsgFundCommunityPool from './msgs/MsgFundCommunityPool.js';
|
|
1
2
|
import MsgWithdrawDelegatorReward from './msgs/MsgWithdrawDelegatorReward.js';
|
|
2
3
|
import MsgWithdrawValidatorCommission from './msgs/MsgWithdrawValidatorCommission.js';
|
|
3
|
-
export { MsgWithdrawDelegatorReward, MsgWithdrawValidatorCommission };
|
|
4
|
+
export { MsgFundCommunityPool, MsgWithdrawDelegatorReward, MsgWithdrawValidatorCommission, };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import MsgFundCommunityPool from './msgs/MsgFundCommunityPool.js';
|
|
1
2
|
import MsgWithdrawDelegatorReward from './msgs/MsgWithdrawDelegatorReward.js';
|
|
2
3
|
import MsgWithdrawValidatorCommission from './msgs/MsgWithdrawValidatorCommission.js';
|
|
3
|
-
export { MsgWithdrawDelegatorReward, MsgWithdrawValidatorCommission };
|
|
4
|
+
export { MsgFundCommunityPool, MsgWithdrawDelegatorReward, MsgWithdrawValidatorCommission, };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { CosmosBaseV1Beta1Coin, CosmosDistributionV1Beta1Tx } from '@injectivelabs/core-proto-ts';
|
|
2
|
+
import { MsgBase } from '../../MsgBase.js';
|
|
3
|
+
import type { Coin } from '@injectivelabs/ts-types';
|
|
4
|
+
export declare namespace MsgFundCommunityPool {
|
|
5
|
+
interface Params {
|
|
6
|
+
amount: Coin[];
|
|
7
|
+
depositor: string;
|
|
8
|
+
}
|
|
9
|
+
type Proto = CosmosDistributionV1Beta1Tx.MsgFundCommunityPool;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @category Messages
|
|
13
|
+
*/
|
|
14
|
+
export default class MsgFundCommunityPool extends MsgBase<MsgFundCommunityPool.Params, MsgFundCommunityPool.Proto> {
|
|
15
|
+
static fromJSON(params: MsgFundCommunityPool.Params): MsgFundCommunityPool;
|
|
16
|
+
toProto(): CosmosDistributionV1Beta1Tx.MsgFundCommunityPool;
|
|
17
|
+
toData(): {
|
|
18
|
+
amount: CosmosBaseV1Beta1Coin.Coin[];
|
|
19
|
+
depositor: string;
|
|
20
|
+
'@type': string;
|
|
21
|
+
};
|
|
22
|
+
toAmino(): {
|
|
23
|
+
type: string;
|
|
24
|
+
value: {
|
|
25
|
+
amount: CosmosBaseV1Beta1Coin.Coin[];
|
|
26
|
+
depositor: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
toWeb3Gw(): {
|
|
30
|
+
amount: CosmosBaseV1Beta1Coin.Coin[];
|
|
31
|
+
depositor: string;
|
|
32
|
+
'@type': string;
|
|
33
|
+
};
|
|
34
|
+
toDirectSign(): {
|
|
35
|
+
type: string;
|
|
36
|
+
message: CosmosDistributionV1Beta1Tx.MsgFundCommunityPool;
|
|
37
|
+
};
|
|
38
|
+
toBinary(): Uint8Array;
|
|
39
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import snakecaseKeys from 'snakecase-keys';
|
|
2
|
+
import { CosmosBaseV1Beta1Coin, CosmosDistributionV1Beta1Tx, } from '@injectivelabs/core-proto-ts';
|
|
3
|
+
import { MsgBase } from '../../MsgBase.js';
|
|
4
|
+
/**
|
|
5
|
+
* @category Messages
|
|
6
|
+
*/
|
|
7
|
+
export default class MsgFundCommunityPool extends MsgBase {
|
|
8
|
+
static fromJSON(params) {
|
|
9
|
+
return new MsgFundCommunityPool(params);
|
|
10
|
+
}
|
|
11
|
+
toProto() {
|
|
12
|
+
const { params } = this;
|
|
13
|
+
const message = CosmosDistributionV1Beta1Tx.MsgFundCommunityPool.create();
|
|
14
|
+
message.depositor = params.depositor;
|
|
15
|
+
const coins = params.amount.map((amount) => {
|
|
16
|
+
const coin = CosmosBaseV1Beta1Coin.Coin.create();
|
|
17
|
+
coin.denom = amount.denom;
|
|
18
|
+
coin.amount = amount.amount;
|
|
19
|
+
return coin;
|
|
20
|
+
});
|
|
21
|
+
message.amount = coins;
|
|
22
|
+
return CosmosDistributionV1Beta1Tx.MsgFundCommunityPool.fromPartial(message);
|
|
23
|
+
}
|
|
24
|
+
toData() {
|
|
25
|
+
const proto = this.toProto();
|
|
26
|
+
return {
|
|
27
|
+
'@type': '/cosmos.distribution.v1beta1.MsgFundCommunityPool',
|
|
28
|
+
...proto,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
toAmino() {
|
|
32
|
+
const proto = this.toProto();
|
|
33
|
+
const message = {
|
|
34
|
+
...snakecaseKeys(proto),
|
|
35
|
+
};
|
|
36
|
+
return {
|
|
37
|
+
type: 'cosmos-sdk/MsgFundCommunityPool',
|
|
38
|
+
value: message,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
toWeb3Gw() {
|
|
42
|
+
const amino = this.toAmino();
|
|
43
|
+
const { value } = amino;
|
|
44
|
+
return {
|
|
45
|
+
'@type': '/cosmos.distribution.v1beta1.MsgFundCommunityPool',
|
|
46
|
+
...value,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
toDirectSign() {
|
|
50
|
+
const proto = this.toProto();
|
|
51
|
+
return {
|
|
52
|
+
type: '/cosmos.distribution.v1beta1.MsgFundCommunityPool',
|
|
53
|
+
message: proto,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
toBinary() {
|
|
57
|
+
return CosmosDistributionV1Beta1Tx.MsgFundCommunityPool.encode(this.toProto()).finish();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -15,6 +15,7 @@ import MsgCancelDerivativeOrder from './msgs/MsgCancelDerivativeOrder.js';
|
|
|
15
15
|
import MsgCreateSpotMarketOrder from './msgs/MsgCreateSpotMarketOrder.js';
|
|
16
16
|
import MsgIncreasePositionMargin from './msgs/MsgIncreasePositionMargin.js';
|
|
17
17
|
import MsgInstantSpotMarketLaunch from './msgs/MsgInstantSpotMarketLaunch.js';
|
|
18
|
+
import MsgUpdateDerivativeMarketV2 from './msgs/MsgUpdateDerivativeMarketV2.js';
|
|
18
19
|
import MsgCancelBinaryOptionsOrder from './msgs/MsgCancelBinaryOptionsOrder.js';
|
|
19
20
|
import MsgCreateDerivativeLimitOrder from './msgs/MsgCreateDerivativeLimitOrder.js';
|
|
20
21
|
import MsgBatchCancelDerivativeOrders from './msgs/MsgBatchCancelDerivativeOrders.js';
|
|
@@ -25,5 +26,5 @@ import MsgBatchCancelBinaryOptionsOrders from './msgs/MsgBatchCancelBinaryOption
|
|
|
25
26
|
import MsgCreateBinaryOptionsMarketOrder from './msgs/MsgCreateBinaryOptionsMarketOrder.js';
|
|
26
27
|
import MsgSetDelegationTransferReceivers from './msgs/MsgSetDelegationTransferReceivers.js';
|
|
27
28
|
import MsgInstantBinaryOptionsMarketLaunch from './msgs/MsgInstantBinaryOptionsMarketLaunch.js';
|
|
28
|
-
export { MsgDeposit, MsgWithdraw, MsgSignData, MsgRewardsOptOut, MsgCancelSpotOrder, MsgExternalTransfer, MsgLiquidatePosition, MsgBatchUpdateOrders, MsgUpdateSpotMarketV2, MsgReclaimLockedFunds, MsgAuthorizeStakeGrants, MsgCreateSpotLimitOrder, MsgCancelDerivativeOrder, MsgBatchCancelSpotOrders, MsgCreateSpotMarketOrder, MsgIncreasePositionMargin, MsgInstantSpotMarketLaunch, MsgCancelBinaryOptionsOrder, MsgCreateDerivativeLimitOrder, MsgCreateDerivativeMarketOrder, MsgBatchCancelDerivativeOrders, MsgCreateBinaryOptionsLimitOrder, MsgAdminUpdateBinaryOptionsMarket, MsgCreateBinaryOptionsMarketOrder, MsgBatchCancelBinaryOptionsOrders, MsgSetDelegationTransferReceivers, MsgInstantBinaryOptionsMarketLaunch, };
|
|
29
|
+
export { MsgDeposit, MsgWithdraw, MsgSignData, MsgRewardsOptOut, MsgCancelSpotOrder, MsgExternalTransfer, MsgLiquidatePosition, MsgBatchUpdateOrders, MsgUpdateSpotMarketV2, MsgReclaimLockedFunds, MsgAuthorizeStakeGrants, MsgCreateSpotLimitOrder, MsgCancelDerivativeOrder, MsgBatchCancelSpotOrders, MsgCreateSpotMarketOrder, MsgIncreasePositionMargin, MsgInstantSpotMarketLaunch, MsgCancelBinaryOptionsOrder, MsgUpdateDerivativeMarketV2, MsgCreateDerivativeLimitOrder, MsgCreateDerivativeMarketOrder, MsgBatchCancelDerivativeOrders, MsgCreateBinaryOptionsLimitOrder, MsgAdminUpdateBinaryOptionsMarket, MsgCreateBinaryOptionsMarketOrder, MsgBatchCancelBinaryOptionsOrders, MsgSetDelegationTransferReceivers, MsgInstantBinaryOptionsMarketLaunch, };
|
|
29
30
|
export * from './utils/index.js';
|
|
@@ -15,6 +15,7 @@ import MsgCancelDerivativeOrder from './msgs/MsgCancelDerivativeOrder.js';
|
|
|
15
15
|
import MsgCreateSpotMarketOrder from './msgs/MsgCreateSpotMarketOrder.js';
|
|
16
16
|
import MsgIncreasePositionMargin from './msgs/MsgIncreasePositionMargin.js';
|
|
17
17
|
import MsgInstantSpotMarketLaunch from './msgs/MsgInstantSpotMarketLaunch.js';
|
|
18
|
+
import MsgUpdateDerivativeMarketV2 from './msgs/MsgUpdateDerivativeMarketV2.js';
|
|
18
19
|
import MsgCancelBinaryOptionsOrder from './msgs/MsgCancelBinaryOptionsOrder.js';
|
|
19
20
|
import MsgCreateDerivativeLimitOrder from './msgs/MsgCreateDerivativeLimitOrder.js';
|
|
20
21
|
import MsgBatchCancelDerivativeOrders from './msgs/MsgBatchCancelDerivativeOrders.js';
|
|
@@ -25,5 +26,5 @@ import MsgBatchCancelBinaryOptionsOrders from './msgs/MsgBatchCancelBinaryOption
|
|
|
25
26
|
import MsgCreateBinaryOptionsMarketOrder from './msgs/MsgCreateBinaryOptionsMarketOrder.js';
|
|
26
27
|
import MsgSetDelegationTransferReceivers from './msgs/MsgSetDelegationTransferReceivers.js';
|
|
27
28
|
import MsgInstantBinaryOptionsMarketLaunch from './msgs/MsgInstantBinaryOptionsMarketLaunch.js';
|
|
28
|
-
export { MsgDeposit, MsgWithdraw, MsgSignData, MsgRewardsOptOut, MsgCancelSpotOrder, MsgExternalTransfer, MsgLiquidatePosition, MsgBatchUpdateOrders, MsgUpdateSpotMarketV2, MsgReclaimLockedFunds, MsgAuthorizeStakeGrants, MsgCreateSpotLimitOrder, MsgCancelDerivativeOrder, MsgBatchCancelSpotOrders, MsgCreateSpotMarketOrder, MsgIncreasePositionMargin, MsgInstantSpotMarketLaunch, MsgCancelBinaryOptionsOrder, MsgCreateDerivativeLimitOrder, MsgCreateDerivativeMarketOrder, MsgBatchCancelDerivativeOrders, MsgCreateBinaryOptionsLimitOrder, MsgAdminUpdateBinaryOptionsMarket, MsgCreateBinaryOptionsMarketOrder, MsgBatchCancelBinaryOptionsOrders, MsgSetDelegationTransferReceivers, MsgInstantBinaryOptionsMarketLaunch, };
|
|
29
|
+
export { MsgDeposit, MsgWithdraw, MsgSignData, MsgRewardsOptOut, MsgCancelSpotOrder, MsgExternalTransfer, MsgLiquidatePosition, MsgBatchUpdateOrders, MsgUpdateSpotMarketV2, MsgReclaimLockedFunds, MsgAuthorizeStakeGrants, MsgCreateSpotLimitOrder, MsgCancelDerivativeOrder, MsgBatchCancelSpotOrders, MsgCreateSpotMarketOrder, MsgIncreasePositionMargin, MsgInstantSpotMarketLaunch, MsgCancelBinaryOptionsOrder, MsgUpdateDerivativeMarketV2, MsgCreateDerivativeLimitOrder, MsgCreateDerivativeMarketOrder, MsgBatchCancelDerivativeOrders, MsgCreateBinaryOptionsLimitOrder, MsgAdminUpdateBinaryOptionsMarket, MsgCreateBinaryOptionsMarketOrder, MsgBatchCancelBinaryOptionsOrders, MsgSetDelegationTransferReceivers, MsgInstantBinaryOptionsMarketLaunch, };
|
|
29
30
|
export * from './utils/index.js';
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { InjectiveExchangeV2Tx } from '@injectivelabs/core-proto-ts';
|
|
2
|
+
import { MsgBase } from '../../MsgBase.js';
|
|
3
|
+
export declare namespace MsgUpdateDerivativeMarketV2 {
|
|
4
|
+
interface Params {
|
|
5
|
+
admin: string;
|
|
6
|
+
marketId: string;
|
|
7
|
+
newTicker?: string;
|
|
8
|
+
newMinNotional?: string;
|
|
9
|
+
newMinPriceTickSize?: string;
|
|
10
|
+
newMinQuantityTickSize?: string;
|
|
11
|
+
newInitialMarginRatio?: string;
|
|
12
|
+
newMaintenanceMarginRatio?: string;
|
|
13
|
+
newReduceMarginRatio?: string;
|
|
14
|
+
}
|
|
15
|
+
type Proto = InjectiveExchangeV2Tx.MsgUpdateDerivativeMarket;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @category Messages
|
|
19
|
+
*/
|
|
20
|
+
export default class MsgUpdateDerivativeMarketV2 extends MsgBase<MsgUpdateDerivativeMarketV2.Params, MsgUpdateDerivativeMarketV2.Proto> {
|
|
21
|
+
static fromJSON(params: MsgUpdateDerivativeMarketV2.Params): MsgUpdateDerivativeMarketV2;
|
|
22
|
+
toProto(): InjectiveExchangeV2Tx.MsgUpdateDerivativeMarket;
|
|
23
|
+
toData(): {
|
|
24
|
+
admin: string;
|
|
25
|
+
marketId: string;
|
|
26
|
+
newTicker: string;
|
|
27
|
+
newMinPriceTickSize: string;
|
|
28
|
+
newMinQuantityTickSize: string;
|
|
29
|
+
newMinNotional: string;
|
|
30
|
+
newInitialMarginRatio: string;
|
|
31
|
+
newMaintenanceMarginRatio: string;
|
|
32
|
+
newReduceMarginRatio: string;
|
|
33
|
+
'@type': string;
|
|
34
|
+
};
|
|
35
|
+
toAmino(): {
|
|
36
|
+
type: string;
|
|
37
|
+
value: {
|
|
38
|
+
admin: string;
|
|
39
|
+
market_id: string;
|
|
40
|
+
new_ticker: string;
|
|
41
|
+
new_min_price_tick_size: string;
|
|
42
|
+
new_min_quantity_tick_size: string;
|
|
43
|
+
new_min_notional: string;
|
|
44
|
+
new_initial_margin_ratio: string;
|
|
45
|
+
new_maintenance_margin_ratio: string;
|
|
46
|
+
new_reduce_margin_ratio: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
toWeb3Gw(): {
|
|
50
|
+
admin: string;
|
|
51
|
+
market_id: string;
|
|
52
|
+
new_ticker: string;
|
|
53
|
+
new_min_price_tick_size: string;
|
|
54
|
+
new_min_quantity_tick_size: string;
|
|
55
|
+
new_min_notional: string;
|
|
56
|
+
new_initial_margin_ratio: string;
|
|
57
|
+
new_maintenance_margin_ratio: string;
|
|
58
|
+
new_reduce_margin_ratio: string;
|
|
59
|
+
'@type': string;
|
|
60
|
+
};
|
|
61
|
+
toEip712(): {
|
|
62
|
+
type: string;
|
|
63
|
+
value: {
|
|
64
|
+
admin: string;
|
|
65
|
+
market_id: string;
|
|
66
|
+
new_ticker: string;
|
|
67
|
+
new_min_price_tick_size: string;
|
|
68
|
+
new_min_quantity_tick_size: string;
|
|
69
|
+
new_min_notional: string;
|
|
70
|
+
new_initial_margin_ratio: string;
|
|
71
|
+
new_maintenance_margin_ratio: string;
|
|
72
|
+
new_reduce_margin_ratio: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
toEip712V2(): {
|
|
76
|
+
new_min_price_tick_size: string;
|
|
77
|
+
new_min_quantity_tick_size: string;
|
|
78
|
+
new_min_notional: string;
|
|
79
|
+
new_initial_margin_ratio: string;
|
|
80
|
+
new_maintenance_margin_ratio: string;
|
|
81
|
+
new_reduce_margin_ratio: string;
|
|
82
|
+
admin: string;
|
|
83
|
+
market_id: string;
|
|
84
|
+
new_ticker: string;
|
|
85
|
+
'@type': string;
|
|
86
|
+
};
|
|
87
|
+
toDirectSign(): {
|
|
88
|
+
type: string;
|
|
89
|
+
message: InjectiveExchangeV2Tx.MsgUpdateDerivativeMarket;
|
|
90
|
+
};
|
|
91
|
+
toBinary(): Uint8Array;
|
|
92
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import snakecaseKeys from 'snakecase-keys';
|
|
2
|
+
import { toChainFormat } from '@injectivelabs/utils';
|
|
3
|
+
import { InjectiveExchangeV2Tx } from '@injectivelabs/core-proto-ts';
|
|
4
|
+
import { MsgBase } from '../../MsgBase.js';
|
|
5
|
+
import { numberToCosmosSdkDecString } from '../../../../utils/numbers.js';
|
|
6
|
+
const createMessage = (params) => {
|
|
7
|
+
const message = InjectiveExchangeV2Tx.MsgUpdateDerivativeMarket.create();
|
|
8
|
+
message.admin = params.admin;
|
|
9
|
+
message.marketId = params.marketId;
|
|
10
|
+
message.newTicker = params.newTicker || '';
|
|
11
|
+
message.newMinNotional = params.newMinNotional || '0';
|
|
12
|
+
message.newMinPriceTickSize = params.newMinPriceTickSize || '0';
|
|
13
|
+
message.newMinQuantityTickSize = params.newMinQuantityTickSize || '0';
|
|
14
|
+
message.newInitialMarginRatio = params.newInitialMarginRatio || '0';
|
|
15
|
+
message.newMaintenanceMarginRatio = params.newMaintenanceMarginRatio || '0';
|
|
16
|
+
message.newReduceMarginRatio = params.newReduceMarginRatio || '0';
|
|
17
|
+
return InjectiveExchangeV2Tx.MsgUpdateDerivativeMarket.fromPartial(message);
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* @category Messages
|
|
21
|
+
*/
|
|
22
|
+
export default class MsgUpdateDerivativeMarketV2 extends MsgBase {
|
|
23
|
+
static fromJSON(params) {
|
|
24
|
+
return new MsgUpdateDerivativeMarketV2(params);
|
|
25
|
+
}
|
|
26
|
+
toProto() {
|
|
27
|
+
const { params: initialParams } = this;
|
|
28
|
+
const params = {
|
|
29
|
+
...initialParams,
|
|
30
|
+
newMinNotional: toChainFormat(initialParams.newMinNotional || '0').toFixed(),
|
|
31
|
+
newMinQuantityTickSize: toChainFormat(initialParams.newMinQuantityTickSize || '0').toFixed(),
|
|
32
|
+
newMinPriceTickSize: toChainFormat(initialParams.newMinPriceTickSize || '0').toFixed(),
|
|
33
|
+
newInitialMarginRatio: toChainFormat(initialParams.newInitialMarginRatio || '0').toFixed(),
|
|
34
|
+
newMaintenanceMarginRatio: toChainFormat(initialParams.newMaintenanceMarginRatio || '0').toFixed(),
|
|
35
|
+
newReduceMarginRatio: toChainFormat(initialParams.newReduceMarginRatio || '0').toFixed(),
|
|
36
|
+
};
|
|
37
|
+
return createMessage(params);
|
|
38
|
+
}
|
|
39
|
+
toData() {
|
|
40
|
+
const proto = this.toProto();
|
|
41
|
+
return {
|
|
42
|
+
'@type': '/injective.exchange.v2.MsgUpdateDerivativeMarket',
|
|
43
|
+
...proto,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
toAmino() {
|
|
47
|
+
const { params } = this;
|
|
48
|
+
const msg = createMessage(params);
|
|
49
|
+
const message = {
|
|
50
|
+
...snakecaseKeys(msg),
|
|
51
|
+
};
|
|
52
|
+
return {
|
|
53
|
+
type: 'exchange/MsgUpdateDerivativeMarket',
|
|
54
|
+
value: message,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
toWeb3Gw() {
|
|
58
|
+
const amino = this.toAmino();
|
|
59
|
+
const { value } = amino;
|
|
60
|
+
return {
|
|
61
|
+
'@type': '/injective.exchange.v2.MsgUpdateDerivativeMarket',
|
|
62
|
+
...value,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
toEip712() {
|
|
66
|
+
const amino = this.toAmino();
|
|
67
|
+
const { type, value } = amino;
|
|
68
|
+
const messageAdjusted = {
|
|
69
|
+
...value,
|
|
70
|
+
};
|
|
71
|
+
return {
|
|
72
|
+
type,
|
|
73
|
+
value: messageAdjusted,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
toEip712V2() {
|
|
77
|
+
const { params } = this;
|
|
78
|
+
const web3gw = this.toWeb3Gw();
|
|
79
|
+
const messageAdjusted = {
|
|
80
|
+
...web3gw,
|
|
81
|
+
new_min_price_tick_size: numberToCosmosSdkDecString(params.newMinPriceTickSize || '0'),
|
|
82
|
+
new_min_quantity_tick_size: numberToCosmosSdkDecString(params.newMinQuantityTickSize || '0'),
|
|
83
|
+
new_min_notional: numberToCosmosSdkDecString(params.newMinNotional || '0'),
|
|
84
|
+
new_initial_margin_ratio: numberToCosmosSdkDecString(params.newInitialMarginRatio || '0'),
|
|
85
|
+
new_maintenance_margin_ratio: numberToCosmosSdkDecString(params.newMaintenanceMarginRatio || '0'),
|
|
86
|
+
new_reduce_margin_ratio: numberToCosmosSdkDecString(params.newReduceMarginRatio || '0'),
|
|
87
|
+
};
|
|
88
|
+
return messageAdjusted;
|
|
89
|
+
}
|
|
90
|
+
toDirectSign() {
|
|
91
|
+
const proto = this.toProto();
|
|
92
|
+
return {
|
|
93
|
+
type: '/injective.exchange.v2.MsgUpdateDerivativeMarket',
|
|
94
|
+
message: proto,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
toBinary() {
|
|
98
|
+
return InjectiveExchangeV2Tx.MsgUpdateDerivativeMarket.encode(this.toProto()).finish();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -22,7 +22,6 @@ export default class MsgUpdateSpotMarketV2 extends MsgBase {
|
|
|
22
22
|
}
|
|
23
23
|
toProto() {
|
|
24
24
|
const { params: initialParams } = this;
|
|
25
|
-
console.log({ initialParams });
|
|
26
25
|
const params = {
|
|
27
26
|
...initialParams,
|
|
28
27
|
newMinNotional: toChainFormat(initialParams.newMinNotional || '0').toFixed(),
|
|
@@ -1,72 +1,82 @@
|
|
|
1
|
-
import type MsgVote from './gov/msgs/MsgVote.js';
|
|
2
|
-
import type MsgSend from './bank/msgs/MsgSend.js';
|
|
3
1
|
import type MsgBid from './auction/msgs/MsgBid.js';
|
|
4
2
|
import type MsgGrant from './authz/msgs/MsgGrant.js';
|
|
5
3
|
import type MsgRevoke from './authz/msgs/MsgRevoke.js';
|
|
6
4
|
import type MsgAuthzExec from './authz/msgs/MsgExec.js';
|
|
7
|
-
import type
|
|
8
|
-
import type
|
|
9
|
-
import type MsgGovDeposit from './gov/msgs/MsgDeposit.js';
|
|
10
|
-
import type MsgBurn from './tokenfactory/msgs/MsgBurn.js';
|
|
11
|
-
import type MsgMint from './tokenfactory/msgs/MsgMint.js';
|
|
5
|
+
import type MsgGrantWithAuthorization from './authz/msgs/MsgGrantWithAuthorization.js';
|
|
6
|
+
import type MsgSend from './bank/msgs/MsgSend.js';
|
|
12
7
|
import type MsgMultiSend from './bank/msgs/MsgMultiSend.js';
|
|
8
|
+
import type MsgFundCommunityPool from './distribution/msgs/MsgFundCommunityPool.js';
|
|
9
|
+
import type MsgWithdrawDelegatorReward from './distribution/msgs/MsgWithdrawDelegatorReward.js';
|
|
10
|
+
import type MsgWithdrawValidatorCommission from './distribution/msgs/MsgWithdrawValidatorCommission.js';
|
|
13
11
|
import type MsgDeposit from './exchange/msgs/MsgDeposit.js';
|
|
14
|
-
import type MsgStoreCode from './wasm/msgs/MsgStoreCode.js';
|
|
15
|
-
import type MsgSendToEth from './peggy/msgs/MsgSendToEth.js';
|
|
16
|
-
import type MsgDelegate from './staking/msgs/MsgDelegate.js';
|
|
17
12
|
import type MsgSignData from './exchange/msgs/MsgSignData.js';
|
|
18
13
|
import type MsgWithdraw from './exchange/msgs/MsgWithdraw.js';
|
|
19
|
-
import type MsgUpdateAdmin from './wasm/msgs/MsgUpdateAdmin.js';
|
|
20
|
-
import type MsgUndelegate from './staking/msgs/MsgUndelegate.js';
|
|
21
|
-
import type MsgUnderwrite from './insurance/msgs/MsgUnderwrite.js';
|
|
22
|
-
import type MsgEditValidator from './staking/msgs/MsgEditValidator.js';
|
|
23
|
-
import type MsgExec from './wasm/msgs/MsgPrivilegedExecuteContract.js';
|
|
24
14
|
import type MsgRewardsOptOut from './exchange/msgs/MsgRewardsOptOut.js';
|
|
25
|
-
import type MsgChangeAdmin from './tokenfactory/msgs/MsgChangeAdmin.js';
|
|
26
|
-
import type MsgCreateDenom from './tokenfactory/msgs/MsgCreateDenom.js';
|
|
27
|
-
import type MsgExecuteContract from './wasm/msgs/MsgExecuteContract.js';
|
|
28
|
-
import type MsgMigrateContract from './wasm/msgs/MsgMigrateContract.js';
|
|
29
|
-
import type MsgGrantAllowance from './feegrant/msgs/MsgGrantAllowance.js';
|
|
30
|
-
import type MsgBeginRedelegate from './staking/msgs/MsgBeginRedelegate.js';
|
|
31
|
-
import type MsgCreateValidator from './staking/msgs/MsgCreateValidator.js';
|
|
32
15
|
import type MsgCancelSpotOrder from './exchange/msgs/MsgCancelSpotOrder.js';
|
|
33
|
-
import type MsgRevokeAllowance from './feegrant/msgs/MsgRevokeAllowance.js';
|
|
34
16
|
import type MsgExternalTransfer from './exchange/msgs/MsgExternalTransfer.js';
|
|
35
17
|
import type MsgBatchUpdateOrders from './exchange/msgs/MsgBatchUpdateOrders.js';
|
|
36
18
|
import type MsgLiquidatePosition from './exchange/msgs/MsgLiquidatePosition.js';
|
|
37
|
-
import type MsgInstantiateContract from './wasm/msgs/MsgInstantiateContract.js';
|
|
38
|
-
import type MsgTransferDelegation from './staking/msgs/MsgTransferDelegation.js';
|
|
39
|
-
import type MsgRequestRedemption from './insurance/msgs/MsgRequestRedemption.js';
|
|
40
19
|
import type MsgReclaimLockedFunds from './exchange/msgs/MsgReclaimLockedFunds.js';
|
|
41
|
-
import type MsgSetDenomMetadata from './tokenfactory/msgs/MsgSetDenomMetadata.js';
|
|
42
|
-
import type MsgUpdateSpotMarketV2 from './exchange/msgs/MsgUpdateSpotMarketV2.js';
|
|
43
|
-
import type MsgExecuteContractCompat from './wasm/msgs/MsgExecuteContractCompat.js';
|
|
44
|
-
import type MsgCreateInsuranceFund from './insurance/msgs/MsgCreateInsuranceFund.js';
|
|
45
20
|
import type MsgAuthorizeStakeGrants from './exchange/msgs/MsgAuthorizeStakeGrants.js';
|
|
46
21
|
import type MsgCreateSpotLimitOrder from './exchange/msgs/MsgCreateSpotLimitOrder.js';
|
|
47
|
-
import type MsgGrantWithAuthorization from './authz/msgs/MsgGrantWithAuthorization.js';
|
|
48
22
|
import type MsgBatchCancelSpotOrders from './exchange/msgs/MsgBatchCancelSpotOrders.js';
|
|
49
23
|
import type MsgCancelDerivativeOrder from './exchange/msgs/MsgCancelDerivativeOrder.js';
|
|
50
24
|
import type MsgCreateSpotMarketOrder from './exchange/msgs/MsgCreateSpotMarketOrder.js';
|
|
51
25
|
import type MsgIncreasePositionMargin from './exchange/msgs/MsgIncreasePositionMargin.js';
|
|
52
26
|
import type MsgInstantSpotMarketLaunch from './exchange/msgs/MsgInstantSpotMarketLaunch.js';
|
|
53
27
|
import type MsgCancelBinaryOptionsOrder from './exchange/msgs/MsgCancelBinaryOptionsOrder.js';
|
|
54
|
-
import type MsgCancelUnbondingDelegation from './staking/msgs/MsgCancelUnbondingDelegation.js';
|
|
55
|
-
import type MsgWithdrawDelegatorReward from './distribution/msgs/MsgWithdrawDelegatorReward.js';
|
|
56
28
|
import type MsgCreateDerivativeLimitOrder from './exchange/msgs/MsgCreateDerivativeLimitOrder.js';
|
|
57
29
|
import type MsgBatchCancelDerivativeOrders from './exchange/msgs/MsgBatchCancelDerivativeOrders.js';
|
|
58
30
|
import type MsgCreateDerivativeMarketOrder from './exchange/msgs/MsgCreateDerivativeMarketOrder.js';
|
|
59
|
-
import type MsgWithdrawValidatorCommission from './distribution/msgs/MsgWithdrawValidatorCommission.js';
|
|
60
31
|
import type MsgCreateBinaryOptionsLimitOrder from './exchange/msgs/MsgCreateBinaryOptionsLimitOrder.js';
|
|
61
32
|
import type MsgAdminUpdateBinaryOptionsMarket from './exchange/msgs/MsgAdminUpdateBinaryOptionsMarket.js';
|
|
62
33
|
import type MsgBatchCancelBinaryOptionsOrders from './exchange/msgs/MsgBatchCancelBinaryOptionsOrders.js';
|
|
63
34
|
import type MsgCreateBinaryOptionsMarketOrder from './exchange/msgs/MsgCreateBinaryOptionsMarketOrder.js';
|
|
64
35
|
import type MsgSetDelegationTransferReceivers from './exchange/msgs/MsgSetDelegationTransferReceivers.js';
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
36
|
+
import type MsgUpdateSpotMarketV2 from './exchange/msgs/MsgUpdateSpotMarketV2.js';
|
|
37
|
+
import type MsgUpdateDerivativeMarketV2 from './exchange/msgs/MsgUpdateDerivativeMarketV2.js';
|
|
38
|
+
import type MsgGrantAllowance from './feegrant/msgs/MsgGrantAllowance.js';
|
|
39
|
+
import type MsgRevokeAllowance from './feegrant/msgs/MsgRevokeAllowance.js';
|
|
40
|
+
import type MsgVote from './gov/msgs/MsgVote.js';
|
|
41
|
+
import type { MsgSubmitProposal } from './gov/index.js';
|
|
42
|
+
import type MsgGovDeposit from './gov/msgs/MsgDeposit.js';
|
|
43
|
+
import type MsgTransfer from './ibc/msgs/MsgTransfer.js';
|
|
44
|
+
import type MsgUnderwrite from './insurance/msgs/MsgUnderwrite.js';
|
|
45
|
+
import type MsgRequestRedemption from './insurance/msgs/MsgRequestRedemption.js';
|
|
46
|
+
import type MsgCreateInsuranceFund from './insurance/msgs/MsgCreateInsuranceFund.js';
|
|
47
|
+
import type MsgSendToEth from './peggy/msgs/MsgSendToEth.js';
|
|
48
|
+
import type MsgDelegate from './staking/msgs/MsgDelegate.js';
|
|
49
|
+
import type MsgUndelegate from './staking/msgs/MsgUndelegate.js';
|
|
50
|
+
import type MsgEditValidator from './staking/msgs/MsgEditValidator.js';
|
|
51
|
+
import type MsgBeginRedelegate from './staking/msgs/MsgBeginRedelegate.js';
|
|
52
|
+
import type MsgCreateValidator from './staking/msgs/MsgCreateValidator.js';
|
|
53
|
+
import type MsgTransferDelegation from './staking/msgs/MsgTransferDelegation.js';
|
|
54
|
+
import type MsgCancelUnbondingDelegation from './staking/msgs/MsgCancelUnbondingDelegation.js';
|
|
55
|
+
import type MsgBurn from './tokenfactory/msgs/MsgBurn.js';
|
|
56
|
+
import type MsgMint from './tokenfactory/msgs/MsgMint.js';
|
|
57
|
+
import type MsgChangeAdmin from './tokenfactory/msgs/MsgChangeAdmin.js';
|
|
58
|
+
import type MsgCreateDenom from './tokenfactory/msgs/MsgCreateDenom.js';
|
|
59
|
+
import type MsgSetDenomMetadata from './tokenfactory/msgs/MsgSetDenomMetadata.js';
|
|
60
|
+
import type MsgStoreCode from './wasm/msgs/MsgStoreCode.js';
|
|
61
|
+
import type MsgUpdateAdmin from './wasm/msgs/MsgUpdateAdmin.js';
|
|
62
|
+
import type MsgExec from './wasm/msgs/MsgPrivilegedExecuteContract.js';
|
|
63
|
+
import type MsgExecuteContract from './wasm/msgs/MsgExecuteContract.js';
|
|
64
|
+
import type MsgMigrateContract from './wasm/msgs/MsgMigrateContract.js';
|
|
65
|
+
import type MsgInstantiateContract from './wasm/msgs/MsgInstantiateContract.js';
|
|
66
|
+
import type MsgExecuteContractCompat from './wasm/msgs/MsgExecuteContractCompat.js';
|
|
67
|
+
export type AuctionMsgs = MsgBid;
|
|
68
|
+
export type AuthzMsgs = MsgGrant | MsgRevoke | MsgAuthzExec | MsgGrantWithAuthorization;
|
|
69
|
+
export type BankMsgs = MsgSend | MsgMultiSend;
|
|
70
|
+
export type DistributionMsgs = MsgFundCommunityPool | MsgWithdrawDelegatorReward | MsgWithdrawValidatorCommission;
|
|
71
|
+
export type ExchangeV1Msgs = MsgDeposit | MsgSignData | MsgWithdraw | MsgRewardsOptOut | MsgCancelSpotOrder | MsgExternalTransfer | MsgBatchUpdateOrders | MsgLiquidatePosition | MsgReclaimLockedFunds | MsgAuthorizeStakeGrants | MsgCreateSpotLimitOrder | MsgBatchCancelSpotOrders | MsgCancelDerivativeOrder | MsgCreateSpotMarketOrder | MsgIncreasePositionMargin | MsgInstantSpotMarketLaunch | MsgCancelBinaryOptionsOrder | MsgCreateDerivativeLimitOrder | MsgBatchCancelDerivativeOrders | MsgCreateDerivativeMarketOrder | MsgCreateBinaryOptionsLimitOrder | MsgAdminUpdateBinaryOptionsMarket | MsgBatchCancelBinaryOptionsOrders | MsgCreateBinaryOptionsMarketOrder | MsgSetDelegationTransferReceivers;
|
|
72
|
+
export type ExchangeV2Msgs = MsgUpdateSpotMarketV2 | MsgUpdateDerivativeMarketV2;
|
|
73
|
+
export type FeegrantMsgs = MsgGrantAllowance | MsgRevokeAllowance;
|
|
74
|
+
export type GovMsgs = MsgVote | MsgSubmitProposal | MsgGovDeposit;
|
|
75
|
+
export type IbcMsgs = MsgTransfer;
|
|
76
|
+
export type InsuranceMsgs = MsgUnderwrite | MsgRequestRedemption | MsgCreateInsuranceFund;
|
|
77
|
+
export type PeggyMsgs = MsgSendToEth;
|
|
78
|
+
export type StakingMsgs = MsgDelegate | MsgUndelegate | MsgEditValidator | MsgBeginRedelegate | MsgCreateValidator | MsgTransferDelegation | MsgCancelUnbondingDelegation;
|
|
79
|
+
export type TokenFactoryMsgs = MsgBurn | MsgMint | MsgChangeAdmin | MsgCreateDenom | MsgSetDenomMetadata;
|
|
80
|
+
export type WasmMsgs = MsgStoreCode | MsgUpdateAdmin | MsgExec | MsgExecuteContract | MsgMigrateContract | MsgInstantiateContract | MsgExecuteContractCompat;
|
|
81
|
+
export type Msgs = AuctionMsgs | AuthzMsgs | BankMsgs | DistributionMsgs | ExchangeV1Msgs | ExchangeV2Msgs | FeegrantMsgs | GovMsgs | IbcMsgs | InsuranceMsgs | PeggyMsgs | StakingMsgs | TokenFactoryMsgs | WasmMsgs;
|
|
82
|
+
export type ExchangeMsgs = ExchangeV1Msgs | ExchangeV2Msgs;
|
|
@@ -367,6 +367,8 @@ export const protoTypeToAminoType = (type) => {
|
|
|
367
367
|
return 'exchange/MsgTransferAndExecute';
|
|
368
368
|
case 'injective.exchange.v2.MsgUpdateSpotMarket':
|
|
369
369
|
return 'exchange/MsgUpdateSpotMarket';
|
|
370
|
+
case 'injective.exchange.v2.MsgUpdateDerivativeMarket':
|
|
371
|
+
return 'exchange/MsgUpdateDerivativeMarket';
|
|
370
372
|
case 'injective.exchange.v1beta1.CreateSpotLimitOrderAuthz':
|
|
371
373
|
return 'exchange/CreateSpotLimitOrderAuthz';
|
|
372
374
|
case 'injective.exchange.v1beta1.CreateSpotMarketOrderAuthz':
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@injectivelabs/sdk-ts",
|
|
3
3
|
"description": "SDK in TypeScript for building Injective applications in a browser, node, and react native environment.",
|
|
4
|
-
"version": "1.16.
|
|
4
|
+
"version": "1.16.15",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"author": {
|
|
@@ -124,16 +124,16 @@
|
|
|
124
124
|
"@cosmjs/stargate": "^0.33.0",
|
|
125
125
|
"@injectivelabs/abacus-proto-ts": "1.14.0",
|
|
126
126
|
"@injectivelabs/core-proto-ts": "1.16.6",
|
|
127
|
-
"@injectivelabs/exceptions": "1.16.
|
|
127
|
+
"@injectivelabs/exceptions": "1.16.15",
|
|
128
128
|
"@injectivelabs/grpc-web": "^0.0.1",
|
|
129
129
|
"@injectivelabs/grpc-web-node-http-transport": "^0.0.2",
|
|
130
130
|
"@injectivelabs/grpc-web-react-native-transport": "^0.0.2",
|
|
131
131
|
"@injectivelabs/indexer-proto-ts": "1.13.18",
|
|
132
132
|
"@injectivelabs/mito-proto-ts": "1.13.2",
|
|
133
|
-
"@injectivelabs/networks": "1.16.
|
|
133
|
+
"@injectivelabs/networks": "1.16.15",
|
|
134
134
|
"@injectivelabs/olp-proto-ts": "1.13.4",
|
|
135
|
-
"@injectivelabs/ts-types": "1.16.
|
|
136
|
-
"@injectivelabs/utils": "1.16.
|
|
135
|
+
"@injectivelabs/ts-types": "1.16.15",
|
|
136
|
+
"@injectivelabs/utils": "1.16.15",
|
|
137
137
|
"@noble/curves": "^1.8.1",
|
|
138
138
|
"@noble/hashes": "^1.7.1",
|
|
139
139
|
"@scure/base": "^1.2.6",
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
"snakecase-keys": "^5.4.1",
|
|
152
152
|
"viem": "^2.33.2"
|
|
153
153
|
},
|
|
154
|
-
"gitHead": "
|
|
154
|
+
"gitHead": "ba6c0769c68fcd87f7a4512ab9a45e6e95e234df",
|
|
155
155
|
"typedoc": {
|
|
156
156
|
"entryPoint": "./src/index.ts",
|
|
157
157
|
"readmeFile": "./README.md",
|