carbon-js-sdk 0.4.5 → 0.4.6-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/CarbonSDK.js +1 -1
- package/lib/clients/CarbonQueryClient.js +2 -2
- package/lib/clients/ETHClient.d.ts +11 -4
- package/lib/clients/ETHClient.js +32 -18
- package/lib/clients/HydrogenClient.d.ts +16 -7
- package/lib/clients/HydrogenClient.js +56 -10
- package/lib/clients/InsightsQueryClient.d.ts +1 -0
- package/lib/clients/InsightsQueryClient.js +8 -0
- package/lib/clients/NEOClient.d.ts +1 -1
- package/lib/clients/NEOClient.js +15 -10
- package/lib/clients/TokenClient.d.ts +29 -5
- package/lib/clients/TokenClient.js +258 -53
- package/lib/clients/ZILClient.d.ts +1 -1
- package/lib/clients/ZILClient.js +25 -20
- package/lib/codec/cdp/e_mode_category.d.ts +23 -0
- package/lib/codec/cdp/e_mode_category.js +135 -0
- package/lib/codec/cosmos/gov/v1/query.js +2 -2
- package/lib/codec/cosmos/gov/v1/tx.js +2 -2
- package/lib/codec/cosmos/gov/v1beta1/query.js +2 -2
- package/lib/codec/cosmos/gov/v1beta1/tx.js +2 -2
- package/lib/codec/cosmos/group/v1/events.js +2 -2
- package/lib/codec/cosmos/group/v1/tx.js +4 -4
- package/lib/codec/cosmos/tx/v1beta1/tx.js +4 -4
- package/lib/codec/ethermint/crypto/v1/ethsecp256k1/export.d.ts +1 -0
- package/lib/codec/ethermint/crypto/v1/ethsecp256k1/export.js +6 -0
- package/lib/codec/ethermint/evm/v1/export.d.ts +5 -0
- package/lib/codec/ethermint/evm/v1/export.js +53 -0
- package/lib/codec/ethermint/feemarket/v1/export.d.ts +4 -0
- package/lib/codec/ethermint/feemarket/v1/export.js +18 -0
- package/lib/codec/ethermint/types/v1/export.d.ts +4 -0
- package/lib/codec/ethermint/types/v1/export.js +11 -0
- package/lib/codec/ethermint-models.d.ts +4 -0
- package/lib/codec/ethermint-models.js +26 -0
- package/lib/constant/eip712.d.ts +28 -0
- package/lib/constant/eip712.js +40 -0
- package/lib/constant/generic.js +1 -1
- package/lib/constant/ibc.d.ts +7 -0
- package/lib/constant/ibc.js +4 -1
- package/lib/constant/network.d.ts +2 -0
- package/lib/constant/network.js +5 -1
- package/lib/hydrogen/transfer.d.ts +5 -5
- package/lib/insights/common.d.ts +1 -0
- package/lib/insights/common.js +1 -0
- package/lib/insights/competition.d.ts +20 -0
- package/lib/modules/cdp.js +43 -43
- package/lib/modules/cosmwasm.js +1 -1
- package/lib/modules/evm.d.ts +46 -0
- package/lib/modules/evm.js +127 -0
- package/lib/modules/evmmerge.d.ts +12 -0
- package/lib/modules/evmmerge.js +35 -0
- package/lib/modules/feemarket.d.ts +20 -0
- package/lib/modules/feemarket.js +45 -0
- package/lib/modules/gov.js +12 -12
- package/lib/modules/ibc.d.ts +5 -1
- package/lib/modules/ibc.js +78 -0
- package/lib/modules/liquiditypool.js +1 -1
- package/lib/provider/account/EthLedgerAccount/EthLedgerAccount.js +1 -1
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/ErrorCode.js +1 -1
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/main.js +8 -8
- package/lib/provider/account/NeoLedgerAccount/NeoLedgerAccount.js +3 -3
- package/lib/provider/account/NeoLedgerAccount/NeonLedger.js +1 -1
- package/lib/provider/amino/types/admin.js +27 -27
- package/lib/provider/amino/types/bank.js +1 -1
- package/lib/provider/amino/types/broker.js +1 -1
- package/lib/provider/amino/types/cdp.js +22 -22
- package/lib/provider/amino/types/coin.js +4 -4
- package/lib/provider/amino/types/gov.js +4 -4
- package/lib/provider/amino/types/ibc.js +1 -1
- package/lib/provider/amino/types/leverage.js +1 -1
- package/lib/provider/amino/types/liquidityPool.js +7 -7
- package/lib/provider/amino/types/market.js +1 -1
- package/lib/provider/amino/types/oracle.js +1 -1
- package/lib/provider/amino/types/order.js +4 -4
- package/lib/provider/amino/types/position.js +1 -1
- package/lib/provider/amino/types/profile.js +1 -1
- package/lib/provider/amino/types/staking.js +4 -4
- package/lib/provider/amino/types/subaccount.js +3 -3
- package/lib/provider/amino/utils.js +11 -11
- package/lib/provider/keplr/KeplrStore.d.ts +1 -1
- package/lib/provider/keplr/KeplrStore.js +2 -5
- package/lib/provider/ledger/ledger.js +2 -2
- package/lib/provider/metamask/MetaMask.d.ts +5 -5
- package/lib/provider/metamask/MetaMask.js +37 -37
- package/lib/provider/o3/O3Wallet.js +2 -2
- package/lib/util/address.js +13 -13
- package/lib/util/api.js +4 -4
- package/lib/util/blockchain.d.ts +26 -0
- package/lib/util/blockchain.js +160 -1
- package/lib/util/eip712.d.ts +10 -0
- package/lib/util/eip712.js +46 -0
- package/lib/util/ethermint.d.ts +4 -0
- package/lib/util/ethermint.js +26 -0
- package/lib/util/fetch.js +1 -1
- package/lib/util/generic.js +3 -3
- package/lib/util/ibc.d.ts +5 -3
- package/lib/util/ibc.js +26 -1
- package/lib/util/number.js +5 -5
- package/lib/wallet/CarbonSigner.js +2 -2
- package/lib/wallet/CarbonSigningClient.js +8 -8
- package/lib/wallet/CarbonWallet.js +6 -6
- package/lib/websocket/connector.js +3 -3
- package/package.json +1 -1
package/lib/modules/gov.js
CHANGED
|
@@ -48,7 +48,7 @@ class GovModule extends base_1.default {
|
|
|
48
48
|
const value = tx_1.MsgDeposit.fromPartial({
|
|
49
49
|
proposalId: new long_1.default(params.proposalId),
|
|
50
50
|
depositor: wallet.bech32Address,
|
|
51
|
-
amount:
|
|
51
|
+
amount: amino_1.coins(params.amount, params.denom),
|
|
52
52
|
});
|
|
53
53
|
return yield wallet.sendTx({
|
|
54
54
|
typeUrl: util_1.CarbonTx.Types.MsgDeposit,
|
|
@@ -78,21 +78,21 @@ class GovModule extends base_1.default {
|
|
|
78
78
|
const createTokenMsg = {
|
|
79
79
|
title: title,
|
|
80
80
|
description: description,
|
|
81
|
-
msg:
|
|
81
|
+
msg: admin_1.transfromCreateTokenParams(msg, wallet.bech32Address),
|
|
82
82
|
};
|
|
83
83
|
return proposal_1.CreateTokenProposal.encode(createTokenMsg).finish();
|
|
84
84
|
case "SetMsgGasCostProposal":
|
|
85
85
|
const setMsgGasCostMsg = {
|
|
86
86
|
title: title,
|
|
87
87
|
description: description,
|
|
88
|
-
msg:
|
|
88
|
+
msg: admin_1.transfromSetMsgGasCostParams(msg),
|
|
89
89
|
};
|
|
90
90
|
return proposal_2.SetMsgGasCostProposal.encode(setMsgGasCostMsg).finish();
|
|
91
91
|
case "SetMinGasPriceProposal":
|
|
92
92
|
const setMinGasPriceMsg = {
|
|
93
93
|
title: title,
|
|
94
94
|
description: description,
|
|
95
|
-
msg:
|
|
95
|
+
msg: admin_1.transfromSetMinGasPriceParams(msg),
|
|
96
96
|
};
|
|
97
97
|
return proposal_2.SetMinGasPriceProposal.encode(setMinGasPriceMsg).finish();
|
|
98
98
|
case "RemoveMsgGasCostProposal":
|
|
@@ -113,49 +113,49 @@ class GovModule extends base_1.default {
|
|
|
113
113
|
const setRewardCurveMsg = {
|
|
114
114
|
title: title,
|
|
115
115
|
description: description,
|
|
116
|
-
msg:
|
|
116
|
+
msg: admin_1.transfromSetRewardCurveParams(msg),
|
|
117
117
|
};
|
|
118
118
|
return proposal_3.SetRewardCurveProposal.encode(setRewardCurveMsg).finish();
|
|
119
119
|
case "SetCommitmentCurveProposal":
|
|
120
120
|
const setCommitmentCurveMsg = {
|
|
121
121
|
title: title,
|
|
122
122
|
description: description,
|
|
123
|
-
msg:
|
|
123
|
+
msg: admin_1.transfromSetCommitmentCurveParams(msg),
|
|
124
124
|
};
|
|
125
125
|
return proposal_3.SetCommitmentCurveProposal.encode(setCommitmentCurveMsg).finish();
|
|
126
126
|
case "SetRewardsWeightsProposal":
|
|
127
127
|
const setRewardsWeightsMsg = {
|
|
128
128
|
title: title,
|
|
129
129
|
description: description,
|
|
130
|
-
msg:
|
|
130
|
+
msg: admin_1.transfromSetRewardsWeightsParams(msg),
|
|
131
131
|
};
|
|
132
132
|
return proposal_3.SetRewardsWeightsProposal.encode(setRewardsWeightsMsg).finish();
|
|
133
133
|
case "UpdatePoolProposal":
|
|
134
134
|
const updatePoolProposalMsg = {
|
|
135
135
|
title: title,
|
|
136
136
|
description: description,
|
|
137
|
-
msg:
|
|
137
|
+
msg: admin_1.transfromUpdatePoolParams(msg),
|
|
138
138
|
};
|
|
139
139
|
return proposal_3.UpdatePoolProposal.encode(updatePoolProposalMsg).finish();
|
|
140
140
|
case "UpdateMarketProposal":
|
|
141
141
|
const updateMarketProposalMsg = {
|
|
142
142
|
title: title,
|
|
143
143
|
description: description,
|
|
144
|
-
msg:
|
|
144
|
+
msg: market_1.transfromUpdateMarketParams(msg),
|
|
145
145
|
};
|
|
146
146
|
return proposal_4.UpdateMarketProposal.encode(updateMarketProposalMsg).finish();
|
|
147
147
|
case "CreateOracleProposal":
|
|
148
148
|
const createOracleProposalMsg = {
|
|
149
149
|
title: title,
|
|
150
150
|
description: description,
|
|
151
|
-
msg:
|
|
151
|
+
msg: admin_1.transfromCreateOracleParams(msg, wallet.bech32Address),
|
|
152
152
|
};
|
|
153
153
|
return proposal_5.CreateOracleProposal.encode(createOracleProposalMsg).finish();
|
|
154
154
|
case "SettlementPriceProposal":
|
|
155
155
|
const settlementPriceProposalMsg = {
|
|
156
156
|
title: title,
|
|
157
157
|
description: description,
|
|
158
|
-
msg:
|
|
158
|
+
msg: admin_1.transformSetSettlementPriceParams(msg),
|
|
159
159
|
};
|
|
160
160
|
return proposal_6.SettlementPriceProposal.encode(settlementPriceProposalMsg).finish();
|
|
161
161
|
case "ParameterChangeProposal":
|
|
@@ -177,7 +177,7 @@ class GovModule extends base_1.default {
|
|
|
177
177
|
title: title,
|
|
178
178
|
description: description,
|
|
179
179
|
recipient: proposalMsg.recipient,
|
|
180
|
-
amount:
|
|
180
|
+
amount: admin_1.transformCommunityPoolSpendAmount(proposalMsg.amount),
|
|
181
181
|
};
|
|
182
182
|
return distribution_1.CommunityPoolSpendProposal.encode(communityPoolSpendProposalMsg).finish();
|
|
183
183
|
case "CancelSoftwareUpgradeProposal":
|
package/lib/modules/ibc.d.ts
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ExtendedChainInfo } from "../constant";
|
|
2
|
+
import { ChainInfo } from "../provider";
|
|
3
|
+
import { CarbonTx, TypeUtils } from "../util";
|
|
2
4
|
import BigNumber from "bignumber.js";
|
|
3
5
|
import BaseModule from "./base";
|
|
4
6
|
export declare class IBCModule extends BaseModule {
|
|
5
7
|
/** @deprecated please use sendIbcTransferUpdated instead */
|
|
6
8
|
sendIBCTransfer(params: IBCModule.SendIBCTransferParams, msgOpts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
7
9
|
sendIbcTransferV2(params: IBCModule.SendIBCTransferV2Params, msgOpts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
10
|
+
getChainInfoMap(): Promise<TypeUtils.SimpleMap<ExtendedChainInfo>>;
|
|
11
|
+
getChainInfo(chainName: string, chainId: string): Promise<ChainInfo | undefined>;
|
|
8
12
|
}
|
|
9
13
|
export declare namespace IBCModule {
|
|
10
14
|
/** @deprecated sendIBCTransfer function is deprecated, please use sendIbcTransferUpdated instead */
|
package/lib/modules/ibc.js
CHANGED
|
@@ -14,6 +14,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.IBCModule = void 0;
|
|
16
16
|
const tx_1 = require("../codec/ibc/applications/transfer/v1/tx");
|
|
17
|
+
const constant_1 = require("../constant");
|
|
18
|
+
const provider_1 = require("../provider");
|
|
17
19
|
const util_1 = require("../util");
|
|
18
20
|
const long_1 = __importDefault(require("long"));
|
|
19
21
|
const base_1 = __importDefault(require("./base"));
|
|
@@ -64,5 +66,81 @@ class IBCModule extends base_1.default {
|
|
|
64
66
|
}, msgOpts);
|
|
65
67
|
});
|
|
66
68
|
}
|
|
69
|
+
getChainInfoMap() {
|
|
70
|
+
var _a, _b, _c;
|
|
71
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
+
const tokenClient = this.sdkProvider.getTokenClient();
|
|
73
|
+
const ibcBridges = tokenClient.bridges.ibc;
|
|
74
|
+
const denomTracesArr = Object.values(tokenClient.denomTraces);
|
|
75
|
+
const chainInfoMap = {};
|
|
76
|
+
for (let ibc = 0; ibc < ibcBridges.length; ibc++) {
|
|
77
|
+
const ibcBridge = ibcBridges[ibc];
|
|
78
|
+
const chainName = (_b = (_a = ibcBridge.chain_id_name.match(constant_1.ibcNetworkRegex)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : "";
|
|
79
|
+
const chainInfo = yield this.getChainInfo(chainName, ibcBridge.chain_id_name);
|
|
80
|
+
if (chainInfo) {
|
|
81
|
+
const isCosmWasm = (_c = chainInfo.features) === null || _c === void 0 ? void 0 : _c.includes("cosmwasm");
|
|
82
|
+
const extendedChainInfo = Object.assign(Object.assign({}, chainInfo), { rpc: isCosmWasm ? constant_1.publicRpcNodes[ibcBridge.chainName] : chainInfo.rpc, minimalDenomMap: {} });
|
|
83
|
+
const extraCurrencies = denomTracesArr.reduce((prev, denomTrace) => {
|
|
84
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
85
|
+
const firstTransferChannel = (_b = (_a = denomTrace.path.match(constant_1.ibcTransferChannelRegex)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.replace("transfer/", "");
|
|
86
|
+
const cw20RegexArr = denomTrace.baseDenom.match(constant_1.cw20TokenRegex);
|
|
87
|
+
const rootPath = denomTrace.path.replace(constant_1.ibcTransferChannelRegex, "").replace(/^\//, '');
|
|
88
|
+
const coinMinimalDenom = util_1.IBCUtils.makeIBCMinimalDenom(denomTrace.path, denomTrace.baseDenom);
|
|
89
|
+
const tokenInfo = denomTrace.token;
|
|
90
|
+
const isNativeDenom = tokenClient.isCarbonToken(tokenInfo);
|
|
91
|
+
if (!(((rootPath.length > 0 || (cw20RegexArr === null || cw20RegexArr === void 0 ? void 0 : cw20RegexArr.length)) && firstTransferChannel === ibcBridge.channels.src_channel)
|
|
92
|
+
|| (firstTransferChannel === ibcBridge.channels.dst_channel && isNativeDenom))) {
|
|
93
|
+
if (firstTransferChannel === ibcBridge.channels.src_channel && rootPath.length === 0) {
|
|
94
|
+
extendedChainInfo.minimalDenomMap[coinMinimalDenom] = denomTrace.baseDenom;
|
|
95
|
+
}
|
|
96
|
+
return prev;
|
|
97
|
+
}
|
|
98
|
+
let initCoinMinimalDenom = denomTrace.baseDenom;
|
|
99
|
+
if (cw20RegexArr === null || cw20RegexArr === void 0 ? void 0 : cw20RegexArr.length) {
|
|
100
|
+
prev.push({
|
|
101
|
+
coinDenom: (_c = tokenInfo === null || tokenInfo === void 0 ? void 0 : tokenInfo.symbol) !== null && _c !== void 0 ? _c : "",
|
|
102
|
+
coinMinimalDenom: initCoinMinimalDenom,
|
|
103
|
+
coinDecimals: (_d = tokenInfo === null || tokenInfo === void 0 ? void 0 : tokenInfo.decimals.toNumber()) !== null && _d !== void 0 ? _d : 0,
|
|
104
|
+
coinGeckoId: (_h = (_f = (_e = tokenClient === null || tokenClient === void 0 ? void 0 : tokenClient.geckoTokenNames) === null || _e === void 0 ? void 0 : _e[coinMinimalDenom]) !== null && _f !== void 0 ? _f : (_g = tokenClient === null || tokenClient === void 0 ? void 0 : tokenClient.geckoTokenNames) === null || _g === void 0 ? void 0 : _g[denomTrace.baseDenom]) !== null && _h !== void 0 ? _h : "",
|
|
105
|
+
type: "cw20",
|
|
106
|
+
contractAddress: (_j = cw20RegexArr[1]) !== null && _j !== void 0 ? _j : "",
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
initCoinMinimalDenom = isNativeDenom ? coinMinimalDenom : util_1.IBCUtils.makeIBCMinimalDenom(rootPath, denomTrace.baseDenom);
|
|
111
|
+
prev.push({
|
|
112
|
+
coinDenom: (_k = tokenInfo === null || tokenInfo === void 0 ? void 0 : tokenInfo.symbol) !== null && _k !== void 0 ? _k : "",
|
|
113
|
+
coinMinimalDenom: initCoinMinimalDenom,
|
|
114
|
+
coinDecimals: (_l = tokenInfo === null || tokenInfo === void 0 ? void 0 : tokenInfo.decimals.toNumber()) !== null && _l !== void 0 ? _l : 0,
|
|
115
|
+
coinGeckoId: (_q = (_o = (_m = tokenClient === null || tokenClient === void 0 ? void 0 : tokenClient.geckoTokenNames) === null || _m === void 0 ? void 0 : _m[coinMinimalDenom]) !== null && _o !== void 0 ? _o : (_p = tokenClient === null || tokenClient === void 0 ? void 0 : tokenClient.geckoTokenNames) === null || _p === void 0 ? void 0 : _p[denomTrace.baseDenom]) !== null && _q !== void 0 ? _q : "",
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
extendedChainInfo.minimalDenomMap[isNativeDenom ? denomTrace.baseDenom : coinMinimalDenom] = initCoinMinimalDenom;
|
|
119
|
+
return prev;
|
|
120
|
+
}, []);
|
|
121
|
+
chainInfoMap[ibcBridge.chain_id_name] = Object.assign(Object.assign({}, extendedChainInfo), { currencies: chainInfo.currencies.concat(extraCurrencies) });
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
const swthChainInfo = yield provider_1.KeplrAccount.getChainInfo(this.sdkProvider);
|
|
125
|
+
if (swthChainInfo) {
|
|
126
|
+
chainInfoMap[swthChainInfo.chainId] = Object.assign(Object.assign({}, swthChainInfo), { minimalDenomMap: {} });
|
|
127
|
+
}
|
|
128
|
+
return chainInfoMap;
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
getChainInfo(chainName, chainId) {
|
|
132
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
133
|
+
if (!chainName)
|
|
134
|
+
return undefined;
|
|
135
|
+
try {
|
|
136
|
+
const chainInfoResponse = yield fetch(`https://raw.githubusercontent.com/chainapsis/keplr-chain-registry/master/cosmos/${chainName}.json`);
|
|
137
|
+
const chainInfoJson = yield chainInfoResponse.json();
|
|
138
|
+
return chainInfoJson;
|
|
139
|
+
}
|
|
140
|
+
catch (err) {
|
|
141
|
+
return util_1.IBCUtils.EmbedChainInfos[chainId];
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
}
|
|
67
145
|
}
|
|
68
146
|
exports.IBCModule = IBCModule;
|
|
@@ -145,7 +145,7 @@ class LiquidityPoolModule extends base_1.default {
|
|
|
145
145
|
const SECONDS_IN_A_WEEK = new bignumber_js_1.BigNumber(604800);
|
|
146
146
|
const mintDataResponse = yield this.sdkProvider.query.inflation.MintData({});
|
|
147
147
|
const mintData = mintDataResponse.mintData;
|
|
148
|
-
const nowTime = new bignumber_js_1.BigNumber(
|
|
148
|
+
const nowTime = new bignumber_js_1.BigNumber(dayjs_1.default().unix());
|
|
149
149
|
const firstBlockTime = (_a = mintData === null || mintData === void 0 ? void 0 : mintData.firstBlockTime.toNumber()) !== null && _a !== void 0 ? _a : 0;
|
|
150
150
|
const difference = nowTime.minus(firstBlockTime);
|
|
151
151
|
const currentWeek = difference.div(SECONDS_IN_A_WEEK).dp(0, bignumber_js_1.BigNumber.ROUND_DOWN);
|
|
@@ -87,7 +87,7 @@ class EthLedgerAccount {
|
|
|
87
87
|
static tryConnect() {
|
|
88
88
|
return __awaiter(this, void 0, void 0, function* () {
|
|
89
89
|
try {
|
|
90
|
-
const transport = yield
|
|
90
|
+
const transport = yield ledger_1.getLedgerTransport();
|
|
91
91
|
// get public key to assert that NEO app is open
|
|
92
92
|
const ethApp = new hw_app_eth_1.default(transport);
|
|
93
93
|
const bipString = EthLedgerAccount.getETHBIP44String();
|
|
@@ -39,7 +39,7 @@ exports.looksLikeTransportStatusError = looksLikeTransportStatusError;
|
|
|
39
39
|
* @returns error with modified message if found.
|
|
40
40
|
*/
|
|
41
41
|
function evalTransportError(err) {
|
|
42
|
-
const transportErr =
|
|
42
|
+
const transportErr = lodash_1.cloneDeep(err);
|
|
43
43
|
switch (transportErr.statusCode) {
|
|
44
44
|
case StatusWord.APP_CLOSED:
|
|
45
45
|
transportErr.message = "Your NEO app is closed! Please login.";
|
|
@@ -49,8 +49,8 @@ function getAppName(ledger) {
|
|
|
49
49
|
return version.substring(0, version.length - 2); // take of status word
|
|
50
50
|
}
|
|
51
51
|
catch (e) {
|
|
52
|
-
if (
|
|
53
|
-
throw
|
|
52
|
+
if (ErrorCode_1.looksLikeTransportStatusError(e)) {
|
|
53
|
+
throw ErrorCode_1.evalTransportError(e);
|
|
54
54
|
}
|
|
55
55
|
throw e;
|
|
56
56
|
}
|
|
@@ -72,8 +72,8 @@ function getAppVersion(ledger) {
|
|
|
72
72
|
return major.toString() + "." + minor.toString() + "." + patch.toString();
|
|
73
73
|
}
|
|
74
74
|
catch (e) {
|
|
75
|
-
if (
|
|
76
|
-
throw
|
|
75
|
+
if (ErrorCode_1.looksLikeTransportStatusError(e)) {
|
|
76
|
+
throw ErrorCode_1.evalTransportError(e);
|
|
77
77
|
}
|
|
78
78
|
throw e;
|
|
79
79
|
}
|
|
@@ -109,8 +109,8 @@ function getPublicKey(ledger, bip44String, showAddressOnDevice = false) {
|
|
|
109
109
|
return response.toString("hex").substring(0, 130);
|
|
110
110
|
}
|
|
111
111
|
catch (e) {
|
|
112
|
-
if (
|
|
113
|
-
throw
|
|
112
|
+
if (ErrorCode_1.looksLikeTransportStatusError(e)) {
|
|
113
|
+
throw ErrorCode_1.evalTransportError(e);
|
|
114
114
|
}
|
|
115
115
|
throw e;
|
|
116
116
|
}
|
|
@@ -142,8 +142,8 @@ function getSignature(ledger, payload, bip44String, network) {
|
|
|
142
142
|
return DerToHexSignature(response.toString("hex"));
|
|
143
143
|
}
|
|
144
144
|
catch (e) {
|
|
145
|
-
if (
|
|
146
|
-
throw
|
|
145
|
+
if (ErrorCode_1.looksLikeTransportStatusError(e)) {
|
|
146
|
+
throw ErrorCode_1.evalTransportError(e);
|
|
147
147
|
}
|
|
148
148
|
throw e;
|
|
149
149
|
}
|
|
@@ -111,8 +111,8 @@ class NeoLedgerAccount {
|
|
|
111
111
|
*/
|
|
112
112
|
static tryConnect(version = "neo") {
|
|
113
113
|
return __awaiter(this, void 0, void 0, function* () {
|
|
114
|
-
const bipString =
|
|
115
|
-
const ledger = yield
|
|
114
|
+
const bipString = NeonLedger_1.getNEOBIP44String();
|
|
115
|
+
const ledger = yield ledger_1.getLedgerTransport();
|
|
116
116
|
// get public key to assert that NEO app is open
|
|
117
117
|
const ledgerAdapter = adapterForVersion(version);
|
|
118
118
|
const publicKey = yield ledgerAdapter.getPublicKey(ledger, bipString);
|
|
@@ -129,7 +129,7 @@ class NeoLedgerAccount {
|
|
|
129
129
|
}
|
|
130
130
|
sign(msg, magic = neon_core_next_1.CONST.MAGIC_NUMBER.MainNet) {
|
|
131
131
|
return __awaiter(this, void 0, void 0, function* () {
|
|
132
|
-
const bipString =
|
|
132
|
+
const bipString = NeonLedger_1.getNEOBIP44String();
|
|
133
133
|
const ledger = this.useLedger();
|
|
134
134
|
const ledgerAdapter = adapterForVersion(this.version);
|
|
135
135
|
const publicKey = this.publicKey;
|
|
@@ -40,7 +40,7 @@ function evalTransportError(err) {
|
|
|
40
40
|
transportErr.message = "Transaction signing denied";
|
|
41
41
|
break;
|
|
42
42
|
default:
|
|
43
|
-
transportErr.message =
|
|
43
|
+
transportErr.message = hw_transport_1.getAltStatusMessage(transportErr.statusCode);
|
|
44
44
|
}
|
|
45
45
|
return err;
|
|
46
46
|
}
|
|
@@ -231,32 +231,32 @@ const MsgSetSmallLiquidationSize = {
|
|
|
231
231
|
},
|
|
232
232
|
};
|
|
233
233
|
const AdminAmino = {
|
|
234
|
-
[CarbonTx.Types.MsgCreateOracle]:
|
|
235
|
-
[CarbonTx.Types.MsgBindToken]:
|
|
236
|
-
[CarbonTx.Types.MsgCreateToken]:
|
|
237
|
-
[CarbonTx.Types.MsgLinkToken]:
|
|
238
|
-
[CarbonTx.Types.MsgSyncToken]:
|
|
239
|
-
[CarbonTx.Types.MsgCreateMarket]:
|
|
240
|
-
[CarbonTx.Types.MsgUpdatePool]:
|
|
241
|
-
[CarbonTx.Types.MsgSetRewardsWeights]:
|
|
242
|
-
[CarbonTx.Types.MsgSetRewardCurve]:
|
|
243
|
-
[CarbonTx.Types.MsgSetCommitmentCurve]:
|
|
244
|
-
[CarbonTx.Types.MsgSetTradingFlag]:
|
|
245
|
-
[CarbonTx.Types.MsgSetGasCost]:
|
|
246
|
-
[CarbonTx.Types.MsgSetMinGasPrice]:
|
|
247
|
-
[CarbonTx.Types.MsgRemoveGasCost]:
|
|
248
|
-
[CarbonTx.Types.MsgRemoveMinGasPrice]:
|
|
249
|
-
[CarbonTx.Types.MsgCreateValidator]:
|
|
250
|
-
[CarbonTx.Types.MsgEditValidator]:
|
|
251
|
-
[CarbonTx.Types.MsgAddRateStrategy]:
|
|
252
|
-
[CarbonTx.Types.MsgUpdateRateStrategy]:
|
|
253
|
-
[CarbonTx.Types.MsgRemoveRateStrategy]:
|
|
254
|
-
[CarbonTx.Types.MsgAddAsset]:
|
|
255
|
-
[CarbonTx.Types.MsgUpdateAsset]:
|
|
256
|
-
[CarbonTx.Types.MsgSetLiquidationFee]:
|
|
257
|
-
[CarbonTx.Types.MsgSetInterestFee]:
|
|
258
|
-
[CarbonTx.Types.MsgSetCompleteLiquidationThreshold]:
|
|
259
|
-
[CarbonTx.Types.MsgSetMinimumCloseFactor]:
|
|
260
|
-
[CarbonTx.Types.MsgSetSmallLiquidationSize]:
|
|
234
|
+
[CarbonTx.Types.MsgCreateOracle]: utils_1.generateAminoType(MsgCreateOracle),
|
|
235
|
+
[CarbonTx.Types.MsgBindToken]: utils_1.generateAminoType(MsgBindToken),
|
|
236
|
+
[CarbonTx.Types.MsgCreateToken]: utils_1.generateAminoType(MsgCreateToken),
|
|
237
|
+
[CarbonTx.Types.MsgLinkToken]: utils_1.generateAminoType(MsgLinkToken),
|
|
238
|
+
[CarbonTx.Types.MsgSyncToken]: utils_1.generateAminoType(MsgSyncToken),
|
|
239
|
+
[CarbonTx.Types.MsgCreateMarket]: utils_1.generateAminoType(MsgCreateMarket),
|
|
240
|
+
[CarbonTx.Types.MsgUpdatePool]: utils_1.generateAminoType(MsgUpdatePool),
|
|
241
|
+
[CarbonTx.Types.MsgSetRewardsWeights]: utils_1.generateAminoType(MsgSetRewardsWeights),
|
|
242
|
+
[CarbonTx.Types.MsgSetRewardCurve]: utils_1.generateAminoType(MsgSetRewardCurve),
|
|
243
|
+
[CarbonTx.Types.MsgSetCommitmentCurve]: utils_1.generateAminoType(MsgSetCommitmentCurve),
|
|
244
|
+
[CarbonTx.Types.MsgSetTradingFlag]: utils_1.generateAminoType(MsgSetTradingFlag),
|
|
245
|
+
[CarbonTx.Types.MsgSetGasCost]: utils_1.generateAminoType(MsgSetGasCost),
|
|
246
|
+
[CarbonTx.Types.MsgSetMinGasPrice]: utils_1.generateAminoType(MsgSetMinGasPrice),
|
|
247
|
+
[CarbonTx.Types.MsgRemoveGasCost]: utils_1.generateAminoType(MsgRemoveGasCost),
|
|
248
|
+
[CarbonTx.Types.MsgRemoveMinGasPrice]: utils_1.generateAminoType(MsgRemoveMinGasPrice),
|
|
249
|
+
[CarbonTx.Types.MsgCreateValidator]: utils_1.generateAminoType(MsgCreateValidator),
|
|
250
|
+
[CarbonTx.Types.MsgEditValidator]: utils_1.generateAminoType(MsgEditValidator),
|
|
251
|
+
[CarbonTx.Types.MsgAddRateStrategy]: utils_1.generateAminoType(MsgAddRateStrategy),
|
|
252
|
+
[CarbonTx.Types.MsgUpdateRateStrategy]: utils_1.generateAminoType(MsgUpdateRateStrategy),
|
|
253
|
+
[CarbonTx.Types.MsgRemoveRateStrategy]: utils_1.generateAminoType(MsgRemoveRateStrategy),
|
|
254
|
+
[CarbonTx.Types.MsgAddAsset]: utils_1.generateAminoType(MsgAddAsset),
|
|
255
|
+
[CarbonTx.Types.MsgUpdateAsset]: utils_1.generateAminoType(MsgUpdateAsset),
|
|
256
|
+
[CarbonTx.Types.MsgSetLiquidationFee]: utils_1.generateAminoType(MsgSetLiquidationFee),
|
|
257
|
+
[CarbonTx.Types.MsgSetInterestFee]: utils_1.generateAminoType(MsgSetInterestFee),
|
|
258
|
+
[CarbonTx.Types.MsgSetCompleteLiquidationThreshold]: utils_1.generateAminoType(MsgSetCompleteLiquidationThreshold),
|
|
259
|
+
[CarbonTx.Types.MsgSetMinimumCloseFactor]: utils_1.generateAminoType(MsgSetMinimumCloseFactor),
|
|
260
|
+
[CarbonTx.Types.MsgSetSmallLiquidationSize]: utils_1.generateAminoType(MsgSetSmallLiquidationSize),
|
|
261
261
|
};
|
|
262
262
|
exports.default = AdminAmino;
|
|
@@ -29,6 +29,6 @@ const MsgInitiateLiquidation = {
|
|
|
29
29
|
valueMap: {},
|
|
30
30
|
};
|
|
31
31
|
const BrokerAmino = {
|
|
32
|
-
[CarbonTx.Types.MsgInitiateLiquidation]:
|
|
32
|
+
[CarbonTx.Types.MsgInitiateLiquidation]: utils_1.generateAminoType(MsgInitiateLiquidation),
|
|
33
33
|
};
|
|
34
34
|
exports.default = BrokerAmino;
|
|
@@ -145,27 +145,27 @@ const MsgSetCdpPaused = {
|
|
|
145
145
|
valueMap: {},
|
|
146
146
|
};
|
|
147
147
|
const CdpAmino = {
|
|
148
|
-
[CarbonTx.Types.MsgSupplyAsset]:
|
|
149
|
-
[CarbonTx.Types.MsgWithdrawAsset]:
|
|
150
|
-
[CarbonTx.Types.MsgLockCollateral]:
|
|
151
|
-
[CarbonTx.Types.MsgUnlockCollateral]:
|
|
152
|
-
[CarbonTx.Types.MsgBorrowAsset]:
|
|
153
|
-
[CarbonTx.Types.MsgRepayAsset]:
|
|
154
|
-
[CarbonTx.Types.MsgSupplyAssetAndLockCollateral]:
|
|
155
|
-
[CarbonTx.Types.MsgUnlockCollateralAndWithdrawAsset]:
|
|
156
|
-
[CarbonTx.Types.MsgLiquidateCollateral]:
|
|
157
|
-
[CarbonTx.Types.MsgRepayAssetWithCdpTokens]:
|
|
158
|
-
[CarbonTx.Types.MsgRepayAssetWithCollateral]:
|
|
159
|
-
[CarbonTx.Types.MsgMintStablecoin]:
|
|
160
|
-
[CarbonTx.Types.MsgReturnStablecoin]:
|
|
161
|
-
[CarbonTx.Types.MsgLiquidateCollateralWithCdpTokens]:
|
|
162
|
-
[CarbonTx.Types.MsgLiquidateCollateralWithCollateral]:
|
|
163
|
-
[CarbonTx.Types.MsgLiquidateCollateralWithStablecoin]:
|
|
164
|
-
[CarbonTx.Types.MsgCreateRewardScheme]:
|
|
165
|
-
[CarbonTx.Types.MsgUpdateRewardScheme]:
|
|
166
|
-
[CarbonTx.Types.MsgClaimRewards]:
|
|
167
|
-
[CarbonTx.Types.MsgSetStablecoinMintCap]:
|
|
168
|
-
[CarbonTx.Types.MsgSetStalePriceGracePeriod]:
|
|
169
|
-
[CarbonTx.Types.MsgSetCdpPaused]:
|
|
148
|
+
[CarbonTx.Types.MsgSupplyAsset]: utils_1.generateAminoType(MsgSupplyAsset),
|
|
149
|
+
[CarbonTx.Types.MsgWithdrawAsset]: utils_1.generateAminoType(MsgWithdrawAsset),
|
|
150
|
+
[CarbonTx.Types.MsgLockCollateral]: utils_1.generateAminoType(MsgLockCollateral),
|
|
151
|
+
[CarbonTx.Types.MsgUnlockCollateral]: utils_1.generateAminoType(MsgUnlockCollateral),
|
|
152
|
+
[CarbonTx.Types.MsgBorrowAsset]: utils_1.generateAminoType(MsgBorrowAsset),
|
|
153
|
+
[CarbonTx.Types.MsgRepayAsset]: utils_1.generateAminoType(MsgRepayAsset),
|
|
154
|
+
[CarbonTx.Types.MsgSupplyAssetAndLockCollateral]: utils_1.generateAminoType(MsgSupplyAssetAndLockCollateral),
|
|
155
|
+
[CarbonTx.Types.MsgUnlockCollateralAndWithdrawAsset]: utils_1.generateAminoType(MsgUnlockCollateralAndWithdrawAsset),
|
|
156
|
+
[CarbonTx.Types.MsgLiquidateCollateral]: utils_1.generateAminoType(MsgLiquidateCollateral),
|
|
157
|
+
[CarbonTx.Types.MsgRepayAssetWithCdpTokens]: utils_1.generateAminoType(MsgRepayAssetWithCdpTokens),
|
|
158
|
+
[CarbonTx.Types.MsgRepayAssetWithCollateral]: utils_1.generateAminoType(MsgRepayAssetWithCollateral),
|
|
159
|
+
[CarbonTx.Types.MsgMintStablecoin]: utils_1.generateAminoType(MsgMintStablecoin),
|
|
160
|
+
[CarbonTx.Types.MsgReturnStablecoin]: utils_1.generateAminoType(MsgReturnStablecoin),
|
|
161
|
+
[CarbonTx.Types.MsgLiquidateCollateralWithCdpTokens]: utils_1.generateAminoType(MsgLiquidateCollateralWithCdpTokens),
|
|
162
|
+
[CarbonTx.Types.MsgLiquidateCollateralWithCollateral]: utils_1.generateAminoType(MsgLiquidateCollateralWithCollateral),
|
|
163
|
+
[CarbonTx.Types.MsgLiquidateCollateralWithStablecoin]: utils_1.generateAminoType(MsgLiquidateCollateralWithStablecoin),
|
|
164
|
+
[CarbonTx.Types.MsgCreateRewardScheme]: utils_1.generateAminoType(MsgCreateRewardScheme),
|
|
165
|
+
[CarbonTx.Types.MsgUpdateRewardScheme]: utils_1.generateAminoType(MsgUpdateRewardScheme),
|
|
166
|
+
[CarbonTx.Types.MsgClaimRewards]: utils_1.generateAminoType(MsgClaimRewards),
|
|
167
|
+
[CarbonTx.Types.MsgSetStablecoinMintCap]: utils_1.generateAminoType(MsgSetStablecoinMintCap),
|
|
168
|
+
[CarbonTx.Types.MsgSetStalePriceGracePeriod]: utils_1.generateAminoType(MsgSetStalePriceGracePeriod),
|
|
169
|
+
[CarbonTx.Types.MsgSetCdpPaused]: utils_1.generateAminoType(MsgSetCdpPaused),
|
|
170
170
|
};
|
|
171
171
|
exports.default = CdpAmino;
|
|
@@ -44,9 +44,9 @@ const MsgWithdrawFromGroup = {
|
|
|
44
44
|
valueMap: {},
|
|
45
45
|
};
|
|
46
46
|
const CoinAmino = {
|
|
47
|
-
[CarbonTx.Types.MsgWithdraw]:
|
|
48
|
-
[CarbonTx.Types.MsgMintToken]:
|
|
49
|
-
[CarbonTx.Types.MsgDepositToGroup]:
|
|
50
|
-
[CarbonTx.Types.MsgWithdrawFromGroup]:
|
|
47
|
+
[CarbonTx.Types.MsgWithdraw]: utils_1.generateAminoType(MsgWithdraw),
|
|
48
|
+
[CarbonTx.Types.MsgMintToken]: utils_1.generateAminoType(MsgMintToken),
|
|
49
|
+
[CarbonTx.Types.MsgDepositToGroup]: utils_1.generateAminoType(MsgDepositToGroup),
|
|
50
|
+
[CarbonTx.Types.MsgWithdrawFromGroup]: utils_1.generateAminoType(MsgWithdrawFromGroup),
|
|
51
51
|
};
|
|
52
52
|
exports.default = CoinAmino;
|
|
@@ -217,7 +217,7 @@ const SettlementPrice = {
|
|
|
217
217
|
},
|
|
218
218
|
};
|
|
219
219
|
const preProcessAmino = (value, valueMap) => {
|
|
220
|
-
return
|
|
220
|
+
return utils_1.mapEachIndiv(value, valueMap, false);
|
|
221
221
|
};
|
|
222
222
|
const checkDecodeProposal = (content, amino) => {
|
|
223
223
|
const decodedValue = util_1.GovUtils.decodeContent(content);
|
|
@@ -437,8 +437,8 @@ const proposalAminoProcess = {
|
|
|
437
437
|
},
|
|
438
438
|
};
|
|
439
439
|
const GovAmino = {
|
|
440
|
-
[CarbonTx.Types.MsgSubmitProposal]:
|
|
441
|
-
[CarbonTx.Types.MsgDeposit]:
|
|
442
|
-
[CarbonTx.Types.MsgVote]:
|
|
440
|
+
[CarbonTx.Types.MsgSubmitProposal]: utils_1.generateAminoType(SubmitProposalMsg, proposalAminoProcess),
|
|
441
|
+
[CarbonTx.Types.MsgDeposit]: utils_1.generateAminoType(MsgDeposit),
|
|
442
|
+
[CarbonTx.Types.MsgVote]: utils_1.generateAminoType(MsgVote),
|
|
443
443
|
};
|
|
444
444
|
exports.default = GovAmino;
|
|
@@ -55,6 +55,6 @@ const pruneTransferProcess = {
|
|
|
55
55
|
},
|
|
56
56
|
};
|
|
57
57
|
const IbcAmino = {
|
|
58
|
-
[CarbonTx.Types.MsgTransfer]:
|
|
58
|
+
[CarbonTx.Types.MsgTransfer]: utils_1.generateAminoType(MsgTransfer, pruneTransferProcess),
|
|
59
59
|
};
|
|
60
60
|
exports.default = IbcAmino;
|
|
@@ -31,6 +31,6 @@ const MsgSetLeverage = {
|
|
|
31
31
|
},
|
|
32
32
|
};
|
|
33
33
|
const LeverageAmino = {
|
|
34
|
-
[CarbonTx.Types.MsgSetLeverage]:
|
|
34
|
+
[CarbonTx.Types.MsgSetLeverage]: utils_1.generateAminoType(MsgSetLeverage),
|
|
35
35
|
};
|
|
36
36
|
exports.default = LeverageAmino;
|
|
@@ -93,12 +93,12 @@ const commitTokensProcess = {
|
|
|
93
93
|
},
|
|
94
94
|
};
|
|
95
95
|
const LiquidityPoolAmino = {
|
|
96
|
-
[CarbonTx.Types.MsgCreatePool]:
|
|
97
|
-
[CarbonTx.Types.MsgCreatePoolWithLiquidity]:
|
|
98
|
-
[CarbonTx.Types.MsgAddLiquidity]:
|
|
99
|
-
[CarbonTx.Types.MsgRemoveLiquidity]:
|
|
100
|
-
[CarbonTx.Types.MsgStakePoolToken]:
|
|
101
|
-
[CarbonTx.Types.MsgUnstakePoolToken]:
|
|
102
|
-
[CarbonTx.Types.MsgClaimPoolRewards]:
|
|
96
|
+
[CarbonTx.Types.MsgCreatePool]: utils_1.generateAminoType(MsgCreatePool),
|
|
97
|
+
[CarbonTx.Types.MsgCreatePoolWithLiquidity]: utils_1.generateAminoType(MsgCreatePoolWithLiquidity),
|
|
98
|
+
[CarbonTx.Types.MsgAddLiquidity]: utils_1.generateAminoType(MsgAddLiquidity),
|
|
99
|
+
[CarbonTx.Types.MsgRemoveLiquidity]: utils_1.generateAminoType(MsgRemoveLiquidity),
|
|
100
|
+
[CarbonTx.Types.MsgStakePoolToken]: utils_1.generateAminoType(MsgStakePoolToken, commitTokensProcess),
|
|
101
|
+
[CarbonTx.Types.MsgUnstakePoolToken]: utils_1.generateAminoType(MsgUnstakePoolToken),
|
|
102
|
+
[CarbonTx.Types.MsgClaimPoolRewards]: utils_1.generateAminoType(MsgClaimPoolRewards),
|
|
103
103
|
};
|
|
104
104
|
exports.default = LiquidityPoolAmino;
|
|
@@ -41,6 +41,6 @@ const MsgUpdateMarket = {
|
|
|
41
41
|
},
|
|
42
42
|
};
|
|
43
43
|
const MarketAmino = {
|
|
44
|
-
[CarbonTx.Types.MsgUpdateMarket]:
|
|
44
|
+
[CarbonTx.Types.MsgUpdateMarket]: utils_1.generateAminoType(MsgUpdateMarket),
|
|
45
45
|
};
|
|
46
46
|
exports.default = MarketAmino;
|
|
@@ -76,9 +76,9 @@ const createOrderProcess = {
|
|
|
76
76
|
},
|
|
77
77
|
};
|
|
78
78
|
const OrderAmino = {
|
|
79
|
-
[CarbonTx.Types.MsgCreateOrder]:
|
|
80
|
-
[CarbonTx.Types.MsgCancelOrder]:
|
|
81
|
-
[CarbonTx.Types.MsgEditOrder]:
|
|
82
|
-
[CarbonTx.Types.MsgCancelAll]:
|
|
79
|
+
[CarbonTx.Types.MsgCreateOrder]: utils_1.generateAminoType(MsgCreateOrder, createOrderProcess),
|
|
80
|
+
[CarbonTx.Types.MsgCancelOrder]: utils_1.generateAminoType(MsgCancelOrder),
|
|
81
|
+
[CarbonTx.Types.MsgEditOrder]: utils_1.generateAminoType(MsgEditOrder),
|
|
82
|
+
[CarbonTx.Types.MsgCancelAll]: utils_1.generateAminoType(MsgCancelAll),
|
|
83
83
|
};
|
|
84
84
|
exports.default = OrderAmino;
|
|
@@ -29,6 +29,6 @@ const MsgSetMargin = {
|
|
|
29
29
|
valueMap: {},
|
|
30
30
|
};
|
|
31
31
|
const PositionAmino = {
|
|
32
|
-
[CarbonTx.Types.MsgSetMargin]:
|
|
32
|
+
[CarbonTx.Types.MsgSetMargin]: utils_1.generateAminoType(MsgSetMargin),
|
|
33
33
|
};
|
|
34
34
|
exports.default = PositionAmino;
|
|
@@ -45,6 +45,6 @@ const updateProfileProcess = {
|
|
|
45
45
|
},
|
|
46
46
|
};
|
|
47
47
|
const ProfileAmino = {
|
|
48
|
-
[CarbonTx.Types.MsgUpdateProfile]:
|
|
48
|
+
[CarbonTx.Types.MsgUpdateProfile]: utils_1.generateAminoType(MsgUpdateProfile, updateProfileProcess),
|
|
49
49
|
};
|
|
50
50
|
exports.default = ProfileAmino;
|
|
@@ -44,9 +44,9 @@ const MsgWithdrawDelegatorReward = {
|
|
|
44
44
|
valueMap: {},
|
|
45
45
|
};
|
|
46
46
|
const StakingAmino = {
|
|
47
|
-
[CarbonTx.Types.MsgDelegate]:
|
|
48
|
-
[CarbonTx.Types.MsgUndelegate]:
|
|
49
|
-
[CarbonTx.Types.MsgBeginRedelegate]:
|
|
50
|
-
[CarbonTx.Types.MsgWithdrawDelegatorReward]:
|
|
47
|
+
[CarbonTx.Types.MsgDelegate]: utils_1.generateAminoType(MsgDelegate),
|
|
48
|
+
[CarbonTx.Types.MsgUndelegate]: utils_1.generateAminoType(MsgUndelegate),
|
|
49
|
+
[CarbonTx.Types.MsgBeginRedelegate]: utils_1.generateAminoType(MsgBeginRedelegate),
|
|
50
|
+
[CarbonTx.Types.MsgWithdrawDelegatorReward]: utils_1.generateAminoType(MsgWithdrawDelegatorReward),
|
|
51
51
|
};
|
|
52
52
|
exports.default = StakingAmino;
|
|
@@ -39,8 +39,8 @@ const MsgRemoveSubAccount = {
|
|
|
39
39
|
valueMap: {},
|
|
40
40
|
};
|
|
41
41
|
const SubAccountAmino = {
|
|
42
|
-
[CarbonTx.Types.MsgCreateSubAccount]:
|
|
43
|
-
[CarbonTx.Types.MsgActivateSubAccount]:
|
|
44
|
-
[CarbonTx.Types.MsgRemoveSubAccount]:
|
|
42
|
+
[CarbonTx.Types.MsgCreateSubAccount]: utils_1.generateAminoType(MsgCreateSubAccount),
|
|
43
|
+
[CarbonTx.Types.MsgActivateSubAccount]: utils_1.generateAminoType(MsgActivateSubAccount),
|
|
44
|
+
[CarbonTx.Types.MsgRemoveSubAccount]: utils_1.generateAminoType(MsgRemoveSubAccount),
|
|
45
45
|
};
|
|
46
46
|
exports.default = SubAccountAmino;
|