decentralcardgame-cardchain-client-ts 0.0.15 → 0.0.17
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 +1 -1
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
// Generated by Ignite ignite.com/cli
|
|
2
|
+
|
|
3
|
+
import { StdFee } from "@cosmjs/amino";
|
|
4
|
+
import { SigningStargateClient, DeliverTxResponse } from "@cosmjs/stargate";
|
|
5
|
+
import { EncodeObject, GeneratedType, OfflineSigner, Registry } from "@cosmjs/proto-signing";
|
|
6
|
+
import { msgTypes } from './registry';
|
|
7
|
+
import { IgniteClient } from "../client"
|
|
8
|
+
import { MissingWalletError } from "../helpers"
|
|
9
|
+
import { Api } from "./rest";
|
|
10
|
+
|
|
11
|
+
import { Flag as typeFlag} from "./types"
|
|
12
|
+
import { Params as typeParams} from "./types"
|
|
13
|
+
import { FlagEnableProposal as typeFlagEnableProposal} from "./types"
|
|
14
|
+
|
|
15
|
+
export { };
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
export const registry = new Registry(msgTypes);
|
|
20
|
+
|
|
21
|
+
type Field = {
|
|
22
|
+
name: string;
|
|
23
|
+
type: unknown;
|
|
24
|
+
}
|
|
25
|
+
function getStructure(template) {
|
|
26
|
+
const structure: {fields: Field[]} = { fields: [] }
|
|
27
|
+
for (let [key, value] of Object.entries(template)) {
|
|
28
|
+
let field = { name: key, type: typeof value }
|
|
29
|
+
structure.fields.push(field)
|
|
30
|
+
}
|
|
31
|
+
return structure
|
|
32
|
+
}
|
|
33
|
+
const defaultFee = {
|
|
34
|
+
amount: [],
|
|
35
|
+
gas: "200000",
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
interface TxClientOptions {
|
|
39
|
+
addr: string
|
|
40
|
+
prefix: string
|
|
41
|
+
signer?: OfflineSigner
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "http://localhost:26657", prefix: "cosmos" }) => {
|
|
45
|
+
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
interface QueryClientOptions {
|
|
53
|
+
addr: string
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export const queryClient = ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => {
|
|
57
|
+
return new Api({ baseURL: addr });
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
class SDKModule {
|
|
61
|
+
public query: ReturnType<typeof queryClient>;
|
|
62
|
+
public tx: ReturnType<typeof txClient>;
|
|
63
|
+
public structure: Record<string,unknown>;
|
|
64
|
+
public registry: Array<[string, GeneratedType]> = [];
|
|
65
|
+
|
|
66
|
+
constructor(client: IgniteClient) {
|
|
67
|
+
|
|
68
|
+
this.query = queryClient({ addr: client.env.apiURL });
|
|
69
|
+
this.updateTX(client);
|
|
70
|
+
this.structure = {
|
|
71
|
+
Flag: getStructure(typeFlag.fromPartial({})),
|
|
72
|
+
Params: getStructure(typeParams.fromPartial({})),
|
|
73
|
+
FlagEnableProposal: getStructure(typeFlagEnableProposal.fromPartial({})),
|
|
74
|
+
|
|
75
|
+
};
|
|
76
|
+
client.on('signer-changed',(signer) => {
|
|
77
|
+
this.updateTX(client);
|
|
78
|
+
})
|
|
79
|
+
}
|
|
80
|
+
updateTX(client: IgniteClient) {
|
|
81
|
+
const methods = txClient({
|
|
82
|
+
signer: client.signer,
|
|
83
|
+
addr: client.env.rpcURL,
|
|
84
|
+
prefix: client.env.prefix ?? "cosmos",
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
this.tx = methods;
|
|
88
|
+
for (let m in methods) {
|
|
89
|
+
this.tx[m] = methods[m].bind(this.tx);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const Module = (test: IgniteClient) => {
|
|
95
|
+
return {
|
|
96
|
+
module: {
|
|
97
|
+
DecentralCardGameCardchainFeatureflag: new SDKModule(test)
|
|
98
|
+
},
|
|
99
|
+
registry: msgTypes
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
export default Module;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/*
|
|
4
|
+
* ---------------------------------------------------------------
|
|
5
|
+
* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
|
|
6
|
+
* ## ##
|
|
7
|
+
* ## AUTHOR: acacode ##
|
|
8
|
+
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
|
|
9
|
+
* ---------------------------------------------------------------
|
|
10
|
+
*/
|
|
11
|
+
import axios from "axios";
|
|
12
|
+
export var ContentType;
|
|
13
|
+
(function (ContentType) {
|
|
14
|
+
ContentType["Json"] = "application/json";
|
|
15
|
+
ContentType["FormData"] = "multipart/form-data";
|
|
16
|
+
ContentType["UrlEncoded"] = "application/x-www-form-urlencoded";
|
|
17
|
+
})(ContentType || (ContentType = {}));
|
|
18
|
+
export class HttpClient {
|
|
19
|
+
constructor({ securityWorker, secure, format, ...axiosConfig } = {}) {
|
|
20
|
+
this.securityData = null;
|
|
21
|
+
this.setSecurityData = (data) => {
|
|
22
|
+
this.securityData = data;
|
|
23
|
+
};
|
|
24
|
+
this.request = async ({ secure, path, type, query, format, body, ...params }) => {
|
|
25
|
+
const secureParams = ((typeof secure === "boolean" ? secure : this.secure) &&
|
|
26
|
+
this.securityWorker &&
|
|
27
|
+
(await this.securityWorker(this.securityData))) ||
|
|
28
|
+
{};
|
|
29
|
+
const requestParams = this.mergeRequestParams(params, secureParams);
|
|
30
|
+
const responseFormat = (format && this.format) || void 0;
|
|
31
|
+
if (type === ContentType.FormData && body && body !== null && typeof body === "object") {
|
|
32
|
+
requestParams.headers.common = { Accept: "*/*" };
|
|
33
|
+
requestParams.headers.post = {};
|
|
34
|
+
requestParams.headers.put = {};
|
|
35
|
+
body = this.createFormData(body);
|
|
36
|
+
}
|
|
37
|
+
return this.instance.request({
|
|
38
|
+
...requestParams,
|
|
39
|
+
headers: {
|
|
40
|
+
...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}),
|
|
41
|
+
...(requestParams.headers || {}),
|
|
42
|
+
},
|
|
43
|
+
params: query,
|
|
44
|
+
responseType: responseFormat,
|
|
45
|
+
data: body,
|
|
46
|
+
url: path,
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
this.instance = axios.create({ ...axiosConfig, baseURL: axiosConfig.baseURL || "" });
|
|
50
|
+
this.secure = secure;
|
|
51
|
+
this.format = format;
|
|
52
|
+
this.securityWorker = securityWorker;
|
|
53
|
+
}
|
|
54
|
+
mergeRequestParams(params1, params2) {
|
|
55
|
+
return {
|
|
56
|
+
...this.instance.defaults,
|
|
57
|
+
...params1,
|
|
58
|
+
...(params2 || {}),
|
|
59
|
+
headers: {
|
|
60
|
+
...(this.instance.defaults.headers || {}),
|
|
61
|
+
...(params1.headers || {}),
|
|
62
|
+
...((params2 && params2.headers) || {}),
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
createFormData(input) {
|
|
67
|
+
return Object.keys(input || {}).reduce((formData, key) => {
|
|
68
|
+
const property = input[key];
|
|
69
|
+
formData.append(key, property instanceof Blob
|
|
70
|
+
? property
|
|
71
|
+
: typeof property === "object" && property !== null
|
|
72
|
+
? JSON.stringify(property)
|
|
73
|
+
: `${property}`);
|
|
74
|
+
return formData;
|
|
75
|
+
}, new FormData());
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* @title cardchain/featureflag/flag.proto
|
|
80
|
+
* @version version not set
|
|
81
|
+
*/
|
|
82
|
+
export class Api extends HttpClient {
|
|
83
|
+
constructor() {
|
|
84
|
+
super(...arguments);
|
|
85
|
+
/**
|
|
86
|
+
* No description
|
|
87
|
+
*
|
|
88
|
+
* @tags Query
|
|
89
|
+
* @name QueryParams
|
|
90
|
+
* @summary Parameters queries the parameters of the module.
|
|
91
|
+
* @request GET:/DecentralCardGame/Cardchain/featureflag/params
|
|
92
|
+
*/
|
|
93
|
+
this.queryParams = (params = {}) => this.request({
|
|
94
|
+
path: `/DecentralCardGame/Cardchain/featureflag/params`,
|
|
95
|
+
method: "GET",
|
|
96
|
+
format: "json",
|
|
97
|
+
...params,
|
|
98
|
+
});
|
|
99
|
+
/**
|
|
100
|
+
* No description
|
|
101
|
+
*
|
|
102
|
+
* @tags Query
|
|
103
|
+
* @name QueryQFlag
|
|
104
|
+
* @summary Queries a list of QFlag items.
|
|
105
|
+
* @request GET:/DecentralCardGame/Cardchain/featureflag/q_flag/{module}/{name}
|
|
106
|
+
*/
|
|
107
|
+
this.queryQFlag = (module, name, params = {}) => this.request({
|
|
108
|
+
path: `/DecentralCardGame/Cardchain/featureflag/q_flag/${module}/${name}`,
|
|
109
|
+
method: "GET",
|
|
110
|
+
format: "json",
|
|
111
|
+
...params,
|
|
112
|
+
});
|
|
113
|
+
/**
|
|
114
|
+
* No description
|
|
115
|
+
*
|
|
116
|
+
* @tags Query
|
|
117
|
+
* @name QueryQFlags
|
|
118
|
+
* @summary Queries a list of QFlags items.
|
|
119
|
+
* @request GET:/DecentralCardGame/Cardchain/featureflag/q_flags
|
|
120
|
+
*/
|
|
121
|
+
this.queryQFlags = (params = {}) => this.request({
|
|
122
|
+
path: `/DecentralCardGame/Cardchain/featureflag/q_flags`,
|
|
123
|
+
method: "GET",
|
|
124
|
+
format: "json",
|
|
125
|
+
...params,
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/*
|
|
4
|
+
* ---------------------------------------------------------------
|
|
5
|
+
* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
|
|
6
|
+
* ## ##
|
|
7
|
+
* ## AUTHOR: acacode ##
|
|
8
|
+
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
|
|
9
|
+
* ---------------------------------------------------------------
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
export interface FeatureflagFlag {
|
|
13
|
+
Module?: string;
|
|
14
|
+
Name?: string;
|
|
15
|
+
Set?: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Params defines the parameters for the module.
|
|
20
|
+
*/
|
|
21
|
+
export type FeatureflagParams = object;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* QueryParamsResponse is response type for the Query/Params RPC method.
|
|
25
|
+
*/
|
|
26
|
+
export interface FeatureflagQueryParamsResponse {
|
|
27
|
+
/** params holds all the parameters of this module. */
|
|
28
|
+
params?: FeatureflagParams;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface FeatureflagQueryQFlagResponse {
|
|
32
|
+
flag?: FeatureflagFlag;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface FeatureflagQueryQFlagsResponse {
|
|
36
|
+
flags?: FeatureflagFlag[];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface ProtobufAny {
|
|
40
|
+
"@type"?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface RpcStatus {
|
|
44
|
+
/** @format int32 */
|
|
45
|
+
code?: number;
|
|
46
|
+
message?: string;
|
|
47
|
+
details?: ProtobufAny[];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
import axios, { AxiosInstance, AxiosRequestConfig, AxiosResponse, ResponseType } from "axios";
|
|
51
|
+
|
|
52
|
+
export type QueryParamsType = Record<string | number, any>;
|
|
53
|
+
|
|
54
|
+
export interface FullRequestParams extends Omit<AxiosRequestConfig, "data" | "params" | "url" | "responseType"> {
|
|
55
|
+
/** set parameter to `true` for call `securityWorker` for this request */
|
|
56
|
+
secure?: boolean;
|
|
57
|
+
/** request path */
|
|
58
|
+
path: string;
|
|
59
|
+
/** content type of request body */
|
|
60
|
+
type?: ContentType;
|
|
61
|
+
/** query params */
|
|
62
|
+
query?: QueryParamsType;
|
|
63
|
+
/** format of response (i.e. response.json() -> format: "json") */
|
|
64
|
+
format?: ResponseType;
|
|
65
|
+
/** request body */
|
|
66
|
+
body?: unknown;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export type RequestParams = Omit<FullRequestParams, "body" | "method" | "query" | "path">;
|
|
70
|
+
|
|
71
|
+
export interface ApiConfig<SecurityDataType = unknown> extends Omit<AxiosRequestConfig, "data" | "cancelToken"> {
|
|
72
|
+
securityWorker?: (
|
|
73
|
+
securityData: SecurityDataType | null,
|
|
74
|
+
) => Promise<AxiosRequestConfig | void> | AxiosRequestConfig | void;
|
|
75
|
+
secure?: boolean;
|
|
76
|
+
format?: ResponseType;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export enum ContentType {
|
|
80
|
+
Json = "application/json",
|
|
81
|
+
FormData = "multipart/form-data",
|
|
82
|
+
UrlEncoded = "application/x-www-form-urlencoded",
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export class HttpClient<SecurityDataType = unknown> {
|
|
86
|
+
public instance: AxiosInstance;
|
|
87
|
+
private securityData: SecurityDataType | null = null;
|
|
88
|
+
private securityWorker?: ApiConfig<SecurityDataType>["securityWorker"];
|
|
89
|
+
private secure?: boolean;
|
|
90
|
+
private format?: ResponseType;
|
|
91
|
+
|
|
92
|
+
constructor({ securityWorker, secure, format, ...axiosConfig }: ApiConfig<SecurityDataType> = {}) {
|
|
93
|
+
this.instance = axios.create({ ...axiosConfig, baseURL: axiosConfig.baseURL || "" });
|
|
94
|
+
this.secure = secure;
|
|
95
|
+
this.format = format;
|
|
96
|
+
this.securityWorker = securityWorker;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
public setSecurityData = (data: SecurityDataType | null) => {
|
|
100
|
+
this.securityData = data;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
private mergeRequestParams(params1: AxiosRequestConfig, params2?: AxiosRequestConfig): AxiosRequestConfig {
|
|
104
|
+
return {
|
|
105
|
+
...this.instance.defaults,
|
|
106
|
+
...params1,
|
|
107
|
+
...(params2 || {}),
|
|
108
|
+
headers: {
|
|
109
|
+
...(this.instance.defaults.headers || {}),
|
|
110
|
+
...(params1.headers || {}),
|
|
111
|
+
...((params2 && params2.headers) || {}),
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
private createFormData(input: Record<string, unknown>): FormData {
|
|
117
|
+
return Object.keys(input || {}).reduce((formData, key) => {
|
|
118
|
+
const property = input[key];
|
|
119
|
+
formData.append(
|
|
120
|
+
key,
|
|
121
|
+
property instanceof Blob
|
|
122
|
+
? property
|
|
123
|
+
: typeof property === "object" && property !== null
|
|
124
|
+
? JSON.stringify(property)
|
|
125
|
+
: `${property}`,
|
|
126
|
+
);
|
|
127
|
+
return formData;
|
|
128
|
+
}, new FormData());
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
public request = async <T = any, _E = any>({
|
|
132
|
+
secure,
|
|
133
|
+
path,
|
|
134
|
+
type,
|
|
135
|
+
query,
|
|
136
|
+
format,
|
|
137
|
+
body,
|
|
138
|
+
...params
|
|
139
|
+
}: FullRequestParams): Promise<AxiosResponse<T>> => {
|
|
140
|
+
const secureParams =
|
|
141
|
+
((typeof secure === "boolean" ? secure : this.secure) &&
|
|
142
|
+
this.securityWorker &&
|
|
143
|
+
(await this.securityWorker(this.securityData))) ||
|
|
144
|
+
{};
|
|
145
|
+
const requestParams = this.mergeRequestParams(params, secureParams);
|
|
146
|
+
const responseFormat = (format && this.format) || void 0;
|
|
147
|
+
|
|
148
|
+
if (type === ContentType.FormData && body && body !== null && typeof body === "object") {
|
|
149
|
+
requestParams.headers.common = { Accept: "*/*" };
|
|
150
|
+
requestParams.headers.post = {};
|
|
151
|
+
requestParams.headers.put = {};
|
|
152
|
+
|
|
153
|
+
body = this.createFormData(body as Record<string, unknown>);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
return this.instance.request({
|
|
157
|
+
...requestParams,
|
|
158
|
+
headers: {
|
|
159
|
+
...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}),
|
|
160
|
+
...(requestParams.headers || {}),
|
|
161
|
+
},
|
|
162
|
+
params: query,
|
|
163
|
+
responseType: responseFormat,
|
|
164
|
+
data: body,
|
|
165
|
+
url: path,
|
|
166
|
+
});
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* @title cardchain/featureflag/flag.proto
|
|
172
|
+
* @version version not set
|
|
173
|
+
*/
|
|
174
|
+
export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
|
|
175
|
+
/**
|
|
176
|
+
* No description
|
|
177
|
+
*
|
|
178
|
+
* @tags Query
|
|
179
|
+
* @name QueryParams
|
|
180
|
+
* @summary Parameters queries the parameters of the module.
|
|
181
|
+
* @request GET:/DecentralCardGame/Cardchain/featureflag/params
|
|
182
|
+
*/
|
|
183
|
+
queryParams = (params: RequestParams = {}) =>
|
|
184
|
+
this.request<FeatureflagQueryParamsResponse, RpcStatus>({
|
|
185
|
+
path: `/DecentralCardGame/Cardchain/featureflag/params`,
|
|
186
|
+
method: "GET",
|
|
187
|
+
format: "json",
|
|
188
|
+
...params,
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* No description
|
|
193
|
+
*
|
|
194
|
+
* @tags Query
|
|
195
|
+
* @name QueryQFlag
|
|
196
|
+
* @summary Queries a list of QFlag items.
|
|
197
|
+
* @request GET:/DecentralCardGame/Cardchain/featureflag/q_flag/{module}/{name}
|
|
198
|
+
*/
|
|
199
|
+
queryQFlag = (module: string, name: string, params: RequestParams = {}) =>
|
|
200
|
+
this.request<FeatureflagQueryQFlagResponse, RpcStatus>({
|
|
201
|
+
path: `/DecentralCardGame/Cardchain/featureflag/q_flag/${module}/${name}`,
|
|
202
|
+
method: "GET",
|
|
203
|
+
format: "json",
|
|
204
|
+
...params,
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* No description
|
|
209
|
+
*
|
|
210
|
+
* @tags Query
|
|
211
|
+
* @name QueryQFlags
|
|
212
|
+
* @summary Queries a list of QFlags items.
|
|
213
|
+
* @request GET:/DecentralCardGame/Cardchain/featureflag/q_flags
|
|
214
|
+
*/
|
|
215
|
+
queryQFlags = (params: RequestParams = {}) =>
|
|
216
|
+
this.request<FeatureflagQueryQFlagsResponse, RpcStatus>({
|
|
217
|
+
path: `/DecentralCardGame/Cardchain/featureflag/q_flags`,
|
|
218
|
+
method: "GET",
|
|
219
|
+
format: "json",
|
|
220
|
+
...params,
|
|
221
|
+
});
|
|
222
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import _m0 from "protobufjs/minimal";
|
|
3
|
+
export const protobufPackage = "DecentralCardGame.cardchain.featureflag";
|
|
4
|
+
function createBaseFlag() {
|
|
5
|
+
return { Module: "", Name: "", Set: false };
|
|
6
|
+
}
|
|
7
|
+
export const Flag = {
|
|
8
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
9
|
+
if (message.Module !== "") {
|
|
10
|
+
writer.uint32(10).string(message.Module);
|
|
11
|
+
}
|
|
12
|
+
if (message.Name !== "") {
|
|
13
|
+
writer.uint32(18).string(message.Name);
|
|
14
|
+
}
|
|
15
|
+
if (message.Set === true) {
|
|
16
|
+
writer.uint32(24).bool(message.Set);
|
|
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 = createBaseFlag();
|
|
24
|
+
while (reader.pos < end) {
|
|
25
|
+
const tag = reader.uint32();
|
|
26
|
+
switch (tag >>> 3) {
|
|
27
|
+
case 1:
|
|
28
|
+
message.Module = reader.string();
|
|
29
|
+
break;
|
|
30
|
+
case 2:
|
|
31
|
+
message.Name = reader.string();
|
|
32
|
+
break;
|
|
33
|
+
case 3:
|
|
34
|
+
message.Set = reader.bool();
|
|
35
|
+
break;
|
|
36
|
+
default:
|
|
37
|
+
reader.skipType(tag & 7);
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return message;
|
|
42
|
+
},
|
|
43
|
+
fromJSON(object) {
|
|
44
|
+
return {
|
|
45
|
+
Module: isSet(object.Module) ? String(object.Module) : "",
|
|
46
|
+
Name: isSet(object.Name) ? String(object.Name) : "",
|
|
47
|
+
Set: isSet(object.Set) ? Boolean(object.Set) : false,
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
toJSON(message) {
|
|
51
|
+
const obj = {};
|
|
52
|
+
message.Module !== undefined && (obj.Module = message.Module);
|
|
53
|
+
message.Name !== undefined && (obj.Name = message.Name);
|
|
54
|
+
message.Set !== undefined && (obj.Set = message.Set);
|
|
55
|
+
return obj;
|
|
56
|
+
},
|
|
57
|
+
fromPartial(object) {
|
|
58
|
+
const message = createBaseFlag();
|
|
59
|
+
message.Module = object.Module ?? "";
|
|
60
|
+
message.Name = object.Name ?? "";
|
|
61
|
+
message.Set = object.Set ?? false;
|
|
62
|
+
return message;
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
function isSet(value) {
|
|
66
|
+
return value !== null && value !== undefined;
|
|
67
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import _m0 from "protobufjs/minimal";
|
|
3
|
+
|
|
4
|
+
export const protobufPackage = "DecentralCardGame.cardchain.featureflag";
|
|
5
|
+
|
|
6
|
+
export interface Flag {
|
|
7
|
+
Module: string;
|
|
8
|
+
Name: string;
|
|
9
|
+
Set: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function createBaseFlag(): Flag {
|
|
13
|
+
return { Module: "", Name: "", Set: false };
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const Flag = {
|
|
17
|
+
encode(message: Flag, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
18
|
+
if (message.Module !== "") {
|
|
19
|
+
writer.uint32(10).string(message.Module);
|
|
20
|
+
}
|
|
21
|
+
if (message.Name !== "") {
|
|
22
|
+
writer.uint32(18).string(message.Name);
|
|
23
|
+
}
|
|
24
|
+
if (message.Set === true) {
|
|
25
|
+
writer.uint32(24).bool(message.Set);
|
|
26
|
+
}
|
|
27
|
+
return writer;
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): Flag {
|
|
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 = createBaseFlag();
|
|
34
|
+
while (reader.pos < end) {
|
|
35
|
+
const tag = reader.uint32();
|
|
36
|
+
switch (tag >>> 3) {
|
|
37
|
+
case 1:
|
|
38
|
+
message.Module = reader.string();
|
|
39
|
+
break;
|
|
40
|
+
case 2:
|
|
41
|
+
message.Name = reader.string();
|
|
42
|
+
break;
|
|
43
|
+
case 3:
|
|
44
|
+
message.Set = reader.bool();
|
|
45
|
+
break;
|
|
46
|
+
default:
|
|
47
|
+
reader.skipType(tag & 7);
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return message;
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
fromJSON(object: any): Flag {
|
|
55
|
+
return {
|
|
56
|
+
Module: isSet(object.Module) ? String(object.Module) : "",
|
|
57
|
+
Name: isSet(object.Name) ? String(object.Name) : "",
|
|
58
|
+
Set: isSet(object.Set) ? Boolean(object.Set) : false,
|
|
59
|
+
};
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
toJSON(message: Flag): unknown {
|
|
63
|
+
const obj: any = {};
|
|
64
|
+
message.Module !== undefined && (obj.Module = message.Module);
|
|
65
|
+
message.Name !== undefined && (obj.Name = message.Name);
|
|
66
|
+
message.Set !== undefined && (obj.Set = message.Set);
|
|
67
|
+
return obj;
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
fromPartial<I extends Exact<DeepPartial<Flag>, I>>(object: I): Flag {
|
|
71
|
+
const message = createBaseFlag();
|
|
72
|
+
message.Module = object.Module ?? "";
|
|
73
|
+
message.Name = object.Name ?? "";
|
|
74
|
+
message.Set = object.Set ?? false;
|
|
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
|
+
}
|