decentralcardgame-cardchain-client-ts 0.0.5 → 0.0.6

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 (75) hide show
  1. package/DecentralCardGame.cardchain.cardchain/module.js +311 -309
  2. package/DecentralCardGame.cardchain.cardchain/module.ts +469 -467
  3. package/DecentralCardGame.cardchain.cardchain/registry.js +58 -58
  4. package/DecentralCardGame.cardchain.cardchain/registry.ts +58 -58
  5. package/DecentralCardGame.cardchain.cardchain/rest.ts +3 -0
  6. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/card.js +41 -0
  7. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/card.ts +51 -0
  8. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/genesis.js +14 -1
  9. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/genesis.ts +16 -2
  10. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/query.js +10 -0
  11. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/query.ts +11 -0
  12. package/DecentralCardGame.cardchain.cardchain/types.js +2 -1
  13. package/DecentralCardGame.cardchain.cardchain/types.ts +2 -0
  14. package/client.js +1 -2
  15. package/package.json +1 -1
  16. package/DecentralCardGame.cardchain.cardchain/types/cardchain/card.js +0 -491
  17. package/DecentralCardGame.cardchain.cardchain/types/cardchain/card.ts +0 -556
  18. package/DecentralCardGame.cardchain.cardchain/types/cardchain/collection.js +0 -365
  19. package/DecentralCardGame.cardchain.cardchain/types/cardchain/collection.ts +0 -416
  20. package/DecentralCardGame.cardchain.cardchain/types/cardchain/collection_proposal.js +0 -93
  21. package/DecentralCardGame.cardchain.cardchain/types/cardchain/collection_proposal.ts +0 -124
  22. package/DecentralCardGame.cardchain.cardchain/types/cardchain/copyright_proposal.js +0 -102
  23. package/DecentralCardGame.cardchain.cardchain/types/cardchain/copyright_proposal.ts +0 -134
  24. package/DecentralCardGame.cardchain.cardchain/types/cardchain/council.js +0 -350
  25. package/DecentralCardGame.cardchain.cardchain/types/cardchain/council.ts +0 -409
  26. package/DecentralCardGame.cardchain.cardchain/types/cardchain/genesis.js +0 -241
  27. package/DecentralCardGame.cardchain.cardchain/types/cardchain/genesis.ts +0 -267
  28. package/DecentralCardGame.cardchain.cardchain/types/cardchain/image.js +0 -88
  29. package/DecentralCardGame.cardchain.cardchain/types/cardchain/image.ts +0 -115
  30. package/DecentralCardGame.cardchain.cardchain/types/cardchain/match.js +0 -210
  31. package/DecentralCardGame.cardchain.cardchain/types/cardchain/match.ts +0 -255
  32. package/DecentralCardGame.cardchain.cardchain/types/cardchain/match_reporter_proposal.js +0 -67
  33. package/DecentralCardGame.cardchain.cardchain/types/cardchain/match_reporter_proposal.ts +0 -92
  34. package/DecentralCardGame.cardchain.cardchain/types/cardchain/num.js +0 -73
  35. package/DecentralCardGame.cardchain.cardchain/types/cardchain/num.ts +0 -102
  36. package/DecentralCardGame.cardchain.cardchain/types/cardchain/params.js +0 -275
  37. package/DecentralCardGame.cardchain.cardchain/types/cardchain/params.ts +0 -324
  38. package/DecentralCardGame.cardchain.cardchain/types/cardchain/query.js +0 -1970
  39. package/DecentralCardGame.cardchain.cardchain/types/cardchain/query.ts +0 -2366
  40. package/DecentralCardGame.cardchain.cardchain/types/cardchain/running_average.js +0 -85
  41. package/DecentralCardGame.cardchain.cardchain/types/cardchain/running_average.ts +0 -111
  42. package/DecentralCardGame.cardchain.cardchain/types/cardchain/sell_offer.js +0 -148
  43. package/DecentralCardGame.cardchain.cardchain/types/cardchain/sell_offer.ts +0 -183
  44. package/DecentralCardGame.cardchain.cardchain/types/cardchain/server.js +0 -93
  45. package/DecentralCardGame.cardchain.cardchain/types/cardchain/server.ts +0 -124
  46. package/DecentralCardGame.cardchain.cardchain/types/cardchain/tx.js +0 -4137
  47. package/DecentralCardGame.cardchain.cardchain/types/cardchain/tx.ts +0 -5125
  48. package/DecentralCardGame.cardchain.cardchain/types/cardchain/user.js +0 -496
  49. package/DecentralCardGame.cardchain.cardchain/types/cardchain/user.ts +0 -556
  50. package/DecentralCardGame.cardchain.cardchain/types/cardchain/vote_right.js +0 -84
  51. package/DecentralCardGame.cardchain.cardchain/types/cardchain/vote_right.ts +0 -114
  52. package/DecentralCardGame.cardchain.cardchain/types/cardchain/voting_result.js +0 -127
  53. package/DecentralCardGame.cardchain.cardchain/types/cardchain/voting_result.ts +0 -161
  54. package/DecentralCardGame.cardchain.cardchain/types/cardchain/voting_results.js +0 -148
  55. package/DecentralCardGame.cardchain.cardchain/types/cardchain/voting_results.ts +0 -182
  56. package/cosmos.authz.v1beta1/types/cosmos/base/abci/v1beta1/abci.js +0 -773
  57. package/cosmos.authz.v1beta1/types/cosmos/base/abci/v1beta1/abci.ts +0 -989
  58. package/cosmos.authz.v1beta1/types/google/protobuf/duration.js +0 -84
  59. package/cosmos.authz.v1beta1/types/google/protobuf/duration.ts +0 -187
  60. package/cosmos.authz.v1beta1/types/tendermint/abci/types.js +0 -3447
  61. package/cosmos.authz.v1beta1/types/tendermint/abci/types.ts +0 -4107
  62. package/cosmos.authz.v1beta1/types/tendermint/crypto/keys.js +0 -100
  63. package/cosmos.authz.v1beta1/types/tendermint/crypto/keys.ts +0 -129
  64. package/cosmos.authz.v1beta1/types/tendermint/crypto/proof.js +0 -356
  65. package/cosmos.authz.v1beta1/types/tendermint/crypto/proof.ts +0 -439
  66. package/cosmos.authz.v1beta1/types/tendermint/types/params.js +0 -378
  67. package/cosmos.authz.v1beta1/types/tendermint/types/params.ts +0 -514
  68. package/cosmos.authz.v1beta1/types/tendermint/types/types.js +0 -1207
  69. package/cosmos.authz.v1beta1/types/tendermint/types/types.ts +0 -1452
  70. package/cosmos.authz.v1beta1/types/tendermint/types/validator.js +0 -254
  71. package/cosmos.authz.v1beta1/types/tendermint/types/validator.ts +0 -308
  72. package/cosmos.authz.v1beta1/types/tendermint/version/types.js +0 -133
  73. package/cosmos.authz.v1beta1/types/tendermint/version/types.ts +0 -184
  74. package/ibc.core.connection.v1/types/confio/proofs.js +0 -1120
  75. package/ibc.core.connection.v1/types/confio/proofs.ts +0 -1402
@@ -1,275 +0,0 @@
1
- /* eslint-disable */
2
- import Long from "long";
3
- import _m0 from "protobufjs/minimal";
4
- export const protobufPackage = "DecentralCardGame.cardchain.cardchain";
5
- function createBaseParams() {
6
- return {
7
- votingRightsExpirationTime: 0,
8
- collectionSize: 0,
9
- collectionPrice: "",
10
- activeCollectionsAmount: 0,
11
- collectionCreationFee: "",
12
- collateralDeposit: "",
13
- winnerReward: 0,
14
- hourlyFaucet: "",
15
- inflationRate: "",
16
- raresPerPack: 0,
17
- commonsPerPack: 0,
18
- unCommonsPerPack: 0,
19
- trialPeriod: 0,
20
- gameVoteRatio: 0,
21
- cardAuctionPriceReductionPeriod: 0,
22
- airDropValue: "",
23
- airDropMaxBlockHeight: 0,
24
- trialVoteReward: "",
25
- votePoolFraction: 0,
26
- votingRewardCap: 0,
27
- };
28
- }
29
- export const Params = {
30
- encode(message, writer = _m0.Writer.create()) {
31
- if (message.votingRightsExpirationTime !== 0) {
32
- writer.uint32(8).int64(message.votingRightsExpirationTime);
33
- }
34
- if (message.collectionSize !== 0) {
35
- writer.uint32(16).uint64(message.collectionSize);
36
- }
37
- if (message.collectionPrice !== "") {
38
- writer.uint32(26).string(message.collectionPrice);
39
- }
40
- if (message.activeCollectionsAmount !== 0) {
41
- writer.uint32(32).uint64(message.activeCollectionsAmount);
42
- }
43
- if (message.collectionCreationFee !== "") {
44
- writer.uint32(42).string(message.collectionCreationFee);
45
- }
46
- if (message.collateralDeposit !== "") {
47
- writer.uint32(50).string(message.collateralDeposit);
48
- }
49
- if (message.winnerReward !== 0) {
50
- writer.uint32(56).int64(message.winnerReward);
51
- }
52
- if (message.hourlyFaucet !== "") {
53
- writer.uint32(74).string(message.hourlyFaucet);
54
- }
55
- if (message.inflationRate !== "") {
56
- writer.uint32(82).string(message.inflationRate);
57
- }
58
- if (message.raresPerPack !== 0) {
59
- writer.uint32(88).uint64(message.raresPerPack);
60
- }
61
- if (message.commonsPerPack !== 0) {
62
- writer.uint32(96).uint64(message.commonsPerPack);
63
- }
64
- if (message.unCommonsPerPack !== 0) {
65
- writer.uint32(104).uint64(message.unCommonsPerPack);
66
- }
67
- if (message.trialPeriod !== 0) {
68
- writer.uint32(112).uint64(message.trialPeriod);
69
- }
70
- if (message.gameVoteRatio !== 0) {
71
- writer.uint32(120).int64(message.gameVoteRatio);
72
- }
73
- if (message.cardAuctionPriceReductionPeriod !== 0) {
74
- writer.uint32(128).int64(message.cardAuctionPriceReductionPeriod);
75
- }
76
- if (message.airDropValue !== "") {
77
- writer.uint32(138).string(message.airDropValue);
78
- }
79
- if (message.airDropMaxBlockHeight !== 0) {
80
- writer.uint32(144).int64(message.airDropMaxBlockHeight);
81
- }
82
- if (message.trialVoteReward !== "") {
83
- writer.uint32(154).string(message.trialVoteReward);
84
- }
85
- if (message.votePoolFraction !== 0) {
86
- writer.uint32(160).int64(message.votePoolFraction);
87
- }
88
- if (message.votingRewardCap !== 0) {
89
- writer.uint32(64).int64(message.votingRewardCap);
90
- }
91
- return writer;
92
- },
93
- decode(input, length) {
94
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
95
- let end = length === undefined ? reader.len : reader.pos + length;
96
- const message = createBaseParams();
97
- while (reader.pos < end) {
98
- const tag = reader.uint32();
99
- switch (tag >>> 3) {
100
- case 1:
101
- message.votingRightsExpirationTime = longToNumber(reader.int64());
102
- break;
103
- case 2:
104
- message.collectionSize = longToNumber(reader.uint64());
105
- break;
106
- case 3:
107
- message.collectionPrice = reader.string();
108
- break;
109
- case 4:
110
- message.activeCollectionsAmount = longToNumber(reader.uint64());
111
- break;
112
- case 5:
113
- message.collectionCreationFee = reader.string();
114
- break;
115
- case 6:
116
- message.collateralDeposit = reader.string();
117
- break;
118
- case 7:
119
- message.winnerReward = longToNumber(reader.int64());
120
- break;
121
- case 9:
122
- message.hourlyFaucet = reader.string();
123
- break;
124
- case 10:
125
- message.inflationRate = reader.string();
126
- break;
127
- case 11:
128
- message.raresPerPack = longToNumber(reader.uint64());
129
- break;
130
- case 12:
131
- message.commonsPerPack = longToNumber(reader.uint64());
132
- break;
133
- case 13:
134
- message.unCommonsPerPack = longToNumber(reader.uint64());
135
- break;
136
- case 14:
137
- message.trialPeriod = longToNumber(reader.uint64());
138
- break;
139
- case 15:
140
- message.gameVoteRatio = longToNumber(reader.int64());
141
- break;
142
- case 16:
143
- message.cardAuctionPriceReductionPeriod = longToNumber(reader.int64());
144
- break;
145
- case 17:
146
- message.airDropValue = reader.string();
147
- break;
148
- case 18:
149
- message.airDropMaxBlockHeight = longToNumber(reader.int64());
150
- break;
151
- case 19:
152
- message.trialVoteReward = reader.string();
153
- break;
154
- case 20:
155
- message.votePoolFraction = longToNumber(reader.int64());
156
- break;
157
- case 8:
158
- message.votingRewardCap = longToNumber(reader.int64());
159
- break;
160
- default:
161
- reader.skipType(tag & 7);
162
- break;
163
- }
164
- }
165
- return message;
166
- },
167
- fromJSON(object) {
168
- return {
169
- votingRightsExpirationTime: isSet(object.votingRightsExpirationTime)
170
- ? Number(object.votingRightsExpirationTime)
171
- : 0,
172
- collectionSize: isSet(object.collectionSize) ? Number(object.collectionSize) : 0,
173
- collectionPrice: isSet(object.collectionPrice) ? String(object.collectionPrice) : "",
174
- activeCollectionsAmount: isSet(object.activeCollectionsAmount) ? Number(object.activeCollectionsAmount) : 0,
175
- collectionCreationFee: isSet(object.collectionCreationFee) ? String(object.collectionCreationFee) : "",
176
- collateralDeposit: isSet(object.collateralDeposit) ? String(object.collateralDeposit) : "",
177
- winnerReward: isSet(object.winnerReward) ? Number(object.winnerReward) : 0,
178
- hourlyFaucet: isSet(object.hourlyFaucet) ? String(object.hourlyFaucet) : "",
179
- inflationRate: isSet(object.inflationRate) ? String(object.inflationRate) : "",
180
- raresPerPack: isSet(object.raresPerPack) ? Number(object.raresPerPack) : 0,
181
- commonsPerPack: isSet(object.commonsPerPack) ? Number(object.commonsPerPack) : 0,
182
- unCommonsPerPack: isSet(object.unCommonsPerPack) ? Number(object.unCommonsPerPack) : 0,
183
- trialPeriod: isSet(object.trialPeriod) ? Number(object.trialPeriod) : 0,
184
- gameVoteRatio: isSet(object.gameVoteRatio) ? Number(object.gameVoteRatio) : 0,
185
- cardAuctionPriceReductionPeriod: isSet(object.cardAuctionPriceReductionPeriod)
186
- ? Number(object.cardAuctionPriceReductionPeriod)
187
- : 0,
188
- airDropValue: isSet(object.airDropValue) ? String(object.airDropValue) : "",
189
- airDropMaxBlockHeight: isSet(object.airDropMaxBlockHeight) ? Number(object.airDropMaxBlockHeight) : 0,
190
- trialVoteReward: isSet(object.trialVoteReward) ? String(object.trialVoteReward) : "",
191
- votePoolFraction: isSet(object.votePoolFraction) ? Number(object.votePoolFraction) : 0,
192
- votingRewardCap: isSet(object.votingRewardCap) ? Number(object.votingRewardCap) : 0,
193
- };
194
- },
195
- toJSON(message) {
196
- const obj = {};
197
- message.votingRightsExpirationTime !== undefined
198
- && (obj.votingRightsExpirationTime = Math.round(message.votingRightsExpirationTime));
199
- message.collectionSize !== undefined && (obj.collectionSize = Math.round(message.collectionSize));
200
- message.collectionPrice !== undefined && (obj.collectionPrice = message.collectionPrice);
201
- message.activeCollectionsAmount !== undefined
202
- && (obj.activeCollectionsAmount = Math.round(message.activeCollectionsAmount));
203
- message.collectionCreationFee !== undefined && (obj.collectionCreationFee = message.collectionCreationFee);
204
- message.collateralDeposit !== undefined && (obj.collateralDeposit = message.collateralDeposit);
205
- message.winnerReward !== undefined && (obj.winnerReward = Math.round(message.winnerReward));
206
- message.hourlyFaucet !== undefined && (obj.hourlyFaucet = message.hourlyFaucet);
207
- message.inflationRate !== undefined && (obj.inflationRate = message.inflationRate);
208
- message.raresPerPack !== undefined && (obj.raresPerPack = Math.round(message.raresPerPack));
209
- message.commonsPerPack !== undefined && (obj.commonsPerPack = Math.round(message.commonsPerPack));
210
- message.unCommonsPerPack !== undefined && (obj.unCommonsPerPack = Math.round(message.unCommonsPerPack));
211
- message.trialPeriod !== undefined && (obj.trialPeriod = Math.round(message.trialPeriod));
212
- message.gameVoteRatio !== undefined && (obj.gameVoteRatio = Math.round(message.gameVoteRatio));
213
- message.cardAuctionPriceReductionPeriod !== undefined
214
- && (obj.cardAuctionPriceReductionPeriod = Math.round(message.cardAuctionPriceReductionPeriod));
215
- message.airDropValue !== undefined && (obj.airDropValue = message.airDropValue);
216
- message.airDropMaxBlockHeight !== undefined
217
- && (obj.airDropMaxBlockHeight = Math.round(message.airDropMaxBlockHeight));
218
- message.trialVoteReward !== undefined && (obj.trialVoteReward = message.trialVoteReward);
219
- message.votePoolFraction !== undefined && (obj.votePoolFraction = Math.round(message.votePoolFraction));
220
- message.votingRewardCap !== undefined && (obj.votingRewardCap = Math.round(message.votingRewardCap));
221
- return obj;
222
- },
223
- fromPartial(object) {
224
- const message = createBaseParams();
225
- message.votingRightsExpirationTime = object.votingRightsExpirationTime ?? 0;
226
- message.collectionSize = object.collectionSize ?? 0;
227
- message.collectionPrice = object.collectionPrice ?? "";
228
- message.activeCollectionsAmount = object.activeCollectionsAmount ?? 0;
229
- message.collectionCreationFee = object.collectionCreationFee ?? "";
230
- message.collateralDeposit = object.collateralDeposit ?? "";
231
- message.winnerReward = object.winnerReward ?? 0;
232
- message.hourlyFaucet = object.hourlyFaucet ?? "";
233
- message.inflationRate = object.inflationRate ?? "";
234
- message.raresPerPack = object.raresPerPack ?? 0;
235
- message.commonsPerPack = object.commonsPerPack ?? 0;
236
- message.unCommonsPerPack = object.unCommonsPerPack ?? 0;
237
- message.trialPeriod = object.trialPeriod ?? 0;
238
- message.gameVoteRatio = object.gameVoteRatio ?? 0;
239
- message.cardAuctionPriceReductionPeriod = object.cardAuctionPriceReductionPeriod ?? 0;
240
- message.airDropValue = object.airDropValue ?? "";
241
- message.airDropMaxBlockHeight = object.airDropMaxBlockHeight ?? 0;
242
- message.trialVoteReward = object.trialVoteReward ?? "";
243
- message.votePoolFraction = object.votePoolFraction ?? 0;
244
- message.votingRewardCap = object.votingRewardCap ?? 0;
245
- return message;
246
- },
247
- };
248
- var globalThis = (() => {
249
- if (typeof globalThis !== "undefined") {
250
- return globalThis;
251
- }
252
- if (typeof self !== "undefined") {
253
- return self;
254
- }
255
- if (typeof window !== "undefined") {
256
- return window;
257
- }
258
- if (typeof global !== "undefined") {
259
- return global;
260
- }
261
- throw "Unable to locate global object";
262
- })();
263
- function longToNumber(long) {
264
- if (long.gt(Number.MAX_SAFE_INTEGER)) {
265
- throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
266
- }
267
- return long.toNumber();
268
- }
269
- if (_m0.util.Long !== Long) {
270
- _m0.util.Long = Long;
271
- _m0.configure();
272
- }
273
- function isSet(value) {
274
- return value !== null && value !== undefined;
275
- }
@@ -1,324 +0,0 @@
1
- /* eslint-disable */
2
- import Long from "long";
3
- import _m0 from "protobufjs/minimal";
4
-
5
- export const protobufPackage = "DecentralCardGame.cardchain.cardchain";
6
-
7
- /** Params defines the parameters for the module. */
8
- export interface Params {
9
- votingRightsExpirationTime: number;
10
- collectionSize: number;
11
- collectionPrice: string;
12
- activeCollectionsAmount: number;
13
- collectionCreationFee: string;
14
- collateralDeposit: string;
15
- winnerReward: number;
16
- hourlyFaucet: string;
17
- inflationRate: string;
18
- raresPerPack: number;
19
- commonsPerPack: number;
20
- unCommonsPerPack: number;
21
- trialPeriod: number;
22
- gameVoteRatio: number;
23
- cardAuctionPriceReductionPeriod: number;
24
- airDropValue: string;
25
- airDropMaxBlockHeight: number;
26
- trialVoteReward: string;
27
- votePoolFraction: number;
28
- votingRewardCap: number;
29
- }
30
-
31
- function createBaseParams(): Params {
32
- return {
33
- votingRightsExpirationTime: 0,
34
- collectionSize: 0,
35
- collectionPrice: "",
36
- activeCollectionsAmount: 0,
37
- collectionCreationFee: "",
38
- collateralDeposit: "",
39
- winnerReward: 0,
40
- hourlyFaucet: "",
41
- inflationRate: "",
42
- raresPerPack: 0,
43
- commonsPerPack: 0,
44
- unCommonsPerPack: 0,
45
- trialPeriod: 0,
46
- gameVoteRatio: 0,
47
- cardAuctionPriceReductionPeriod: 0,
48
- airDropValue: "",
49
- airDropMaxBlockHeight: 0,
50
- trialVoteReward: "",
51
- votePoolFraction: 0,
52
- votingRewardCap: 0,
53
- };
54
- }
55
-
56
- export const Params = {
57
- encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
58
- if (message.votingRightsExpirationTime !== 0) {
59
- writer.uint32(8).int64(message.votingRightsExpirationTime);
60
- }
61
- if (message.collectionSize !== 0) {
62
- writer.uint32(16).uint64(message.collectionSize);
63
- }
64
- if (message.collectionPrice !== "") {
65
- writer.uint32(26).string(message.collectionPrice);
66
- }
67
- if (message.activeCollectionsAmount !== 0) {
68
- writer.uint32(32).uint64(message.activeCollectionsAmount);
69
- }
70
- if (message.collectionCreationFee !== "") {
71
- writer.uint32(42).string(message.collectionCreationFee);
72
- }
73
- if (message.collateralDeposit !== "") {
74
- writer.uint32(50).string(message.collateralDeposit);
75
- }
76
- if (message.winnerReward !== 0) {
77
- writer.uint32(56).int64(message.winnerReward);
78
- }
79
- if (message.hourlyFaucet !== "") {
80
- writer.uint32(74).string(message.hourlyFaucet);
81
- }
82
- if (message.inflationRate !== "") {
83
- writer.uint32(82).string(message.inflationRate);
84
- }
85
- if (message.raresPerPack !== 0) {
86
- writer.uint32(88).uint64(message.raresPerPack);
87
- }
88
- if (message.commonsPerPack !== 0) {
89
- writer.uint32(96).uint64(message.commonsPerPack);
90
- }
91
- if (message.unCommonsPerPack !== 0) {
92
- writer.uint32(104).uint64(message.unCommonsPerPack);
93
- }
94
- if (message.trialPeriod !== 0) {
95
- writer.uint32(112).uint64(message.trialPeriod);
96
- }
97
- if (message.gameVoteRatio !== 0) {
98
- writer.uint32(120).int64(message.gameVoteRatio);
99
- }
100
- if (message.cardAuctionPriceReductionPeriod !== 0) {
101
- writer.uint32(128).int64(message.cardAuctionPriceReductionPeriod);
102
- }
103
- if (message.airDropValue !== "") {
104
- writer.uint32(138).string(message.airDropValue);
105
- }
106
- if (message.airDropMaxBlockHeight !== 0) {
107
- writer.uint32(144).int64(message.airDropMaxBlockHeight);
108
- }
109
- if (message.trialVoteReward !== "") {
110
- writer.uint32(154).string(message.trialVoteReward);
111
- }
112
- if (message.votePoolFraction !== 0) {
113
- writer.uint32(160).int64(message.votePoolFraction);
114
- }
115
- if (message.votingRewardCap !== 0) {
116
- writer.uint32(64).int64(message.votingRewardCap);
117
- }
118
- return writer;
119
- },
120
-
121
- decode(input: _m0.Reader | Uint8Array, length?: number): Params {
122
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
123
- let end = length === undefined ? reader.len : reader.pos + length;
124
- const message = createBaseParams();
125
- while (reader.pos < end) {
126
- const tag = reader.uint32();
127
- switch (tag >>> 3) {
128
- case 1:
129
- message.votingRightsExpirationTime = longToNumber(reader.int64() as Long);
130
- break;
131
- case 2:
132
- message.collectionSize = longToNumber(reader.uint64() as Long);
133
- break;
134
- case 3:
135
- message.collectionPrice = reader.string();
136
- break;
137
- case 4:
138
- message.activeCollectionsAmount = longToNumber(reader.uint64() as Long);
139
- break;
140
- case 5:
141
- message.collectionCreationFee = reader.string();
142
- break;
143
- case 6:
144
- message.collateralDeposit = reader.string();
145
- break;
146
- case 7:
147
- message.winnerReward = longToNumber(reader.int64() as Long);
148
- break;
149
- case 9:
150
- message.hourlyFaucet = reader.string();
151
- break;
152
- case 10:
153
- message.inflationRate = reader.string();
154
- break;
155
- case 11:
156
- message.raresPerPack = longToNumber(reader.uint64() as Long);
157
- break;
158
- case 12:
159
- message.commonsPerPack = longToNumber(reader.uint64() as Long);
160
- break;
161
- case 13:
162
- message.unCommonsPerPack = longToNumber(reader.uint64() as Long);
163
- break;
164
- case 14:
165
- message.trialPeriod = longToNumber(reader.uint64() as Long);
166
- break;
167
- case 15:
168
- message.gameVoteRatio = longToNumber(reader.int64() as Long);
169
- break;
170
- case 16:
171
- message.cardAuctionPriceReductionPeriod = longToNumber(reader.int64() as Long);
172
- break;
173
- case 17:
174
- message.airDropValue = reader.string();
175
- break;
176
- case 18:
177
- message.airDropMaxBlockHeight = longToNumber(reader.int64() as Long);
178
- break;
179
- case 19:
180
- message.trialVoteReward = reader.string();
181
- break;
182
- case 20:
183
- message.votePoolFraction = longToNumber(reader.int64() as Long);
184
- break;
185
- case 8:
186
- message.votingRewardCap = longToNumber(reader.int64() as Long);
187
- break;
188
- default:
189
- reader.skipType(tag & 7);
190
- break;
191
- }
192
- }
193
- return message;
194
- },
195
-
196
- fromJSON(object: any): Params {
197
- return {
198
- votingRightsExpirationTime: isSet(object.votingRightsExpirationTime)
199
- ? Number(object.votingRightsExpirationTime)
200
- : 0,
201
- collectionSize: isSet(object.collectionSize) ? Number(object.collectionSize) : 0,
202
- collectionPrice: isSet(object.collectionPrice) ? String(object.collectionPrice) : "",
203
- activeCollectionsAmount: isSet(object.activeCollectionsAmount) ? Number(object.activeCollectionsAmount) : 0,
204
- collectionCreationFee: isSet(object.collectionCreationFee) ? String(object.collectionCreationFee) : "",
205
- collateralDeposit: isSet(object.collateralDeposit) ? String(object.collateralDeposit) : "",
206
- winnerReward: isSet(object.winnerReward) ? Number(object.winnerReward) : 0,
207
- hourlyFaucet: isSet(object.hourlyFaucet) ? String(object.hourlyFaucet) : "",
208
- inflationRate: isSet(object.inflationRate) ? String(object.inflationRate) : "",
209
- raresPerPack: isSet(object.raresPerPack) ? Number(object.raresPerPack) : 0,
210
- commonsPerPack: isSet(object.commonsPerPack) ? Number(object.commonsPerPack) : 0,
211
- unCommonsPerPack: isSet(object.unCommonsPerPack) ? Number(object.unCommonsPerPack) : 0,
212
- trialPeriod: isSet(object.trialPeriod) ? Number(object.trialPeriod) : 0,
213
- gameVoteRatio: isSet(object.gameVoteRatio) ? Number(object.gameVoteRatio) : 0,
214
- cardAuctionPriceReductionPeriod: isSet(object.cardAuctionPriceReductionPeriod)
215
- ? Number(object.cardAuctionPriceReductionPeriod)
216
- : 0,
217
- airDropValue: isSet(object.airDropValue) ? String(object.airDropValue) : "",
218
- airDropMaxBlockHeight: isSet(object.airDropMaxBlockHeight) ? Number(object.airDropMaxBlockHeight) : 0,
219
- trialVoteReward: isSet(object.trialVoteReward) ? String(object.trialVoteReward) : "",
220
- votePoolFraction: isSet(object.votePoolFraction) ? Number(object.votePoolFraction) : 0,
221
- votingRewardCap: isSet(object.votingRewardCap) ? Number(object.votingRewardCap) : 0,
222
- };
223
- },
224
-
225
- toJSON(message: Params): unknown {
226
- const obj: any = {};
227
- message.votingRightsExpirationTime !== undefined
228
- && (obj.votingRightsExpirationTime = Math.round(message.votingRightsExpirationTime));
229
- message.collectionSize !== undefined && (obj.collectionSize = Math.round(message.collectionSize));
230
- message.collectionPrice !== undefined && (obj.collectionPrice = message.collectionPrice);
231
- message.activeCollectionsAmount !== undefined
232
- && (obj.activeCollectionsAmount = Math.round(message.activeCollectionsAmount));
233
- message.collectionCreationFee !== undefined && (obj.collectionCreationFee = message.collectionCreationFee);
234
- message.collateralDeposit !== undefined && (obj.collateralDeposit = message.collateralDeposit);
235
- message.winnerReward !== undefined && (obj.winnerReward = Math.round(message.winnerReward));
236
- message.hourlyFaucet !== undefined && (obj.hourlyFaucet = message.hourlyFaucet);
237
- message.inflationRate !== undefined && (obj.inflationRate = message.inflationRate);
238
- message.raresPerPack !== undefined && (obj.raresPerPack = Math.round(message.raresPerPack));
239
- message.commonsPerPack !== undefined && (obj.commonsPerPack = Math.round(message.commonsPerPack));
240
- message.unCommonsPerPack !== undefined && (obj.unCommonsPerPack = Math.round(message.unCommonsPerPack));
241
- message.trialPeriod !== undefined && (obj.trialPeriod = Math.round(message.trialPeriod));
242
- message.gameVoteRatio !== undefined && (obj.gameVoteRatio = Math.round(message.gameVoteRatio));
243
- message.cardAuctionPriceReductionPeriod !== undefined
244
- && (obj.cardAuctionPriceReductionPeriod = Math.round(message.cardAuctionPriceReductionPeriod));
245
- message.airDropValue !== undefined && (obj.airDropValue = message.airDropValue);
246
- message.airDropMaxBlockHeight !== undefined
247
- && (obj.airDropMaxBlockHeight = Math.round(message.airDropMaxBlockHeight));
248
- message.trialVoteReward !== undefined && (obj.trialVoteReward = message.trialVoteReward);
249
- message.votePoolFraction !== undefined && (obj.votePoolFraction = Math.round(message.votePoolFraction));
250
- message.votingRewardCap !== undefined && (obj.votingRewardCap = Math.round(message.votingRewardCap));
251
- return obj;
252
- },
253
-
254
- fromPartial<I extends Exact<DeepPartial<Params>, I>>(object: I): Params {
255
- const message = createBaseParams();
256
- message.votingRightsExpirationTime = object.votingRightsExpirationTime ?? 0;
257
- message.collectionSize = object.collectionSize ?? 0;
258
- message.collectionPrice = object.collectionPrice ?? "";
259
- message.activeCollectionsAmount = object.activeCollectionsAmount ?? 0;
260
- message.collectionCreationFee = object.collectionCreationFee ?? "";
261
- message.collateralDeposit = object.collateralDeposit ?? "";
262
- message.winnerReward = object.winnerReward ?? 0;
263
- message.hourlyFaucet = object.hourlyFaucet ?? "";
264
- message.inflationRate = object.inflationRate ?? "";
265
- message.raresPerPack = object.raresPerPack ?? 0;
266
- message.commonsPerPack = object.commonsPerPack ?? 0;
267
- message.unCommonsPerPack = object.unCommonsPerPack ?? 0;
268
- message.trialPeriod = object.trialPeriod ?? 0;
269
- message.gameVoteRatio = object.gameVoteRatio ?? 0;
270
- message.cardAuctionPriceReductionPeriod = object.cardAuctionPriceReductionPeriod ?? 0;
271
- message.airDropValue = object.airDropValue ?? "";
272
- message.airDropMaxBlockHeight = object.airDropMaxBlockHeight ?? 0;
273
- message.trialVoteReward = object.trialVoteReward ?? "";
274
- message.votePoolFraction = object.votePoolFraction ?? 0;
275
- message.votingRewardCap = object.votingRewardCap ?? 0;
276
- return message;
277
- },
278
- };
279
-
280
- declare var self: any | undefined;
281
- declare var window: any | undefined;
282
- declare var global: any | undefined;
283
- var globalThis: any = (() => {
284
- if (typeof globalThis !== "undefined") {
285
- return globalThis;
286
- }
287
- if (typeof self !== "undefined") {
288
- return self;
289
- }
290
- if (typeof window !== "undefined") {
291
- return window;
292
- }
293
- if (typeof global !== "undefined") {
294
- return global;
295
- }
296
- throw "Unable to locate global object";
297
- })();
298
-
299
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
300
-
301
- export type DeepPartial<T> = T extends Builtin ? T
302
- : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
303
- : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
304
- : Partial<T>;
305
-
306
- type KeysOfUnion<T> = T extends T ? keyof T : never;
307
- export type Exact<P, I extends P> = P extends Builtin ? P
308
- : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
309
-
310
- function longToNumber(long: Long): number {
311
- if (long.gt(Number.MAX_SAFE_INTEGER)) {
312
- throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
313
- }
314
- return long.toNumber();
315
- }
316
-
317
- if (_m0.util.Long !== Long) {
318
- _m0.util.Long = Long as any;
319
- _m0.configure();
320
- }
321
-
322
- function isSet(value: any): boolean {
323
- return value !== null && value !== undefined;
324
- }