decentralcardgame-cardchain-client-ts 0.0.2 → 0.0.3

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.
@@ -107,7 +107,7 @@ export interface User {
107
107
  ownedPrototypes: number[];
108
108
  cards: number[];
109
109
  voteRights: VoteRight[];
110
- councilParticipation: CouncilParticipation | undefined;
110
+ CouncilStatus: CouncilStatus;
111
111
  ReportMatches: boolean;
112
112
  profileCard: number;
113
113
  airDrops: AirDrops | undefined;
@@ -116,11 +116,6 @@ export interface User {
116
116
  biography: string;
117
117
  }
118
118
 
119
- export interface CouncilParticipation {
120
- status: CouncilStatus;
121
- council: number;
122
- }
123
-
124
119
  export interface BoosterPack {
125
120
  collectionId: number;
126
121
  timeStamp: number;
@@ -142,7 +137,7 @@ function createBaseUser(): User {
142
137
  ownedPrototypes: [],
143
138
  cards: [],
144
139
  voteRights: [],
145
- councilParticipation: undefined,
140
+ CouncilStatus: 0,
146
141
  ReportMatches: false,
147
142
  profileCard: 0,
148
143
  airDrops: undefined,
@@ -175,8 +170,8 @@ export const User = {
175
170
  for (const v of message.voteRights) {
176
171
  VoteRight.encode(v!, writer.uint32(42).fork()).ldelim();
177
172
  }
178
- if (message.councilParticipation !== undefined) {
179
- CouncilParticipation.encode(message.councilParticipation, writer.uint32(50).fork()).ldelim();
173
+ if (message.CouncilStatus !== 0) {
174
+ writer.uint32(48).int32(message.CouncilStatus);
180
175
  }
181
176
  if (message.ReportMatches === true) {
182
177
  writer.uint32(56).bool(message.ReportMatches);
@@ -243,7 +238,7 @@ export const User = {
243
238
  message.voteRights.push(VoteRight.decode(reader, reader.uint32()));
244
239
  break;
245
240
  case 6:
246
- message.councilParticipation = CouncilParticipation.decode(reader, reader.uint32());
241
+ message.CouncilStatus = reader.int32() as any;
247
242
  break;
248
243
  case 7:
249
244
  message.ReportMatches = reader.bool();
@@ -280,9 +275,7 @@ export const User = {
280
275
  ownedPrototypes: Array.isArray(object?.ownedPrototypes) ? object.ownedPrototypes.map((e: any) => Number(e)) : [],
281
276
  cards: Array.isArray(object?.cards) ? object.cards.map((e: any) => Number(e)) : [],
282
277
  voteRights: Array.isArray(object?.voteRights) ? object.voteRights.map((e: any) => VoteRight.fromJSON(e)) : [],
283
- councilParticipation: isSet(object.councilParticipation)
284
- ? CouncilParticipation.fromJSON(object.councilParticipation)
285
- : undefined,
278
+ CouncilStatus: isSet(object.CouncilStatus) ? councilStatusFromJSON(object.CouncilStatus) : 0,
286
279
  ReportMatches: isSet(object.ReportMatches) ? Boolean(object.ReportMatches) : false,
287
280
  profileCard: isSet(object.profileCard) ? Number(object.profileCard) : 0,
288
281
  airDrops: isSet(object.airDrops) ? AirDrops.fromJSON(object.airDrops) : undefined,
@@ -317,9 +310,7 @@ export const User = {
317
310
  } else {
318
311
  obj.voteRights = [];
319
312
  }
320
- message.councilParticipation !== undefined && (obj.councilParticipation = message.councilParticipation
321
- ? CouncilParticipation.toJSON(message.councilParticipation)
322
- : undefined);
313
+ message.CouncilStatus !== undefined && (obj.CouncilStatus = councilStatusToJSON(message.CouncilStatus));
323
314
  message.ReportMatches !== undefined && (obj.ReportMatches = message.ReportMatches);
324
315
  message.profileCard !== undefined && (obj.profileCard = Math.round(message.profileCard));
325
316
  message.airDrops !== undefined && (obj.airDrops = message.airDrops ? AirDrops.toJSON(message.airDrops) : undefined);
@@ -340,9 +331,7 @@ export const User = {
340
331
  message.ownedPrototypes = object.ownedPrototypes?.map((e) => e) || [];
341
332
  message.cards = object.cards?.map((e) => e) || [];
342
333
  message.voteRights = object.voteRights?.map((e) => VoteRight.fromPartial(e)) || [];
343
- message.councilParticipation = (object.councilParticipation !== undefined && object.councilParticipation !== null)
344
- ? CouncilParticipation.fromPartial(object.councilParticipation)
345
- : undefined;
334
+ message.CouncilStatus = object.CouncilStatus ?? 0;
346
335
  message.ReportMatches = object.ReportMatches ?? false;
347
336
  message.profileCard = object.profileCard ?? 0;
348
337
  message.airDrops = (object.airDrops !== undefined && object.airDrops !== null)
@@ -355,64 +344,6 @@ export const User = {
355
344
  },
356
345
  };
357
346
 
358
- function createBaseCouncilParticipation(): CouncilParticipation {
359
- return { status: 0, council: 0 };
360
- }
361
-
362
- export const CouncilParticipation = {
363
- encode(message: CouncilParticipation, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
364
- if (message.status !== 0) {
365
- writer.uint32(8).int32(message.status);
366
- }
367
- if (message.council !== 0) {
368
- writer.uint32(16).uint64(message.council);
369
- }
370
- return writer;
371
- },
372
-
373
- decode(input: _m0.Reader | Uint8Array, length?: number): CouncilParticipation {
374
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
375
- let end = length === undefined ? reader.len : reader.pos + length;
376
- const message = createBaseCouncilParticipation();
377
- while (reader.pos < end) {
378
- const tag = reader.uint32();
379
- switch (tag >>> 3) {
380
- case 1:
381
- message.status = reader.int32() as any;
382
- break;
383
- case 2:
384
- message.council = longToNumber(reader.uint64() as Long);
385
- break;
386
- default:
387
- reader.skipType(tag & 7);
388
- break;
389
- }
390
- }
391
- return message;
392
- },
393
-
394
- fromJSON(object: any): CouncilParticipation {
395
- return {
396
- status: isSet(object.status) ? councilStatusFromJSON(object.status) : 0,
397
- council: isSet(object.council) ? Number(object.council) : 0,
398
- };
399
- },
400
-
401
- toJSON(message: CouncilParticipation): unknown {
402
- const obj: any = {};
403
- message.status !== undefined && (obj.status = councilStatusToJSON(message.status));
404
- message.council !== undefined && (obj.council = Math.round(message.council));
405
- return obj;
406
- },
407
-
408
- fromPartial<I extends Exact<DeepPartial<CouncilParticipation>, I>>(object: I): CouncilParticipation {
409
- const message = createBaseCouncilParticipation();
410
- message.status = object.status ?? 0;
411
- message.council = object.council ?? 0;
412
- return message;
413
- },
414
- };
415
-
416
347
  function createBaseBoosterPack(): BoosterPack {
417
348
  return { collectionId: 0, timeStamp: 0, raritiesPerPack: [] };
418
349
  }
@@ -1,23 +1,24 @@
1
- import { Card } from "./types/cardchain/card"
2
- import { Collection } from "./types/cardchain/collection"
3
- import { CollectionProposal } from "./types/cardchain/collection_proposal"
4
- import { CopyrightProposal } from "./types/cardchain/copyright_proposal"
5
- import { WrapClearResponse } from "./types/cardchain/council"
6
- import { WrapHashResponse } from "./types/cardchain/council"
7
- import { Image } from "./types/cardchain/image"
8
- import { MatchPlayer } from "./types/cardchain/match"
9
- import { MatchReporterProposal } from "./types/cardchain/match_reporter_proposal"
10
- import { Num } from "./types/cardchain/num"
11
- import { Params } from "./types/cardchain/params"
12
- import { IgnoreMatches } from "./types/cardchain/query"
13
- import { IgnoreSellOffers } from "./types/cardchain/query"
14
- import { QueryQServerResponse } from "./types/cardchain/query"
15
- import { RunningAverage } from "./types/cardchain/running_average"
16
- import { BoosterPack } from "./types/cardchain/user"
17
- import { AirDrops } from "./types/cardchain/user"
18
- import { VoteRight } from "./types/cardchain/vote_right"
19
- import { VotingResult } from "./types/cardchain/voting_result"
20
- import { VotingResults } from "./types/cardchain/voting_results"
1
+ import { Card } from "./types/cardchain/cardchain/card"
2
+ import { Collection } from "./types/cardchain/cardchain/collection"
3
+ import { CollectionProposal } from "./types/cardchain/cardchain/collection_proposal"
4
+ import { CopyrightProposal } from "./types/cardchain/cardchain/copyright_proposal"
5
+ import { WrapClearResponse } from "./types/cardchain/cardchain/council"
6
+ import { WrapHashResponse } from "./types/cardchain/cardchain/council"
7
+ import { Image } from "./types/cardchain/cardchain/image"
8
+ import { MatchPlayer } from "./types/cardchain/cardchain/match"
9
+ import { MatchReporterProposal } from "./types/cardchain/cardchain/match_reporter_proposal"
10
+ import { Num } from "./types/cardchain/cardchain/num"
11
+ import { Params } from "./types/cardchain/cardchain/params"
12
+ import { IgnoreMatches } from "./types/cardchain/cardchain/query"
13
+ import { IgnoreSellOffers } from "./types/cardchain/cardchain/query"
14
+ import { QueryQServerResponse } from "./types/cardchain/cardchain/query"
15
+ import { RunningAverage } from "./types/cardchain/cardchain/running_average"
16
+ import { SingleVote } from "./types/cardchain/cardchain/tx"
17
+ import { BoosterPack } from "./types/cardchain/cardchain/user"
18
+ import { AirDrops } from "./types/cardchain/cardchain/user"
19
+ import { VoteRight } from "./types/cardchain/cardchain/vote_right"
20
+ import { VotingResult } from "./types/cardchain/cardchain/voting_result"
21
+ import { VotingResults } from "./types/cardchain/cardchain/voting_results"
21
22
 
22
23
 
23
24
  export {
@@ -36,6 +37,7 @@ export {
36
37
  IgnoreSellOffers,
37
38
  QueryQServerResponse,
38
39
  RunningAverage,
40
+ SingleVote,
39
41
  BoosterPack,
40
42
  AirDrops,
41
43
  VoteRight,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "decentralcardgame-cardchain-client-ts",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "Autogenerated Typescript Client for crowdcontrol cardchain",
5
5
  "author": "Lxgr <lxgr@protonmail.com>",
6
6
  "license": "GPL-v3",