@bze/bzejs 2.0.2 → 3.0.0

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.
Files changed (44) hide show
  1. package/dist/bze/bundle.d.ts +129 -4
  2. package/dist/bze/burner/burned_coins.d.ts +106 -0
  3. package/dist/bze/burner/burned_coins.js +170 -1
  4. package/dist/bze/burner/genesis.d.ts +7 -1
  5. package/dist/bze/burner/genesis.js +27 -1
  6. package/dist/bze/burner/tx.d.ts +112 -0
  7. package/dist/bze/burner/tx.js +181 -1
  8. package/dist/bze/burner/tx.registry.d.ts +13 -1
  9. package/dist/bze/burner/tx.registry.js +19 -1
  10. package/dist/bze/burner/tx.rpc.func.d.ts +7 -1
  11. package/dist/bze/burner/tx.rpc.func.js +9 -1
  12. package/dist/bze/rewards/genesis.d.ts +10 -1
  13. package/dist/bze/rewards/genesis.js +40 -1
  14. package/dist/bze/rewards/params.d.ts +3 -0
  15. package/dist/bze/rewards/params.js +16 -4
  16. package/dist/bze/rewards/store.d.ts +162 -0
  17. package/dist/bze/rewards/store.js +273 -1
  18. package/dist/bze/tradebin/genesis.d.ts +5 -2
  19. package/dist/bze/tradebin/genesis.js +21 -5
  20. package/dist/bze/tradebin/params.d.ts +18 -0
  21. package/dist/bze/tradebin/params.js +76 -4
  22. package/dist/bze/tradebin/query.d.ts +1 -1
  23. package/dist/bze/tradebin/query.js +1 -1
  24. package/dist/bze/tradebin/tx.d.ts +1 -1
  25. package/dist/bze/tradebin/tx.js +1 -1
  26. package/dist/bze/tradebin/v2/params.d.ts +96 -0
  27. package/dist/bze/tradebin/v2/params.js +224 -0
  28. package/dist/bze/txfeecollector/params.d.ts +11 -4
  29. package/dist/bze/txfeecollector/params.js +41 -9
  30. package/dist/esm/bze/burner/burned_coins.js +169 -0
  31. package/dist/esm/bze/burner/genesis.js +28 -2
  32. package/dist/esm/bze/burner/tx.js +180 -0
  33. package/dist/esm/bze/burner/tx.registry.js +20 -2
  34. package/dist/esm/bze/burner/tx.rpc.func.js +9 -1
  35. package/dist/esm/bze/rewards/genesis.js +41 -2
  36. package/dist/esm/bze/rewards/params.js +16 -4
  37. package/dist/esm/bze/rewards/store.js +272 -0
  38. package/dist/esm/bze/tradebin/genesis.js +22 -6
  39. package/dist/esm/bze/tradebin/params.js +76 -4
  40. package/dist/esm/bze/tradebin/query.js +1 -1
  41. package/dist/esm/bze/tradebin/tx.js +1 -1
  42. package/dist/esm/bze/tradebin/v2/params.js +221 -0
  43. package/dist/esm/bze/txfeecollector/params.js +41 -9
  44. package/package.json +3 -3
@@ -0,0 +1,221 @@
1
+ //@ts-nocheck
2
+ import { Coin } from "../../../cosmos/base/v1beta1/coin";
3
+ import { BinaryReader, BinaryWriter } from "../../../binary";
4
+ import { GlobalDecoderRegistry } from "../../../registry";
5
+ function createBaseParams() {
6
+ return {
7
+ createMarketFee: Coin.fromPartial({}),
8
+ marketMakerFee: Coin.fromPartial({}),
9
+ marketTakerFee: Coin.fromPartial({}),
10
+ makerFeeDestination: "",
11
+ takerFeeDestination: "",
12
+ nativeDenom: "",
13
+ orderBookExtraGasWindow: BigInt(0),
14
+ orderBookQueueExtraGas: BigInt(0),
15
+ fillOrdersExtraGas: BigInt(0),
16
+ minNativeLiquidityForModuleSwap: "",
17
+ orderBookPerBlockMessages: BigInt(0),
18
+ orderBookQueueMessageScanExtraGas: BigInt(0)
19
+ };
20
+ }
21
+ /**
22
+ * Params defines the parameters for the module with proper types
23
+ * for fee fields (migrated from string to cosmos.base.v1beta1.Coin).
24
+ * @name Params
25
+ * @package bze.tradebin.v2
26
+ * @see proto type: bze.tradebin.v2.Params
27
+ */
28
+ export const Params = {
29
+ typeUrl: "/bze.tradebin.v2.Params",
30
+ is(o) {
31
+ return o && (o.$typeUrl === Params.typeUrl || Coin.is(o.createMarketFee) && Coin.is(o.marketMakerFee) && Coin.is(o.marketTakerFee) && typeof o.makerFeeDestination === "string" && typeof o.takerFeeDestination === "string" && typeof o.nativeDenom === "string" && typeof o.orderBookExtraGasWindow === "bigint" && typeof o.orderBookQueueExtraGas === "bigint" && typeof o.fillOrdersExtraGas === "bigint" && typeof o.minNativeLiquidityForModuleSwap === "string" && typeof o.orderBookPerBlockMessages === "bigint" && typeof o.orderBookQueueMessageScanExtraGas === "bigint");
32
+ },
33
+ isSDK(o) {
34
+ return o && (o.$typeUrl === Params.typeUrl || Coin.isSDK(o.createMarketFee) && Coin.isSDK(o.marketMakerFee) && Coin.isSDK(o.marketTakerFee) && typeof o.makerFeeDestination === "string" && typeof o.takerFeeDestination === "string" && typeof o.native_denom === "string" && typeof o.orderBookExtraGasWindow === "bigint" && typeof o.orderBookQueueExtraGas === "bigint" && typeof o.fillOrdersExtraGas === "bigint" && typeof o.minNativeLiquidityForModuleSwap === "string" && typeof o.orderBookPerBlockMessages === "bigint" && typeof o.orderBookQueueMessageScanExtraGas === "bigint");
35
+ },
36
+ isAmino(o) {
37
+ return o && (o.$typeUrl === Params.typeUrl || Coin.isAmino(o.createMarketFee) && Coin.isAmino(o.marketMakerFee) && Coin.isAmino(o.marketTakerFee) && typeof o.makerFeeDestination === "string" && typeof o.takerFeeDestination === "string" && typeof o.native_denom === "string" && typeof o.orderBookExtraGasWindow === "bigint" && typeof o.orderBookQueueExtraGas === "bigint" && typeof o.fillOrdersExtraGas === "bigint" && typeof o.minNativeLiquidityForModuleSwap === "string" && typeof o.orderBookPerBlockMessages === "bigint" && typeof o.orderBookQueueMessageScanExtraGas === "bigint");
38
+ },
39
+ encode(message, writer = BinaryWriter.create()) {
40
+ if (message.createMarketFee !== undefined) {
41
+ Coin.encode(message.createMarketFee, writer.uint32(10).fork()).ldelim();
42
+ }
43
+ if (message.marketMakerFee !== undefined) {
44
+ Coin.encode(message.marketMakerFee, writer.uint32(18).fork()).ldelim();
45
+ }
46
+ if (message.marketTakerFee !== undefined) {
47
+ Coin.encode(message.marketTakerFee, writer.uint32(26).fork()).ldelim();
48
+ }
49
+ if (message.makerFeeDestination !== "") {
50
+ writer.uint32(34).string(message.makerFeeDestination);
51
+ }
52
+ if (message.takerFeeDestination !== "") {
53
+ writer.uint32(42).string(message.takerFeeDestination);
54
+ }
55
+ if (message.nativeDenom !== "") {
56
+ writer.uint32(50).string(message.nativeDenom);
57
+ }
58
+ if (message.orderBookExtraGasWindow !== BigInt(0)) {
59
+ writer.uint32(56).uint64(message.orderBookExtraGasWindow);
60
+ }
61
+ if (message.orderBookQueueExtraGas !== BigInt(0)) {
62
+ writer.uint32(64).uint64(message.orderBookQueueExtraGas);
63
+ }
64
+ if (message.fillOrdersExtraGas !== BigInt(0)) {
65
+ writer.uint32(72).uint64(message.fillOrdersExtraGas);
66
+ }
67
+ if (message.minNativeLiquidityForModuleSwap !== "") {
68
+ writer.uint32(82).string(message.minNativeLiquidityForModuleSwap);
69
+ }
70
+ if (message.orderBookPerBlockMessages !== BigInt(0)) {
71
+ writer.uint32(88).uint64(message.orderBookPerBlockMessages);
72
+ }
73
+ if (message.orderBookQueueMessageScanExtraGas !== BigInt(0)) {
74
+ writer.uint32(96).uint64(message.orderBookQueueMessageScanExtraGas);
75
+ }
76
+ return writer;
77
+ },
78
+ decode(input, length) {
79
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
80
+ let end = length === undefined ? reader.len : reader.pos + length;
81
+ const message = createBaseParams();
82
+ while (reader.pos < end) {
83
+ const tag = reader.uint32();
84
+ switch (tag >>> 3) {
85
+ case 1:
86
+ message.createMarketFee = Coin.decode(reader, reader.uint32());
87
+ break;
88
+ case 2:
89
+ message.marketMakerFee = Coin.decode(reader, reader.uint32());
90
+ break;
91
+ case 3:
92
+ message.marketTakerFee = Coin.decode(reader, reader.uint32());
93
+ break;
94
+ case 4:
95
+ message.makerFeeDestination = reader.string();
96
+ break;
97
+ case 5:
98
+ message.takerFeeDestination = reader.string();
99
+ break;
100
+ case 6:
101
+ message.nativeDenom = reader.string();
102
+ break;
103
+ case 7:
104
+ message.orderBookExtraGasWindow = reader.uint64();
105
+ break;
106
+ case 8:
107
+ message.orderBookQueueExtraGas = reader.uint64();
108
+ break;
109
+ case 9:
110
+ message.fillOrdersExtraGas = reader.uint64();
111
+ break;
112
+ case 10:
113
+ message.minNativeLiquidityForModuleSwap = reader.string();
114
+ break;
115
+ case 11:
116
+ message.orderBookPerBlockMessages = reader.uint64();
117
+ break;
118
+ case 12:
119
+ message.orderBookQueueMessageScanExtraGas = reader.uint64();
120
+ break;
121
+ default:
122
+ reader.skipType(tag & 7);
123
+ break;
124
+ }
125
+ }
126
+ return message;
127
+ },
128
+ fromPartial(object) {
129
+ const message = createBaseParams();
130
+ message.createMarketFee = object.createMarketFee !== undefined && object.createMarketFee !== null ? Coin.fromPartial(object.createMarketFee) : undefined;
131
+ message.marketMakerFee = object.marketMakerFee !== undefined && object.marketMakerFee !== null ? Coin.fromPartial(object.marketMakerFee) : undefined;
132
+ message.marketTakerFee = object.marketTakerFee !== undefined && object.marketTakerFee !== null ? Coin.fromPartial(object.marketTakerFee) : undefined;
133
+ message.makerFeeDestination = object.makerFeeDestination ?? "";
134
+ message.takerFeeDestination = object.takerFeeDestination ?? "";
135
+ message.nativeDenom = object.nativeDenom ?? "";
136
+ message.orderBookExtraGasWindow = object.orderBookExtraGasWindow !== undefined && object.orderBookExtraGasWindow !== null ? BigInt(object.orderBookExtraGasWindow.toString()) : BigInt(0);
137
+ message.orderBookQueueExtraGas = object.orderBookQueueExtraGas !== undefined && object.orderBookQueueExtraGas !== null ? BigInt(object.orderBookQueueExtraGas.toString()) : BigInt(0);
138
+ message.fillOrdersExtraGas = object.fillOrdersExtraGas !== undefined && object.fillOrdersExtraGas !== null ? BigInt(object.fillOrdersExtraGas.toString()) : BigInt(0);
139
+ message.minNativeLiquidityForModuleSwap = object.minNativeLiquidityForModuleSwap ?? "";
140
+ message.orderBookPerBlockMessages = object.orderBookPerBlockMessages !== undefined && object.orderBookPerBlockMessages !== null ? BigInt(object.orderBookPerBlockMessages.toString()) : BigInt(0);
141
+ message.orderBookQueueMessageScanExtraGas = object.orderBookQueueMessageScanExtraGas !== undefined && object.orderBookQueueMessageScanExtraGas !== null ? BigInt(object.orderBookQueueMessageScanExtraGas.toString()) : BigInt(0);
142
+ return message;
143
+ },
144
+ fromAmino(object) {
145
+ const message = createBaseParams();
146
+ if (object.createMarketFee !== undefined && object.createMarketFee !== null) {
147
+ message.createMarketFee = Coin.fromAmino(object.createMarketFee);
148
+ }
149
+ if (object.marketMakerFee !== undefined && object.marketMakerFee !== null) {
150
+ message.marketMakerFee = Coin.fromAmino(object.marketMakerFee);
151
+ }
152
+ if (object.marketTakerFee !== undefined && object.marketTakerFee !== null) {
153
+ message.marketTakerFee = Coin.fromAmino(object.marketTakerFee);
154
+ }
155
+ if (object.makerFeeDestination !== undefined && object.makerFeeDestination !== null) {
156
+ message.makerFeeDestination = object.makerFeeDestination;
157
+ }
158
+ if (object.takerFeeDestination !== undefined && object.takerFeeDestination !== null) {
159
+ message.takerFeeDestination = object.takerFeeDestination;
160
+ }
161
+ if (object.native_denom !== undefined && object.native_denom !== null) {
162
+ message.nativeDenom = object.native_denom;
163
+ }
164
+ if (object.orderBookExtraGasWindow !== undefined && object.orderBookExtraGasWindow !== null) {
165
+ message.orderBookExtraGasWindow = BigInt(object.orderBookExtraGasWindow);
166
+ }
167
+ if (object.orderBookQueueExtraGas !== undefined && object.orderBookQueueExtraGas !== null) {
168
+ message.orderBookQueueExtraGas = BigInt(object.orderBookQueueExtraGas);
169
+ }
170
+ if (object.fillOrdersExtraGas !== undefined && object.fillOrdersExtraGas !== null) {
171
+ message.fillOrdersExtraGas = BigInt(object.fillOrdersExtraGas);
172
+ }
173
+ if (object.minNativeLiquidityForModuleSwap !== undefined && object.minNativeLiquidityForModuleSwap !== null) {
174
+ message.minNativeLiquidityForModuleSwap = object.minNativeLiquidityForModuleSwap;
175
+ }
176
+ if (object.orderBookPerBlockMessages !== undefined && object.orderBookPerBlockMessages !== null) {
177
+ message.orderBookPerBlockMessages = BigInt(object.orderBookPerBlockMessages);
178
+ }
179
+ if (object.orderBookQueueMessageScanExtraGas !== undefined && object.orderBookQueueMessageScanExtraGas !== null) {
180
+ message.orderBookQueueMessageScanExtraGas = BigInt(object.orderBookQueueMessageScanExtraGas);
181
+ }
182
+ return message;
183
+ },
184
+ toAmino(message) {
185
+ const obj = {};
186
+ obj.createMarketFee = message.createMarketFee ? Coin.toAmino(message.createMarketFee) : undefined;
187
+ obj.marketMakerFee = message.marketMakerFee ? Coin.toAmino(message.marketMakerFee) : undefined;
188
+ obj.marketTakerFee = message.marketTakerFee ? Coin.toAmino(message.marketTakerFee) : undefined;
189
+ obj.makerFeeDestination = message.makerFeeDestination === "" ? undefined : message.makerFeeDestination;
190
+ obj.takerFeeDestination = message.takerFeeDestination === "" ? undefined : message.takerFeeDestination;
191
+ obj.native_denom = message.nativeDenom === "" ? undefined : message.nativeDenom;
192
+ obj.orderBookExtraGasWindow = message.orderBookExtraGasWindow !== BigInt(0) ? message.orderBookExtraGasWindow?.toString() : undefined;
193
+ obj.orderBookQueueExtraGas = message.orderBookQueueExtraGas !== BigInt(0) ? message.orderBookQueueExtraGas?.toString() : undefined;
194
+ obj.fillOrdersExtraGas = message.fillOrdersExtraGas !== BigInt(0) ? message.fillOrdersExtraGas?.toString() : undefined;
195
+ obj.minNativeLiquidityForModuleSwap = message.minNativeLiquidityForModuleSwap === "" ? undefined : message.minNativeLiquidityForModuleSwap;
196
+ obj.orderBookPerBlockMessages = message.orderBookPerBlockMessages !== BigInt(0) ? message.orderBookPerBlockMessages?.toString() : undefined;
197
+ obj.orderBookQueueMessageScanExtraGas = message.orderBookQueueMessageScanExtraGas !== BigInt(0) ? message.orderBookQueueMessageScanExtraGas?.toString() : undefined;
198
+ return obj;
199
+ },
200
+ fromAminoMsg(object) {
201
+ return Params.fromAmino(object.value);
202
+ },
203
+ fromProtoMsg(message) {
204
+ return Params.decode(message.value);
205
+ },
206
+ toProto(message) {
207
+ return Params.encode(message).finish();
208
+ },
209
+ toProtoMsg(message) {
210
+ return {
211
+ typeUrl: "/bze.tradebin.v2.Params",
212
+ value: Params.encode(message).finish()
213
+ };
214
+ },
215
+ registerTypeUrl() {
216
+ if (!GlobalDecoderRegistry.registerExistingTypeUrl(Params.typeUrl)) {
217
+ return;
218
+ }
219
+ Coin.registerTypeUrl();
220
+ }
221
+ };
@@ -1,7 +1,12 @@
1
1
  //@ts-nocheck
2
+ import { DecCoin } from "../../cosmos/base/v1beta1/coin";
2
3
  import { BinaryReader, BinaryWriter } from "../../binary";
4
+ import { GlobalDecoderRegistry } from "../../registry";
3
5
  function createBaseParams() {
4
- return {};
6
+ return {
7
+ validatorMinGasFee: DecCoin.fromPartial({}),
8
+ maxBalanceIterations: BigInt(0)
9
+ };
5
10
  }
6
11
  /**
7
12
  * Params defines the parameters for the module.
@@ -13,15 +18,21 @@ export const Params = {
13
18
  typeUrl: "/bze.txfeecollector.Params",
14
19
  aminoType: "bze/x/txfeecollector/Params",
15
20
  is(o) {
16
- return o && o.$typeUrl === Params.typeUrl;
21
+ return o && (o.$typeUrl === Params.typeUrl || DecCoin.is(o.validatorMinGasFee) && typeof o.maxBalanceIterations === "bigint");
17
22
  },
18
23
  isSDK(o) {
19
- return o && o.$typeUrl === Params.typeUrl;
24
+ return o && (o.$typeUrl === Params.typeUrl || DecCoin.isSDK(o.ValidatorMinGasFee) && typeof o.MaxBalanceIterations === "bigint");
20
25
  },
21
26
  isAmino(o) {
22
- return o && o.$typeUrl === Params.typeUrl;
27
+ return o && (o.$typeUrl === Params.typeUrl || DecCoin.isAmino(o.ValidatorMinGasFee) && typeof o.MaxBalanceIterations === "bigint");
23
28
  },
24
- encode(_, writer = BinaryWriter.create()) {
29
+ encode(message, writer = BinaryWriter.create()) {
30
+ if (message.validatorMinGasFee !== undefined) {
31
+ DecCoin.encode(message.validatorMinGasFee, writer.uint32(10).fork()).ldelim();
32
+ }
33
+ if (message.maxBalanceIterations !== BigInt(0)) {
34
+ writer.uint32(16).uint64(message.maxBalanceIterations);
35
+ }
25
36
  return writer;
26
37
  },
27
38
  decode(input, length) {
@@ -31,6 +42,12 @@ export const Params = {
31
42
  while (reader.pos < end) {
32
43
  const tag = reader.uint32();
33
44
  switch (tag >>> 3) {
45
+ case 1:
46
+ message.validatorMinGasFee = DecCoin.decode(reader, reader.uint32());
47
+ break;
48
+ case 2:
49
+ message.maxBalanceIterations = reader.uint64();
50
+ break;
34
51
  default:
35
52
  reader.skipType(tag & 7);
36
53
  break;
@@ -38,16 +55,26 @@ export const Params = {
38
55
  }
39
56
  return message;
40
57
  },
41
- fromPartial(_) {
58
+ fromPartial(object) {
42
59
  const message = createBaseParams();
60
+ message.validatorMinGasFee = object.validatorMinGasFee !== undefined && object.validatorMinGasFee !== null ? DecCoin.fromPartial(object.validatorMinGasFee) : undefined;
61
+ message.maxBalanceIterations = object.maxBalanceIterations !== undefined && object.maxBalanceIterations !== null ? BigInt(object.maxBalanceIterations.toString()) : BigInt(0);
43
62
  return message;
44
63
  },
45
- fromAmino(_) {
64
+ fromAmino(object) {
46
65
  const message = createBaseParams();
66
+ if (object.ValidatorMinGasFee !== undefined && object.ValidatorMinGasFee !== null) {
67
+ message.validatorMinGasFee = DecCoin.fromAmino(object.ValidatorMinGasFee);
68
+ }
69
+ if (object.MaxBalanceIterations !== undefined && object.MaxBalanceIterations !== null) {
70
+ message.maxBalanceIterations = BigInt(object.MaxBalanceIterations);
71
+ }
47
72
  return message;
48
73
  },
49
- toAmino(_) {
74
+ toAmino(message) {
50
75
  const obj = {};
76
+ obj.ValidatorMinGasFee = message.validatorMinGasFee ? DecCoin.toAmino(message.validatorMinGasFee) : undefined;
77
+ obj.MaxBalanceIterations = message.maxBalanceIterations !== BigInt(0) ? message.maxBalanceIterations?.toString() : undefined;
51
78
  return obj;
52
79
  },
53
80
  fromAminoMsg(object) {
@@ -71,5 +98,10 @@ export const Params = {
71
98
  value: Params.encode(message).finish()
72
99
  };
73
100
  },
74
- registerTypeUrl() { }
101
+ registerTypeUrl() {
102
+ if (!GlobalDecoderRegistry.registerExistingTypeUrl(Params.typeUrl)) {
103
+ return;
104
+ }
105
+ DecCoin.registerTypeUrl();
106
+ }
75
107
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bze/bzejs",
3
- "version": "2.0.2",
3
+ "version": "3.0.0",
4
4
  "author": "faneaatiku <alphateam@getbze.com>",
5
5
  "description": "BeeZee JS library",
6
6
  "main": "dist/index.js",
@@ -54,7 +54,7 @@
54
54
  "@interchainjs/types": "1.21.0",
55
55
  "@interchainjs/utils": "1.21.0",
56
56
  "@cosmology/lcd": "^0.16.0",
57
- "axios": "^1.14.0"
57
+ "axios": "1.14.0"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@hyperweb/telescope": "^2.2.1",
@@ -65,7 +65,7 @@
65
65
  "typescript": "^5.8.3"
66
66
  },
67
67
  "overrides": {
68
- "axios": "^1.14.0"
68
+ "axios": "1.14.0"
69
69
  },
70
70
  "keywords": []
71
71
  }