carbon-js-sdk 0.4.21 → 0.4.22
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/clients/CarbonQueryClient.js +2 -2
- package/lib/clients/ETHClient.js +15 -15
- package/lib/clients/EvmIbcClient.d.ts +86 -0
- package/lib/clients/EvmIbcClient.js +90 -0
- package/lib/clients/HydrogenClient.js +1 -1
- package/lib/clients/NEOClient.js +7 -7
- package/lib/clients/TokenClient.js +4 -4
- package/lib/clients/ZILClient.js +17 -17
- package/lib/codec/broker/incoming_pool_swap.d.ts +23 -0
- package/lib/codec/broker/incoming_pool_swap.js +136 -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/constant/generic.js +1 -1
- package/lib/modules/cdp.js +43 -43
- package/lib/modules/cosmwasm.js +1 -1
- package/lib/modules/gov.js +12 -12
- 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 +25 -25
- 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 +2 -2
- 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/ledger/ledger.js +2 -2
- package/lib/provider/metamask/MetaMask.js +1 -1
- 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/ethermint/evm-ibc.d.ts +97 -0
- package/lib/util/ethermint/evm-ibc.js +134 -0
- package/lib/util/ethermint/index.d.ts +3 -0
- package/lib/util/ethermint/index.js +12 -0
- package/lib/util/ethermint/keys.d.ts +39 -0
- package/lib/util/ethermint/keys.js +138 -0
- package/lib/util/ethermint/web3.d.ts +36 -0
- package/lib/util/ethermint/web3.js +124 -0
- package/lib/util/fetch.js +1 -1
- package/lib/util/generic.js +3 -3
- 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/codec/ethermint/crypto/v1/ethsecp256k1/export.d.ts +0 -1
- package/lib/codec/ethermint/crypto/v1/ethsecp256k1/export.js +0 -6
- package/lib/codec/ethermint/evm/v1/export.d.ts +0 -5
- package/lib/codec/ethermint/evm/v1/export.js +0 -53
- package/lib/codec/ethermint/feemarket/v1/export.d.ts +0 -4
- package/lib/codec/ethermint/feemarket/v1/export.js +0 -18
- package/lib/codec/ethermint/types/v1/export.d.ts +0 -4
- package/lib/codec/ethermint/types/v1/export.js +0 -11
- package/lib/codec/ethermint-models.d.ts +0 -4
- package/lib/codec/ethermint-models.js +0 -26
- package/lib/codec/market/fee.d.ts +0 -123
- package/lib/codec/market/fee.js +0 -334
- package/lib/codec/perpsliquidity/event.d.ts +0 -102
- package/lib/codec/perpsliquidity/event.js +0 -581
- package/lib/codec/perpsliquidity/genesis.d.ts +0 -35
- package/lib/codec/perpsliquidity/genesis.js +0 -162
- package/lib/codec/perpsliquidity/params.d.ts +0 -24
- package/lib/codec/perpsliquidity/params.js +0 -103
- package/lib/codec/perpsliquidity/pool.d.ts +0 -137
- package/lib/codec/perpsliquidity/pool.js +0 -747
- package/lib/codec/perpsliquidity/query.d.ts +0 -167
- package/lib/codec/perpsliquidity/query.js +0 -719
- package/lib/codec/perpsliquidity/tx.d.ts +0 -199
- package/lib/codec/perpsliquidity/tx.js +0 -940
- package/lib/constant/eip712.d.ts +0 -46
- package/lib/constant/eip712.js +0 -106
- package/lib/modules/evm.d.ts +0 -46
- package/lib/modules/evm.js +0 -127
- package/lib/modules/evmmerge.d.ts +0 -12
- package/lib/modules/evmmerge.js +0 -35
- package/lib/modules/feemarket.d.ts +0 -20
- package/lib/modules/feemarket.js +0 -45
- package/lib/modules/vault.d.ts +0 -44
- package/lib/modules/vault.js +0 -95
- package/lib/provider/amino/types/evm.d.ts +0 -4
- package/lib/provider/amino/types/evm.js +0 -40
- package/lib/provider/amino/types/evmmerge.d.ts +0 -4
- package/lib/provider/amino/types/evmmerge.js +0 -34
- package/lib/provider/amino/types/feemarket.d.ts +0 -4
- package/lib/provider/amino/types/feemarket.js +0 -34
- package/lib/provider/metamask/legacy-accounts.d.ts +0 -6
- package/lib/provider/metamask/legacy-accounts.js +0 -44
- package/lib/util/eip712.d.ts +0 -10
- package/lib/util/eip712.js +0 -195
- package/lib/util/ethermint.d.ts +0 -8
- package/lib/util/ethermint.js +0 -68
- package/lib/util/legacyEIP712.d.ts +0 -20
- package/lib/util/legacyEIP712.js +0 -98
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.MarketConfigWithPoolId = exports.GenesisState = exports.protobufPackage = void 0;
|
|
7
|
-
/* eslint-disable */
|
|
8
|
-
const long_1 = __importDefault(require("long"));
|
|
9
|
-
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
10
|
-
const params_1 = require("./params");
|
|
11
|
-
const pool_1 = require("./pool");
|
|
12
|
-
exports.protobufPackage = "Switcheo.carbon.perpsliquidity";
|
|
13
|
-
const baseGenesisState = {};
|
|
14
|
-
exports.GenesisState = {
|
|
15
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
16
|
-
if (message.params !== undefined) {
|
|
17
|
-
params_1.Params.encode(message.params, writer.uint32(10).fork()).ldelim();
|
|
18
|
-
}
|
|
19
|
-
for (const v of message.pools) {
|
|
20
|
-
pool_1.PlPool.encode(v, writer.uint32(18).fork()).ldelim();
|
|
21
|
-
}
|
|
22
|
-
for (const v of message.marketConfigWithPoolIds) {
|
|
23
|
-
exports.MarketConfigWithPoolId.encode(v, writer.uint32(26).fork()).ldelim();
|
|
24
|
-
}
|
|
25
|
-
return writer;
|
|
26
|
-
},
|
|
27
|
-
decode(input, length) {
|
|
28
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
29
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
30
|
-
const message = Object.assign({}, baseGenesisState);
|
|
31
|
-
message.pools = [];
|
|
32
|
-
message.marketConfigWithPoolIds = [];
|
|
33
|
-
while (reader.pos < end) {
|
|
34
|
-
const tag = reader.uint32();
|
|
35
|
-
switch (tag >>> 3) {
|
|
36
|
-
case 1:
|
|
37
|
-
message.params = params_1.Params.decode(reader, reader.uint32());
|
|
38
|
-
break;
|
|
39
|
-
case 2:
|
|
40
|
-
message.pools.push(pool_1.PlPool.decode(reader, reader.uint32()));
|
|
41
|
-
break;
|
|
42
|
-
case 3:
|
|
43
|
-
message.marketConfigWithPoolIds.push(exports.MarketConfigWithPoolId.decode(reader, reader.uint32()));
|
|
44
|
-
break;
|
|
45
|
-
default:
|
|
46
|
-
reader.skipType(tag & 7);
|
|
47
|
-
break;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return message;
|
|
51
|
-
},
|
|
52
|
-
fromJSON(object) {
|
|
53
|
-
var _a, _b;
|
|
54
|
-
const message = Object.assign({}, baseGenesisState);
|
|
55
|
-
message.params =
|
|
56
|
-
object.params !== undefined && object.params !== null
|
|
57
|
-
? params_1.Params.fromJSON(object.params)
|
|
58
|
-
: undefined;
|
|
59
|
-
message.pools = ((_a = object.pools) !== null && _a !== void 0 ? _a : []).map((e) => pool_1.PlPool.fromJSON(e));
|
|
60
|
-
message.marketConfigWithPoolIds = ((_b = object.marketConfigWithPoolIds) !== null && _b !== void 0 ? _b : []).map((e) => exports.MarketConfigWithPoolId.fromJSON(e));
|
|
61
|
-
return message;
|
|
62
|
-
},
|
|
63
|
-
toJSON(message) {
|
|
64
|
-
const obj = {};
|
|
65
|
-
message.params !== undefined &&
|
|
66
|
-
(obj.params = message.params ? params_1.Params.toJSON(message.params) : undefined);
|
|
67
|
-
if (message.pools) {
|
|
68
|
-
obj.pools = message.pools.map((e) => (e ? pool_1.PlPool.toJSON(e) : undefined));
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
obj.pools = [];
|
|
72
|
-
}
|
|
73
|
-
if (message.marketConfigWithPoolIds) {
|
|
74
|
-
obj.marketConfigWithPoolIds = message.marketConfigWithPoolIds.map((e) => e ? exports.MarketConfigWithPoolId.toJSON(e) : undefined);
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
obj.marketConfigWithPoolIds = [];
|
|
78
|
-
}
|
|
79
|
-
return obj;
|
|
80
|
-
},
|
|
81
|
-
fromPartial(object) {
|
|
82
|
-
var _a, _b;
|
|
83
|
-
const message = Object.assign({}, baseGenesisState);
|
|
84
|
-
message.params =
|
|
85
|
-
object.params !== undefined && object.params !== null
|
|
86
|
-
? params_1.Params.fromPartial(object.params)
|
|
87
|
-
: undefined;
|
|
88
|
-
message.pools = ((_a = object.pools) !== null && _a !== void 0 ? _a : []).map((e) => pool_1.PlPool.fromPartial(e));
|
|
89
|
-
message.marketConfigWithPoolIds = ((_b = object.marketConfigWithPoolIds) !== null && _b !== void 0 ? _b : []).map((e) => exports.MarketConfigWithPoolId.fromPartial(e));
|
|
90
|
-
return message;
|
|
91
|
-
},
|
|
92
|
-
};
|
|
93
|
-
const baseMarketConfigWithPoolId = { poolId: long_1.default.UZERO };
|
|
94
|
-
exports.MarketConfigWithPoolId = {
|
|
95
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
96
|
-
if (!message.poolId.isZero()) {
|
|
97
|
-
writer.uint32(8).uint64(message.poolId);
|
|
98
|
-
}
|
|
99
|
-
if (message.marketConfig !== undefined) {
|
|
100
|
-
pool_1.MarketConfig.encode(message.marketConfig, writer.uint32(18).fork()).ldelim();
|
|
101
|
-
}
|
|
102
|
-
return writer;
|
|
103
|
-
},
|
|
104
|
-
decode(input, length) {
|
|
105
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
106
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
107
|
-
const message = Object.assign({}, baseMarketConfigWithPoolId);
|
|
108
|
-
while (reader.pos < end) {
|
|
109
|
-
const tag = reader.uint32();
|
|
110
|
-
switch (tag >>> 3) {
|
|
111
|
-
case 1:
|
|
112
|
-
message.poolId = reader.uint64();
|
|
113
|
-
break;
|
|
114
|
-
case 2:
|
|
115
|
-
message.marketConfig = pool_1.MarketConfig.decode(reader, reader.uint32());
|
|
116
|
-
break;
|
|
117
|
-
default:
|
|
118
|
-
reader.skipType(tag & 7);
|
|
119
|
-
break;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
return message;
|
|
123
|
-
},
|
|
124
|
-
fromJSON(object) {
|
|
125
|
-
const message = Object.assign({}, baseMarketConfigWithPoolId);
|
|
126
|
-
message.poolId =
|
|
127
|
-
object.poolId !== undefined && object.poolId !== null
|
|
128
|
-
? long_1.default.fromString(object.poolId)
|
|
129
|
-
: long_1.default.UZERO;
|
|
130
|
-
message.marketConfig =
|
|
131
|
-
object.marketConfig !== undefined && object.marketConfig !== null
|
|
132
|
-
? pool_1.MarketConfig.fromJSON(object.marketConfig)
|
|
133
|
-
: undefined;
|
|
134
|
-
return message;
|
|
135
|
-
},
|
|
136
|
-
toJSON(message) {
|
|
137
|
-
const obj = {};
|
|
138
|
-
message.poolId !== undefined &&
|
|
139
|
-
(obj.poolId = (message.poolId || long_1.default.UZERO).toString());
|
|
140
|
-
message.marketConfig !== undefined &&
|
|
141
|
-
(obj.marketConfig = message.marketConfig
|
|
142
|
-
? pool_1.MarketConfig.toJSON(message.marketConfig)
|
|
143
|
-
: undefined);
|
|
144
|
-
return obj;
|
|
145
|
-
},
|
|
146
|
-
fromPartial(object) {
|
|
147
|
-
const message = Object.assign({}, baseMarketConfigWithPoolId);
|
|
148
|
-
message.poolId =
|
|
149
|
-
object.poolId !== undefined && object.poolId !== null
|
|
150
|
-
? long_1.default.fromValue(object.poolId)
|
|
151
|
-
: long_1.default.UZERO;
|
|
152
|
-
message.marketConfig =
|
|
153
|
-
object.marketConfig !== undefined && object.marketConfig !== null
|
|
154
|
-
? pool_1.MarketConfig.fromPartial(object.marketConfig)
|
|
155
|
-
: undefined;
|
|
156
|
-
return message;
|
|
157
|
-
},
|
|
158
|
-
};
|
|
159
|
-
if (minimal_1.default.util.Long !== long_1.default) {
|
|
160
|
-
minimal_1.default.util.Long = long_1.default;
|
|
161
|
-
minimal_1.default.configure();
|
|
162
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import Long from "long";
|
|
2
|
-
import _m0 from "protobufjs/minimal";
|
|
3
|
-
export declare const protobufPackage = "Switcheo.carbon.perpsliquidity";
|
|
4
|
-
/** Params defines the parameters for the module. */
|
|
5
|
-
export interface Params {
|
|
6
|
-
/** requotes when index price fluctuation threshold exceeded (in ratio) */
|
|
7
|
-
quoteIndexPriceFluctuationToleranceRatio: string;
|
|
8
|
-
/** requotes after orders are x seconds old */
|
|
9
|
-
quoteExpirySeconds: Long;
|
|
10
|
-
/** requotes when open position change threshold exceeded (in ratio) */
|
|
11
|
-
lpOpenPositionFluctuationToleranceRatio: string;
|
|
12
|
-
}
|
|
13
|
-
export declare const Params: {
|
|
14
|
-
encode(message: Params, writer?: _m0.Writer): _m0.Writer;
|
|
15
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): Params;
|
|
16
|
-
fromJSON(object: any): Params;
|
|
17
|
-
toJSON(message: Params): unknown;
|
|
18
|
-
fromPartial(object: DeepPartial<Params>): Params;
|
|
19
|
-
};
|
|
20
|
-
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
21
|
-
export declare type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
22
|
-
[K in keyof T]?: DeepPartial<T[K]>;
|
|
23
|
-
} : Partial<T>;
|
|
24
|
-
export {};
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Params = exports.protobufPackage = void 0;
|
|
7
|
-
/* eslint-disable */
|
|
8
|
-
const long_1 = __importDefault(require("long"));
|
|
9
|
-
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
10
|
-
exports.protobufPackage = "Switcheo.carbon.perpsliquidity";
|
|
11
|
-
const baseParams = {
|
|
12
|
-
quoteIndexPriceFluctuationToleranceRatio: "",
|
|
13
|
-
quoteExpirySeconds: long_1.default.UZERO,
|
|
14
|
-
lpOpenPositionFluctuationToleranceRatio: "",
|
|
15
|
-
};
|
|
16
|
-
exports.Params = {
|
|
17
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
18
|
-
if (message.quoteIndexPriceFluctuationToleranceRatio !== "") {
|
|
19
|
-
writer
|
|
20
|
-
.uint32(10)
|
|
21
|
-
.string(message.quoteIndexPriceFluctuationToleranceRatio);
|
|
22
|
-
}
|
|
23
|
-
if (!message.quoteExpirySeconds.isZero()) {
|
|
24
|
-
writer.uint32(16).uint64(message.quoteExpirySeconds);
|
|
25
|
-
}
|
|
26
|
-
if (message.lpOpenPositionFluctuationToleranceRatio !== "") {
|
|
27
|
-
writer.uint32(26).string(message.lpOpenPositionFluctuationToleranceRatio);
|
|
28
|
-
}
|
|
29
|
-
return writer;
|
|
30
|
-
},
|
|
31
|
-
decode(input, length) {
|
|
32
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
33
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
34
|
-
const message = Object.assign({}, baseParams);
|
|
35
|
-
while (reader.pos < end) {
|
|
36
|
-
const tag = reader.uint32();
|
|
37
|
-
switch (tag >>> 3) {
|
|
38
|
-
case 1:
|
|
39
|
-
message.quoteIndexPriceFluctuationToleranceRatio = reader.string();
|
|
40
|
-
break;
|
|
41
|
-
case 2:
|
|
42
|
-
message.quoteExpirySeconds = reader.uint64();
|
|
43
|
-
break;
|
|
44
|
-
case 3:
|
|
45
|
-
message.lpOpenPositionFluctuationToleranceRatio = reader.string();
|
|
46
|
-
break;
|
|
47
|
-
default:
|
|
48
|
-
reader.skipType(tag & 7);
|
|
49
|
-
break;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return message;
|
|
53
|
-
},
|
|
54
|
-
fromJSON(object) {
|
|
55
|
-
const message = Object.assign({}, baseParams);
|
|
56
|
-
message.quoteIndexPriceFluctuationToleranceRatio =
|
|
57
|
-
object.quoteIndexPriceFluctuationToleranceRatio !== undefined &&
|
|
58
|
-
object.quoteIndexPriceFluctuationToleranceRatio !== null
|
|
59
|
-
? String(object.quoteIndexPriceFluctuationToleranceRatio)
|
|
60
|
-
: "";
|
|
61
|
-
message.quoteExpirySeconds =
|
|
62
|
-
object.quoteExpirySeconds !== undefined &&
|
|
63
|
-
object.quoteExpirySeconds !== null
|
|
64
|
-
? long_1.default.fromString(object.quoteExpirySeconds)
|
|
65
|
-
: long_1.default.UZERO;
|
|
66
|
-
message.lpOpenPositionFluctuationToleranceRatio =
|
|
67
|
-
object.lpOpenPositionFluctuationToleranceRatio !== undefined &&
|
|
68
|
-
object.lpOpenPositionFluctuationToleranceRatio !== null
|
|
69
|
-
? String(object.lpOpenPositionFluctuationToleranceRatio)
|
|
70
|
-
: "";
|
|
71
|
-
return message;
|
|
72
|
-
},
|
|
73
|
-
toJSON(message) {
|
|
74
|
-
const obj = {};
|
|
75
|
-
message.quoteIndexPriceFluctuationToleranceRatio !== undefined &&
|
|
76
|
-
(obj.quoteIndexPriceFluctuationToleranceRatio =
|
|
77
|
-
message.quoteIndexPriceFluctuationToleranceRatio);
|
|
78
|
-
message.quoteExpirySeconds !== undefined &&
|
|
79
|
-
(obj.quoteExpirySeconds = (message.quoteExpirySeconds || long_1.default.UZERO).toString());
|
|
80
|
-
message.lpOpenPositionFluctuationToleranceRatio !== undefined &&
|
|
81
|
-
(obj.lpOpenPositionFluctuationToleranceRatio =
|
|
82
|
-
message.lpOpenPositionFluctuationToleranceRatio);
|
|
83
|
-
return obj;
|
|
84
|
-
},
|
|
85
|
-
fromPartial(object) {
|
|
86
|
-
var _a, _b;
|
|
87
|
-
const message = Object.assign({}, baseParams);
|
|
88
|
-
message.quoteIndexPriceFluctuationToleranceRatio =
|
|
89
|
-
(_a = object.quoteIndexPriceFluctuationToleranceRatio) !== null && _a !== void 0 ? _a : "";
|
|
90
|
-
message.quoteExpirySeconds =
|
|
91
|
-
object.quoteExpirySeconds !== undefined &&
|
|
92
|
-
object.quoteExpirySeconds !== null
|
|
93
|
-
? long_1.default.fromValue(object.quoteExpirySeconds)
|
|
94
|
-
: long_1.default.UZERO;
|
|
95
|
-
message.lpOpenPositionFluctuationToleranceRatio =
|
|
96
|
-
(_b = object.lpOpenPositionFluctuationToleranceRatio) !== null && _b !== void 0 ? _b : "";
|
|
97
|
-
return message;
|
|
98
|
-
},
|
|
99
|
-
};
|
|
100
|
-
if (minimal_1.default.util.Long !== long_1.default) {
|
|
101
|
-
minimal_1.default.util.Long = long_1.default;
|
|
102
|
-
minimal_1.default.configure();
|
|
103
|
-
}
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import Long from "long";
|
|
2
|
-
import _m0 from "protobufjs/minimal";
|
|
3
|
-
export declare const protobufPackage = "Switcheo.carbon.perpsliquidity";
|
|
4
|
-
/** main store holding each Pool */
|
|
5
|
-
export interface PlPool {
|
|
6
|
-
/** auto-incrementing id */
|
|
7
|
-
id: Long;
|
|
8
|
-
/** admin/govt determined name */
|
|
9
|
-
name: string;
|
|
10
|
-
/** deposit_denom for underlying token that will be used to provide liquidity */
|
|
11
|
-
depositDenom: string;
|
|
12
|
-
/** denom for the share token that can be used to redeem underlying deposited token */
|
|
13
|
-
shareDenom: string;
|
|
14
|
-
/** auto-created address of the vault that stores the tokens */
|
|
15
|
-
vaultAddress: string;
|
|
16
|
-
/** supply cap to limit amount of tokens that can go into the pool */
|
|
17
|
-
supplyCap: string;
|
|
18
|
-
/** deposit fee to charge on a successful deposit to PLP in bps */
|
|
19
|
-
depositFeeBps: string;
|
|
20
|
-
/** withdrawal fee to charge on a successful withdrawal from PLP in bps */
|
|
21
|
-
withdrawalFeeBps: string;
|
|
22
|
-
}
|
|
23
|
-
export interface UpdatePlPoolParams {
|
|
24
|
-
name?: string;
|
|
25
|
-
supplyCap?: Long;
|
|
26
|
-
depositFeeBps?: Long;
|
|
27
|
-
withdrawalFeeBps?: Long;
|
|
28
|
-
}
|
|
29
|
-
/** PoolDetails used for for querying. same as Pool but appended with registered_markets */
|
|
30
|
-
export interface PoolDetails {
|
|
31
|
-
pool?: PlPool;
|
|
32
|
-
registeredMarkets: MarketConfig[];
|
|
33
|
-
}
|
|
34
|
-
export interface Quote {
|
|
35
|
-
quotePriceType: string;
|
|
36
|
-
quotePriceValue: string;
|
|
37
|
-
amountRatio: string;
|
|
38
|
-
}
|
|
39
|
-
/** MarketConfig config for each market in the Pool */
|
|
40
|
-
export interface MarketConfig {
|
|
41
|
-
/** unique id representing the market */
|
|
42
|
-
marketId: string;
|
|
43
|
-
/**
|
|
44
|
-
* percentage of the pool liquidity that can be used to quote on a market in
|
|
45
|
-
* ratio where 0 < max_quotable_liquidity_ratio <= 1
|
|
46
|
-
*/
|
|
47
|
-
maxQuotableLiquidityRatio: string;
|
|
48
|
-
/**
|
|
49
|
-
* Available modes:
|
|
50
|
-
* active - market is active for quoting
|
|
51
|
-
* paused - open quotes are cancelled, current positions are held, no new quotes
|
|
52
|
-
* close_only - quotes will be open only on the closing side. borrow fees are increased?
|
|
53
|
-
*/
|
|
54
|
-
mode: string;
|
|
55
|
-
/** represents the shape of quoting for each side against [0] index price, [1+] prev quotes */
|
|
56
|
-
quoteShape: Quote[];
|
|
57
|
-
}
|
|
58
|
-
export interface UpdateMarketConfigParams {
|
|
59
|
-
maxQuotableLiquidityRatio: string;
|
|
60
|
-
mode?: string;
|
|
61
|
-
quoteShape: Quote[];
|
|
62
|
-
}
|
|
63
|
-
/** DepositParams params required for enqueuing into deposit transient store */
|
|
64
|
-
export interface DepositToPoolParams {
|
|
65
|
-
poolId: Long;
|
|
66
|
-
fromAccount: string;
|
|
67
|
-
depositAmount: string;
|
|
68
|
-
minSharesToReceive: string;
|
|
69
|
-
}
|
|
70
|
-
/** WithdrawParams params required for enqueuing into withdraw transient store */
|
|
71
|
-
export interface WithdrawFromPoolParams {
|
|
72
|
-
poolId: Long;
|
|
73
|
-
toAccount: string;
|
|
74
|
-
shareAmount: string;
|
|
75
|
-
minWithdrawAmount: string;
|
|
76
|
-
}
|
|
77
|
-
export declare const PlPool: {
|
|
78
|
-
encode(message: PlPool, writer?: _m0.Writer): _m0.Writer;
|
|
79
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): PlPool;
|
|
80
|
-
fromJSON(object: any): PlPool;
|
|
81
|
-
toJSON(message: PlPool): unknown;
|
|
82
|
-
fromPartial(object: DeepPartial<PlPool>): PlPool;
|
|
83
|
-
};
|
|
84
|
-
export declare const UpdatePlPoolParams: {
|
|
85
|
-
encode(message: UpdatePlPoolParams, writer?: _m0.Writer): _m0.Writer;
|
|
86
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): UpdatePlPoolParams;
|
|
87
|
-
fromJSON(object: any): UpdatePlPoolParams;
|
|
88
|
-
toJSON(message: UpdatePlPoolParams): unknown;
|
|
89
|
-
fromPartial(object: DeepPartial<UpdatePlPoolParams>): UpdatePlPoolParams;
|
|
90
|
-
};
|
|
91
|
-
export declare const PoolDetails: {
|
|
92
|
-
encode(message: PoolDetails, writer?: _m0.Writer): _m0.Writer;
|
|
93
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): PoolDetails;
|
|
94
|
-
fromJSON(object: any): PoolDetails;
|
|
95
|
-
toJSON(message: PoolDetails): unknown;
|
|
96
|
-
fromPartial(object: DeepPartial<PoolDetails>): PoolDetails;
|
|
97
|
-
};
|
|
98
|
-
export declare const Quote: {
|
|
99
|
-
encode(message: Quote, writer?: _m0.Writer): _m0.Writer;
|
|
100
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): Quote;
|
|
101
|
-
fromJSON(object: any): Quote;
|
|
102
|
-
toJSON(message: Quote): unknown;
|
|
103
|
-
fromPartial(object: DeepPartial<Quote>): Quote;
|
|
104
|
-
};
|
|
105
|
-
export declare const MarketConfig: {
|
|
106
|
-
encode(message: MarketConfig, writer?: _m0.Writer): _m0.Writer;
|
|
107
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MarketConfig;
|
|
108
|
-
fromJSON(object: any): MarketConfig;
|
|
109
|
-
toJSON(message: MarketConfig): unknown;
|
|
110
|
-
fromPartial(object: DeepPartial<MarketConfig>): MarketConfig;
|
|
111
|
-
};
|
|
112
|
-
export declare const UpdateMarketConfigParams: {
|
|
113
|
-
encode(message: UpdateMarketConfigParams, writer?: _m0.Writer): _m0.Writer;
|
|
114
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): UpdateMarketConfigParams;
|
|
115
|
-
fromJSON(object: any): UpdateMarketConfigParams;
|
|
116
|
-
toJSON(message: UpdateMarketConfigParams): unknown;
|
|
117
|
-
fromPartial(object: DeepPartial<UpdateMarketConfigParams>): UpdateMarketConfigParams;
|
|
118
|
-
};
|
|
119
|
-
export declare const DepositToPoolParams: {
|
|
120
|
-
encode(message: DepositToPoolParams, writer?: _m0.Writer): _m0.Writer;
|
|
121
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): DepositToPoolParams;
|
|
122
|
-
fromJSON(object: any): DepositToPoolParams;
|
|
123
|
-
toJSON(message: DepositToPoolParams): unknown;
|
|
124
|
-
fromPartial(object: DeepPartial<DepositToPoolParams>): DepositToPoolParams;
|
|
125
|
-
};
|
|
126
|
-
export declare const WithdrawFromPoolParams: {
|
|
127
|
-
encode(message: WithdrawFromPoolParams, writer?: _m0.Writer): _m0.Writer;
|
|
128
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): WithdrawFromPoolParams;
|
|
129
|
-
fromJSON(object: any): WithdrawFromPoolParams;
|
|
130
|
-
toJSON(message: WithdrawFromPoolParams): unknown;
|
|
131
|
-
fromPartial(object: DeepPartial<WithdrawFromPoolParams>): WithdrawFromPoolParams;
|
|
132
|
-
};
|
|
133
|
-
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
134
|
-
export declare type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
135
|
-
[K in keyof T]?: DeepPartial<T[K]>;
|
|
136
|
-
} : Partial<T>;
|
|
137
|
-
export {};
|