@injectivelabs/sdk-ts 1.16.13 → 1.16.14
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/exchange/index.d.ts +2 -1
- package/dist/cjs/core/modules/exchange/index.js +3 -1
- package/dist/cjs/core/modules/exchange/msgs/MsgUpdateSpotMarketV2.d.ts +74 -0
- package/dist/cjs/core/modules/exchange/msgs/MsgUpdateSpotMarketV2.js +98 -0
- package/dist/cjs/core/modules/msgs.d.ts +3 -2
- package/dist/cjs/core/tx/api/TxGrpcApi.js +4 -1
- package/dist/cjs/core/tx/eip712/maps.js +2 -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/MsgUpdateSpotMarketV2.d.ts +74 -0
- package/dist/esm/core/modules/exchange/msgs/MsgUpdateSpotMarketV2.js +92 -0
- package/dist/esm/core/modules/msgs.d.ts +3 -2
- package/dist/esm/core/tx/api/TxGrpcApi.js +4 -1
- package/dist/esm/core/tx/eip712/maps.js +2 -0
- package/package.json +6 -6
|
@@ -7,6 +7,7 @@ import MsgExternalTransfer from './msgs/MsgExternalTransfer.js';
|
|
|
7
7
|
import MsgBatchUpdateOrders from './msgs/MsgBatchUpdateOrders.js';
|
|
8
8
|
import MsgLiquidatePosition from './msgs/MsgLiquidatePosition.js';
|
|
9
9
|
import MsgReclaimLockedFunds from './msgs/MsgReclaimLockedFunds.js';
|
|
10
|
+
import MsgUpdateSpotMarketV2 from './msgs/MsgUpdateSpotMarketV2.js';
|
|
10
11
|
import MsgCreateSpotLimitOrder from './msgs/MsgCreateSpotLimitOrder.js';
|
|
11
12
|
import MsgAuthorizeStakeGrants from './msgs/MsgAuthorizeStakeGrants.js';
|
|
12
13
|
import MsgBatchCancelSpotOrders from './msgs/MsgBatchCancelSpotOrders.js';
|
|
@@ -24,5 +25,5 @@ import MsgBatchCancelBinaryOptionsOrders from './msgs/MsgBatchCancelBinaryOption
|
|
|
24
25
|
import MsgCreateBinaryOptionsMarketOrder from './msgs/MsgCreateBinaryOptionsMarketOrder.js';
|
|
25
26
|
import MsgSetDelegationTransferReceivers from './msgs/MsgSetDelegationTransferReceivers.js';
|
|
26
27
|
import MsgInstantBinaryOptionsMarketLaunch from './msgs/MsgInstantBinaryOptionsMarketLaunch.js';
|
|
27
|
-
export { MsgDeposit, MsgWithdraw, MsgSignData, MsgRewardsOptOut, MsgCancelSpotOrder, MsgExternalTransfer, MsgLiquidatePosition, MsgBatchUpdateOrders, MsgReclaimLockedFunds, MsgAuthorizeStakeGrants, MsgCreateSpotLimitOrder, MsgCancelDerivativeOrder, MsgBatchCancelSpotOrders, MsgCreateSpotMarketOrder, MsgIncreasePositionMargin, MsgInstantSpotMarketLaunch, MsgCancelBinaryOptionsOrder, MsgCreateDerivativeLimitOrder, MsgCreateDerivativeMarketOrder, MsgBatchCancelDerivativeOrders, MsgCreateBinaryOptionsLimitOrder, MsgAdminUpdateBinaryOptionsMarket, MsgCreateBinaryOptionsMarketOrder, MsgBatchCancelBinaryOptionsOrders, MsgSetDelegationTransferReceivers, MsgInstantBinaryOptionsMarketLaunch, };
|
|
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, };
|
|
28
29
|
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.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.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"));
|
|
@@ -36,6 +36,8 @@ const MsgLiquidatePosition_js_1 = __importDefault(require("./msgs/MsgLiquidatePo
|
|
|
36
36
|
exports.MsgLiquidatePosition = MsgLiquidatePosition_js_1.default;
|
|
37
37
|
const MsgReclaimLockedFunds_js_1 = __importDefault(require("./msgs/MsgReclaimLockedFunds.js"));
|
|
38
38
|
exports.MsgReclaimLockedFunds = MsgReclaimLockedFunds_js_1.default;
|
|
39
|
+
const MsgUpdateSpotMarketV2_js_1 = __importDefault(require("./msgs/MsgUpdateSpotMarketV2.js"));
|
|
40
|
+
exports.MsgUpdateSpotMarketV2 = MsgUpdateSpotMarketV2_js_1.default;
|
|
39
41
|
const MsgCreateSpotLimitOrder_js_1 = __importDefault(require("./msgs/MsgCreateSpotLimitOrder.js"));
|
|
40
42
|
exports.MsgCreateSpotLimitOrder = MsgCreateSpotLimitOrder_js_1.default;
|
|
41
43
|
const MsgAuthorizeStakeGrants_js_1 = __importDefault(require("./msgs/MsgAuthorizeStakeGrants.js"));
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { InjectiveExchangeV2Tx } from '@injectivelabs/core-proto-ts';
|
|
2
|
+
import { MsgBase } from '../../MsgBase.js';
|
|
3
|
+
export declare namespace MsgUpdateSpotMarketV2 {
|
|
4
|
+
interface Params {
|
|
5
|
+
admin: string;
|
|
6
|
+
marketId: string;
|
|
7
|
+
newTicker?: string;
|
|
8
|
+
newMinNotional?: string;
|
|
9
|
+
newMinPriceTickSize?: string;
|
|
10
|
+
newMinQuantityTickSize?: string;
|
|
11
|
+
}
|
|
12
|
+
type Proto = InjectiveExchangeV2Tx.MsgUpdateSpotMarket;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @category Messages
|
|
16
|
+
*/
|
|
17
|
+
export default class MsgUpdateSpotMarketV2 extends MsgBase<MsgUpdateSpotMarketV2.Params, MsgUpdateSpotMarketV2.Proto> {
|
|
18
|
+
static fromJSON(params: MsgUpdateSpotMarketV2.Params): MsgUpdateSpotMarketV2;
|
|
19
|
+
toProto(): InjectiveExchangeV2Tx.MsgUpdateSpotMarket;
|
|
20
|
+
toData(): {
|
|
21
|
+
admin: string;
|
|
22
|
+
marketId: string;
|
|
23
|
+
newTicker: string;
|
|
24
|
+
newMinPriceTickSize: string;
|
|
25
|
+
newMinQuantityTickSize: string;
|
|
26
|
+
newMinNotional: string;
|
|
27
|
+
'@type': string;
|
|
28
|
+
};
|
|
29
|
+
toAmino(): {
|
|
30
|
+
type: string;
|
|
31
|
+
value: {
|
|
32
|
+
admin: string;
|
|
33
|
+
market_id: string;
|
|
34
|
+
new_ticker: string;
|
|
35
|
+
new_min_price_tick_size: string;
|
|
36
|
+
new_min_quantity_tick_size: string;
|
|
37
|
+
new_min_notional: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
toWeb3Gw(): {
|
|
41
|
+
admin: string;
|
|
42
|
+
market_id: string;
|
|
43
|
+
new_ticker: string;
|
|
44
|
+
new_min_price_tick_size: string;
|
|
45
|
+
new_min_quantity_tick_size: string;
|
|
46
|
+
new_min_notional: string;
|
|
47
|
+
'@type': string;
|
|
48
|
+
};
|
|
49
|
+
toEip712(): {
|
|
50
|
+
type: string;
|
|
51
|
+
value: {
|
|
52
|
+
admin: string;
|
|
53
|
+
market_id: string;
|
|
54
|
+
new_ticker: string;
|
|
55
|
+
new_min_price_tick_size: string;
|
|
56
|
+
new_min_quantity_tick_size: string;
|
|
57
|
+
new_min_notional: string;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
toEip712V2(): {
|
|
61
|
+
new_min_price_tick_size: string;
|
|
62
|
+
new_min_quantity_tick_size: string;
|
|
63
|
+
new_min_notional: string;
|
|
64
|
+
admin: string;
|
|
65
|
+
market_id: string;
|
|
66
|
+
new_ticker: string;
|
|
67
|
+
'@type': string;
|
|
68
|
+
};
|
|
69
|
+
toDirectSign(): {
|
|
70
|
+
type: string;
|
|
71
|
+
message: InjectiveExchangeV2Tx.MsgUpdateSpotMarket;
|
|
72
|
+
};
|
|
73
|
+
toBinary(): Uint8Array;
|
|
74
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
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.MsgUpdateSpotMarket.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
|
+
return core_proto_ts_1.InjectiveExchangeV2Tx.MsgUpdateSpotMarket.fromPartial(message);
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* @category Messages
|
|
23
|
+
*/
|
|
24
|
+
class MsgUpdateSpotMarketV2 extends MsgBase_js_1.MsgBase {
|
|
25
|
+
static fromJSON(params) {
|
|
26
|
+
return new MsgUpdateSpotMarketV2(params);
|
|
27
|
+
}
|
|
28
|
+
toProto() {
|
|
29
|
+
const { params: initialParams } = this;
|
|
30
|
+
console.log({ initialParams });
|
|
31
|
+
const params = {
|
|
32
|
+
...initialParams,
|
|
33
|
+
newMinNotional: (0, utils_1.toChainFormat)(initialParams.newMinNotional || '0').toFixed(),
|
|
34
|
+
newMinQuantityTickSize: (0, utils_1.toChainFormat)(initialParams.newMinQuantityTickSize || '0').toFixed(),
|
|
35
|
+
newMinPriceTickSize: (0, utils_1.toChainFormat)(initialParams.newMinPriceTickSize || '0').toFixed(),
|
|
36
|
+
};
|
|
37
|
+
return createMessage(params);
|
|
38
|
+
}
|
|
39
|
+
toData() {
|
|
40
|
+
const proto = this.toProto();
|
|
41
|
+
return {
|
|
42
|
+
'@type': '/injective.exchange.v2.MsgUpdateSpotMarket',
|
|
43
|
+
...proto,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
toAmino() {
|
|
47
|
+
const { params } = this;
|
|
48
|
+
const msg = createMessage(params);
|
|
49
|
+
const message = {
|
|
50
|
+
...(0, snakecase_keys_1.default)(msg),
|
|
51
|
+
};
|
|
52
|
+
return {
|
|
53
|
+
type: 'exchange/MsgUpdateSpotMarket',
|
|
54
|
+
value: message,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
toWeb3Gw() {
|
|
58
|
+
const amino = this.toAmino();
|
|
59
|
+
const { value } = amino;
|
|
60
|
+
return {
|
|
61
|
+
'@type': '/injective.exchange.v2.MsgUpdateSpotMarket',
|
|
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: (0, numbers_js_1.numberToCosmosSdkDecString)(params.newMinPriceTickSize || '0'),
|
|
82
|
+
new_min_quantity_tick_size: (0, numbers_js_1.numberToCosmosSdkDecString)(params.newMinQuantityTickSize || '0'),
|
|
83
|
+
new_min_notional: (0, numbers_js_1.numberToCosmosSdkDecString)(params.newMinNotional || '0'),
|
|
84
|
+
};
|
|
85
|
+
return messageAdjusted;
|
|
86
|
+
}
|
|
87
|
+
toDirectSign() {
|
|
88
|
+
const proto = this.toProto();
|
|
89
|
+
return {
|
|
90
|
+
type: '/injective.exchange.v2.MsgUpdateSpotMarket',
|
|
91
|
+
message: proto,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
toBinary() {
|
|
95
|
+
return core_proto_ts_1.InjectiveExchangeV2Tx.MsgUpdateSpotMarket.encode(this.toProto()).finish();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
exports.default = MsgUpdateSpotMarketV2;
|
|
@@ -39,6 +39,7 @@ import type MsgTransferDelegation from './staking/msgs/MsgTransferDelegation.js'
|
|
|
39
39
|
import type MsgRequestRedemption from './insurance/msgs/MsgRequestRedemption.js';
|
|
40
40
|
import type MsgReclaimLockedFunds from './exchange/msgs/MsgReclaimLockedFunds.js';
|
|
41
41
|
import type MsgSetDenomMetadata from './tokenfactory/msgs/MsgSetDenomMetadata.js';
|
|
42
|
+
import type MsgUpdateSpotMarketV2 from './exchange/msgs/MsgUpdateSpotMarketV2.js';
|
|
42
43
|
import type MsgExecuteContractCompat from './wasm/msgs/MsgExecuteContractCompat.js';
|
|
43
44
|
import type MsgCreateInsuranceFund from './insurance/msgs/MsgCreateInsuranceFund.js';
|
|
44
45
|
import type MsgAuthorizeStakeGrants from './exchange/msgs/MsgAuthorizeStakeGrants.js';
|
|
@@ -64,8 +65,8 @@ import type MsgSetDelegationTransferReceivers from './exchange/msgs/MsgSetDelega
|
|
|
64
65
|
/**
|
|
65
66
|
* @category Messages
|
|
66
67
|
*/
|
|
67
|
-
export type Msgs = MsgBid | MsgRevoke | MsgGrant | MsgAuthzExec | MsgSend | MsgMultiSend | MsgBatchUpdateOrders | MsgWithdrawDelegatorReward | MsgBatchCancelDerivativeOrders | MsgBatchCancelSpotOrders | MsgCancelDerivativeOrder | MsgCancelSpotOrder | MsgCreateDerivativeLimitOrder | MsgCreateDerivativeMarketOrder | MsgCreateSpotLimitOrder | MsgCreateSpotMarketOrder | MsgDeposit | MsgIncreasePositionMargin | MsgInstantSpotMarketLaunch | MsgWithdraw | MsgGovDeposit | MsgSubmitProposal | MsgVote | MsgTransfer | MsgCreateInsuranceFund | MsgRequestRedemption | MsgUnderwrite | MsgSendToEth | MsgDelegate | MsgUndelegate | MsgBeginRedelegate | MsgTransferDelegation | MsgSetDelegationTransferReceivers | MsgCancelUnbondingDelegation | MsgExecuteContract | MsgExecuteContractCompat | MsgMigrateContract | MsgUpdateAdmin | MsgExec | MsgInstantiateContract | MsgCreateBinaryOptionsLimitOrder | MsgCreateBinaryOptionsMarketOrder | MsgCancelBinaryOptionsOrder | MsgBatchCancelBinaryOptionsOrders | MsgWithdrawValidatorCommission | MsgEditValidator | MsgReclaimLockedFunds | MsgExternalTransfer | MsgStoreCode | MsgRewardsOptOut | MsgCreateValidator | MsgMint | MsgBurn | MsgChangeAdmin | MsgCreateDenom | MsgSetDenomMetadata | MsgGrantAllowance | MsgRevokeAllowance | MsgAdminUpdateBinaryOptionsMarket | MsgLiquidatePosition | MsgSignData | MsgGrantWithAuthorization | MsgAuthorizeStakeGrants;
|
|
68
|
+
export type Msgs = MsgBid | MsgRevoke | MsgGrant | MsgAuthzExec | MsgSend | MsgMultiSend | MsgBatchUpdateOrders | MsgWithdrawDelegatorReward | MsgBatchCancelDerivativeOrders | MsgBatchCancelSpotOrders | MsgCancelDerivativeOrder | MsgCancelSpotOrder | MsgCreateDerivativeLimitOrder | MsgCreateDerivativeMarketOrder | MsgCreateSpotLimitOrder | MsgCreateSpotMarketOrder | MsgDeposit | MsgIncreasePositionMargin | MsgInstantSpotMarketLaunch | MsgWithdraw | MsgGovDeposit | MsgSubmitProposal | MsgVote | MsgTransfer | MsgCreateInsuranceFund | MsgRequestRedemption | MsgUnderwrite | MsgSendToEth | MsgDelegate | MsgUndelegate | MsgBeginRedelegate | MsgTransferDelegation | MsgSetDelegationTransferReceivers | MsgCancelUnbondingDelegation | MsgExecuteContract | MsgExecuteContractCompat | MsgMigrateContract | MsgUpdateAdmin | MsgExec | MsgInstantiateContract | MsgCreateBinaryOptionsLimitOrder | MsgCreateBinaryOptionsMarketOrder | MsgCancelBinaryOptionsOrder | MsgBatchCancelBinaryOptionsOrders | MsgWithdrawValidatorCommission | MsgEditValidator | MsgReclaimLockedFunds | MsgExternalTransfer | MsgStoreCode | MsgRewardsOptOut | MsgCreateValidator | MsgMint | MsgBurn | MsgChangeAdmin | MsgCreateDenom | MsgSetDenomMetadata | MsgGrantAllowance | MsgRevokeAllowance | MsgAdminUpdateBinaryOptionsMarket | MsgLiquidatePosition | MsgSignData | MsgGrantWithAuthorization | MsgAuthorizeStakeGrants | MsgUpdateSpotMarketV2;
|
|
68
69
|
/**
|
|
69
70
|
* @category Messages
|
|
70
71
|
*/
|
|
71
|
-
export type ExchangeMsgs = MsgBatchCancelDerivativeOrders | MsgBatchCancelSpotOrders | MsgCancelDerivativeOrder | MsgCancelSpotOrder | MsgCreateDerivativeLimitOrder | MsgCreateDerivativeMarketOrder | MsgCreateSpotLimitOrder | MsgCreateSpotMarketOrder | MsgDeposit | MsgIncreasePositionMargin | MsgInstantSpotMarketLaunch | MsgWithdraw | MsgExec | MsgBatchUpdateOrders | MsgCreateBinaryOptionsLimitOrder | MsgCreateBinaryOptionsMarketOrder | MsgCancelBinaryOptionsOrder | MsgBatchCancelBinaryOptionsOrders | MsgReclaimLockedFunds | MsgExternalTransfer | MsgStoreCode | MsgSignData | MsgRewardsOptOut | MsgLiquidatePosition | MsgAuthorizeStakeGrants | MsgAdminUpdateBinaryOptionsMarket | MsgSetDelegationTransferReceivers;
|
|
72
|
+
export type ExchangeMsgs = MsgBatchCancelDerivativeOrders | MsgBatchCancelSpotOrders | MsgCancelDerivativeOrder | MsgCancelSpotOrder | MsgCreateDerivativeLimitOrder | MsgCreateDerivativeMarketOrder | MsgCreateSpotLimitOrder | MsgCreateSpotMarketOrder | MsgDeposit | MsgIncreasePositionMargin | MsgInstantSpotMarketLaunch | MsgWithdraw | MsgExec | MsgBatchUpdateOrders | MsgCreateBinaryOptionsLimitOrder | MsgCreateBinaryOptionsMarketOrder | MsgCancelBinaryOptionsOrder | MsgBatchCancelBinaryOptionsOrders | MsgReclaimLockedFunds | MsgExternalTransfer | MsgStoreCode | MsgSignData | MsgRewardsOptOut | MsgLiquidatePosition | MsgAuthorizeStakeGrants | MsgAdminUpdateBinaryOptionsMarket | MsgSetDelegationTransferReceivers | MsgUpdateSpotMarketV2;
|
|
@@ -123,7 +123,10 @@ class TxGrpcApi {
|
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
125
|
catch (e) {
|
|
126
|
-
throw new exceptions_1.TransactionException(
|
|
126
|
+
throw new exceptions_1.TransactionException(e, {
|
|
127
|
+
context: 'TxGrpcApi.simulate',
|
|
128
|
+
skipParsing: true,
|
|
129
|
+
});
|
|
127
130
|
}
|
|
128
131
|
}
|
|
129
132
|
async broadcast(txRaw, options) {
|
|
@@ -375,6 +375,8 @@ const protoTypeToAminoType = (type) => {
|
|
|
375
375
|
return 'exchange/BinaryOptionsMarketLaunchProposal';
|
|
376
376
|
case 'injective.exchange.v1beta1.MsgTransferAndExecute':
|
|
377
377
|
return 'exchange/MsgTransferAndExecute';
|
|
378
|
+
case 'injective.exchange.v2.MsgUpdateSpotMarket':
|
|
379
|
+
return 'exchange/MsgUpdateSpotMarket';
|
|
378
380
|
case 'injective.exchange.v1beta1.CreateSpotLimitOrderAuthz':
|
|
379
381
|
return 'exchange/CreateSpotLimitOrderAuthz';
|
|
380
382
|
case 'injective.exchange.v1beta1.CreateSpotMarketOrderAuthz':
|
|
@@ -7,6 +7,7 @@ import MsgExternalTransfer from './msgs/MsgExternalTransfer.js';
|
|
|
7
7
|
import MsgBatchUpdateOrders from './msgs/MsgBatchUpdateOrders.js';
|
|
8
8
|
import MsgLiquidatePosition from './msgs/MsgLiquidatePosition.js';
|
|
9
9
|
import MsgReclaimLockedFunds from './msgs/MsgReclaimLockedFunds.js';
|
|
10
|
+
import MsgUpdateSpotMarketV2 from './msgs/MsgUpdateSpotMarketV2.js';
|
|
10
11
|
import MsgCreateSpotLimitOrder from './msgs/MsgCreateSpotLimitOrder.js';
|
|
11
12
|
import MsgAuthorizeStakeGrants from './msgs/MsgAuthorizeStakeGrants.js';
|
|
12
13
|
import MsgBatchCancelSpotOrders from './msgs/MsgBatchCancelSpotOrders.js';
|
|
@@ -24,5 +25,5 @@ import MsgBatchCancelBinaryOptionsOrders from './msgs/MsgBatchCancelBinaryOption
|
|
|
24
25
|
import MsgCreateBinaryOptionsMarketOrder from './msgs/MsgCreateBinaryOptionsMarketOrder.js';
|
|
25
26
|
import MsgSetDelegationTransferReceivers from './msgs/MsgSetDelegationTransferReceivers.js';
|
|
26
27
|
import MsgInstantBinaryOptionsMarketLaunch from './msgs/MsgInstantBinaryOptionsMarketLaunch.js';
|
|
27
|
-
export { MsgDeposit, MsgWithdraw, MsgSignData, MsgRewardsOptOut, MsgCancelSpotOrder, MsgExternalTransfer, MsgLiquidatePosition, MsgBatchUpdateOrders, MsgReclaimLockedFunds, MsgAuthorizeStakeGrants, MsgCreateSpotLimitOrder, MsgCancelDerivativeOrder, MsgBatchCancelSpotOrders, MsgCreateSpotMarketOrder, MsgIncreasePositionMargin, MsgInstantSpotMarketLaunch, MsgCancelBinaryOptionsOrder, MsgCreateDerivativeLimitOrder, MsgCreateDerivativeMarketOrder, MsgBatchCancelDerivativeOrders, MsgCreateBinaryOptionsLimitOrder, MsgAdminUpdateBinaryOptionsMarket, MsgCreateBinaryOptionsMarketOrder, MsgBatchCancelBinaryOptionsOrders, MsgSetDelegationTransferReceivers, MsgInstantBinaryOptionsMarketLaunch, };
|
|
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, };
|
|
28
29
|
export * from './utils/index.js';
|
|
@@ -7,6 +7,7 @@ import MsgExternalTransfer from './msgs/MsgExternalTransfer.js';
|
|
|
7
7
|
import MsgBatchUpdateOrders from './msgs/MsgBatchUpdateOrders.js';
|
|
8
8
|
import MsgLiquidatePosition from './msgs/MsgLiquidatePosition.js';
|
|
9
9
|
import MsgReclaimLockedFunds from './msgs/MsgReclaimLockedFunds.js';
|
|
10
|
+
import MsgUpdateSpotMarketV2 from './msgs/MsgUpdateSpotMarketV2.js';
|
|
10
11
|
import MsgCreateSpotLimitOrder from './msgs/MsgCreateSpotLimitOrder.js';
|
|
11
12
|
import MsgAuthorizeStakeGrants from './msgs/MsgAuthorizeStakeGrants.js';
|
|
12
13
|
import MsgBatchCancelSpotOrders from './msgs/MsgBatchCancelSpotOrders.js';
|
|
@@ -24,5 +25,5 @@ import MsgBatchCancelBinaryOptionsOrders from './msgs/MsgBatchCancelBinaryOption
|
|
|
24
25
|
import MsgCreateBinaryOptionsMarketOrder from './msgs/MsgCreateBinaryOptionsMarketOrder.js';
|
|
25
26
|
import MsgSetDelegationTransferReceivers from './msgs/MsgSetDelegationTransferReceivers.js';
|
|
26
27
|
import MsgInstantBinaryOptionsMarketLaunch from './msgs/MsgInstantBinaryOptionsMarketLaunch.js';
|
|
27
|
-
export { MsgDeposit, MsgWithdraw, MsgSignData, MsgRewardsOptOut, MsgCancelSpotOrder, MsgExternalTransfer, MsgLiquidatePosition, MsgBatchUpdateOrders, MsgReclaimLockedFunds, MsgAuthorizeStakeGrants, MsgCreateSpotLimitOrder, MsgCancelDerivativeOrder, MsgBatchCancelSpotOrders, MsgCreateSpotMarketOrder, MsgIncreasePositionMargin, MsgInstantSpotMarketLaunch, MsgCancelBinaryOptionsOrder, MsgCreateDerivativeLimitOrder, MsgCreateDerivativeMarketOrder, MsgBatchCancelDerivativeOrders, MsgCreateBinaryOptionsLimitOrder, MsgAdminUpdateBinaryOptionsMarket, MsgCreateBinaryOptionsMarketOrder, MsgBatchCancelBinaryOptionsOrders, MsgSetDelegationTransferReceivers, MsgInstantBinaryOptionsMarketLaunch, };
|
|
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, };
|
|
28
29
|
export * from './utils/index.js';
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { InjectiveExchangeV2Tx } from '@injectivelabs/core-proto-ts';
|
|
2
|
+
import { MsgBase } from '../../MsgBase.js';
|
|
3
|
+
export declare namespace MsgUpdateSpotMarketV2 {
|
|
4
|
+
interface Params {
|
|
5
|
+
admin: string;
|
|
6
|
+
marketId: string;
|
|
7
|
+
newTicker?: string;
|
|
8
|
+
newMinNotional?: string;
|
|
9
|
+
newMinPriceTickSize?: string;
|
|
10
|
+
newMinQuantityTickSize?: string;
|
|
11
|
+
}
|
|
12
|
+
type Proto = InjectiveExchangeV2Tx.MsgUpdateSpotMarket;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @category Messages
|
|
16
|
+
*/
|
|
17
|
+
export default class MsgUpdateSpotMarketV2 extends MsgBase<MsgUpdateSpotMarketV2.Params, MsgUpdateSpotMarketV2.Proto> {
|
|
18
|
+
static fromJSON(params: MsgUpdateSpotMarketV2.Params): MsgUpdateSpotMarketV2;
|
|
19
|
+
toProto(): InjectiveExchangeV2Tx.MsgUpdateSpotMarket;
|
|
20
|
+
toData(): {
|
|
21
|
+
admin: string;
|
|
22
|
+
marketId: string;
|
|
23
|
+
newTicker: string;
|
|
24
|
+
newMinPriceTickSize: string;
|
|
25
|
+
newMinQuantityTickSize: string;
|
|
26
|
+
newMinNotional: string;
|
|
27
|
+
'@type': string;
|
|
28
|
+
};
|
|
29
|
+
toAmino(): {
|
|
30
|
+
type: string;
|
|
31
|
+
value: {
|
|
32
|
+
admin: string;
|
|
33
|
+
market_id: string;
|
|
34
|
+
new_ticker: string;
|
|
35
|
+
new_min_price_tick_size: string;
|
|
36
|
+
new_min_quantity_tick_size: string;
|
|
37
|
+
new_min_notional: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
toWeb3Gw(): {
|
|
41
|
+
admin: string;
|
|
42
|
+
market_id: string;
|
|
43
|
+
new_ticker: string;
|
|
44
|
+
new_min_price_tick_size: string;
|
|
45
|
+
new_min_quantity_tick_size: string;
|
|
46
|
+
new_min_notional: string;
|
|
47
|
+
'@type': string;
|
|
48
|
+
};
|
|
49
|
+
toEip712(): {
|
|
50
|
+
type: string;
|
|
51
|
+
value: {
|
|
52
|
+
admin: string;
|
|
53
|
+
market_id: string;
|
|
54
|
+
new_ticker: string;
|
|
55
|
+
new_min_price_tick_size: string;
|
|
56
|
+
new_min_quantity_tick_size: string;
|
|
57
|
+
new_min_notional: string;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
toEip712V2(): {
|
|
61
|
+
new_min_price_tick_size: string;
|
|
62
|
+
new_min_quantity_tick_size: string;
|
|
63
|
+
new_min_notional: string;
|
|
64
|
+
admin: string;
|
|
65
|
+
market_id: string;
|
|
66
|
+
new_ticker: string;
|
|
67
|
+
'@type': string;
|
|
68
|
+
};
|
|
69
|
+
toDirectSign(): {
|
|
70
|
+
type: string;
|
|
71
|
+
message: InjectiveExchangeV2Tx.MsgUpdateSpotMarket;
|
|
72
|
+
};
|
|
73
|
+
toBinary(): Uint8Array;
|
|
74
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
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.MsgUpdateSpotMarket.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
|
+
return InjectiveExchangeV2Tx.MsgUpdateSpotMarket.fromPartial(message);
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* @category Messages
|
|
18
|
+
*/
|
|
19
|
+
export default class MsgUpdateSpotMarketV2 extends MsgBase {
|
|
20
|
+
static fromJSON(params) {
|
|
21
|
+
return new MsgUpdateSpotMarketV2(params);
|
|
22
|
+
}
|
|
23
|
+
toProto() {
|
|
24
|
+
const { params: initialParams } = this;
|
|
25
|
+
console.log({ initialParams });
|
|
26
|
+
const params = {
|
|
27
|
+
...initialParams,
|
|
28
|
+
newMinNotional: toChainFormat(initialParams.newMinNotional || '0').toFixed(),
|
|
29
|
+
newMinQuantityTickSize: toChainFormat(initialParams.newMinQuantityTickSize || '0').toFixed(),
|
|
30
|
+
newMinPriceTickSize: toChainFormat(initialParams.newMinPriceTickSize || '0').toFixed(),
|
|
31
|
+
};
|
|
32
|
+
return createMessage(params);
|
|
33
|
+
}
|
|
34
|
+
toData() {
|
|
35
|
+
const proto = this.toProto();
|
|
36
|
+
return {
|
|
37
|
+
'@type': '/injective.exchange.v2.MsgUpdateSpotMarket',
|
|
38
|
+
...proto,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
toAmino() {
|
|
42
|
+
const { params } = this;
|
|
43
|
+
const msg = createMessage(params);
|
|
44
|
+
const message = {
|
|
45
|
+
...snakecaseKeys(msg),
|
|
46
|
+
};
|
|
47
|
+
return {
|
|
48
|
+
type: 'exchange/MsgUpdateSpotMarket',
|
|
49
|
+
value: message,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
toWeb3Gw() {
|
|
53
|
+
const amino = this.toAmino();
|
|
54
|
+
const { value } = amino;
|
|
55
|
+
return {
|
|
56
|
+
'@type': '/injective.exchange.v2.MsgUpdateSpotMarket',
|
|
57
|
+
...value,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
toEip712() {
|
|
61
|
+
const amino = this.toAmino();
|
|
62
|
+
const { type, value } = amino;
|
|
63
|
+
const messageAdjusted = {
|
|
64
|
+
...value,
|
|
65
|
+
};
|
|
66
|
+
return {
|
|
67
|
+
type,
|
|
68
|
+
value: messageAdjusted,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
toEip712V2() {
|
|
72
|
+
const { params } = this;
|
|
73
|
+
const web3gw = this.toWeb3Gw();
|
|
74
|
+
const messageAdjusted = {
|
|
75
|
+
...web3gw,
|
|
76
|
+
new_min_price_tick_size: numberToCosmosSdkDecString(params.newMinPriceTickSize || '0'),
|
|
77
|
+
new_min_quantity_tick_size: numberToCosmosSdkDecString(params.newMinQuantityTickSize || '0'),
|
|
78
|
+
new_min_notional: numberToCosmosSdkDecString(params.newMinNotional || '0'),
|
|
79
|
+
};
|
|
80
|
+
return messageAdjusted;
|
|
81
|
+
}
|
|
82
|
+
toDirectSign() {
|
|
83
|
+
const proto = this.toProto();
|
|
84
|
+
return {
|
|
85
|
+
type: '/injective.exchange.v2.MsgUpdateSpotMarket',
|
|
86
|
+
message: proto,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
toBinary() {
|
|
90
|
+
return InjectiveExchangeV2Tx.MsgUpdateSpotMarket.encode(this.toProto()).finish();
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -39,6 +39,7 @@ import type MsgTransferDelegation from './staking/msgs/MsgTransferDelegation.js'
|
|
|
39
39
|
import type MsgRequestRedemption from './insurance/msgs/MsgRequestRedemption.js';
|
|
40
40
|
import type MsgReclaimLockedFunds from './exchange/msgs/MsgReclaimLockedFunds.js';
|
|
41
41
|
import type MsgSetDenomMetadata from './tokenfactory/msgs/MsgSetDenomMetadata.js';
|
|
42
|
+
import type MsgUpdateSpotMarketV2 from './exchange/msgs/MsgUpdateSpotMarketV2.js';
|
|
42
43
|
import type MsgExecuteContractCompat from './wasm/msgs/MsgExecuteContractCompat.js';
|
|
43
44
|
import type MsgCreateInsuranceFund from './insurance/msgs/MsgCreateInsuranceFund.js';
|
|
44
45
|
import type MsgAuthorizeStakeGrants from './exchange/msgs/MsgAuthorizeStakeGrants.js';
|
|
@@ -64,8 +65,8 @@ import type MsgSetDelegationTransferReceivers from './exchange/msgs/MsgSetDelega
|
|
|
64
65
|
/**
|
|
65
66
|
* @category Messages
|
|
66
67
|
*/
|
|
67
|
-
export type Msgs = MsgBid | MsgRevoke | MsgGrant | MsgAuthzExec | MsgSend | MsgMultiSend | MsgBatchUpdateOrders | MsgWithdrawDelegatorReward | MsgBatchCancelDerivativeOrders | MsgBatchCancelSpotOrders | MsgCancelDerivativeOrder | MsgCancelSpotOrder | MsgCreateDerivativeLimitOrder | MsgCreateDerivativeMarketOrder | MsgCreateSpotLimitOrder | MsgCreateSpotMarketOrder | MsgDeposit | MsgIncreasePositionMargin | MsgInstantSpotMarketLaunch | MsgWithdraw | MsgGovDeposit | MsgSubmitProposal | MsgVote | MsgTransfer | MsgCreateInsuranceFund | MsgRequestRedemption | MsgUnderwrite | MsgSendToEth | MsgDelegate | MsgUndelegate | MsgBeginRedelegate | MsgTransferDelegation | MsgSetDelegationTransferReceivers | MsgCancelUnbondingDelegation | MsgExecuteContract | MsgExecuteContractCompat | MsgMigrateContract | MsgUpdateAdmin | MsgExec | MsgInstantiateContract | MsgCreateBinaryOptionsLimitOrder | MsgCreateBinaryOptionsMarketOrder | MsgCancelBinaryOptionsOrder | MsgBatchCancelBinaryOptionsOrders | MsgWithdrawValidatorCommission | MsgEditValidator | MsgReclaimLockedFunds | MsgExternalTransfer | MsgStoreCode | MsgRewardsOptOut | MsgCreateValidator | MsgMint | MsgBurn | MsgChangeAdmin | MsgCreateDenom | MsgSetDenomMetadata | MsgGrantAllowance | MsgRevokeAllowance | MsgAdminUpdateBinaryOptionsMarket | MsgLiquidatePosition | MsgSignData | MsgGrantWithAuthorization | MsgAuthorizeStakeGrants;
|
|
68
|
+
export type Msgs = MsgBid | MsgRevoke | MsgGrant | MsgAuthzExec | MsgSend | MsgMultiSend | MsgBatchUpdateOrders | MsgWithdrawDelegatorReward | MsgBatchCancelDerivativeOrders | MsgBatchCancelSpotOrders | MsgCancelDerivativeOrder | MsgCancelSpotOrder | MsgCreateDerivativeLimitOrder | MsgCreateDerivativeMarketOrder | MsgCreateSpotLimitOrder | MsgCreateSpotMarketOrder | MsgDeposit | MsgIncreasePositionMargin | MsgInstantSpotMarketLaunch | MsgWithdraw | MsgGovDeposit | MsgSubmitProposal | MsgVote | MsgTransfer | MsgCreateInsuranceFund | MsgRequestRedemption | MsgUnderwrite | MsgSendToEth | MsgDelegate | MsgUndelegate | MsgBeginRedelegate | MsgTransferDelegation | MsgSetDelegationTransferReceivers | MsgCancelUnbondingDelegation | MsgExecuteContract | MsgExecuteContractCompat | MsgMigrateContract | MsgUpdateAdmin | MsgExec | MsgInstantiateContract | MsgCreateBinaryOptionsLimitOrder | MsgCreateBinaryOptionsMarketOrder | MsgCancelBinaryOptionsOrder | MsgBatchCancelBinaryOptionsOrders | MsgWithdrawValidatorCommission | MsgEditValidator | MsgReclaimLockedFunds | MsgExternalTransfer | MsgStoreCode | MsgRewardsOptOut | MsgCreateValidator | MsgMint | MsgBurn | MsgChangeAdmin | MsgCreateDenom | MsgSetDenomMetadata | MsgGrantAllowance | MsgRevokeAllowance | MsgAdminUpdateBinaryOptionsMarket | MsgLiquidatePosition | MsgSignData | MsgGrantWithAuthorization | MsgAuthorizeStakeGrants | MsgUpdateSpotMarketV2;
|
|
68
69
|
/**
|
|
69
70
|
* @category Messages
|
|
70
71
|
*/
|
|
71
|
-
export type ExchangeMsgs = MsgBatchCancelDerivativeOrders | MsgBatchCancelSpotOrders | MsgCancelDerivativeOrder | MsgCancelSpotOrder | MsgCreateDerivativeLimitOrder | MsgCreateDerivativeMarketOrder | MsgCreateSpotLimitOrder | MsgCreateSpotMarketOrder | MsgDeposit | MsgIncreasePositionMargin | MsgInstantSpotMarketLaunch | MsgWithdraw | MsgExec | MsgBatchUpdateOrders | MsgCreateBinaryOptionsLimitOrder | MsgCreateBinaryOptionsMarketOrder | MsgCancelBinaryOptionsOrder | MsgBatchCancelBinaryOptionsOrders | MsgReclaimLockedFunds | MsgExternalTransfer | MsgStoreCode | MsgSignData | MsgRewardsOptOut | MsgLiquidatePosition | MsgAuthorizeStakeGrants | MsgAdminUpdateBinaryOptionsMarket | MsgSetDelegationTransferReceivers;
|
|
72
|
+
export type ExchangeMsgs = MsgBatchCancelDerivativeOrders | MsgBatchCancelSpotOrders | MsgCancelDerivativeOrder | MsgCancelSpotOrder | MsgCreateDerivativeLimitOrder | MsgCreateDerivativeMarketOrder | MsgCreateSpotLimitOrder | MsgCreateSpotMarketOrder | MsgDeposit | MsgIncreasePositionMargin | MsgInstantSpotMarketLaunch | MsgWithdraw | MsgExec | MsgBatchUpdateOrders | MsgCreateBinaryOptionsLimitOrder | MsgCreateBinaryOptionsMarketOrder | MsgCancelBinaryOptionsOrder | MsgBatchCancelBinaryOptionsOrders | MsgReclaimLockedFunds | MsgExternalTransfer | MsgStoreCode | MsgSignData | MsgRewardsOptOut | MsgLiquidatePosition | MsgAuthorizeStakeGrants | MsgAdminUpdateBinaryOptionsMarket | MsgSetDelegationTransferReceivers | MsgUpdateSpotMarketV2;
|
|
@@ -117,7 +117,10 @@ export class TxGrpcApi {
|
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
119
|
catch (e) {
|
|
120
|
-
throw new TransactionException(
|
|
120
|
+
throw new TransactionException(e, {
|
|
121
|
+
context: 'TxGrpcApi.simulate',
|
|
122
|
+
skipParsing: true,
|
|
123
|
+
});
|
|
121
124
|
}
|
|
122
125
|
}
|
|
123
126
|
async broadcast(txRaw, options) {
|
|
@@ -365,6 +365,8 @@ export const protoTypeToAminoType = (type) => {
|
|
|
365
365
|
return 'exchange/BinaryOptionsMarketLaunchProposal';
|
|
366
366
|
case 'injective.exchange.v1beta1.MsgTransferAndExecute':
|
|
367
367
|
return 'exchange/MsgTransferAndExecute';
|
|
368
|
+
case 'injective.exchange.v2.MsgUpdateSpotMarket':
|
|
369
|
+
return 'exchange/MsgUpdateSpotMarket';
|
|
368
370
|
case 'injective.exchange.v1beta1.CreateSpotLimitOrderAuthz':
|
|
369
371
|
return 'exchange/CreateSpotLimitOrderAuthz';
|
|
370
372
|
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.14",
|
|
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.14",
|
|
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.14",
|
|
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.14",
|
|
136
|
+
"@injectivelabs/utils": "1.16.14",
|
|
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": "01870962a21e75a31d5eeef1200544597281bfea",
|
|
155
155
|
"typedoc": {
|
|
156
156
|
"entryPoint": "./src/index.ts",
|
|
157
157
|
"readmeFile": "./README.md",
|