decentralcardgame-cardchain-client-ts 0.0.16 → 0.0.18

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 (23) hide show
  1. package/DecentralCardGame.cardchain.cardchain/module.js +304 -310
  2. package/DecentralCardGame.cardchain.cardchain/module.ts +460 -466
  3. package/DecentralCardGame.cardchain.cardchain/registry.js +60 -60
  4. package/DecentralCardGame.cardchain.cardchain/registry.ts +60 -60
  5. package/DecentralCardGame.cardchain.cardchain/rest.js +7 -31
  6. package/DecentralCardGame.cardchain.cardchain/rest.ts +9 -84
  7. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/card.js +0 -6
  8. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/card.ts +0 -6
  9. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/council.js +11 -17
  10. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/council.ts +11 -17
  11. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/params.js +0 -11
  12. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/params.ts +0 -13
  13. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/query.js +2 -331
  14. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/query.ts +2 -390
  15. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/tx.js +8 -8
  16. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/tx.ts +9 -9
  17. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/user.js +57 -81
  18. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/user.ts +56 -93
  19. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/voting.js +50 -59
  20. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/voting.ts +53 -71
  21. package/DecentralCardGame.cardchain.cardchain/types.js +1 -4
  22. package/DecentralCardGame.cardchain.cardchain/types.ts +0 -6
  23. package/package.json +1 -1
@@ -41,36 +41,32 @@ export function responseToJSON(object) {
41
41
  }
42
42
  export var CouncelingStatus;
43
43
  (function (CouncelingStatus) {
44
- CouncelingStatus[CouncelingStatus["councilDoesNotExist"] = 0] = "councilDoesNotExist";
45
- CouncelingStatus[CouncelingStatus["councilOpen"] = 1] = "councilOpen";
46
- CouncelingStatus[CouncelingStatus["councilCreated"] = 2] = "councilCreated";
47
- CouncelingStatus[CouncelingStatus["councilClosed"] = 3] = "councilClosed";
48
- CouncelingStatus[CouncelingStatus["commited"] = 4] = "commited";
49
- CouncelingStatus[CouncelingStatus["revealed"] = 5] = "revealed";
50
- CouncelingStatus[CouncelingStatus["suggestionsMade"] = 6] = "suggestionsMade";
44
+ CouncelingStatus[CouncelingStatus["councilOpen"] = 0] = "councilOpen";
45
+ CouncelingStatus[CouncelingStatus["councilCreated"] = 1] = "councilCreated";
46
+ CouncelingStatus[CouncelingStatus["councilClosed"] = 2] = "councilClosed";
47
+ CouncelingStatus[CouncelingStatus["commited"] = 3] = "commited";
48
+ CouncelingStatus[CouncelingStatus["revealed"] = 4] = "revealed";
49
+ CouncelingStatus[CouncelingStatus["suggestionsMade"] = 5] = "suggestionsMade";
51
50
  CouncelingStatus[CouncelingStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
52
51
  })(CouncelingStatus || (CouncelingStatus = {}));
53
52
  export function councelingStatusFromJSON(object) {
54
53
  switch (object) {
55
54
  case 0:
56
- case "councilDoesNotExist":
57
- return CouncelingStatus.councilDoesNotExist;
58
- case 1:
59
55
  case "councilOpen":
60
56
  return CouncelingStatus.councilOpen;
61
- case 2:
57
+ case 1:
62
58
  case "councilCreated":
63
59
  return CouncelingStatus.councilCreated;
64
- case 3:
60
+ case 2:
65
61
  case "councilClosed":
66
62
  return CouncelingStatus.councilClosed;
67
- case 4:
63
+ case 3:
68
64
  case "commited":
69
65
  return CouncelingStatus.commited;
70
- case 5:
66
+ case 4:
71
67
  case "revealed":
72
68
  return CouncelingStatus.revealed;
73
- case 6:
69
+ case 5:
74
70
  case "suggestionsMade":
75
71
  return CouncelingStatus.suggestionsMade;
76
72
  case -1:
@@ -81,8 +77,6 @@ export function councelingStatusFromJSON(object) {
81
77
  }
82
78
  export function councelingStatusToJSON(object) {
83
79
  switch (object) {
84
- case CouncelingStatus.councilDoesNotExist:
85
- return "councilDoesNotExist";
86
80
  case CouncelingStatus.councilOpen:
87
81
  return "councilOpen";
88
82
  case CouncelingStatus.councilCreated:
@@ -44,37 +44,33 @@ export function responseToJSON(object: Response): string {
44
44
  }
45
45
 
46
46
  export enum CouncelingStatus {
47
- councilDoesNotExist = 0,
48
- councilOpen = 1,
49
- councilCreated = 2,
50
- councilClosed = 3,
51
- commited = 4,
52
- revealed = 5,
53
- suggestionsMade = 6,
47
+ councilOpen = 0,
48
+ councilCreated = 1,
49
+ councilClosed = 2,
50
+ commited = 3,
51
+ revealed = 4,
52
+ suggestionsMade = 5,
54
53
  UNRECOGNIZED = -1,
55
54
  }
56
55
 
57
56
  export function councelingStatusFromJSON(object: any): CouncelingStatus {
58
57
  switch (object) {
59
58
  case 0:
60
- case "councilDoesNotExist":
61
- return CouncelingStatus.councilDoesNotExist;
62
- case 1:
63
59
  case "councilOpen":
64
60
  return CouncelingStatus.councilOpen;
65
- case 2:
61
+ case 1:
66
62
  case "councilCreated":
67
63
  return CouncelingStatus.councilCreated;
68
- case 3:
64
+ case 2:
69
65
  case "councilClosed":
70
66
  return CouncelingStatus.councilClosed;
71
- case 4:
67
+ case 3:
72
68
  case "commited":
73
69
  return CouncelingStatus.commited;
74
- case 5:
70
+ case 4:
75
71
  case "revealed":
76
72
  return CouncelingStatus.revealed;
77
- case 6:
73
+ case 5:
78
74
  case "suggestionsMade":
79
75
  return CouncelingStatus.suggestionsMade;
80
76
  case -1:
@@ -86,8 +82,6 @@ export function councelingStatusFromJSON(object: any): CouncelingStatus {
86
82
 
87
83
  export function councelingStatusToJSON(object: CouncelingStatus): string {
88
84
  switch (object) {
89
- case CouncelingStatus.councilDoesNotExist:
90
- return "councilDoesNotExist";
91
85
  case CouncelingStatus.councilOpen:
92
86
  return "councilOpen";
93
87
  case CouncelingStatus.councilCreated:
@@ -28,7 +28,6 @@ function createBaseParams() {
28
28
  rareDropRatio: 0,
29
29
  exceptionalDropRatio: 0,
30
30
  uniqueDropRatio: 0,
31
- councilVotingTimeLimit: 0,
32
31
  };
33
32
  }
34
33
  export const Params = {
@@ -105,9 +104,6 @@ export const Params = {
105
104
  if (message.uniqueDropRatio !== 0) {
106
105
  writer.uint32(192).uint64(message.uniqueDropRatio);
107
106
  }
108
- if (message.councilVotingTimeLimit !== 0) {
109
- writer.uint32(200).uint64(message.councilVotingTimeLimit);
110
- }
111
107
  return writer;
112
108
  },
113
109
  decode(input, length) {
@@ -189,9 +185,6 @@ export const Params = {
189
185
  case 24:
190
186
  message.uniqueDropRatio = longToNumber(reader.uint64());
191
187
  break;
192
- case 25:
193
- message.councilVotingTimeLimit = longToNumber(reader.uint64());
194
- break;
195
188
  default:
196
189
  reader.skipType(tag & 7);
197
190
  break;
@@ -229,7 +222,6 @@ export const Params = {
229
222
  rareDropRatio: isSet(object.rareDropRatio) ? Number(object.rareDropRatio) : 0,
230
223
  exceptionalDropRatio: isSet(object.exceptionalDropRatio) ? Number(object.exceptionalDropRatio) : 0,
231
224
  uniqueDropRatio: isSet(object.uniqueDropRatio) ? Number(object.uniqueDropRatio) : 0,
232
- councilVotingTimeLimit: isSet(object.councilVotingTimeLimit) ? Number(object.councilVotingTimeLimit) : 0,
233
225
  };
234
226
  },
235
227
  toJSON(message) {
@@ -261,8 +253,6 @@ export const Params = {
261
253
  message.rareDropRatio !== undefined && (obj.rareDropRatio = Math.round(message.rareDropRatio));
262
254
  message.exceptionalDropRatio !== undefined && (obj.exceptionalDropRatio = Math.round(message.exceptionalDropRatio));
263
255
  message.uniqueDropRatio !== undefined && (obj.uniqueDropRatio = Math.round(message.uniqueDropRatio));
264
- message.councilVotingTimeLimit !== undefined
265
- && (obj.councilVotingTimeLimit = Math.round(message.councilVotingTimeLimit));
266
256
  return obj;
267
257
  },
268
258
  fromPartial(object) {
@@ -291,7 +281,6 @@ export const Params = {
291
281
  message.rareDropRatio = object.rareDropRatio ?? 0;
292
282
  message.exceptionalDropRatio = object.exceptionalDropRatio ?? 0;
293
283
  message.uniqueDropRatio = object.uniqueDropRatio ?? 0;
294
- message.councilVotingTimeLimit = object.councilVotingTimeLimit ?? 0;
295
284
  return message;
296
285
  },
297
286
  };
@@ -30,8 +30,6 @@ export interface Params {
30
30
  rareDropRatio: number;
31
31
  exceptionalDropRatio: number;
32
32
  uniqueDropRatio: number;
33
- /** seconds till the council ends */
34
- councilVotingTimeLimit: number;
35
33
  }
36
34
 
37
35
  function createBaseParams(): Params {
@@ -60,7 +58,6 @@ function createBaseParams(): Params {
60
58
  rareDropRatio: 0,
61
59
  exceptionalDropRatio: 0,
62
60
  uniqueDropRatio: 0,
63
- councilVotingTimeLimit: 0,
64
61
  };
65
62
  }
66
63
 
@@ -138,9 +135,6 @@ export const Params = {
138
135
  if (message.uniqueDropRatio !== 0) {
139
136
  writer.uint32(192).uint64(message.uniqueDropRatio);
140
137
  }
141
- if (message.councilVotingTimeLimit !== 0) {
142
- writer.uint32(200).uint64(message.councilVotingTimeLimit);
143
- }
144
138
  return writer;
145
139
  },
146
140
 
@@ -223,9 +217,6 @@ export const Params = {
223
217
  case 24:
224
218
  message.uniqueDropRatio = longToNumber(reader.uint64() as Long);
225
219
  break;
226
- case 25:
227
- message.councilVotingTimeLimit = longToNumber(reader.uint64() as Long);
228
- break;
229
220
  default:
230
221
  reader.skipType(tag & 7);
231
222
  break;
@@ -264,7 +255,6 @@ export const Params = {
264
255
  rareDropRatio: isSet(object.rareDropRatio) ? Number(object.rareDropRatio) : 0,
265
256
  exceptionalDropRatio: isSet(object.exceptionalDropRatio) ? Number(object.exceptionalDropRatio) : 0,
266
257
  uniqueDropRatio: isSet(object.uniqueDropRatio) ? Number(object.uniqueDropRatio) : 0,
267
- councilVotingTimeLimit: isSet(object.councilVotingTimeLimit) ? Number(object.councilVotingTimeLimit) : 0,
268
258
  };
269
259
  },
270
260
 
@@ -297,8 +287,6 @@ export const Params = {
297
287
  message.rareDropRatio !== undefined && (obj.rareDropRatio = Math.round(message.rareDropRatio));
298
288
  message.exceptionalDropRatio !== undefined && (obj.exceptionalDropRatio = Math.round(message.exceptionalDropRatio));
299
289
  message.uniqueDropRatio !== undefined && (obj.uniqueDropRatio = Math.round(message.uniqueDropRatio));
300
- message.councilVotingTimeLimit !== undefined
301
- && (obj.councilVotingTimeLimit = Math.round(message.councilVotingTimeLimit));
302
290
  return obj;
303
291
  },
304
292
 
@@ -328,7 +316,6 @@ export const Params = {
328
316
  message.rareDropRatio = object.rareDropRatio ?? 0;
329
317
  message.exceptionalDropRatio = object.exceptionalDropRatio ?? 0;
330
318
  message.uniqueDropRatio = object.uniqueDropRatio ?? 0;
331
- message.councilVotingTimeLimit = object.councilVotingTimeLimit ?? 0;
332
319
  return message;
333
320
  },
334
321
  };
@@ -2,14 +2,14 @@
2
2
  import Long from "long";
3
3
  import _m0 from "protobufjs/minimal";
4
4
  import { OutpCard } from "./card";
5
- import { councelingStatusFromJSON, councelingStatusToJSON, Council } from "./council";
5
+ import { Council } from "./council";
6
6
  import { Match, outcomeFromJSON, outcomeToJSON } from "./match";
7
7
  import { Params } from "./params";
8
8
  import { SellOffer, sellOfferStatusFromJSON, sellOfferStatusToJSON } from "./sell_offer";
9
9
  import { Server } from "./server";
10
10
  import { cStatusFromJSON, cStatusToJSON, OutpSet } from "./set";
11
11
  import { User } from "./user";
12
- import { VoteRight, VotingResults } from "./voting";
12
+ import { VotingResults } from "./voting";
13
13
  export const protobufPackage = "DecentralCardGame.cardchain.cardchain";
14
14
  export var QueryQCardsRequest_Status;
15
15
  (function (QueryQCardsRequest_Status) {
@@ -580,113 +580,6 @@ export const QueryQVotingResultsResponse = {
580
580
  return message;
581
581
  },
582
582
  };
583
- function createBaseQueryQVotableCardsRequest() {
584
- return { address: "" };
585
- }
586
- export const QueryQVotableCardsRequest = {
587
- encode(message, writer = _m0.Writer.create()) {
588
- if (message.address !== "") {
589
- writer.uint32(10).string(message.address);
590
- }
591
- return writer;
592
- },
593
- decode(input, length) {
594
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
595
- let end = length === undefined ? reader.len : reader.pos + length;
596
- const message = createBaseQueryQVotableCardsRequest();
597
- while (reader.pos < end) {
598
- const tag = reader.uint32();
599
- switch (tag >>> 3) {
600
- case 1:
601
- message.address = reader.string();
602
- break;
603
- default:
604
- reader.skipType(tag & 7);
605
- break;
606
- }
607
- }
608
- return message;
609
- },
610
- fromJSON(object) {
611
- return { address: isSet(object.address) ? String(object.address) : "" };
612
- },
613
- toJSON(message) {
614
- const obj = {};
615
- message.address !== undefined && (obj.address = message.address);
616
- return obj;
617
- },
618
- fromPartial(object) {
619
- const message = createBaseQueryQVotableCardsRequest();
620
- message.address = object.address ?? "";
621
- return message;
622
- },
623
- };
624
- function createBaseQueryQVotableCardsResponse() {
625
- return { unregistered: false, noVoteRights: false, voteRights: [] };
626
- }
627
- export const QueryQVotableCardsResponse = {
628
- encode(message, writer = _m0.Writer.create()) {
629
- if (message.unregistered === true) {
630
- writer.uint32(8).bool(message.unregistered);
631
- }
632
- if (message.noVoteRights === true) {
633
- writer.uint32(16).bool(message.noVoteRights);
634
- }
635
- for (const v of message.voteRights) {
636
- VoteRight.encode(v, writer.uint32(26).fork()).ldelim();
637
- }
638
- return writer;
639
- },
640
- decode(input, length) {
641
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
642
- let end = length === undefined ? reader.len : reader.pos + length;
643
- const message = createBaseQueryQVotableCardsResponse();
644
- while (reader.pos < end) {
645
- const tag = reader.uint32();
646
- switch (tag >>> 3) {
647
- case 1:
648
- message.unregistered = reader.bool();
649
- break;
650
- case 2:
651
- message.noVoteRights = reader.bool();
652
- break;
653
- case 3:
654
- message.voteRights.push(VoteRight.decode(reader, reader.uint32()));
655
- break;
656
- default:
657
- reader.skipType(tag & 7);
658
- break;
659
- }
660
- }
661
- return message;
662
- },
663
- fromJSON(object) {
664
- return {
665
- unregistered: isSet(object.unregistered) ? Boolean(object.unregistered) : false,
666
- noVoteRights: isSet(object.noVoteRights) ? Boolean(object.noVoteRights) : false,
667
- voteRights: Array.isArray(object?.voteRights) ? object.voteRights.map((e) => VoteRight.fromJSON(e)) : [],
668
- };
669
- },
670
- toJSON(message) {
671
- const obj = {};
672
- message.unregistered !== undefined && (obj.unregistered = message.unregistered);
673
- message.noVoteRights !== undefined && (obj.noVoteRights = message.noVoteRights);
674
- if (message.voteRights) {
675
- obj.voteRights = message.voteRights.map((e) => e ? VoteRight.toJSON(e) : undefined);
676
- }
677
- else {
678
- obj.voteRights = [];
679
- }
680
- return obj;
681
- },
682
- fromPartial(object) {
683
- const message = createBaseQueryQVotableCardsResponse();
684
- message.unregistered = object.unregistered ?? false;
685
- message.noVoteRights = object.noVoteRights ?? false;
686
- message.voteRights = object.voteRights?.map((e) => VoteRight.fromPartial(e)) || [];
687
- return message;
688
- },
689
- };
690
583
  function createBaseQueryQCardsRequest() {
691
584
  return {
692
585
  owner: "",
@@ -1847,216 +1740,6 @@ export const QueryRarityDistributionResponse = {
1847
1740
  return message;
1848
1741
  },
1849
1742
  };
1850
- function createBaseQueryQCouncilsRequest() {
1851
- return { status: 0, voters: [], card: 0, creator: "", ignore: undefined };
1852
- }
1853
- export const QueryQCouncilsRequest = {
1854
- encode(message, writer = _m0.Writer.create()) {
1855
- if (message.status !== 0) {
1856
- writer.uint32(8).int32(message.status);
1857
- }
1858
- for (const v of message.voters) {
1859
- writer.uint32(26).string(v);
1860
- }
1861
- if (message.card !== 0) {
1862
- writer.uint32(32).uint64(message.card);
1863
- }
1864
- if (message.creator !== "") {
1865
- writer.uint32(42).string(message.creator);
1866
- }
1867
- if (message.ignore !== undefined) {
1868
- IgnoreCouncils.encode(message.ignore, writer.uint32(18).fork()).ldelim();
1869
- }
1870
- return writer;
1871
- },
1872
- decode(input, length) {
1873
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1874
- let end = length === undefined ? reader.len : reader.pos + length;
1875
- const message = createBaseQueryQCouncilsRequest();
1876
- while (reader.pos < end) {
1877
- const tag = reader.uint32();
1878
- switch (tag >>> 3) {
1879
- case 1:
1880
- message.status = reader.int32();
1881
- break;
1882
- case 3:
1883
- message.voters.push(reader.string());
1884
- break;
1885
- case 4:
1886
- message.card = longToNumber(reader.uint64());
1887
- break;
1888
- case 5:
1889
- message.creator = reader.string();
1890
- break;
1891
- case 2:
1892
- message.ignore = IgnoreCouncils.decode(reader, reader.uint32());
1893
- break;
1894
- default:
1895
- reader.skipType(tag & 7);
1896
- break;
1897
- }
1898
- }
1899
- return message;
1900
- },
1901
- fromJSON(object) {
1902
- return {
1903
- status: isSet(object.status) ? councelingStatusFromJSON(object.status) : 0,
1904
- voters: Array.isArray(object?.voters) ? object.voters.map((e) => String(e)) : [],
1905
- card: isSet(object.card) ? Number(object.card) : 0,
1906
- creator: isSet(object.creator) ? String(object.creator) : "",
1907
- ignore: isSet(object.ignore) ? IgnoreCouncils.fromJSON(object.ignore) : undefined,
1908
- };
1909
- },
1910
- toJSON(message) {
1911
- const obj = {};
1912
- message.status !== undefined && (obj.status = councelingStatusToJSON(message.status));
1913
- if (message.voters) {
1914
- obj.voters = message.voters.map((e) => e);
1915
- }
1916
- else {
1917
- obj.voters = [];
1918
- }
1919
- message.card !== undefined && (obj.card = Math.round(message.card));
1920
- message.creator !== undefined && (obj.creator = message.creator);
1921
- message.ignore !== undefined && (obj.ignore = message.ignore ? IgnoreCouncils.toJSON(message.ignore) : undefined);
1922
- return obj;
1923
- },
1924
- fromPartial(object) {
1925
- const message = createBaseQueryQCouncilsRequest();
1926
- message.status = object.status ?? 0;
1927
- message.voters = object.voters?.map((e) => e) || [];
1928
- message.card = object.card ?? 0;
1929
- message.creator = object.creator ?? "";
1930
- message.ignore = (object.ignore !== undefined && object.ignore !== null)
1931
- ? IgnoreCouncils.fromPartial(object.ignore)
1932
- : undefined;
1933
- return message;
1934
- },
1935
- };
1936
- function createBaseIgnoreCouncils() {
1937
- return { status: false, card: false };
1938
- }
1939
- export const IgnoreCouncils = {
1940
- encode(message, writer = _m0.Writer.create()) {
1941
- if (message.status === true) {
1942
- writer.uint32(8).bool(message.status);
1943
- }
1944
- if (message.card === true) {
1945
- writer.uint32(16).bool(message.card);
1946
- }
1947
- return writer;
1948
- },
1949
- decode(input, length) {
1950
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1951
- let end = length === undefined ? reader.len : reader.pos + length;
1952
- const message = createBaseIgnoreCouncils();
1953
- while (reader.pos < end) {
1954
- const tag = reader.uint32();
1955
- switch (tag >>> 3) {
1956
- case 1:
1957
- message.status = reader.bool();
1958
- break;
1959
- case 2:
1960
- message.card = reader.bool();
1961
- break;
1962
- default:
1963
- reader.skipType(tag & 7);
1964
- break;
1965
- }
1966
- }
1967
- return message;
1968
- },
1969
- fromJSON(object) {
1970
- return {
1971
- status: isSet(object.status) ? Boolean(object.status) : false,
1972
- card: isSet(object.card) ? Boolean(object.card) : false,
1973
- };
1974
- },
1975
- toJSON(message) {
1976
- const obj = {};
1977
- message.status !== undefined && (obj.status = message.status);
1978
- message.card !== undefined && (obj.card = message.card);
1979
- return obj;
1980
- },
1981
- fromPartial(object) {
1982
- const message = createBaseIgnoreCouncils();
1983
- message.status = object.status ?? false;
1984
- message.card = object.card ?? false;
1985
- return message;
1986
- },
1987
- };
1988
- function createBaseQueryQCouncilsResponse() {
1989
- return { councilssIds: [], councils: [] };
1990
- }
1991
- export const QueryQCouncilsResponse = {
1992
- encode(message, writer = _m0.Writer.create()) {
1993
- writer.uint32(10).fork();
1994
- for (const v of message.councilssIds) {
1995
- writer.uint64(v);
1996
- }
1997
- writer.ldelim();
1998
- for (const v of message.councils) {
1999
- Council.encode(v, writer.uint32(18).fork()).ldelim();
2000
- }
2001
- return writer;
2002
- },
2003
- decode(input, length) {
2004
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
2005
- let end = length === undefined ? reader.len : reader.pos + length;
2006
- const message = createBaseQueryQCouncilsResponse();
2007
- while (reader.pos < end) {
2008
- const tag = reader.uint32();
2009
- switch (tag >>> 3) {
2010
- case 1:
2011
- if ((tag & 7) === 2) {
2012
- const end2 = reader.uint32() + reader.pos;
2013
- while (reader.pos < end2) {
2014
- message.councilssIds.push(longToNumber(reader.uint64()));
2015
- }
2016
- }
2017
- else {
2018
- message.councilssIds.push(longToNumber(reader.uint64()));
2019
- }
2020
- break;
2021
- case 2:
2022
- message.councils.push(Council.decode(reader, reader.uint32()));
2023
- break;
2024
- default:
2025
- reader.skipType(tag & 7);
2026
- break;
2027
- }
2028
- }
2029
- return message;
2030
- },
2031
- fromJSON(object) {
2032
- return {
2033
- councilssIds: Array.isArray(object?.councilssIds) ? object.councilssIds.map((e) => Number(e)) : [],
2034
- councils: Array.isArray(object?.councils) ? object.councils.map((e) => Council.fromJSON(e)) : [],
2035
- };
2036
- },
2037
- toJSON(message) {
2038
- const obj = {};
2039
- if (message.councilssIds) {
2040
- obj.councilssIds = message.councilssIds.map((e) => Math.round(e));
2041
- }
2042
- else {
2043
- obj.councilssIds = [];
2044
- }
2045
- if (message.councils) {
2046
- obj.councils = message.councils.map((e) => e ? Council.toJSON(e) : undefined);
2047
- }
2048
- else {
2049
- obj.councils = [];
2050
- }
2051
- return obj;
2052
- },
2053
- fromPartial(object) {
2054
- const message = createBaseQueryQCouncilsResponse();
2055
- message.councilssIds = object.councilssIds?.map((e) => e) || [];
2056
- message.councils = object.councils?.map((e) => Council.fromPartial(e)) || [];
2057
- return message;
2058
- },
2059
- };
2060
1743
  export class QueryClientImpl {
2061
1744
  constructor(rpc) {
2062
1745
  this.rpc = rpc;
@@ -2066,7 +1749,6 @@ export class QueryClientImpl {
2066
1749
  this.QUser = this.QUser.bind(this);
2067
1750
  this.QCardchainInfo = this.QCardchainInfo.bind(this);
2068
1751
  this.QVotingResults = this.QVotingResults.bind(this);
2069
- this.QVotableCards = this.QVotableCards.bind(this);
2070
1752
  this.QCards = this.QCards.bind(this);
2071
1753
  this.QMatch = this.QMatch.bind(this);
2072
1754
  this.QSet = this.QSet.bind(this);
@@ -2077,7 +1759,6 @@ export class QueryClientImpl {
2077
1759
  this.QServer = this.QServer.bind(this);
2078
1760
  this.QSets = this.QSets.bind(this);
2079
1761
  this.RarityDistribution = this.RarityDistribution.bind(this);
2080
- this.QCouncils = this.QCouncils.bind(this);
2081
1762
  }
2082
1763
  Params(request) {
2083
1764
  const data = QueryParamsRequest.encode(request).finish();
@@ -2109,11 +1790,6 @@ export class QueryClientImpl {
2109
1790
  const promise = this.rpc.request("DecentralCardGame.cardchain.cardchain.Query", "QVotingResults", data);
2110
1791
  return promise.then((data) => QueryQVotingResultsResponse.decode(new _m0.Reader(data)));
2111
1792
  }
2112
- QVotableCards(request) {
2113
- const data = QueryQVotableCardsRequest.encode(request).finish();
2114
- const promise = this.rpc.request("DecentralCardGame.cardchain.cardchain.Query", "QVotableCards", data);
2115
- return promise.then((data) => QueryQVotableCardsResponse.decode(new _m0.Reader(data)));
2116
- }
2117
1793
  QCards(request) {
2118
1794
  const data = QueryQCardsRequest.encode(request).finish();
2119
1795
  const promise = this.rpc.request("DecentralCardGame.cardchain.cardchain.Query", "QCards", data);
@@ -2164,11 +1840,6 @@ export class QueryClientImpl {
2164
1840
  const promise = this.rpc.request("DecentralCardGame.cardchain.cardchain.Query", "RarityDistribution", data);
2165
1841
  return promise.then((data) => QueryRarityDistributionResponse.decode(new _m0.Reader(data)));
2166
1842
  }
2167
- QCouncils(request) {
2168
- const data = QueryQCouncilsRequest.encode(request).finish();
2169
- const promise = this.rpc.request("DecentralCardGame.cardchain.cardchain.Query", "QCouncils", data);
2170
- return promise.then((data) => QueryQCouncilsResponse.decode(new _m0.Reader(data)));
2171
- }
2172
1843
  }
2173
1844
  var globalThis = (() => {
2174
1845
  if (typeof globalThis !== "undefined") {