decentralcardgame-cardchain-client-ts 0.0.14 → 0.0.16
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 +318 -383
- package/DecentralCardGame.cardchain.cardchain/module.ts +463 -558
- package/DecentralCardGame.cardchain.cardchain/registry.js +72 -78
- package/DecentralCardGame.cardchain.cardchain/registry.ts +72 -78
- package/DecentralCardGame.cardchain.cardchain/rest.js +77 -60
- package/DecentralCardGame.cardchain.cardchain/rest.ts +123 -76
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/card.js +657 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/card.ts +741 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/copyright_proposal.js +102 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/copyright_proposal.ts +134 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/council.js +356 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/council.ts +415 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/genesis.js +254 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/genesis.ts +281 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/image.js +88 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/image.ts +115 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/match.js +308 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/match.ts +355 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/match_reporter_proposal.js +67 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/match_reporter_proposal.ts +92 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/num.js +73 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/num.ts +102 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/params.js +325 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/params.ts +380 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/query.js +2200 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/query.ts +2633 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/running_average.js +85 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/running_average.ts +111 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/sell_offer.js +148 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/sell_offer.ts +183 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/server.js +93 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/server.ts +124 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/set.js +365 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/set.ts +416 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/set_proposal.js +93 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/set_proposal.ts +124 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/tx.js +4185 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/tx.ts +5139 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/user.js +580 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/user.ts +652 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/voting.js +346 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/voting.ts +417 -0
- package/DecentralCardGame.cardchain.cardchain/types.js +25 -23
- package/DecentralCardGame.cardchain.cardchain/types.ts +26 -22
- package/DecentralCardGame.cardchain.featureflag/index.js +5 -0
- package/DecentralCardGame.cardchain.featureflag/index.ts +6 -0
- package/DecentralCardGame.cardchain.featureflag/module.js +62 -0
- package/DecentralCardGame.cardchain.featureflag/module.ts +102 -0
- package/DecentralCardGame.cardchain.featureflag/registry.js +2 -0
- package/DecentralCardGame.cardchain.featureflag/registry.ts +7 -0
- package/DecentralCardGame.cardchain.featureflag/rest.js +128 -0
- package/DecentralCardGame.cardchain.featureflag/rest.ts +222 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/flag.js +67 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/flag.ts +92 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/genesis.js +135 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/genesis.ts +172 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/params.js +36 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/params.ts +58 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/proposal.js +76 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/proposal.ts +102 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/query.js +279 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/query.ts +371 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/tx.js +7 -0
- package/DecentralCardGame.cardchain.featureflag/types/cardchain/featureflag/tx.ts +17 -0
- package/DecentralCardGame.cardchain.featureflag/types/cosmos/base/query/v1beta1/pagination.js +190 -0
- package/DecentralCardGame.cardchain.featureflag/types/cosmos/base/query/v1beta1/pagination.ts +286 -0
- package/DecentralCardGame.cardchain.featureflag/types/gogoproto/gogo.js +2 -0
- package/DecentralCardGame.cardchain.featureflag/types/gogoproto/gogo.ts +2 -0
- package/DecentralCardGame.cardchain.featureflag/types/google/api/annotations.js +2 -0
- package/DecentralCardGame.cardchain.featureflag/types/google/api/annotations.ts +2 -0
- package/DecentralCardGame.cardchain.featureflag/types/google/api/http.js +260 -0
- package/DecentralCardGame.cardchain.featureflag/types/google/api/http.ts +589 -0
- package/DecentralCardGame.cardchain.featureflag/types/google/protobuf/descriptor.js +2830 -0
- package/DecentralCardGame.cardchain.featureflag/types/google/protobuf/descriptor.ts +3753 -0
- package/DecentralCardGame.cardchain.featureflag/types.js +4 -0
- package/DecentralCardGame.cardchain.featureflag/types.ts +11 -0
- package/client.js +7 -7
- package/client.ts +9 -10
- package/cosmos.auth.v1beta1/module.js +0 -2
- package/cosmos.auth.v1beta1/module.ts +0 -2
- package/cosmos.auth.v1beta1/rest.js +3 -18
- package/cosmos.auth.v1beta1/rest.ts +3 -113
- package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/auth.js +0 -84
- package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/auth.ts +0 -104
- package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/genesis.ts +1 -1
- package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/query.js +3 -104
- package/cosmos.auth.v1beta1/types/cosmos/auth/v1beta1/query.ts +4 -157
- package/cosmos.auth.v1beta1/types.js +1 -2
- package/cosmos.auth.v1beta1/types.ts +0 -2
- package/cosmos.authz.v1beta1/module.js +19 -19
- package/cosmos.authz.v1beta1/module.ts +29 -29
- package/cosmos.authz.v1beta1/registry.js +2 -2
- package/cosmos.authz.v1beta1/registry.ts +2 -2
- package/cosmos.authz.v1beta1/types/cosmos/authz/v1beta1/tx.ts +1 -1
- package/cosmos.bank.v1beta1/module.js +16 -16
- package/cosmos.bank.v1beta1/module.ts +24 -24
- package/cosmos.bank.v1beta1/registry.js +2 -2
- package/cosmos.bank.v1beta1/registry.ts +2 -2
- package/cosmos.bank.v1beta1/rest.js +6 -37
- package/cosmos.bank.v1beta1/rest.ts +6 -99
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/authz.js +2 -18
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/authz.ts +2 -24
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/bank.ts +0 -9
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/genesis.js +2 -18
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/genesis.ts +4 -25
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/query.js +1 -230
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/query.ts +5 -356
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/tx.js +1 -206
- package/cosmos.bank.v1beta1/types/cosmos/bank/v1beta1/tx.ts +1 -305
- package/cosmos.base.tendermint.v1beta1/rest.js +3 -3
- package/cosmos.base.tendermint.v1beta1/rest.ts +27 -18
- package/cosmos.base.tendermint.v1beta1/types/cosmos/base/tendermint/v1beta1/query.ts +46 -16
- package/cosmos.crisis.v1beta1/module.js +1 -24
- package/cosmos.crisis.v1beta1/module.ts +1 -34
- package/cosmos.crisis.v1beta1/registry.js +0 -2
- package/cosmos.crisis.v1beta1/registry.ts +0 -2
- package/cosmos.crisis.v1beta1/rest.ts +0 -19
- package/cosmos.crisis.v1beta1/types/cosmos/crisis/v1beta1/tx.js +0 -95
- package/cosmos.crisis.v1beta1/types/cosmos/crisis/v1beta1/tx.ts +1 -140
- package/cosmos.distribution.v1beta1/module.js +21 -67
- package/cosmos.distribution.v1beta1/module.ts +34 -100
- package/cosmos.distribution.v1beta1/registry.js +4 -8
- package/cosmos.distribution.v1beta1/registry.ts +4 -8
- package/cosmos.distribution.v1beta1/rest.js +0 -14
- package/cosmos.distribution.v1beta1/rest.ts +7 -66
- package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/distribution.ts +0 -19
- package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/genesis.ts +4 -4
- package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/query.js +0 -120
- package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/query.ts +1 -158
- package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/tx.js +0 -199
- package/cosmos.distribution.v1beta1/types/cosmos/distribution/v1beta1/tx.ts +3 -300
- package/cosmos.evidence.v1beta1/rest.js +3 -4
- package/cosmos.evidence.v1beta1/rest.ts +3 -4
- package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/evidence.ts +1 -7
- package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/query.js +2 -13
- package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/query.ts +3 -25
- package/cosmos.evidence.v1beta1/types/cosmos/evidence/v1beta1/tx.ts +0 -2
- package/cosmos.gov.v1/module.js +21 -46
- package/cosmos.gov.v1/module.ts +33 -68
- package/cosmos.gov.v1/registry.js +4 -6
- package/cosmos.gov.v1/registry.ts +4 -6
- package/cosmos.gov.v1/rest.ts +41 -155
- package/cosmos.gov.v1/types/cosmos/gov/v1/genesis.js +1 -13
- package/cosmos.gov.v1/types/cosmos/gov/v1/genesis.ts +5 -40
- package/cosmos.gov.v1/types/cosmos/gov/v1/gov.js +0 -179
- package/cosmos.gov.v1/types/cosmos/gov/v1/gov.ts +6 -277
- package/cosmos.gov.v1/types/cosmos/gov/v1/query.js +2 -13
- package/cosmos.gov.v1/types/cosmos/gov/v1/query.ts +7 -45
- package/cosmos.gov.v1/types/cosmos/gov/v1/tx.js +2 -113
- package/cosmos.gov.v1/types/cosmos/gov/v1/tx.ts +3 -186
- package/cosmos.gov.v1/types.js +1 -2
- package/cosmos.gov.v1/types.ts +0 -2
- package/cosmos.gov.v1beta1/module.js +24 -24
- package/cosmos.gov.v1beta1/module.ts +36 -36
- package/cosmos.gov.v1beta1/registry.js +4 -4
- package/cosmos.gov.v1beta1/registry.ts +4 -4
- package/cosmos.gov.v1beta1/rest.ts +96 -65
- package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/genesis.ts +3 -3
- package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/gov.ts +10 -45
- package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/query.ts +2 -4
- package/cosmos.gov.v1beta1/types/cosmos/gov/v1beta1/tx.ts +1 -16
- package/cosmos.group.v1/module.js +92 -92
- package/cosmos.group.v1/module.ts +138 -138
- package/cosmos.group.v1/registry.js +16 -16
- package/cosmos.group.v1/registry.ts +16 -16
- package/cosmos.group.v1/rest.js +3 -3
- package/cosmos.group.v1/rest.ts +9 -29
- package/cosmos.group.v1/types/cosmos/group/v1/query.ts +5 -5
- package/cosmos.group.v1/types/cosmos/group/v1/tx.js +34 -52
- package/cosmos.group.v1/types/cosmos/group/v1/tx.ts +49 -79
- package/cosmos.group.v1/types/cosmos/group/v1/types.js +0 -20
- package/cosmos.group.v1/types/cosmos/group/v1/types.ts +6 -46
- package/cosmos.mint.v1beta1/rest.ts +1 -9
- package/cosmos.mint.v1beta1/types/cosmos/mint/v1beta1/genesis.ts +1 -1
- package/cosmos.mint.v1beta1/types/cosmos/mint/v1beta1/mint.ts +1 -1
- package/cosmos.nft.v1beta1/rest.ts +22 -18
- package/cosmos.nft.v1beta1/types/cosmos/nft/v1beta1/event.ts +0 -10
- package/cosmos.nft.v1beta1/types/cosmos/nft/v1beta1/genesis.ts +0 -1
- package/cosmos.nft.v1beta1/types/cosmos/nft/v1beta1/query.ts +0 -20
- package/cosmos.slashing.v1beta1/rest.ts +0 -8
- package/cosmos.slashing.v1beta1/types/cosmos/slashing/v1beta1/genesis.ts +1 -1
- package/cosmos.slashing.v1beta1/types/cosmos/slashing/v1beta1/tx.js +0 -94
- package/cosmos.slashing.v1beta1/types/cosmos/slashing/v1beta1/tx.ts +0 -139
- package/cosmos.staking.v1beta1/module.js +39 -41
- package/cosmos.staking.v1beta1/module.ts +59 -61
- package/cosmos.staking.v1beta1/registry.js +6 -6
- package/cosmos.staking.v1beta1/registry.ts +6 -6
- package/cosmos.staking.v1beta1/rest.js +7 -7
- package/cosmos.staking.v1beta1/rest.ts +8 -49
- package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/genesis.ts +1 -1
- package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/query.ts +5 -36
- package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/staking.js +2 -180
- package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/staking.ts +3 -206
- package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/tx.js +1 -94
- package/cosmos.staking.v1beta1/types/cosmos/staking/v1beta1/tx.ts +1 -138
- package/cosmos.staking.v1beta1/types.js +1 -2
- package/cosmos.staking.v1beta1/types.ts +0 -2
- package/cosmos.tx.v1beta1/rest.js +2 -66
- package/cosmos.tx.v1beta1/rest.ts +16 -177
- package/cosmos.tx.v1beta1/types/cosmos/tx/v1beta1/service.js +2 -360
- package/cosmos.tx.v1beta1/types/cosmos/tx/v1beta1/service.ts +2 -524
- package/cosmos.tx.v1beta1/types/tendermint/abci/types.js +266 -592
- package/cosmos.tx.v1beta1/types/tendermint/abci/types.ts +332 -703
- package/cosmos.tx.v1beta1/types/tendermint/types/params.js +17 -8
- package/cosmos.tx.v1beta1/types/tendermint/types/params.ts +25 -9
- package/cosmos.upgrade.v1beta1/rest.ts +1 -0
- package/cosmos.upgrade.v1beta1/types/cosmos/upgrade/v1beta1/tx.ts +3 -3
- package/cosmos.upgrade.v1beta1/types/cosmos/upgrade/v1beta1/upgrade.ts +4 -6
- package/cosmos.vesting.v1beta1/types/cosmos/auth/v1beta1/auth.js +0 -84
- package/cosmos.vesting.v1beta1/types/cosmos/auth/v1beta1/auth.ts +0 -104
- package/ibc.applications.interchain_accounts.controller.v1/rest.ts +0 -1
- package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/controller/v1/tx.js +2 -13
- package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/controller/v1/tx.ts +4 -16
- package/ibc.applications.transfer.v1/module.js +27 -5
- package/ibc.applications.transfer.v1/module.ts +34 -5
- package/ibc.applications.transfer.v1/registry.js +4 -1
- package/ibc.applications.transfer.v1/registry.ts +2 -0
- package/ibc.applications.transfer.v1/rest.js +1 -15
- package/ibc.applications.transfer.v1/rest.ts +1 -30
- package/ibc.applications.transfer.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +4 -6
- package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/genesis.js +1 -16
- package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/genesis.ts +2 -23
- package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/query.js +0 -91
- package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/query.ts +0 -120
- package/ibc.applications.transfer.v1/types/ibc/core/client/v1/client.ts +1 -5
- package/ibc.applications.transfer.v1/types.js +1 -3
- package/ibc.applications.transfer.v1/types.ts +0 -4
- package/ibc.core.channel.v1/rest.ts +0 -1
- package/ibc.core.channel.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +4 -6
- package/ibc.core.channel.v1/types/ibc/core/channel/v1/tx.js +2 -13
- package/ibc.core.channel.v1/types/ibc/core/channel/v1/tx.ts +2 -14
- package/ibc.core.channel.v1/types/ibc/core/client/v1/client.ts +1 -5
- package/ibc.core.client.v1/rest.ts +1 -5
- package/ibc.core.client.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +4 -6
- package/ibc.core.client.v1/types/ibc/core/client/v1/client.ts +1 -5
- package/ibc.core.client.v1/types/ibc/core/client/v1/tx.js +8 -9
- package/ibc.core.client.v1/types/ibc/core/client/v1/tx.ts +14 -28
- package/ibc.core.connection.v1/types/cosmos/upgrade/v1beta1/upgrade.ts +4 -6
- package/ibc.core.connection.v1/types/ibc/core/client/v1/client.ts +1 -5
- package/ibc.core.connection.v1/types/ibc/core/commitment/v1/commitment.js +1 -1
- package/ibc.core.connection.v1/types/ibc/core/commitment/v1/commitment.ts +1 -1
- package/ibc.core.connection.v1/types/ibc/core/connection/v1/tx.js +0 -26
- package/ibc.core.connection.v1/types/ibc/core/connection/v1/tx.ts +0 -34
- package/ibc.core.connection.v1/types/proofs.js +1126 -0
- package/ibc.core.connection.v1/types/proofs.ts +1408 -0
- package/index.js +3 -3
- package/index.ts +3 -3
- package/package.json +5 -5
|
@@ -0,0 +1,417 @@
|
|
|
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 VotingResults {
|
|
8
|
+
totalVotes: number;
|
|
9
|
+
totalFairEnoughVotes: number;
|
|
10
|
+
totalOverpoweredVotes: number;
|
|
11
|
+
totalUnderpoweredVotes: number;
|
|
12
|
+
totalInappropriateVotes: number;
|
|
13
|
+
cardResults: VotingResult[];
|
|
14
|
+
notes: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface VotingResult {
|
|
18
|
+
cardId: number;
|
|
19
|
+
fairEnoughVotes: number;
|
|
20
|
+
overpoweredVotes: number;
|
|
21
|
+
underpoweredVotes: number;
|
|
22
|
+
inappropriateVotes: number;
|
|
23
|
+
result: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface SingleVote {
|
|
27
|
+
cardId: number;
|
|
28
|
+
voteType: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface VoteRight {
|
|
32
|
+
cardId: number;
|
|
33
|
+
expireBlock: number;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function createBaseVotingResults(): VotingResults {
|
|
37
|
+
return {
|
|
38
|
+
totalVotes: 0,
|
|
39
|
+
totalFairEnoughVotes: 0,
|
|
40
|
+
totalOverpoweredVotes: 0,
|
|
41
|
+
totalUnderpoweredVotes: 0,
|
|
42
|
+
totalInappropriateVotes: 0,
|
|
43
|
+
cardResults: [],
|
|
44
|
+
notes: "",
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export const VotingResults = {
|
|
49
|
+
encode(message: VotingResults, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
50
|
+
if (message.totalVotes !== 0) {
|
|
51
|
+
writer.uint32(8).uint64(message.totalVotes);
|
|
52
|
+
}
|
|
53
|
+
if (message.totalFairEnoughVotes !== 0) {
|
|
54
|
+
writer.uint32(16).uint64(message.totalFairEnoughVotes);
|
|
55
|
+
}
|
|
56
|
+
if (message.totalOverpoweredVotes !== 0) {
|
|
57
|
+
writer.uint32(24).uint64(message.totalOverpoweredVotes);
|
|
58
|
+
}
|
|
59
|
+
if (message.totalUnderpoweredVotes !== 0) {
|
|
60
|
+
writer.uint32(32).uint64(message.totalUnderpoweredVotes);
|
|
61
|
+
}
|
|
62
|
+
if (message.totalInappropriateVotes !== 0) {
|
|
63
|
+
writer.uint32(40).uint64(message.totalInappropriateVotes);
|
|
64
|
+
}
|
|
65
|
+
for (const v of message.cardResults) {
|
|
66
|
+
VotingResult.encode(v!, writer.uint32(50).fork()).ldelim();
|
|
67
|
+
}
|
|
68
|
+
if (message.notes !== "") {
|
|
69
|
+
writer.uint32(58).string(message.notes);
|
|
70
|
+
}
|
|
71
|
+
return writer;
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): VotingResults {
|
|
75
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
76
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
77
|
+
const message = createBaseVotingResults();
|
|
78
|
+
while (reader.pos < end) {
|
|
79
|
+
const tag = reader.uint32();
|
|
80
|
+
switch (tag >>> 3) {
|
|
81
|
+
case 1:
|
|
82
|
+
message.totalVotes = longToNumber(reader.uint64() as Long);
|
|
83
|
+
break;
|
|
84
|
+
case 2:
|
|
85
|
+
message.totalFairEnoughVotes = longToNumber(reader.uint64() as Long);
|
|
86
|
+
break;
|
|
87
|
+
case 3:
|
|
88
|
+
message.totalOverpoweredVotes = longToNumber(reader.uint64() as Long);
|
|
89
|
+
break;
|
|
90
|
+
case 4:
|
|
91
|
+
message.totalUnderpoweredVotes = longToNumber(reader.uint64() as Long);
|
|
92
|
+
break;
|
|
93
|
+
case 5:
|
|
94
|
+
message.totalInappropriateVotes = longToNumber(reader.uint64() as Long);
|
|
95
|
+
break;
|
|
96
|
+
case 6:
|
|
97
|
+
message.cardResults.push(VotingResult.decode(reader, reader.uint32()));
|
|
98
|
+
break;
|
|
99
|
+
case 7:
|
|
100
|
+
message.notes = reader.string();
|
|
101
|
+
break;
|
|
102
|
+
default:
|
|
103
|
+
reader.skipType(tag & 7);
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return message;
|
|
108
|
+
},
|
|
109
|
+
|
|
110
|
+
fromJSON(object: any): VotingResults {
|
|
111
|
+
return {
|
|
112
|
+
totalVotes: isSet(object.totalVotes) ? Number(object.totalVotes) : 0,
|
|
113
|
+
totalFairEnoughVotes: isSet(object.totalFairEnoughVotes) ? Number(object.totalFairEnoughVotes) : 0,
|
|
114
|
+
totalOverpoweredVotes: isSet(object.totalOverpoweredVotes) ? Number(object.totalOverpoweredVotes) : 0,
|
|
115
|
+
totalUnderpoweredVotes: isSet(object.totalUnderpoweredVotes) ? Number(object.totalUnderpoweredVotes) : 0,
|
|
116
|
+
totalInappropriateVotes: isSet(object.totalInappropriateVotes) ? Number(object.totalInappropriateVotes) : 0,
|
|
117
|
+
cardResults: Array.isArray(object?.cardResults)
|
|
118
|
+
? object.cardResults.map((e: any) => VotingResult.fromJSON(e))
|
|
119
|
+
: [],
|
|
120
|
+
notes: isSet(object.notes) ? String(object.notes) : "",
|
|
121
|
+
};
|
|
122
|
+
},
|
|
123
|
+
|
|
124
|
+
toJSON(message: VotingResults): unknown {
|
|
125
|
+
const obj: any = {};
|
|
126
|
+
message.totalVotes !== undefined && (obj.totalVotes = Math.round(message.totalVotes));
|
|
127
|
+
message.totalFairEnoughVotes !== undefined && (obj.totalFairEnoughVotes = Math.round(message.totalFairEnoughVotes));
|
|
128
|
+
message.totalOverpoweredVotes !== undefined
|
|
129
|
+
&& (obj.totalOverpoweredVotes = Math.round(message.totalOverpoweredVotes));
|
|
130
|
+
message.totalUnderpoweredVotes !== undefined
|
|
131
|
+
&& (obj.totalUnderpoweredVotes = Math.round(message.totalUnderpoweredVotes));
|
|
132
|
+
message.totalInappropriateVotes !== undefined
|
|
133
|
+
&& (obj.totalInappropriateVotes = Math.round(message.totalInappropriateVotes));
|
|
134
|
+
if (message.cardResults) {
|
|
135
|
+
obj.cardResults = message.cardResults.map((e) => e ? VotingResult.toJSON(e) : undefined);
|
|
136
|
+
} else {
|
|
137
|
+
obj.cardResults = [];
|
|
138
|
+
}
|
|
139
|
+
message.notes !== undefined && (obj.notes = message.notes);
|
|
140
|
+
return obj;
|
|
141
|
+
},
|
|
142
|
+
|
|
143
|
+
fromPartial<I extends Exact<DeepPartial<VotingResults>, I>>(object: I): VotingResults {
|
|
144
|
+
const message = createBaseVotingResults();
|
|
145
|
+
message.totalVotes = object.totalVotes ?? 0;
|
|
146
|
+
message.totalFairEnoughVotes = object.totalFairEnoughVotes ?? 0;
|
|
147
|
+
message.totalOverpoweredVotes = object.totalOverpoweredVotes ?? 0;
|
|
148
|
+
message.totalUnderpoweredVotes = object.totalUnderpoweredVotes ?? 0;
|
|
149
|
+
message.totalInappropriateVotes = object.totalInappropriateVotes ?? 0;
|
|
150
|
+
message.cardResults = object.cardResults?.map((e) => VotingResult.fromPartial(e)) || [];
|
|
151
|
+
message.notes = object.notes ?? "";
|
|
152
|
+
return message;
|
|
153
|
+
},
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
function createBaseVotingResult(): VotingResult {
|
|
157
|
+
return {
|
|
158
|
+
cardId: 0,
|
|
159
|
+
fairEnoughVotes: 0,
|
|
160
|
+
overpoweredVotes: 0,
|
|
161
|
+
underpoweredVotes: 0,
|
|
162
|
+
inappropriateVotes: 0,
|
|
163
|
+
result: "",
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export const VotingResult = {
|
|
168
|
+
encode(message: VotingResult, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
169
|
+
if (message.cardId !== 0) {
|
|
170
|
+
writer.uint32(8).uint64(message.cardId);
|
|
171
|
+
}
|
|
172
|
+
if (message.fairEnoughVotes !== 0) {
|
|
173
|
+
writer.uint32(16).uint64(message.fairEnoughVotes);
|
|
174
|
+
}
|
|
175
|
+
if (message.overpoweredVotes !== 0) {
|
|
176
|
+
writer.uint32(24).uint64(message.overpoweredVotes);
|
|
177
|
+
}
|
|
178
|
+
if (message.underpoweredVotes !== 0) {
|
|
179
|
+
writer.uint32(32).uint64(message.underpoweredVotes);
|
|
180
|
+
}
|
|
181
|
+
if (message.inappropriateVotes !== 0) {
|
|
182
|
+
writer.uint32(40).uint64(message.inappropriateVotes);
|
|
183
|
+
}
|
|
184
|
+
if (message.result !== "") {
|
|
185
|
+
writer.uint32(50).string(message.result);
|
|
186
|
+
}
|
|
187
|
+
return writer;
|
|
188
|
+
},
|
|
189
|
+
|
|
190
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): VotingResult {
|
|
191
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
192
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
193
|
+
const message = createBaseVotingResult();
|
|
194
|
+
while (reader.pos < end) {
|
|
195
|
+
const tag = reader.uint32();
|
|
196
|
+
switch (tag >>> 3) {
|
|
197
|
+
case 1:
|
|
198
|
+
message.cardId = longToNumber(reader.uint64() as Long);
|
|
199
|
+
break;
|
|
200
|
+
case 2:
|
|
201
|
+
message.fairEnoughVotes = longToNumber(reader.uint64() as Long);
|
|
202
|
+
break;
|
|
203
|
+
case 3:
|
|
204
|
+
message.overpoweredVotes = longToNumber(reader.uint64() as Long);
|
|
205
|
+
break;
|
|
206
|
+
case 4:
|
|
207
|
+
message.underpoweredVotes = longToNumber(reader.uint64() as Long);
|
|
208
|
+
break;
|
|
209
|
+
case 5:
|
|
210
|
+
message.inappropriateVotes = longToNumber(reader.uint64() as Long);
|
|
211
|
+
break;
|
|
212
|
+
case 6:
|
|
213
|
+
message.result = reader.string();
|
|
214
|
+
break;
|
|
215
|
+
default:
|
|
216
|
+
reader.skipType(tag & 7);
|
|
217
|
+
break;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
return message;
|
|
221
|
+
},
|
|
222
|
+
|
|
223
|
+
fromJSON(object: any): VotingResult {
|
|
224
|
+
return {
|
|
225
|
+
cardId: isSet(object.cardId) ? Number(object.cardId) : 0,
|
|
226
|
+
fairEnoughVotes: isSet(object.fairEnoughVotes) ? Number(object.fairEnoughVotes) : 0,
|
|
227
|
+
overpoweredVotes: isSet(object.overpoweredVotes) ? Number(object.overpoweredVotes) : 0,
|
|
228
|
+
underpoweredVotes: isSet(object.underpoweredVotes) ? Number(object.underpoweredVotes) : 0,
|
|
229
|
+
inappropriateVotes: isSet(object.inappropriateVotes) ? Number(object.inappropriateVotes) : 0,
|
|
230
|
+
result: isSet(object.result) ? String(object.result) : "",
|
|
231
|
+
};
|
|
232
|
+
},
|
|
233
|
+
|
|
234
|
+
toJSON(message: VotingResult): unknown {
|
|
235
|
+
const obj: any = {};
|
|
236
|
+
message.cardId !== undefined && (obj.cardId = Math.round(message.cardId));
|
|
237
|
+
message.fairEnoughVotes !== undefined && (obj.fairEnoughVotes = Math.round(message.fairEnoughVotes));
|
|
238
|
+
message.overpoweredVotes !== undefined && (obj.overpoweredVotes = Math.round(message.overpoweredVotes));
|
|
239
|
+
message.underpoweredVotes !== undefined && (obj.underpoweredVotes = Math.round(message.underpoweredVotes));
|
|
240
|
+
message.inappropriateVotes !== undefined && (obj.inappropriateVotes = Math.round(message.inappropriateVotes));
|
|
241
|
+
message.result !== undefined && (obj.result = message.result);
|
|
242
|
+
return obj;
|
|
243
|
+
},
|
|
244
|
+
|
|
245
|
+
fromPartial<I extends Exact<DeepPartial<VotingResult>, I>>(object: I): VotingResult {
|
|
246
|
+
const message = createBaseVotingResult();
|
|
247
|
+
message.cardId = object.cardId ?? 0;
|
|
248
|
+
message.fairEnoughVotes = object.fairEnoughVotes ?? 0;
|
|
249
|
+
message.overpoweredVotes = object.overpoweredVotes ?? 0;
|
|
250
|
+
message.underpoweredVotes = object.underpoweredVotes ?? 0;
|
|
251
|
+
message.inappropriateVotes = object.inappropriateVotes ?? 0;
|
|
252
|
+
message.result = object.result ?? "";
|
|
253
|
+
return message;
|
|
254
|
+
},
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
function createBaseSingleVote(): SingleVote {
|
|
258
|
+
return { cardId: 0, voteType: "" };
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export const SingleVote = {
|
|
262
|
+
encode(message: SingleVote, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
263
|
+
if (message.cardId !== 0) {
|
|
264
|
+
writer.uint32(8).uint64(message.cardId);
|
|
265
|
+
}
|
|
266
|
+
if (message.voteType !== "") {
|
|
267
|
+
writer.uint32(18).string(message.voteType);
|
|
268
|
+
}
|
|
269
|
+
return writer;
|
|
270
|
+
},
|
|
271
|
+
|
|
272
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): SingleVote {
|
|
273
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
274
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
275
|
+
const message = createBaseSingleVote();
|
|
276
|
+
while (reader.pos < end) {
|
|
277
|
+
const tag = reader.uint32();
|
|
278
|
+
switch (tag >>> 3) {
|
|
279
|
+
case 1:
|
|
280
|
+
message.cardId = longToNumber(reader.uint64() as Long);
|
|
281
|
+
break;
|
|
282
|
+
case 2:
|
|
283
|
+
message.voteType = reader.string();
|
|
284
|
+
break;
|
|
285
|
+
default:
|
|
286
|
+
reader.skipType(tag & 7);
|
|
287
|
+
break;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
return message;
|
|
291
|
+
},
|
|
292
|
+
|
|
293
|
+
fromJSON(object: any): SingleVote {
|
|
294
|
+
return {
|
|
295
|
+
cardId: isSet(object.cardId) ? Number(object.cardId) : 0,
|
|
296
|
+
voteType: isSet(object.voteType) ? String(object.voteType) : "",
|
|
297
|
+
};
|
|
298
|
+
},
|
|
299
|
+
|
|
300
|
+
toJSON(message: SingleVote): unknown {
|
|
301
|
+
const obj: any = {};
|
|
302
|
+
message.cardId !== undefined && (obj.cardId = Math.round(message.cardId));
|
|
303
|
+
message.voteType !== undefined && (obj.voteType = message.voteType);
|
|
304
|
+
return obj;
|
|
305
|
+
},
|
|
306
|
+
|
|
307
|
+
fromPartial<I extends Exact<DeepPartial<SingleVote>, I>>(object: I): SingleVote {
|
|
308
|
+
const message = createBaseSingleVote();
|
|
309
|
+
message.cardId = object.cardId ?? 0;
|
|
310
|
+
message.voteType = object.voteType ?? "";
|
|
311
|
+
return message;
|
|
312
|
+
},
|
|
313
|
+
};
|
|
314
|
+
|
|
315
|
+
function createBaseVoteRight(): VoteRight {
|
|
316
|
+
return { cardId: 0, expireBlock: 0 };
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export const VoteRight = {
|
|
320
|
+
encode(message: VoteRight, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
321
|
+
if (message.cardId !== 0) {
|
|
322
|
+
writer.uint32(8).uint64(message.cardId);
|
|
323
|
+
}
|
|
324
|
+
if (message.expireBlock !== 0) {
|
|
325
|
+
writer.uint32(16).int64(message.expireBlock);
|
|
326
|
+
}
|
|
327
|
+
return writer;
|
|
328
|
+
},
|
|
329
|
+
|
|
330
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): VoteRight {
|
|
331
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
332
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
333
|
+
const message = createBaseVoteRight();
|
|
334
|
+
while (reader.pos < end) {
|
|
335
|
+
const tag = reader.uint32();
|
|
336
|
+
switch (tag >>> 3) {
|
|
337
|
+
case 1:
|
|
338
|
+
message.cardId = longToNumber(reader.uint64() as Long);
|
|
339
|
+
break;
|
|
340
|
+
case 2:
|
|
341
|
+
message.expireBlock = longToNumber(reader.int64() as Long);
|
|
342
|
+
break;
|
|
343
|
+
default:
|
|
344
|
+
reader.skipType(tag & 7);
|
|
345
|
+
break;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
return message;
|
|
349
|
+
},
|
|
350
|
+
|
|
351
|
+
fromJSON(object: any): VoteRight {
|
|
352
|
+
return {
|
|
353
|
+
cardId: isSet(object.cardId) ? Number(object.cardId) : 0,
|
|
354
|
+
expireBlock: isSet(object.expireBlock) ? Number(object.expireBlock) : 0,
|
|
355
|
+
};
|
|
356
|
+
},
|
|
357
|
+
|
|
358
|
+
toJSON(message: VoteRight): unknown {
|
|
359
|
+
const obj: any = {};
|
|
360
|
+
message.cardId !== undefined && (obj.cardId = Math.round(message.cardId));
|
|
361
|
+
message.expireBlock !== undefined && (obj.expireBlock = Math.round(message.expireBlock));
|
|
362
|
+
return obj;
|
|
363
|
+
},
|
|
364
|
+
|
|
365
|
+
fromPartial<I extends Exact<DeepPartial<VoteRight>, I>>(object: I): VoteRight {
|
|
366
|
+
const message = createBaseVoteRight();
|
|
367
|
+
message.cardId = object.cardId ?? 0;
|
|
368
|
+
message.expireBlock = object.expireBlock ?? 0;
|
|
369
|
+
return message;
|
|
370
|
+
},
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
declare var self: any | undefined;
|
|
374
|
+
declare var window: any | undefined;
|
|
375
|
+
declare var global: any | undefined;
|
|
376
|
+
var globalThis: any = (() => {
|
|
377
|
+
if (typeof globalThis !== "undefined") {
|
|
378
|
+
return globalThis;
|
|
379
|
+
}
|
|
380
|
+
if (typeof self !== "undefined") {
|
|
381
|
+
return self;
|
|
382
|
+
}
|
|
383
|
+
if (typeof window !== "undefined") {
|
|
384
|
+
return window;
|
|
385
|
+
}
|
|
386
|
+
if (typeof global !== "undefined") {
|
|
387
|
+
return global;
|
|
388
|
+
}
|
|
389
|
+
throw "Unable to locate global object";
|
|
390
|
+
})();
|
|
391
|
+
|
|
392
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
393
|
+
|
|
394
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
395
|
+
: T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
396
|
+
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
397
|
+
: Partial<T>;
|
|
398
|
+
|
|
399
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
400
|
+
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
401
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
402
|
+
|
|
403
|
+
function longToNumber(long: Long): number {
|
|
404
|
+
if (long.gt(Number.MAX_SAFE_INTEGER)) {
|
|
405
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
406
|
+
}
|
|
407
|
+
return long.toNumber();
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
if (_m0.util.Long !== Long) {
|
|
411
|
+
_m0.util.Long = Long as any;
|
|
412
|
+
_m0.configure();
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
function isSet(value: any): boolean {
|
|
416
|
+
return value !== null && value !== undefined;
|
|
417
|
+
}
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
import { Card } from "./types/
|
|
2
|
-
import { TimeStamp } from "./types/
|
|
3
|
-
import { CopyrightProposal } from "./types/
|
|
4
|
-
import { WrapClearResponse } from "./types/
|
|
5
|
-
import { WrapHashResponse } from "./types/
|
|
6
|
-
import { Image } from "./types/
|
|
7
|
-
import { MatchPlayer } from "./types/
|
|
8
|
-
import { MatchReporterProposal } from "./types/
|
|
9
|
-
import { Num } from "./types/
|
|
10
|
-
import { Params } from "./types/
|
|
11
|
-
import { IgnoreMatches } from "./types/
|
|
12
|
-
import { IgnoreSellOffers } from "./types/
|
|
13
|
-
import { QueryQServerResponse } from "./types/
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
|
|
1
|
+
import { Card } from "./types/cardchain/cardchain/card";
|
|
2
|
+
import { TimeStamp } from "./types/cardchain/cardchain/card";
|
|
3
|
+
import { CopyrightProposal } from "./types/cardchain/cardchain/copyright_proposal";
|
|
4
|
+
import { WrapClearResponse } from "./types/cardchain/cardchain/council";
|
|
5
|
+
import { WrapHashResponse } from "./types/cardchain/cardchain/council";
|
|
6
|
+
import { Image } from "./types/cardchain/cardchain/image";
|
|
7
|
+
import { MatchPlayer } from "./types/cardchain/cardchain/match";
|
|
8
|
+
import { MatchReporterProposal } from "./types/cardchain/cardchain/match_reporter_proposal";
|
|
9
|
+
import { Num } from "./types/cardchain/cardchain/num";
|
|
10
|
+
import { Params } from "./types/cardchain/cardchain/params";
|
|
11
|
+
import { IgnoreMatches } from "./types/cardchain/cardchain/query";
|
|
12
|
+
import { IgnoreSellOffers } from "./types/cardchain/cardchain/query";
|
|
13
|
+
import { QueryQServerResponse } from "./types/cardchain/cardchain/query";
|
|
14
|
+
import { IgnoreCouncils } from "./types/cardchain/cardchain/query";
|
|
15
|
+
import { RunningAverage } from "./types/cardchain/cardchain/running_average";
|
|
16
|
+
import { Set } from "./types/cardchain/cardchain/set";
|
|
17
|
+
import { SetProposal } from "./types/cardchain/cardchain/set_proposal";
|
|
18
|
+
import { CouncilParticipation } from "./types/cardchain/cardchain/user";
|
|
19
|
+
import { BoosterPack } from "./types/cardchain/cardchain/user";
|
|
20
|
+
import { AirDrops } from "./types/cardchain/cardchain/user";
|
|
21
|
+
import { VotingResults } from "./types/cardchain/cardchain/voting";
|
|
22
|
+
import { VotingResult } from "./types/cardchain/cardchain/voting";
|
|
23
|
+
import { SingleVote } from "./types/cardchain/cardchain/voting";
|
|
24
|
+
import { VoteRight } from "./types/cardchain/cardchain/voting";
|
|
25
|
+
export { Card, TimeStamp, CopyrightProposal, WrapClearResponse, WrapHashResponse, Image, MatchPlayer, MatchReporterProposal, Num, Params, IgnoreMatches, IgnoreSellOffers, QueryQServerResponse, IgnoreCouncils, RunningAverage, Set, SetProposal, CouncilParticipation, BoosterPack, AirDrops, VotingResults, VotingResult, SingleVote, VoteRight, };
|
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
import { Card } from "./types/
|
|
2
|
-
import { TimeStamp } from "./types/
|
|
3
|
-
import { CopyrightProposal } from "./types/
|
|
4
|
-
import { WrapClearResponse } from "./types/
|
|
5
|
-
import { WrapHashResponse } from "./types/
|
|
6
|
-
import { Image } from "./types/
|
|
7
|
-
import { MatchPlayer } from "./types/
|
|
8
|
-
import { MatchReporterProposal } from "./types/
|
|
9
|
-
import { Num } from "./types/
|
|
10
|
-
import { Params } from "./types/
|
|
11
|
-
import { IgnoreMatches } from "./types/
|
|
12
|
-
import { IgnoreSellOffers } from "./types/
|
|
13
|
-
import { QueryQServerResponse } from "./types/
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
1
|
+
import { Card } from "./types/cardchain/cardchain/card"
|
|
2
|
+
import { TimeStamp } from "./types/cardchain/cardchain/card"
|
|
3
|
+
import { CopyrightProposal } from "./types/cardchain/cardchain/copyright_proposal"
|
|
4
|
+
import { WrapClearResponse } from "./types/cardchain/cardchain/council"
|
|
5
|
+
import { WrapHashResponse } from "./types/cardchain/cardchain/council"
|
|
6
|
+
import { Image } from "./types/cardchain/cardchain/image"
|
|
7
|
+
import { MatchPlayer } from "./types/cardchain/cardchain/match"
|
|
8
|
+
import { MatchReporterProposal } from "./types/cardchain/cardchain/match_reporter_proposal"
|
|
9
|
+
import { Num } from "./types/cardchain/cardchain/num"
|
|
10
|
+
import { Params } from "./types/cardchain/cardchain/params"
|
|
11
|
+
import { IgnoreMatches } from "./types/cardchain/cardchain/query"
|
|
12
|
+
import { IgnoreSellOffers } from "./types/cardchain/cardchain/query"
|
|
13
|
+
import { QueryQServerResponse } from "./types/cardchain/cardchain/query"
|
|
14
|
+
import { IgnoreCouncils } from "./types/cardchain/cardchain/query"
|
|
15
|
+
import { RunningAverage } from "./types/cardchain/cardchain/running_average"
|
|
16
|
+
import { Set } from "./types/cardchain/cardchain/set"
|
|
17
|
+
import { SetProposal } from "./types/cardchain/cardchain/set_proposal"
|
|
18
|
+
import { CouncilParticipation } from "./types/cardchain/cardchain/user"
|
|
19
|
+
import { BoosterPack } from "./types/cardchain/cardchain/user"
|
|
20
|
+
import { AirDrops } from "./types/cardchain/cardchain/user"
|
|
21
|
+
import { VotingResults } from "./types/cardchain/cardchain/voting"
|
|
22
|
+
import { VotingResult } from "./types/cardchain/cardchain/voting"
|
|
23
|
+
import { SingleVote } from "./types/cardchain/cardchain/voting"
|
|
24
|
+
import { VoteRight } from "./types/cardchain/cardchain/voting"
|
|
23
25
|
|
|
24
26
|
|
|
25
27
|
export {
|
|
@@ -36,9 +38,11 @@ export {
|
|
|
36
38
|
IgnoreMatches,
|
|
37
39
|
IgnoreSellOffers,
|
|
38
40
|
QueryQServerResponse,
|
|
41
|
+
IgnoreCouncils,
|
|
39
42
|
RunningAverage,
|
|
40
43
|
Set,
|
|
41
44
|
SetProposal,
|
|
45
|
+
CouncilParticipation,
|
|
42
46
|
BoosterPack,
|
|
43
47
|
AirDrops,
|
|
44
48
|
VotingResults,
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// Generated by Ignite ignite.com/cli
|
|
2
|
+
import { Registry } from "@cosmjs/proto-signing";
|
|
3
|
+
import { msgTypes } from './registry';
|
|
4
|
+
import { Api } from "./rest";
|
|
5
|
+
import { Flag as typeFlag } from "./types";
|
|
6
|
+
import { Params as typeParams } from "./types";
|
|
7
|
+
import { FlagEnableProposal as typeFlagEnableProposal } from "./types";
|
|
8
|
+
export const registry = new Registry(msgTypes);
|
|
9
|
+
function getStructure(template) {
|
|
10
|
+
const structure = { fields: [] };
|
|
11
|
+
for (let [key, value] of Object.entries(template)) {
|
|
12
|
+
let field = { name: key, type: typeof value };
|
|
13
|
+
structure.fields.push(field);
|
|
14
|
+
}
|
|
15
|
+
return structure;
|
|
16
|
+
}
|
|
17
|
+
const defaultFee = {
|
|
18
|
+
amount: [],
|
|
19
|
+
gas: "200000",
|
|
20
|
+
};
|
|
21
|
+
export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26657", prefix: "cosmos" }) => {
|
|
22
|
+
return {};
|
|
23
|
+
};
|
|
24
|
+
export const queryClient = ({ addr: addr } = { addr: "http://localhost:1317" }) => {
|
|
25
|
+
return new Api({ baseURL: addr });
|
|
26
|
+
};
|
|
27
|
+
class SDKModule {
|
|
28
|
+
constructor(client) {
|
|
29
|
+
this.registry = [];
|
|
30
|
+
this.query = queryClient({ addr: client.env.apiURL });
|
|
31
|
+
this.updateTX(client);
|
|
32
|
+
this.structure = {
|
|
33
|
+
Flag: getStructure(typeFlag.fromPartial({})),
|
|
34
|
+
Params: getStructure(typeParams.fromPartial({})),
|
|
35
|
+
FlagEnableProposal: getStructure(typeFlagEnableProposal.fromPartial({})),
|
|
36
|
+
};
|
|
37
|
+
client.on('signer-changed', (signer) => {
|
|
38
|
+
this.updateTX(client);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
updateTX(client) {
|
|
42
|
+
const methods = txClient({
|
|
43
|
+
signer: client.signer,
|
|
44
|
+
addr: client.env.rpcURL,
|
|
45
|
+
prefix: client.env.prefix ?? "cosmos",
|
|
46
|
+
});
|
|
47
|
+
this.tx = methods;
|
|
48
|
+
for (let m in methods) {
|
|
49
|
+
this.tx[m] = methods[m].bind(this.tx);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
;
|
|
54
|
+
const Module = (test) => {
|
|
55
|
+
return {
|
|
56
|
+
module: {
|
|
57
|
+
DecentralCardGameCardchainFeatureflag: new SDKModule(test)
|
|
58
|
+
},
|
|
59
|
+
registry: msgTypes
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
export default Module;
|