example-js-sdk 0.0.6 → 0.0.7
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/README.md +134 -52
- package/lib/OrbixSDK.d.ts +145 -0
- package/lib/{CarbonSDK.js → OrbixSDK.js} +52 -52
- package/lib/clients/ETHClient.d.ts +10 -10
- package/lib/clients/ETHClient.js +4 -4
- package/lib/clients/{CarbonQueryClient.d.ts → OrbixQueryClient.d.ts} +4 -4
- package/lib/clients/{CarbonQueryClient.js → OrbixQueryClient.js} +2 -2
- package/lib/clients/TokenClient.d.ts +26 -26
- package/lib/clients/TokenClient.js +5 -5
- package/lib/clients/index.d.ts +1 -1
- package/lib/clients/index.js +3 -3
- package/lib/codec/index.d.ts +1 -1
- package/lib/codec/index.js +253 -253
- package/lib/constant/eip712.d.ts +1 -1
- package/lib/constant/eip712.js +3 -3
- package/lib/constant/generic.d.ts +1 -1
- package/lib/constant/generic.js +2 -2
- package/lib/constant/ibc.d.ts +0 -1
- package/lib/constant/ibc.js +0 -32
- package/lib/constant/network.d.ts +2 -2
- package/lib/constant/network.js +3 -3
- package/lib/constant/node.js +2 -74
- package/lib/constant/web3Config.d.ts +5 -5
- package/lib/constant/web3Config.js +18 -22
- package/lib/index.d.ts +3 -3
- package/lib/index.js +7 -7
- package/lib/insights/balance.d.ts +2 -2
- package/lib/modules/admin.d.ts +23 -23
- package/lib/modules/admin.js +43 -43
- package/lib/modules/alliance.d.ts +6 -6
- package/lib/modules/alliance.js +5 -5
- package/lib/modules/bank.d.ts +2 -2
- package/lib/modules/bank.js +1 -1
- package/lib/modules/base.d.ts +4 -4
- package/lib/modules/bridge.d.ts +3 -3
- package/lib/modules/bridge.js +5 -5
- package/lib/modules/broker.d.ts +3 -3
- package/lib/modules/broker.js +2 -2
- package/lib/modules/coin.d.ts +8 -8
- package/lib/modules/coin.js +7 -7
- package/lib/modules/evm.d.ts +2 -2
- package/lib/modules/evm.js +1 -1
- package/lib/modules/evmmerge.d.ts +2 -2
- package/lib/modules/evmmerge.js +3 -3
- package/lib/modules/gov.d.ts +4 -4
- package/lib/modules/gov.js +3 -3
- package/lib/modules/grant.d.ts +4 -4
- package/lib/modules/grant.js +6 -6
- package/lib/modules/ibc.d.ts +3 -3
- package/lib/modules/ibc.js +2 -2
- package/lib/modules/leverage.d.ts +3 -3
- package/lib/modules/leverage.js +2 -2
- package/lib/modules/market.d.ts +15 -15
- package/lib/modules/market.js +7 -7
- package/lib/modules/order.d.ts +8 -8
- package/lib/modules/order.js +7 -7
- package/lib/modules/perpspool.d.ts +14 -14
- package/lib/modules/perpspool.js +23 -23
- package/lib/modules/position.d.ts +3 -3
- package/lib/modules/position.js +2 -2
- package/lib/modules/staking.d.ts +6 -6
- package/lib/modules/subaccount.d.ts +4 -4
- package/lib/modules/subaccount.js +3 -3
- package/lib/provider/amino/types/admin.js +12 -12
- package/lib/provider/amino/types/bank.js +2 -2
- package/lib/provider/amino/types/bridge.js +3 -3
- package/lib/provider/amino/types/broker.js +2 -2
- package/lib/provider/amino/types/coin.js +5 -5
- package/lib/provider/amino/types/evm.js +2 -2
- package/lib/provider/amino/types/evmmerge.js +2 -2
- package/lib/provider/amino/types/feemarket.js +2 -2
- package/lib/provider/amino/types/gov.js +17 -17
- package/lib/provider/amino/types/grant.js +6 -6
- package/lib/provider/amino/types/group.js +4 -4
- package/lib/provider/amino/types/ibc.js +2 -2
- package/lib/provider/amino/types/leverage.js +2 -2
- package/lib/provider/amino/types/market.js +7 -7
- package/lib/provider/amino/types/order.js +5 -5
- package/lib/provider/amino/types/perpspool.js +11 -11
- package/lib/provider/amino/types/position.js +2 -2
- package/lib/provider/amino/types/staking.js +5 -5
- package/lib/provider/amino/types/subaccount.js +4 -4
- package/lib/provider/keplr/KeplrAccount.d.ts +3 -3
- package/lib/provider/keplr/KeplrAccount.js +8 -8
- package/lib/provider/leap/LeapAccount.d.ts +3 -3
- package/lib/provider/leap/LeapAccount.js +7 -7
- package/lib/provider/metamask/MetaMask.d.ts +8 -8
- package/lib/provider/metamask/MetaMask.js +17 -17
- package/lib/provider/rainbowKit/RainbowKitAccount.d.ts +7 -7
- package/lib/provider/rainbowKit/RainbowKitAccount.js +12 -12
- package/lib/provider/sdk/SDKProvider.d.ts +4 -4
- package/lib/util/alliance.js +1 -1
- package/lib/util/blockchain.d.ts +5 -5
- package/lib/util/blockchain.js +11 -11
- package/lib/util/eip712.d.ts +2 -2
- package/lib/util/eip712.js +1 -1
- package/lib/util/ethermint.d.ts +4 -4
- package/lib/util/ethermint.js +1 -1
- package/lib/util/external.d.ts +2 -2
- package/lib/util/gov.js +16 -16
- package/lib/util/index.d.ts +1 -1
- package/lib/util/index.js +2 -2
- package/lib/util/legacyEIP712.js +1 -1
- package/lib/util/network.d.ts +1 -1
- package/lib/util/network.js +7 -7
- package/lib/util/provider.js +1 -1
- package/lib/util/tx.d.ts +3 -3
- package/lib/util/tx.js +9 -9
- package/lib/wallet/{CarbonSigner.d.ts → OrbixSigner.d.ts} +19 -19
- package/lib/wallet/{CarbonSigner.js → OrbixSigner.js} +19 -19
- package/lib/wallet/{CarbonSigningClient.d.ts → OrbixSigningClient.d.ts} +3 -3
- package/lib/wallet/{CarbonSigningClient.js → OrbixSigningClient.js} +9 -9
- package/lib/wallet/{CarbonWallet.d.ts → OrbixWallet.d.ts} +38 -38
- package/lib/wallet/{CarbonWallet.js → OrbixWallet.js} +39 -39
- package/lib/wallet/index.d.ts +2 -2
- package/lib/wallet/index.js +2 -2
- package/package.json +1 -1
- package/lib/CarbonSDK.d.ts +0 -145
- /package/lib/codec/{carbon-models.d.ts → orbix-models.d.ts} +0 -0
- /package/lib/codec/{carbon-models.js → orbix-models.js} +0 -0
package/lib/modules/position.js
CHANGED
|
@@ -17,7 +17,7 @@ class PositionModule extends base_1.default {
|
|
|
17
17
|
margin: params.margin.toString(10),
|
|
18
18
|
});
|
|
19
19
|
return await wallet.sendTx({
|
|
20
|
-
typeUrl: util_1.
|
|
20
|
+
typeUrl: util_1.OrbixTx.Types.MsgSetMargin,
|
|
21
21
|
value,
|
|
22
22
|
}, opts);
|
|
23
23
|
}
|
|
@@ -31,7 +31,7 @@ class PositionModule extends base_1.default {
|
|
|
31
31
|
margin: param.margin.toString(10),
|
|
32
32
|
});
|
|
33
33
|
return {
|
|
34
|
-
typeUrl: util_1.
|
|
34
|
+
typeUrl: util_1.OrbixTx.Types.MsgSetMargin,
|
|
35
35
|
value,
|
|
36
36
|
};
|
|
37
37
|
});
|
package/lib/modules/staking.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OrbixTx } from "../OrbixSDK";
|
|
2
2
|
import BigNumber from "bignumber.js";
|
|
3
3
|
import BaseModule from "./base";
|
|
4
4
|
export declare class StakingModule extends BaseModule {
|
|
5
|
-
delegateTokens(params: StakingModule.DelegateTokensParams, opts?:
|
|
6
|
-
undelegateTokens(params: StakingModule.DelegateTokensParams, opts?:
|
|
7
|
-
redelegateTokens(params: StakingModule.RedelegateTokensParams, opts?:
|
|
8
|
-
withdrawRewards(params: StakingModule.WithdrawRewardsParams, opts?:
|
|
9
|
-
withdrawAllDelegatorRewards(params: StakingModule.WithdrawAllDelegatorRewardsParams, opts?:
|
|
5
|
+
delegateTokens(params: StakingModule.DelegateTokensParams, opts?: OrbixTx.SignTxOpts): Promise<import("../OrbixSDK").OrbixWallet.SendTxResponse>;
|
|
6
|
+
undelegateTokens(params: StakingModule.DelegateTokensParams, opts?: OrbixTx.SignTxOpts): Promise<import("../OrbixSDK").OrbixWallet.SendTxResponse>;
|
|
7
|
+
redelegateTokens(params: StakingModule.RedelegateTokensParams, opts?: OrbixTx.SignTxOpts): Promise<import("../OrbixSDK").OrbixWallet.SendTxResponse>;
|
|
8
|
+
withdrawRewards(params: StakingModule.WithdrawRewardsParams, opts?: OrbixTx.SignTxOpts): Promise<import("../OrbixSDK").OrbixWallet.SendTxResponse>;
|
|
9
|
+
withdrawAllDelegatorRewards(params: StakingModule.WithdrawAllDelegatorRewardsParams, opts?: OrbixTx.SignTxOpts): Promise<import("../OrbixSDK").OrbixWallet.SendTxResponse>;
|
|
10
10
|
}
|
|
11
11
|
export declare namespace StakingModule {
|
|
12
12
|
interface DelegateTokensParams {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OrbixTx } from "../util";
|
|
2
2
|
import BaseModule from "./base";
|
|
3
3
|
export declare class SubAccountModule extends BaseModule {
|
|
4
|
-
create(params: SubAccountModule.CreateSubAccountParams, opts?:
|
|
5
|
-
activate(params: SubAccountModule.ActivateSubAccountParams, opts?:
|
|
6
|
-
remove(params: SubAccountModule.RemoveSubAccountParams, opts?:
|
|
4
|
+
create(params: SubAccountModule.CreateSubAccountParams, opts?: OrbixTx.SignTxOpts): Promise<import("..").OrbixWallet.SendTxResponse>;
|
|
5
|
+
activate(params: SubAccountModule.ActivateSubAccountParams, opts?: OrbixTx.SignTxOpts): Promise<import("..").OrbixWallet.SendTxResponse>;
|
|
6
|
+
remove(params: SubAccountModule.RemoveSubAccountParams, opts?: OrbixTx.SignTxOpts): Promise<import("..").OrbixWallet.SendTxResponse>;
|
|
7
7
|
}
|
|
8
8
|
export declare namespace SubAccountModule {
|
|
9
9
|
interface CreateSubAccountParams {
|
|
@@ -17,7 +17,7 @@ class SubAccountModule extends base_1.default {
|
|
|
17
17
|
role: params.role,
|
|
18
18
|
});
|
|
19
19
|
return await wallet.sendTx({
|
|
20
|
-
typeUrl: util_1.
|
|
20
|
+
typeUrl: util_1.OrbixTx.Types.MsgCreateSubAccount,
|
|
21
21
|
value,
|
|
22
22
|
}, opts);
|
|
23
23
|
}
|
|
@@ -30,7 +30,7 @@ class SubAccountModule extends base_1.default {
|
|
|
30
30
|
role: params.role,
|
|
31
31
|
});
|
|
32
32
|
return await wallet.sendTx({
|
|
33
|
-
typeUrl: util_1.
|
|
33
|
+
typeUrl: util_1.OrbixTx.Types.MsgActivateSubAccount,
|
|
34
34
|
value,
|
|
35
35
|
}, opts);
|
|
36
36
|
}
|
|
@@ -43,7 +43,7 @@ class SubAccountModule extends base_1.default {
|
|
|
43
43
|
role: params.role,
|
|
44
44
|
});
|
|
45
45
|
return await wallet.sendTx({
|
|
46
|
-
typeUrl: util_1.
|
|
46
|
+
typeUrl: util_1.OrbixTx.Types.MsgRemoveSubAccount,
|
|
47
47
|
value,
|
|
48
48
|
}, opts);
|
|
49
49
|
}
|
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
const
|
|
36
|
+
const OrbixTx = __importStar(require("../../../util/tx"));
|
|
37
37
|
const utils_1 = require("../utils");
|
|
38
38
|
const TxTypes = {
|
|
39
39
|
CreateOracle: "oracle/CreateOracle",
|
|
@@ -117,16 +117,16 @@ const MsgEditValidator = {
|
|
|
117
117
|
},
|
|
118
118
|
};
|
|
119
119
|
const AdminAmino = {
|
|
120
|
-
[
|
|
121
|
-
[
|
|
122
|
-
[
|
|
123
|
-
[
|
|
124
|
-
[
|
|
125
|
-
[
|
|
126
|
-
[
|
|
127
|
-
[
|
|
128
|
-
[
|
|
129
|
-
[
|
|
130
|
-
[
|
|
120
|
+
[OrbixTx.Types.MsgCreateOracle]: (0, utils_1.generateAminoType)(MsgCreateOracle),
|
|
121
|
+
[OrbixTx.Types.MsgBindToken]: (0, utils_1.generateAminoType)(MsgBindToken),
|
|
122
|
+
[OrbixTx.Types.MsgCreateToken]: (0, utils_1.generateAminoType)(MsgCreateToken),
|
|
123
|
+
[OrbixTx.Types.MsgCreateMarket]: (0, utils_1.generateAminoType)(MsgCreateMarket),
|
|
124
|
+
[OrbixTx.Types.MsgSetTradingFlag]: (0, utils_1.generateAminoType)(MsgSetTradingFlag),
|
|
125
|
+
[OrbixTx.Types.MsgSetGasCost]: (0, utils_1.generateAminoType)(MsgSetGasCost),
|
|
126
|
+
[OrbixTx.Types.MsgSetMinGasPrice]: (0, utils_1.generateAminoType)(MsgSetMinGasPrice),
|
|
127
|
+
[OrbixTx.Types.MsgRemoveGasCost]: (0, utils_1.generateAminoType)(MsgRemoveGasCost),
|
|
128
|
+
[OrbixTx.Types.MsgRemoveMinGasPrice]: (0, utils_1.generateAminoType)(MsgRemoveMinGasPrice),
|
|
129
|
+
[OrbixTx.Types.MsgCreateValidator]: (0, utils_1.generateAminoType)(MsgCreateValidator),
|
|
130
|
+
[OrbixTx.Types.MsgEditValidator]: (0, utils_1.generateAminoType)(MsgEditValidator),
|
|
131
131
|
};
|
|
132
132
|
exports.default = AdminAmino;
|
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
const
|
|
36
|
+
const OrbixTx = __importStar(require("../../../util/tx"));
|
|
37
37
|
const utils_1 = require("../utils");
|
|
38
38
|
const TxTypes = {
|
|
39
39
|
Send: "cosmos-sdk/MsgSend",
|
|
@@ -43,6 +43,6 @@ const MsgSend = {
|
|
|
43
43
|
valueMap: {},
|
|
44
44
|
};
|
|
45
45
|
const BankAmino = {
|
|
46
|
-
[
|
|
46
|
+
[OrbixTx.Types.MsgSend]: (0, utils_1.generateAminoType)(MsgSend),
|
|
47
47
|
};
|
|
48
48
|
exports.default = BankAmino;
|
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
const
|
|
36
|
+
const OrbixTx = __importStar(require("../../../util/tx"));
|
|
37
37
|
const utils_1 = require("../utils");
|
|
38
38
|
const TxTypes = {
|
|
39
39
|
WithdrawTokenTx: "bridge/MsgWithdrawToken",
|
|
@@ -53,7 +53,7 @@ const MsgWithdrawAndExecuteToken = {
|
|
|
53
53
|
},
|
|
54
54
|
};
|
|
55
55
|
const BridgeAmino = {
|
|
56
|
-
[
|
|
57
|
-
[
|
|
56
|
+
[OrbixTx.Types.MsgWithdrawToken]: (0, utils_1.generateAminoType)(MsgWithdrawToken),
|
|
57
|
+
[OrbixTx.Types.MsgExecuteFromCarbon]: (0, utils_1.generateAminoType)(MsgWithdrawAndExecuteToken),
|
|
58
58
|
};
|
|
59
59
|
exports.default = BridgeAmino;
|
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
const
|
|
36
|
+
const OrbixTx = __importStar(require("../../../util/tx"));
|
|
37
37
|
const utils_1 = require("../utils");
|
|
38
38
|
const TxTypes = {
|
|
39
39
|
InitiateLiquidation: "broker/InitiateLiquidation",
|
|
@@ -43,6 +43,6 @@ const MsgInitiateLiquidation = {
|
|
|
43
43
|
valueMap: {},
|
|
44
44
|
};
|
|
45
45
|
const BrokerAmino = {
|
|
46
|
-
[
|
|
46
|
+
[OrbixTx.Types.MsgInitiateLiquidation]: (0, utils_1.generateAminoType)(MsgInitiateLiquidation),
|
|
47
47
|
};
|
|
48
48
|
exports.default = BrokerAmino;
|
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
const
|
|
36
|
+
const OrbixTx = __importStar(require("../../../util/tx"));
|
|
37
37
|
const utils_1 = require("../utils");
|
|
38
38
|
const TxTypes = {
|
|
39
39
|
MintToken: "carbon/MsgMintToken",
|
|
@@ -58,9 +58,9 @@ const MsgWithdrawFromGroup = {
|
|
|
58
58
|
valueMap: {},
|
|
59
59
|
};
|
|
60
60
|
const CoinAmino = {
|
|
61
|
-
[
|
|
62
|
-
[
|
|
63
|
-
[
|
|
64
|
-
[
|
|
61
|
+
[OrbixTx.Types.MsgWithdraw]: (0, utils_1.generateAminoType)(MsgWithdraw),
|
|
62
|
+
[OrbixTx.Types.MsgMintToken]: (0, utils_1.generateAminoType)(MsgMintToken),
|
|
63
|
+
[OrbixTx.Types.MsgDepositToGroup]: (0, utils_1.generateAminoType)(MsgDepositToGroup),
|
|
64
|
+
[OrbixTx.Types.MsgWithdrawFromGroup]: (0, utils_1.generateAminoType)(MsgWithdrawFromGroup),
|
|
65
65
|
};
|
|
66
66
|
exports.default = CoinAmino;
|
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
const
|
|
36
|
+
const OrbixTx = __importStar(require("../../../util/tx"));
|
|
37
37
|
const utils_1 = require("../utils");
|
|
38
38
|
const TxTypes = {
|
|
39
39
|
EthereumTx: "evm/v1/MsgEthereumTx",
|
|
@@ -43,6 +43,6 @@ const MsgEthereumTx = {
|
|
|
43
43
|
valueMap: {},
|
|
44
44
|
};
|
|
45
45
|
const EvmAmino = {
|
|
46
|
-
[
|
|
46
|
+
[OrbixTx.Types.MsgEthereumTx]: (0, utils_1.generateAminoType)(MsgEthereumTx),
|
|
47
47
|
};
|
|
48
48
|
exports.default = EvmAmino;
|
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
const
|
|
36
|
+
const OrbixTx = __importStar(require("../../../util/tx"));
|
|
37
37
|
const utils_1 = require("../utils");
|
|
38
38
|
const TxTypes = {
|
|
39
39
|
MergeAccount: "evmmerge/MsgMergeAccount",
|
|
@@ -43,6 +43,6 @@ const MsgMergeAccount = {
|
|
|
43
43
|
valueMap: {},
|
|
44
44
|
};
|
|
45
45
|
const EvmMergeAmino = {
|
|
46
|
-
[
|
|
46
|
+
[OrbixTx.Types.MsgMergeAccount]: (0, utils_1.generateAminoType)(MsgMergeAccount),
|
|
47
47
|
};
|
|
48
48
|
exports.default = EvmMergeAmino;
|
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
const
|
|
36
|
+
const OrbixTx = __importStar(require("../../../util/tx"));
|
|
37
37
|
const utils_1 = require("../utils");
|
|
38
38
|
const TxTypes = {
|
|
39
39
|
UpdateParams: "ethermint/feemarket/MsgUpdateParams",
|
|
@@ -43,6 +43,6 @@ const MsgUpdateParams = {
|
|
|
43
43
|
valueMap: {},
|
|
44
44
|
};
|
|
45
45
|
const FeeMarketAmino = {
|
|
46
|
-
[
|
|
46
|
+
[OrbixTx.Types.MsgUpdateParams]: (0, utils_1.generateAminoType)(MsgUpdateParams),
|
|
47
47
|
};
|
|
48
48
|
exports.default = FeeMarketAmino;
|
|
@@ -33,9 +33,9 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
const
|
|
36
|
+
const OrbixSDK_1 = require("../../../OrbixSDK");
|
|
37
37
|
const util_1 = require("../../../util");
|
|
38
|
-
const
|
|
38
|
+
const OrbixTx = __importStar(require("../../../util/tx"));
|
|
39
39
|
const utils_1 = require("../utils");
|
|
40
40
|
const gov_1 = require("../../../codec/cosmos/gov/v1beta1/gov");
|
|
41
41
|
const TxTypes = {
|
|
@@ -204,14 +204,14 @@ const checkEncodeProposal = (content, amino) => {
|
|
|
204
204
|
switch (content.type) {
|
|
205
205
|
case ContentTypes[util_1.GovUtils.ProposalTypes.CreateToken]: {
|
|
206
206
|
const createTokenMsg = preProcessAmino(content.value.msg, CreateToken.value.msg);
|
|
207
|
-
const createTokenProp =
|
|
207
|
+
const createTokenProp = OrbixSDK_1.Orbix.Coin.CreateTokenProposal.fromPartial({
|
|
208
208
|
...content.value,
|
|
209
209
|
msg: createTokenMsg,
|
|
210
210
|
});
|
|
211
211
|
return {
|
|
212
212
|
newContent: {
|
|
213
213
|
typeUrl: util_1.GovUtils.ProposalTypes.CreateToken,
|
|
214
|
-
value:
|
|
214
|
+
value: OrbixSDK_1.Orbix.Coin.CreateTokenProposal.encode(createTokenProp).finish(),
|
|
215
215
|
},
|
|
216
216
|
newAmino: {
|
|
217
217
|
...amino,
|
|
@@ -222,14 +222,14 @@ const checkEncodeProposal = (content, amino) => {
|
|
|
222
222
|
// eg. use fee/SetMsgGasCost instead of fee/SetGasCostProposal (this has been deprecated)
|
|
223
223
|
// case ContentTypes[GovUtils.ProposalTypes.SetMsgGasCost]: {
|
|
224
224
|
// const setMsgGasCostMsg = preProcessAmino(content.value.msg, {});
|
|
225
|
-
// const setMsgGasCostProp =
|
|
225
|
+
// const setMsgGasCostProp = Orbix.Fee.SetMsgGasCostProposal.fromPartial({
|
|
226
226
|
// ...content.value,
|
|
227
227
|
// msg: setMsgGasCostMsg,
|
|
228
228
|
// });
|
|
229
229
|
// return {
|
|
230
230
|
// newContent: {
|
|
231
231
|
// typeUrl: GovUtils.ProposalTypes.SetMsgGasCost,
|
|
232
|
-
// value:
|
|
232
|
+
// value: Orbix.Fee.SetMsgGasCostProposal.encode(setMsgGasCostProp).finish(),
|
|
233
233
|
// },
|
|
234
234
|
// newAmino: {
|
|
235
235
|
// ...amino,
|
|
@@ -238,14 +238,14 @@ const checkEncodeProposal = (content, amino) => {
|
|
|
238
238
|
// }
|
|
239
239
|
// case ContentTypes[GovUtils.ProposalTypes.SetMinGasPrice]: {
|
|
240
240
|
// const setMinGasPriceMsg = preProcessAmino(content.value.msg, {});
|
|
241
|
-
// const setMinGasPriceProp =
|
|
241
|
+
// const setMinGasPriceProp = Orbix.Fee.SetMinGasPriceProposal.fromPartial({
|
|
242
242
|
// ...content.value,
|
|
243
243
|
// msg: setMinGasPriceMsg,
|
|
244
244
|
// });
|
|
245
245
|
// return {
|
|
246
246
|
// newContent: {
|
|
247
247
|
// typeUrl: GovUtils.ProposalTypes.SetMinGasPrice,
|
|
248
|
-
// value:
|
|
248
|
+
// value: Orbix.Fee.SetMinGasPriceProposal.encode(setMinGasPriceProp).finish(),
|
|
249
249
|
// },
|
|
250
250
|
// newAmino: {
|
|
251
251
|
// ...amino,
|
|
@@ -254,14 +254,14 @@ const checkEncodeProposal = (content, amino) => {
|
|
|
254
254
|
// }
|
|
255
255
|
// case ContentTypes[GovUtils.ProposalTypes.RemoveMsgGasCost]: {
|
|
256
256
|
// const removeMsgGasCostMsg = preProcessAmino(content.value.msg, {});
|
|
257
|
-
// const removeMsgGasCostProp =
|
|
257
|
+
// const removeMsgGasCostProp = Orbix.Fee.RemoveMsgGasCostProposal.fromPartial({
|
|
258
258
|
// ...content.value,
|
|
259
259
|
// msg: removeMsgGasCostMsg,
|
|
260
260
|
// });
|
|
261
261
|
// return {
|
|
262
262
|
// newContent: {
|
|
263
263
|
// typeUrl: GovUtils.ProposalTypes.RemoveMsgGasCost,
|
|
264
|
-
// value:
|
|
264
|
+
// value: Orbix.Fee.RemoveMsgGasCostProposal.encode(removeMsgGasCostProp).finish(),
|
|
265
265
|
// },
|
|
266
266
|
// newAmino: {
|
|
267
267
|
// ...amino,
|
|
@@ -270,14 +270,14 @@ const checkEncodeProposal = (content, amino) => {
|
|
|
270
270
|
// }
|
|
271
271
|
// case ContentTypes[GovUtils.ProposalTypes.RemoveMinGasPrice]: {
|
|
272
272
|
// const removeMinGasPriceMsg = preProcessAmino(content.value.msg, {});
|
|
273
|
-
// const removeMinGasPriceProp =
|
|
273
|
+
// const removeMinGasPriceProp = Orbix.Fee.RemoveMinGasPriceProposal.fromPartial({
|
|
274
274
|
// ...content.value,
|
|
275
275
|
// msg: removeMinGasPriceMsg,
|
|
276
276
|
// });
|
|
277
277
|
// return {
|
|
278
278
|
// newContent: {
|
|
279
279
|
// typeUrl: GovUtils.ProposalTypes.RemoveMinGasPrice,
|
|
280
|
-
// value:
|
|
280
|
+
// value: Orbix.Fee.RemoveMinGasPriceProposal.encode(removeMinGasPriceProp).finish(),
|
|
281
281
|
// },
|
|
282
282
|
// newAmino: {
|
|
283
283
|
// ...amino,
|
|
@@ -286,14 +286,14 @@ const checkEncodeProposal = (content, amino) => {
|
|
|
286
286
|
// }
|
|
287
287
|
case ContentTypes[util_1.GovUtils.ProposalTypes.UpdateMarket]: {
|
|
288
288
|
const updateMarketMsg = preProcessAmino(content.value.msg, UpdateMarket.value.msg);
|
|
289
|
-
const updateMarketProp =
|
|
289
|
+
const updateMarketProp = OrbixSDK_1.Orbix.Market.UpdateMarketProposal.fromPartial({
|
|
290
290
|
...content.value,
|
|
291
291
|
msg: updateMarketMsg,
|
|
292
292
|
});
|
|
293
293
|
return {
|
|
294
294
|
newContent: {
|
|
295
295
|
typeUrl: util_1.GovUtils.ProposalTypes.UpdateMarket,
|
|
296
|
-
value:
|
|
296
|
+
value: OrbixSDK_1.Orbix.Market.UpdateMarketProposal.encode(updateMarketProp).finish(),
|
|
297
297
|
},
|
|
298
298
|
newAmino: {
|
|
299
299
|
...amino,
|
|
@@ -351,8 +351,8 @@ const proposalAminoProcess = {
|
|
|
351
351
|
},
|
|
352
352
|
};
|
|
353
353
|
const GovAmino = {
|
|
354
|
-
[
|
|
355
|
-
[
|
|
356
|
-
[
|
|
354
|
+
[OrbixTx.Types.MsgSubmitProposal]: (0, utils_1.generateAminoType)(SubmitProposalMsg, proposalAminoProcess),
|
|
355
|
+
[OrbixTx.Types.MsgDeposit]: (0, utils_1.generateAminoType)(MsgDeposit),
|
|
356
|
+
[OrbixTx.Types.MsgVote]: (0, utils_1.generateAminoType)(MsgVote),
|
|
357
357
|
};
|
|
358
358
|
exports.default = GovAmino;
|
|
@@ -35,7 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
const codec_1 = require("../../../codec");
|
|
37
37
|
const util_1 = require("../../../util");
|
|
38
|
-
const
|
|
38
|
+
const OrbixTx = __importStar(require("../../../util/tx"));
|
|
39
39
|
const utils_1 = require("../utils");
|
|
40
40
|
const grant_1 = require("../../../util/grant");
|
|
41
41
|
const feegrant_1 = require("../../../codec/cosmos/feegrant/v1beta1/feegrant");
|
|
@@ -205,11 +205,11 @@ const msgExecProcess = {
|
|
|
205
205
|
},
|
|
206
206
|
};
|
|
207
207
|
const GrantAmino = {
|
|
208
|
-
[
|
|
209
|
-
[
|
|
210
|
-
[
|
|
211
|
-
[
|
|
212
|
-
[
|
|
208
|
+
[OrbixTx.Types.MsgGrant]: (0, utils_1.generateAminoType)(MsgGrantAuthz, grantAuthzAminoProcess),
|
|
209
|
+
[OrbixTx.Types.MsgRevoke]: (0, utils_1.generateAminoType)(MsgRevokeAuthz),
|
|
210
|
+
[OrbixTx.Types.MsgGrantAllowance]: (0, utils_1.generateAminoType)(MsgFeeGrantAllowance, feegrantAminoProcess),
|
|
211
|
+
[OrbixTx.Types.MsgRevokeAllowance]: (0, utils_1.generateAminoType)(MsgRevokeAllowance),
|
|
212
|
+
[OrbixTx.Types.MsgExec]: (0, utils_1.generateAminoType)(MsgExec, msgExecProcess),
|
|
213
213
|
[grant_1.GrantTypes.GenericAuthorization]: (0, utils_1.generateAminoType)(GenericAuthorizationAminoType),
|
|
214
214
|
[grant_1.GrantTypes.AllowedMsgAllowance]: (0, utils_1.generateAminoType)(AllowedMsgAllowanceAminoType),
|
|
215
215
|
[grant_1.GrantTypes.BasicAllowance]: (0, utils_1.generateAminoType)(BasicAllowanceAminoType),
|
|
@@ -34,7 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
const utils_1 = require("../utils");
|
|
37
|
-
const
|
|
37
|
+
const OrbixTx = __importStar(require("../../../util/tx"));
|
|
38
38
|
const TxTypes = {
|
|
39
39
|
MsgGroupVote: "cosmos-sdk/group/MsgVote",
|
|
40
40
|
MsgGroupExec: "cosmos-sdk/group/MsgExec",
|
|
@@ -57,8 +57,8 @@ const _MsgSubmit = {
|
|
|
57
57
|
valueMap: {},
|
|
58
58
|
};
|
|
59
59
|
const GroupAmino = {
|
|
60
|
-
[
|
|
61
|
-
[
|
|
62
|
-
[
|
|
60
|
+
[OrbixTx.Types.MsgGroupVote]: (0, utils_1.generateAminoType)(_MsgGroupVote),
|
|
61
|
+
[OrbixTx.Types.MsgGroupExec]: (0, utils_1.generateAminoType)(_MsgExec),
|
|
62
|
+
[OrbixTx.Types.MsgGroupSubmitProposal]: (0, utils_1.generateAminoType)(_MsgSubmit),
|
|
63
63
|
};
|
|
64
64
|
exports.default = GroupAmino;
|
|
@@ -36,7 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
36
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
const
|
|
39
|
+
const OrbixTx = __importStar(require("../../../util/tx"));
|
|
40
40
|
const long_1 = __importDefault(require("long"));
|
|
41
41
|
const utils_1 = require("../utils");
|
|
42
42
|
const TxTypes = {
|
|
@@ -69,6 +69,6 @@ const pruneTransferProcess = {
|
|
|
69
69
|
},
|
|
70
70
|
};
|
|
71
71
|
const IbcAmino = {
|
|
72
|
-
[
|
|
72
|
+
[OrbixTx.Types.MsgTransfer]: (0, utils_1.generateAminoType)(MsgTransfer, pruneTransferProcess),
|
|
73
73
|
};
|
|
74
74
|
exports.default = IbcAmino;
|
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
const
|
|
36
|
+
const OrbixTx = __importStar(require("../../../util/tx"));
|
|
37
37
|
const utils_1 = require("../utils");
|
|
38
38
|
const TxTypes = {
|
|
39
39
|
SetLeverage: "leverage/SetLeverage",
|
|
@@ -45,6 +45,6 @@ const MsgSetLeverage = {
|
|
|
45
45
|
},
|
|
46
46
|
};
|
|
47
47
|
const LeverageAmino = {
|
|
48
|
-
[
|
|
48
|
+
[OrbixTx.Types.MsgSetLeverage]: (0, utils_1.generateAminoType)(MsgSetLeverage),
|
|
49
49
|
};
|
|
50
50
|
exports.default = LeverageAmino;
|
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
const
|
|
36
|
+
const OrbixTx = __importStar(require("../../../util/tx"));
|
|
37
37
|
const utils_1 = require("../utils");
|
|
38
38
|
const TxTypes = {
|
|
39
39
|
UpdateMarket: "market/UpdateMarket",
|
|
@@ -94,11 +94,11 @@ const MsgSetStakeEquivalence = {
|
|
|
94
94
|
},
|
|
95
95
|
};
|
|
96
96
|
const MarketAmino = {
|
|
97
|
-
[
|
|
98
|
-
[
|
|
99
|
-
[
|
|
100
|
-
[
|
|
101
|
-
[
|
|
102
|
-
[
|
|
97
|
+
[OrbixTx.Types.MsgUpdateMarket]: (0, utils_1.generateAminoType)(MsgUpdateMarket),
|
|
98
|
+
[OrbixTx.Types.MsgSettleSpotMarket]: (0, utils_1.generateAminoType)(MsgSettleSpotMarket),
|
|
99
|
+
[OrbixTx.Types.MsgAddFeeTier]: (0, utils_1.generateAminoType)(MsgAddFeeTier),
|
|
100
|
+
[OrbixTx.Types.MsgRemoveFeeTier]: (0, utils_1.generateAminoType)(MsgRemoveFeeTier),
|
|
101
|
+
[OrbixTx.Types.MsgUpdateFeeTier]: (0, utils_1.generateAminoType)(MsgUpdateFeeTier),
|
|
102
|
+
[OrbixTx.Types.MsgSetStakeEquivalence]: (0, utils_1.generateAminoType)(MsgSetStakeEquivalence),
|
|
103
103
|
};
|
|
104
104
|
exports.default = MarketAmino;
|
|
@@ -34,7 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
const util_1 = require("../../../util");
|
|
37
|
-
const
|
|
37
|
+
const OrbixTx = __importStar(require("../../../util/tx"));
|
|
38
38
|
const utils_1 = require("../utils");
|
|
39
39
|
const TxTypes = {
|
|
40
40
|
CreateOrder: "order/CreateOrder",
|
|
@@ -97,9 +97,9 @@ const createOrderProcess = {
|
|
|
97
97
|
},
|
|
98
98
|
};
|
|
99
99
|
const OrderAmino = {
|
|
100
|
-
[
|
|
101
|
-
[
|
|
102
|
-
[
|
|
103
|
-
[
|
|
100
|
+
[OrbixTx.Types.MsgCreateOrder]: (0, utils_1.generateAminoType)(MsgCreateOrder, createOrderProcess),
|
|
101
|
+
[OrbixTx.Types.MsgCancelOrder]: (0, utils_1.generateAminoType)(MsgCancelOrder),
|
|
102
|
+
[OrbixTx.Types.MsgEditOrder]: (0, utils_1.generateAminoType)(MsgEditOrder),
|
|
103
|
+
[OrbixTx.Types.MsgCancelAll]: (0, utils_1.generateAminoType)(MsgCancelAll),
|
|
104
104
|
};
|
|
105
105
|
exports.default = OrderAmino;
|
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
const
|
|
36
|
+
const OrbixTx = __importStar(require("../../../util/tx"));
|
|
37
37
|
const utils_1 = require("../utils");
|
|
38
38
|
const TxTypes = {
|
|
39
39
|
CreatePool: "perpspool/CreatePool",
|
|
@@ -107,15 +107,15 @@ const MsgReleaseUserVaultWithdrawal = {
|
|
|
107
107
|
},
|
|
108
108
|
};
|
|
109
109
|
const PerpspoolAmino = {
|
|
110
|
-
[
|
|
111
|
-
[
|
|
112
|
-
[
|
|
113
|
-
[
|
|
114
|
-
[
|
|
115
|
-
[
|
|
116
|
-
[
|
|
117
|
-
[
|
|
118
|
-
[
|
|
119
|
-
[
|
|
110
|
+
[OrbixTx.Types.MsgCreatePool]: (0, utils_1.generateAminoType)(MsgCreatePool),
|
|
111
|
+
[OrbixTx.Types.MsgUpdatePool]: (0, utils_1.generateAminoType)(MsgUpdatePool),
|
|
112
|
+
[OrbixTx.Types.MsgRegisterToPool]: (0, utils_1.generateAminoType)(MsgRegisterToPool),
|
|
113
|
+
[OrbixTx.Types.MsgDeregisterFromPool]: (0, utils_1.generateAminoType)(MsgDeregisterFromPool),
|
|
114
|
+
[OrbixTx.Types.MsgDepositToPool]: (0, utils_1.generateAminoType)(MsgDepositToPool),
|
|
115
|
+
[OrbixTx.Types.MsgWithdrawFromPool]: (0, utils_1.generateAminoType)(MsgWithdrawFromPool),
|
|
116
|
+
[OrbixTx.Types.MsgCreateUserVault]: (0, utils_1.generateAminoType)(MsgCreateUserVault),
|
|
117
|
+
[OrbixTx.Types.MsgCloseUserVault]: (0, utils_1.generateAminoType)(MsgCloseUserVault),
|
|
118
|
+
[OrbixTx.Types.MsgUpdateUserVault]: (0, utils_1.generateAminoType)(MsgUpdateUserVault),
|
|
119
|
+
[OrbixTx.Types.MsgReleaseUserVaultWithdrawal]: (0, utils_1.generateAminoType)(MsgReleaseUserVaultWithdrawal),
|
|
120
120
|
};
|
|
121
121
|
exports.default = PerpspoolAmino;
|
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
const
|
|
36
|
+
const OrbixTx = __importStar(require("../../../util/tx"));
|
|
37
37
|
const utils_1 = require("../utils");
|
|
38
38
|
const TxTypes = {
|
|
39
39
|
SetMargin: "position/SetMargin",
|
|
@@ -43,6 +43,6 @@ const MsgSetMargin = {
|
|
|
43
43
|
valueMap: {},
|
|
44
44
|
};
|
|
45
45
|
const PositionAmino = {
|
|
46
|
-
[
|
|
46
|
+
[OrbixTx.Types.MsgSetMargin]: (0, utils_1.generateAminoType)(MsgSetMargin),
|
|
47
47
|
};
|
|
48
48
|
exports.default = PositionAmino;
|
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
const
|
|
36
|
+
const OrbixTx = __importStar(require("../../../util/tx"));
|
|
37
37
|
const utils_1 = require("../utils");
|
|
38
38
|
const TxTypes = {
|
|
39
39
|
Delegate: "cosmos-sdk/MsgDelegate",
|
|
@@ -58,9 +58,9 @@ const MsgWithdrawDelegatorReward = {
|
|
|
58
58
|
valueMap: {},
|
|
59
59
|
};
|
|
60
60
|
const StakingAmino = {
|
|
61
|
-
[
|
|
62
|
-
[
|
|
63
|
-
[
|
|
64
|
-
[
|
|
61
|
+
[OrbixTx.Types.MsgDelegate]: (0, utils_1.generateAminoType)(MsgDelegate),
|
|
62
|
+
[OrbixTx.Types.MsgUndelegate]: (0, utils_1.generateAminoType)(MsgUndelegate),
|
|
63
|
+
[OrbixTx.Types.MsgBeginRedelegate]: (0, utils_1.generateAminoType)(MsgBeginRedelegate),
|
|
64
|
+
[OrbixTx.Types.MsgWithdrawDelegatorReward]: (0, utils_1.generateAminoType)(MsgWithdrawDelegatorReward),
|
|
65
65
|
};
|
|
66
66
|
exports.default = StakingAmino;
|
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
const
|
|
36
|
+
const OrbixTx = __importStar(require("../../../util/tx"));
|
|
37
37
|
const utils_1 = require("../utils");
|
|
38
38
|
const TxTypes = {
|
|
39
39
|
CreateSubAccount: "subaccount/CreateSubAccount",
|
|
@@ -53,8 +53,8 @@ const MsgRemoveSubAccount = {
|
|
|
53
53
|
valueMap: {},
|
|
54
54
|
};
|
|
55
55
|
const SubAccountAmino = {
|
|
56
|
-
[
|
|
57
|
-
[
|
|
58
|
-
[
|
|
56
|
+
[OrbixTx.Types.MsgCreateSubAccount]: (0, utils_1.generateAminoType)(MsgCreateSubAccount),
|
|
57
|
+
[OrbixTx.Types.MsgActivateSubAccount]: (0, utils_1.generateAminoType)(MsgActivateSubAccount),
|
|
58
|
+
[OrbixTx.Types.MsgRemoveSubAccount]: (0, utils_1.generateAminoType)(MsgRemoveSubAccount),
|
|
59
59
|
};
|
|
60
60
|
exports.default = SubAccountAmino;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OrbixSigner } from "../../wallet";
|
|
2
2
|
import { AppCurrency, ChainInfo, FeeCurrency, Keplr, Key } from "@keplr-wallet/types";
|
|
3
3
|
import SDKProvider from "../sdk";
|
|
4
4
|
declare class KeplrAccount {
|
|
@@ -15,8 +15,8 @@ declare class KeplrAccount {
|
|
|
15
15
|
readonly high: number;
|
|
16
16
|
} | undefined;
|
|
17
17
|
};
|
|
18
|
-
static createKeplrSigner(keplr: Keplr, chainInfo: ChainInfo, account: Key):
|
|
19
|
-
static createKeplrSignerAmino(keplr: Keplr, chainInfo: ChainInfo, account: Key):
|
|
18
|
+
static createKeplrSigner(keplr: Keplr, chainInfo: ChainInfo, account: Key): OrbixSigner;
|
|
19
|
+
static createKeplrSignerAmino(keplr: Keplr, chainInfo: ChainInfo, account: Key): OrbixSigner;
|
|
20
20
|
static queryFeeCurrencies(configProvider: SDKProvider): Promise<FeeCurrency[]>;
|
|
21
21
|
static processCurrencies(feeCurrencies: FeeCurrency[]): AppCurrency[];
|
|
22
22
|
static getChainInfo(configProvider: SDKProvider): Promise<ChainInfo>;
|