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