carbon-js-sdk 0.2.0 → 0.2.2
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/examples/connect_sdk.ts +4 -4
- package/lib/clients/CarbonQueryClient.js +1 -1
- package/lib/clients/CarbonQueryClient.js.map +1 -1
- package/lib/clients/ETHClient.js +15 -15
- package/lib/clients/ETHClient.js.map +1 -1
- package/lib/clients/HydrogenClient.js +1 -1
- package/lib/clients/HydrogenClient.js.map +1 -1
- package/lib/clients/NEOClient.js +6 -6
- package/lib/clients/NEOClient.js.map +1 -1
- package/lib/clients/ZILClient.js +16 -16
- package/lib/clients/ZILClient.js.map +1 -1
- package/lib/codec/cdp/asset_params.d.ts +26 -0
- package/lib/codec/cdp/asset_params.d.ts.map +1 -0
- package/lib/codec/cdp/asset_params.js +158 -0
- package/lib/codec/cdp/asset_params.js.map +1 -0
- package/lib/codec/cdp/debt_info.d.ts +23 -0
- package/lib/codec/cdp/debt_info.d.ts.map +1 -0
- package/lib/codec/cdp/debt_info.js +143 -0
- package/lib/codec/cdp/debt_info.js.map +1 -0
- package/lib/codec/cdp/params.d.ts +19 -0
- package/lib/codec/cdp/params.d.ts.map +1 -0
- package/lib/codec/cdp/params.js +47 -0
- package/lib/codec/cdp/params.js.map +1 -0
- package/lib/codec/cdp/rate_strategy_params.d.ts +27 -0
- package/lib/codec/cdp/rate_strategy_params.d.ts.map +1 -0
- package/lib/codec/cdp/rate_strategy_params.js +181 -0
- package/lib/codec/cdp/rate_strategy_params.js.map +1 -0
- package/lib/codec/cosmos/gov/v1beta1/query.js +2 -2
- package/lib/codec/cosmos/gov/v1beta1/query.js.map +1 -1
- package/lib/codec/cosmos/gov/v1beta1/tx.js +2 -2
- package/lib/codec/cosmos/gov/v1beta1/tx.js.map +1 -1
- package/lib/codec/cosmos/tx/v1beta1/tx.js +2 -2
- package/lib/codec/cosmos/tx/v1beta1/tx.js.map +1 -1
- package/lib/constant/generic.js +1 -1
- package/lib/constant/generic.js.map +1 -1
- package/lib/constant/ibc.d.ts.map +1 -1
- package/lib/constant/ibc.js +13 -8
- package/lib/constant/ibc.js.map +1 -1
- package/lib/modules/admin.d.ts +26 -25
- package/lib/modules/admin.d.ts.map +1 -1
- package/lib/modules/admin.js +50 -50
- package/lib/modules/admin.js.map +1 -1
- package/lib/modules/bank.d.ts +2 -1
- package/lib/modules/bank.d.ts.map +1 -1
- package/lib/modules/bank.js +2 -2
- package/lib/modules/bank.js.map +1 -1
- package/lib/modules/broker.d.ts +3 -2
- package/lib/modules/broker.d.ts.map +1 -1
- package/lib/modules/broker.js +4 -4
- package/lib/modules/broker.js.map +1 -1
- package/lib/modules/cdp.d.ts +5 -4
- package/lib/modules/cdp.d.ts.map +1 -1
- package/lib/modules/cdp.js +8 -8
- package/lib/modules/cdp.js.map +1 -1
- package/lib/modules/coin.d.ts +3 -2
- package/lib/modules/coin.d.ts.map +1 -1
- package/lib/modules/coin.js +4 -4
- package/lib/modules/coin.js.map +1 -1
- package/lib/modules/gov.d.ts +4 -3
- package/lib/modules/gov.d.ts.map +1 -1
- package/lib/modules/gov.js +20 -20
- package/lib/modules/gov.js.map +1 -1
- package/lib/modules/ibc.d.ts +2 -2
- package/lib/modules/ibc.d.ts.map +1 -1
- package/lib/modules/ibc.js +1 -5
- package/lib/modules/ibc.js.map +1 -1
- package/lib/modules/leverage.d.ts +3 -2
- package/lib/modules/leverage.d.ts.map +1 -1
- package/lib/modules/leverage.js +4 -4
- package/lib/modules/leverage.js.map +1 -1
- package/lib/modules/liquiditypool.d.ts +9 -8
- package/lib/modules/liquiditypool.d.ts.map +1 -1
- package/lib/modules/liquiditypool.js +17 -17
- package/lib/modules/liquiditypool.js.map +1 -1
- package/lib/modules/market.d.ts +2 -1
- package/lib/modules/market.d.ts.map +1 -1
- package/lib/modules/market.js +2 -2
- package/lib/modules/market.js.map +1 -1
- package/lib/modules/oracle.d.ts +2 -1
- package/lib/modules/oracle.d.ts.map +1 -1
- package/lib/modules/oracle.js +2 -2
- package/lib/modules/oracle.js.map +1 -1
- package/lib/modules/order.d.ts +9 -7
- package/lib/modules/order.d.ts.map +1 -1
- package/lib/modules/order.js +18 -14
- package/lib/modules/order.js.map +1 -1
- package/lib/modules/position.d.ts +3 -2
- package/lib/modules/position.d.ts.map +1 -1
- package/lib/modules/position.js +4 -4
- package/lib/modules/position.js.map +1 -1
- package/lib/modules/profile.d.ts +2 -1
- package/lib/modules/profile.d.ts.map +1 -1
- package/lib/modules/profile.js +2 -2
- package/lib/modules/profile.js.map +1 -1
- package/lib/modules/staking.d.ts +6 -5
- package/lib/modules/staking.d.ts.map +1 -1
- package/lib/modules/staking.js +10 -10
- package/lib/modules/staking.js.map +1 -1
- package/lib/modules/subaccount.d.ts +4 -3
- package/lib/modules/subaccount.d.ts.map +1 -1
- package/lib/modules/subaccount.js +6 -6
- package/lib/modules/subaccount.js.map +1 -1
- package/lib/modules/xchain.d.ts +4 -3
- package/lib/modules/xchain.d.ts.map +1 -1
- package/lib/modules/xchain.js +6 -6
- package/lib/modules/xchain.js.map +1 -1
- package/lib/provider/account/EthLedgerAccount/EthLedgerAccount.js +1 -1
- package/lib/provider/account/EthLedgerAccount/EthLedgerAccount.js.map +1 -1
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/ErrorCode.js +1 -1
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/ErrorCode.js.map +1 -1
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/main.js +8 -8
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/main.js.map +1 -1
- package/lib/provider/account/NeoLedgerAccount/NeoLedgerAccount.js +3 -3
- package/lib/provider/account/NeoLedgerAccount/NeoLedgerAccount.js.map +1 -1
- package/lib/provider/account/NeoLedgerAccount/NeonLedger.js +1 -1
- package/lib/provider/account/NeoLedgerAccount/NeonLedger.js.map +1 -1
- package/lib/provider/amino/types/admin.js +20 -20
- package/lib/provider/amino/types/admin.js.map +1 -1
- package/lib/provider/amino/types/bank.js +1 -1
- package/lib/provider/amino/types/bank.js.map +1 -1
- package/lib/provider/amino/types/broker.js +1 -1
- package/lib/provider/amino/types/broker.js.map +1 -1
- package/lib/provider/amino/types/cdp.js +4 -4
- package/lib/provider/amino/types/cdp.js.map +1 -1
- package/lib/provider/amino/types/coin.js +2 -2
- package/lib/provider/amino/types/coin.js.map +1 -1
- package/lib/provider/amino/types/gov.js +4 -4
- package/lib/provider/amino/types/gov.js.map +1 -1
- package/lib/provider/amino/types/ibc.js +1 -1
- package/lib/provider/amino/types/ibc.js.map +1 -1
- package/lib/provider/amino/types/leverage.js +1 -1
- package/lib/provider/amino/types/leverage.js.map +1 -1
- package/lib/provider/amino/types/liquidityPool.js +7 -7
- package/lib/provider/amino/types/liquidityPool.js.map +1 -1
- package/lib/provider/amino/types/market.js +1 -1
- package/lib/provider/amino/types/market.js.map +1 -1
- package/lib/provider/amino/types/oracle.js +1 -1
- package/lib/provider/amino/types/oracle.js.map +1 -1
- package/lib/provider/amino/types/order.js +4 -4
- package/lib/provider/amino/types/order.js.map +1 -1
- package/lib/provider/amino/types/position.js +1 -1
- package/lib/provider/amino/types/position.js.map +1 -1
- package/lib/provider/amino/types/profile.js +1 -1
- package/lib/provider/amino/types/profile.js.map +1 -1
- package/lib/provider/amino/types/staking.js +4 -4
- package/lib/provider/amino/types/staking.js.map +1 -1
- package/lib/provider/amino/types/subaccount.js +3 -3
- package/lib/provider/amino/types/subaccount.js.map +1 -1
- package/lib/provider/amino/utils.js +11 -11
- package/lib/provider/amino/utils.js.map +1 -1
- package/lib/provider/keplr/KeplrStore.js +1 -1
- package/lib/provider/keplr/KeplrStore.js.map +1 -1
- package/lib/provider/ledger/ledger.js +2 -2
- package/lib/provider/ledger/ledger.js.map +1 -1
- package/lib/provider/metamask/MetaMask.js +1 -1
- package/lib/provider/metamask/MetaMask.js.map +1 -1
- package/lib/provider/o3/O3Wallet.js +2 -2
- package/lib/provider/o3/O3Wallet.js.map +1 -1
- package/lib/util/address.js +13 -13
- package/lib/util/address.js.map +1 -1
- package/lib/util/api.js +4 -4
- package/lib/util/api.js.map +1 -1
- package/lib/util/fetch.js +1 -1
- package/lib/util/fetch.js.map +1 -1
- package/lib/util/generic.js +3 -3
- package/lib/util/generic.js.map +1 -1
- package/lib/util/number.js +5 -5
- package/lib/util/number.js.map +1 -1
- package/lib/wallet/CarbonSigner.js +2 -2
- package/lib/wallet/CarbonSigner.js.map +1 -1
- package/lib/wallet/CarbonSigningClient.js +8 -8
- package/lib/wallet/CarbonSigningClient.js.map +1 -1
- package/lib/wallet/CarbonWallet.js +6 -6
- package/lib/wallet/CarbonWallet.js.map +1 -1
- package/lib/websocket/connector.js +3 -3
- package/lib/websocket/connector.js.map +1 -1
- package/package.json +1 -1
package/lib/modules/bank.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { CarbonTx } from "../util";
|
|
1
2
|
import { Coin } from "@cosmjs/amino";
|
|
2
3
|
import BaseModule from "./base";
|
|
3
4
|
export declare class BankModule extends BaseModule {
|
|
4
|
-
sendTokens(params: BankModule.SendTokensParams): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
5
|
+
sendTokens(params: BankModule.SendTokensParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
5
6
|
}
|
|
6
7
|
export declare namespace BankModule {
|
|
7
8
|
interface SendTokensParams {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bank.d.ts","sourceRoot":"","sources":["../../src/modules/bank.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bank.d.ts","sourceRoot":"","sources":["../../src/modules/bank.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,UAAU,MAAM,QAAQ,CAAC;AAEhC,qBAAa,UAAW,SAAQ,UAAU;IAE3B,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,gBAAgB,EAAE,IAAI,CAAC,EAAE,QAAQ,CAAC,UAAU;CAexF;AAED,yBAAiB,UAAU,CAAC;IAC1B,UAAiB,gBAAgB;QAC/B,WAAW,EAAE,MAAM,CAAA;QACnB,SAAS,EAAE,MAAM,CAAA;QACjB,MAAM,EAAE,IAAI,EAAE,CAAA;QACd,IAAI,CAAC,EAAE,MAAM,CAAA;KACd;CACF"}
|
package/lib/modules/bank.js
CHANGED
|
@@ -17,7 +17,7 @@ const tx_1 = require("../codec/cosmos/bank/v1beta1/tx");
|
|
|
17
17
|
const util_1 = require("../util");
|
|
18
18
|
const base_1 = __importDefault(require("./base"));
|
|
19
19
|
class BankModule extends base_1.default {
|
|
20
|
-
sendTokens(params) {
|
|
20
|
+
sendTokens(params, opts) {
|
|
21
21
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22
22
|
const wallet = this.getWallet();
|
|
23
23
|
const value = tx_1.MsgSend.fromPartial({
|
|
@@ -28,7 +28,7 @@ class BankModule extends base_1.default {
|
|
|
28
28
|
return yield wallet.sendTx({
|
|
29
29
|
typeUrl: util_1.CarbonTx.Types.MsgSend,
|
|
30
30
|
value,
|
|
31
|
-
}, { memo: params.memo });
|
|
31
|
+
}, Object.assign({ memo: params.memo }, opts));
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
}
|
package/lib/modules/bank.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bank.js","sourceRoot":"","sources":["../../src/modules/bank.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,iEAAmE;AACnE,2CAA4C;AAE5C,kDAAgC;AAEhC,MAAa,UAAW,SAAQ,cAAU;IAE3B,UAAU,CAAC,MAAmC;;
|
|
1
|
+
{"version":3,"file":"bank.js","sourceRoot":"","sources":["../../src/modules/bank.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,iEAAmE;AACnE,2CAA4C;AAE5C,kDAAgC;AAEhC,MAAa,UAAW,SAAQ,cAAU;IAE3B,UAAU,CAAC,MAAmC,EAAE,IAA0B;;YACrF,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;YAEhC,MAAM,KAAK,GAAG,YAAO,CAAC,WAAW,CAAC;gBAChC,WAAW,EAAE,MAAM,CAAC,WAAW;gBAC/B,SAAS,EAAE,MAAM,CAAC,SAAS;gBAC3B,MAAM,EAAE,MAAM,CAAC,MAAM;aACtB,CAAC,CAAA;YAEF,OAAO,MAAM,MAAM,CAAC,MAAM,CAAC;gBACzB,OAAO,EAAE,eAAQ,CAAC,KAAK,CAAC,OAAO;gBAC/B,KAAK;aACN,kBAAI,IAAI,EAAE,MAAM,CAAC,IAAI,IAAK,IAAI,EAAG,CAAC;QACrC,CAAC;KAAA;CAEF;AAjBD,gCAiBC;AASA,CAAC"}
|
package/lib/modules/broker.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { CarbonTx } from "../util";
|
|
1
2
|
import BaseModule from "./base";
|
|
2
3
|
export declare class BrokerModule extends BaseModule {
|
|
3
|
-
initiateLiquidation(params: BrokerModule.InitiateLiquidationParams): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
4
|
-
initiateLiquidations(params: BrokerModule.InitiateLiquidationParams[]): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
4
|
+
initiateLiquidation(params: BrokerModule.InitiateLiquidationParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
5
|
+
initiateLiquidations(params: BrokerModule.InitiateLiquidationParams[], opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
5
6
|
}
|
|
6
7
|
export declare namespace BrokerModule {
|
|
7
8
|
export interface InitiateLiquidationParams {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"broker.d.ts","sourceRoot":"","sources":["../../src/modules/broker.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"broker.d.ts","sourceRoot":"","sources":["../../src/modules/broker.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,UAAU,MAAM,QAAQ,CAAC;AAEhC,qBAAa,YAAa,SAAQ,UAAU;IAE7B,mBAAmB,CAAC,MAAM,EAAE,YAAY,CAAC,yBAAyB,EAAE,IAAI,CAAC,EAAE,QAAQ,CAAC,UAAU;IAc9F,oBAAoB,CAAC,MAAM,EAAE,YAAY,CAAC,yBAAyB,EAAE,EAAE,IAAI,CAAC,EAAE,QAAQ,CAAC,UAAU;CAiB/G;AAED,yBAAiB,YAAY,CAAC;IAC5B,MAAM,WAAW,yBAAyB;QACxC,SAAS,EAAE,mBAAmB,EAAE,CAAA;KACjC;IAED,UAAU,mBAAmB;QACzB,MAAM,EAAE,MAAM,CAAA;QACd,OAAO,EAAE,MAAM,CAAA;KAClB;;CACF"}
|
package/lib/modules/broker.js
CHANGED
|
@@ -17,7 +17,7 @@ const tx_1 = require("../codec/broker/tx");
|
|
|
17
17
|
const util_1 = require("../util");
|
|
18
18
|
const base_1 = __importDefault(require("./base"));
|
|
19
19
|
class BrokerModule extends base_1.default {
|
|
20
|
-
initiateLiquidation(params) {
|
|
20
|
+
initiateLiquidation(params, opts) {
|
|
21
21
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22
22
|
const wallet = this.getWallet();
|
|
23
23
|
const value = tx_1.MsgInitiateLiquidation.fromPartial({
|
|
@@ -27,10 +27,10 @@ class BrokerModule extends base_1.default {
|
|
|
27
27
|
return yield wallet.sendTx({
|
|
28
28
|
typeUrl: util_1.CarbonTx.Types.MsgInitiateLiquidation,
|
|
29
29
|
value,
|
|
30
|
-
});
|
|
30
|
+
}, opts);
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
initiateLiquidations(params) {
|
|
33
|
+
initiateLiquidations(params, opts) {
|
|
34
34
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35
35
|
const wallet = this.getWallet();
|
|
36
36
|
const msgs = params.map(param => {
|
|
@@ -43,7 +43,7 @@ class BrokerModule extends base_1.default {
|
|
|
43
43
|
value,
|
|
44
44
|
};
|
|
45
45
|
});
|
|
46
|
-
return yield wallet.sendTxs(msgs);
|
|
46
|
+
return yield wallet.sendTxs(msgs, opts);
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"broker.js","sourceRoot":"","sources":["../../src/modules/broker.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,oDAAqE;AACrE,2CAA4C;AAC5C,kDAAgC;AAEhC,MAAa,YAAa,SAAQ,cAAU;IAE7B,mBAAmB,CAAC,MAA8C;;
|
|
1
|
+
{"version":3,"file":"broker.js","sourceRoot":"","sources":["../../src/modules/broker.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,oDAAqE;AACrE,2CAA4C;AAC5C,kDAAgC;AAEhC,MAAa,YAAa,SAAQ,cAAU;IAE7B,mBAAmB,CAAC,MAA8C,EAAE,IAA0B;;YACzG,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;YAEhC,MAAM,KAAK,GAAG,2BAAsB,CAAC,WAAW,CAAC;gBAC/C,OAAO,EAAE,MAAM,CAAC,aAAa;gBAC7B,SAAS,EAAE,MAAM,CAAC,SAAS;aAC5B,CAAC,CAAA;YAEF,OAAO,MAAM,MAAM,CAAC,MAAM,CAAC;gBACzB,OAAO,EAAE,eAAQ,CAAC,KAAK,CAAC,sBAAsB;gBAC9C,KAAK;aACN,EAAE,IAAI,CAAC,CAAC;QACX,CAAC;KAAA;IAEY,oBAAoB,CAAC,MAAgD,EAAE,IAA0B;;YAC5G,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;YAEhC,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;gBAC5B,MAAM,KAAK,GAAG,2BAAsB,CAAC,WAAW,CAAC;oBAC7C,OAAO,EAAE,MAAM,CAAC,aAAa;oBAC7B,SAAS,EAAE,KAAK,CAAC,SAAS;iBAC3B,CAAC,CAAA;gBAEN,OAAO;oBACL,OAAO,EAAE,eAAQ,CAAC,KAAK,CAAC,sBAAsB;oBAC9C,KAAK;iBACN,CAAA;YACH,CAAC,CAAC,CAAA;YAEF,OAAO,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC1C,CAAC;KAAA;CACF;AAjCD,oCAiCC;AAWA,CAAC"}
|
package/lib/modules/cdp.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { CarbonTx } from "../util";
|
|
1
2
|
import BaseModule from "./base";
|
|
2
3
|
import { BigNumber } from "bignumber.js";
|
|
3
4
|
export declare class CDPModule extends BaseModule {
|
|
4
|
-
addCollateral(params: CDPModule.AddCollateralParams): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
5
|
-
removeCollateral(params: CDPModule.RemoveCollateralParams): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
6
|
-
addDebt(params: CDPModule.AddDebtParams): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
7
|
-
removeDebt(params: CDPModule.RemoveDebtParams): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
5
|
+
addCollateral(params: CDPModule.AddCollateralParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
6
|
+
removeCollateral(params: CDPModule.RemoveCollateralParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
7
|
+
addDebt(params: CDPModule.AddDebtParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
8
|
+
removeDebt(params: CDPModule.RemoveDebtParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
8
9
|
}
|
|
9
10
|
export declare namespace CDPModule {
|
|
10
11
|
interface AddCollateralParams {
|
package/lib/modules/cdp.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdp.d.ts","sourceRoot":"","sources":["../../src/modules/cdp.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cdp.d.ts","sourceRoot":"","sources":["../../src/modules/cdp.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,UAAU,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,qBAAa,SAAU,SAAQ,UAAU;IAE1B,aAAa,CAAC,MAAM,EAAE,SAAS,CAAC,mBAAmB,EAAE,IAAI,CAAC,EAAE,QAAQ,CAAC,UAAU;IAe/E,gBAAgB,CAAC,MAAM,EAAE,SAAS,CAAC,sBAAsB,EAAE,IAAI,CAAC,EAAE,QAAQ,CAAC,UAAU;IAerF,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,aAAa,EAAE,IAAI,CAAC,EAAE,QAAQ,CAAC,UAAU;IAenE,UAAU,CAAC,MAAM,EAAE,SAAS,CAAC,gBAAgB,EAAE,IAAI,CAAC,EAAE,QAAQ,CAAC,UAAU;CAcvF;AAED,yBAAiB,SAAS,CAAC;IACzB,UAAiB,mBAAmB;QAClC,WAAW,EAAE,MAAM,CAAA;QACnB,MAAM,EAAE,SAAS,CAAA;KAClB;IAED,UAAiB,sBAAsB;QACrC,WAAW,EAAE,MAAM,CAAA;QACnB,MAAM,EAAE,SAAS,CAAA;KAClB;IAED,UAAiB,aAAa;QAC5B,WAAW,EAAE,MAAM,CAAA;QACnB,MAAM,EAAE,SAAS,CAAA;KAClB;IAED,UAAiB,gBAAgB;QAC/B,WAAW,EAAE,MAAM,CAAA;QACnB,MAAM,EAAE,SAAS,CAAA;KAClB;CACF"}
|
package/lib/modules/cdp.js
CHANGED
|
@@ -18,7 +18,7 @@ const util_1 = require("../util");
|
|
|
18
18
|
const base_1 = __importDefault(require("./base"));
|
|
19
19
|
const long_1 = __importDefault(require("long"));
|
|
20
20
|
class CDPModule extends base_1.default {
|
|
21
|
-
addCollateral(params) {
|
|
21
|
+
addCollateral(params, opts) {
|
|
22
22
|
return __awaiter(this, void 0, void 0, function* () {
|
|
23
23
|
const wallet = this.getWallet();
|
|
24
24
|
const value = tx_1.MsgAddCollateral.fromPartial({
|
|
@@ -29,10 +29,10 @@ class CDPModule extends base_1.default {
|
|
|
29
29
|
return yield wallet.sendTx({
|
|
30
30
|
typeUrl: util_1.CarbonTx.Types.MsgAddCollateral,
|
|
31
31
|
value,
|
|
32
|
-
});
|
|
32
|
+
}, opts);
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
removeCollateral(params) {
|
|
35
|
+
removeCollateral(params, opts) {
|
|
36
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
37
|
const wallet = this.getWallet();
|
|
38
38
|
const value = tx_1.MsgRemoveCollateral.fromPartial({
|
|
@@ -43,10 +43,10 @@ class CDPModule extends base_1.default {
|
|
|
43
43
|
return yield wallet.sendTx({
|
|
44
44
|
typeUrl: util_1.CarbonTx.Types.MsgRemoveCollateral,
|
|
45
45
|
value,
|
|
46
|
-
});
|
|
46
|
+
}, opts);
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
-
addDebt(params) {
|
|
49
|
+
addDebt(params, opts) {
|
|
50
50
|
return __awaiter(this, void 0, void 0, function* () {
|
|
51
51
|
const wallet = this.getWallet();
|
|
52
52
|
const value = tx_1.MsgAddDebt.fromPartial({
|
|
@@ -57,10 +57,10 @@ class CDPModule extends base_1.default {
|
|
|
57
57
|
return yield wallet.sendTx({
|
|
58
58
|
typeUrl: util_1.CarbonTx.Types.MsgAddDebt,
|
|
59
59
|
value,
|
|
60
|
-
});
|
|
60
|
+
}, opts);
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
|
-
removeDebt(params) {
|
|
63
|
+
removeDebt(params, opts) {
|
|
64
64
|
return __awaiter(this, void 0, void 0, function* () {
|
|
65
65
|
const wallet = this.getWallet();
|
|
66
66
|
const value = tx_1.MsgRemoveDebt.fromPartial({
|
|
@@ -71,7 +71,7 @@ class CDPModule extends base_1.default {
|
|
|
71
71
|
return yield wallet.sendTx({
|
|
72
72
|
typeUrl: util_1.CarbonTx.Types.MsgRemoveDebt,
|
|
73
73
|
value,
|
|
74
|
-
});
|
|
74
|
+
}, opts);
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
}
|
package/lib/modules/cdp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdp.js","sourceRoot":"","sources":["../../src/modules/cdp.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,iDAA4G;AAC5G,2CAA4C;AAC5C,kDAAgC;AAEhC,gDAAwB;AAExB,MAAa,SAAU,SAAQ,cAAU;IAE1B,aAAa,CAAC,MAAqC;;
|
|
1
|
+
{"version":3,"file":"cdp.js","sourceRoot":"","sources":["../../src/modules/cdp.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,iDAA4G;AAC5G,2CAA4C;AAC5C,kDAAgC;AAEhC,gDAAwB;AAExB,MAAa,SAAU,SAAQ,cAAU;IAE1B,aAAa,CAAC,MAAqC,EAAE,IAA0B;;YAC1F,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;YAEhC,MAAM,KAAK,GAAG,qBAAgB,CAAC,WAAW,CAAC;gBACzC,OAAO,EAAE,MAAM,CAAC,aAAa;gBAC7B,WAAW,EAAE,IAAI,cAAI,CAAC,MAAM,CAAC,WAAW,CAAC;gBACzC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;aACnC,CAAC,CAAA;YAEF,OAAO,MAAM,MAAM,CAAC,MAA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CAAC;gBACtC,OAAO,EAAE,MAAM,CAAC,aAAa;gBAC7B,WAAW,EAAE,IAAI,cAAI,CAAC,MAAM,CAAC,WAAW,CAAC;gBACzC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;aACnC,CAAC,CAAA;YAEF,OAAO,MAAM,MAAM,CAAC,MAAM,CAAC;gBACzB,OAAO,EAAE,eAAQ,CAAC,KAAK,CAAC,aAAa;gBACrC,KAAK;aACN,EAAE,IAAI,CAAC,CAAC;QACX,CAAC;KAAA;CACF;AA7DD,8BA6DC;AAsBA,CAAC"}
|
package/lib/modules/coin.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { CarbonTx } from "../util";
|
|
1
2
|
import BigNumber from "bignumber.js";
|
|
2
3
|
import BaseModule from "./base";
|
|
3
4
|
export declare class CoinModule extends BaseModule {
|
|
4
|
-
createWithdrawal(params: CoinModule.CreateWithdrawalParams): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
5
|
-
mintToken(params: CoinModule.MintTokenParams): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
5
|
+
createWithdrawal(params: CoinModule.CreateWithdrawalParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
6
|
+
mintToken(params: CoinModule.MintTokenParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
6
7
|
}
|
|
7
8
|
export declare namespace CoinModule {
|
|
8
9
|
interface CreateWithdrawalParams {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coin.d.ts","sourceRoot":"","sources":["../../src/modules/coin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"coin.d.ts","sourceRoot":"","sources":["../../src/modules/coin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,UAAU,MAAM,QAAQ,CAAC;AAEhC,qBAAa,UAAW,SAAQ,UAAU;IAE3B,gBAAgB,CAAC,MAAM,EAAE,UAAU,CAAC,sBAAsB,EAAE,IAAI,CAAC,EAAE,QAAQ,CAAC,UAAU;IAkBtF,SAAS,CAAC,MAAM,EAAE,UAAU,CAAC,eAAe,EAAE,IAAI,CAAC,EAAE,QAAQ,CAAC,UAAU;CAetF;AAED,yBAAiB,UAAU,CAAC;IAC1B,UAAiB,sBAAsB;QACrC,SAAS,EAAE,MAAM,CAAC;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,SAAS,CAAC;QAClB,SAAS,EAAE,SAAS,CAAC;QACrB,UAAU,EAAE,MAAM,CAAC;KACpB;IAED,UAAiB,eAAe;QAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,SAAS,CAAC;QAClB,EAAE,CAAC,EAAE,MAAM,CAAC;KACb;CACF"}
|
package/lib/modules/coin.js
CHANGED
|
@@ -17,7 +17,7 @@ const tx_1 = require("../codec/coin/tx");
|
|
|
17
17
|
const util_1 = require("../util");
|
|
18
18
|
const base_1 = __importDefault(require("./base"));
|
|
19
19
|
class CoinModule extends base_1.default {
|
|
20
|
-
createWithdrawal(params) {
|
|
20
|
+
createWithdrawal(params, opts) {
|
|
21
21
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22
22
|
const wallet = this.getWallet();
|
|
23
23
|
const value = tx_1.MsgWithdraw.fromPartial({
|
|
@@ -31,10 +31,10 @@ class CoinModule extends base_1.default {
|
|
|
31
31
|
return yield wallet.sendTx({
|
|
32
32
|
typeUrl: util_1.CarbonTx.Types.MsgWithdraw,
|
|
33
33
|
value,
|
|
34
|
-
});
|
|
34
|
+
}, opts);
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
-
mintToken(params) {
|
|
37
|
+
mintToken(params, opts) {
|
|
38
38
|
var _a, _b;
|
|
39
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
40
|
const wallet = this.getWallet();
|
|
@@ -47,7 +47,7 @@ class CoinModule extends base_1.default {
|
|
|
47
47
|
return yield wallet.sendTx({
|
|
48
48
|
typeUrl: util_1.CarbonTx.Types.MsgMintToken,
|
|
49
49
|
value,
|
|
50
|
-
});
|
|
50
|
+
}, opts);
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
}
|
package/lib/modules/coin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coin.js","sourceRoot":"","sources":["../../src/modules/coin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kDAAsE;AACtE,2CAA4C;AAE5C,kDAAgC;AAEhC,MAAa,UAAW,SAAQ,cAAU;IAE3B,gBAAgB,CAAC,MAAyC;;
|
|
1
|
+
{"version":3,"file":"coin.js","sourceRoot":"","sources":["../../src/modules/coin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kDAAsE;AACtE,2CAA4C;AAE5C,kDAAgC;AAEhC,MAAa,UAAW,SAAQ,cAAU;IAE3B,gBAAgB,CAAC,MAAyC,EAAE,IAA0B;;YACjG,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;YAEhC,MAAM,KAAK,GAAG,gBAAW,CAAC,WAAW,CAAC;gBACpC,OAAO,EAAE,MAAM,CAAC,aAAa;gBAC7B,SAAS,EAAE,MAAM,CAAC,SAAS;gBAC3B,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAClC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC;gBACxC,UAAU,EAAE,MAAM,CAAC,UAAU;aAC9B,CAAC,CAAA;YAEF,OAAO,MAAM,MAAM,CAAC,MAAM,CAAC;gBACzB,OAAO,EAAE,eAAQ,CAAC,KAAK,CAAC,WAAW;gBACnC,KAAK;aACN,EAAE,IAAI,CAAC,CAAC;QACX,CAAC;KAAA;IAEY,SAAS,CAAC,MAAkC,EAAE,IAA0B;;;YACnF,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;YAEhC,MAAM,KAAK,GAAG,iBAAY,CAAC,WAAW,CAAC;gBACrC,OAAO,EAAE,MAAA,MAAM,CAAC,OAAO,mCAAI,MAAM,CAAC,aAAa;gBAC/C,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAClC,EAAE,EAAE,MAAA,MAAM,CAAC,EAAE,mCAAI,MAAM,CAAC,aAAa;aACtC,CAAC,CAAA;YAEF,OAAO,MAAM,MAAM,CAAC,MAAM,CAAC;gBACzB,OAAO,EAAE,eAAQ,CAAC,KAAK,CAAC,YAAY;gBACpC,KAAK;aACN,EAAE,IAAI,CAAC,CAAA;;KACT;CACF;AAnCD,gCAmCC;AAiBA,CAAC"}
|
package/lib/modules/gov.d.ts
CHANGED
|
@@ -3,14 +3,15 @@ import { TextProposal, VoteOption } from "../codec/cosmos/gov/v1beta1/gov";
|
|
|
3
3
|
import { ParameterChangeProposal } from "../codec/cosmos/params/v1beta1/params";
|
|
4
4
|
import { CancelSoftwareUpgradeProposal, SoftwareUpgradeProposal } from "../codec/cosmos/upgrade/v1beta1/upgrade";
|
|
5
5
|
import { SettlementPriceParams } from "../codec/pricing/proposal";
|
|
6
|
+
import { CarbonTx } from "../util";
|
|
6
7
|
import { Coin } from "@cosmjs/amino";
|
|
7
8
|
import { AdminModule } from "./admin";
|
|
8
9
|
import BaseModule from "./base";
|
|
9
10
|
import { MarketModule } from "./market";
|
|
10
11
|
export declare class GovModule extends BaseModule {
|
|
11
|
-
submit(params: GovModule.SubmitProposalParams): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
12
|
-
deposit(params: GovModule.DepositParams): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
13
|
-
vote(params: GovModule.VoteParams): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
12
|
+
submit(params: GovModule.SubmitProposalParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
13
|
+
deposit(params: GovModule.DepositParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
14
|
+
vote(params: GovModule.VoteParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
14
15
|
encode(proposalUrl: string, proposalMsg: any): Uint8Array;
|
|
15
16
|
}
|
|
16
17
|
export declare namespace GovModule {
|
package/lib/modules/gov.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gov.d.ts","sourceRoot":"","sources":["../../src/modules/gov.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,4DAA4D,CAAC;AACxG,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAEpF,OAAO,EAAE,uBAAuB,EAAE,MAAM,gDAAgD,CAAC;AACzF,OAAO,EAAE,6BAA6B,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAK1H,OAAO,EAAE,qBAAqB,EAA2B,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"gov.d.ts","sourceRoot":"","sources":["../../src/modules/gov.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,4DAA4D,CAAC;AACxG,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAEpF,OAAO,EAAE,uBAAuB,EAAE,MAAM,gDAAgD,CAAC;AACzF,OAAO,EAAE,6BAA6B,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAK1H,OAAO,EAAE,qBAA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,uBAAuB,GACvB,uBAAuB,GACvB,6BAA6B,GAC7B,YAAY,GACZ,0BAA0B,CAAA;IAE5B,KAAY,kBAAkB,GAC5B,WAAW,CAAC,iBAAiB,GAC7B,WAAW,CAAC,mBAAmB,GAC/B,WAAW,CAAC,oBAAoB,GAChC,WAAW,CAAC,cAAc,GAC1B,WAAW,CAAC,gBAAgB,GAC5B,WAAW,CAAC,oBAAoB,GAChC,WAAW,CAAC,wBAAwB,GACpC,WAAW,CAAC,uBAAuB,GACnC,WAAW,CAAC,gBAAgB,GAC5B,WAAW,CAAC,qBAAqB,GACjC,WAAW,CAAC,kBAAkB,GAC9B,YAAY,CAAC,kBAAkB,GAC/B,WAAW,CAAC,kBAAkB,GAC9B,qBAAqB,CACtB;CAEF"}
|
package/lib/modules/gov.js
CHANGED
|
@@ -31,7 +31,7 @@ const admin_1 = require("./admin");
|
|
|
31
31
|
const base_1 = __importDefault(require("./base"));
|
|
32
32
|
const market_1 = require("./market");
|
|
33
33
|
class GovModule extends base_1.default {
|
|
34
|
-
submit(params) {
|
|
34
|
+
submit(params, opts) {
|
|
35
35
|
return __awaiter(this, void 0, void 0, function* () {
|
|
36
36
|
const wallet = this.getWallet();
|
|
37
37
|
const { typeUrl, value } = params.content;
|
|
@@ -39,24 +39,24 @@ class GovModule extends base_1.default {
|
|
|
39
39
|
return yield wallet.sendTx({
|
|
40
40
|
typeUrl: util_1.CarbonTx.Types.MsgSubmitProposal,
|
|
41
41
|
value: params,
|
|
42
|
-
});
|
|
42
|
+
}, opts);
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
|
-
deposit(params) {
|
|
45
|
+
deposit(params, opts) {
|
|
46
46
|
return __awaiter(this, void 0, void 0, function* () {
|
|
47
47
|
const wallet = this.getWallet();
|
|
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,
|
|
55
55
|
value,
|
|
56
|
-
});
|
|
56
|
+
}, opts);
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
|
-
vote(params) {
|
|
59
|
+
vote(params, opts) {
|
|
60
60
|
return __awaiter(this, void 0, void 0, function* () {
|
|
61
61
|
const wallet = this.getWallet();
|
|
62
62
|
const value = tx_1.MsgVote.fromPartial({
|
|
@@ -67,7 +67,7 @@ class GovModule extends base_1.default {
|
|
|
67
67
|
return yield wallet.sendTx({
|
|
68
68
|
typeUrl: util_1.CarbonTx.Types.MsgVote,
|
|
69
69
|
value,
|
|
70
|
-
});
|
|
70
|
+
}, opts);
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
encode(proposalUrl, proposalMsg) {
|
|
@@ -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,63 +113,63 @@ class GovModule extends base_1.default {
|
|
|
113
113
|
const linkPoolMsg = {
|
|
114
114
|
title: title,
|
|
115
115
|
description: description,
|
|
116
|
-
msg:
|
|
116
|
+
msg: admin_1.transfromLinkPoolParams(msg)
|
|
117
117
|
};
|
|
118
118
|
return proposal_3.LinkPoolProposal.encode(linkPoolMsg).finish();
|
|
119
119
|
case "UnlinkPoolProposal":
|
|
120
120
|
const unlinkPoolMsg = {
|
|
121
121
|
title: title,
|
|
122
122
|
description: description,
|
|
123
|
-
msg:
|
|
123
|
+
msg: admin_1.transfromUnlinkPoolParams(msg)
|
|
124
124
|
};
|
|
125
125
|
return proposal_3.UnlinkPoolProposal.encode(unlinkPoolMsg).finish();
|
|
126
126
|
case "SetRewardCurveProposal":
|
|
127
127
|
const setRewardCurveMsg = {
|
|
128
128
|
title: title,
|
|
129
129
|
description: description,
|
|
130
|
-
msg:
|
|
130
|
+
msg: admin_1.transfromSetRewardCurveParams(msg)
|
|
131
131
|
};
|
|
132
132
|
return proposal_3.SetRewardCurveProposal.encode(setRewardCurveMsg).finish();
|
|
133
133
|
case "SetCommitmentCurveProposal":
|
|
134
134
|
const setCommitmentCurveMsg = {
|
|
135
135
|
title: title,
|
|
136
136
|
description: description,
|
|
137
|
-
msg:
|
|
137
|
+
msg: admin_1.transfromSetCommitmentCurveParams(msg)
|
|
138
138
|
};
|
|
139
139
|
return proposal_3.SetCommitmentCurveProposal.encode(setCommitmentCurveMsg).finish();
|
|
140
140
|
case "SetRewardsWeightsProposal":
|
|
141
141
|
const setRewardsWeightsMsg = {
|
|
142
142
|
title: title,
|
|
143
143
|
description: description,
|
|
144
|
-
msg:
|
|
144
|
+
msg: admin_1.transfromSetRewardsWeightsParams(msg)
|
|
145
145
|
};
|
|
146
146
|
return proposal_3.SetRewardsWeightsProposal.encode(setRewardsWeightsMsg).finish();
|
|
147
147
|
case "UpdatePoolProposal":
|
|
148
148
|
const updatePoolProposalMsg = {
|
|
149
149
|
title: title,
|
|
150
150
|
description: description,
|
|
151
|
-
msg:
|
|
151
|
+
msg: admin_1.transfromUpdatePoolParams(msg)
|
|
152
152
|
};
|
|
153
153
|
return proposal_3.UpdatePoolProposal.encode(updatePoolProposalMsg).finish();
|
|
154
154
|
case "UpdateMarketProposal":
|
|
155
155
|
const updateMarketProposalMsg = {
|
|
156
156
|
title: title,
|
|
157
157
|
description: description,
|
|
158
|
-
msg:
|
|
158
|
+
msg: market_1.transfromUpdateMarketParams(msg)
|
|
159
159
|
};
|
|
160
160
|
return proposal_4.UpdateMarketProposal.encode(updateMarketProposalMsg).finish();
|
|
161
161
|
case "CreateOracleProposal":
|
|
162
162
|
const createOracleProposalMsg = {
|
|
163
163
|
title: title,
|
|
164
164
|
description: description,
|
|
165
|
-
msg:
|
|
165
|
+
msg: admin_1.transfromCreateOracleParams(msg, wallet.bech32Address)
|
|
166
166
|
};
|
|
167
167
|
return proposal_5.CreateOracleProposal.encode(createOracleProposalMsg).finish();
|
|
168
168
|
case "SettlementPriceProposal":
|
|
169
169
|
const settlementPriceProposalMsg = {
|
|
170
170
|
title: title,
|
|
171
171
|
description: description,
|
|
172
|
-
msg:
|
|
172
|
+
msg: admin_1.transformSetSettlementPriceParams(msg),
|
|
173
173
|
};
|
|
174
174
|
return proposal_6.SettlementPriceProposal.encode(settlementPriceProposalMsg).finish();
|
|
175
175
|
case "ParameterChangeProposal":
|
|
@@ -191,7 +191,7 @@ class GovModule extends base_1.default {
|
|
|
191
191
|
title: title,
|
|
192
192
|
description: description,
|
|
193
193
|
recipient: proposalMsg.recipient,
|
|
194
|
-
amount:
|
|
194
|
+
amount: admin_1.transformCommunityPoolSpendAmount(proposalMsg.amount),
|
|
195
195
|
};
|
|
196
196
|
return distribution_1.CommunityPoolSpendProposal.encode(communityPoolSpendProposalMsg).finish();
|
|
197
197
|
case "CancelSoftwareUpgradeProposal":
|
package/lib/modules/gov.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gov.js","sourceRoot":"","sources":["../../src/modules/gov.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,8DAAsE;AACtE,6FAAwG;AACxG,kEAAoF;AACpF,gEAA8E;AAC9E,2EAAyF;AACzF,8EAA0H;AAC1H,6DAAoJ;AACpJ,uEAAmM;AACnM,gEAAyE;AACzE,gEAAyE;AACzE,iEAAoG;AACpG,2CAA4C;AAC5C,yCAA4C;AAC5C,gDAAwB;AACxB,mCAEiB;AACjB,kDAAgC;AAChC,qCAAqE;AAErE,MAAa,SAAU,SAAQ,cAAU;IAE1B,MAAM,CAAC,MAAsC;;
|
|
1
|
+
{"version":3,"file":"gov.js","sourceRoot":"","sources":["../../src/modules/gov.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,8DAAsE;AACtE,6FAAwG;AACxG,kEAAoF;AACpF,gEAA8E;AAC9E,2EAAyF;AACzF,8EAA0H;AAC1H,6DAAoJ;AACpJ,uEAAmM;AACnM,gEAAyE;AACzE,gEAAyE;AACzE,iEAAoG;AACpG,2CAA4C;AAC5C,yCAA4C;AAC5C,gDAAwB;AACxB,mCAEiB;AACjB,kDAAgC;AAChC,qCAAqE;AAErE,MAAa,SAAU,SAAQ,cAAU;IAE1B,MAAM,CAAC,MAAsC,EAAE,IAA0B;;YACpF,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;YAEhC,MAAM,EAAC,OAAO,EAAE,KAAK,EAAC,GAAG,MAAM,CAAC,OAAO,CAAC;YACxC,MAAM,CAAC,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;YAElD,OAAO,MAAM,MAAM,CAAC,MAAM,CAAC;gBACzB,OAAO,EAAE,eAAQ,CAAC,KAAK,CAAC,iBAAiB;gBACzC,KAAK,EAAE,MAAM;aACd,EAAE,IAAI,CAAC,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AAM,CAAC,0BAA0B,CAAC,CAAC,MAAM,EAAE,CAAA;YAC5E,KAAK,4BAA4B;gBAC/B,MAAM,6BAA6B,GAAG;oBACpC,KAAK,EAAE,KAAK;oBACZ,WAAW,EAAE,WAAW;oBACxB,SAAS,EAAE,WAAW,CAAC,SAAS;oBAChC,MAAM,EAAE,yCAAiC,CAAC,WAAW,CAAC,MAAM,CAAC;iBAC9D,CAAA;gBACD,OAAO,yCAA0B,CAAC,MAAM,CAAC,6BAA6B,CAAC,CAAC,MAAM,EAAE,CAAA;YAClF,KAAK,+BAA+B;gBAClC,MAAM,+BAA+B,GAAG;oBACtC,KAAK,EAAE,KAAK;oBACZ,WAAW,EAAE,WAAW;iBACzB,CAAA;gBACD,OAAO,uCAA6B,CAAC,MAAM,CAAC,+BAA+B,CAAC,CAAC,MAAM,EAAE,CAAA;YACvF,KAAK,cAAc;gBACjB,MAAM,eAAe,GAAG;oBACtB,KAAK,EAAE,KAAK;oBACZ,WAAW,EAAE,WAAW;iBACzB,CAAA;gBACD,OAAO,kBAAY,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,MAAM,EAAE,CAAA;YACtD;gBACE,OAAO,IAAI,UAAU,EAAE,CAAA;SAC1B;IACH,CAAC;CACF;AAzLD,8BAyLC;AAqDA,CAAC"}
|
package/lib/modules/ibc.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CarbonTx } from "../util";
|
|
2
2
|
import BigNumber from "bignumber.js";
|
|
3
3
|
import BaseModule from "./base";
|
|
4
4
|
export declare class IBCModule extends BaseModule {
|
|
5
|
-
sendIBCTransfer(params: IBCModule.SendIBCTransferParams,
|
|
5
|
+
sendIBCTransfer(params: IBCModule.SendIBCTransferParams, msgOpts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
6
6
|
}
|
|
7
7
|
export declare namespace IBCModule {
|
|
8
8
|
interface SendIBCTransferParams {
|
package/lib/modules/ibc.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ibc.d.ts","sourceRoot":"","sources":["../../src/modules/ibc.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ibc.d.ts","sourceRoot":"","sources":["../../src/modules/ibc.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,UAAU,MAAM,QAAQ,CAAC;AAEhC,qBAAa,SAAU,SAAQ,UAAU;IAE1B,eAAe,CAAC,MAAM,EAAE,SAAS,CAAC,qBAAqB,EAAE,OAAO,CAAC,EAAE,QAAQ,CAAC,UAAU;CAiCpG;AAED,yBAAiB,SAAS,CAAC;IACzB,UAAiB,qBAAqB;QACpC,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,QAAQ,EAAE,MAAM,CAAA;QAChB,MAAM,EAAE,SAAS,CAAA;QACjB,KAAK,EAAE,MAAM,CAAA;QACb,aAAa,EAAE,MAAM,CAAA;QACrB,UAAU,EAAE,MAAM,CAAA;QAClB,cAAc,CAAC,EAAE,MAAM,CAAA;QACvB,cAAc,CAAC,EAAE,MAAM,CAAA;QACvB,gBAAgB,CAAC,EAAE,MAAM,CAAA;KAC1B;CACF"}
|
package/lib/modules/ibc.js
CHANGED
|
@@ -17,7 +17,7 @@ const tx_1 = require("../codec/ibc/applications/transfer/v1/tx");
|
|
|
17
17
|
const util_1 = require("../util");
|
|
18
18
|
const base_1 = __importDefault(require("./base"));
|
|
19
19
|
class IBCModule extends base_1.default {
|
|
20
|
-
sendIBCTransfer(params,
|
|
20
|
+
sendIBCTransfer(params, msgOpts) {
|
|
21
21
|
var _a, _b;
|
|
22
22
|
return __awaiter(this, void 0, void 0, function* () {
|
|
23
23
|
const wallet = this.getWallet();
|
|
@@ -35,10 +35,6 @@ class IBCModule extends base_1.default {
|
|
|
35
35
|
} }, params.timeoutTimestamp && {
|
|
36
36
|
timeoutTimestamp: params.timeoutTimestamp,
|
|
37
37
|
}));
|
|
38
|
-
let msgOpts = undefined;
|
|
39
|
-
if (fee) {
|
|
40
|
-
msgOpts = { fee };
|
|
41
|
-
}
|
|
42
38
|
return yield wallet.sendTx({
|
|
43
39
|
typeUrl: util_1.CarbonTx.Types.MsgTransfer,
|
|
44
40
|
value,
|
package/lib/modules/ibc.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ibc.js","sourceRoot":"","sources":["../../src/modules/ibc.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,0EAAgF;AAChF,2CAA4C;
|
|
1
|
+
{"version":3,"file":"ibc.js","sourceRoot":"","sources":["../../src/modules/ibc.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,0EAAgF;AAChF,2CAA4C;AAE5C,kDAAgC;AAEhC,MAAa,SAAU,SAAQ,cAAU;IAE1B,eAAe,CAAC,MAAuC,EAAE,OAA6B;;;YACjG,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;YAEhC,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE;gBAC1B,MAAM,UAAU,GAAW,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;gBAC1E,sDAAsD;gBACtD,MAAM,CAAC,cAAc,GAAG,CAAC,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,CAAC,CAAC,GAAG,GAAG,CAAC;aACjD;YAED,MAAM,KAAK,GAAG,gBAAW,CAAC,WAAW,iBACnC,UAAU,EAAE,MAAM,CAAC,UAAU,EAC7B,aAAa,EAAE,MAAM,CAAC,aAAa,EACnC,KAAK,EAAE;oBACL,KAAK,EAAE,MAAM,CAAC,KAAK;oBACnB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;iBACnC,EACD,MAAM,EAAE,MAAA,MAAM,CAAC,MAAM,mCAAI,MAAM,CAAC,aAAa,EAC7C,QAAQ,EAAE,MAAM,CAAC,QAAQ,EACzB,aAAa,EAAE;oBACb,cAAc,EAAE,MAAM,CAAC,cAAc;oBACrC,cAAc,EAAE,MAAA,MAAM,CAAC,cAAc,mCAAI,CAAC;iBAC3C,IACE,MAAM,CAAC,gBAAgB,IAAI;gBAC5B,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;aAC1C,EACD,CAAC;YAEH,OAAO,MAAM,MAAM,CAAC,MAAM,CAAC;gBACzB,OAAO,EAAE,eAAQ,CAAC,KAAK,CAAC,WAAW;gBACnC,KAAK;aACN,EAAE,OAAO,CAAC,CAAC;;KACb;CAEF;AAnCD,8BAmCC;AAcA,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { CarbonTx } from "../util";
|
|
1
2
|
import BaseModule from "./base";
|
|
2
3
|
import { BigNumber } from "bignumber.js";
|
|
3
4
|
export declare class LeverageModule extends BaseModule {
|
|
4
|
-
set(params: LeverageModule.SetLeverageParams): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
5
|
-
setLeverages(params: LeverageModule.SetLeverageParams[]): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
5
|
+
set(params: LeverageModule.SetLeverageParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
6
|
+
setLeverages(params: LeverageModule.SetLeverageParams[], opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
6
7
|
}
|
|
7
8
|
export declare namespace LeverageModule {
|
|
8
9
|
interface SetLeverageParams {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"leverage.d.ts","sourceRoot":"","sources":["../../src/modules/leverage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"leverage.d.ts","sourceRoot":"","sources":["../../src/modules/leverage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,UAAU,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,qBAAa,cAAe,SAAQ,UAAU;IAE/B,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,iBAAiB,EAAE,IAAI,CAAC,EAAE,QAAQ,CAAC,UAAU;IAgBxE,YAAY,CAAC,MAAM,EAAE,cAAc,CAAC,iBAAiB,EAAE,EAAE,IAAI,CAAC,EAAE,QAAQ,CAAC,UAAU;CAkBjG;AAED,yBAAiB,cAAc,CAAC;IAC9B,UAAiB,iBAAiB;QAChC,MAAM,EAAE,MAAM,CAAA;QACd,QAAQ,EAAE,SAAS,CAAA;KACpB;CACF"}
|
package/lib/modules/leverage.js
CHANGED
|
@@ -17,7 +17,7 @@ const tx_1 = require("../codec/leverage/tx");
|
|
|
17
17
|
const util_1 = require("../util");
|
|
18
18
|
const base_1 = __importDefault(require("./base"));
|
|
19
19
|
class LeverageModule extends base_1.default {
|
|
20
|
-
set(params) {
|
|
20
|
+
set(params, opts) {
|
|
21
21
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22
22
|
const wallet = this.getWallet();
|
|
23
23
|
const value = tx_1.MsgSetLeverage.fromPartial({
|
|
@@ -28,10 +28,10 @@ class LeverageModule extends base_1.default {
|
|
|
28
28
|
return yield wallet.sendTx({
|
|
29
29
|
typeUrl: util_1.CarbonTx.Types.MsgSetLeverage,
|
|
30
30
|
value,
|
|
31
|
-
});
|
|
31
|
+
}, opts);
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
-
setLeverages(params) {
|
|
34
|
+
setLeverages(params, opts) {
|
|
35
35
|
return __awaiter(this, void 0, void 0, function* () {
|
|
36
36
|
const wallet = this.getWallet();
|
|
37
37
|
const msgs = params.map(param => {
|
|
@@ -45,7 +45,7 @@ class LeverageModule extends base_1.default {
|
|
|
45
45
|
value,
|
|
46
46
|
};
|
|
47
47
|
});
|
|
48
|
-
return yield wallet.sendTxs(msgs);
|
|
48
|
+
return yield wallet.sendTxs(msgs, opts);
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"leverage.js","sourceRoot":"","sources":["../../src/modules/leverage.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sDAA+D;AAC/D,2CAA4C;AAC5C,kDAAgC;AAGhC,MAAa,cAAe,SAAQ,cAAU;IAE/B,GAAG,CAAC,MAAwC;;
|
|
1
|
+
{"version":3,"file":"leverage.js","sourceRoot":"","sources":["../../src/modules/leverage.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sDAA+D;AAC/D,2CAA4C;AAC5C,kDAAgC;AAGhC,MAAa,cAAe,SAAQ,cAAU;IAE/B,GAAG,CAAC,MAAwC,EAAE,IAA0B;;YACnF,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;YAEhC,MAAM,KAAK,GAAG,mBAAc,CAAC,WAAW,CAAC;gBACvC,OAAO,EAAE,MAAM,CAAC,aAAa;gBAC7B,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;aAErD,CAAC,CAAA;YAEF,OAAO,MAAM,MAAM,CAAC,MAAM,CAAC;gBACzB,OAAO,EAAE,eAAQ,CAAC,KAAK,CAAC,cAAc;gBACtC,KAAK;aACN,EAAE,IAAI,CAAC,CAAC;QACX,CAAC;KAAA;IAEY,YAAY,CAAC,MAA0C,EAAE,IAA0B;;YAC9F,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;YAEhC,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;gBAC9B,MAAM,KAAK,GAAG,mBAAc,CAAC,WAAW,CAAC;oBACvC,OAAO,EAAE,MAAM,CAAC,aAAa;oBAC7B,MAAM,EAAE,KAAK,CAAC,MAAM;oBACpB,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;iBACpD,CAAC,CAAA;gBAEF,OAAO;oBACL,OAAO,EAAE,eAAQ,CAAC,KAAK,CAAC,cAAc;oBACtC,KAAK;iBACN,CAAA;YACH,CAAC,CAAC,CAAA;YAEF,OAAO,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC1C,CAAC;KAAA;CACF;AApCD,wCAoCC;AAOA,CAAC"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
import { CarbonTx } from "../util";
|
|
1
2
|
import { BigNumber } from "bignumber.js";
|
|
2
3
|
import BaseModule from "./base";
|
|
3
4
|
export declare class LiquidityPoolModule extends BaseModule {
|
|
4
|
-
create(params: LiquidityPoolModule.CreatePoolParams): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
5
|
-
createWithLiquidity(params: LiquidityPoolModule.CreatePoolWithLiquidityParams): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
6
|
-
addLiquidity(params: LiquidityPoolModule.AddLiquidityParams): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
7
|
-
removeLiquidity(params: LiquidityPoolModule.RemoveLiquidityParams): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
8
|
-
stakePoolToken(params: LiquidityPoolModule.StakePoolTokenParams): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
9
|
-
unstakePoolToken(params: LiquidityPoolModule.UnstakePoolTokenParams): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
10
|
-
claimPoolRewards(params: LiquidityPoolModule.ClaimPoolRewardsParams): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
5
|
+
create(params: LiquidityPoolModule.CreatePoolParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
6
|
+
createWithLiquidity(params: LiquidityPoolModule.CreatePoolWithLiquidityParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
7
|
+
addLiquidity(params: LiquidityPoolModule.AddLiquidityParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
8
|
+
removeLiquidity(params: LiquidityPoolModule.RemoveLiquidityParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
9
|
+
stakePoolToken(params: LiquidityPoolModule.StakePoolTokenParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
10
|
+
unstakePoolToken(params: LiquidityPoolModule.UnstakePoolTokenParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
11
|
+
claimPoolRewards(params: LiquidityPoolModule.ClaimPoolRewardsParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
11
12
|
/**
|
|
12
13
|
* Calculates weekly LP rewards (in SWTH)
|
|
13
14
|
* weeklySWTHRewards = ((INITIAL_SUPPLY) * (WEEKLY_DECAY)^(weeksFromInitalRewardsStart)) / 52
|
|
@@ -15,7 +16,7 @@ export declare class LiquidityPoolModule extends BaseModule {
|
|
|
15
16
|
* @returns weekly SWTH rewards allocated to liquidityProviders (BigNumber)
|
|
16
17
|
*/
|
|
17
18
|
getWeeklyRewards(): Promise<BigNumber>;
|
|
18
|
-
claimMultiPoolRewards(params: LiquidityPoolModule.ClaimMultiPoolRewards): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
19
|
+
claimMultiPoolRewards(params: LiquidityPoolModule.ClaimMultiPoolRewards, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
19
20
|
}
|
|
20
21
|
export declare namespace LiquidityPoolModule {
|
|
21
22
|
interface CreatePoolParams {
|