@zoguxprotocol/proto 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/codegen/cosmos/bundle.ts +126 -126
- package/src/codegen/zogux/bridge/token.ts +24 -6
- package/src/codegen/zogux/bundle.ts +174 -165
- package/src/codegen/zogux/clob/clob_pair.ts +10 -24
- package/src/codegen/zogux/feetiers/genesis.ts +16 -2
- package/src/codegen/zogux/feetiers/params.ts +182 -0
- package/src/codegen/zogux/feetiers/query.lcd.ts +9 -1
- package/src/codegen/zogux/feetiers/query.rpc.Query.ts +15 -1
- package/src/codegen/zogux/feetiers/query.ts +108 -1
- package/src/codegen/zogux/feetiers/tx.rpc.msg.ts +11 -1
- package/src/codegen/zogux/feetiers/tx.ts +116 -1
- package/src/codegen/zogux/indexer/events/events.ts +182 -0
- package/src/codegen/zogux/ratelimit/limit_params.ts +1 -1
- package/src/codegen/zogux/spots/fee_tier.ts +114 -0
- package/src/codegen/zogux/spots/genesis.ts +84 -0
- package/src/codegen/zogux/spots/market.ts +162 -0
- package/src/codegen/zogux/spots/price.ts +86 -0
- package/src/codegen/zogux/token/query.ts +12 -0
- package/src/codegen/zogux/token/tx.ts +1 -0
|
@@ -42,6 +42,48 @@ export interface PerpetualFeeTierSDKType {
|
|
|
42
42
|
maker_fee_ppm: number;
|
|
43
43
|
taker_fee_ppm: number;
|
|
44
44
|
}
|
|
45
|
+
/** SpotFeeParams defines the parameters for spot trading fees. */
|
|
46
|
+
|
|
47
|
+
export interface SpotFeeParams {
|
|
48
|
+
/** Sorted fee tiers (lowest requirements first). */
|
|
49
|
+
tiers: SpotFeeTier[];
|
|
50
|
+
}
|
|
51
|
+
/** SpotFeeParams defines the parameters for spot trading fees. */
|
|
52
|
+
|
|
53
|
+
export interface SpotFeeParamsSDKType {
|
|
54
|
+
tiers: SpotFeeTierSDKType[];
|
|
55
|
+
}
|
|
56
|
+
/** A fee tier for spot trading */
|
|
57
|
+
|
|
58
|
+
export interface SpotFeeTier {
|
|
59
|
+
/** Human-readable name of the tier, e.g. "Gold". */
|
|
60
|
+
name: string;
|
|
61
|
+
/** The trader's absolute volume requirement in quote quantums. */
|
|
62
|
+
|
|
63
|
+
absoluteVolumeRequirement: Long;
|
|
64
|
+
/** The total volume share requirement. */
|
|
65
|
+
|
|
66
|
+
totalVolumeShareRequirementPpm: number;
|
|
67
|
+
/** The maker volume share requirement. */
|
|
68
|
+
|
|
69
|
+
makerVolumeShareRequirementPpm: number;
|
|
70
|
+
/** The maker fee once this tier is reached. */
|
|
71
|
+
|
|
72
|
+
makerFeePpm: number;
|
|
73
|
+
/** The taker fee once this tier is reached. */
|
|
74
|
+
|
|
75
|
+
takerFeePpm: number;
|
|
76
|
+
}
|
|
77
|
+
/** A fee tier for spot trading */
|
|
78
|
+
|
|
79
|
+
export interface SpotFeeTierSDKType {
|
|
80
|
+
name: string;
|
|
81
|
+
absolute_volume_requirement: Long;
|
|
82
|
+
total_volume_share_requirement_ppm: number;
|
|
83
|
+
maker_volume_share_requirement_ppm: number;
|
|
84
|
+
maker_fee_ppm: number;
|
|
85
|
+
taker_fee_ppm: number;
|
|
86
|
+
}
|
|
45
87
|
|
|
46
88
|
function createBasePerpetualFeeParams(): PerpetualFeeParams {
|
|
47
89
|
return {
|
|
@@ -181,4 +223,144 @@ export const PerpetualFeeTier = {
|
|
|
181
223
|
return message;
|
|
182
224
|
}
|
|
183
225
|
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
function createBaseSpotFeeParams(): SpotFeeParams {
|
|
229
|
+
return {
|
|
230
|
+
tiers: []
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export const SpotFeeParams = {
|
|
235
|
+
encode(message: SpotFeeParams, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
236
|
+
for (const v of message.tiers) {
|
|
237
|
+
SpotFeeTier.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
return writer;
|
|
241
|
+
},
|
|
242
|
+
|
|
243
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): SpotFeeParams {
|
|
244
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
245
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
246
|
+
const message = createBaseSpotFeeParams();
|
|
247
|
+
|
|
248
|
+
while (reader.pos < end) {
|
|
249
|
+
const tag = reader.uint32();
|
|
250
|
+
|
|
251
|
+
switch (tag >>> 3) {
|
|
252
|
+
case 1:
|
|
253
|
+
message.tiers.push(SpotFeeTier.decode(reader, reader.uint32()));
|
|
254
|
+
break;
|
|
255
|
+
|
|
256
|
+
default:
|
|
257
|
+
reader.skipType(tag & 7);
|
|
258
|
+
break;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
return message;
|
|
263
|
+
},
|
|
264
|
+
|
|
265
|
+
fromPartial(object: DeepPartial<SpotFeeParams>): SpotFeeParams {
|
|
266
|
+
const message = createBaseSpotFeeParams();
|
|
267
|
+
message.tiers = object.tiers?.map(e => SpotFeeTier.fromPartial(e)) || [];
|
|
268
|
+
return message;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
function createBaseSpotFeeTier(): SpotFeeTier {
|
|
274
|
+
return {
|
|
275
|
+
name: "",
|
|
276
|
+
absoluteVolumeRequirement: Long.UZERO,
|
|
277
|
+
totalVolumeShareRequirementPpm: 0,
|
|
278
|
+
makerVolumeShareRequirementPpm: 0,
|
|
279
|
+
makerFeePpm: 0,
|
|
280
|
+
takerFeePpm: 0
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
export const SpotFeeTier = {
|
|
285
|
+
encode(message: SpotFeeTier, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
286
|
+
if (message.name !== "") {
|
|
287
|
+
writer.uint32(10).string(message.name);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
if (!message.absoluteVolumeRequirement.isZero()) {
|
|
291
|
+
writer.uint32(16).uint64(message.absoluteVolumeRequirement);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
if (message.totalVolumeShareRequirementPpm !== 0) {
|
|
295
|
+
writer.uint32(24).uint32(message.totalVolumeShareRequirementPpm);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
if (message.makerVolumeShareRequirementPpm !== 0) {
|
|
299
|
+
writer.uint32(32).uint32(message.makerVolumeShareRequirementPpm);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
if (message.makerFeePpm !== 0) {
|
|
303
|
+
writer.uint32(40).sint32(message.makerFeePpm);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
if (message.takerFeePpm !== 0) {
|
|
307
|
+
writer.uint32(48).sint32(message.takerFeePpm);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
return writer;
|
|
311
|
+
},
|
|
312
|
+
|
|
313
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): SpotFeeTier {
|
|
314
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
315
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
316
|
+
const message = createBaseSpotFeeTier();
|
|
317
|
+
|
|
318
|
+
while (reader.pos < end) {
|
|
319
|
+
const tag = reader.uint32();
|
|
320
|
+
|
|
321
|
+
switch (tag >>> 3) {
|
|
322
|
+
case 1:
|
|
323
|
+
message.name = reader.string();
|
|
324
|
+
break;
|
|
325
|
+
|
|
326
|
+
case 2:
|
|
327
|
+
message.absoluteVolumeRequirement = (reader.uint64() as Long);
|
|
328
|
+
break;
|
|
329
|
+
|
|
330
|
+
case 3:
|
|
331
|
+
message.totalVolumeShareRequirementPpm = reader.uint32();
|
|
332
|
+
break;
|
|
333
|
+
|
|
334
|
+
case 4:
|
|
335
|
+
message.makerVolumeShareRequirementPpm = reader.uint32();
|
|
336
|
+
break;
|
|
337
|
+
|
|
338
|
+
case 5:
|
|
339
|
+
message.makerFeePpm = reader.sint32();
|
|
340
|
+
break;
|
|
341
|
+
|
|
342
|
+
case 6:
|
|
343
|
+
message.takerFeePpm = reader.sint32();
|
|
344
|
+
break;
|
|
345
|
+
|
|
346
|
+
default:
|
|
347
|
+
reader.skipType(tag & 7);
|
|
348
|
+
break;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
return message;
|
|
353
|
+
},
|
|
354
|
+
|
|
355
|
+
fromPartial(object: DeepPartial<SpotFeeTier>): SpotFeeTier {
|
|
356
|
+
const message = createBaseSpotFeeTier();
|
|
357
|
+
message.name = object.name ?? "";
|
|
358
|
+
message.absoluteVolumeRequirement = object.absoluteVolumeRequirement !== undefined && object.absoluteVolumeRequirement !== null ? Long.fromValue(object.absoluteVolumeRequirement) : Long.UZERO;
|
|
359
|
+
message.totalVolumeShareRequirementPpm = object.totalVolumeShareRequirementPpm ?? 0;
|
|
360
|
+
message.makerVolumeShareRequirementPpm = object.makerVolumeShareRequirementPpm ?? 0;
|
|
361
|
+
message.makerFeePpm = object.makerFeePpm ?? 0;
|
|
362
|
+
message.takerFeePpm = object.takerFeePpm ?? 0;
|
|
363
|
+
return message;
|
|
364
|
+
}
|
|
365
|
+
|
|
184
366
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LCDClient } from "@osmonauts/lcd";
|
|
2
|
-
import { QueryPerpetualFeeParamsRequest, QueryPerpetualFeeParamsResponseSDKType, QueryUserFeeTierRequest, QueryUserFeeTierResponseSDKType, QueryPerMarketFeeDiscountParamsRequest, QueryPerMarketFeeDiscountParamsResponseSDKType, QueryAllMarketFeeDiscountParamsRequest, QueryAllMarketFeeDiscountParamsResponseSDKType, QueryStakingTiersRequest, QueryStakingTiersResponseSDKType, QueryUserStakingTierRequest, QueryUserStakingTierResponseSDKType } from "./query";
|
|
2
|
+
import { QueryPerpetualFeeParamsRequest, QueryPerpetualFeeParamsResponseSDKType, QuerySpotFeeParamsRequest, QuerySpotFeeParamsResponseSDKType, QueryUserFeeTierRequest, QueryUserFeeTierResponseSDKType, QueryPerMarketFeeDiscountParamsRequest, QueryPerMarketFeeDiscountParamsResponseSDKType, QueryAllMarketFeeDiscountParamsRequest, QueryAllMarketFeeDiscountParamsResponseSDKType, QueryStakingTiersRequest, QueryStakingTiersResponseSDKType, QueryUserStakingTierRequest, QueryUserStakingTierResponseSDKType } from "./query";
|
|
3
3
|
export class LCDQueryClient {
|
|
4
4
|
req: LCDClient;
|
|
5
5
|
|
|
@@ -10,6 +10,7 @@ export class LCDQueryClient {
|
|
|
10
10
|
}) {
|
|
11
11
|
this.req = requestClient;
|
|
12
12
|
this.perpetualFeeParams = this.perpetualFeeParams.bind(this);
|
|
13
|
+
this.spotFeeParams = this.spotFeeParams.bind(this);
|
|
13
14
|
this.userFeeTier = this.userFeeTier.bind(this);
|
|
14
15
|
this.perMarketFeeDiscountParams = this.perMarketFeeDiscountParams.bind(this);
|
|
15
16
|
this.allMarketFeeDiscountParams = this.allMarketFeeDiscountParams.bind(this);
|
|
@@ -23,6 +24,13 @@ export class LCDQueryClient {
|
|
|
23
24
|
const endpoint = `zogux/v4/feetiers/perpetual_fee_params`;
|
|
24
25
|
return await this.req.get<QueryPerpetualFeeParamsResponseSDKType>(endpoint);
|
|
25
26
|
}
|
|
27
|
+
/* Queries the SpotFeeParams. */
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
async spotFeeParams(_params: QuerySpotFeeParamsRequest = {}): Promise<QuerySpotFeeParamsResponseSDKType> {
|
|
31
|
+
const endpoint = `vindax/v4/feetiers/spot_fee_params`;
|
|
32
|
+
return await this.req.get<QuerySpotFeeParamsResponseSDKType>(endpoint);
|
|
33
|
+
}
|
|
26
34
|
/* Queries a user's fee tier */
|
|
27
35
|
|
|
28
36
|
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { Rpc } from "../../helpers";
|
|
2
2
|
import * as _m0 from "protobufjs/minimal";
|
|
3
3
|
import { QueryClient, createProtobufRpcClient } from "@cosmjs/stargate";
|
|
4
|
-
import { QueryPerpetualFeeParamsRequest, QueryPerpetualFeeParamsResponse, QueryUserFeeTierRequest, QueryUserFeeTierResponse, QueryPerMarketFeeDiscountParamsRequest, QueryPerMarketFeeDiscountParamsResponse, QueryAllMarketFeeDiscountParamsRequest, QueryAllMarketFeeDiscountParamsResponse, QueryStakingTiersRequest, QueryStakingTiersResponse, QueryUserStakingTierRequest, QueryUserStakingTierResponse } from "./query";
|
|
4
|
+
import { QueryPerpetualFeeParamsRequest, QueryPerpetualFeeParamsResponse, QuerySpotFeeParamsRequest, QuerySpotFeeParamsResponse, QueryUserFeeTierRequest, QueryUserFeeTierResponse, QueryPerMarketFeeDiscountParamsRequest, QueryPerMarketFeeDiscountParamsResponse, QueryAllMarketFeeDiscountParamsRequest, QueryAllMarketFeeDiscountParamsResponse, QueryStakingTiersRequest, QueryStakingTiersResponse, QueryUserStakingTierRequest, QueryUserStakingTierResponse } from "./query";
|
|
5
5
|
/** Query defines the gRPC querier service. */
|
|
6
6
|
|
|
7
7
|
export interface Query {
|
|
8
8
|
/** Queries the PerpetualFeeParams. */
|
|
9
9
|
perpetualFeeParams(request?: QueryPerpetualFeeParamsRequest): Promise<QueryPerpetualFeeParamsResponse>;
|
|
10
|
+
/** Queries the SpotFeeParams. */
|
|
11
|
+
|
|
12
|
+
spotFeeParams(request?: QuerySpotFeeParamsRequest): Promise<QuerySpotFeeParamsResponse>;
|
|
10
13
|
/** Queries a user's fee tier */
|
|
11
14
|
|
|
12
15
|
userFeeTier(request: QueryUserFeeTierRequest): Promise<QueryUserFeeTierResponse>;
|
|
@@ -32,6 +35,7 @@ export class QueryClientImpl implements Query {
|
|
|
32
35
|
constructor(rpc: Rpc) {
|
|
33
36
|
this.rpc = rpc;
|
|
34
37
|
this.perpetualFeeParams = this.perpetualFeeParams.bind(this);
|
|
38
|
+
this.spotFeeParams = this.spotFeeParams.bind(this);
|
|
35
39
|
this.userFeeTier = this.userFeeTier.bind(this);
|
|
36
40
|
this.perMarketFeeDiscountParams = this.perMarketFeeDiscountParams.bind(this);
|
|
37
41
|
this.allMarketFeeDiscountParams = this.allMarketFeeDiscountParams.bind(this);
|
|
@@ -45,6 +49,12 @@ export class QueryClientImpl implements Query {
|
|
|
45
49
|
return promise.then(data => QueryPerpetualFeeParamsResponse.decode(new _m0.Reader(data)));
|
|
46
50
|
}
|
|
47
51
|
|
|
52
|
+
spotFeeParams(request: QuerySpotFeeParamsRequest = {}): Promise<QuerySpotFeeParamsResponse> {
|
|
53
|
+
const data = QuerySpotFeeParamsRequest.encode(request).finish();
|
|
54
|
+
const promise = this.rpc.request("zogux.feetiers.Query", "SpotFeeParams", data);
|
|
55
|
+
return promise.then(data => QuerySpotFeeParamsResponse.decode(new _m0.Reader(data)));
|
|
56
|
+
}
|
|
57
|
+
|
|
48
58
|
userFeeTier(request: QueryUserFeeTierRequest): Promise<QueryUserFeeTierResponse> {
|
|
49
59
|
const data = QueryUserFeeTierRequest.encode(request).finish();
|
|
50
60
|
const promise = this.rpc.request("zogux.feetiers.Query", "UserFeeTier", data);
|
|
@@ -84,6 +94,10 @@ export const createRpcQueryExtension = (base: QueryClient) => {
|
|
|
84
94
|
return queryService.perpetualFeeParams(request);
|
|
85
95
|
},
|
|
86
96
|
|
|
97
|
+
spotFeeParams(request?: QuerySpotFeeParamsRequest): Promise<QuerySpotFeeParamsResponse> {
|
|
98
|
+
return queryService.spotFeeParams(request);
|
|
99
|
+
},
|
|
100
|
+
|
|
87
101
|
userFeeTier(request: QueryUserFeeTierRequest): Promise<QueryUserFeeTierResponse> {
|
|
88
102
|
return queryService.userFeeTier(request);
|
|
89
103
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PerpetualFeeParams, PerpetualFeeParamsSDKType, PerpetualFeeTier, PerpetualFeeTierSDKType } from "./params";
|
|
1
|
+
import { PerpetualFeeParams, PerpetualFeeParamsSDKType, SpotFeeParams, SpotFeeParamsSDKType, PerpetualFeeTier, PerpetualFeeTierSDKType } from "./params";
|
|
2
2
|
import { PerMarketFeeDiscountParams, PerMarketFeeDiscountParamsSDKType } from "./per_market_fee_discount";
|
|
3
3
|
import { StakingTier, StakingTierSDKType } from "./staking_tier";
|
|
4
4
|
import * as _m0 from "protobufjs/minimal";
|
|
@@ -31,6 +31,34 @@ export interface QueryPerpetualFeeParamsResponse {
|
|
|
31
31
|
export interface QueryPerpetualFeeParamsResponseSDKType {
|
|
32
32
|
params?: PerpetualFeeParamsSDKType;
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* QuerySpotFeeParamsRequest is a request type for the SpotFeeParams
|
|
36
|
+
* RPC method.
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
export interface QuerySpotFeeParamsRequest {}
|
|
40
|
+
/**
|
|
41
|
+
* QuerySpotFeeParamsRequest is a request type for the SpotFeeParams
|
|
42
|
+
* RPC method.
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
export interface QuerySpotFeeParamsRequestSDKType {}
|
|
46
|
+
/**
|
|
47
|
+
* QuerySpotFeeParamsResponse is a response type for the SpotFeeParams
|
|
48
|
+
* RPC method.
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
export interface QuerySpotFeeParamsResponse {
|
|
52
|
+
params?: SpotFeeParams;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* QuerySpotFeeParamsResponse is a response type for the SpotFeeParams
|
|
56
|
+
* RPC method.
|
|
57
|
+
*/
|
|
58
|
+
|
|
59
|
+
export interface QuerySpotFeeParamsResponseSDKType {
|
|
60
|
+
params?: SpotFeeParamsSDKType;
|
|
61
|
+
}
|
|
34
62
|
/** QueryUserFeeTierRequest is a request type for the UserFeeTier RPC method. */
|
|
35
63
|
|
|
36
64
|
export interface QueryUserFeeTierRequest {
|
|
@@ -256,6 +284,85 @@ export const QueryPerpetualFeeParamsResponse = {
|
|
|
256
284
|
|
|
257
285
|
};
|
|
258
286
|
|
|
287
|
+
function createBaseQuerySpotFeeParamsRequest(): QuerySpotFeeParamsRequest {
|
|
288
|
+
return {};
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
export const QuerySpotFeeParamsRequest = {
|
|
292
|
+
encode(_: QuerySpotFeeParamsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
293
|
+
return writer;
|
|
294
|
+
},
|
|
295
|
+
|
|
296
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QuerySpotFeeParamsRequest {
|
|
297
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
298
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
299
|
+
const message = createBaseQuerySpotFeeParamsRequest();
|
|
300
|
+
|
|
301
|
+
while (reader.pos < end) {
|
|
302
|
+
const tag = reader.uint32();
|
|
303
|
+
|
|
304
|
+
switch (tag >>> 3) {
|
|
305
|
+
default:
|
|
306
|
+
reader.skipType(tag & 7);
|
|
307
|
+
break;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
return message;
|
|
312
|
+
},
|
|
313
|
+
|
|
314
|
+
fromPartial(_: DeepPartial<QuerySpotFeeParamsRequest>): QuerySpotFeeParamsRequest {
|
|
315
|
+
const message = createBaseQuerySpotFeeParamsRequest();
|
|
316
|
+
return message;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
function createBaseQuerySpotFeeParamsResponse(): QuerySpotFeeParamsResponse {
|
|
322
|
+
return {
|
|
323
|
+
params: undefined
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
export const QuerySpotFeeParamsResponse = {
|
|
328
|
+
encode(message: QuerySpotFeeParamsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
329
|
+
if (message.params !== undefined) {
|
|
330
|
+
SpotFeeParams.encode(message.params, writer.uint32(10).fork()).ldelim();
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
return writer;
|
|
334
|
+
},
|
|
335
|
+
|
|
336
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QuerySpotFeeParamsResponse {
|
|
337
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
338
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
339
|
+
const message = createBaseQuerySpotFeeParamsResponse();
|
|
340
|
+
|
|
341
|
+
while (reader.pos < end) {
|
|
342
|
+
const tag = reader.uint32();
|
|
343
|
+
|
|
344
|
+
switch (tag >>> 3) {
|
|
345
|
+
case 1:
|
|
346
|
+
message.params = SpotFeeParams.decode(reader, reader.uint32());
|
|
347
|
+
break;
|
|
348
|
+
|
|
349
|
+
default:
|
|
350
|
+
reader.skipType(tag & 7);
|
|
351
|
+
break;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
return message;
|
|
356
|
+
},
|
|
357
|
+
|
|
358
|
+
fromPartial(object: DeepPartial<QuerySpotFeeParamsResponse>): QuerySpotFeeParamsResponse {
|
|
359
|
+
const message = createBaseQuerySpotFeeParamsResponse();
|
|
360
|
+
message.params = object.params !== undefined && object.params !== null ? SpotFeeParams.fromPartial(object.params) : undefined;
|
|
361
|
+
return message;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
};
|
|
365
|
+
|
|
259
366
|
function createBaseQueryUserFeeTierRequest(): QueryUserFeeTierRequest {
|
|
260
367
|
return {
|
|
261
368
|
user: ""
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { Rpc } from "../../helpers";
|
|
2
2
|
import * as _m0 from "protobufjs/minimal";
|
|
3
|
-
import { MsgUpdatePerpetualFeeParams, MsgUpdatePerpetualFeeParamsResponse, MsgSetMarketFeeDiscountParams, MsgSetMarketFeeDiscountParamsResponse, MsgSetStakingTiers, MsgSetStakingTiersResponse } from "./tx";
|
|
3
|
+
import { MsgUpdatePerpetualFeeParams, MsgUpdatePerpetualFeeParamsResponse, MsgUpdateSpotFeeParams, MsgUpdateSpotFeeParamsResponse, MsgSetMarketFeeDiscountParams, MsgSetMarketFeeDiscountParamsResponse, MsgSetStakingTiers, MsgSetStakingTiersResponse } from "./tx";
|
|
4
4
|
/** Msg defines the Msg service. */
|
|
5
5
|
|
|
6
6
|
export interface Msg {
|
|
7
7
|
/** UpdatePerpetualFeeParams updates the PerpetualFeeParams in state. */
|
|
8
8
|
updatePerpetualFeeParams(request: MsgUpdatePerpetualFeeParams): Promise<MsgUpdatePerpetualFeeParamsResponse>;
|
|
9
|
+
/** UpdateSpotFeeParams updates the SpotFeeParams in state. */
|
|
10
|
+
|
|
11
|
+
updateSpotFeeParams(request: MsgUpdateSpotFeeParams): Promise<MsgUpdateSpotFeeParamsResponse>;
|
|
9
12
|
/**
|
|
10
13
|
* SetMarketFeeDiscountParams sets or updates PerMarketFeeDiscountParams for
|
|
11
14
|
* specific CLOB pairs.
|
|
@@ -22,6 +25,7 @@ export class MsgClientImpl implements Msg {
|
|
|
22
25
|
constructor(rpc: Rpc) {
|
|
23
26
|
this.rpc = rpc;
|
|
24
27
|
this.updatePerpetualFeeParams = this.updatePerpetualFeeParams.bind(this);
|
|
28
|
+
this.updateSpotFeeParams = this.updateSpotFeeParams.bind(this);
|
|
25
29
|
this.setMarketFeeDiscountParams = this.setMarketFeeDiscountParams.bind(this);
|
|
26
30
|
this.setStakingTiers = this.setStakingTiers.bind(this);
|
|
27
31
|
}
|
|
@@ -32,6 +36,12 @@ export class MsgClientImpl implements Msg {
|
|
|
32
36
|
return promise.then(data => MsgUpdatePerpetualFeeParamsResponse.decode(new _m0.Reader(data)));
|
|
33
37
|
}
|
|
34
38
|
|
|
39
|
+
updateSpotFeeParams(request: MsgUpdateSpotFeeParams): Promise<MsgUpdateSpotFeeParamsResponse> {
|
|
40
|
+
const data = MsgUpdateSpotFeeParams.encode(request).finish();
|
|
41
|
+
const promise = this.rpc.request("zogux.feetiers.Msg", "UpdateSpotFeeParams", data);
|
|
42
|
+
return promise.then(data => MsgUpdateSpotFeeParamsResponse.decode(new _m0.Reader(data)));
|
|
43
|
+
}
|
|
44
|
+
|
|
35
45
|
setMarketFeeDiscountParams(request: MsgSetMarketFeeDiscountParams): Promise<MsgSetMarketFeeDiscountParamsResponse> {
|
|
36
46
|
const data = MsgSetMarketFeeDiscountParams.encode(request).finish();
|
|
37
47
|
const promise = this.rpc.request("zogux.feetiers.Msg", "SetMarketFeeDiscountParams", data);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PerpetualFeeParams, PerpetualFeeParamsSDKType } from "./params";
|
|
1
|
+
import { PerpetualFeeParams, PerpetualFeeParamsSDKType, SpotFeeParams, SpotFeeParamsSDKType } from "./params";
|
|
2
2
|
import { PerMarketFeeDiscountParams, PerMarketFeeDiscountParamsSDKType } from "./per_market_fee_discount";
|
|
3
3
|
import { StakingTier, StakingTierSDKType } from "./staking_tier";
|
|
4
4
|
import * as _m0 from "protobufjs/minimal";
|
|
@@ -29,6 +29,32 @@ export interface MsgUpdatePerpetualFeeParamsResponse {}
|
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
31
|
export interface MsgUpdatePerpetualFeeParamsResponseSDKType {}
|
|
32
|
+
/** MsgUpdateSpotFeeParams is the Msg/UpdateSpotFeeParams request type. */
|
|
33
|
+
|
|
34
|
+
export interface MsgUpdateSpotFeeParams {
|
|
35
|
+
authority: string;
|
|
36
|
+
/** Defines the parameters to update. All parameters must be supplied. */
|
|
37
|
+
|
|
38
|
+
params?: SpotFeeParams;
|
|
39
|
+
}
|
|
40
|
+
/** MsgUpdateSpotFeeParams is the Msg/UpdateSpotFeeParams request type. */
|
|
41
|
+
|
|
42
|
+
export interface MsgUpdateSpotFeeParamsSDKType {
|
|
43
|
+
authority: string;
|
|
44
|
+
params?: SpotFeeParamsSDKType;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* MsgUpdateSpotFeeParamsResponse is the Msg/UpdateSpotFeeParams
|
|
48
|
+
* response type.
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
export interface MsgUpdateSpotFeeParamsResponse {}
|
|
52
|
+
/**
|
|
53
|
+
* MsgUpdateSpotFeeParamsResponse is the Msg/UpdateSpotFeeParams
|
|
54
|
+
* response type.
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
export interface MsgUpdateSpotFeeParamsResponseSDKType {}
|
|
32
58
|
/**
|
|
33
59
|
* MsgSetMarketFeeDiscountParams is the Msg/SetMarketFeeDiscountParams
|
|
34
60
|
* request type.
|
|
@@ -172,6 +198,95 @@ export const MsgUpdatePerpetualFeeParamsResponse = {
|
|
|
172
198
|
|
|
173
199
|
};
|
|
174
200
|
|
|
201
|
+
function createBaseMsgUpdateSpotFeeParams(): MsgUpdateSpotFeeParams {
|
|
202
|
+
return {
|
|
203
|
+
authority: "",
|
|
204
|
+
params: undefined
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export const MsgUpdateSpotFeeParams = {
|
|
209
|
+
encode(message: MsgUpdateSpotFeeParams, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
210
|
+
if (message.authority !== "") {
|
|
211
|
+
writer.uint32(10).string(message.authority);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
if (message.params !== undefined) {
|
|
215
|
+
SpotFeeParams.encode(message.params, writer.uint32(18).fork()).ldelim();
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
return writer;
|
|
219
|
+
},
|
|
220
|
+
|
|
221
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateSpotFeeParams {
|
|
222
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
223
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
224
|
+
const message = createBaseMsgUpdateSpotFeeParams();
|
|
225
|
+
|
|
226
|
+
while (reader.pos < end) {
|
|
227
|
+
const tag = reader.uint32();
|
|
228
|
+
|
|
229
|
+
switch (tag >>> 3) {
|
|
230
|
+
case 1:
|
|
231
|
+
message.authority = reader.string();
|
|
232
|
+
break;
|
|
233
|
+
|
|
234
|
+
case 2:
|
|
235
|
+
message.params = SpotFeeParams.decode(reader, reader.uint32());
|
|
236
|
+
break;
|
|
237
|
+
|
|
238
|
+
default:
|
|
239
|
+
reader.skipType(tag & 7);
|
|
240
|
+
break;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
return message;
|
|
245
|
+
},
|
|
246
|
+
|
|
247
|
+
fromPartial(object: DeepPartial<MsgUpdateSpotFeeParams>): MsgUpdateSpotFeeParams {
|
|
248
|
+
const message = createBaseMsgUpdateSpotFeeParams();
|
|
249
|
+
message.authority = object.authority ?? "";
|
|
250
|
+
message.params = object.params !== undefined && object.params !== null ? SpotFeeParams.fromPartial(object.params) : undefined;
|
|
251
|
+
return message;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
function createBaseMsgUpdateSpotFeeParamsResponse(): MsgUpdateSpotFeeParamsResponse {
|
|
257
|
+
return {};
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export const MsgUpdateSpotFeeParamsResponse = {
|
|
261
|
+
encode(_: MsgUpdateSpotFeeParamsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
262
|
+
return writer;
|
|
263
|
+
},
|
|
264
|
+
|
|
265
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateSpotFeeParamsResponse {
|
|
266
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
267
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
268
|
+
const message = createBaseMsgUpdateSpotFeeParamsResponse();
|
|
269
|
+
|
|
270
|
+
while (reader.pos < end) {
|
|
271
|
+
const tag = reader.uint32();
|
|
272
|
+
|
|
273
|
+
switch (tag >>> 3) {
|
|
274
|
+
default:
|
|
275
|
+
reader.skipType(tag & 7);
|
|
276
|
+
break;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
return message;
|
|
281
|
+
},
|
|
282
|
+
|
|
283
|
+
fromPartial(_: DeepPartial<MsgUpdateSpotFeeParamsResponse>): MsgUpdateSpotFeeParamsResponse {
|
|
284
|
+
const message = createBaseMsgUpdateSpotFeeParamsResponse();
|
|
285
|
+
return message;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
};
|
|
289
|
+
|
|
175
290
|
function createBaseMsgSetMarketFeeDiscountParams(): MsgSetMarketFeeDiscountParams {
|
|
176
291
|
return {
|
|
177
292
|
authority: "",
|