From 8aed1658b52787ff34da91de27e6af9b018bbb52 Mon Sep 17 00:00:00 2001 From: Zetazzz Date: Wed, 22 Jan 2025 11:18:38 +0800 Subject: [PATCH 1/6] authz code --- examples/authz/.eslintrc.json | 3 + examples/authz/.gitignore | 37 + examples/authz/.yarnrc.yml | 1 + examples/authz/CHANGELOG.md | 50 + examples/authz/README.md | 88 + .../authz/components/authz/AuthzSection.tsx | 71 + .../components/authz/CustomizationField.tsx | 135 + examples/authz/components/authz/GrantCard.tsx | 210 + .../components/authz/GrantDetailsModal.tsx | 122 + .../authz/components/authz/GrantModal.tsx | 329 + examples/authz/components/authz/Grants.tsx | 87 + .../components/authz/LoginInfoBanner.tsx | 42 + .../components/authz/PermissionDetailCard.tsx | 133 + .../authz/SelectValidatorsModal.tsx | 164 + examples/authz/components/authz/index.ts | 2 + .../claim-rewards/ClaimRewardsSection.tsx | 53 + .../components/claim-rewards/Overview.tsx | 121 + .../authz/components/claim-rewards/index.ts | 1 + .../authz/components/common/AddressInput.tsx | 66 + examples/authz/components/common/Footer.tsx | 169 + examples/authz/components/common/Header.tsx | 66 + examples/authz/components/common/Layout.tsx | 21 + examples/authz/components/common/index.ts | 2 + examples/authz/components/index.tsx | 7 + examples/authz/components/send/index.ts | 1 + examples/authz/components/send/send.tsx | 168 + .../components/staking/AllValidators.tsx | 69 + .../components/staking/AllValidatorsList.tsx | 122 + .../components/staking/DelegateModal.tsx | 296 + .../authz/components/staking/Overview.tsx | 114 + .../components/staking/StakingSection.tsx | 66 + examples/authz/components/staking/index.ts | 1 + examples/authz/components/voting/Proposal.tsx | 394 + examples/authz/components/voting/Voting.tsx | 169 + examples/authz/components/voting/index.ts | 2 + .../authz/components/wallet/Astronaut.tsx | 156 + examples/authz/components/wallet/Chain.tsx | 133 + .../authz/components/wallet/ChainCard.tsx | 46 + examples/authz/components/wallet/Connect.tsx | 79 + examples/authz/components/wallet/User.tsx | 22 + examples/authz/components/wallet/Wallet.tsx | 134 + examples/authz/components/wallet/Warning.tsx | 35 + examples/authz/components/wallet/index.ts | 1 + examples/authz/configs/defaults.ts | 19 + examples/authz/configs/features.ts | 51 + examples/authz/configs/index.ts | 3 + examples/authz/configs/permissions.ts | 44 + examples/authz/context/authz-context.tsx | 38 + examples/authz/context/index.ts | 1 + examples/authz/hooks/index.ts | 13 + examples/authz/hooks/useAuthzTx.ts | 147 + examples/authz/hooks/useDisclosure.ts | 18 + examples/authz/hooks/useGrants.ts | 100 + examples/authz/hooks/useModal.ts | 13 + examples/authz/hooks/usePrices.ts | 53 + examples/authz/hooks/useQueryHooks.ts | 37 + examples/authz/hooks/useSendData.ts | 78 + examples/authz/hooks/useStakingData.ts | 278 + examples/authz/hooks/useToast.tsx | 38 + examples/authz/hooks/useTx.ts | 81 + examples/authz/hooks/useValidatorLogos.ts | 13 + examples/authz/hooks/useValidators.ts | 115 + examples/authz/hooks/useVotingData.ts | 178 + examples/authz/next.config.js | 16 + examples/authz/package.json | 88 + examples/authz/pages/_app.tsx | 98 + examples/authz/pages/claim-rewards.tsx | 36 + examples/authz/pages/index.tsx | 29 + examples/authz/pages/send.tsx | 31 + examples/authz/pages/stake.tsx | 32 + examples/authz/pages/vote.tsx | 31 + examples/authz/proto/confio/LICENSE | 204 + examples/authz/proto/confio/README.md | 1 + examples/authz/proto/confio/proofs.proto | 234 + examples/authz/proto/cosmos/LICENSE | 204 + examples/authz/proto/cosmos/README.md | 1 + .../proto/cosmos/app/v1alpha1/config.proto | 36 + .../proto/cosmos/app/v1alpha1/module.proto | 93 + .../proto/cosmos/app/v1alpha1/query.proto | 22 + .../proto/cosmos/auth/v1beta1/auth.proto | 47 + .../proto/cosmos/auth/v1beta1/genesis.proto | 17 + .../proto/cosmos/auth/v1beta1/query.proto | 130 + .../proto/cosmos/authz/v1beta1/authz.proto | 46 + .../proto/cosmos/authz/v1beta1/event.proto | 27 + .../proto/cosmos/authz/v1beta1/genesis.proto | 13 + .../proto/cosmos/authz/v1beta1/query.proto | 82 + .../authz/proto/cosmos/authz/v1beta1/tx.proto | 75 + .../proto/cosmos/bank/v1beta1/authz.proto | 19 + .../proto/cosmos/bank/v1beta1/bank.proto | 108 + .../proto/cosmos/bank/v1beta1/genesis.proto | 40 + .../proto/cosmos/bank/v1beta1/query.proto | 231 + .../authz/proto/cosmos/bank/v1beta1/tx.proto | 48 + .../proto/cosmos/base/abci/v1beta1/abci.proto | 158 + .../proto/cosmos/base/kv/v1beta1/kv.proto | 17 + .../base/query/v1beta1/pagination.proto | 56 + .../base/reflection/v1beta1/reflection.proto | 44 + .../base/reflection/v2alpha1/reflection.proto | 218 + .../base/snapshots/v1beta1/snapshot.proto | 70 + .../base/store/v1beta1/commit_info.proto | 29 + .../cosmos/base/store/v1beta1/listening.proto | 16 + .../base/tendermint/v1beta1/query.proto | 138 + .../proto/cosmos/base/v1beta1/coin.proto | 43 + .../capability/v1beta1/capability.proto | 30 + .../cosmos/capability/v1beta1/genesis.proto | 26 + .../proto/cosmos/crisis/v1beta1/genesis.proto | 14 + .../proto/cosmos/crisis/v1beta1/tx.proto | 29 + .../proto/cosmos/crypto/ed25519/keys.proto | 23 + .../authz/proto/cosmos/crypto/hd/v1/hd.proto | 23 + .../cosmos/crypto/keyring/v1/record.proto | 47 + .../proto/cosmos/crypto/multisig/keys.proto | 17 + .../crypto/multisig/v1beta1/multisig.proto | 25 + .../proto/cosmos/crypto/secp256k1/keys.proto | 22 + .../proto/cosmos/crypto/secp256r1/keys.proto | 23 + .../distribution/v1beta1/distribution.proto | 154 + .../cosmos/distribution/v1beta1/genesis.proto | 144 + .../cosmos/distribution/v1beta1/query.proto | 219 + .../cosmos/distribution/v1beta1/tx.proto | 95 + .../cosmos/evidence/v1beta1/evidence.proto | 22 + .../cosmos/evidence/v1beta1/genesis.proto | 12 + .../proto/cosmos/evidence/v1beta1/query.proto | 51 + .../proto/cosmos/evidence/v1beta1/tx.proto | 35 + .../cosmos/feegrant/v1beta1/feegrant.proto | 78 + .../cosmos/feegrant/v1beta1/genesis.proto | 13 + .../proto/cosmos/feegrant/v1beta1/query.proto | 79 + .../proto/cosmos/feegrant/v1beta1/tx.proto | 53 + .../cosmos/genutil/v1beta1/genesis.proto | 12 + .../authz/proto/cosmos/gov/v1/genesis.proto | 26 + examples/authz/proto/cosmos/gov/v1/gov.proto | 132 + .../authz/proto/cosmos/gov/v1/query.proto | 183 + examples/authz/proto/cosmos/gov/v1/tx.proto | 100 + .../proto/cosmos/gov/v1beta1/genesis.proto | 26 + .../authz/proto/cosmos/gov/v1beta1/gov.proto | 201 + .../proto/cosmos/gov/v1beta1/query.proto | 191 + .../authz/proto/cosmos/gov/v1beta1/tx.proto | 106 + .../authz/proto/cosmos/group/v1/events.proto | 77 + .../authz/proto/cosmos/group/v1/genesis.proto | 38 + .../authz/proto/cosmos/group/v1/query.proto | 308 + examples/authz/proto/cosmos/group/v1/tx.proto | 364 + .../authz/proto/cosmos/group/v1/types.proto | 308 + .../proto/cosmos/mint/v1beta1/genesis.proto | 16 + .../proto/cosmos/mint/v1beta1/mint.proto | 57 + .../proto/cosmos/mint/v1beta1/query.proto | 57 + examples/authz/proto/cosmos/msg/v1/msg.proto | 22 + .../proto/cosmos/nft/v1beta1/event.proto | 26 + .../proto/cosmos/nft/v1beta1/genesis.proto | 22 + .../authz/proto/cosmos/nft/v1beta1/nft.proto | 48 + .../proto/cosmos/nft/v1beta1/query.proto | 125 + .../authz/proto/cosmos/nft/v1beta1/tx.proto | 30 + examples/authz/proto/cosmos/orm/v1/orm.proto | 104 + .../proto/cosmos/orm/v1alpha1/schema.proto | 76 + .../proto/cosmos/params/v1beta1/params.proto | 29 + .../proto/cosmos/params/v1beta1/query.proto | 54 + .../cosmos/slashing/v1beta1/genesis.proto | 47 + .../proto/cosmos/slashing/v1beta1/query.proto | 64 + .../cosmos/slashing/v1beta1/slashing.proto | 45 + .../proto/cosmos/slashing/v1beta1/tx.proto | 30 + .../proto/cosmos/staking/v1beta1/authz.proto | 47 + .../cosmos/staking/v1beta1/genesis.proto | 49 + .../proto/cosmos/staking/v1beta1/query.proto | 349 + .../cosmos/staking/v1beta1/staking.proto | 358 + .../proto/cosmos/staking/v1beta1/tx.proto | 138 + .../cosmos/tx/signing/v1beta1/signing.proto | 94 + .../proto/cosmos/tx/v1beta1/service.proto | 163 + .../authz/proto/cosmos/tx/v1beta1/tx.proto | 249 + .../proto/cosmos/upgrade/v1beta1/query.proto | 120 + .../proto/cosmos/upgrade/v1beta1/tx.proto | 55 + .../cosmos/upgrade/v1beta1/upgrade.proto | 86 + .../proto/cosmos/vesting/v1beta1/tx.proto | 74 + .../cosmos/vesting/v1beta1/vesting.proto | 76 + examples/authz/proto/cosmos_proto/LICENSE | 204 + examples/authz/proto/cosmos_proto/README.md | 1 + .../authz/proto/cosmos_proto/cosmos.proto | 97 + examples/authz/proto/cosmwasm/LICENSE | 204 + examples/authz/proto/cosmwasm/README.md | 1 + .../proto/cosmwasm/wasm/v1/genesis.proto | 60 + .../authz/proto/cosmwasm/wasm/v1/ibc.proto | 31 + .../proto/cosmwasm/wasm/v1/proposal.proto | 150 + .../authz/proto/cosmwasm/wasm/v1/query.proto | 223 + .../authz/proto/cosmwasm/wasm/v1/tx.proto | 135 + .../authz/proto/cosmwasm/wasm/v1/types.proto | 140 + examples/authz/proto/gogoproto/LICENSE | 34 + examples/authz/proto/gogoproto/README.md | 1 + examples/authz/proto/gogoproto/gogo.proto | 145 + examples/authz/proto/google/LICENSE | 201 + examples/authz/proto/google/README.md | 1 + .../authz/proto/google/api/annotations.proto | 31 + examples/authz/proto/google/api/http.proto | 375 + .../authz/proto/google/protobuf/any.proto | 155 + .../proto/google/protobuf/descriptor.proto | 885 + .../proto/google/protobuf/duration.proto | 116 + .../authz/proto/google/protobuf/empty.proto | 52 + .../proto/google/protobuf/timestamp.proto | 138 + examples/authz/proto/ibc/LICENSE | 21 + examples/authz/proto/ibc/README.md | 1 + .../applications/transfer/v1/genesis.proto | 19 + .../ibc/applications/transfer/v1/query.proto | 67 + .../applications/transfer/v1/transfer.proto | 30 + .../ibc/applications/transfer/v1/tx.proto | 44 + .../ibc/applications/transfer/v2/packet.proto | 19 + .../proto/ibc/core/channel/v1/channel.proto | 148 + .../proto/ibc/core/channel/v1/genesis.proto | 32 + .../proto/ibc/core/channel/v1/query.proto | 376 + .../authz/proto/ibc/core/channel/v1/tx.proto | 211 + .../proto/ibc/core/client/v1/client.proto | 104 + .../proto/ibc/core/client/v1/genesis.proto | 48 + .../proto/ibc/core/client/v1/query.proto | 184 + .../authz/proto/ibc/core/client/v1/tx.proto | 99 + .../ibc/core/commitment/v1/commitment.proto | 41 + .../ibc/core/connection/v1/connection.proto | 114 + .../ibc/core/connection/v1/genesis.proto | 18 + .../proto/ibc/core/connection/v1/query.proto | 138 + .../proto/ibc/core/connection/v1/tx.proto | 119 + .../authz/proto/ibc/core/port/v1/query.proto | 35 + .../proto/ibc/core/types/v1/genesis.proto | 23 + .../lightclients/localhost/v1/localhost.proto | 18 + .../solomachine/v1/solomachine.proto | 189 + .../solomachine/v2/solomachine.proto | 189 + .../tendermint/v1/tendermint.proto | 115 + .../proto/osmosis/claim/v1beta1/claim.proto | 35 + .../proto/osmosis/claim/v1beta1/genesis.proto | 33 + .../proto/osmosis/claim/v1beta1/params.proto | 31 + .../proto/osmosis/claim/v1beta1/query.proto | 94 + .../authz/proto/osmosis/epochs/genesis.proto | 72 + .../authz/proto/osmosis/epochs/query.proto | 30 + .../pool-models/balancer/balancerPool.proto | 151 + .../gamm/pool-models/balancer/tx/tx.proto | 31 + .../stableswap/stableswap_pool.proto | 73 + .../gamm/pool-models/stableswap/tx.proto | 53 + .../proto/osmosis/gamm/v1beta1/genesis.proto | 27 + .../proto/osmosis/gamm/v1beta1/query.proto | 308 + .../authz/proto/osmosis/gamm/v1beta1/tx.proto | 237 + .../authz/proto/osmosis/gamm/v2/query.proto | 38 + .../ibc-rate-limit/v1beta1/params.proto | 12 + .../ibc-rate-limit/v1beta1/query.proto | 27 + .../proto/osmosis/incentives/gauge.proto | 60 + .../proto/osmosis/incentives/genesis.proto | 28 + .../proto/osmosis/incentives/params.proto | 14 + .../proto/osmosis/incentives/query.proto | 175 + .../authz/proto/osmosis/incentives/tx.proto | 60 + .../authz/proto/osmosis/lockup/genesis.proto | 14 + .../authz/proto/osmosis/lockup/lock.proto | 108 + .../authz/proto/osmosis/lockup/params.proto | 11 + .../authz/proto/osmosis/lockup/query.proto | 299 + examples/authz/proto/osmosis/lockup/tx.proto | 88 + .../proto/osmosis/mint/v1beta1/genesis.proto | 21 + .../proto/osmosis/mint/v1beta1/mint.proto | 111 + .../proto/osmosis/mint/v1beta1/query.proto | 45 + .../pool-incentives/v1beta1/genesis.proto | 27 + .../osmosis/pool-incentives/v1beta1/gov.proto | 52 + .../pool-incentives/v1beta1/incentives.proto | 58 + .../pool-incentives/v1beta1/query.proto | 108 + .../proto/osmosis/sumtree/v1beta1/tree.proto | 19 + .../proto/osmosis/superfluid/genesis.proto | 27 + .../proto/osmosis/superfluid/params.proto | 20 + .../proto/osmosis/superfluid/query.proto | 284 + .../proto/osmosis/superfluid/superfluid.proto | 82 + .../authz/proto/osmosis/superfluid/tx.proto | 92 + .../osmosis/superfluid/v1beta1/gov.proto | 50 + .../v1beta1/authorityMetadata.proto | 17 + .../tokenfactory/v1beta1/genesis.proto | 32 + .../osmosis/tokenfactory/v1beta1/params.proto | 18 + .../osmosis/tokenfactory/v1beta1/query.proto | 71 + .../osmosis/tokenfactory/v1beta1/tx.proto | 108 + .../proto/osmosis/twap/v1beta1/genesis.proto | 29 + .../proto/osmosis/twap/v1beta1/query.proto | 73 + .../proto/osmosis/twap/v1beta1/query.yml | 22 + .../osmosis/twap/v1beta1/twap_record.proto | 69 + .../osmosis/txfees/v1beta1/feetoken.proto | 17 + .../osmosis/txfees/v1beta1/genesis.proto | 13 + .../proto/osmosis/txfees/v1beta1/gov.proto | 27 + .../proto/osmosis/txfees/v1beta1/query.proto | 74 + examples/authz/proto/tendermint/LICENSE | 204 + examples/authz/proto/tendermint/README.md | 1 + .../authz/proto/tendermint/abci/types.proto | 394 + .../authz/proto/tendermint/crypto/keys.proto | 17 + .../authz/proto/tendermint/crypto/proof.proto | 41 + .../proto/tendermint/libs/bits/types.proto | 9 + .../authz/proto/tendermint/p2p/types.proto | 42 + .../authz/proto/tendermint/types/block.proto | 15 + .../proto/tendermint/types/evidence.proto | 38 + .../authz/proto/tendermint/types/params.proto | 79 + .../authz/proto/tendermint/types/types.proto | 153 + .../proto/tendermint/types/validator.proto | 25 + .../proto/tendermint/version/types.proto | 24 + examples/authz/public/image/favicon.ico | Bin 0 -> 14037 bytes examples/authz/scripts/codegen.js | 172 + examples/authz/styles/custom.module.css | 16 + examples/authz/tsconfig.json | 40 + examples/authz/types/codegen/binary.d.ts | 130 + .../authz/types/codegen/confio/proofs.d.ts | 901 + .../codegen/cosmos/app/v1alpha1/config.d.ts | 146 + .../codegen/cosmos/app/v1alpha1/module.d.ts | 271 + .../codegen/cosmos/app/v1alpha1/query.d.ts | 84 + .../cosmos/app/v1alpha1/query.rpc.Query.d.ts | 30 + .../codegen/cosmos/auth/v1beta1/auth.d.ts | 169 + .../codegen/cosmos/auth/v1beta1/genesis.d.ts | 52 + .../codegen/cosmos/auth/v1beta1/query.d.ts | 618 + .../cosmos/auth/v1beta1/query.rpc.Query.d.ts | 122 + .../codegen/cosmos/authz/v1beta1/authz.d.ts | 230 + .../codegen/cosmos/authz/v1beta1/event.d.ts | 108 + .../codegen/cosmos/authz/v1beta1/genesis.d.ts | 44 + .../codegen/cosmos/authz/v1beta1/query.d.ts | 294 + .../cosmos/authz/v1beta1/query.rpc.Query.d.ts | 84 + .../cosmos/authz/v1beta1/tx.amino.d.ts | 18 + .../codegen/cosmos/authz/v1beta1/tx.d.ts | 307 + .../cosmos/authz/v1beta1/tx.registry.d.ts | 77 + .../cosmos/authz/v1beta1/tx.rpc.msg.d.ts | 31 + .../codegen/cosmos/bank/v1beta1/authz.d.ts | 61 + .../codegen/cosmos/bank/v1beta1/bank.d.ts | 447 + .../codegen/cosmos/bank/v1beta1/genesis.d.ts | 125 + .../codegen/cosmos/bank/v1beta1/query.d.ts | 966 + .../cosmos/bank/v1beta1/query.rpc.Query.d.ts | 167 + .../codegen/cosmos/bank/v1beta1/tx.amino.d.ts | 13 + .../types/codegen/cosmos/bank/v1beta1/tx.d.ts | 171 + .../cosmos/bank/v1beta1/tx.registry.d.ts | 57 + .../cosmos/bank/v1beta1/tx.rpc.msg.d.ts | 16 + .../cosmos/base/abci/v1beta1/abci.d.ts | 683 + .../codegen/cosmos/base/kv/v1beta1/kv.d.ts | 87 + .../cosmos/base/query/v1beta1/pagination.d.ts | 215 + .../base/reflection/v1beta1/reflection.d.ts | 185 + .../base/reflection/v2alpha1/reflection.d.ts | 1266 + .../base/snapshots/v1beta1/snapshot.d.ts | 419 + .../base/store/v1beta1/commit_info.d.ts | 161 + .../cosmos/base/store/v1beta1/listening.d.ts | 74 + .../cosmos/base/tendermint/v1beta1/query.d.ts | 689 + .../tendermint/v1beta1/query.rpc.Service.d.ts | 95 + .../codegen/cosmos/base/v1beta1/coin.d.ts | 202 + .../authz/types/codegen/cosmos/bundle.d.ts | 21018 ++++++++++++++++ .../cosmos/capability/v1beta1/capability.d.ts | 155 + .../cosmos/capability/v1beta1/genesis.d.ts | 105 + .../authz/types/codegen/cosmos/client.d.ts | 254 + .../cosmos/crisis/v1beta1/genesis.d.ts | 52 + .../cosmos/crisis/v1beta1/tx.amino.d.ts | 8 + .../codegen/cosmos/crisis/v1beta1/tx.d.ts | 87 + .../cosmos/crisis/v1beta1/tx.registry.d.ts | 37 + .../cosmos/crisis/v1beta1/tx.rpc.msg.d.ts | 13 + .../codegen/cosmos/crypto/ed25519/keys.d.ts | 111 + .../types/codegen/cosmos/crypto/hd/v1/hd.d.ts | 71 + .../cosmos/crypto/keyring/v1/record.d.ts | 242 + .../codegen/cosmos/crypto/multisig/keys.d.ts | 59 + .../crypto/multisig/v1beta1/multisig.d.ts | 114 + .../codegen/cosmos/crypto/secp256k1/keys.d.ts | 102 + .../codegen/cosmos/crypto/secp256r1/keys.d.ts | 94 + .../distribution/v1beta1/distribution.d.ts | 682 + .../cosmos/distribution/v1beta1/genesis.d.ts | 478 + .../cosmos/distribution/v1beta1/query.d.ts | 941 + .../distribution/v1beta1/query.rpc.Query.d.ts | 145 + .../cosmos/distribution/v1beta1/tx.amino.d.ts | 23 + .../cosmos/distribution/v1beta1/tx.d.ts | 370 + .../distribution/v1beta1/tx.registry.d.ts | 97 + .../distribution/v1beta1/tx.rpc.msg.d.ts | 34 + .../cosmos/evidence/v1beta1/evidence.d.ts | 61 + .../cosmos/evidence/v1beta1/genesis.d.ts | 46 + .../cosmos/evidence/v1beta1/query.d.ts | 199 + .../evidence/v1beta1/query.rpc.Query.d.ts | 43 + .../cosmos/evidence/v1beta1/tx.amino.d.ts | 8 + .../codegen/cosmos/evidence/v1beta1/tx.d.ts | 102 + .../cosmos/evidence/v1beta1/tx.registry.d.ts | 37 + .../cosmos/evidence/v1beta1/tx.rpc.msg.d.ts | 16 + .../cosmos/feegrant/v1beta1/feegrant.d.ts | 275 + .../cosmos/feegrant/v1beta1/genesis.d.ts | 44 + .../cosmos/feegrant/v1beta1/query.d.ts | 283 + .../feegrant/v1beta1/query.rpc.Query.d.ts | 67 + .../cosmos/feegrant/v1beta1/tx.amino.d.ts | 13 + .../codegen/cosmos/feegrant/v1beta1/tx.d.ts | 193 + .../cosmos/feegrant/v1beta1/tx.registry.d.ts | 57 + .../cosmos/feegrant/v1beta1/tx.rpc.msg.d.ts | 22 + .../cosmos/genutil/v1beta1/genesis.d.ts | 45 + .../types/codegen/cosmos/gov/v1/genesis.d.ts | 76 + .../types/codegen/cosmos/gov/v1/gov.d.ts | 511 + .../types/codegen/cosmos/gov/v1/query.d.ts | 761 + .../cosmos/gov/v1/query.rpc.Query.d.ts | 121 + .../types/codegen/cosmos/gov/v1/tx.amino.d.ts | 28 + .../authz/types/codegen/cosmos/gov/v1/tx.d.ts | 467 + .../codegen/cosmos/gov/v1/tx.registry.d.ts | 117 + .../codegen/cosmos/gov/v1/tx.rpc.msg.d.ts | 28 + .../codegen/cosmos/gov/v1beta1/genesis.d.ts | 76 + .../types/codegen/cosmos/gov/v1beta1/gov.d.ts | 589 + .../codegen/cosmos/gov/v1beta1/query.d.ts | 761 + .../cosmos/gov/v1beta1/query.rpc.Query.d.ts | 121 + .../codegen/cosmos/gov/v1beta1/tx.amino.d.ts | 23 + .../types/codegen/cosmos/gov/v1beta1/tx.d.ts | 384 + .../cosmos/gov/v1beta1/tx.registry.d.ts | 97 + .../cosmos/gov/v1beta1/tx.rpc.msg.d.ts | 26 + .../types/codegen/cosmos/group/v1/events.d.ts | 400 + .../codegen/cosmos/group/v1/genesis.d.ts | 99 + .../types/codegen/cosmos/group/v1/query.d.ts | 1207 + .../cosmos/group/v1/query.rpc.Query.d.ts | 186 + .../codegen/cosmos/group/v1/tx.amino.d.ts | 73 + .../types/codegen/cosmos/group/v1/tx.d.ts | 1383 + .../codegen/cosmos/group/v1/tx.registry.d.ts | 297 + .../codegen/cosmos/group/v1/tx.rpc.msg.d.ts | 52 + .../types/codegen/cosmos/group/v1/types.d.ts | 850 + .../codegen/cosmos/mint/v1beta1/genesis.d.ts | 51 + .../codegen/cosmos/mint/v1beta1/mint.d.ts | 118 + .../codegen/cosmos/mint/v1beta1/query.d.ts | 273 + .../cosmos/mint/v1beta1/query.rpc.Query.d.ts | 56 + .../types/codegen/cosmos/msg/v1/msg.d.ts | 1 + .../codegen/cosmos/nft/v1beta1/event.d.ts | 146 + .../codegen/cosmos/nft/v1beta1/genesis.d.ts | 97 + .../types/codegen/cosmos/nft/v1beta1/nft.d.ts | 139 + .../codegen/cosmos/nft/v1beta1/query.d.ts | 601 + .../cosmos/nft/v1beta1/query.rpc.Query.d.ts | 119 + .../codegen/cosmos/nft/v1beta1/tx.amino.d.ts | 8 + .../types/codegen/cosmos/nft/v1beta1/tx.d.ts | 98 + .../cosmos/nft/v1beta1/tx.registry.d.ts | 37 + .../cosmos/nft/v1beta1/tx.rpc.msg.d.ts | 13 + .../types/codegen/cosmos/orm/v1/orm.d.ts | 313 + .../codegen/cosmos/orm/v1alpha1/schema.d.ts | 176 + .../codegen/cosmos/params/v1beta1/params.d.ts | 107 + .../codegen/cosmos/params/v1beta1/query.d.ts | 244 + .../params/v1beta1/query.rpc.Query.d.ts | 54 + .../authz/types/codegen/cosmos/rpc.query.d.ts | 61 + .../authz/types/codegen/cosmos/rpc.tx.d.ts | 47 + .../cosmos/slashing/v1beta1/genesis.d.ts | 221 + .../cosmos/slashing/v1beta1/query.d.ts | 292 + .../slashing/v1beta1/query.rpc.Query.d.ts | 56 + .../cosmos/slashing/v1beta1/slashing.d.ts | 151 + .../cosmos/slashing/v1beta1/tx.amino.d.ts | 8 + .../codegen/cosmos/slashing/v1beta1/tx.d.ts | 81 + .../cosmos/slashing/v1beta1/tx.registry.d.ts | 37 + .../cosmos/slashing/v1beta1/tx.rpc.msg.d.ts | 17 + .../codegen/cosmos/staking/v1beta1/authz.d.ts | 148 + .../cosmos/staking/v1beta1/genesis.d.ts | 139 + .../codegen/cosmos/staking/v1beta1/query.d.ts | 1447 ++ .../staking/v1beta1/query.rpc.Query.d.ts | 243 + .../cosmos/staking/v1beta1/staking.d.ts | 1214 + .../cosmos/staking/v1beta1/tx.amino.d.ts | 28 + .../codegen/cosmos/staking/v1beta1/tx.d.ts | 496 + .../cosmos/staking/v1beta1/tx.registry.d.ts | 117 + .../cosmos/staking/v1beta1/tx.rpc.msg.d.ts | 34 + .../cosmos/tx/signing/v1beta1/signing.d.ts | 312 + .../codegen/cosmos/tx/v1beta1/service.d.ts | 635 + .../tx/v1beta1/service.rpc.Service.d.ts | 96 + .../types/codegen/cosmos/tx/v1beta1/tx.d.ts | 1032 + .../codegen/cosmos/upgrade/v1beta1/query.d.ts | 549 + .../upgrade/v1beta1/query.rpc.Query.d.ts | 119 + .../cosmos/upgrade/v1beta1/tx.amino.d.ts | 13 + .../codegen/cosmos/upgrade/v1beta1/tx.d.ts | 218 + .../cosmos/upgrade/v1beta1/tx.registry.d.ts | 57 + .../cosmos/upgrade/v1beta1/tx.rpc.msg.d.ts | 25 + .../cosmos/upgrade/v1beta1/upgrade.d.ts | 307 + .../cosmos/vesting/v1beta1/tx.amino.d.ts | 18 + .../codegen/cosmos/vesting/v1beta1/tx.d.ts | 304 + .../cosmos/vesting/v1beta1/tx.registry.d.ts | 77 + .../cosmos/vesting/v1beta1/tx.rpc.msg.d.ts | 28 + .../cosmos/vesting/v1beta1/vesting.d.ts | 331 + .../types/codegen/cosmos_proto/bundle.d.ts | 53 + .../types/codegen/cosmos_proto/cosmos.d.ts | 186 + .../authz/types/codegen/cosmwasm/bundle.d.ts | 1969 ++ .../authz/types/codegen/cosmwasm/client.d.ts | 47 + .../types/codegen/cosmwasm/rpc.query.d.ts | 66 + .../authz/types/codegen/cosmwasm/rpc.tx.d.ts | 52 + .../codegen/cosmwasm/wasm/v1/genesis.d.ts | 256 + .../types/codegen/cosmwasm/wasm/v1/ibc.d.ts | 119 + .../codegen/cosmwasm/wasm/v1/proposal.d.ts | 596 + .../types/codegen/cosmwasm/wasm/v1/query.d.ts | 999 + .../cosmwasm/wasm/v1/query.rpc.Query.d.ts | 134 + .../codegen/cosmwasm/wasm/v1/tx.amino.d.ts | 33 + .../types/codegen/cosmwasm/wasm/v1/tx.d.ts | 616 + .../codegen/cosmwasm/wasm/v1/tx.registry.d.ts | 137 + .../codegen/cosmwasm/wasm/v1/tx.rpc.msg.d.ts | 28 + .../types/codegen/cosmwasm/wasm/v1/types.d.ts | 477 + examples/authz/types/codegen/extern.d.ts | 9 + .../authz/types/codegen/gogoproto/bundle.d.ts | 1 + .../authz/types/codegen/gogoproto/gogo.d.ts | 1 + .../types/codegen/google/api/annotations.d.ts | 1 + .../authz/types/codegen/google/api/http.d.ts | 1084 + .../authz/types/codegen/google/bundle.d.ts | 1948 ++ .../types/codegen/google/protobuf/any.d.ts | 346 + .../codegen/google/protobuf/descriptor.d.ts | 2468 ++ .../codegen/google/protobuf/duration.d.ts | 231 + .../types/codegen/google/protobuf/empty.d.ts | 68 + .../codegen/google/protobuf/timestamp.d.ts | 301 + examples/authz/types/codegen/helpers.d.ts | 81 + examples/authz/types/codegen/hooks.d.ts | 406 + .../ibc/applications/transfer/v1/genesis.d.ts | 50 + .../ibc/applications/transfer/v1/query.d.ts | 298 + .../transfer/v1/query.rpc.Query.d.ts | 56 + .../applications/transfer/v1/transfer.d.ts | 140 + .../applications/transfer/v1/tx.amino.d.ts | 8 + .../ibc/applications/transfer/v1/tx.d.ts | 139 + .../applications/transfer/v1/tx.registry.d.ts | 37 + .../applications/transfer/v1/tx.rpc.msg.d.ts | 13 + .../ibc/applications/transfer/v2/packet.d.ts | 72 + examples/authz/types/codegen/ibc/bundle.d.ts | 6530 +++++ examples/authz/types/codegen/ibc/client.d.ts | 112 + .../codegen/ibc/core/channel/v1/channel.d.ts | 491 + .../codegen/ibc/core/channel/v1/genesis.d.ts | 123 + .../codegen/ibc/core/channel/v1/query.d.ts | 1574 ++ .../ibc/core/channel/v1/query.rpc.Query.d.ts | 274 + .../codegen/ibc/core/channel/v1/tx.amino.d.ts | 53 + .../types/codegen/ibc/core/channel/v1/tx.d.ts | 994 + .../ibc/core/channel/v1/tx.registry.d.ts | 217 + .../ibc/core/channel/v1/tx.rpc.msg.d.ts | 43 + .../codegen/ibc/core/client/v1/client.d.ts | 457 + .../codegen/ibc/core/client/v1/genesis.d.ts | 179 + .../codegen/ibc/core/client/v1/query.d.ts | 882 + .../ibc/core/client/v1/query.rpc.Query.d.ts | 143 + .../codegen/ibc/core/client/v1/tx.amino.d.ts | 23 + .../types/codegen/ibc/core/client/v1/tx.d.ts | 430 + .../ibc/core/client/v1/tx.registry.d.ts | 97 + .../ibc/core/client/v1/tx.rpc.msg.d.ts | 22 + .../ibc/core/commitment/v1/commitment.d.ts | 218 + .../ibc/core/connection/v1/connection.d.ts | 464 + .../ibc/core/connection/v1/genesis.d.ts | 55 + .../codegen/ibc/core/connection/v1/query.d.ts | 588 + .../core/connection/v1/query.rpc.Query.d.ts | 115 + .../ibc/core/connection/v1/tx.amino.d.ts | 23 + .../codegen/ibc/core/connection/v1/tx.d.ts | 490 + .../ibc/core/connection/v1/tx.registry.d.ts | 97 + .../ibc/core/connection/v1/tx.rpc.msg.d.ts | 25 + .../types/codegen/ibc/core/port/v1/query.d.ts | 114 + .../ibc/core/port/v1/query.rpc.Query.d.ts | 30 + .../codegen/ibc/core/types/v1/genesis.d.ts | 64 + .../lightclients/localhost/v1/localhost.d.ts | 60 + .../solomachine/v1/solomachine.d.ts | 921 + .../solomachine/v2/solomachine.d.ts | 921 + .../tendermint/v1/tendermint.d.ts | 395 + .../authz/types/codegen/ibc/rpc.query.d.ts | 82 + examples/authz/types/codegen/ibc/rpc.tx.d.ts | 65 + .../authz/types/codegen/ics23/bundle.d.ts | 729 + examples/authz/types/codegen/index.d.ts | 28 + examples/authz/types/codegen/mobx.d.ts | 23 + examples/authz/types/codegen/mobx.stores.d.ts | 1445 ++ .../authz/types/codegen/osmosis/bundle.d.ts | 7902 ++++++ .../codegen/osmosis/claim/v1beta1/claim.d.ts | 73 + .../osmosis/claim/v1beta1/genesis.d.ts | 58 + .../codegen/osmosis/claim/v1beta1/params.d.ts | 55 + .../codegen/osmosis/claim/v1beta1/query.d.ts | 398 + .../claim/v1beta1/query.rpc.Query.d.ts | 77 + .../authz/types/codegen/osmosis/client.d.ts | 157 + .../types/codegen/osmosis/epochs/genesis.d.ts | 202 + .../types/codegen/osmosis/epochs/query.d.ts | 152 + .../osmosis/epochs/query.rpc.Query.d.ts | 43 + .../pool-models/balancer/balancerPool.d.ts | 351 + .../pool-models/balancer/tx/tx.amino.d.ts | 8 + .../gamm/pool-models/balancer/tx/tx.d.ts | 94 + .../pool-models/balancer/tx/tx.registry.d.ts | 37 + .../pool-models/balancer/tx/tx.rpc.msg.d.ts | 11 + .../stableswap/stableswap_pool.d.ts | 154 + .../gamm/pool-models/stableswap/tx.amino.d.ts | 13 + .../gamm/pool-models/stableswap/tx.d.ts | 192 + .../pool-models/stableswap/tx.registry.d.ts | 57 + .../pool-models/stableswap/tx.rpc.msg.d.ts | 13 + .../osmosis/gamm/v1beta1/tx.amino.d.ts | 43 + .../codegen/osmosis/gamm/v1beta1/tx.d.ts | 816 + .../types/codegen/osmosis/gamm/v2/query.d.ts | 110 + .../osmosis/gamm/v2/query.rpc.Query.d.ts | 40 + .../ibc-rate-limit/v1beta1/params.d.ts | 43 + .../osmosis/ibc-rate-limit/v1beta1/query.d.ts | 84 + .../v1beta1/query.rpc.Query.d.ts | 41 + .../codegen/osmosis/incentives/gauge.d.ts | 171 + .../codegen/osmosis/incentives/genesis.d.ts | 84 + .../codegen/osmosis/incentives/params.d.ts | 51 + .../codegen/osmosis/incentives/query.d.ts | 773 + .../osmosis/incentives/query.rpc.Query.d.ts | 170 + .../codegen/osmosis/incentives/tx.amino.d.ts | 13 + .../types/codegen/osmosis/incentives/tx.d.ts | 219 + .../osmosis/incentives/tx.registry.d.ts | 57 + .../osmosis/incentives/tx.rpc.msg.d.ts | 13 + .../types/codegen/osmosis/lockup/genesis.d.ts | 50 + .../types/codegen/osmosis/lockup/lock.d.ts | 309 + .../types/codegen/osmosis/lockup/params.d.ts | 40 + .../types/codegen/osmosis/lockup/query.d.ts | 1322 + .../osmosis/lockup/query.rpc.Query.d.ts | 260 + .../codegen/osmosis/lockup/tx.amino.d.ts | 28 + .../types/codegen/osmosis/lockup/tx.d.ts | 445 + .../codegen/osmosis/lockup/tx.registry.d.ts | 117 + .../codegen/osmosis/lockup/tx.rpc.msg.d.ts | 24 + .../codegen/osmosis/mint/v1beta1/genesis.d.ts | 62 + .../codegen/osmosis/mint/v1beta1/mint.d.ts | 309 + .../codegen/osmosis/mint/v1beta1/query.d.ts | 183 + .../osmosis/mint/v1beta1/query.rpc.Query.d.ts | 43 + .../pool-incentives/v1beta1/genesis.d.ts | 56 + .../osmosis/pool-incentives/v1beta1/gov.d.ts | 149 + .../pool-incentives/v1beta1/incentives.d.ts | 255 + .../pool-incentives/v1beta1/query.d.ts | 534 + .../v1beta1/query.rpc.Query.d.ts | 94 + .../types/codegen/osmosis/rpc.query.d.ts | 93 + .../authz/types/codegen/osmosis/rpc.tx.d.ts | 65 + .../codegen/osmosis/sumtree/v1beta1/tree.d.ts | 119 + .../codegen/osmosis/superfluid/genesis.d.ts | 81 + .../codegen/osmosis/superfluid/params.d.ts | 55 + .../codegen/osmosis/superfluid/query.d.ts | 1268 + .../osmosis/superfluid/query.rpc.Query.d.ts | 270 + .../osmosis/superfluid/superfluid.d.ts | 357 + .../codegen/osmosis/superfluid/tx.amino.d.ts | 28 + .../types/codegen/osmosis/superfluid/tx.d.ts | 440 + .../osmosis/superfluid/tx.registry.d.ts | 117 + .../osmosis/superfluid/tx.rpc.msg.d.ts | 27 + .../osmosis/superfluid/v1beta1/gov.d.ts | 180 + .../v1beta1/authorityMetadata.d.ts | 57 + .../osmosis/tokenfactory/v1beta1/genesis.d.ts | 106 + .../osmosis/tokenfactory/v1beta1/params.d.ts | 44 + .../osmosis/tokenfactory/v1beta1/query.d.ts | 285 + .../tokenfactory/v1beta1/query.rpc.Query.d.ts | 89 + .../tokenfactory/v1beta1/tx.amino.d.ts | 28 + .../osmosis/tokenfactory/v1beta1/tx.d.ts | 509 + .../tokenfactory/v1beta1/tx.registry.d.ts | 117 + .../tokenfactory/v1beta1/tx.rpc.msg.d.ts | 20 + .../codegen/osmosis/twap/v1beta1/genesis.d.ts | 96 + .../codegen/osmosis/twap/v1beta1/query.d.ts | 249 + .../osmosis/twap/v1beta1/query.rpc.Query.d.ts | 52 + .../osmosis/twap/v1beta1/twap_record.d.ts | 126 + .../osmosis/txfees/v1beta1/feetoken.d.ts | 61 + .../osmosis/txfees/v1beta1/genesis.d.ts | 47 + .../codegen/osmosis/txfees/v1beta1/gov.d.ts | 70 + .../codegen/osmosis/txfees/v1beta1/query.d.ts | 328 + .../txfees/v1beta1/query.rpc.Query.d.ts | 82 + examples/authz/types/codegen/react-query.d.ts | 29 + examples/authz/types/codegen/registry.d.ts | 33 + .../types/codegen/tendermint/abci/types.d.ts | 2097 ++ .../types/codegen/tendermint/bundle.d.ts | 3261 +++ .../types/codegen/tendermint/crypto/keys.d.ts | 44 + .../codegen/tendermint/crypto/proof.d.ts | 228 + .../codegen/tendermint/libs/bits/types.d.ts | 41 + .../types/codegen/tendermint/p2p/types.d.ts | 227 + .../types/codegen/tendermint/types/block.d.ts | 49 + .../codegen/tendermint/types/evidence.d.ts | 181 + .../codegen/tendermint/types/params.d.ts | 355 + .../types/codegen/tendermint/types/types.d.ts | 691 + .../codegen/tendermint/types/validator.d.ts | 129 + .../codegen/tendermint/version/types.d.ts | 110 + examples/authz/types/codegen/types.d.ts | 117 + examples/authz/types/codegen/utf8.d.ts | 27 + examples/authz/types/codegen/varint.d.ts | 105 + examples/authz/types/config.d.ts | 19 + examples/authz/types/index.d.ts | 3 + examples/authz/types/utils.d.ts | 6 + examples/authz/utils/authz.ts | 159 + examples/authz/utils/calc.ts | 38 + examples/authz/utils/chain.ts | 44 + examples/authz/utils/index.ts | 6 + examples/authz/utils/logos.ts | 123 + examples/authz/utils/staking.ts | 190 + examples/authz/utils/vote.ts | 94 + examples/authz/yarn.lock | 16108 ++++++++++++ 638 files changed, 161994 insertions(+) create mode 100644 examples/authz/.eslintrc.json create mode 100644 examples/authz/.gitignore create mode 100644 examples/authz/.yarnrc.yml create mode 100644 examples/authz/CHANGELOG.md create mode 100644 examples/authz/README.md create mode 100644 examples/authz/components/authz/AuthzSection.tsx create mode 100644 examples/authz/components/authz/CustomizationField.tsx create mode 100644 examples/authz/components/authz/GrantCard.tsx create mode 100644 examples/authz/components/authz/GrantDetailsModal.tsx create mode 100644 examples/authz/components/authz/GrantModal.tsx create mode 100644 examples/authz/components/authz/Grants.tsx create mode 100644 examples/authz/components/authz/LoginInfoBanner.tsx create mode 100644 examples/authz/components/authz/PermissionDetailCard.tsx create mode 100644 examples/authz/components/authz/SelectValidatorsModal.tsx create mode 100644 examples/authz/components/authz/index.ts create mode 100644 examples/authz/components/claim-rewards/ClaimRewardsSection.tsx create mode 100644 examples/authz/components/claim-rewards/Overview.tsx create mode 100644 examples/authz/components/claim-rewards/index.ts create mode 100644 examples/authz/components/common/AddressInput.tsx create mode 100644 examples/authz/components/common/Footer.tsx create mode 100644 examples/authz/components/common/Header.tsx create mode 100644 examples/authz/components/common/Layout.tsx create mode 100644 examples/authz/components/common/index.ts create mode 100644 examples/authz/components/index.tsx create mode 100644 examples/authz/components/send/index.ts create mode 100644 examples/authz/components/send/send.tsx create mode 100644 examples/authz/components/staking/AllValidators.tsx create mode 100644 examples/authz/components/staking/AllValidatorsList.tsx create mode 100644 examples/authz/components/staking/DelegateModal.tsx create mode 100644 examples/authz/components/staking/Overview.tsx create mode 100644 examples/authz/components/staking/StakingSection.tsx create mode 100644 examples/authz/components/staking/index.ts create mode 100644 examples/authz/components/voting/Proposal.tsx create mode 100644 examples/authz/components/voting/Voting.tsx create mode 100644 examples/authz/components/voting/index.ts create mode 100644 examples/authz/components/wallet/Astronaut.tsx create mode 100644 examples/authz/components/wallet/Chain.tsx create mode 100644 examples/authz/components/wallet/ChainCard.tsx create mode 100644 examples/authz/components/wallet/Connect.tsx create mode 100644 examples/authz/components/wallet/User.tsx create mode 100644 examples/authz/components/wallet/Wallet.tsx create mode 100644 examples/authz/components/wallet/Warning.tsx create mode 100644 examples/authz/components/wallet/index.ts create mode 100644 examples/authz/configs/defaults.ts create mode 100644 examples/authz/configs/features.ts create mode 100644 examples/authz/configs/index.ts create mode 100644 examples/authz/configs/permissions.ts create mode 100644 examples/authz/context/authz-context.tsx create mode 100644 examples/authz/context/index.ts create mode 100644 examples/authz/hooks/index.ts create mode 100644 examples/authz/hooks/useAuthzTx.ts create mode 100644 examples/authz/hooks/useDisclosure.ts create mode 100644 examples/authz/hooks/useGrants.ts create mode 100644 examples/authz/hooks/useModal.ts create mode 100644 examples/authz/hooks/usePrices.ts create mode 100644 examples/authz/hooks/useQueryHooks.ts create mode 100644 examples/authz/hooks/useSendData.ts create mode 100644 examples/authz/hooks/useStakingData.ts create mode 100644 examples/authz/hooks/useToast.tsx create mode 100644 examples/authz/hooks/useTx.ts create mode 100644 examples/authz/hooks/useValidatorLogos.ts create mode 100644 examples/authz/hooks/useValidators.ts create mode 100644 examples/authz/hooks/useVotingData.ts create mode 100644 examples/authz/next.config.js create mode 100644 examples/authz/package.json create mode 100644 examples/authz/pages/_app.tsx create mode 100644 examples/authz/pages/claim-rewards.tsx create mode 100644 examples/authz/pages/index.tsx create mode 100644 examples/authz/pages/send.tsx create mode 100644 examples/authz/pages/stake.tsx create mode 100644 examples/authz/pages/vote.tsx create mode 100644 examples/authz/proto/confio/LICENSE create mode 100644 examples/authz/proto/confio/README.md create mode 100644 examples/authz/proto/confio/proofs.proto create mode 100644 examples/authz/proto/cosmos/LICENSE create mode 100644 examples/authz/proto/cosmos/README.md create mode 100644 examples/authz/proto/cosmos/app/v1alpha1/config.proto create mode 100644 examples/authz/proto/cosmos/app/v1alpha1/module.proto create mode 100644 examples/authz/proto/cosmos/app/v1alpha1/query.proto create mode 100644 examples/authz/proto/cosmos/auth/v1beta1/auth.proto create mode 100644 examples/authz/proto/cosmos/auth/v1beta1/genesis.proto create mode 100644 examples/authz/proto/cosmos/auth/v1beta1/query.proto create mode 100644 examples/authz/proto/cosmos/authz/v1beta1/authz.proto create mode 100644 examples/authz/proto/cosmos/authz/v1beta1/event.proto create mode 100644 examples/authz/proto/cosmos/authz/v1beta1/genesis.proto create mode 100644 examples/authz/proto/cosmos/authz/v1beta1/query.proto create mode 100644 examples/authz/proto/cosmos/authz/v1beta1/tx.proto create mode 100644 examples/authz/proto/cosmos/bank/v1beta1/authz.proto create mode 100644 examples/authz/proto/cosmos/bank/v1beta1/bank.proto create mode 100644 examples/authz/proto/cosmos/bank/v1beta1/genesis.proto create mode 100644 examples/authz/proto/cosmos/bank/v1beta1/query.proto create mode 100644 examples/authz/proto/cosmos/bank/v1beta1/tx.proto create mode 100644 examples/authz/proto/cosmos/base/abci/v1beta1/abci.proto create mode 100644 examples/authz/proto/cosmos/base/kv/v1beta1/kv.proto create mode 100644 examples/authz/proto/cosmos/base/query/v1beta1/pagination.proto create mode 100644 examples/authz/proto/cosmos/base/reflection/v1beta1/reflection.proto create mode 100644 examples/authz/proto/cosmos/base/reflection/v2alpha1/reflection.proto create mode 100644 examples/authz/proto/cosmos/base/snapshots/v1beta1/snapshot.proto create mode 100644 examples/authz/proto/cosmos/base/store/v1beta1/commit_info.proto create mode 100644 examples/authz/proto/cosmos/base/store/v1beta1/listening.proto create mode 100644 examples/authz/proto/cosmos/base/tendermint/v1beta1/query.proto create mode 100644 examples/authz/proto/cosmos/base/v1beta1/coin.proto create mode 100644 examples/authz/proto/cosmos/capability/v1beta1/capability.proto create mode 100644 examples/authz/proto/cosmos/capability/v1beta1/genesis.proto create mode 100644 examples/authz/proto/cosmos/crisis/v1beta1/genesis.proto create mode 100644 examples/authz/proto/cosmos/crisis/v1beta1/tx.proto create mode 100644 examples/authz/proto/cosmos/crypto/ed25519/keys.proto create mode 100644 examples/authz/proto/cosmos/crypto/hd/v1/hd.proto create mode 100644 examples/authz/proto/cosmos/crypto/keyring/v1/record.proto create mode 100644 examples/authz/proto/cosmos/crypto/multisig/keys.proto create mode 100644 examples/authz/proto/cosmos/crypto/multisig/v1beta1/multisig.proto create mode 100644 examples/authz/proto/cosmos/crypto/secp256k1/keys.proto create mode 100644 examples/authz/proto/cosmos/crypto/secp256r1/keys.proto create mode 100644 examples/authz/proto/cosmos/distribution/v1beta1/distribution.proto create mode 100644 examples/authz/proto/cosmos/distribution/v1beta1/genesis.proto create mode 100644 examples/authz/proto/cosmos/distribution/v1beta1/query.proto create mode 100644 examples/authz/proto/cosmos/distribution/v1beta1/tx.proto create mode 100644 examples/authz/proto/cosmos/evidence/v1beta1/evidence.proto create mode 100644 examples/authz/proto/cosmos/evidence/v1beta1/genesis.proto create mode 100644 examples/authz/proto/cosmos/evidence/v1beta1/query.proto create mode 100644 examples/authz/proto/cosmos/evidence/v1beta1/tx.proto create mode 100644 examples/authz/proto/cosmos/feegrant/v1beta1/feegrant.proto create mode 100644 examples/authz/proto/cosmos/feegrant/v1beta1/genesis.proto create mode 100644 examples/authz/proto/cosmos/feegrant/v1beta1/query.proto create mode 100644 examples/authz/proto/cosmos/feegrant/v1beta1/tx.proto create mode 100644 examples/authz/proto/cosmos/genutil/v1beta1/genesis.proto create mode 100644 examples/authz/proto/cosmos/gov/v1/genesis.proto create mode 100644 examples/authz/proto/cosmos/gov/v1/gov.proto create mode 100644 examples/authz/proto/cosmos/gov/v1/query.proto create mode 100644 examples/authz/proto/cosmos/gov/v1/tx.proto create mode 100644 examples/authz/proto/cosmos/gov/v1beta1/genesis.proto create mode 100644 examples/authz/proto/cosmos/gov/v1beta1/gov.proto create mode 100644 examples/authz/proto/cosmos/gov/v1beta1/query.proto create mode 100644 examples/authz/proto/cosmos/gov/v1beta1/tx.proto create mode 100644 examples/authz/proto/cosmos/group/v1/events.proto create mode 100644 examples/authz/proto/cosmos/group/v1/genesis.proto create mode 100644 examples/authz/proto/cosmos/group/v1/query.proto create mode 100644 examples/authz/proto/cosmos/group/v1/tx.proto create mode 100644 examples/authz/proto/cosmos/group/v1/types.proto create mode 100644 examples/authz/proto/cosmos/mint/v1beta1/genesis.proto create mode 100644 examples/authz/proto/cosmos/mint/v1beta1/mint.proto create mode 100644 examples/authz/proto/cosmos/mint/v1beta1/query.proto create mode 100644 examples/authz/proto/cosmos/msg/v1/msg.proto create mode 100644 examples/authz/proto/cosmos/nft/v1beta1/event.proto create mode 100644 examples/authz/proto/cosmos/nft/v1beta1/genesis.proto create mode 100644 examples/authz/proto/cosmos/nft/v1beta1/nft.proto create mode 100644 examples/authz/proto/cosmos/nft/v1beta1/query.proto create mode 100644 examples/authz/proto/cosmos/nft/v1beta1/tx.proto create mode 100644 examples/authz/proto/cosmos/orm/v1/orm.proto create mode 100644 examples/authz/proto/cosmos/orm/v1alpha1/schema.proto create mode 100644 examples/authz/proto/cosmos/params/v1beta1/params.proto create mode 100644 examples/authz/proto/cosmos/params/v1beta1/query.proto create mode 100644 examples/authz/proto/cosmos/slashing/v1beta1/genesis.proto create mode 100644 examples/authz/proto/cosmos/slashing/v1beta1/query.proto create mode 100644 examples/authz/proto/cosmos/slashing/v1beta1/slashing.proto create mode 100644 examples/authz/proto/cosmos/slashing/v1beta1/tx.proto create mode 100644 examples/authz/proto/cosmos/staking/v1beta1/authz.proto create mode 100644 examples/authz/proto/cosmos/staking/v1beta1/genesis.proto create mode 100644 examples/authz/proto/cosmos/staking/v1beta1/query.proto create mode 100644 examples/authz/proto/cosmos/staking/v1beta1/staking.proto create mode 100644 examples/authz/proto/cosmos/staking/v1beta1/tx.proto create mode 100644 examples/authz/proto/cosmos/tx/signing/v1beta1/signing.proto create mode 100644 examples/authz/proto/cosmos/tx/v1beta1/service.proto create mode 100644 examples/authz/proto/cosmos/tx/v1beta1/tx.proto create mode 100644 examples/authz/proto/cosmos/upgrade/v1beta1/query.proto create mode 100644 examples/authz/proto/cosmos/upgrade/v1beta1/tx.proto create mode 100644 examples/authz/proto/cosmos/upgrade/v1beta1/upgrade.proto create mode 100644 examples/authz/proto/cosmos/vesting/v1beta1/tx.proto create mode 100644 examples/authz/proto/cosmos/vesting/v1beta1/vesting.proto create mode 100644 examples/authz/proto/cosmos_proto/LICENSE create mode 100644 examples/authz/proto/cosmos_proto/README.md create mode 100644 examples/authz/proto/cosmos_proto/cosmos.proto create mode 100644 examples/authz/proto/cosmwasm/LICENSE create mode 100644 examples/authz/proto/cosmwasm/README.md create mode 100644 examples/authz/proto/cosmwasm/wasm/v1/genesis.proto create mode 100644 examples/authz/proto/cosmwasm/wasm/v1/ibc.proto create mode 100644 examples/authz/proto/cosmwasm/wasm/v1/proposal.proto create mode 100644 examples/authz/proto/cosmwasm/wasm/v1/query.proto create mode 100644 examples/authz/proto/cosmwasm/wasm/v1/tx.proto create mode 100644 examples/authz/proto/cosmwasm/wasm/v1/types.proto create mode 100644 examples/authz/proto/gogoproto/LICENSE create mode 100644 examples/authz/proto/gogoproto/README.md create mode 100644 examples/authz/proto/gogoproto/gogo.proto create mode 100644 examples/authz/proto/google/LICENSE create mode 100644 examples/authz/proto/google/README.md create mode 100644 examples/authz/proto/google/api/annotations.proto create mode 100644 examples/authz/proto/google/api/http.proto create mode 100644 examples/authz/proto/google/protobuf/any.proto create mode 100644 examples/authz/proto/google/protobuf/descriptor.proto create mode 100644 examples/authz/proto/google/protobuf/duration.proto create mode 100644 examples/authz/proto/google/protobuf/empty.proto create mode 100644 examples/authz/proto/google/protobuf/timestamp.proto create mode 100644 examples/authz/proto/ibc/LICENSE create mode 100644 examples/authz/proto/ibc/README.md create mode 100644 examples/authz/proto/ibc/applications/transfer/v1/genesis.proto create mode 100644 examples/authz/proto/ibc/applications/transfer/v1/query.proto create mode 100644 examples/authz/proto/ibc/applications/transfer/v1/transfer.proto create mode 100644 examples/authz/proto/ibc/applications/transfer/v1/tx.proto create mode 100644 examples/authz/proto/ibc/applications/transfer/v2/packet.proto create mode 100644 examples/authz/proto/ibc/core/channel/v1/channel.proto create mode 100644 examples/authz/proto/ibc/core/channel/v1/genesis.proto create mode 100644 examples/authz/proto/ibc/core/channel/v1/query.proto create mode 100644 examples/authz/proto/ibc/core/channel/v1/tx.proto create mode 100644 examples/authz/proto/ibc/core/client/v1/client.proto create mode 100644 examples/authz/proto/ibc/core/client/v1/genesis.proto create mode 100644 examples/authz/proto/ibc/core/client/v1/query.proto create mode 100644 examples/authz/proto/ibc/core/client/v1/tx.proto create mode 100644 examples/authz/proto/ibc/core/commitment/v1/commitment.proto create mode 100644 examples/authz/proto/ibc/core/connection/v1/connection.proto create mode 100644 examples/authz/proto/ibc/core/connection/v1/genesis.proto create mode 100644 examples/authz/proto/ibc/core/connection/v1/query.proto create mode 100644 examples/authz/proto/ibc/core/connection/v1/tx.proto create mode 100644 examples/authz/proto/ibc/core/port/v1/query.proto create mode 100644 examples/authz/proto/ibc/core/types/v1/genesis.proto create mode 100644 examples/authz/proto/ibc/lightclients/localhost/v1/localhost.proto create mode 100644 examples/authz/proto/ibc/lightclients/solomachine/v1/solomachine.proto create mode 100644 examples/authz/proto/ibc/lightclients/solomachine/v2/solomachine.proto create mode 100644 examples/authz/proto/ibc/lightclients/tendermint/v1/tendermint.proto create mode 100644 examples/authz/proto/osmosis/claim/v1beta1/claim.proto create mode 100644 examples/authz/proto/osmosis/claim/v1beta1/genesis.proto create mode 100644 examples/authz/proto/osmosis/claim/v1beta1/params.proto create mode 100644 examples/authz/proto/osmosis/claim/v1beta1/query.proto create mode 100644 examples/authz/proto/osmosis/epochs/genesis.proto create mode 100644 examples/authz/proto/osmosis/epochs/query.proto create mode 100644 examples/authz/proto/osmosis/gamm/pool-models/balancer/balancerPool.proto create mode 100644 examples/authz/proto/osmosis/gamm/pool-models/balancer/tx/tx.proto create mode 100644 examples/authz/proto/osmosis/gamm/pool-models/stableswap/stableswap_pool.proto create mode 100644 examples/authz/proto/osmosis/gamm/pool-models/stableswap/tx.proto create mode 100644 examples/authz/proto/osmosis/gamm/v1beta1/genesis.proto create mode 100644 examples/authz/proto/osmosis/gamm/v1beta1/query.proto create mode 100644 examples/authz/proto/osmosis/gamm/v1beta1/tx.proto create mode 100644 examples/authz/proto/osmosis/gamm/v2/query.proto create mode 100644 examples/authz/proto/osmosis/ibc-rate-limit/v1beta1/params.proto create mode 100644 examples/authz/proto/osmosis/ibc-rate-limit/v1beta1/query.proto create mode 100644 examples/authz/proto/osmosis/incentives/gauge.proto create mode 100644 examples/authz/proto/osmosis/incentives/genesis.proto create mode 100644 examples/authz/proto/osmosis/incentives/params.proto create mode 100644 examples/authz/proto/osmosis/incentives/query.proto create mode 100644 examples/authz/proto/osmosis/incentives/tx.proto create mode 100644 examples/authz/proto/osmosis/lockup/genesis.proto create mode 100644 examples/authz/proto/osmosis/lockup/lock.proto create mode 100644 examples/authz/proto/osmosis/lockup/params.proto create mode 100644 examples/authz/proto/osmosis/lockup/query.proto create mode 100644 examples/authz/proto/osmosis/lockup/tx.proto create mode 100644 examples/authz/proto/osmosis/mint/v1beta1/genesis.proto create mode 100644 examples/authz/proto/osmosis/mint/v1beta1/mint.proto create mode 100644 examples/authz/proto/osmosis/mint/v1beta1/query.proto create mode 100644 examples/authz/proto/osmosis/pool-incentives/v1beta1/genesis.proto create mode 100644 examples/authz/proto/osmosis/pool-incentives/v1beta1/gov.proto create mode 100644 examples/authz/proto/osmosis/pool-incentives/v1beta1/incentives.proto create mode 100644 examples/authz/proto/osmosis/pool-incentives/v1beta1/query.proto create mode 100644 examples/authz/proto/osmosis/sumtree/v1beta1/tree.proto create mode 100644 examples/authz/proto/osmosis/superfluid/genesis.proto create mode 100644 examples/authz/proto/osmosis/superfluid/params.proto create mode 100644 examples/authz/proto/osmosis/superfluid/query.proto create mode 100644 examples/authz/proto/osmosis/superfluid/superfluid.proto create mode 100644 examples/authz/proto/osmosis/superfluid/tx.proto create mode 100644 examples/authz/proto/osmosis/superfluid/v1beta1/gov.proto create mode 100644 examples/authz/proto/osmosis/tokenfactory/v1beta1/authorityMetadata.proto create mode 100644 examples/authz/proto/osmosis/tokenfactory/v1beta1/genesis.proto create mode 100644 examples/authz/proto/osmosis/tokenfactory/v1beta1/params.proto create mode 100644 examples/authz/proto/osmosis/tokenfactory/v1beta1/query.proto create mode 100644 examples/authz/proto/osmosis/tokenfactory/v1beta1/tx.proto create mode 100644 examples/authz/proto/osmosis/twap/v1beta1/genesis.proto create mode 100644 examples/authz/proto/osmosis/twap/v1beta1/query.proto create mode 100644 examples/authz/proto/osmosis/twap/v1beta1/query.yml create mode 100644 examples/authz/proto/osmosis/twap/v1beta1/twap_record.proto create mode 100644 examples/authz/proto/osmosis/txfees/v1beta1/feetoken.proto create mode 100644 examples/authz/proto/osmosis/txfees/v1beta1/genesis.proto create mode 100644 examples/authz/proto/osmosis/txfees/v1beta1/gov.proto create mode 100644 examples/authz/proto/osmosis/txfees/v1beta1/query.proto create mode 100644 examples/authz/proto/tendermint/LICENSE create mode 100644 examples/authz/proto/tendermint/README.md create mode 100644 examples/authz/proto/tendermint/abci/types.proto create mode 100644 examples/authz/proto/tendermint/crypto/keys.proto create mode 100644 examples/authz/proto/tendermint/crypto/proof.proto create mode 100644 examples/authz/proto/tendermint/libs/bits/types.proto create mode 100644 examples/authz/proto/tendermint/p2p/types.proto create mode 100644 examples/authz/proto/tendermint/types/block.proto create mode 100644 examples/authz/proto/tendermint/types/evidence.proto create mode 100644 examples/authz/proto/tendermint/types/params.proto create mode 100644 examples/authz/proto/tendermint/types/types.proto create mode 100644 examples/authz/proto/tendermint/types/validator.proto create mode 100644 examples/authz/proto/tendermint/version/types.proto create mode 100644 examples/authz/public/image/favicon.ico create mode 100644 examples/authz/scripts/codegen.js create mode 100644 examples/authz/styles/custom.module.css create mode 100644 examples/authz/tsconfig.json create mode 100644 examples/authz/types/codegen/binary.d.ts create mode 100644 examples/authz/types/codegen/confio/proofs.d.ts create mode 100644 examples/authz/types/codegen/cosmos/app/v1alpha1/config.d.ts create mode 100644 examples/authz/types/codegen/cosmos/app/v1alpha1/module.d.ts create mode 100644 examples/authz/types/codegen/cosmos/app/v1alpha1/query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/app/v1alpha1/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/auth/v1beta1/auth.d.ts create mode 100644 examples/authz/types/codegen/cosmos/auth/v1beta1/genesis.d.ts create mode 100644 examples/authz/types/codegen/cosmos/auth/v1beta1/query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/auth/v1beta1/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/authz/v1beta1/authz.d.ts create mode 100644 examples/authz/types/codegen/cosmos/authz/v1beta1/event.d.ts create mode 100644 examples/authz/types/codegen/cosmos/authz/v1beta1/genesis.d.ts create mode 100644 examples/authz/types/codegen/cosmos/authz/v1beta1/query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/authz/v1beta1/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/authz/v1beta1/tx.amino.d.ts create mode 100644 examples/authz/types/codegen/cosmos/authz/v1beta1/tx.d.ts create mode 100644 examples/authz/types/codegen/cosmos/authz/v1beta1/tx.registry.d.ts create mode 100644 examples/authz/types/codegen/cosmos/authz/v1beta1/tx.rpc.msg.d.ts create mode 100644 examples/authz/types/codegen/cosmos/bank/v1beta1/authz.d.ts create mode 100644 examples/authz/types/codegen/cosmos/bank/v1beta1/bank.d.ts create mode 100644 examples/authz/types/codegen/cosmos/bank/v1beta1/genesis.d.ts create mode 100644 examples/authz/types/codegen/cosmos/bank/v1beta1/query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/bank/v1beta1/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/bank/v1beta1/tx.amino.d.ts create mode 100644 examples/authz/types/codegen/cosmos/bank/v1beta1/tx.d.ts create mode 100644 examples/authz/types/codegen/cosmos/bank/v1beta1/tx.registry.d.ts create mode 100644 examples/authz/types/codegen/cosmos/bank/v1beta1/tx.rpc.msg.d.ts create mode 100644 examples/authz/types/codegen/cosmos/base/abci/v1beta1/abci.d.ts create mode 100644 examples/authz/types/codegen/cosmos/base/kv/v1beta1/kv.d.ts create mode 100644 examples/authz/types/codegen/cosmos/base/query/v1beta1/pagination.d.ts create mode 100644 examples/authz/types/codegen/cosmos/base/reflection/v1beta1/reflection.d.ts create mode 100644 examples/authz/types/codegen/cosmos/base/reflection/v2alpha1/reflection.d.ts create mode 100644 examples/authz/types/codegen/cosmos/base/snapshots/v1beta1/snapshot.d.ts create mode 100644 examples/authz/types/codegen/cosmos/base/store/v1beta1/commit_info.d.ts create mode 100644 examples/authz/types/codegen/cosmos/base/store/v1beta1/listening.d.ts create mode 100644 examples/authz/types/codegen/cosmos/base/tendermint/v1beta1/query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/base/tendermint/v1beta1/query.rpc.Service.d.ts create mode 100644 examples/authz/types/codegen/cosmos/base/v1beta1/coin.d.ts create mode 100644 examples/authz/types/codegen/cosmos/bundle.d.ts create mode 100644 examples/authz/types/codegen/cosmos/capability/v1beta1/capability.d.ts create mode 100644 examples/authz/types/codegen/cosmos/capability/v1beta1/genesis.d.ts create mode 100644 examples/authz/types/codegen/cosmos/client.d.ts create mode 100644 examples/authz/types/codegen/cosmos/crisis/v1beta1/genesis.d.ts create mode 100644 examples/authz/types/codegen/cosmos/crisis/v1beta1/tx.amino.d.ts create mode 100644 examples/authz/types/codegen/cosmos/crisis/v1beta1/tx.d.ts create mode 100644 examples/authz/types/codegen/cosmos/crisis/v1beta1/tx.registry.d.ts create mode 100644 examples/authz/types/codegen/cosmos/crisis/v1beta1/tx.rpc.msg.d.ts create mode 100644 examples/authz/types/codegen/cosmos/crypto/ed25519/keys.d.ts create mode 100644 examples/authz/types/codegen/cosmos/crypto/hd/v1/hd.d.ts create mode 100644 examples/authz/types/codegen/cosmos/crypto/keyring/v1/record.d.ts create mode 100644 examples/authz/types/codegen/cosmos/crypto/multisig/keys.d.ts create mode 100644 examples/authz/types/codegen/cosmos/crypto/multisig/v1beta1/multisig.d.ts create mode 100644 examples/authz/types/codegen/cosmos/crypto/secp256k1/keys.d.ts create mode 100644 examples/authz/types/codegen/cosmos/crypto/secp256r1/keys.d.ts create mode 100644 examples/authz/types/codegen/cosmos/distribution/v1beta1/distribution.d.ts create mode 100644 examples/authz/types/codegen/cosmos/distribution/v1beta1/genesis.d.ts create mode 100644 examples/authz/types/codegen/cosmos/distribution/v1beta1/query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/distribution/v1beta1/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/distribution/v1beta1/tx.amino.d.ts create mode 100644 examples/authz/types/codegen/cosmos/distribution/v1beta1/tx.d.ts create mode 100644 examples/authz/types/codegen/cosmos/distribution/v1beta1/tx.registry.d.ts create mode 100644 examples/authz/types/codegen/cosmos/distribution/v1beta1/tx.rpc.msg.d.ts create mode 100644 examples/authz/types/codegen/cosmos/evidence/v1beta1/evidence.d.ts create mode 100644 examples/authz/types/codegen/cosmos/evidence/v1beta1/genesis.d.ts create mode 100644 examples/authz/types/codegen/cosmos/evidence/v1beta1/query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/evidence/v1beta1/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/evidence/v1beta1/tx.amino.d.ts create mode 100644 examples/authz/types/codegen/cosmos/evidence/v1beta1/tx.d.ts create mode 100644 examples/authz/types/codegen/cosmos/evidence/v1beta1/tx.registry.d.ts create mode 100644 examples/authz/types/codegen/cosmos/evidence/v1beta1/tx.rpc.msg.d.ts create mode 100644 examples/authz/types/codegen/cosmos/feegrant/v1beta1/feegrant.d.ts create mode 100644 examples/authz/types/codegen/cosmos/feegrant/v1beta1/genesis.d.ts create mode 100644 examples/authz/types/codegen/cosmos/feegrant/v1beta1/query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/feegrant/v1beta1/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/feegrant/v1beta1/tx.amino.d.ts create mode 100644 examples/authz/types/codegen/cosmos/feegrant/v1beta1/tx.d.ts create mode 100644 examples/authz/types/codegen/cosmos/feegrant/v1beta1/tx.registry.d.ts create mode 100644 examples/authz/types/codegen/cosmos/feegrant/v1beta1/tx.rpc.msg.d.ts create mode 100644 examples/authz/types/codegen/cosmos/genutil/v1beta1/genesis.d.ts create mode 100644 examples/authz/types/codegen/cosmos/gov/v1/genesis.d.ts create mode 100644 examples/authz/types/codegen/cosmos/gov/v1/gov.d.ts create mode 100644 examples/authz/types/codegen/cosmos/gov/v1/query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/gov/v1/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/gov/v1/tx.amino.d.ts create mode 100644 examples/authz/types/codegen/cosmos/gov/v1/tx.d.ts create mode 100644 examples/authz/types/codegen/cosmos/gov/v1/tx.registry.d.ts create mode 100644 examples/authz/types/codegen/cosmos/gov/v1/tx.rpc.msg.d.ts create mode 100644 examples/authz/types/codegen/cosmos/gov/v1beta1/genesis.d.ts create mode 100644 examples/authz/types/codegen/cosmos/gov/v1beta1/gov.d.ts create mode 100644 examples/authz/types/codegen/cosmos/gov/v1beta1/query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/gov/v1beta1/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/gov/v1beta1/tx.amino.d.ts create mode 100644 examples/authz/types/codegen/cosmos/gov/v1beta1/tx.d.ts create mode 100644 examples/authz/types/codegen/cosmos/gov/v1beta1/tx.registry.d.ts create mode 100644 examples/authz/types/codegen/cosmos/gov/v1beta1/tx.rpc.msg.d.ts create mode 100644 examples/authz/types/codegen/cosmos/group/v1/events.d.ts create mode 100644 examples/authz/types/codegen/cosmos/group/v1/genesis.d.ts create mode 100644 examples/authz/types/codegen/cosmos/group/v1/query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/group/v1/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/group/v1/tx.amino.d.ts create mode 100644 examples/authz/types/codegen/cosmos/group/v1/tx.d.ts create mode 100644 examples/authz/types/codegen/cosmos/group/v1/tx.registry.d.ts create mode 100644 examples/authz/types/codegen/cosmos/group/v1/tx.rpc.msg.d.ts create mode 100644 examples/authz/types/codegen/cosmos/group/v1/types.d.ts create mode 100644 examples/authz/types/codegen/cosmos/mint/v1beta1/genesis.d.ts create mode 100644 examples/authz/types/codegen/cosmos/mint/v1beta1/mint.d.ts create mode 100644 examples/authz/types/codegen/cosmos/mint/v1beta1/query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/mint/v1beta1/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/msg/v1/msg.d.ts create mode 100644 examples/authz/types/codegen/cosmos/nft/v1beta1/event.d.ts create mode 100644 examples/authz/types/codegen/cosmos/nft/v1beta1/genesis.d.ts create mode 100644 examples/authz/types/codegen/cosmos/nft/v1beta1/nft.d.ts create mode 100644 examples/authz/types/codegen/cosmos/nft/v1beta1/query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/nft/v1beta1/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/nft/v1beta1/tx.amino.d.ts create mode 100644 examples/authz/types/codegen/cosmos/nft/v1beta1/tx.d.ts create mode 100644 examples/authz/types/codegen/cosmos/nft/v1beta1/tx.registry.d.ts create mode 100644 examples/authz/types/codegen/cosmos/nft/v1beta1/tx.rpc.msg.d.ts create mode 100644 examples/authz/types/codegen/cosmos/orm/v1/orm.d.ts create mode 100644 examples/authz/types/codegen/cosmos/orm/v1alpha1/schema.d.ts create mode 100644 examples/authz/types/codegen/cosmos/params/v1beta1/params.d.ts create mode 100644 examples/authz/types/codegen/cosmos/params/v1beta1/query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/params/v1beta1/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/rpc.query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/rpc.tx.d.ts create mode 100644 examples/authz/types/codegen/cosmos/slashing/v1beta1/genesis.d.ts create mode 100644 examples/authz/types/codegen/cosmos/slashing/v1beta1/query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/slashing/v1beta1/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/slashing/v1beta1/slashing.d.ts create mode 100644 examples/authz/types/codegen/cosmos/slashing/v1beta1/tx.amino.d.ts create mode 100644 examples/authz/types/codegen/cosmos/slashing/v1beta1/tx.d.ts create mode 100644 examples/authz/types/codegen/cosmos/slashing/v1beta1/tx.registry.d.ts create mode 100644 examples/authz/types/codegen/cosmos/slashing/v1beta1/tx.rpc.msg.d.ts create mode 100644 examples/authz/types/codegen/cosmos/staking/v1beta1/authz.d.ts create mode 100644 examples/authz/types/codegen/cosmos/staking/v1beta1/genesis.d.ts create mode 100644 examples/authz/types/codegen/cosmos/staking/v1beta1/query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/staking/v1beta1/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/staking/v1beta1/staking.d.ts create mode 100644 examples/authz/types/codegen/cosmos/staking/v1beta1/tx.amino.d.ts create mode 100644 examples/authz/types/codegen/cosmos/staking/v1beta1/tx.d.ts create mode 100644 examples/authz/types/codegen/cosmos/staking/v1beta1/tx.registry.d.ts create mode 100644 examples/authz/types/codegen/cosmos/staking/v1beta1/tx.rpc.msg.d.ts create mode 100644 examples/authz/types/codegen/cosmos/tx/signing/v1beta1/signing.d.ts create mode 100644 examples/authz/types/codegen/cosmos/tx/v1beta1/service.d.ts create mode 100644 examples/authz/types/codegen/cosmos/tx/v1beta1/service.rpc.Service.d.ts create mode 100644 examples/authz/types/codegen/cosmos/tx/v1beta1/tx.d.ts create mode 100644 examples/authz/types/codegen/cosmos/upgrade/v1beta1/query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/upgrade/v1beta1/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/cosmos/upgrade/v1beta1/tx.amino.d.ts create mode 100644 examples/authz/types/codegen/cosmos/upgrade/v1beta1/tx.d.ts create mode 100644 examples/authz/types/codegen/cosmos/upgrade/v1beta1/tx.registry.d.ts create mode 100644 examples/authz/types/codegen/cosmos/upgrade/v1beta1/tx.rpc.msg.d.ts create mode 100644 examples/authz/types/codegen/cosmos/upgrade/v1beta1/upgrade.d.ts create mode 100644 examples/authz/types/codegen/cosmos/vesting/v1beta1/tx.amino.d.ts create mode 100644 examples/authz/types/codegen/cosmos/vesting/v1beta1/tx.d.ts create mode 100644 examples/authz/types/codegen/cosmos/vesting/v1beta1/tx.registry.d.ts create mode 100644 examples/authz/types/codegen/cosmos/vesting/v1beta1/tx.rpc.msg.d.ts create mode 100644 examples/authz/types/codegen/cosmos/vesting/v1beta1/vesting.d.ts create mode 100644 examples/authz/types/codegen/cosmos_proto/bundle.d.ts create mode 100644 examples/authz/types/codegen/cosmos_proto/cosmos.d.ts create mode 100644 examples/authz/types/codegen/cosmwasm/bundle.d.ts create mode 100644 examples/authz/types/codegen/cosmwasm/client.d.ts create mode 100644 examples/authz/types/codegen/cosmwasm/rpc.query.d.ts create mode 100644 examples/authz/types/codegen/cosmwasm/rpc.tx.d.ts create mode 100644 examples/authz/types/codegen/cosmwasm/wasm/v1/genesis.d.ts create mode 100644 examples/authz/types/codegen/cosmwasm/wasm/v1/ibc.d.ts create mode 100644 examples/authz/types/codegen/cosmwasm/wasm/v1/proposal.d.ts create mode 100644 examples/authz/types/codegen/cosmwasm/wasm/v1/query.d.ts create mode 100644 examples/authz/types/codegen/cosmwasm/wasm/v1/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/cosmwasm/wasm/v1/tx.amino.d.ts create mode 100644 examples/authz/types/codegen/cosmwasm/wasm/v1/tx.d.ts create mode 100644 examples/authz/types/codegen/cosmwasm/wasm/v1/tx.registry.d.ts create mode 100644 examples/authz/types/codegen/cosmwasm/wasm/v1/tx.rpc.msg.d.ts create mode 100644 examples/authz/types/codegen/cosmwasm/wasm/v1/types.d.ts create mode 100644 examples/authz/types/codegen/extern.d.ts create mode 100644 examples/authz/types/codegen/gogoproto/bundle.d.ts create mode 100644 examples/authz/types/codegen/gogoproto/gogo.d.ts create mode 100644 examples/authz/types/codegen/google/api/annotations.d.ts create mode 100644 examples/authz/types/codegen/google/api/http.d.ts create mode 100644 examples/authz/types/codegen/google/bundle.d.ts create mode 100644 examples/authz/types/codegen/google/protobuf/any.d.ts create mode 100644 examples/authz/types/codegen/google/protobuf/descriptor.d.ts create mode 100644 examples/authz/types/codegen/google/protobuf/duration.d.ts create mode 100644 examples/authz/types/codegen/google/protobuf/empty.d.ts create mode 100644 examples/authz/types/codegen/google/protobuf/timestamp.d.ts create mode 100644 examples/authz/types/codegen/helpers.d.ts create mode 100644 examples/authz/types/codegen/hooks.d.ts create mode 100644 examples/authz/types/codegen/ibc/applications/transfer/v1/genesis.d.ts create mode 100644 examples/authz/types/codegen/ibc/applications/transfer/v1/query.d.ts create mode 100644 examples/authz/types/codegen/ibc/applications/transfer/v1/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/ibc/applications/transfer/v1/transfer.d.ts create mode 100644 examples/authz/types/codegen/ibc/applications/transfer/v1/tx.amino.d.ts create mode 100644 examples/authz/types/codegen/ibc/applications/transfer/v1/tx.d.ts create mode 100644 examples/authz/types/codegen/ibc/applications/transfer/v1/tx.registry.d.ts create mode 100644 examples/authz/types/codegen/ibc/applications/transfer/v1/tx.rpc.msg.d.ts create mode 100644 examples/authz/types/codegen/ibc/applications/transfer/v2/packet.d.ts create mode 100644 examples/authz/types/codegen/ibc/bundle.d.ts create mode 100644 examples/authz/types/codegen/ibc/client.d.ts create mode 100644 examples/authz/types/codegen/ibc/core/channel/v1/channel.d.ts create mode 100644 examples/authz/types/codegen/ibc/core/channel/v1/genesis.d.ts create mode 100644 examples/authz/types/codegen/ibc/core/channel/v1/query.d.ts create mode 100644 examples/authz/types/codegen/ibc/core/channel/v1/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/ibc/core/channel/v1/tx.amino.d.ts create mode 100644 examples/authz/types/codegen/ibc/core/channel/v1/tx.d.ts create mode 100644 examples/authz/types/codegen/ibc/core/channel/v1/tx.registry.d.ts create mode 100644 examples/authz/types/codegen/ibc/core/channel/v1/tx.rpc.msg.d.ts create mode 100644 examples/authz/types/codegen/ibc/core/client/v1/client.d.ts create mode 100644 examples/authz/types/codegen/ibc/core/client/v1/genesis.d.ts create mode 100644 examples/authz/types/codegen/ibc/core/client/v1/query.d.ts create mode 100644 examples/authz/types/codegen/ibc/core/client/v1/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/ibc/core/client/v1/tx.amino.d.ts create mode 100644 examples/authz/types/codegen/ibc/core/client/v1/tx.d.ts create mode 100644 examples/authz/types/codegen/ibc/core/client/v1/tx.registry.d.ts create mode 100644 examples/authz/types/codegen/ibc/core/client/v1/tx.rpc.msg.d.ts create mode 100644 examples/authz/types/codegen/ibc/core/commitment/v1/commitment.d.ts create mode 100644 examples/authz/types/codegen/ibc/core/connection/v1/connection.d.ts create mode 100644 examples/authz/types/codegen/ibc/core/connection/v1/genesis.d.ts create mode 100644 examples/authz/types/codegen/ibc/core/connection/v1/query.d.ts create mode 100644 examples/authz/types/codegen/ibc/core/connection/v1/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/ibc/core/connection/v1/tx.amino.d.ts create mode 100644 examples/authz/types/codegen/ibc/core/connection/v1/tx.d.ts create mode 100644 examples/authz/types/codegen/ibc/core/connection/v1/tx.registry.d.ts create mode 100644 examples/authz/types/codegen/ibc/core/connection/v1/tx.rpc.msg.d.ts create mode 100644 examples/authz/types/codegen/ibc/core/port/v1/query.d.ts create mode 100644 examples/authz/types/codegen/ibc/core/port/v1/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/ibc/core/types/v1/genesis.d.ts create mode 100644 examples/authz/types/codegen/ibc/lightclients/localhost/v1/localhost.d.ts create mode 100644 examples/authz/types/codegen/ibc/lightclients/solomachine/v1/solomachine.d.ts create mode 100644 examples/authz/types/codegen/ibc/lightclients/solomachine/v2/solomachine.d.ts create mode 100644 examples/authz/types/codegen/ibc/lightclients/tendermint/v1/tendermint.d.ts create mode 100644 examples/authz/types/codegen/ibc/rpc.query.d.ts create mode 100644 examples/authz/types/codegen/ibc/rpc.tx.d.ts create mode 100644 examples/authz/types/codegen/ics23/bundle.d.ts create mode 100644 examples/authz/types/codegen/index.d.ts create mode 100644 examples/authz/types/codegen/mobx.d.ts create mode 100644 examples/authz/types/codegen/mobx.stores.d.ts create mode 100644 examples/authz/types/codegen/osmosis/bundle.d.ts create mode 100644 examples/authz/types/codegen/osmosis/claim/v1beta1/claim.d.ts create mode 100644 examples/authz/types/codegen/osmosis/claim/v1beta1/genesis.d.ts create mode 100644 examples/authz/types/codegen/osmosis/claim/v1beta1/params.d.ts create mode 100644 examples/authz/types/codegen/osmosis/claim/v1beta1/query.d.ts create mode 100644 examples/authz/types/codegen/osmosis/claim/v1beta1/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/osmosis/client.d.ts create mode 100644 examples/authz/types/codegen/osmosis/epochs/genesis.d.ts create mode 100644 examples/authz/types/codegen/osmosis/epochs/query.d.ts create mode 100644 examples/authz/types/codegen/osmosis/epochs/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/osmosis/gamm/pool-models/balancer/balancerPool.d.ts create mode 100644 examples/authz/types/codegen/osmosis/gamm/pool-models/balancer/tx/tx.amino.d.ts create mode 100644 examples/authz/types/codegen/osmosis/gamm/pool-models/balancer/tx/tx.d.ts create mode 100644 examples/authz/types/codegen/osmosis/gamm/pool-models/balancer/tx/tx.registry.d.ts create mode 100644 examples/authz/types/codegen/osmosis/gamm/pool-models/balancer/tx/tx.rpc.msg.d.ts create mode 100644 examples/authz/types/codegen/osmosis/gamm/pool-models/stableswap/stableswap_pool.d.ts create mode 100644 examples/authz/types/codegen/osmosis/gamm/pool-models/stableswap/tx.amino.d.ts create mode 100644 examples/authz/types/codegen/osmosis/gamm/pool-models/stableswap/tx.d.ts create mode 100644 examples/authz/types/codegen/osmosis/gamm/pool-models/stableswap/tx.registry.d.ts create mode 100644 examples/authz/types/codegen/osmosis/gamm/pool-models/stableswap/tx.rpc.msg.d.ts create mode 100644 examples/authz/types/codegen/osmosis/gamm/v1beta1/tx.amino.d.ts create mode 100644 examples/authz/types/codegen/osmosis/gamm/v1beta1/tx.d.ts create mode 100644 examples/authz/types/codegen/osmosis/gamm/v2/query.d.ts create mode 100644 examples/authz/types/codegen/osmosis/gamm/v2/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/osmosis/ibc-rate-limit/v1beta1/params.d.ts create mode 100644 examples/authz/types/codegen/osmosis/ibc-rate-limit/v1beta1/query.d.ts create mode 100644 examples/authz/types/codegen/osmosis/ibc-rate-limit/v1beta1/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/osmosis/incentives/gauge.d.ts create mode 100644 examples/authz/types/codegen/osmosis/incentives/genesis.d.ts create mode 100644 examples/authz/types/codegen/osmosis/incentives/params.d.ts create mode 100644 examples/authz/types/codegen/osmosis/incentives/query.d.ts create mode 100644 examples/authz/types/codegen/osmosis/incentives/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/osmosis/incentives/tx.amino.d.ts create mode 100644 examples/authz/types/codegen/osmosis/incentives/tx.d.ts create mode 100644 examples/authz/types/codegen/osmosis/incentives/tx.registry.d.ts create mode 100644 examples/authz/types/codegen/osmosis/incentives/tx.rpc.msg.d.ts create mode 100644 examples/authz/types/codegen/osmosis/lockup/genesis.d.ts create mode 100644 examples/authz/types/codegen/osmosis/lockup/lock.d.ts create mode 100644 examples/authz/types/codegen/osmosis/lockup/params.d.ts create mode 100644 examples/authz/types/codegen/osmosis/lockup/query.d.ts create mode 100644 examples/authz/types/codegen/osmosis/lockup/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/osmosis/lockup/tx.amino.d.ts create mode 100644 examples/authz/types/codegen/osmosis/lockup/tx.d.ts create mode 100644 examples/authz/types/codegen/osmosis/lockup/tx.registry.d.ts create mode 100644 examples/authz/types/codegen/osmosis/lockup/tx.rpc.msg.d.ts create mode 100644 examples/authz/types/codegen/osmosis/mint/v1beta1/genesis.d.ts create mode 100644 examples/authz/types/codegen/osmosis/mint/v1beta1/mint.d.ts create mode 100644 examples/authz/types/codegen/osmosis/mint/v1beta1/query.d.ts create mode 100644 examples/authz/types/codegen/osmosis/mint/v1beta1/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/osmosis/pool-incentives/v1beta1/genesis.d.ts create mode 100644 examples/authz/types/codegen/osmosis/pool-incentives/v1beta1/gov.d.ts create mode 100644 examples/authz/types/codegen/osmosis/pool-incentives/v1beta1/incentives.d.ts create mode 100644 examples/authz/types/codegen/osmosis/pool-incentives/v1beta1/query.d.ts create mode 100644 examples/authz/types/codegen/osmosis/pool-incentives/v1beta1/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/osmosis/rpc.query.d.ts create mode 100644 examples/authz/types/codegen/osmosis/rpc.tx.d.ts create mode 100644 examples/authz/types/codegen/osmosis/sumtree/v1beta1/tree.d.ts create mode 100644 examples/authz/types/codegen/osmosis/superfluid/genesis.d.ts create mode 100644 examples/authz/types/codegen/osmosis/superfluid/params.d.ts create mode 100644 examples/authz/types/codegen/osmosis/superfluid/query.d.ts create mode 100644 examples/authz/types/codegen/osmosis/superfluid/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/osmosis/superfluid/superfluid.d.ts create mode 100644 examples/authz/types/codegen/osmosis/superfluid/tx.amino.d.ts create mode 100644 examples/authz/types/codegen/osmosis/superfluid/tx.d.ts create mode 100644 examples/authz/types/codegen/osmosis/superfluid/tx.registry.d.ts create mode 100644 examples/authz/types/codegen/osmosis/superfluid/tx.rpc.msg.d.ts create mode 100644 examples/authz/types/codegen/osmosis/superfluid/v1beta1/gov.d.ts create mode 100644 examples/authz/types/codegen/osmosis/tokenfactory/v1beta1/authorityMetadata.d.ts create mode 100644 examples/authz/types/codegen/osmosis/tokenfactory/v1beta1/genesis.d.ts create mode 100644 examples/authz/types/codegen/osmosis/tokenfactory/v1beta1/params.d.ts create mode 100644 examples/authz/types/codegen/osmosis/tokenfactory/v1beta1/query.d.ts create mode 100644 examples/authz/types/codegen/osmosis/tokenfactory/v1beta1/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/osmosis/tokenfactory/v1beta1/tx.amino.d.ts create mode 100644 examples/authz/types/codegen/osmosis/tokenfactory/v1beta1/tx.d.ts create mode 100644 examples/authz/types/codegen/osmosis/tokenfactory/v1beta1/tx.registry.d.ts create mode 100644 examples/authz/types/codegen/osmosis/tokenfactory/v1beta1/tx.rpc.msg.d.ts create mode 100644 examples/authz/types/codegen/osmosis/twap/v1beta1/genesis.d.ts create mode 100644 examples/authz/types/codegen/osmosis/twap/v1beta1/query.d.ts create mode 100644 examples/authz/types/codegen/osmosis/twap/v1beta1/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/osmosis/twap/v1beta1/twap_record.d.ts create mode 100644 examples/authz/types/codegen/osmosis/txfees/v1beta1/feetoken.d.ts create mode 100644 examples/authz/types/codegen/osmosis/txfees/v1beta1/genesis.d.ts create mode 100644 examples/authz/types/codegen/osmosis/txfees/v1beta1/gov.d.ts create mode 100644 examples/authz/types/codegen/osmosis/txfees/v1beta1/query.d.ts create mode 100644 examples/authz/types/codegen/osmosis/txfees/v1beta1/query.rpc.Query.d.ts create mode 100644 examples/authz/types/codegen/react-query.d.ts create mode 100644 examples/authz/types/codegen/registry.d.ts create mode 100644 examples/authz/types/codegen/tendermint/abci/types.d.ts create mode 100644 examples/authz/types/codegen/tendermint/bundle.d.ts create mode 100644 examples/authz/types/codegen/tendermint/crypto/keys.d.ts create mode 100644 examples/authz/types/codegen/tendermint/crypto/proof.d.ts create mode 100644 examples/authz/types/codegen/tendermint/libs/bits/types.d.ts create mode 100644 examples/authz/types/codegen/tendermint/p2p/types.d.ts create mode 100644 examples/authz/types/codegen/tendermint/types/block.d.ts create mode 100644 examples/authz/types/codegen/tendermint/types/evidence.d.ts create mode 100644 examples/authz/types/codegen/tendermint/types/params.d.ts create mode 100644 examples/authz/types/codegen/tendermint/types/types.d.ts create mode 100644 examples/authz/types/codegen/tendermint/types/validator.d.ts create mode 100644 examples/authz/types/codegen/tendermint/version/types.d.ts create mode 100644 examples/authz/types/codegen/types.d.ts create mode 100644 examples/authz/types/codegen/utf8.d.ts create mode 100644 examples/authz/types/codegen/varint.d.ts create mode 100644 examples/authz/types/config.d.ts create mode 100644 examples/authz/types/index.d.ts create mode 100644 examples/authz/types/utils.d.ts create mode 100644 examples/authz/utils/authz.ts create mode 100644 examples/authz/utils/calc.ts create mode 100644 examples/authz/utils/chain.ts create mode 100644 examples/authz/utils/index.ts create mode 100644 examples/authz/utils/logos.ts create mode 100644 examples/authz/utils/staking.ts create mode 100644 examples/authz/utils/vote.ts create mode 100644 examples/authz/yarn.lock diff --git a/examples/authz/.eslintrc.json b/examples/authz/.eslintrc.json new file mode 100644 index 00000000..bffb357a --- /dev/null +++ b/examples/authz/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "next/core-web-vitals" +} diff --git a/examples/authz/.gitignore b/examples/authz/.gitignore new file mode 100644 index 00000000..15e93ee8 --- /dev/null +++ b/examples/authz/.gitignore @@ -0,0 +1,37 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build +/main + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.pnpm-debug.log* + +# local env files +.env*.local + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts diff --git a/examples/authz/.yarnrc.yml b/examples/authz/.yarnrc.yml new file mode 100644 index 00000000..3186f3f0 --- /dev/null +++ b/examples/authz/.yarnrc.yml @@ -0,0 +1 @@ +nodeLinker: node-modules diff --git a/examples/authz/CHANGELOG.md b/examples/authz/CHANGELOG.md new file mode 100644 index 00000000..c64ccd33 --- /dev/null +++ b/examples/authz/CHANGELOG.md @@ -0,0 +1,50 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +# 1.1.0 (2024-10-08) + + +### Bug Fixes + +* deps ([b2aa70b](https://github.com/cosmology-tech/create-cosmos-app/commit/b2aa70ba9ef34fd96954c033220ff160d2c8ece7)) +* old ci job yarn4 issues ([#182](https://github.com/cosmology-tech/create-cosmos-app/issues/182)) ([2bb19f7](https://github.com/cosmology-tech/create-cosmos-app/commit/2bb19f75fcc6ffaa4bcb63ecf071009d2f9d7e76)) +* rename telescope-authz to authz ([9ba95fd](https://github.com/cosmology-tech/create-cosmos-app/commit/9ba95fd9d2e23620b1997e87f780460602507d60)) +* try locks update script ([000aa5f](https://github.com/cosmology-tech/create-cosmos-app/commit/000aa5fc73faa0182a23f50a6402e8b2351a587c)) +* upgrade deps and fix multi chain dropdown ([eecbcaa](https://github.com/cosmology-tech/create-cosmos-app/commit/eecbcaad5e7729f00f9121250c04eb40d201ed80)) + + + + + +# 1.0.0 (2024-04-06) + + +### Bug Fixes + +* rename telescope-authz to authz ([e30689d](https://github.com/cosmology-tech/create-cosmos-app/commit/e30689d1ff5f5c42a1c962aecc8b568511e0d0c2)) + + + + + +## [0.0.4](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/telescope-authz-example@0.0.3...@cosmology/telescope-authz-example@0.0.4) (2024-01-20) + +**Note:** Version bump only for package @cosmology/telescope-authz-example + + + + + +## [0.0.3](https://github.com/cosmology-tech/create-cosmos-app/compare/@cosmology/telescope-authz-example@0.0.2...@cosmology/telescope-authz-example@0.0.3) (2024-01-20) + +**Note:** Version bump only for package @cosmology/telescope-authz-example + + + + + +## 0.0.2 (2024-01-19) + +**Note:** Version bump only for package @cosmology/telescope-authz-example diff --git a/examples/authz/README.md b/examples/authz/README.md new file mode 100644 index 00000000..8c136370 --- /dev/null +++ b/examples/authz/README.md @@ -0,0 +1,88 @@ +This is a Cosmos App project bootstrapped with [`create-cosmos-app`](https://github.com/cosmology-tech/create-cosmos-app). + +## Getting Started + +First, install the packages and run the development server: + +```bash +yarn && yarn dev +``` + +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. + +You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. + +## Learn More + +### Chain Registry + +The npm package for the Official Cosmos chain registry. Get chain and token data for you application. + +* https://github.com/cosmology-tech/chain-registry + +### Cosmology Videos + +Checkout more videos for how to use various frontend tooling in the Cosmos! + +* https://cosmology.zone/learn + +### Cosmos Kit + +A wallet connector for the Cosmos ⚛️ + +* https://github.com/cosmology-tech/cosmos-kit + +### Telescope + +A "babel for the Cosmos", Telescope is a TypeScript Transpiler for Cosmos Protobufs. Telescope is used to generate libraries for Cosmos blockchains. Simply point to your protobuffer files and create developer-friendly Typescript libraries for teams to build on your blockchain. + +* https://github.com/cosmology-tech/telescope + +🎥 [Checkout the Telescope video playlist](https://www.youtube.com/watch?v=n82MsLe82mk&list=PL-lMkVv7GZwyQaK6bp6kMdOS5mzosxytC) to learn how to use `telescope`! + +### CosmWasm TS Codegen + +The quickest and easiest way to interact with CosmWasm Contracts. @cosmwasm/ts-codegen converts your CosmWasm smart contracts into dev-friendly TypeScript classes so you can focus on shipping code. + +* https://github.com/CosmWasm/ts-codegen + +🎥 [Checkout the CosmWasm/ts-codegen video playlist](https://www.youtube.com/watch?v=D_A5V2PfNLA&list=PL-lMkVv7GZwz1KO3jANwr5W4MoziruXwK) to learn how to use `ts-codegen`! + + +## Learn More about Next.js + +To learn more about Next.js, take a look at the following resources: + +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. +- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. + +You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! + +## Deploy on Vercel + +The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. + +Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. + +## Related + +Checkout these related projects: + +* [@cosmology/telescope](https://github.com/cosmology-tech/telescope) Your Frontend Companion for Building with TypeScript with Cosmos SDK Modules. +* [@cosmwasm/ts-codegen](https://github.com/CosmWasm/ts-codegen) Convert your CosmWasm smart contracts into dev-friendly TypeScript classes. +* [chain-registry](https://github.com/cosmology-tech/chain-registry) Everything from token symbols, logos, and IBC denominations for all assets you want to support in your application. +* [cosmos-kit](https://github.com/cosmology-tech/cosmos-kit) Experience the convenience of connecting with a variety of web3 wallets through a single, streamlined interface. +* [create-cosmos-app](https://github.com/cosmology-tech/create-cosmos-app) Set up a modern Cosmos app by running one command. +* [interchain-ui](https://github.com/cosmology-tech/interchain-ui) The Interchain Design System, empowering developers with a flexible, easy-to-use UI kit. +* [starship](https://github.com/cosmology-tech/starship) Unified Testing and Development for the Interchain. + +## Credits + +🛠 Built by Cosmology — if you like our tools, please consider delegating to [our validator ⚛️](https://cosmology.zone/validator) + + +## Disclaimer + +AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED “AS IS”, AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND. + +No developer or entity involved in creating this software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the code, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value. diff --git a/examples/authz/components/authz/AuthzSection.tsx b/examples/authz/components/authz/AuthzSection.tsx new file mode 100644 index 00000000..d7e8643a --- /dev/null +++ b/examples/authz/components/authz/AuthzSection.tsx @@ -0,0 +1,71 @@ +// TODO fix type issues +// @ts-nocheck + +import { useState } from 'react'; +import { ChainName } from 'cosmos-kit'; +import { useChain } from '@cosmos-kit/react'; +import { Box, Button, Tabs, Text } from '@interchain-ui/react'; + +import { Grants } from './Grants'; +import { GrantModal } from './GrantModal'; + +export const AuthzSection = ({ chainName }: { chainName: ChainName }) => { + const [isOpen, setIsOpen] = useState(false); + const [activeTab, setActiveTab] = useState(0); + const { address } = useChain(chainName); + + if (!address) { + return ( + + Please connect your wallet to view and create grants + + ); + } + + return ( + + + setActiveTab(tabId)} + attributes={{ width: '$min' }} + /> + + + + + + setIsOpen(false)} + chainName={chainName} + /> + + ); +}; diff --git a/examples/authz/components/authz/CustomizationField.tsx b/examples/authz/components/authz/CustomizationField.tsx new file mode 100644 index 00000000..de233e7d --- /dev/null +++ b/examples/authz/components/authz/CustomizationField.tsx @@ -0,0 +1,135 @@ +// TODO fix type issues +// @ts-nocheck + +import { Dispatch, SetStateAction, useState } from 'react'; +import { Box, NumberField, SelectButton, Text } from '@interchain-ui/react'; + +import { useValidators } from '@/hooks'; +import { Permission, PermissionId } from '@/configs'; +import { SelectValidatorsModal } from './SelectValidatorsModal'; +import { AccessList } from './GrantModal'; + +// ============================================== + +type SendCustomizationProps = { + value: number | undefined; + onChange: (value: string) => void; +}; + +const SendCustomization = ({ value, onChange }: SendCustomizationProps) => { + return ( + { + // @ts-ignore + onChange(e.target.value); + }} + formatOptions={{ + maximumFractionDigits: 6, + }} + /> + ); +}; + +// ============================================== + +type DelegateCustomizationProps = { + value: number | undefined; + onChange: (value: string) => void; + chainName: string; + accessList: AccessList; + setAccessList: Dispatch>; +}; + +const DelegateCustomization = ({ + value, + onChange, + chainName, + accessList, + setAccessList, +}: DelegateCustomizationProps) => { + const [isOpen, setIsOpen] = useState(false); + + const { data } = useValidators(chainName); + + const validatorNames = data + ? accessList.addresses.map( + (address) => data.find((v) => v.address === address)!.name + ) + : []; + + return ( + <> + { + // @ts-ignore + onChange(e.target.value); + }} + formatOptions={{ + maximumFractionDigits: 6, + }} + /> + setIsOpen(true)} + /> + 0 ? 'block' : 'none'} + mt="$2" + px="$2" + > + + + {accessList.type === 'allowList' ? 'Allow List' : 'Deny List'} + :  + + {validatorNames.join(', ')} + + + setIsOpen(false)} + /> + + ); +}; + +// ============================================== + +type CustomizationFieldProps = + | ({ + permissionType: typeof Permission['Send']; + } & SendCustomizationProps) + | ({ + permissionType: typeof Permission['Delegate']; + } & DelegateCustomizationProps); + +export const CustomizationField = ({ + permissionType, + ...rest +}: CustomizationFieldProps): JSX.Element | null => { + const fields: Partial> = { + send: + permissionType === 'send' ? ( + + ) : null, + delegate: + permissionType === 'delegate' ? ( + + ) : null, + }; + + return fields[permissionType] ?? null; +}; diff --git a/examples/authz/components/authz/GrantCard.tsx b/examples/authz/components/authz/GrantCard.tsx new file mode 100644 index 00000000..590f4bb6 --- /dev/null +++ b/examples/authz/components/authz/GrantCard.tsx @@ -0,0 +1,210 @@ +// TODO fix type issues +// @ts-nocheck + +import Link from 'next/link'; +import Image from 'next/image'; +import { useState } from 'react'; +import { + Box, + Button, + IconButton, + Stack, + Text, + TextField, +} from '@interchain-ui/react'; +import { useChain } from '@cosmos-kit/react'; + +import { + getChainLogoByChainName, + PrettyGrant, + PrettyPermission, +} from '@/utils'; +import { useAuthzContext } from '@/context'; +import { + useAuthzTx, + useGrants, + useSigningClientAmino, + useSigningClientDirect, +} from '@/hooks'; +import { getCoin, permissionNameToRouteMap } from '@/configs'; + +import styles from '@/styles/custom.module.css'; +import { useRevoke } from 'interchain-react/cosmos/authz/v1beta1/tx.rpc.func'; +import { defaultContext } from '@tanstack/react-query'; + +type GrantCardProps = { + role: 'granter' | 'grantee'; + grant: PrettyGrant; + chainName: string; + onViewDetails: () => void; +}; + +export const GrantCard = ({ + role, + grant, + chainName, + onViewDetails, +}: GrantCardProps) => { + const [isCopied, setIsCopied] = useState(false); + const [isRevoking, setIsRevoking] = useState(false); + const [revokingPermission, setRevokingPermission] = + useState(); + + const { address: signerAddress, chain } = useChain(chainName); + const { refetch } = useGrants(chainName); + const { setPermission } = useAuthzContext(); + const { createRevokeMsg } = useAuthzTx(chainName); + const { data: client } = useSigningClientDirect(chainName); + + const { mutate: revoke } = useRevoke({ + clientResolver: client, + options: { + context: defaultContext, + }, + }); + + const { address, permissions } = grant; + + const isGranter = role === 'granter'; + const token = getCoin(chainName); + + const copy = (text: string) => { + if (isCopied) return; + + navigator.clipboard + .writeText(text) + .then(() => { + setIsCopied(true); + setTimeout(() => setIsCopied(false), 800); + }) + .catch((error) => { + console.error('Failed to copy:', error); + }); + }; + + const handleRevoke = (permission: PrettyPermission) => { + setIsRevoking(true); + + revoke( + { + signerAddress, + message: createRevokeMsg(permission), + fee: 'auto', + memo: 'revoking permission', + }, + { + onSuccess: () => { + refetch(); + }, + onComplete: () => { + setIsRevoking(false); + }, + } + ); + }; + + return ( + + + {token.name} + + {chain.pretty_name} + + + + + + + copy(address)} + /> + + + + + Permissions + + + + {permissions.map((permission) => + isGranter ? ( + + ) : permissionNameToRouteMap[permission.name] ? ( + + + + ) : ( + + ) + )} + + + + + ); +}; diff --git a/examples/authz/components/authz/GrantDetailsModal.tsx b/examples/authz/components/authz/GrantDetailsModal.tsx new file mode 100644 index 00000000..11c71ee0 --- /dev/null +++ b/examples/authz/components/authz/GrantDetailsModal.tsx @@ -0,0 +1,122 @@ +// TODO fix type issues +// @ts-nocheck + +import { useState } from 'react'; +import { BasicModal, Box, Button } from '@interchain-ui/react'; + +import { + useAuthzTx, + useGrants, + useSigningClientAmino, + useSigningClientDirect, +} from '@/hooks'; +import { PrettyGrant, PrettyPermission } from '@/utils'; +import { PermissionDetailCard } from './PermissionDetailCard'; +import { useRevoke } from 'interchain-react/cosmos/authz/v1beta1/tx.rpc.func'; +import { defaultContext } from '@tanstack/react-query'; +import { useChain } from '@cosmos-kit/react'; + +type GrantDetailsModalProps = { + grant: PrettyGrant; + chainName: string; + role: 'granter' | 'grantee'; + isOpen: boolean; + onClose: () => void; +}; + +export const GrantDetailsModal = ({ + role, + grant, + isOpen, + onClose, + chainName, +}: GrantDetailsModalProps) => { + const { permissions } = grant; + const isGranter = role === 'granter'; + + const [isRevoking, setIsRevoking] = useState(false); + const [revokingPermission, setRevokingPermission] = + useState(); + + const { address: signerAddress } = useChain(chainName); + const { refetch } = useGrants(chainName); + const { createRevokeMsg } = useAuthzTx(chainName); + + const { data: client } = useSigningClientDirect(chainName); + + const { mutate: revoke } = useRevoke({ + clientResolver: client, + options: { + context: defaultContext, + }, + }); + + const handleRevoke = (permissions: PrettyPermission[]) => { + setIsRevoking(true); + + revoke( + { + signerAddress, + message: permissions.map(createRevokeMsg), + fee: 'auto', + memo: 'revoking permission', + }, + { + onSuccess: () => { + refetch(); + onClose(); + }, + onError: () => { + setIsRevoking(false); + setRevokingPermission(undefined); + }, + } + ); + }; + + return ( + + + + {permissions.map((permission) => ( + { + handleRevoke([permission]); + setRevokingPermission(permission); + }} + isRevoking={ + isRevoking && permission.name === revokingPermission?.name + } + chainName={chainName} + permission={permission} + /> + ))} + + + {isGranter && ( + + )} + + + ); +}; diff --git a/examples/authz/components/authz/GrantModal.tsx b/examples/authz/components/authz/GrantModal.tsx new file mode 100644 index 00000000..1846c658 --- /dev/null +++ b/examples/authz/components/authz/GrantModal.tsx @@ -0,0 +1,329 @@ +// TODO fix type issues +// @ts-nocheck + +import { useState } from 'react'; +import { ChainName } from 'cosmos-kit'; +import { + BasicModal, + Box, + TextField, + Button, + Popover, + PopoverTrigger, + PopoverContent, + SelectButton, + ListItem, + Stack, + FieldLabel, +} from '@interchain-ui/react'; +import { coin } from '@cosmjs/amino'; +import { useChain } from '@cosmos-kit/react'; +import { IoMdCalendar } from 'react-icons/io'; +import Calendar from 'react-calendar'; +import dayjs from 'dayjs'; + +import { + getExponent, + PermissionId, + PermissionItem, + permissions, +} from '@/configs'; +import { AuthorizationType } from 'interchain-react/cosmos/staking/v1beta1/authz'; +import { + GrantMsg, + useAuthzTx, + useGrants, + useSigningClientAmino, + useSigningClientDirect, +} from '@/hooks'; +import { getTokenByChainName, shiftDigits } from '@/utils'; +import { CustomizationField } from './CustomizationField'; +import { AddressInput } from '@/components'; + +import styles from '@/styles/custom.module.css'; +import { useGrant } from 'interchain-react/cosmos/authz/v1beta1/tx.rpc.func'; +import { defaultContext } from '@tanstack/react-query'; +import { SendAuthorization } from 'interchain-react/cosmos/bank/v1beta1/authz'; + +export type AccessList = { + type: 'allowList' | 'denyList'; + addresses: string[]; +}; + +type GrantModalProps = { + isOpen: boolean; + onClose: () => void; + chainName: ChainName; +}; + +export const GrantModal = ({ isOpen, onClose, chainName }: GrantModalProps) => { + const [isDropdownOpen, setIsDropdownOpen] = useState(false); + const [isCalendarOpen, setIsCalendarOpen] = useState(false); + + const [granteeAddress, setGranteeAddress] = useState(''); + const [addressErrorMsg, setAddressErrorMsg] = useState(''); + const [expiryDate, setExpiryDate] = useState(null); + const [selectedPermission, setSelectedPermission] = + useState(null); + + const [sendLimit, setSendLimit] = useState(undefined); + const [delegateLimit, setDelegateLimit] = useState( + undefined + ); + const [accessList, setAccessList] = useState({ + type: 'allowList', + addresses: [], + }); + + const [isGranting, setIsGranting] = useState(false); + + const { refetch } = useGrants(chainName); + const { address } = useChain(chainName); + const { createGrantMsg } = useAuthzTx(chainName); + const { data: client } = useSigningClientAmino(chainName); + + const { mutate: grant } = useGrant({ + clientResolver: client, + options: { + context: defaultContext, + }, + }); + + const token = getTokenByChainName(chainName); + const exponent = getExponent(chainName); + const denom = token.base; + + const onModalClose = () => { + setGranteeAddress(''); + setExpiryDate(null); + setSelectedPermission(null); + setSendLimit(undefined); + setDelegateLimit(undefined); + setIsGranting(false); + setAccessList({ type: 'allowList', addresses: [] }); + onClose(); + }; + + const onGrantClick = () => { + if (!address || !granteeAddress || !expiryDate || !selectedPermission) + return; + + setIsGranting(true); + + const sendMsg: GrantMsg = { + grantType: 'send', + customize: sendLimit + ? SendAuthorization.fromPartial({ + spendLimit: [coin(shiftDigits(sendLimit, exponent), denom)], + }) + : undefined, + }; + + const delegateMsg: GrantMsg = { + grantType: 'delegate', + customize: + delegateLimit || accessList.addresses.length > 0 + ? { + authorizationType: AuthorizationType.AUTHORIZATION_TYPE_DELEGATE, + maxTokens: coin(shiftDigits(delegateLimit, exponent), denom), + [accessList.type]: { address: accessList.addresses }, + } + : undefined, + }; + + const grantMsg: Record = { + send: sendMsg, + delegate: delegateMsg, + vote: { grantType: 'vote' }, + 'claim-rewards': { grantType: 'claim-rewards' }, + }; + + const msg = createGrantMsg({ + grantee: granteeAddress, + granter: address, + expiration: expiryDate, + ...grantMsg[selectedPermission.id], + }); + + const fee = { + amount: [ + { + denom: token.base, + amount: '2500', + }, + ], + gas: '1000000', + }; + + grant( + { + signerAddress: address, + message: msg, + fee, + memo: 'granting permission', + }, + { + onSuccess: () => { + refetch(); + onModalClose(); + }, + onComplete: () => { + setIsGranting(false); + }, + } + ); + }; + + return ( + + + + + + + + + + + {}} + /> + + + + {permissions.map((p) => ( + { + setSelectedPermission(p); + setIsDropdownOpen(false); + }, + }} + > + {p.name} + + ))} + + + + + {selectedPermission?.id === 'send' && ( + { + if (!val) { + setSendLimit(undefined); + return; + } + setSendLimit(Number(val)); + }} + /> + )} + + {selectedPermission?.id === 'delegate' && ( + { + if (!val) { + setDelegateLimit(undefined); + return; + } + setDelegateLimit(Number(val)); + }} + /> + )} + + + + + + + + + + + + { + if (Array.isArray(val)) { + setExpiryDate(val[1]); + return; + } + setExpiryDate(val); + }} + onClickDay={() => { + setIsCalendarOpen(false); + }} + /> + + + + + + + + + + + ); +}; diff --git a/examples/authz/components/authz/Grants.tsx b/examples/authz/components/authz/Grants.tsx new file mode 100644 index 00000000..8efb08c1 --- /dev/null +++ b/examples/authz/components/authz/Grants.tsx @@ -0,0 +1,87 @@ +// TODO fix type issues +// @ts-nocheck + +import { useState } from 'react'; +import { Box, Spinner, Text } from '@interchain-ui/react'; + +import { useGrants } from '@/hooks'; +import { PrettyGrant } from '@/utils'; +import { GrantCard } from './GrantCard'; +import { GrantDetailsModal } from './GrantDetailsModal'; + +type GrantsProps = { + role: 'granter' | 'grantee'; + chainName: string; +}; + +export const Grants = ({ chainName, role }: GrantsProps) => { + const [isOpen, setIsOpen] = useState(false); + const [viewingGrant, setViewingGrant] = useState(); + const { data, isLoading, isError } = useGrants(chainName); + + const isGranter = role === 'granter'; + const grants = isGranter ? data?.granterGrants : data?.granteeGrants; + + const renderContent = () => { + if (isError) { + return ( + + There was an error fetching grants. Please try again later. + + ); + } + + if (isLoading) { + return ; + } + + if (grants && grants.length > 0) { + return ( + + {grants.map((grant) => ( + { + setIsOpen(true); + setViewingGrant(grant); + }} + /> + ))} + + ); + } + + return ( + + {isGranter + ? "You haven't granted any permission yet" + : "You don't have any grants"} + + ); + }; + + return ( + + {renderContent()} + + {viewingGrant && ( + setIsOpen(false)} + /> + )} + + ); +}; diff --git a/examples/authz/components/authz/LoginInfoBanner.tsx b/examples/authz/components/authz/LoginInfoBanner.tsx new file mode 100644 index 00000000..87809a79 --- /dev/null +++ b/examples/authz/components/authz/LoginInfoBanner.tsx @@ -0,0 +1,42 @@ +// TODO fix type issues +// @ts-nocheck + +import { useChain } from '@cosmos-kit/react'; +import { Box, Icon, Text } from '@interchain-ui/react'; + +type LoginInfoBannerProps = { + loginAddress: string; + chainName: string; +}; + +export const LoginInfoBanner = ({ + loginAddress, + chainName, +}: LoginInfoBannerProps) => { + const { isWalletConnected } = useChain(chainName); + + if (!isWalletConnected) return null; + + return ( + + + + You are now logged in as  + + {loginAddress} + + + + ); +}; diff --git a/examples/authz/components/authz/PermissionDetailCard.tsx b/examples/authz/components/authz/PermissionDetailCard.tsx new file mode 100644 index 00000000..822afcc2 --- /dev/null +++ b/examples/authz/components/authz/PermissionDetailCard.tsx @@ -0,0 +1,133 @@ +// TODO fix type issues +// @ts-nocheck + +import Link from 'next/link'; +import { Box, Button, Icon, Skeleton, Text } from '@interchain-ui/react'; + +import { useValidators } from '@/hooks'; +import { permissionNameToRouteMap } from '@/configs'; +import { getAttributePairs, PrettyGrant } from '@/utils'; +import { useAuthzContext } from '@/context'; + +type PermissionDetailCardProps = { + role: 'granter' | 'grantee'; + onRevoke: () => void; + isRevoking: boolean; + chainName: string; + permission: PrettyGrant['permissions'][0]; +}; + +export const PermissionDetailCard = ({ + role, + onRevoke, + isRevoking, + chainName, + permission, +}: PermissionDetailCardProps) => { + const { name, expiration, expiry, authorization } = permission; + const isGranter = role === 'granter'; + + const { setPermission } = useAuthzContext(); + const { data, isLoading } = useValidators(chainName, { fetchLogos: false }); + const attributes = getAttributePairs(authorization, data || []); + + return ( + + + {isGranter ? ( + + + {name} + + + + ) : permissionNameToRouteMap[name] ? ( + + setPermission(permission) }} + > + + {name} + + + + + ) : ( + + {name} + + )} + + + + {expiration && } + {attributes.map((attr) => ( + + ))} + + + ); +}; + +type PermissionAttributeProps = { + label: string; + value: string; + isLoading?: boolean; +}; + +const PermissionAttribute = ({ + label, + value, + isLoading = false, +}: PermissionAttributeProps) => { + return ( + + + {label} + + {isLoading ? ( + + ) : ( + + {value} + + )} + + ); +}; diff --git a/examples/authz/components/authz/SelectValidatorsModal.tsx b/examples/authz/components/authz/SelectValidatorsModal.tsx new file mode 100644 index 00000000..d0f6cbd0 --- /dev/null +++ b/examples/authz/components/authz/SelectValidatorsModal.tsx @@ -0,0 +1,164 @@ +// TODO fix type issues +// @ts-nocheck + +import { Dispatch, SetStateAction, useMemo, useState } from 'react'; +import { + BasicModal, + Box, + Button, + GovernanceRadio, + GovernanceRadioGroup, + GridColumn, + Spinner, + Stack, + Text, + ValidatorList, + ValidatorNameCell, +} from '@interchain-ui/react'; + +import { useValidators } from '@/hooks'; +import { ExtendedValidator as Validator } from '@/utils'; +import { AccessList } from './GrantModal'; + +type SelectValidatorsModalProps = { + isOpen: boolean; + onClose: () => void; + chainName: string; + accessList: AccessList; + setAccessList: Dispatch>; +}; + +type ListType = 'allowList' | 'denyList'; + +export const SelectValidatorsModal = ({ + isOpen, + onClose, + chainName, + accessList, + setAccessList, +}: SelectValidatorsModalProps) => { + const { data, isLoading } = useValidators(chainName); + const listType = accessList.type; + + const columns: GridColumn[] = useMemo(() => { + return [ + { + id: 'validator', + label: 'Validator', + width: '196px', + align: 'left', + render: (validator: Validator) => ( + + ), + }, + { + id: 'action', + width: '126px', + align: 'right', + render: (validator: Validator) => ( + + {accessList.addresses.includes(validator.address) ? ( + + ) : ( + <> + + + )} + + ), + }, + ]; + }, [chainName, accessList]); + + return ( + + + {isLoading ? ( + + ) : data && data.length > 0 ? ( + + + { + setAccessList((prev) => ({ + ...prev, + type: selected as ListType, + })); + }} + > + + + Allow List + + Deny List + + + + + + + ) : ( + + No Validators Found + + )} + + + ); +}; diff --git a/examples/authz/components/authz/index.ts b/examples/authz/components/authz/index.ts new file mode 100644 index 00000000..fe075840 --- /dev/null +++ b/examples/authz/components/authz/index.ts @@ -0,0 +1,2 @@ +export * from './AuthzSection'; +export * from './LoginInfoBanner'; diff --git a/examples/authz/components/claim-rewards/ClaimRewardsSection.tsx b/examples/authz/components/claim-rewards/ClaimRewardsSection.tsx new file mode 100644 index 00000000..248f4703 --- /dev/null +++ b/examples/authz/components/claim-rewards/ClaimRewardsSection.tsx @@ -0,0 +1,53 @@ +// TODO fix type issues +// @ts-nocheck + +import { useChain } from '@cosmos-kit/react'; +import { ChainName } from 'cosmos-kit'; +import { Box, Spinner, Text } from '@interchain-ui/react'; + +import { useStakingData } from '@/hooks'; +import Overview from './Overview'; + +export const ClaimRewardsSection = ({ + chainName, +}: { + chainName: ChainName; +}) => { + const { isWalletConnected } = useChain(chainName); + const { data, isLoading, refetch } = useStakingData(chainName); + + return ( + + {!isWalletConnected ? ( + + + Please connect the wallet + + + ) : isLoading || !data ? ( + + + + ) : ( + + )} + + ); +}; diff --git a/examples/authz/components/claim-rewards/Overview.tsx b/examples/authz/components/claim-rewards/Overview.tsx new file mode 100644 index 00000000..83309a09 --- /dev/null +++ b/examples/authz/components/claim-rewards/Overview.tsx @@ -0,0 +1,121 @@ +// TODO fix type issues +// @ts-nocheck + +import { useState } from 'react'; +import { + Box, + StakingAssetHeader, + StakingClaimHeader, +} from '@interchain-ui/react'; +import { ChainName } from 'cosmos-kit'; + +import { getCoin } from '@/configs'; +import { Prices, useAuthzTx, useSigningClientDirect } from '@/hooks'; +import { + sum, + calcDollarValue, + isGreaterThanZero, + type ParsedRewards as Rewards, +} from '@/utils'; +import { MsgWithdrawDelegatorReward } from 'interchain-react/cosmos/distribution/v1beta1/tx'; +import { useAuthzContext } from '@/context'; +import { useExec } from 'interchain-react/cosmos/authz/v1beta1/tx.rpc.func'; +import { defaultContext } from '@tanstack/react-query'; + +const Overview = ({ + balance, + rewards, + staked, + updateData, + chainName, + prices, +}: { + balance: string; + rewards: Rewards; + staked: string; + updateData: () => void; + chainName: ChainName; + prices: Prices; +}) => { + const [isClaiming, setIsClaiming] = useState(false); + + const { permission } = useAuthzContext(); + const { createExecMsg } = useAuthzTx(chainName); + + const { data: client } = useSigningClientDirect(chainName); + + const { mutate: exec } = useExec({ + clientResolver: client, + options: { + context: defaultContext, + }, + }); + + const totalAmount = sum(balance, staked, rewards?.total ?? 0); + const coin = getCoin(chainName); + + const onClaimRewardClick = () => { + if (!permission) return; + + setIsClaiming(true); + + const { grantee, granter, expiration } = permission; + + const msgs = rewards.byValidators.map(({ validatorAddress }) => + MsgWithdrawDelegatorReward.toProtoMsg({ + delegatorAddress: granter, + validatorAddress, + }) + ); + + exec( + { + granter, + message: createExecMsg({ msgs, grantee }), + fee: 'auto', + memo: 'executing permission', + }, + { + onSuccess: () => { + updateData(); + }, + onError: () => { + setIsClaiming(false); + }, + } + ); + }; + + return ( + <> + + + + + + + + + ); +}; + +export default Overview; diff --git a/examples/authz/components/claim-rewards/index.ts b/examples/authz/components/claim-rewards/index.ts new file mode 100644 index 00000000..68a0b4a8 --- /dev/null +++ b/examples/authz/components/claim-rewards/index.ts @@ -0,0 +1 @@ +export * from './ClaimRewardsSection'; diff --git a/examples/authz/components/common/AddressInput.tsx b/examples/authz/components/common/AddressInput.tsx new file mode 100644 index 00000000..42285ca7 --- /dev/null +++ b/examples/authz/components/common/AddressInput.tsx @@ -0,0 +1,66 @@ +// TODO fix type issues +// @ts-nocheck + +import { useMemo } from 'react'; +import { useChain } from '@cosmos-kit/react'; +import { fromBech32 } from '@cosmjs/encoding'; +import { TextField, Text, Box, BoxProps } from '@interchain-ui/react'; + +type AddressInputProps = { + chainName: string; + address: string; + onAddressChange: (address: string) => void; + mb?: BoxProps['mb']; + label?: string; + placeholder?: string; + onInvalidAddress?: (error: string) => void; +}; + +export const AddressInput = ({ + chainName, + address, + onAddressChange, + label, + mb, + onInvalidAddress, + placeholder, +}: AddressInputProps) => { + const { chain } = useChain(chainName); + + const errorMessage = useMemo(() => { + let errorMsg = ''; + + if (!address) { + onInvalidAddress && onInvalidAddress(errorMsg); + return errorMsg; + } + + try { + const res = fromBech32(address); + if (!address.startsWith(chain.bech32_prefix)) { + errorMsg = `Invalid address: Unexpected prefix (expected: ${chain.bech32_prefix}, actual: ${res.prefix})`; + } + } catch (error) { + errorMsg = 'Invalid address'; + } finally { + onInvalidAddress && onInvalidAddress(errorMsg); + return errorMsg; + } + }, [address]); + + return ( + + onAddressChange(e.target.value)} + label={label} + placeholder={placeholder} + attributes={{ mb: errorMessage ? '$2' : '0' }} + intent={errorMessage ? 'error' : 'default'} + /> + + {errorMessage && {errorMessage}} + + ); +}; diff --git a/examples/authz/components/common/Footer.tsx b/examples/authz/components/common/Footer.tsx new file mode 100644 index 00000000..a1d352e1 --- /dev/null +++ b/examples/authz/components/common/Footer.tsx @@ -0,0 +1,169 @@ +// TODO fix type issues +// @ts-nocheck + +import { + Box, + Link, + Text, + Icon, + Stack, + Divider, + useColorModeValue, +} from '@interchain-ui/react'; +import { dependencies, products, Project } from '@/configs'; + +function Product({ name, desc, link }: Project) { + return ( + + + + {name} → + + + {desc} + + + + ); +} + +function Dependency({ name, desc, link }: Project) { + return ( + + + + + + + + + {name} + + + {desc} + + + + + ); +} + +export function Footer() { + return ( + <> + + {products.map((product) => ( + + ))} + + + {dependencies.map((dependency) => ( + + ))} + + + + + + Built with + + Cosmology + + + + ); +} diff --git a/examples/authz/components/common/Header.tsx b/examples/authz/components/common/Header.tsx new file mode 100644 index 00000000..326a5c95 --- /dev/null +++ b/examples/authz/components/common/Header.tsx @@ -0,0 +1,66 @@ +// TODO fix type issues +// @ts-nocheck + +import { + Box, + Button, + Icon, + Text, + useTheme, + useColorModeValue, +} from '@interchain-ui/react'; + +const stacks = ['Cosmos Kit', 'Next.js']; + +export function Header() { + const { theme, setTheme } = useTheme(); + + const toggleColorMode = () => { + setTheme(theme === 'light' ? 'dark' : 'light'); + }; + + return ( + <> + + + + + + + Create Cosmos App + + + + Welcome to  + + + {stacks.join(' + ')} + + + + + ); +} diff --git a/examples/authz/components/common/Layout.tsx b/examples/authz/components/common/Layout.tsx new file mode 100644 index 00000000..a207f109 --- /dev/null +++ b/examples/authz/components/common/Layout.tsx @@ -0,0 +1,21 @@ +import Head from 'next/head'; +import { Container } from '@interchain-ui/react'; +import { Header } from './Header'; +import { Footer } from './Footer'; + +export function Layout({ children }: { children: React.ReactNode }) { + return ( + + + Create Cosmos App + + + + {/* @ts-ignore */} +
+ {children} + {/* @ts-ignore */} +