@zoguxprotocol/proto 0.1.1 → 0.1.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/package.json +1 -1
- package/src/codegen/cosmos/bundle.ts +126 -126
- package/src/codegen/zogux/bundle.ts +180 -170
- package/src/codegen/zogux/feetiers/genesis.ts +2 -16
- package/src/codegen/zogux/feetiers/params.ts +0 -182
- package/src/codegen/zogux/feetiers/query.lcd.ts +1 -9
- package/src/codegen/zogux/feetiers/query.rpc.Query.ts +1 -15
- package/src/codegen/zogux/feetiers/query.ts +1 -108
- package/src/codegen/zogux/feetiers/tx.rpc.msg.ts +1 -11
- package/src/codegen/zogux/feetiers/tx.ts +1 -116
- package/src/codegen/zogux/lcd.ts +3 -0
- package/src/codegen/zogux/rpc.query.ts +1 -0
- package/src/codegen/zogux/rpc.tx.ts +1 -0
- package/src/codegen/zogux/spots/fee_tier.ts +29 -1
- package/src/codegen/zogux/spots/query.lcd.ts +22 -0
- package/src/codegen/zogux/spots/query.rpc.Query.ts +35 -0
- package/src/codegen/zogux/spots/query.ts +110 -0
- package/src/codegen/zogux/spots/tx.rpc.msg.ts +24 -0
- package/src/codegen/zogux/spots/tx.ts +118 -0
|
@@ -42,48 +42,6 @@ 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
|
-
}
|
|
87
45
|
|
|
88
46
|
function createBasePerpetualFeeParams(): PerpetualFeeParams {
|
|
89
47
|
return {
|
|
@@ -223,144 +181,4 @@ export const PerpetualFeeTier = {
|
|
|
223
181
|
return message;
|
|
224
182
|
}
|
|
225
183
|
|
|
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
|
-
|
|
366
184
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LCDClient } from "@osmonauts/lcd";
|
|
2
|
-
import { QueryPerpetualFeeParamsRequest, QueryPerpetualFeeParamsResponseSDKType,
|
|
2
|
+
import { QueryPerpetualFeeParamsRequest, QueryPerpetualFeeParamsResponseSDKType, QueryUserFeeTierRequest, QueryUserFeeTierResponseSDKType, QueryPerMarketFeeDiscountParamsRequest, QueryPerMarketFeeDiscountParamsResponseSDKType, QueryAllMarketFeeDiscountParamsRequest, QueryAllMarketFeeDiscountParamsResponseSDKType, QueryStakingTiersRequest, QueryStakingTiersResponseSDKType, QueryUserStakingTierRequest, QueryUserStakingTierResponseSDKType } from "./query";
|
|
3
3
|
export class LCDQueryClient {
|
|
4
4
|
req: LCDClient;
|
|
5
5
|
|
|
@@ -10,7 +10,6 @@ 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);
|
|
14
13
|
this.userFeeTier = this.userFeeTier.bind(this);
|
|
15
14
|
this.perMarketFeeDiscountParams = this.perMarketFeeDiscountParams.bind(this);
|
|
16
15
|
this.allMarketFeeDiscountParams = this.allMarketFeeDiscountParams.bind(this);
|
|
@@ -24,13 +23,6 @@ export class LCDQueryClient {
|
|
|
24
23
|
const endpoint = `zogux/v4/feetiers/perpetual_fee_params`;
|
|
25
24
|
return await this.req.get<QueryPerpetualFeeParamsResponseSDKType>(endpoint);
|
|
26
25
|
}
|
|
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
|
-
}
|
|
34
26
|
/* Queries a user's fee tier */
|
|
35
27
|
|
|
36
28
|
|
|
@@ -1,15 +1,12 @@
|
|
|
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,
|
|
4
|
+
import { QueryPerpetualFeeParamsRequest, QueryPerpetualFeeParamsResponse, 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>;
|
|
13
10
|
/** Queries a user's fee tier */
|
|
14
11
|
|
|
15
12
|
userFeeTier(request: QueryUserFeeTierRequest): Promise<QueryUserFeeTierResponse>;
|
|
@@ -35,7 +32,6 @@ export class QueryClientImpl implements Query {
|
|
|
35
32
|
constructor(rpc: Rpc) {
|
|
36
33
|
this.rpc = rpc;
|
|
37
34
|
this.perpetualFeeParams = this.perpetualFeeParams.bind(this);
|
|
38
|
-
this.spotFeeParams = this.spotFeeParams.bind(this);
|
|
39
35
|
this.userFeeTier = this.userFeeTier.bind(this);
|
|
40
36
|
this.perMarketFeeDiscountParams = this.perMarketFeeDiscountParams.bind(this);
|
|
41
37
|
this.allMarketFeeDiscountParams = this.allMarketFeeDiscountParams.bind(this);
|
|
@@ -49,12 +45,6 @@ export class QueryClientImpl implements Query {
|
|
|
49
45
|
return promise.then(data => QueryPerpetualFeeParamsResponse.decode(new _m0.Reader(data)));
|
|
50
46
|
}
|
|
51
47
|
|
|
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
|
-
|
|
58
48
|
userFeeTier(request: QueryUserFeeTierRequest): Promise<QueryUserFeeTierResponse> {
|
|
59
49
|
const data = QueryUserFeeTierRequest.encode(request).finish();
|
|
60
50
|
const promise = this.rpc.request("zogux.feetiers.Query", "UserFeeTier", data);
|
|
@@ -94,10 +84,6 @@ export const createRpcQueryExtension = (base: QueryClient) => {
|
|
|
94
84
|
return queryService.perpetualFeeParams(request);
|
|
95
85
|
},
|
|
96
86
|
|
|
97
|
-
spotFeeParams(request?: QuerySpotFeeParamsRequest): Promise<QuerySpotFeeParamsResponse> {
|
|
98
|
-
return queryService.spotFeeParams(request);
|
|
99
|
-
},
|
|
100
|
-
|
|
101
87
|
userFeeTier(request: QueryUserFeeTierRequest): Promise<QueryUserFeeTierResponse> {
|
|
102
88
|
return queryService.userFeeTier(request);
|
|
103
89
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PerpetualFeeParams, PerpetualFeeParamsSDKType,
|
|
1
|
+
import { PerpetualFeeParams, PerpetualFeeParamsSDKType, 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,34 +31,6 @@ 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
|
-
}
|
|
62
34
|
/** QueryUserFeeTierRequest is a request type for the UserFeeTier RPC method. */
|
|
63
35
|
|
|
64
36
|
export interface QueryUserFeeTierRequest {
|
|
@@ -284,85 +256,6 @@ export const QueryPerpetualFeeParamsResponse = {
|
|
|
284
256
|
|
|
285
257
|
};
|
|
286
258
|
|
|
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
|
-
|
|
366
259
|
function createBaseQueryUserFeeTierRequest(): QueryUserFeeTierRequest {
|
|
367
260
|
return {
|
|
368
261
|
user: ""
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { Rpc } from "../../helpers";
|
|
2
2
|
import * as _m0 from "protobufjs/minimal";
|
|
3
|
-
import { MsgUpdatePerpetualFeeParams, MsgUpdatePerpetualFeeParamsResponse,
|
|
3
|
+
import { MsgUpdatePerpetualFeeParams, MsgUpdatePerpetualFeeParamsResponse, 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>;
|
|
12
9
|
/**
|
|
13
10
|
* SetMarketFeeDiscountParams sets or updates PerMarketFeeDiscountParams for
|
|
14
11
|
* specific CLOB pairs.
|
|
@@ -25,7 +22,6 @@ export class MsgClientImpl implements Msg {
|
|
|
25
22
|
constructor(rpc: Rpc) {
|
|
26
23
|
this.rpc = rpc;
|
|
27
24
|
this.updatePerpetualFeeParams = this.updatePerpetualFeeParams.bind(this);
|
|
28
|
-
this.updateSpotFeeParams = this.updateSpotFeeParams.bind(this);
|
|
29
25
|
this.setMarketFeeDiscountParams = this.setMarketFeeDiscountParams.bind(this);
|
|
30
26
|
this.setStakingTiers = this.setStakingTiers.bind(this);
|
|
31
27
|
}
|
|
@@ -36,12 +32,6 @@ export class MsgClientImpl implements Msg {
|
|
|
36
32
|
return promise.then(data => MsgUpdatePerpetualFeeParamsResponse.decode(new _m0.Reader(data)));
|
|
37
33
|
}
|
|
38
34
|
|
|
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
|
-
|
|
45
35
|
setMarketFeeDiscountParams(request: MsgSetMarketFeeDiscountParams): Promise<MsgSetMarketFeeDiscountParamsResponse> {
|
|
46
36
|
const data = MsgSetMarketFeeDiscountParams.encode(request).finish();
|
|
47
37
|
const promise = this.rpc.request("zogux.feetiers.Msg", "SetMarketFeeDiscountParams", data);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PerpetualFeeParams, PerpetualFeeParamsSDKType
|
|
1
|
+
import { PerpetualFeeParams, PerpetualFeeParamsSDKType } 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,32 +29,6 @@ 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 {}
|
|
58
32
|
/**
|
|
59
33
|
* MsgSetMarketFeeDiscountParams is the Msg/SetMarketFeeDiscountParams
|
|
60
34
|
* request type.
|
|
@@ -198,95 +172,6 @@ export const MsgUpdatePerpetualFeeParamsResponse = {
|
|
|
198
172
|
|
|
199
173
|
};
|
|
200
174
|
|
|
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
|
-
|
|
290
175
|
function createBaseMsgSetMarketFeeDiscountParams(): MsgSetMarketFeeDiscountParams {
|
|
291
176
|
return {
|
|
292
177
|
authority: "",
|
package/src/codegen/zogux/lcd.ts
CHANGED
|
@@ -156,6 +156,9 @@ export const createLCDClient = async ({
|
|
|
156
156
|
rewards: new (await import("./rewards/query.lcd")).LCDQueryClient({
|
|
157
157
|
requestClient
|
|
158
158
|
}),
|
|
159
|
+
spots: new (await import("./spots/query.lcd")).LCDQueryClient({
|
|
160
|
+
requestClient
|
|
161
|
+
}),
|
|
159
162
|
stats: new (await import("./stats/query.lcd")).LCDQueryClient({
|
|
160
163
|
requestClient
|
|
161
164
|
}),
|
|
@@ -96,6 +96,7 @@ export const createRPCQueryClient = async ({
|
|
|
96
96
|
revshare: (await import("./revshare/query.rpc.Query")).createRpcQueryExtension(client),
|
|
97
97
|
rewards: (await import("./rewards/query.rpc.Query")).createRpcQueryExtension(client),
|
|
98
98
|
sending: (await import("./sending/query.rpc.Query")).createRpcQueryExtension(client),
|
|
99
|
+
spots: (await import("./spots/query.rpc.Query")).createRpcQueryExtension(client),
|
|
99
100
|
stats: (await import("./stats/query.rpc.Query")).createRpcQueryExtension(client),
|
|
100
101
|
subaccounts: (await import("./subaccounts/query.rpc.Query")).createRpcQueryExtension(client),
|
|
101
102
|
token: (await import("./token/query.rpc.Query")).createRpcQueryExtension(client),
|
|
@@ -74,6 +74,7 @@ export const createRPCMsgClient = async ({
|
|
|
74
74
|
revshare: new (await import("./revshare/tx.rpc.msg")).MsgClientImpl(rpc),
|
|
75
75
|
rewards: new (await import("./rewards/tx.rpc.msg")).MsgClientImpl(rpc),
|
|
76
76
|
sending: new (await import("./sending/tx.rpc.msg")).MsgClientImpl(rpc),
|
|
77
|
+
spots: new (await import("./spots/tx.rpc.msg")).MsgClientImpl(rpc),
|
|
77
78
|
stats: new (await import("./stats/tx.rpc.msg")).MsgClientImpl(rpc),
|
|
78
79
|
token: new (await import("./token/tx.rpc.msg")).MsgClientImpl(rpc),
|
|
79
80
|
vault: new (await import("./vault/tx.rpc.msg")).MsgClientImpl(rpc),
|
|
@@ -17,6 +17,12 @@ export interface SpotFeeTier {
|
|
|
17
17
|
/** Taker fee in parts per million */
|
|
18
18
|
|
|
19
19
|
takerFeePpm: number;
|
|
20
|
+
/** The total volume share requirement. */
|
|
21
|
+
|
|
22
|
+
totalVolumeShareRequirementPpm: number;
|
|
23
|
+
/** The maker volume share requirement. */
|
|
24
|
+
|
|
25
|
+
makerVolumeShareRequirementPpm: number;
|
|
20
26
|
}
|
|
21
27
|
/** SpotFeeTier represents a fee tier for spot trading. */
|
|
22
28
|
|
|
@@ -26,6 +32,8 @@ export interface SpotFeeTierSDKType {
|
|
|
26
32
|
absolute_volume_requirement: Long;
|
|
27
33
|
maker_fee_ppm: number;
|
|
28
34
|
taker_fee_ppm: number;
|
|
35
|
+
total_volume_share_requirement_ppm: number;
|
|
36
|
+
maker_volume_share_requirement_ppm: number;
|
|
29
37
|
}
|
|
30
38
|
|
|
31
39
|
function createBaseSpotFeeTier(): SpotFeeTier {
|
|
@@ -34,7 +42,9 @@ function createBaseSpotFeeTier(): SpotFeeTier {
|
|
|
34
42
|
name: "",
|
|
35
43
|
absoluteVolumeRequirement: Long.UZERO,
|
|
36
44
|
makerFeePpm: 0,
|
|
37
|
-
takerFeePpm: 0
|
|
45
|
+
takerFeePpm: 0,
|
|
46
|
+
totalVolumeShareRequirementPpm: 0,
|
|
47
|
+
makerVolumeShareRequirementPpm: 0
|
|
38
48
|
};
|
|
39
49
|
}
|
|
40
50
|
|
|
@@ -60,6 +70,14 @@ export const SpotFeeTier = {
|
|
|
60
70
|
writer.uint32(40).sint32(message.takerFeePpm);
|
|
61
71
|
}
|
|
62
72
|
|
|
73
|
+
if (message.totalVolumeShareRequirementPpm !== 0) {
|
|
74
|
+
writer.uint32(48).uint32(message.totalVolumeShareRequirementPpm);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (message.makerVolumeShareRequirementPpm !== 0) {
|
|
78
|
+
writer.uint32(56).uint32(message.makerVolumeShareRequirementPpm);
|
|
79
|
+
}
|
|
80
|
+
|
|
63
81
|
return writer;
|
|
64
82
|
},
|
|
65
83
|
|
|
@@ -92,6 +110,14 @@ export const SpotFeeTier = {
|
|
|
92
110
|
message.takerFeePpm = reader.sint32();
|
|
93
111
|
break;
|
|
94
112
|
|
|
113
|
+
case 6:
|
|
114
|
+
message.totalVolumeShareRequirementPpm = reader.uint32();
|
|
115
|
+
break;
|
|
116
|
+
|
|
117
|
+
case 7:
|
|
118
|
+
message.makerVolumeShareRequirementPpm = reader.uint32();
|
|
119
|
+
break;
|
|
120
|
+
|
|
95
121
|
default:
|
|
96
122
|
reader.skipType(tag & 7);
|
|
97
123
|
break;
|
|
@@ -108,6 +134,8 @@ export const SpotFeeTier = {
|
|
|
108
134
|
message.absoluteVolumeRequirement = object.absoluteVolumeRequirement !== undefined && object.absoluteVolumeRequirement !== null ? Long.fromValue(object.absoluteVolumeRequirement) : Long.UZERO;
|
|
109
135
|
message.makerFeePpm = object.makerFeePpm ?? 0;
|
|
110
136
|
message.takerFeePpm = object.takerFeePpm ?? 0;
|
|
137
|
+
message.totalVolumeShareRequirementPpm = object.totalVolumeShareRequirementPpm ?? 0;
|
|
138
|
+
message.makerVolumeShareRequirementPpm = object.makerVolumeShareRequirementPpm ?? 0;
|
|
111
139
|
return message;
|
|
112
140
|
}
|
|
113
141
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LCDClient } from "@osmonauts/lcd";
|
|
2
|
+
import { QuerySpotFeeTiersRequest, QuerySpotFeeTiersResponseSDKType } from "./query";
|
|
3
|
+
export class LCDQueryClient {
|
|
4
|
+
req: LCDClient;
|
|
5
|
+
|
|
6
|
+
constructor({
|
|
7
|
+
requestClient
|
|
8
|
+
}: {
|
|
9
|
+
requestClient: LCDClient;
|
|
10
|
+
}) {
|
|
11
|
+
this.req = requestClient;
|
|
12
|
+
this.spotFeeTiers = this.spotFeeTiers.bind(this);
|
|
13
|
+
}
|
|
14
|
+
/* Queries all spot fee tiers. */
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
async spotFeeTiers(_params: QuerySpotFeeTiersRequest = {}): Promise<QuerySpotFeeTiersResponseSDKType> {
|
|
18
|
+
const endpoint = `zogux/v4/spots/spot_fee_tiers`;
|
|
19
|
+
return await this.req.get<QuerySpotFeeTiersResponseSDKType>(endpoint);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
}
|