decentralcardgame-cardchain-client-ts 0.0.26 → 0.0.27
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/DecentralCardGame.cardchain.cardchain/module.js +441 -315
- package/DecentralCardGame.cardchain.cardchain/module.ts +1501 -1298
- package/DecentralCardGame.cardchain.cardchain/registry.js +64 -64
- package/DecentralCardGame.cardchain.cardchain/registry.ts +64 -64
- package/DecentralCardGame.cardchain.cardchain/rest.ts +1 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/query.js +10 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/query.ts +11 -0
- package/DecentralCardGame.cardchain.featureflag/module.js +4 -1
- package/DecentralCardGame.cardchain.featureflag/module.ts +71 -69
- package/cosmos.auth.v1beta1/module.js +4 -1
- package/cosmos.auth.v1beta1/module.ts +71 -69
- package/package.json +1 -1
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/card.js +0 -832
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/card.ts +0 -954
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/copyright_proposal.js +0 -126
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/copyright_proposal.ts +0 -162
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/council.js +0 -407
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/council.ts +0 -481
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/genesis.js +0 -272
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/genesis.ts +0 -324
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/image.js +0 -96
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/image.ts +0 -124
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/match.js +0 -364
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/match.ts +0 -435
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/match_reporter_proposal.js +0 -86
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/match_reporter_proposal.ts +0 -114
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/num.js +0 -82
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/num.ts +0 -112
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/params.js +0 -435
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/params.ts +0 -512
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/query.js +0 -2204
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/query.ts +0 -2687
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/running_average.js +0 -88
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/running_average.ts +0 -120
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/sell_offer.js +0 -177
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/sell_offer.ts +0 -217
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/server.js +0 -112
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/server.ts +0 -146
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/set.js +0 -441
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/set.ts +0 -522
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/set_proposal.js +0 -112
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/set_proposal.ts +0 -146
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/tx.js +0 -5079
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/tx.ts +0 -6194
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/user.js +0 -631
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/user.ts +0 -748
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/voting.js +0 -416
- package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/voting.ts +0 -494
- package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/flag.js +0 -86
- package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/flag.ts +0 -114
- package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/genesis.js +0 -164
- package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/genesis.ts +0 -205
- package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/params.js +0 -40
- package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/params.ts +0 -62
- package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/proposal.js +0 -100
- package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/proposal.ts +0 -130
- package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/query.js +0 -325
- package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/query.ts +0 -424
- package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/tx.js +0 -9
- package/DecentralCardGame.cardchain.featureflag/types/DecentralCardGame/cardchain/featureflag/tx.ts +0 -21
|
@@ -1,126 +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 createBaseCopyrightProposal() {
|
|
6
|
-
return { title: "", description: "", link: "", cardId: 0 };
|
|
7
|
-
}
|
|
8
|
-
export const CopyrightProposal = {
|
|
9
|
-
encode(message, writer = _m0.Writer.create()) {
|
|
10
|
-
if (message.title !== "") {
|
|
11
|
-
writer.uint32(10).string(message.title);
|
|
12
|
-
}
|
|
13
|
-
if (message.description !== "") {
|
|
14
|
-
writer.uint32(18).string(message.description);
|
|
15
|
-
}
|
|
16
|
-
if (message.link !== "") {
|
|
17
|
-
writer.uint32(26).string(message.link);
|
|
18
|
-
}
|
|
19
|
-
if (message.cardId !== 0) {
|
|
20
|
-
writer.uint32(32).uint64(message.cardId);
|
|
21
|
-
}
|
|
22
|
-
return writer;
|
|
23
|
-
},
|
|
24
|
-
decode(input, length) {
|
|
25
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
26
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
27
|
-
const message = createBaseCopyrightProposal();
|
|
28
|
-
while (reader.pos < end) {
|
|
29
|
-
const tag = reader.uint32();
|
|
30
|
-
switch (tag >>> 3) {
|
|
31
|
-
case 1:
|
|
32
|
-
if (tag !== 10) {
|
|
33
|
-
break;
|
|
34
|
-
}
|
|
35
|
-
message.title = reader.string();
|
|
36
|
-
continue;
|
|
37
|
-
case 2:
|
|
38
|
-
if (tag !== 18) {
|
|
39
|
-
break;
|
|
40
|
-
}
|
|
41
|
-
message.description = reader.string();
|
|
42
|
-
continue;
|
|
43
|
-
case 3:
|
|
44
|
-
if (tag !== 26) {
|
|
45
|
-
break;
|
|
46
|
-
}
|
|
47
|
-
message.link = reader.string();
|
|
48
|
-
continue;
|
|
49
|
-
case 4:
|
|
50
|
-
if (tag !== 32) {
|
|
51
|
-
break;
|
|
52
|
-
}
|
|
53
|
-
message.cardId = longToNumber(reader.uint64());
|
|
54
|
-
continue;
|
|
55
|
-
}
|
|
56
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
57
|
-
break;
|
|
58
|
-
}
|
|
59
|
-
reader.skipType(tag & 7);
|
|
60
|
-
}
|
|
61
|
-
return message;
|
|
62
|
-
},
|
|
63
|
-
fromJSON(object) {
|
|
64
|
-
return {
|
|
65
|
-
title: isSet(object.title) ? String(object.title) : "",
|
|
66
|
-
description: isSet(object.description) ? String(object.description) : "",
|
|
67
|
-
link: isSet(object.link) ? String(object.link) : "",
|
|
68
|
-
cardId: isSet(object.cardId) ? Number(object.cardId) : 0,
|
|
69
|
-
};
|
|
70
|
-
},
|
|
71
|
-
toJSON(message) {
|
|
72
|
-
const obj = {};
|
|
73
|
-
if (message.title !== "") {
|
|
74
|
-
obj.title = message.title;
|
|
75
|
-
}
|
|
76
|
-
if (message.description !== "") {
|
|
77
|
-
obj.description = message.description;
|
|
78
|
-
}
|
|
79
|
-
if (message.link !== "") {
|
|
80
|
-
obj.link = message.link;
|
|
81
|
-
}
|
|
82
|
-
if (message.cardId !== 0) {
|
|
83
|
-
obj.cardId = Math.round(message.cardId);
|
|
84
|
-
}
|
|
85
|
-
return obj;
|
|
86
|
-
},
|
|
87
|
-
create(base) {
|
|
88
|
-
return CopyrightProposal.fromPartial(base ?? {});
|
|
89
|
-
},
|
|
90
|
-
fromPartial(object) {
|
|
91
|
-
const message = createBaseCopyrightProposal();
|
|
92
|
-
message.title = object.title ?? "";
|
|
93
|
-
message.description = object.description ?? "";
|
|
94
|
-
message.link = object.link ?? "";
|
|
95
|
-
message.cardId = object.cardId ?? 0;
|
|
96
|
-
return message;
|
|
97
|
-
},
|
|
98
|
-
};
|
|
99
|
-
const tsProtoGlobalThis = (() => {
|
|
100
|
-
if (typeof globalThis !== "undefined") {
|
|
101
|
-
return globalThis;
|
|
102
|
-
}
|
|
103
|
-
if (typeof self !== "undefined") {
|
|
104
|
-
return self;
|
|
105
|
-
}
|
|
106
|
-
if (typeof window !== "undefined") {
|
|
107
|
-
return window;
|
|
108
|
-
}
|
|
109
|
-
if (typeof global !== "undefined") {
|
|
110
|
-
return global;
|
|
111
|
-
}
|
|
112
|
-
throw "Unable to locate global object";
|
|
113
|
-
})();
|
|
114
|
-
function longToNumber(long) {
|
|
115
|
-
if (long.gt(Number.MAX_SAFE_INTEGER)) {
|
|
116
|
-
throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
117
|
-
}
|
|
118
|
-
return long.toNumber();
|
|
119
|
-
}
|
|
120
|
-
if (_m0.util.Long !== Long) {
|
|
121
|
-
_m0.util.Long = Long;
|
|
122
|
-
_m0.configure();
|
|
123
|
-
}
|
|
124
|
-
function isSet(value) {
|
|
125
|
-
return value !== null && value !== undefined;
|
|
126
|
-
}
|
|
@@ -1,162 +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
|
-
export interface CopyrightProposal {
|
|
8
|
-
title: string;
|
|
9
|
-
description: string;
|
|
10
|
-
link: string;
|
|
11
|
-
cardId: number;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function createBaseCopyrightProposal(): CopyrightProposal {
|
|
15
|
-
return { title: "", description: "", link: "", cardId: 0 };
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export const CopyrightProposal = {
|
|
19
|
-
encode(message: CopyrightProposal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
20
|
-
if (message.title !== "") {
|
|
21
|
-
writer.uint32(10).string(message.title);
|
|
22
|
-
}
|
|
23
|
-
if (message.description !== "") {
|
|
24
|
-
writer.uint32(18).string(message.description);
|
|
25
|
-
}
|
|
26
|
-
if (message.link !== "") {
|
|
27
|
-
writer.uint32(26).string(message.link);
|
|
28
|
-
}
|
|
29
|
-
if (message.cardId !== 0) {
|
|
30
|
-
writer.uint32(32).uint64(message.cardId);
|
|
31
|
-
}
|
|
32
|
-
return writer;
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): CopyrightProposal {
|
|
36
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
37
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
38
|
-
const message = createBaseCopyrightProposal();
|
|
39
|
-
while (reader.pos < end) {
|
|
40
|
-
const tag = reader.uint32();
|
|
41
|
-
switch (tag >>> 3) {
|
|
42
|
-
case 1:
|
|
43
|
-
if (tag !== 10) {
|
|
44
|
-
break;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
message.title = reader.string();
|
|
48
|
-
continue;
|
|
49
|
-
case 2:
|
|
50
|
-
if (tag !== 18) {
|
|
51
|
-
break;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
message.description = reader.string();
|
|
55
|
-
continue;
|
|
56
|
-
case 3:
|
|
57
|
-
if (tag !== 26) {
|
|
58
|
-
break;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
message.link = reader.string();
|
|
62
|
-
continue;
|
|
63
|
-
case 4:
|
|
64
|
-
if (tag !== 32) {
|
|
65
|
-
break;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
message.cardId = longToNumber(reader.uint64() as Long);
|
|
69
|
-
continue;
|
|
70
|
-
}
|
|
71
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
72
|
-
break;
|
|
73
|
-
}
|
|
74
|
-
reader.skipType(tag & 7);
|
|
75
|
-
}
|
|
76
|
-
return message;
|
|
77
|
-
},
|
|
78
|
-
|
|
79
|
-
fromJSON(object: any): CopyrightProposal {
|
|
80
|
-
return {
|
|
81
|
-
title: isSet(object.title) ? String(object.title) : "",
|
|
82
|
-
description: isSet(object.description) ? String(object.description) : "",
|
|
83
|
-
link: isSet(object.link) ? String(object.link) : "",
|
|
84
|
-
cardId: isSet(object.cardId) ? Number(object.cardId) : 0,
|
|
85
|
-
};
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
toJSON(message: CopyrightProposal): unknown {
|
|
89
|
-
const obj: any = {};
|
|
90
|
-
if (message.title !== "") {
|
|
91
|
-
obj.title = message.title;
|
|
92
|
-
}
|
|
93
|
-
if (message.description !== "") {
|
|
94
|
-
obj.description = message.description;
|
|
95
|
-
}
|
|
96
|
-
if (message.link !== "") {
|
|
97
|
-
obj.link = message.link;
|
|
98
|
-
}
|
|
99
|
-
if (message.cardId !== 0) {
|
|
100
|
-
obj.cardId = Math.round(message.cardId);
|
|
101
|
-
}
|
|
102
|
-
return obj;
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
create<I extends Exact<DeepPartial<CopyrightProposal>, I>>(base?: I): CopyrightProposal {
|
|
106
|
-
return CopyrightProposal.fromPartial(base ?? ({} as any));
|
|
107
|
-
},
|
|
108
|
-
fromPartial<I extends Exact<DeepPartial<CopyrightProposal>, I>>(object: I): CopyrightProposal {
|
|
109
|
-
const message = createBaseCopyrightProposal();
|
|
110
|
-
message.title = object.title ?? "";
|
|
111
|
-
message.description = object.description ?? "";
|
|
112
|
-
message.link = object.link ?? "";
|
|
113
|
-
message.cardId = object.cardId ?? 0;
|
|
114
|
-
return message;
|
|
115
|
-
},
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
declare const self: any | undefined;
|
|
119
|
-
declare const window: any | undefined;
|
|
120
|
-
declare const global: any | undefined;
|
|
121
|
-
const tsProtoGlobalThis: any = (() => {
|
|
122
|
-
if (typeof globalThis !== "undefined") {
|
|
123
|
-
return globalThis;
|
|
124
|
-
}
|
|
125
|
-
if (typeof self !== "undefined") {
|
|
126
|
-
return self;
|
|
127
|
-
}
|
|
128
|
-
if (typeof window !== "undefined") {
|
|
129
|
-
return window;
|
|
130
|
-
}
|
|
131
|
-
if (typeof global !== "undefined") {
|
|
132
|
-
return global;
|
|
133
|
-
}
|
|
134
|
-
throw "Unable to locate global object";
|
|
135
|
-
})();
|
|
136
|
-
|
|
137
|
-
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
138
|
-
|
|
139
|
-
export type DeepPartial<T> = T extends Builtin ? T
|
|
140
|
-
: T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
141
|
-
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
142
|
-
: Partial<T>;
|
|
143
|
-
|
|
144
|
-
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
145
|
-
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
146
|
-
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
147
|
-
|
|
148
|
-
function longToNumber(long: Long): number {
|
|
149
|
-
if (long.gt(Number.MAX_SAFE_INTEGER)) {
|
|
150
|
-
throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
151
|
-
}
|
|
152
|
-
return long.toNumber();
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
if (_m0.util.Long !== Long) {
|
|
156
|
-
_m0.util.Long = Long as any;
|
|
157
|
-
_m0.configure();
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
function isSet(value: any): boolean {
|
|
161
|
-
return value !== null && value !== undefined;
|
|
162
|
-
}
|
package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/council.js
DELETED
|
@@ -1,407 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
import Long from "long";
|
|
3
|
-
import _m0 from "protobufjs/minimal";
|
|
4
|
-
export const protobufPackage = "DecentralCardGame.cardchain.cardchain";
|
|
5
|
-
export var Response;
|
|
6
|
-
(function (Response) {
|
|
7
|
-
Response[Response["Yes"] = 0] = "Yes";
|
|
8
|
-
Response[Response["No"] = 1] = "No";
|
|
9
|
-
Response[Response["Suggestion"] = 2] = "Suggestion";
|
|
10
|
-
Response[Response["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
11
|
-
})(Response || (Response = {}));
|
|
12
|
-
export function responseFromJSON(object) {
|
|
13
|
-
switch (object) {
|
|
14
|
-
case 0:
|
|
15
|
-
case "Yes":
|
|
16
|
-
return Response.Yes;
|
|
17
|
-
case 1:
|
|
18
|
-
case "No":
|
|
19
|
-
return Response.No;
|
|
20
|
-
case 2:
|
|
21
|
-
case "Suggestion":
|
|
22
|
-
return Response.Suggestion;
|
|
23
|
-
case -1:
|
|
24
|
-
case "UNRECOGNIZED":
|
|
25
|
-
default:
|
|
26
|
-
return Response.UNRECOGNIZED;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
export function responseToJSON(object) {
|
|
30
|
-
switch (object) {
|
|
31
|
-
case Response.Yes:
|
|
32
|
-
return "Yes";
|
|
33
|
-
case Response.No:
|
|
34
|
-
return "No";
|
|
35
|
-
case Response.Suggestion:
|
|
36
|
-
return "Suggestion";
|
|
37
|
-
case Response.UNRECOGNIZED:
|
|
38
|
-
default:
|
|
39
|
-
return "UNRECOGNIZED";
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
export var CouncelingStatus;
|
|
43
|
-
(function (CouncelingStatus) {
|
|
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";
|
|
50
|
-
CouncelingStatus[CouncelingStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
51
|
-
})(CouncelingStatus || (CouncelingStatus = {}));
|
|
52
|
-
export function councelingStatusFromJSON(object) {
|
|
53
|
-
switch (object) {
|
|
54
|
-
case 0:
|
|
55
|
-
case "councilOpen":
|
|
56
|
-
return CouncelingStatus.councilOpen;
|
|
57
|
-
case 1:
|
|
58
|
-
case "councilCreated":
|
|
59
|
-
return CouncelingStatus.councilCreated;
|
|
60
|
-
case 2:
|
|
61
|
-
case "councilClosed":
|
|
62
|
-
return CouncelingStatus.councilClosed;
|
|
63
|
-
case 3:
|
|
64
|
-
case "commited":
|
|
65
|
-
return CouncelingStatus.commited;
|
|
66
|
-
case 4:
|
|
67
|
-
case "revealed":
|
|
68
|
-
return CouncelingStatus.revealed;
|
|
69
|
-
case 5:
|
|
70
|
-
case "suggestionsMade":
|
|
71
|
-
return CouncelingStatus.suggestionsMade;
|
|
72
|
-
case -1:
|
|
73
|
-
case "UNRECOGNIZED":
|
|
74
|
-
default:
|
|
75
|
-
return CouncelingStatus.UNRECOGNIZED;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
export function councelingStatusToJSON(object) {
|
|
79
|
-
switch (object) {
|
|
80
|
-
case CouncelingStatus.councilOpen:
|
|
81
|
-
return "councilOpen";
|
|
82
|
-
case CouncelingStatus.councilCreated:
|
|
83
|
-
return "councilCreated";
|
|
84
|
-
case CouncelingStatus.councilClosed:
|
|
85
|
-
return "councilClosed";
|
|
86
|
-
case CouncelingStatus.commited:
|
|
87
|
-
return "commited";
|
|
88
|
-
case CouncelingStatus.revealed:
|
|
89
|
-
return "revealed";
|
|
90
|
-
case CouncelingStatus.suggestionsMade:
|
|
91
|
-
return "suggestionsMade";
|
|
92
|
-
case CouncelingStatus.UNRECOGNIZED:
|
|
93
|
-
default:
|
|
94
|
-
return "UNRECOGNIZED";
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
function createBaseCouncil() {
|
|
98
|
-
return { cardId: 0, voters: [], hashResponses: [], clearResponses: [], treasury: "", status: 0, trialStart: 0 };
|
|
99
|
-
}
|
|
100
|
-
export const Council = {
|
|
101
|
-
encode(message, writer = _m0.Writer.create()) {
|
|
102
|
-
if (message.cardId !== 0) {
|
|
103
|
-
writer.uint32(8).uint64(message.cardId);
|
|
104
|
-
}
|
|
105
|
-
for (const v of message.voters) {
|
|
106
|
-
writer.uint32(18).string(v);
|
|
107
|
-
}
|
|
108
|
-
for (const v of message.hashResponses) {
|
|
109
|
-
WrapHashResponse.encode(v, writer.uint32(26).fork()).ldelim();
|
|
110
|
-
}
|
|
111
|
-
for (const v of message.clearResponses) {
|
|
112
|
-
WrapClearResponse.encode(v, writer.uint32(34).fork()).ldelim();
|
|
113
|
-
}
|
|
114
|
-
if (message.treasury !== "") {
|
|
115
|
-
writer.uint32(42).string(message.treasury);
|
|
116
|
-
}
|
|
117
|
-
if (message.status !== 0) {
|
|
118
|
-
writer.uint32(48).int32(message.status);
|
|
119
|
-
}
|
|
120
|
-
if (message.trialStart !== 0) {
|
|
121
|
-
writer.uint32(56).uint64(message.trialStart);
|
|
122
|
-
}
|
|
123
|
-
return writer;
|
|
124
|
-
},
|
|
125
|
-
decode(input, length) {
|
|
126
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
127
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
128
|
-
const message = createBaseCouncil();
|
|
129
|
-
while (reader.pos < end) {
|
|
130
|
-
const tag = reader.uint32();
|
|
131
|
-
switch (tag >>> 3) {
|
|
132
|
-
case 1:
|
|
133
|
-
if (tag !== 8) {
|
|
134
|
-
break;
|
|
135
|
-
}
|
|
136
|
-
message.cardId = longToNumber(reader.uint64());
|
|
137
|
-
continue;
|
|
138
|
-
case 2:
|
|
139
|
-
if (tag !== 18) {
|
|
140
|
-
break;
|
|
141
|
-
}
|
|
142
|
-
message.voters.push(reader.string());
|
|
143
|
-
continue;
|
|
144
|
-
case 3:
|
|
145
|
-
if (tag !== 26) {
|
|
146
|
-
break;
|
|
147
|
-
}
|
|
148
|
-
message.hashResponses.push(WrapHashResponse.decode(reader, reader.uint32()));
|
|
149
|
-
continue;
|
|
150
|
-
case 4:
|
|
151
|
-
if (tag !== 34) {
|
|
152
|
-
break;
|
|
153
|
-
}
|
|
154
|
-
message.clearResponses.push(WrapClearResponse.decode(reader, reader.uint32()));
|
|
155
|
-
continue;
|
|
156
|
-
case 5:
|
|
157
|
-
if (tag !== 42) {
|
|
158
|
-
break;
|
|
159
|
-
}
|
|
160
|
-
message.treasury = reader.string();
|
|
161
|
-
continue;
|
|
162
|
-
case 6:
|
|
163
|
-
if (tag !== 48) {
|
|
164
|
-
break;
|
|
165
|
-
}
|
|
166
|
-
message.status = reader.int32();
|
|
167
|
-
continue;
|
|
168
|
-
case 7:
|
|
169
|
-
if (tag !== 56) {
|
|
170
|
-
break;
|
|
171
|
-
}
|
|
172
|
-
message.trialStart = longToNumber(reader.uint64());
|
|
173
|
-
continue;
|
|
174
|
-
}
|
|
175
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
176
|
-
break;
|
|
177
|
-
}
|
|
178
|
-
reader.skipType(tag & 7);
|
|
179
|
-
}
|
|
180
|
-
return message;
|
|
181
|
-
},
|
|
182
|
-
fromJSON(object) {
|
|
183
|
-
return {
|
|
184
|
-
cardId: isSet(object.cardId) ? Number(object.cardId) : 0,
|
|
185
|
-
voters: Array.isArray(object?.voters) ? object.voters.map((e) => String(e)) : [],
|
|
186
|
-
hashResponses: Array.isArray(object?.hashResponses)
|
|
187
|
-
? object.hashResponses.map((e) => WrapHashResponse.fromJSON(e))
|
|
188
|
-
: [],
|
|
189
|
-
clearResponses: Array.isArray(object?.clearResponses)
|
|
190
|
-
? object.clearResponses.map((e) => WrapClearResponse.fromJSON(e))
|
|
191
|
-
: [],
|
|
192
|
-
treasury: isSet(object.treasury) ? String(object.treasury) : "",
|
|
193
|
-
status: isSet(object.status) ? councelingStatusFromJSON(object.status) : 0,
|
|
194
|
-
trialStart: isSet(object.trialStart) ? Number(object.trialStart) : 0,
|
|
195
|
-
};
|
|
196
|
-
},
|
|
197
|
-
toJSON(message) {
|
|
198
|
-
const obj = {};
|
|
199
|
-
if (message.cardId !== 0) {
|
|
200
|
-
obj.cardId = Math.round(message.cardId);
|
|
201
|
-
}
|
|
202
|
-
if (message.voters?.length) {
|
|
203
|
-
obj.voters = message.voters;
|
|
204
|
-
}
|
|
205
|
-
if (message.hashResponses?.length) {
|
|
206
|
-
obj.hashResponses = message.hashResponses.map((e) => WrapHashResponse.toJSON(e));
|
|
207
|
-
}
|
|
208
|
-
if (message.clearResponses?.length) {
|
|
209
|
-
obj.clearResponses = message.clearResponses.map((e) => WrapClearResponse.toJSON(e));
|
|
210
|
-
}
|
|
211
|
-
if (message.treasury !== "") {
|
|
212
|
-
obj.treasury = message.treasury;
|
|
213
|
-
}
|
|
214
|
-
if (message.status !== 0) {
|
|
215
|
-
obj.status = councelingStatusToJSON(message.status);
|
|
216
|
-
}
|
|
217
|
-
if (message.trialStart !== 0) {
|
|
218
|
-
obj.trialStart = Math.round(message.trialStart);
|
|
219
|
-
}
|
|
220
|
-
return obj;
|
|
221
|
-
},
|
|
222
|
-
create(base) {
|
|
223
|
-
return Council.fromPartial(base ?? {});
|
|
224
|
-
},
|
|
225
|
-
fromPartial(object) {
|
|
226
|
-
const message = createBaseCouncil();
|
|
227
|
-
message.cardId = object.cardId ?? 0;
|
|
228
|
-
message.voters = object.voters?.map((e) => e) || [];
|
|
229
|
-
message.hashResponses = object.hashResponses?.map((e) => WrapHashResponse.fromPartial(e)) || [];
|
|
230
|
-
message.clearResponses = object.clearResponses?.map((e) => WrapClearResponse.fromPartial(e)) || [];
|
|
231
|
-
message.treasury = object.treasury ?? "";
|
|
232
|
-
message.status = object.status ?? 0;
|
|
233
|
-
message.trialStart = object.trialStart ?? 0;
|
|
234
|
-
return message;
|
|
235
|
-
},
|
|
236
|
-
};
|
|
237
|
-
function createBaseWrapClearResponse() {
|
|
238
|
-
return { user: "", response: 0, suggestion: "" };
|
|
239
|
-
}
|
|
240
|
-
export const WrapClearResponse = {
|
|
241
|
-
encode(message, writer = _m0.Writer.create()) {
|
|
242
|
-
if (message.user !== "") {
|
|
243
|
-
writer.uint32(10).string(message.user);
|
|
244
|
-
}
|
|
245
|
-
if (message.response !== 0) {
|
|
246
|
-
writer.uint32(16).int32(message.response);
|
|
247
|
-
}
|
|
248
|
-
if (message.suggestion !== "") {
|
|
249
|
-
writer.uint32(26).string(message.suggestion);
|
|
250
|
-
}
|
|
251
|
-
return writer;
|
|
252
|
-
},
|
|
253
|
-
decode(input, length) {
|
|
254
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
255
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
256
|
-
const message = createBaseWrapClearResponse();
|
|
257
|
-
while (reader.pos < end) {
|
|
258
|
-
const tag = reader.uint32();
|
|
259
|
-
switch (tag >>> 3) {
|
|
260
|
-
case 1:
|
|
261
|
-
if (tag !== 10) {
|
|
262
|
-
break;
|
|
263
|
-
}
|
|
264
|
-
message.user = reader.string();
|
|
265
|
-
continue;
|
|
266
|
-
case 2:
|
|
267
|
-
if (tag !== 16) {
|
|
268
|
-
break;
|
|
269
|
-
}
|
|
270
|
-
message.response = reader.int32();
|
|
271
|
-
continue;
|
|
272
|
-
case 3:
|
|
273
|
-
if (tag !== 26) {
|
|
274
|
-
break;
|
|
275
|
-
}
|
|
276
|
-
message.suggestion = reader.string();
|
|
277
|
-
continue;
|
|
278
|
-
}
|
|
279
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
280
|
-
break;
|
|
281
|
-
}
|
|
282
|
-
reader.skipType(tag & 7);
|
|
283
|
-
}
|
|
284
|
-
return message;
|
|
285
|
-
},
|
|
286
|
-
fromJSON(object) {
|
|
287
|
-
return {
|
|
288
|
-
user: isSet(object.user) ? String(object.user) : "",
|
|
289
|
-
response: isSet(object.response) ? responseFromJSON(object.response) : 0,
|
|
290
|
-
suggestion: isSet(object.suggestion) ? String(object.suggestion) : "",
|
|
291
|
-
};
|
|
292
|
-
},
|
|
293
|
-
toJSON(message) {
|
|
294
|
-
const obj = {};
|
|
295
|
-
if (message.user !== "") {
|
|
296
|
-
obj.user = message.user;
|
|
297
|
-
}
|
|
298
|
-
if (message.response !== 0) {
|
|
299
|
-
obj.response = responseToJSON(message.response);
|
|
300
|
-
}
|
|
301
|
-
if (message.suggestion !== "") {
|
|
302
|
-
obj.suggestion = message.suggestion;
|
|
303
|
-
}
|
|
304
|
-
return obj;
|
|
305
|
-
},
|
|
306
|
-
create(base) {
|
|
307
|
-
return WrapClearResponse.fromPartial(base ?? {});
|
|
308
|
-
},
|
|
309
|
-
fromPartial(object) {
|
|
310
|
-
const message = createBaseWrapClearResponse();
|
|
311
|
-
message.user = object.user ?? "";
|
|
312
|
-
message.response = object.response ?? 0;
|
|
313
|
-
message.suggestion = object.suggestion ?? "";
|
|
314
|
-
return message;
|
|
315
|
-
},
|
|
316
|
-
};
|
|
317
|
-
function createBaseWrapHashResponse() {
|
|
318
|
-
return { user: "", hash: "" };
|
|
319
|
-
}
|
|
320
|
-
export const WrapHashResponse = {
|
|
321
|
-
encode(message, writer = _m0.Writer.create()) {
|
|
322
|
-
if (message.user !== "") {
|
|
323
|
-
writer.uint32(10).string(message.user);
|
|
324
|
-
}
|
|
325
|
-
if (message.hash !== "") {
|
|
326
|
-
writer.uint32(18).string(message.hash);
|
|
327
|
-
}
|
|
328
|
-
return writer;
|
|
329
|
-
},
|
|
330
|
-
decode(input, length) {
|
|
331
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
332
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
333
|
-
const message = createBaseWrapHashResponse();
|
|
334
|
-
while (reader.pos < end) {
|
|
335
|
-
const tag = reader.uint32();
|
|
336
|
-
switch (tag >>> 3) {
|
|
337
|
-
case 1:
|
|
338
|
-
if (tag !== 10) {
|
|
339
|
-
break;
|
|
340
|
-
}
|
|
341
|
-
message.user = reader.string();
|
|
342
|
-
continue;
|
|
343
|
-
case 2:
|
|
344
|
-
if (tag !== 18) {
|
|
345
|
-
break;
|
|
346
|
-
}
|
|
347
|
-
message.hash = reader.string();
|
|
348
|
-
continue;
|
|
349
|
-
}
|
|
350
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
351
|
-
break;
|
|
352
|
-
}
|
|
353
|
-
reader.skipType(tag & 7);
|
|
354
|
-
}
|
|
355
|
-
return message;
|
|
356
|
-
},
|
|
357
|
-
fromJSON(object) {
|
|
358
|
-
return { user: isSet(object.user) ? String(object.user) : "", hash: isSet(object.hash) ? String(object.hash) : "" };
|
|
359
|
-
},
|
|
360
|
-
toJSON(message) {
|
|
361
|
-
const obj = {};
|
|
362
|
-
if (message.user !== "") {
|
|
363
|
-
obj.user = message.user;
|
|
364
|
-
}
|
|
365
|
-
if (message.hash !== "") {
|
|
366
|
-
obj.hash = message.hash;
|
|
367
|
-
}
|
|
368
|
-
return obj;
|
|
369
|
-
},
|
|
370
|
-
create(base) {
|
|
371
|
-
return WrapHashResponse.fromPartial(base ?? {});
|
|
372
|
-
},
|
|
373
|
-
fromPartial(object) {
|
|
374
|
-
const message = createBaseWrapHashResponse();
|
|
375
|
-
message.user = object.user ?? "";
|
|
376
|
-
message.hash = object.hash ?? "";
|
|
377
|
-
return message;
|
|
378
|
-
},
|
|
379
|
-
};
|
|
380
|
-
const tsProtoGlobalThis = (() => {
|
|
381
|
-
if (typeof globalThis !== "undefined") {
|
|
382
|
-
return globalThis;
|
|
383
|
-
}
|
|
384
|
-
if (typeof self !== "undefined") {
|
|
385
|
-
return self;
|
|
386
|
-
}
|
|
387
|
-
if (typeof window !== "undefined") {
|
|
388
|
-
return window;
|
|
389
|
-
}
|
|
390
|
-
if (typeof global !== "undefined") {
|
|
391
|
-
return global;
|
|
392
|
-
}
|
|
393
|
-
throw "Unable to locate global object";
|
|
394
|
-
})();
|
|
395
|
-
function longToNumber(long) {
|
|
396
|
-
if (long.gt(Number.MAX_SAFE_INTEGER)) {
|
|
397
|
-
throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
398
|
-
}
|
|
399
|
-
return long.toNumber();
|
|
400
|
-
}
|
|
401
|
-
if (_m0.util.Long !== Long) {
|
|
402
|
-
_m0.util.Long = Long;
|
|
403
|
-
_m0.configure();
|
|
404
|
-
}
|
|
405
|
-
function isSet(value) {
|
|
406
|
-
return value !== null && value !== undefined;
|
|
407
|
-
}
|