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
|
@@ -3,7 +3,7 @@ import Long from "long";
|
|
|
3
3
|
import _m0 from "protobufjs/minimal";
|
|
4
4
|
import { Any } from "../../../google/protobuf/any";
|
|
5
5
|
import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination";
|
|
6
|
-
import {
|
|
6
|
+
import { Params } from "./auth";
|
|
7
7
|
export const protobufPackage = "cosmos.auth.v1beta1";
|
|
8
8
|
function createBaseQueryAccountsRequest() {
|
|
9
9
|
return { pagination: undefined };
|
|
@@ -673,16 +673,13 @@ export const AddressStringToBytesResponse = {
|
|
|
673
673
|
},
|
|
674
674
|
};
|
|
675
675
|
function createBaseQueryAccountAddressByIDRequest() {
|
|
676
|
-
return { id: 0
|
|
676
|
+
return { id: 0 };
|
|
677
677
|
}
|
|
678
678
|
export const QueryAccountAddressByIDRequest = {
|
|
679
679
|
encode(message, writer = _m0.Writer.create()) {
|
|
680
680
|
if (message.id !== 0) {
|
|
681
681
|
writer.uint32(8).int64(message.id);
|
|
682
682
|
}
|
|
683
|
-
if (message.accountId !== 0) {
|
|
684
|
-
writer.uint32(16).uint64(message.accountId);
|
|
685
|
-
}
|
|
686
683
|
return writer;
|
|
687
684
|
},
|
|
688
685
|
decode(input, length) {
|
|
@@ -695,9 +692,6 @@ export const QueryAccountAddressByIDRequest = {
|
|
|
695
692
|
case 1:
|
|
696
693
|
message.id = longToNumber(reader.int64());
|
|
697
694
|
break;
|
|
698
|
-
case 2:
|
|
699
|
-
message.accountId = longToNumber(reader.uint64());
|
|
700
|
-
break;
|
|
701
695
|
default:
|
|
702
696
|
reader.skipType(tag & 7);
|
|
703
697
|
break;
|
|
@@ -706,21 +700,16 @@ export const QueryAccountAddressByIDRequest = {
|
|
|
706
700
|
return message;
|
|
707
701
|
},
|
|
708
702
|
fromJSON(object) {
|
|
709
|
-
return {
|
|
710
|
-
id: isSet(object.id) ? Number(object.id) : 0,
|
|
711
|
-
accountId: isSet(object.accountId) ? Number(object.accountId) : 0,
|
|
712
|
-
};
|
|
703
|
+
return { id: isSet(object.id) ? Number(object.id) : 0 };
|
|
713
704
|
},
|
|
714
705
|
toJSON(message) {
|
|
715
706
|
const obj = {};
|
|
716
707
|
message.id !== undefined && (obj.id = Math.round(message.id));
|
|
717
|
-
message.accountId !== undefined && (obj.accountId = Math.round(message.accountId));
|
|
718
708
|
return obj;
|
|
719
709
|
},
|
|
720
710
|
fromPartial(object) {
|
|
721
711
|
const message = createBaseQueryAccountAddressByIDRequest();
|
|
722
712
|
message.id = object.id ?? 0;
|
|
723
|
-
message.accountId = object.accountId ?? 0;
|
|
724
713
|
return message;
|
|
725
714
|
},
|
|
726
715
|
};
|
|
@@ -765,90 +754,6 @@ export const QueryAccountAddressByIDResponse = {
|
|
|
765
754
|
return message;
|
|
766
755
|
},
|
|
767
756
|
};
|
|
768
|
-
function createBaseQueryAccountInfoRequest() {
|
|
769
|
-
return { address: "" };
|
|
770
|
-
}
|
|
771
|
-
export const QueryAccountInfoRequest = {
|
|
772
|
-
encode(message, writer = _m0.Writer.create()) {
|
|
773
|
-
if (message.address !== "") {
|
|
774
|
-
writer.uint32(10).string(message.address);
|
|
775
|
-
}
|
|
776
|
-
return writer;
|
|
777
|
-
},
|
|
778
|
-
decode(input, length) {
|
|
779
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
780
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
781
|
-
const message = createBaseQueryAccountInfoRequest();
|
|
782
|
-
while (reader.pos < end) {
|
|
783
|
-
const tag = reader.uint32();
|
|
784
|
-
switch (tag >>> 3) {
|
|
785
|
-
case 1:
|
|
786
|
-
message.address = reader.string();
|
|
787
|
-
break;
|
|
788
|
-
default:
|
|
789
|
-
reader.skipType(tag & 7);
|
|
790
|
-
break;
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
return message;
|
|
794
|
-
},
|
|
795
|
-
fromJSON(object) {
|
|
796
|
-
return { address: isSet(object.address) ? String(object.address) : "" };
|
|
797
|
-
},
|
|
798
|
-
toJSON(message) {
|
|
799
|
-
const obj = {};
|
|
800
|
-
message.address !== undefined && (obj.address = message.address);
|
|
801
|
-
return obj;
|
|
802
|
-
},
|
|
803
|
-
fromPartial(object) {
|
|
804
|
-
const message = createBaseQueryAccountInfoRequest();
|
|
805
|
-
message.address = object.address ?? "";
|
|
806
|
-
return message;
|
|
807
|
-
},
|
|
808
|
-
};
|
|
809
|
-
function createBaseQueryAccountInfoResponse() {
|
|
810
|
-
return { info: undefined };
|
|
811
|
-
}
|
|
812
|
-
export const QueryAccountInfoResponse = {
|
|
813
|
-
encode(message, writer = _m0.Writer.create()) {
|
|
814
|
-
if (message.info !== undefined) {
|
|
815
|
-
BaseAccount.encode(message.info, writer.uint32(10).fork()).ldelim();
|
|
816
|
-
}
|
|
817
|
-
return writer;
|
|
818
|
-
},
|
|
819
|
-
decode(input, length) {
|
|
820
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
821
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
822
|
-
const message = createBaseQueryAccountInfoResponse();
|
|
823
|
-
while (reader.pos < end) {
|
|
824
|
-
const tag = reader.uint32();
|
|
825
|
-
switch (tag >>> 3) {
|
|
826
|
-
case 1:
|
|
827
|
-
message.info = BaseAccount.decode(reader, reader.uint32());
|
|
828
|
-
break;
|
|
829
|
-
default:
|
|
830
|
-
reader.skipType(tag & 7);
|
|
831
|
-
break;
|
|
832
|
-
}
|
|
833
|
-
}
|
|
834
|
-
return message;
|
|
835
|
-
},
|
|
836
|
-
fromJSON(object) {
|
|
837
|
-
return { info: isSet(object.info) ? BaseAccount.fromJSON(object.info) : undefined };
|
|
838
|
-
},
|
|
839
|
-
toJSON(message) {
|
|
840
|
-
const obj = {};
|
|
841
|
-
message.info !== undefined && (obj.info = message.info ? BaseAccount.toJSON(message.info) : undefined);
|
|
842
|
-
return obj;
|
|
843
|
-
},
|
|
844
|
-
fromPartial(object) {
|
|
845
|
-
const message = createBaseQueryAccountInfoResponse();
|
|
846
|
-
message.info = (object.info !== undefined && object.info !== null)
|
|
847
|
-
? BaseAccount.fromPartial(object.info)
|
|
848
|
-
: undefined;
|
|
849
|
-
return message;
|
|
850
|
-
},
|
|
851
|
-
};
|
|
852
757
|
export class QueryClientImpl {
|
|
853
758
|
constructor(rpc) {
|
|
854
759
|
this.rpc = rpc;
|
|
@@ -861,7 +766,6 @@ export class QueryClientImpl {
|
|
|
861
766
|
this.Bech32Prefix = this.Bech32Prefix.bind(this);
|
|
862
767
|
this.AddressBytesToString = this.AddressBytesToString.bind(this);
|
|
863
768
|
this.AddressStringToBytes = this.AddressStringToBytes.bind(this);
|
|
864
|
-
this.AccountInfo = this.AccountInfo.bind(this);
|
|
865
769
|
}
|
|
866
770
|
Accounts(request) {
|
|
867
771
|
const data = QueryAccountsRequest.encode(request).finish();
|
|
@@ -908,11 +812,6 @@ export class QueryClientImpl {
|
|
|
908
812
|
const promise = this.rpc.request("cosmos.auth.v1beta1.Query", "AddressStringToBytes", data);
|
|
909
813
|
return promise.then((data) => AddressStringToBytesResponse.decode(new _m0.Reader(data)));
|
|
910
814
|
}
|
|
911
|
-
AccountInfo(request) {
|
|
912
|
-
const data = QueryAccountInfoRequest.encode(request).finish();
|
|
913
|
-
const promise = this.rpc.request("cosmos.auth.v1beta1.Query", "AccountInfo", data);
|
|
914
|
-
return promise.then((data) => QueryAccountInfoResponse.decode(new _m0.Reader(data)));
|
|
915
|
-
}
|
|
916
815
|
}
|
|
917
816
|
var globalThis = (() => {
|
|
918
817
|
if (typeof globalThis !== "undefined") {
|
|
@@ -3,7 +3,7 @@ import Long from "long";
|
|
|
3
3
|
import _m0 from "protobufjs/minimal";
|
|
4
4
|
import { Any } from "../../../google/protobuf/any";
|
|
5
5
|
import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination";
|
|
6
|
-
import {
|
|
6
|
+
import { Params } from "./auth";
|
|
7
7
|
|
|
8
8
|
export const protobufPackage = "cosmos.auth.v1beta1";
|
|
9
9
|
|
|
@@ -138,21 +138,11 @@ export interface AddressStringToBytesResponse {
|
|
|
138
138
|
*/
|
|
139
139
|
export interface QueryAccountAddressByIDRequest {
|
|
140
140
|
/**
|
|
141
|
-
* Deprecated, use account_id instead
|
|
142
|
-
*
|
|
143
141
|
* id is the account number of the address to be queried. This field
|
|
144
142
|
* should have been an uint64 (like all account numbers), and will be
|
|
145
143
|
* updated to uint64 in a future version of the auth query.
|
|
146
|
-
*
|
|
147
|
-
* @deprecated
|
|
148
144
|
*/
|
|
149
145
|
id: number;
|
|
150
|
-
/**
|
|
151
|
-
* account_id is the account number of the address to be queried.
|
|
152
|
-
*
|
|
153
|
-
* Since: cosmos-sdk 0.47
|
|
154
|
-
*/
|
|
155
|
-
accountId: number;
|
|
156
146
|
}
|
|
157
147
|
|
|
158
148
|
/**
|
|
@@ -164,26 +154,6 @@ export interface QueryAccountAddressByIDResponse {
|
|
|
164
154
|
accountAddress: string;
|
|
165
155
|
}
|
|
166
156
|
|
|
167
|
-
/**
|
|
168
|
-
* QueryAccountInfoRequest is the Query/AccountInfo request type.
|
|
169
|
-
*
|
|
170
|
-
* Since: cosmos-sdk 0.47
|
|
171
|
-
*/
|
|
172
|
-
export interface QueryAccountInfoRequest {
|
|
173
|
-
/** address is the account address string. */
|
|
174
|
-
address: string;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* QueryAccountInfoResponse is the Query/AccountInfo response type.
|
|
179
|
-
*
|
|
180
|
-
* Since: cosmos-sdk 0.47
|
|
181
|
-
*/
|
|
182
|
-
export interface QueryAccountInfoResponse {
|
|
183
|
-
/** info is the account info which is represented by BaseAccount. */
|
|
184
|
-
info: BaseAccount | undefined;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
157
|
function createBaseQueryAccountsRequest(): QueryAccountsRequest {
|
|
188
158
|
return { pagination: undefined };
|
|
189
159
|
}
|
|
@@ -954,7 +924,7 @@ export const AddressStringToBytesResponse = {
|
|
|
954
924
|
};
|
|
955
925
|
|
|
956
926
|
function createBaseQueryAccountAddressByIDRequest(): QueryAccountAddressByIDRequest {
|
|
957
|
-
return { id: 0
|
|
927
|
+
return { id: 0 };
|
|
958
928
|
}
|
|
959
929
|
|
|
960
930
|
export const QueryAccountAddressByIDRequest = {
|
|
@@ -962,9 +932,6 @@ export const QueryAccountAddressByIDRequest = {
|
|
|
962
932
|
if (message.id !== 0) {
|
|
963
933
|
writer.uint32(8).int64(message.id);
|
|
964
934
|
}
|
|
965
|
-
if (message.accountId !== 0) {
|
|
966
|
-
writer.uint32(16).uint64(message.accountId);
|
|
967
|
-
}
|
|
968
935
|
return writer;
|
|
969
936
|
},
|
|
970
937
|
|
|
@@ -978,9 +945,6 @@ export const QueryAccountAddressByIDRequest = {
|
|
|
978
945
|
case 1:
|
|
979
946
|
message.id = longToNumber(reader.int64() as Long);
|
|
980
947
|
break;
|
|
981
|
-
case 2:
|
|
982
|
-
message.accountId = longToNumber(reader.uint64() as Long);
|
|
983
|
-
break;
|
|
984
948
|
default:
|
|
985
949
|
reader.skipType(tag & 7);
|
|
986
950
|
break;
|
|
@@ -990,16 +954,12 @@ export const QueryAccountAddressByIDRequest = {
|
|
|
990
954
|
},
|
|
991
955
|
|
|
992
956
|
fromJSON(object: any): QueryAccountAddressByIDRequest {
|
|
993
|
-
return {
|
|
994
|
-
id: isSet(object.id) ? Number(object.id) : 0,
|
|
995
|
-
accountId: isSet(object.accountId) ? Number(object.accountId) : 0,
|
|
996
|
-
};
|
|
957
|
+
return { id: isSet(object.id) ? Number(object.id) : 0 };
|
|
997
958
|
},
|
|
998
959
|
|
|
999
960
|
toJSON(message: QueryAccountAddressByIDRequest): unknown {
|
|
1000
961
|
const obj: any = {};
|
|
1001
962
|
message.id !== undefined && (obj.id = Math.round(message.id));
|
|
1002
|
-
message.accountId !== undefined && (obj.accountId = Math.round(message.accountId));
|
|
1003
963
|
return obj;
|
|
1004
964
|
},
|
|
1005
965
|
|
|
@@ -1008,7 +968,6 @@ export const QueryAccountAddressByIDRequest = {
|
|
|
1008
968
|
): QueryAccountAddressByIDRequest {
|
|
1009
969
|
const message = createBaseQueryAccountAddressByIDRequest();
|
|
1010
970
|
message.id = object.id ?? 0;
|
|
1011
|
-
message.accountId = object.accountId ?? 0;
|
|
1012
971
|
return message;
|
|
1013
972
|
},
|
|
1014
973
|
};
|
|
@@ -1062,109 +1021,10 @@ export const QueryAccountAddressByIDResponse = {
|
|
|
1062
1021
|
},
|
|
1063
1022
|
};
|
|
1064
1023
|
|
|
1065
|
-
function createBaseQueryAccountInfoRequest(): QueryAccountInfoRequest {
|
|
1066
|
-
return { address: "" };
|
|
1067
|
-
}
|
|
1068
|
-
|
|
1069
|
-
export const QueryAccountInfoRequest = {
|
|
1070
|
-
encode(message: QueryAccountInfoRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1071
|
-
if (message.address !== "") {
|
|
1072
|
-
writer.uint32(10).string(message.address);
|
|
1073
|
-
}
|
|
1074
|
-
return writer;
|
|
1075
|
-
},
|
|
1076
|
-
|
|
1077
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): QueryAccountInfoRequest {
|
|
1078
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1079
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1080
|
-
const message = createBaseQueryAccountInfoRequest();
|
|
1081
|
-
while (reader.pos < end) {
|
|
1082
|
-
const tag = reader.uint32();
|
|
1083
|
-
switch (tag >>> 3) {
|
|
1084
|
-
case 1:
|
|
1085
|
-
message.address = reader.string();
|
|
1086
|
-
break;
|
|
1087
|
-
default:
|
|
1088
|
-
reader.skipType(tag & 7);
|
|
1089
|
-
break;
|
|
1090
|
-
}
|
|
1091
|
-
}
|
|
1092
|
-
return message;
|
|
1093
|
-
},
|
|
1094
|
-
|
|
1095
|
-
fromJSON(object: any): QueryAccountInfoRequest {
|
|
1096
|
-
return { address: isSet(object.address) ? String(object.address) : "" };
|
|
1097
|
-
},
|
|
1098
|
-
|
|
1099
|
-
toJSON(message: QueryAccountInfoRequest): unknown {
|
|
1100
|
-
const obj: any = {};
|
|
1101
|
-
message.address !== undefined && (obj.address = message.address);
|
|
1102
|
-
return obj;
|
|
1103
|
-
},
|
|
1104
|
-
|
|
1105
|
-
fromPartial<I extends Exact<DeepPartial<QueryAccountInfoRequest>, I>>(object: I): QueryAccountInfoRequest {
|
|
1106
|
-
const message = createBaseQueryAccountInfoRequest();
|
|
1107
|
-
message.address = object.address ?? "";
|
|
1108
|
-
return message;
|
|
1109
|
-
},
|
|
1110
|
-
};
|
|
1111
|
-
|
|
1112
|
-
function createBaseQueryAccountInfoResponse(): QueryAccountInfoResponse {
|
|
1113
|
-
return { info: undefined };
|
|
1114
|
-
}
|
|
1115
|
-
|
|
1116
|
-
export const QueryAccountInfoResponse = {
|
|
1117
|
-
encode(message: QueryAccountInfoResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1118
|
-
if (message.info !== undefined) {
|
|
1119
|
-
BaseAccount.encode(message.info, writer.uint32(10).fork()).ldelim();
|
|
1120
|
-
}
|
|
1121
|
-
return writer;
|
|
1122
|
-
},
|
|
1123
|
-
|
|
1124
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): QueryAccountInfoResponse {
|
|
1125
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1126
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1127
|
-
const message = createBaseQueryAccountInfoResponse();
|
|
1128
|
-
while (reader.pos < end) {
|
|
1129
|
-
const tag = reader.uint32();
|
|
1130
|
-
switch (tag >>> 3) {
|
|
1131
|
-
case 1:
|
|
1132
|
-
message.info = BaseAccount.decode(reader, reader.uint32());
|
|
1133
|
-
break;
|
|
1134
|
-
default:
|
|
1135
|
-
reader.skipType(tag & 7);
|
|
1136
|
-
break;
|
|
1137
|
-
}
|
|
1138
|
-
}
|
|
1139
|
-
return message;
|
|
1140
|
-
},
|
|
1141
|
-
|
|
1142
|
-
fromJSON(object: any): QueryAccountInfoResponse {
|
|
1143
|
-
return { info: isSet(object.info) ? BaseAccount.fromJSON(object.info) : undefined };
|
|
1144
|
-
},
|
|
1145
|
-
|
|
1146
|
-
toJSON(message: QueryAccountInfoResponse): unknown {
|
|
1147
|
-
const obj: any = {};
|
|
1148
|
-
message.info !== undefined && (obj.info = message.info ? BaseAccount.toJSON(message.info) : undefined);
|
|
1149
|
-
return obj;
|
|
1150
|
-
},
|
|
1151
|
-
|
|
1152
|
-
fromPartial<I extends Exact<DeepPartial<QueryAccountInfoResponse>, I>>(object: I): QueryAccountInfoResponse {
|
|
1153
|
-
const message = createBaseQueryAccountInfoResponse();
|
|
1154
|
-
message.info = (object.info !== undefined && object.info !== null)
|
|
1155
|
-
? BaseAccount.fromPartial(object.info)
|
|
1156
|
-
: undefined;
|
|
1157
|
-
return message;
|
|
1158
|
-
},
|
|
1159
|
-
};
|
|
1160
|
-
|
|
1161
1024
|
/** Query defines the gRPC querier service. */
|
|
1162
1025
|
export interface Query {
|
|
1163
1026
|
/**
|
|
1164
|
-
* Accounts returns all the existing accounts
|
|
1165
|
-
*
|
|
1166
|
-
* When called from another module, this query might consume a high amount of
|
|
1167
|
-
* gas if the pagination field is incorrectly set.
|
|
1027
|
+
* Accounts returns all the existing accounts
|
|
1168
1028
|
*
|
|
1169
1029
|
* Since: cosmos-sdk 0.43
|
|
1170
1030
|
*/
|
|
@@ -1205,12 +1065,6 @@ export interface Query {
|
|
|
1205
1065
|
* Since: cosmos-sdk 0.46
|
|
1206
1066
|
*/
|
|
1207
1067
|
AddressStringToBytes(request: AddressStringToBytesRequest): Promise<AddressStringToBytesResponse>;
|
|
1208
|
-
/**
|
|
1209
|
-
* AccountInfo queries account info which is common to all account types.
|
|
1210
|
-
*
|
|
1211
|
-
* Since: cosmos-sdk 0.47
|
|
1212
|
-
*/
|
|
1213
|
-
AccountInfo(request: QueryAccountInfoRequest): Promise<QueryAccountInfoResponse>;
|
|
1214
1068
|
}
|
|
1215
1069
|
|
|
1216
1070
|
export class QueryClientImpl implements Query {
|
|
@@ -1226,7 +1080,6 @@ export class QueryClientImpl implements Query {
|
|
|
1226
1080
|
this.Bech32Prefix = this.Bech32Prefix.bind(this);
|
|
1227
1081
|
this.AddressBytesToString = this.AddressBytesToString.bind(this);
|
|
1228
1082
|
this.AddressStringToBytes = this.AddressStringToBytes.bind(this);
|
|
1229
|
-
this.AccountInfo = this.AccountInfo.bind(this);
|
|
1230
1083
|
}
|
|
1231
1084
|
Accounts(request: QueryAccountsRequest): Promise<QueryAccountsResponse> {
|
|
1232
1085
|
const data = QueryAccountsRequest.encode(request).finish();
|
|
@@ -1281,12 +1134,6 @@ export class QueryClientImpl implements Query {
|
|
|
1281
1134
|
const promise = this.rpc.request("cosmos.auth.v1beta1.Query", "AddressStringToBytes", data);
|
|
1282
1135
|
return promise.then((data) => AddressStringToBytesResponse.decode(new _m0.Reader(data)));
|
|
1283
1136
|
}
|
|
1284
|
-
|
|
1285
|
-
AccountInfo(request: QueryAccountInfoRequest): Promise<QueryAccountInfoResponse> {
|
|
1286
|
-
const data = QueryAccountInfoRequest.encode(request).finish();
|
|
1287
|
-
const promise = this.rpc.request("cosmos.auth.v1beta1.Query", "AccountInfo", data);
|
|
1288
|
-
return promise.then((data) => QueryAccountInfoResponse.decode(new _m0.Reader(data)));
|
|
1289
|
-
}
|
|
1290
1137
|
}
|
|
1291
1138
|
|
|
1292
1139
|
interface Rpc {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { BaseAccount } from "./types/cosmos/auth/v1beta1/auth";
|
|
2
2
|
import { ModuleAccount } from "./types/cosmos/auth/v1beta1/auth";
|
|
3
|
-
import { ModuleCredential } from "./types/cosmos/auth/v1beta1/auth";
|
|
4
3
|
import { Params } from "./types/cosmos/auth/v1beta1/auth";
|
|
5
|
-
export { BaseAccount, ModuleAccount,
|
|
4
|
+
export { BaseAccount, ModuleAccount, Params, };
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { BaseAccount } from "./types/cosmos/auth/v1beta1/auth"
|
|
2
2
|
import { ModuleAccount } from "./types/cosmos/auth/v1beta1/auth"
|
|
3
|
-
import { ModuleCredential } from "./types/cosmos/auth/v1beta1/auth"
|
|
4
3
|
import { Params } from "./types/cosmos/auth/v1beta1/auth"
|
|
5
4
|
|
|
6
5
|
|
|
7
6
|
export {
|
|
8
7
|
BaseAccount,
|
|
9
8
|
ModuleAccount,
|
|
10
|
-
ModuleCredential,
|
|
11
9
|
Params,
|
|
12
10
|
|
|
13
11
|
}
|
|
@@ -3,16 +3,16 @@ import { SigningStargateClient } from "@cosmjs/stargate";
|
|
|
3
3
|
import { Registry } from "@cosmjs/proto-signing";
|
|
4
4
|
import { msgTypes } from './registry';
|
|
5
5
|
import { Api } from "./rest";
|
|
6
|
+
import { MsgGrant } from "./types/cosmos/authz/v1beta1/tx";
|
|
6
7
|
import { MsgExec } from "./types/cosmos/authz/v1beta1/tx";
|
|
7
8
|
import { MsgRevoke } from "./types/cosmos/authz/v1beta1/tx";
|
|
8
|
-
import { MsgGrant } from "./types/cosmos/authz/v1beta1/tx";
|
|
9
9
|
import { GenericAuthorization as typeGenericAuthorization } from "./types";
|
|
10
10
|
import { Grant as typeGrant } from "./types";
|
|
11
11
|
import { GrantAuthorization as typeGrantAuthorization } from "./types";
|
|
12
12
|
import { GrantQueueItem as typeGrantQueueItem } from "./types";
|
|
13
13
|
import { EventGrant as typeEventGrant } from "./types";
|
|
14
14
|
import { EventRevoke as typeEventRevoke } from "./types";
|
|
15
|
-
export { MsgExec, MsgRevoke
|
|
15
|
+
export { MsgGrant, MsgExec, MsgRevoke };
|
|
16
16
|
export const registry = new Registry(msgTypes);
|
|
17
17
|
function getStructure(template) {
|
|
18
18
|
const structure = { fields: [] };
|
|
@@ -28,6 +28,20 @@ const defaultFee = {
|
|
|
28
28
|
};
|
|
29
29
|
export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26657", prefix: "cosmos" }) => {
|
|
30
30
|
return {
|
|
31
|
+
async sendMsgGrant({ value, fee, memo }) {
|
|
32
|
+
if (!signer) {
|
|
33
|
+
throw new Error('TxClient:sendMsgGrant: Unable to sign Tx. Signer is not present.');
|
|
34
|
+
}
|
|
35
|
+
try {
|
|
36
|
+
const { address } = (await signer.getAccounts())[0];
|
|
37
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
38
|
+
let msg = this.msgGrant({ value: MsgGrant.fromPartial(value) });
|
|
39
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
40
|
+
}
|
|
41
|
+
catch (e) {
|
|
42
|
+
throw new Error('TxClient:sendMsgGrant: Could not broadcast Tx: ' + e.message);
|
|
43
|
+
}
|
|
44
|
+
},
|
|
31
45
|
async sendMsgExec({ value, fee, memo }) {
|
|
32
46
|
if (!signer) {
|
|
33
47
|
throw new Error('TxClient:sendMsgExec: Unable to sign Tx. Signer is not present.');
|
|
@@ -56,18 +70,12 @@ export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26
|
|
|
56
70
|
throw new Error('TxClient:sendMsgRevoke: Could not broadcast Tx: ' + e.message);
|
|
57
71
|
}
|
|
58
72
|
},
|
|
59
|
-
|
|
60
|
-
if (!signer) {
|
|
61
|
-
throw new Error('TxClient:sendMsgGrant: Unable to sign Tx. Signer is not present.');
|
|
62
|
-
}
|
|
73
|
+
msgGrant({ value }) {
|
|
63
74
|
try {
|
|
64
|
-
|
|
65
|
-
const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
|
|
66
|
-
let msg = this.msgGrant({ value: MsgGrant.fromPartial(value) });
|
|
67
|
-
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
|
|
75
|
+
return { typeUrl: "/cosmos.authz.v1beta1.MsgGrant", value: MsgGrant.fromPartial(value) };
|
|
68
76
|
}
|
|
69
77
|
catch (e) {
|
|
70
|
-
throw new Error('TxClient:
|
|
78
|
+
throw new Error('TxClient:MsgGrant: Could not create message: ' + e.message);
|
|
71
79
|
}
|
|
72
80
|
},
|
|
73
81
|
msgExec({ value }) {
|
|
@@ -86,14 +94,6 @@ export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26
|
|
|
86
94
|
throw new Error('TxClient:MsgRevoke: Could not create message: ' + e.message);
|
|
87
95
|
}
|
|
88
96
|
},
|
|
89
|
-
msgGrant({ value }) {
|
|
90
|
-
try {
|
|
91
|
-
return { typeUrl: "/cosmos.authz.v1beta1.MsgGrant", value: MsgGrant.fromPartial(value) };
|
|
92
|
-
}
|
|
93
|
-
catch (e) {
|
|
94
|
-
throw new Error('TxClient:MsgGrant: Could not create message: ' + e.message);
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
97
|
};
|
|
98
98
|
};
|
|
99
99
|
export const queryClient = ({ addr: addr } = { addr: "http://localhost:1317" }) => {
|
|
@@ -7,9 +7,9 @@ import { msgTypes } from './registry';
|
|
|
7
7
|
import { IgniteClient } from "../client"
|
|
8
8
|
import { MissingWalletError } from "../helpers"
|
|
9
9
|
import { Api } from "./rest";
|
|
10
|
+
import { MsgGrant } from "./types/cosmos/authz/v1beta1/tx";
|
|
10
11
|
import { MsgExec } from "./types/cosmos/authz/v1beta1/tx";
|
|
11
12
|
import { MsgRevoke } from "./types/cosmos/authz/v1beta1/tx";
|
|
12
|
-
import { MsgGrant } from "./types/cosmos/authz/v1beta1/tx";
|
|
13
13
|
|
|
14
14
|
import { GenericAuthorization as typeGenericAuthorization} from "./types"
|
|
15
15
|
import { Grant as typeGrant} from "./types"
|
|
@@ -18,7 +18,13 @@ import { GrantQueueItem as typeGrantQueueItem} from "./types"
|
|
|
18
18
|
import { EventGrant as typeEventGrant} from "./types"
|
|
19
19
|
import { EventRevoke as typeEventRevoke} from "./types"
|
|
20
20
|
|
|
21
|
-
export { MsgExec, MsgRevoke
|
|
21
|
+
export { MsgGrant, MsgExec, MsgRevoke };
|
|
22
|
+
|
|
23
|
+
type sendMsgGrantParams = {
|
|
24
|
+
value: MsgGrant,
|
|
25
|
+
fee?: StdFee,
|
|
26
|
+
memo?: string
|
|
27
|
+
};
|
|
22
28
|
|
|
23
29
|
type sendMsgExecParams = {
|
|
24
30
|
value: MsgExec,
|
|
@@ -32,13 +38,11 @@ type sendMsgRevokeParams = {
|
|
|
32
38
|
memo?: string
|
|
33
39
|
};
|
|
34
40
|
|
|
35
|
-
|
|
41
|
+
|
|
42
|
+
type msgGrantParams = {
|
|
36
43
|
value: MsgGrant,
|
|
37
|
-
fee?: StdFee,
|
|
38
|
-
memo?: string
|
|
39
44
|
};
|
|
40
45
|
|
|
41
|
-
|
|
42
46
|
type msgExecParams = {
|
|
43
47
|
value: MsgExec,
|
|
44
48
|
};
|
|
@@ -47,10 +51,6 @@ type msgRevokeParams = {
|
|
|
47
51
|
value: MsgRevoke,
|
|
48
52
|
};
|
|
49
53
|
|
|
50
|
-
type msgGrantParams = {
|
|
51
|
-
value: MsgGrant,
|
|
52
|
-
};
|
|
53
|
-
|
|
54
54
|
|
|
55
55
|
export const registry = new Registry(msgTypes);
|
|
56
56
|
|
|
@@ -81,6 +81,20 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
|
|
|
81
81
|
|
|
82
82
|
return {
|
|
83
83
|
|
|
84
|
+
async sendMsgGrant({ value, fee, memo }: sendMsgGrantParams): Promise<DeliverTxResponse> {
|
|
85
|
+
if (!signer) {
|
|
86
|
+
throw new Error('TxClient:sendMsgGrant: Unable to sign Tx. Signer is not present.')
|
|
87
|
+
}
|
|
88
|
+
try {
|
|
89
|
+
const { address } = (await signer.getAccounts())[0];
|
|
90
|
+
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
|
|
91
|
+
let msg = this.msgGrant({ value: MsgGrant.fromPartial(value) })
|
|
92
|
+
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
93
|
+
} catch (e: any) {
|
|
94
|
+
throw new Error('TxClient:sendMsgGrant: Could not broadcast Tx: '+ e.message)
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
|
|
84
98
|
async sendMsgExec({ value, fee, memo }: sendMsgExecParams): Promise<DeliverTxResponse> {
|
|
85
99
|
if (!signer) {
|
|
86
100
|
throw new Error('TxClient:sendMsgExec: Unable to sign Tx. Signer is not present.')
|
|
@@ -109,21 +123,15 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
|
|
|
109
123
|
}
|
|
110
124
|
},
|
|
111
125
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
try {
|
|
117
|
-
const { address } = (await signer.getAccounts())[0];
|
|
118
|
-
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
|
|
119
|
-
let msg = this.msgGrant({ value: MsgGrant.fromPartial(value) })
|
|
120
|
-
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
|
|
126
|
+
|
|
127
|
+
msgGrant({ value }: msgGrantParams): EncodeObject {
|
|
128
|
+
try {
|
|
129
|
+
return { typeUrl: "/cosmos.authz.v1beta1.MsgGrant", value: MsgGrant.fromPartial( value ) }
|
|
121
130
|
} catch (e: any) {
|
|
122
|
-
throw new Error('TxClient:
|
|
131
|
+
throw new Error('TxClient:MsgGrant: Could not create message: ' + e.message)
|
|
123
132
|
}
|
|
124
133
|
},
|
|
125
134
|
|
|
126
|
-
|
|
127
135
|
msgExec({ value }: msgExecParams): EncodeObject {
|
|
128
136
|
try {
|
|
129
137
|
return { typeUrl: "/cosmos.authz.v1beta1.MsgExec", value: MsgExec.fromPartial( value ) }
|
|
@@ -140,14 +148,6 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
|
|
|
140
148
|
}
|
|
141
149
|
},
|
|
142
150
|
|
|
143
|
-
msgGrant({ value }: msgGrantParams): EncodeObject {
|
|
144
|
-
try {
|
|
145
|
-
return { typeUrl: "/cosmos.authz.v1beta1.MsgGrant", value: MsgGrant.fromPartial( value ) }
|
|
146
|
-
} catch (e: any) {
|
|
147
|
-
throw new Error('TxClient:MsgGrant: Could not create message: ' + e.message)
|
|
148
|
-
}
|
|
149
|
-
},
|
|
150
|
-
|
|
151
151
|
}
|
|
152
152
|
};
|
|
153
153
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { MsgGrant } from "./types/cosmos/authz/v1beta1/tx";
|
|
1
2
|
import { MsgExec } from "./types/cosmos/authz/v1beta1/tx";
|
|
2
3
|
import { MsgRevoke } from "./types/cosmos/authz/v1beta1/tx";
|
|
3
|
-
import { MsgGrant } from "./types/cosmos/authz/v1beta1/tx";
|
|
4
4
|
const msgTypes = [
|
|
5
|
+
["/cosmos.authz.v1beta1.MsgGrant", MsgGrant],
|
|
5
6
|
["/cosmos.authz.v1beta1.MsgExec", MsgExec],
|
|
6
7
|
["/cosmos.authz.v1beta1.MsgRevoke", MsgRevoke],
|
|
7
|
-
["/cosmos.authz.v1beta1.MsgGrant", MsgGrant],
|
|
8
8
|
];
|
|
9
9
|
export { msgTypes };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { GeneratedType } from "@cosmjs/proto-signing";
|
|
2
|
+
import { MsgGrant } from "./types/cosmos/authz/v1beta1/tx";
|
|
2
3
|
import { MsgExec } from "./types/cosmos/authz/v1beta1/tx";
|
|
3
4
|
import { MsgRevoke } from "./types/cosmos/authz/v1beta1/tx";
|
|
4
|
-
import { MsgGrant } from "./types/cosmos/authz/v1beta1/tx";
|
|
5
5
|
|
|
6
6
|
const msgTypes: Array<[string, GeneratedType]> = [
|
|
7
|
+
["/cosmos.authz.v1beta1.MsgGrant", MsgGrant],
|
|
7
8
|
["/cosmos.authz.v1beta1.MsgExec", MsgExec],
|
|
8
9
|
["/cosmos.authz.v1beta1.MsgRevoke", MsgRevoke],
|
|
9
|
-
["/cosmos.authz.v1beta1.MsgGrant", MsgGrant],
|
|
10
10
|
|
|
11
11
|
];
|
|
12
12
|
|
|
@@ -30,7 +30,7 @@ export interface MsgExecResponse {
|
|
|
30
30
|
export interface MsgExec {
|
|
31
31
|
grantee: string;
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* Authorization Msg requests to execute. Each msg must implement Authorization interface
|
|
34
34
|
* The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg))
|
|
35
35
|
* triple and validate it.
|
|
36
36
|
*/
|