carbon-js-sdk 0.11.59 → 0.11.60-beta.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/lib/CarbonSDK.d.ts +0 -1
- package/lib/CarbonSDK.js +0 -5
- package/lib/clients/ETHClient.d.ts +1 -3
- package/lib/clients/ETHClient.js +1 -3
- package/lib/clients/InsightsQueryClient.d.ts +1 -0
- package/lib/clients/InsightsQueryClient.js +12 -0
- package/lib/clients/TokenClient.js +1 -0
- package/lib/codec/Switcheo/carbon/book/event.d.ts +11 -0
- package/lib/codec/Switcheo/carbon/leverage/tx.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/leverage/tx.js +14 -1
- package/lib/codec/Switcheo/carbon/order/tx.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/order/tx.js +27 -2
- package/lib/codec/Switcheo/carbon/perpspool/event.d.ts +83 -27
- package/lib/codec/Switcheo/carbon/perpspool/event.js +559 -119
- package/lib/codec/Switcheo/carbon/perpspool/export.d.ts +5 -4
- package/lib/codec/Switcheo/carbon/perpspool/export.js +37 -4
- package/lib/codec/Switcheo/carbon/perpspool/genesis.d.ts +16 -1
- package/lib/codec/Switcheo/carbon/perpspool/genesis.js +112 -3
- package/lib/codec/Switcheo/carbon/perpspool/params.d.ts +26 -4
- package/lib/codec/Switcheo/carbon/perpspool/params.js +388 -46
- package/lib/codec/Switcheo/carbon/perpspool/query.d.ts +188 -8
- package/lib/codec/Switcheo/carbon/perpspool/query.js +960 -106
- package/lib/codec/Switcheo/carbon/perpspool/tx.d.ts +100 -0
- package/lib/codec/Switcheo/carbon/perpspool/tx.js +538 -1
- package/lib/codec/Switcheo/carbon/position/tx.d.ts +1 -0
- package/lib/codec/Switcheo/carbon/position/tx.js +14 -1
- package/lib/codec/Switcheo/carbon/subaccount/export.d.ts +1 -1
- package/lib/codec/Switcheo/carbon/subaccount/export.js +1 -3
- package/lib/codec/Switcheo/carbon/subaccount/query.d.ts +9 -31
- package/lib/codec/Switcheo/carbon/subaccount/query.js +61 -161
- package/lib/codec/cosmos/group/v1/events.d.ts +0 -14
- package/lib/codec/cosmos/group/v1/events.js +1 -66
- package/lib/codec/google/protobuf/descriptor.d.ts +10 -6
- package/lib/codec/google/protobuf/descriptor.js +8 -3
- package/lib/codec/index.d.ts +8 -0
- package/lib/codec/index.js +562 -66
- package/lib/constant/index.d.ts +2 -1
- package/lib/constant/index.js +2 -1
- package/lib/constant/network.d.ts +0 -1
- package/lib/constant/network.js +0 -4
- package/lib/constant/web3Config.d.ts +0 -1
- package/lib/constant/web3Config.js +1 -14
- package/lib/insights/common.d.ts +1 -0
- package/lib/insights/common.js +1 -0
- package/lib/modules/grant.d.ts +15 -19
- package/lib/modules/grant.js +105 -158
- package/lib/modules/leverage.d.ts +1 -0
- package/lib/modules/leverage.js +6 -2
- package/lib/modules/order.d.ts +10 -2
- package/lib/modules/order.js +29 -19
- package/lib/modules/perpspool.d.ts +23 -0
- package/lib/modules/perpspool.js +70 -0
- package/lib/modules/position.d.ts +1 -0
- package/lib/modules/position.js +6 -2
- package/lib/provider/amino/types/perpspool.js +34 -0
- package/lib/provider/metamask/MetaMask.js +0 -17
- package/lib/provider/rainbowKit/RainbowKitAccount.js +0 -6
- package/lib/util/blockchain.d.ts +4 -5
- package/lib/util/blockchain.js +1 -15
- package/lib/util/tx.d.ts +10 -0
- package/lib/wallet/CarbonWallet.js +19 -25
- package/package.json +1 -1
package/lib/CarbonSDK.d.ts
CHANGED
package/lib/CarbonSDK.js
CHANGED
|
@@ -179,11 +179,6 @@ class CarbonSDK {
|
|
|
179
179
|
blockchain: blockchain_1.Blockchain.Base,
|
|
180
180
|
tokenClient: this.token,
|
|
181
181
|
});
|
|
182
|
-
this.monad = clients_1.ETHClient.instance({
|
|
183
|
-
configProvider: this,
|
|
184
|
-
blockchain: blockchain_1.Blockchain.Monad,
|
|
185
|
-
tokenClient: this.token,
|
|
186
|
-
});
|
|
187
182
|
}
|
|
188
183
|
static instance(opts = DEFAULT_SDK_INIT_OPTS) {
|
|
189
184
|
var _a, _b, _c, _d;
|
|
@@ -52,7 +52,7 @@ export declare class ETHClient {
|
|
|
52
52
|
readonly configProvider: NetworkConfigProvider;
|
|
53
53
|
readonly blockchain: typeof ETHClient.SUPPORTED_BLOCKCHAINS[number];
|
|
54
54
|
readonly tokenClient: TokenClient;
|
|
55
|
-
static SUPPORTED_BLOCKCHAINS: readonly [Blockchain.BinanceSmartChain, Blockchain.Ethereum, Blockchain.Arbitrum, Blockchain.Polygon, Blockchain.Okc, Blockchain.Mantle, Blockchain.Optimism, Blockchain.Base, Blockchain.Avalanche
|
|
55
|
+
static SUPPORTED_BLOCKCHAINS: readonly [Blockchain.BinanceSmartChain, Blockchain.Ethereum, Blockchain.Arbitrum, Blockchain.Polygon, Blockchain.Okc, Blockchain.Mantle, Blockchain.Optimism, Blockchain.Base, Blockchain.Avalanche];
|
|
56
56
|
static BLOCKCHAIN_KEY: {
|
|
57
57
|
bsc: string;
|
|
58
58
|
eth: string;
|
|
@@ -63,7 +63,6 @@ export declare class ETHClient {
|
|
|
63
63
|
optimism: string;
|
|
64
64
|
base: string;
|
|
65
65
|
avax: string;
|
|
66
|
-
monad: string;
|
|
67
66
|
};
|
|
68
67
|
static BLOCKCHAINV2_MAPPING: {
|
|
69
68
|
bsc: string;
|
|
@@ -75,7 +74,6 @@ export declare class ETHClient {
|
|
|
75
74
|
optimism: string;
|
|
76
75
|
base: string;
|
|
77
76
|
avax: string;
|
|
78
|
-
monad: string;
|
|
79
77
|
};
|
|
80
78
|
private constructor();
|
|
81
79
|
static instance(opts: ETHClientOpts): CarbonSDK.ETHClient;
|
package/lib/clients/ETHClient.js
CHANGED
|
@@ -353,7 +353,7 @@ class ETHClient {
|
|
|
353
353
|
}
|
|
354
354
|
}
|
|
355
355
|
exports.ETHClient = ETHClient;
|
|
356
|
-
ETHClient.SUPPORTED_BLOCKCHAINS = [blockchain_1.Blockchain.BinanceSmartChain, blockchain_1.Blockchain.Ethereum, blockchain_1.Blockchain.Arbitrum, blockchain_1.Blockchain.Polygon, blockchain_1.Blockchain.Okc, blockchain_1.Blockchain.Mantle, blockchain_1.Blockchain.Optimism, blockchain_1.Blockchain.Base, blockchain_1.Blockchain.Avalanche
|
|
356
|
+
ETHClient.SUPPORTED_BLOCKCHAINS = [blockchain_1.Blockchain.BinanceSmartChain, blockchain_1.Blockchain.Ethereum, blockchain_1.Blockchain.Arbitrum, blockchain_1.Blockchain.Polygon, blockchain_1.Blockchain.Okc, blockchain_1.Blockchain.Mantle, blockchain_1.Blockchain.Optimism, blockchain_1.Blockchain.Base, blockchain_1.Blockchain.Avalanche];
|
|
357
357
|
ETHClient.BLOCKCHAIN_KEY = {
|
|
358
358
|
[blockchain_1.Blockchain.BinanceSmartChain]: "bsc",
|
|
359
359
|
[blockchain_1.Blockchain.Ethereum]: "eth",
|
|
@@ -364,7 +364,6 @@ ETHClient.BLOCKCHAIN_KEY = {
|
|
|
364
364
|
[blockchain_1.Blockchain.Optimism]: 'optimism',
|
|
365
365
|
[blockchain_1.Blockchain.Base]: 'base',
|
|
366
366
|
[blockchain_1.Blockchain.Avalanche]: 'avax',
|
|
367
|
-
[blockchain_1.Blockchain.Monad]: 'monad',
|
|
368
367
|
};
|
|
369
368
|
ETHClient.BLOCKCHAINV2_MAPPING = {
|
|
370
369
|
[blockchain_1.Blockchain.BinanceSmartChain]: "Binance Smart Chain",
|
|
@@ -376,6 +375,5 @@ ETHClient.BLOCKCHAINV2_MAPPING = {
|
|
|
376
375
|
[blockchain_1.Blockchain.Optimism]: 'Optimism',
|
|
377
376
|
[blockchain_1.Blockchain.Base]: 'Base',
|
|
378
377
|
[blockchain_1.Blockchain.Avalanche]: 'Avalanche',
|
|
379
|
-
[blockchain_1.Blockchain.Monad]: 'Monad',
|
|
380
378
|
};
|
|
381
379
|
exports.default = ETHClient;
|
|
@@ -24,6 +24,7 @@ declare class InsightsQueryClient {
|
|
|
24
24
|
PoolHistory(query: Insights.QueryGetPoolHistoryRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetPoolHistoryResponse>>;
|
|
25
25
|
PerpPoolHistory(query: Insights.QueryGetPerpPoolHistoryRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetPerpPoolHistoryResponse>>;
|
|
26
26
|
PerpPoolApy(query: Insights.QueryPerpPoolAPY): Promise<Insights.InsightsQueryResponse<Insights.QueryPerpPoolAPYResponse>>;
|
|
27
|
+
UserVaultApy(query: Insights.QueryPerpPoolAPY): Promise<Insights.InsightsQueryResponse<Insights.QueryPerpPoolAPYResponse>>;
|
|
27
28
|
PoolVolume(req: Insights.QueryGetPoolVolumeRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetPoolVolumeResponse>>;
|
|
28
29
|
PoolsVolume(req?: Insights.QueryGetPoolsVolumeRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetPoolsVolumeResponse>>;
|
|
29
30
|
UserRewardsClaimHistory(req: Insights.QueryGetUserRewardsClaimHistoryRequest): Promise<InsightsQueryResponse<Insights.QueryGetUserRewardsClaimHistoryResponse>>;
|
|
@@ -199,6 +199,18 @@ class InsightsQueryClient {
|
|
|
199
199
|
return response.data;
|
|
200
200
|
});
|
|
201
201
|
}
|
|
202
|
+
UserVaultApy(query) {
|
|
203
|
+
var _a, _b;
|
|
204
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
205
|
+
const routeParams = { id: query.id };
|
|
206
|
+
const request = this.apiManager.path("pool/vault/apy", routeParams, {
|
|
207
|
+
limit: (_a = query.limit) !== null && _a !== void 0 ? _a : 10,
|
|
208
|
+
offset: (_b = query.offset) !== null && _b !== void 0 ? _b : 0,
|
|
209
|
+
});
|
|
210
|
+
const response = yield request.get();
|
|
211
|
+
return response.data;
|
|
212
|
+
});
|
|
213
|
+
}
|
|
202
214
|
PoolVolume(req) {
|
|
203
215
|
return __awaiter(this, void 0, void 0, function* () {
|
|
204
216
|
const routeParams = { poolId: req.poolId };
|
|
@@ -643,6 +643,7 @@ class TokenClient {
|
|
|
643
643
|
var _a, _b;
|
|
644
644
|
return __awaiter(this, void 0, void 0, function* () {
|
|
645
645
|
this.usdValues.iusd = number_1.BN_ONE;
|
|
646
|
+
this.usdValues.cgusd = number_1.BN_ONE;
|
|
646
647
|
//Get corresponding geckoId for denoms and removes any duplicated geckoIds (espeically for different wrapped tokens as they correspond to the same geckoId(same price))
|
|
647
648
|
const geckoIds = denoms.reduce((coinIds, denom) => {
|
|
648
649
|
// To ensure that ibc denoms are not added to the gecko ids list, the default is removed.
|
|
@@ -18,6 +18,17 @@ export interface Quote {
|
|
|
18
18
|
/** quantity in formatted string */
|
|
19
19
|
q: string;
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Message fields below are shortened to reduce size of messages,
|
|
23
|
+
* but use gogoproto customnames to provide descriptive names
|
|
24
|
+
* for referencing and use in the code.
|
|
25
|
+
*/
|
|
26
|
+
export interface Quote {
|
|
27
|
+
/** price in formatted string */
|
|
28
|
+
p: string;
|
|
29
|
+
/** quantity in formatted string */
|
|
30
|
+
q: string;
|
|
31
|
+
}
|
|
21
32
|
export interface VirtualOrderBookEvent {
|
|
22
33
|
m: string;
|
|
23
34
|
/** bids as one or more Quotes */
|
|
@@ -7,6 +7,7 @@ exports.MsgClientImpl = exports.MsgSetLeverageResponse = exports.MsgSetLeverage
|
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
const long_1 = __importDefault(require("long"));
|
|
9
9
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
10
|
+
const wrappers_1 = require("../../../google/protobuf/wrappers");
|
|
10
11
|
exports.protobufPackage = "Switcheo.carbon.leverage";
|
|
11
12
|
const baseMsgSetLeverage = { creator: "", marketId: "", leverage: "" };
|
|
12
13
|
exports.MsgSetLeverage = {
|
|
@@ -20,6 +21,9 @@ exports.MsgSetLeverage = {
|
|
|
20
21
|
if (message.leverage !== "") {
|
|
21
22
|
writer.uint32(26).string(message.leverage);
|
|
22
23
|
}
|
|
24
|
+
if (message.onBehalfOf !== undefined) {
|
|
25
|
+
wrappers_1.StringValue.encode({ value: message.onBehalfOf }, writer.uint32(34).fork()).ldelim();
|
|
26
|
+
}
|
|
23
27
|
return writer;
|
|
24
28
|
},
|
|
25
29
|
decode(input, length) {
|
|
@@ -38,6 +42,9 @@ exports.MsgSetLeverage = {
|
|
|
38
42
|
case 3:
|
|
39
43
|
message.leverage = reader.string();
|
|
40
44
|
break;
|
|
45
|
+
case 4:
|
|
46
|
+
message.onBehalfOf = wrappers_1.StringValue.decode(reader, reader.uint32()).value;
|
|
47
|
+
break;
|
|
41
48
|
default:
|
|
42
49
|
reader.skipType(tag & 7);
|
|
43
50
|
break;
|
|
@@ -59,6 +66,10 @@ exports.MsgSetLeverage = {
|
|
|
59
66
|
object.leverage !== undefined && object.leverage !== null
|
|
60
67
|
? String(object.leverage)
|
|
61
68
|
: "";
|
|
69
|
+
message.onBehalfOf =
|
|
70
|
+
object.onBehalfOf !== undefined && object.onBehalfOf !== null
|
|
71
|
+
? String(object.onBehalfOf)
|
|
72
|
+
: undefined;
|
|
62
73
|
return message;
|
|
63
74
|
},
|
|
64
75
|
toJSON(message) {
|
|
@@ -66,14 +77,16 @@ exports.MsgSetLeverage = {
|
|
|
66
77
|
message.creator !== undefined && (obj.creator = message.creator);
|
|
67
78
|
message.marketId !== undefined && (obj.marketId = message.marketId);
|
|
68
79
|
message.leverage !== undefined && (obj.leverage = message.leverage);
|
|
80
|
+
message.onBehalfOf !== undefined && (obj.onBehalfOf = message.onBehalfOf);
|
|
69
81
|
return obj;
|
|
70
82
|
},
|
|
71
83
|
fromPartial(object) {
|
|
72
|
-
var _a, _b, _c;
|
|
84
|
+
var _a, _b, _c, _d;
|
|
73
85
|
const message = Object.assign({}, baseMsgSetLeverage);
|
|
74
86
|
message.creator = (_a = object.creator) !== null && _a !== void 0 ? _a : "";
|
|
75
87
|
message.marketId = (_b = object.marketId) !== null && _b !== void 0 ? _b : "";
|
|
76
88
|
message.leverage = (_c = object.leverage) !== null && _c !== void 0 ? _c : "";
|
|
89
|
+
message.onBehalfOf = (_d = object.onBehalfOf) !== null && _d !== void 0 ? _d : undefined;
|
|
77
90
|
return message;
|
|
78
91
|
},
|
|
79
92
|
};
|
|
@@ -26,6 +26,7 @@ export interface MsgCreateOrder {
|
|
|
26
26
|
referralCommission: number;
|
|
27
27
|
referralKickback: number;
|
|
28
28
|
isUseBestPrice: boolean;
|
|
29
|
+
onBehalfOf?: string;
|
|
29
30
|
}
|
|
30
31
|
export interface MsgCreateOrderResponse {
|
|
31
32
|
orderId: string;
|
|
@@ -55,6 +56,7 @@ export interface MsgCancelOrderResponse {
|
|
|
55
56
|
export interface MsgCancelAll {
|
|
56
57
|
creator: string;
|
|
57
58
|
marketId: string;
|
|
59
|
+
onBehalfOf?: string;
|
|
58
60
|
}
|
|
59
61
|
export interface MsgCancelAllResponse {
|
|
60
62
|
}
|
|
@@ -8,6 +8,7 @@ exports.MsgClientImpl = exports.MsgUpdateParamsResponse = exports.MsgUpdateParam
|
|
|
8
8
|
const long_1 = __importDefault(require("long"));
|
|
9
9
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
10
10
|
const params_1 = require("./params");
|
|
11
|
+
const wrappers_1 = require("../../../google/protobuf/wrappers");
|
|
11
12
|
exports.protobufPackage = "Switcheo.carbon.order";
|
|
12
13
|
const baseMsgSetTradingFlag = {
|
|
13
14
|
creator: "",
|
|
@@ -178,6 +179,9 @@ exports.MsgCreateOrder = {
|
|
|
178
179
|
if (message.isUseBestPrice === true) {
|
|
179
180
|
writer.uint32(120).bool(message.isUseBestPrice);
|
|
180
181
|
}
|
|
182
|
+
if (message.onBehalfOf !== undefined) {
|
|
183
|
+
wrappers_1.StringValue.encode({ value: message.onBehalfOf }, writer.uint32(130).fork()).ldelim();
|
|
184
|
+
}
|
|
181
185
|
return writer;
|
|
182
186
|
},
|
|
183
187
|
decode(input, length) {
|
|
@@ -232,6 +236,9 @@ exports.MsgCreateOrder = {
|
|
|
232
236
|
case 15:
|
|
233
237
|
message.isUseBestPrice = reader.bool();
|
|
234
238
|
break;
|
|
239
|
+
case 16:
|
|
240
|
+
message.onBehalfOf = wrappers_1.StringValue.decode(reader, reader.uint32()).value;
|
|
241
|
+
break;
|
|
235
242
|
default:
|
|
236
243
|
reader.skipType(tag & 7);
|
|
237
244
|
break;
|
|
@@ -302,6 +309,10 @@ exports.MsgCreateOrder = {
|
|
|
302
309
|
object.isUseBestPrice !== undefined && object.isUseBestPrice !== null
|
|
303
310
|
? Boolean(object.isUseBestPrice)
|
|
304
311
|
: false;
|
|
312
|
+
message.onBehalfOf =
|
|
313
|
+
object.onBehalfOf !== undefined && object.onBehalfOf !== null
|
|
314
|
+
? String(object.onBehalfOf)
|
|
315
|
+
: undefined;
|
|
305
316
|
return message;
|
|
306
317
|
},
|
|
307
318
|
toJSON(message) {
|
|
@@ -328,10 +339,11 @@ exports.MsgCreateOrder = {
|
|
|
328
339
|
(obj.referralKickback = message.referralKickback);
|
|
329
340
|
message.isUseBestPrice !== undefined &&
|
|
330
341
|
(obj.isUseBestPrice = message.isUseBestPrice);
|
|
342
|
+
message.onBehalfOf !== undefined && (obj.onBehalfOf = message.onBehalfOf);
|
|
331
343
|
return obj;
|
|
332
344
|
},
|
|
333
345
|
fromPartial(object) {
|
|
334
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
346
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
335
347
|
const message = Object.assign({}, baseMsgCreateOrder);
|
|
336
348
|
message.creator = (_a = object.creator) !== null && _a !== void 0 ? _a : "";
|
|
337
349
|
message.marketId = (_b = object.marketId) !== null && _b !== void 0 ? _b : "";
|
|
@@ -348,6 +360,7 @@ exports.MsgCreateOrder = {
|
|
|
348
360
|
message.referralCommission = (_o = object.referralCommission) !== null && _o !== void 0 ? _o : 0;
|
|
349
361
|
message.referralKickback = (_p = object.referralKickback) !== null && _p !== void 0 ? _p : 0;
|
|
350
362
|
message.isUseBestPrice = (_q = object.isUseBestPrice) !== null && _q !== void 0 ? _q : false;
|
|
363
|
+
message.onBehalfOf = (_r = object.onBehalfOf) !== null && _r !== void 0 ? _r : undefined;
|
|
351
364
|
return message;
|
|
352
365
|
},
|
|
353
366
|
};
|
|
@@ -731,6 +744,9 @@ exports.MsgCancelAll = {
|
|
|
731
744
|
if (message.marketId !== "") {
|
|
732
745
|
writer.uint32(18).string(message.marketId);
|
|
733
746
|
}
|
|
747
|
+
if (message.onBehalfOf !== undefined) {
|
|
748
|
+
wrappers_1.StringValue.encode({ value: message.onBehalfOf }, writer.uint32(26).fork()).ldelim();
|
|
749
|
+
}
|
|
734
750
|
return writer;
|
|
735
751
|
},
|
|
736
752
|
decode(input, length) {
|
|
@@ -746,6 +762,9 @@ exports.MsgCancelAll = {
|
|
|
746
762
|
case 2:
|
|
747
763
|
message.marketId = reader.string();
|
|
748
764
|
break;
|
|
765
|
+
case 3:
|
|
766
|
+
message.onBehalfOf = wrappers_1.StringValue.decode(reader, reader.uint32()).value;
|
|
767
|
+
break;
|
|
749
768
|
default:
|
|
750
769
|
reader.skipType(tag & 7);
|
|
751
770
|
break;
|
|
@@ -763,19 +782,25 @@ exports.MsgCancelAll = {
|
|
|
763
782
|
object.marketId !== undefined && object.marketId !== null
|
|
764
783
|
? String(object.marketId)
|
|
765
784
|
: "";
|
|
785
|
+
message.onBehalfOf =
|
|
786
|
+
object.onBehalfOf !== undefined && object.onBehalfOf !== null
|
|
787
|
+
? String(object.onBehalfOf)
|
|
788
|
+
: undefined;
|
|
766
789
|
return message;
|
|
767
790
|
},
|
|
768
791
|
toJSON(message) {
|
|
769
792
|
const obj = {};
|
|
770
793
|
message.creator !== undefined && (obj.creator = message.creator);
|
|
771
794
|
message.marketId !== undefined && (obj.marketId = message.marketId);
|
|
795
|
+
message.onBehalfOf !== undefined && (obj.onBehalfOf = message.onBehalfOf);
|
|
772
796
|
return obj;
|
|
773
797
|
},
|
|
774
798
|
fromPartial(object) {
|
|
775
|
-
var _a, _b;
|
|
799
|
+
var _a, _b, _c;
|
|
776
800
|
const message = Object.assign({}, baseMsgCancelAll);
|
|
777
801
|
message.creator = (_a = object.creator) !== null && _a !== void 0 ? _a : "";
|
|
778
802
|
message.marketId = (_b = object.marketId) !== null && _b !== void 0 ? _b : "";
|
|
803
|
+
message.onBehalfOf = (_c = object.onBehalfOf) !== null && _c !== void 0 ? _c : undefined;
|
|
779
804
|
return message;
|
|
780
805
|
},
|
|
781
806
|
};
|
|
@@ -2,6 +2,7 @@ import Long from "long";
|
|
|
2
2
|
import _m0 from "protobufjs/minimal";
|
|
3
3
|
import { Pool } from "./pool";
|
|
4
4
|
import { MarketConfig } from "./market";
|
|
5
|
+
import { UserVault } from "./user_vault";
|
|
5
6
|
export declare const protobufPackage = "Switcheo.carbon.perpspool";
|
|
6
7
|
export interface PoolEvent {
|
|
7
8
|
pool?: Pool;
|
|
@@ -18,7 +19,11 @@ export interface DeregisterFromPoolEvent {
|
|
|
18
19
|
export interface SetMarketConfigEvent {
|
|
19
20
|
marketConfig?: MarketConfig;
|
|
20
21
|
}
|
|
21
|
-
export interface
|
|
22
|
+
export interface UpdateMarketLiquidityUsageMultiplierEvent {
|
|
23
|
+
marketId: string;
|
|
24
|
+
multiplier: string;
|
|
25
|
+
}
|
|
26
|
+
export interface DepositToVaultEvent {
|
|
22
27
|
poolId: Long;
|
|
23
28
|
denom: string;
|
|
24
29
|
amount: string;
|
|
@@ -26,26 +31,49 @@ export interface DepositToPoolEvent {
|
|
|
26
31
|
shareAmount: string;
|
|
27
32
|
initialShareAmountBurnt: string;
|
|
28
33
|
depositor: string;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
feeToVaultDenom: string;
|
|
35
|
+
feeToVaultAmount: string;
|
|
36
|
+
feeCommissionDenom: string;
|
|
37
|
+
feeCommissionAmount: string;
|
|
38
|
+
vaultType: Long;
|
|
33
39
|
}
|
|
34
|
-
export interface
|
|
40
|
+
export interface WithdrawFromVaultEvent {
|
|
35
41
|
poolId: Long;
|
|
36
42
|
denom: string;
|
|
37
43
|
amount: string;
|
|
38
44
|
shareDenom: string;
|
|
39
45
|
shareAmount: string;
|
|
40
46
|
withdrawer: string;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
47
|
+
feeToVaultDenom: string;
|
|
48
|
+
feeToVaultAmount: string;
|
|
49
|
+
feeCommissionDenom: string;
|
|
50
|
+
feeCommissionAmount: string;
|
|
51
|
+
vaultType: Long;
|
|
45
52
|
}
|
|
46
|
-
export interface
|
|
47
|
-
|
|
48
|
-
|
|
53
|
+
export interface UserVaultWithdrawalPendingEvent {
|
|
54
|
+
vaultId: Long;
|
|
55
|
+
address: string;
|
|
56
|
+
sharesAmount: string;
|
|
57
|
+
processId: Long;
|
|
58
|
+
requestTime?: Date;
|
|
59
|
+
}
|
|
60
|
+
export interface UserVaultWithdrawalReleasedEvent {
|
|
61
|
+
vaultId: Long;
|
|
62
|
+
processId: Long;
|
|
63
|
+
address: string;
|
|
64
|
+
sharesDenom: string;
|
|
65
|
+
sharesAmount: string;
|
|
66
|
+
receivedDenom: string;
|
|
67
|
+
receivedAmount: string;
|
|
68
|
+
requestTime?: Date;
|
|
69
|
+
completionTime?: Date;
|
|
70
|
+
error: string;
|
|
71
|
+
}
|
|
72
|
+
export interface UserVaultEvent {
|
|
73
|
+
vault?: UserVault;
|
|
74
|
+
}
|
|
75
|
+
export interface UserVaultClosedEvent {
|
|
76
|
+
id: Long;
|
|
49
77
|
}
|
|
50
78
|
export declare const PoolEvent: {
|
|
51
79
|
encode(message: PoolEvent, writer?: _m0.Writer): _m0.Writer;
|
|
@@ -75,20 +103,6 @@ export declare const SetMarketConfigEvent: {
|
|
|
75
103
|
toJSON(message: SetMarketConfigEvent): unknown;
|
|
76
104
|
fromPartial(object: DeepPartial<SetMarketConfigEvent>): SetMarketConfigEvent;
|
|
77
105
|
};
|
|
78
|
-
export declare const DepositToPoolEvent: {
|
|
79
|
-
encode(message: DepositToPoolEvent, writer?: _m0.Writer): _m0.Writer;
|
|
80
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): DepositToPoolEvent;
|
|
81
|
-
fromJSON(object: any): DepositToPoolEvent;
|
|
82
|
-
toJSON(message: DepositToPoolEvent): unknown;
|
|
83
|
-
fromPartial(object: DeepPartial<DepositToPoolEvent>): DepositToPoolEvent;
|
|
84
|
-
};
|
|
85
|
-
export declare const WithdrawFromPoolEvent: {
|
|
86
|
-
encode(message: WithdrawFromPoolEvent, writer?: _m0.Writer): _m0.Writer;
|
|
87
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): WithdrawFromPoolEvent;
|
|
88
|
-
fromJSON(object: any): WithdrawFromPoolEvent;
|
|
89
|
-
toJSON(message: WithdrawFromPoolEvent): unknown;
|
|
90
|
-
fromPartial(object: DeepPartial<WithdrawFromPoolEvent>): WithdrawFromPoolEvent;
|
|
91
|
-
};
|
|
92
106
|
export declare const UpdateMarketLiquidityUsageMultiplierEvent: {
|
|
93
107
|
encode(message: UpdateMarketLiquidityUsageMultiplierEvent, writer?: _m0.Writer): _m0.Writer;
|
|
94
108
|
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): UpdateMarketLiquidityUsageMultiplierEvent;
|
|
@@ -96,6 +110,48 @@ export declare const UpdateMarketLiquidityUsageMultiplierEvent: {
|
|
|
96
110
|
toJSON(message: UpdateMarketLiquidityUsageMultiplierEvent): unknown;
|
|
97
111
|
fromPartial(object: DeepPartial<UpdateMarketLiquidityUsageMultiplierEvent>): UpdateMarketLiquidityUsageMultiplierEvent;
|
|
98
112
|
};
|
|
113
|
+
export declare const DepositToVaultEvent: {
|
|
114
|
+
encode(message: DepositToVaultEvent, writer?: _m0.Writer): _m0.Writer;
|
|
115
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): DepositToVaultEvent;
|
|
116
|
+
fromJSON(object: any): DepositToVaultEvent;
|
|
117
|
+
toJSON(message: DepositToVaultEvent): unknown;
|
|
118
|
+
fromPartial(object: DeepPartial<DepositToVaultEvent>): DepositToVaultEvent;
|
|
119
|
+
};
|
|
120
|
+
export declare const WithdrawFromVaultEvent: {
|
|
121
|
+
encode(message: WithdrawFromVaultEvent, writer?: _m0.Writer): _m0.Writer;
|
|
122
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): WithdrawFromVaultEvent;
|
|
123
|
+
fromJSON(object: any): WithdrawFromVaultEvent;
|
|
124
|
+
toJSON(message: WithdrawFromVaultEvent): unknown;
|
|
125
|
+
fromPartial(object: DeepPartial<WithdrawFromVaultEvent>): WithdrawFromVaultEvent;
|
|
126
|
+
};
|
|
127
|
+
export declare const UserVaultWithdrawalPendingEvent: {
|
|
128
|
+
encode(message: UserVaultWithdrawalPendingEvent, writer?: _m0.Writer): _m0.Writer;
|
|
129
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): UserVaultWithdrawalPendingEvent;
|
|
130
|
+
fromJSON(object: any): UserVaultWithdrawalPendingEvent;
|
|
131
|
+
toJSON(message: UserVaultWithdrawalPendingEvent): unknown;
|
|
132
|
+
fromPartial(object: DeepPartial<UserVaultWithdrawalPendingEvent>): UserVaultWithdrawalPendingEvent;
|
|
133
|
+
};
|
|
134
|
+
export declare const UserVaultWithdrawalReleasedEvent: {
|
|
135
|
+
encode(message: UserVaultWithdrawalReleasedEvent, writer?: _m0.Writer): _m0.Writer;
|
|
136
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): UserVaultWithdrawalReleasedEvent;
|
|
137
|
+
fromJSON(object: any): UserVaultWithdrawalReleasedEvent;
|
|
138
|
+
toJSON(message: UserVaultWithdrawalReleasedEvent): unknown;
|
|
139
|
+
fromPartial(object: DeepPartial<UserVaultWithdrawalReleasedEvent>): UserVaultWithdrawalReleasedEvent;
|
|
140
|
+
};
|
|
141
|
+
export declare const UserVaultEvent: {
|
|
142
|
+
encode(message: UserVaultEvent, writer?: _m0.Writer): _m0.Writer;
|
|
143
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): UserVaultEvent;
|
|
144
|
+
fromJSON(object: any): UserVaultEvent;
|
|
145
|
+
toJSON(message: UserVaultEvent): unknown;
|
|
146
|
+
fromPartial(object: DeepPartial<UserVaultEvent>): UserVaultEvent;
|
|
147
|
+
};
|
|
148
|
+
export declare const UserVaultClosedEvent: {
|
|
149
|
+
encode(message: UserVaultClosedEvent, writer?: _m0.Writer): _m0.Writer;
|
|
150
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): UserVaultClosedEvent;
|
|
151
|
+
fromJSON(object: any): UserVaultClosedEvent;
|
|
152
|
+
toJSON(message: UserVaultClosedEvent): unknown;
|
|
153
|
+
fromPartial(object: DeepPartial<UserVaultClosedEvent>): UserVaultClosedEvent;
|
|
154
|
+
};
|
|
99
155
|
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
100
156
|
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 {} ? {
|
|
101
157
|
[K in keyof T]?: DeepPartial<T[K]>;
|