@xpla/xpla-react 1.7.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/package.json +47 -0
- package/src/amino/amino.ts +1 -0
- package/src/binary.ts +534 -0
- package/src/cosmos/app/runtime/v1alpha1/module.ts +423 -0
- package/src/cosmos/app/runtime/v2/module.ts +589 -0
- package/src/cosmos/app/v1alpha1/config.ts +422 -0
- package/src/cosmos/app/v1alpha1/module.ts +461 -0
- package/src/cosmos/app/v1alpha1/query.rpc.func.ts +14 -0
- package/src/cosmos/app/v1alpha1/query.ts +177 -0
- package/src/cosmos/auth/module/v1/module.ts +253 -0
- package/src/cosmos/auth/v1beta1/accounts.ts +226 -0
- package/src/cosmos/auth/v1beta1/auth.ts +550 -0
- package/src/cosmos/auth/v1beta1/genesis.ts +119 -0
- package/src/cosmos/auth/v1beta1/query.rpc.func.ts +113 -0
- package/src/cosmos/auth/v1beta1/query.ts +2034 -0
- package/src/cosmos/auth/v1beta1/tx.registry.ts +29 -0
- package/src/cosmos/auth/v1beta1/tx.rpc.func.ts +13 -0
- package/src/cosmos/auth/v1beta1/tx.ts +219 -0
- package/src/cosmos/authz/module/v1/module.ts +80 -0
- package/src/cosmos/authz/v1beta1/authz.ts +481 -0
- package/src/cosmos/authz/v1beta1/event.ts +259 -0
- package/src/cosmos/authz/v1beta1/genesis.ts +100 -0
- package/src/cosmos/authz/v1beta1/query.rpc.func.ts +36 -0
- package/src/cosmos/authz/v1beta1/query.ts +707 -0
- package/src/cosmos/authz/v1beta1/tx.registry.ts +65 -0
- package/src/cosmos/authz/v1beta1/tx.rpc.func.ts +31 -0
- package/src/cosmos/authz/v1beta1/tx.ts +647 -0
- package/src/cosmos/autocli/v1/options.ts +1145 -0
- package/src/cosmos/autocli/v1/query.rpc.func.ts +14 -0
- package/src/cosmos/autocli/v1/query.ts +288 -0
- package/src/cosmos/bank/module/v1/module.ts +153 -0
- package/src/cosmos/bank/v1beta1/authz.ts +138 -0
- package/src/cosmos/bank/v1beta1/bank.ts +974 -0
- package/src/cosmos/bank/v1beta1/genesis.ts +307 -0
- package/src/cosmos/bank/v1beta1/query.rpc.func.ts +146 -0
- package/src/cosmos/bank/v1beta1/query.ts +3027 -0
- package/src/cosmos/bank/v1beta1/tx.registry.ts +83 -0
- package/src/cosmos/bank/v1beta1/tx.rpc.func.ts +40 -0
- package/src/cosmos/bank/v1beta1/tx.ts +861 -0
- package/src/cosmos/base/abci/v1beta1/abci.ts +1698 -0
- package/src/cosmos/base/grpc/v2/service.rpc.func.ts +25 -0
- package/src/cosmos/base/grpc/v2/service.ts +473 -0
- package/src/cosmos/base/node/v1beta1/query.rpc.func.ts +25 -0
- package/src/cosmos/base/node/v1beta1/query.ts +454 -0
- package/src/cosmos/base/query/v1beta1/pagination.ts +361 -0
- package/src/cosmos/base/reflection/v1beta1/reflection.rpc.func.ts +25 -0
- package/src/cosmos/base/reflection/v1beta1/reflection.ts +382 -0
- package/src/cosmos/base/reflection/v2alpha1/reflection.rpc.func.ts +69 -0
- package/src/cosmos/base/reflection/v2alpha1/reflection.ts +2727 -0
- package/src/cosmos/base/tendermint/v1beta1/query.rpc.func.ts +80 -0
- package/src/cosmos/base/tendermint/v1beta1/query.ts +2302 -0
- package/src/cosmos/base/tendermint/v1beta1/types.ts +455 -0
- package/src/cosmos/base/v1beta1/coin.ts +439 -0
- package/src/cosmos/circuit/module/v1/module.ts +99 -0
- package/src/cosmos/circuit/v1/query.rpc.func.ts +36 -0
- package/src/cosmos/circuit/v1/query.ts +574 -0
- package/src/cosmos/circuit/v1/tx.registry.ts +65 -0
- package/src/cosmos/circuit/v1/tx.rpc.func.ts +31 -0
- package/src/cosmos/circuit/v1/tx.ts +676 -0
- package/src/cosmos/circuit/v1/types.ts +413 -0
- package/src/cosmos/consensus/module/v1/module.ts +99 -0
- package/src/cosmos/consensus/v1/query.rpc.func.ts +14 -0
- package/src/cosmos/consensus/v1/query.ts +185 -0
- package/src/cosmos/consensus/v1/tx.registry.ts +29 -0
- package/src/cosmos/consensus/v1/tx.rpc.func.ts +13 -0
- package/src/cosmos/consensus/v1/tx.ts +255 -0
- package/src/cosmos/crisis/module/v1/module.ts +115 -0
- package/src/cosmos/crisis/v1beta1/genesis.ts +106 -0
- package/src/cosmos/crisis/v1beta1/tx.registry.ts +47 -0
- package/src/cosmos/crisis/v1beta1/tx.rpc.func.ts +22 -0
- package/src/cosmos/crisis/v1beta1/tx.ts +416 -0
- package/src/cosmos/crypto/ed25519/keys.ts +209 -0
- package/src/cosmos/crypto/hd/v1/hd.ts +169 -0
- package/src/cosmos/crypto/keyring/v1/record.ts +529 -0
- package/src/cosmos/crypto/multisig/keys.ts +122 -0
- package/src/cosmos/crypto/multisig/v1beta1/multisig.ts +225 -0
- package/src/cosmos/crypto/secp256k1/keys.ts +203 -0
- package/src/cosmos/crypto/secp256r1/keys.ts +201 -0
- package/src/cosmos/distribution/module/v1/module.ts +113 -0
- package/src/cosmos/distribution/v1beta1/distribution.ts +1494 -0
- package/src/cosmos/distribution/v1beta1/genesis.ts +1129 -0
- package/src/cosmos/distribution/v1beta1/query.rpc.func.ts +113 -0
- package/src/cosmos/distribution/v1beta1/query.ts +2126 -0
- package/src/cosmos/distribution/v1beta1/tx.registry.ts +137 -0
- package/src/cosmos/distribution/v1beta1/tx.rpc.func.ts +67 -0
- package/src/cosmos/distribution/v1beta1/tx.ts +1478 -0
- package/src/cosmos/evidence/module/v1/module.ts +80 -0
- package/src/cosmos/evidence/v1beta1/evidence.ts +154 -0
- package/src/cosmos/evidence/v1beta1/genesis.ts +102 -0
- package/src/cosmos/evidence/v1beta1/query.rpc.func.ts +25 -0
- package/src/cosmos/evidence/v1beta1/query.ts +451 -0
- package/src/cosmos/evidence/v1beta1/tx.registry.ts +29 -0
- package/src/cosmos/evidence/v1beta1/tx.rpc.func.ts +13 -0
- package/src/cosmos/evidence/v1beta1/tx.ts +221 -0
- package/src/cosmos/feegrant/module/v1/module.ts +80 -0
- package/src/cosmos/feegrant/v1beta1/feegrant.ts +573 -0
- package/src/cosmos/feegrant/v1beta1/genesis.ts +100 -0
- package/src/cosmos/feegrant/v1beta1/query.rpc.func.ts +36 -0
- package/src/cosmos/feegrant/v1beta1/query.ts +677 -0
- package/src/cosmos/feegrant/v1beta1/tx.registry.ts +65 -0
- package/src/cosmos/feegrant/v1beta1/tx.rpc.func.ts +31 -0
- package/src/cosmos/feegrant/v1beta1/tx.ts +597 -0
- package/src/cosmos/genutil/module/v1/module.ts +80 -0
- package/src/cosmos/genutil/v1beta1/genesis.ts +101 -0
- package/src/cosmos/gov/module/v1/module.ts +121 -0
- package/src/cosmos/gov/v1/genesis.ts +280 -0
- package/src/cosmos/gov/v1/gov.ts +1843 -0
- package/src/cosmos/gov/v1/query.rpc.func.ts +102 -0
- package/src/cosmos/gov/v1/query.ts +1970 -0
- package/src/cosmos/gov/v1/tx.registry.ts +137 -0
- package/src/cosmos/gov/v1/tx.rpc.func.ts +67 -0
- package/src/cosmos/gov/v1/tx.ts +1657 -0
- package/src/cosmos/gov/v1beta1/genesis.ts +202 -0
- package/src/cosmos/gov/v1beta1/gov.ts +1425 -0
- package/src/cosmos/gov/v1beta1/query.rpc.func.ts +91 -0
- package/src/cosmos/gov/v1beta1/query.ts +1749 -0
- package/src/cosmos/gov/v1beta1/tx.registry.ts +83 -0
- package/src/cosmos/gov/v1beta1/tx.rpc.func.ts +40 -0
- package/src/cosmos/gov/v1beta1/tx.ts +881 -0
- package/src/cosmos/group/module/v1/module.ts +128 -0
- package/src/cosmos/group/v1/events.ts +1044 -0
- package/src/cosmos/group/v1/genesis.ts +240 -0
- package/src/cosmos/group/v1/query.rpc.func.ts +157 -0
- package/src/cosmos/group/v1/query.ts +3015 -0
- package/src/cosmos/group/v1/tx.registry.ts +263 -0
- package/src/cosmos/group/v1/tx.rpc.func.ts +130 -0
- package/src/cosmos/group/v1/tx.ts +3207 -0
- package/src/cosmos/group/v1/types.ts +2081 -0
- package/src/cosmos/ics23/v1/proofs.ts +2060 -0
- package/src/cosmos/mint/module/v1/module.ts +113 -0
- package/src/cosmos/mint/v1beta1/genesis.ts +116 -0
- package/src/cosmos/mint/v1beta1/mint.ts +291 -0
- package/src/cosmos/mint/v1beta1/query.rpc.func.ts +36 -0
- package/src/cosmos/mint/v1beta1/query.ts +541 -0
- package/src/cosmos/mint/v1beta1/tx.registry.ts +29 -0
- package/src/cosmos/mint/v1beta1/tx.rpc.func.ts +13 -0
- package/src/cosmos/mint/v1beta1/tx.ts +219 -0
- package/src/cosmos/msg/textual/v1/textual.ts +1 -0
- package/src/cosmos/msg/v1/msg.ts +1 -0
- package/src/cosmos/nft/module/v1/module.ts +80 -0
- package/src/cosmos/nft/v1beta1/event.ts +403 -0
- package/src/cosmos/nft/v1beta1/genesis.ts +234 -0
- package/src/cosmos/nft/v1beta1/nft.ts +356 -0
- package/src/cosmos/nft/v1beta1/query.rpc.func.ts +80 -0
- package/src/cosmos/nft/v1beta1/query.ts +1465 -0
- package/src/cosmos/nft/v1beta1/tx.registry.ts +29 -0
- package/src/cosmos/nft/v1beta1/tx.rpc.func.ts +13 -0
- package/src/cosmos/nft/v1beta1/tx.ts +224 -0
- package/src/cosmos/orm/module/v1alpha1/module.ts +88 -0
- package/src/cosmos/orm/query/v1alpha1/query.rpc.func.ts +25 -0
- package/src/cosmos/orm/query/v1alpha1/query.ts +993 -0
- package/src/cosmos/orm/v1/orm.ts +589 -0
- package/src/cosmos/orm/v1alpha1/schema.ts +325 -0
- package/src/cosmos/params/module/v1/module.ts +80 -0
- package/src/cosmos/params/v1beta1/params.ts +255 -0
- package/src/cosmos/params/v1beta1/query.rpc.func.ts +25 -0
- package/src/cosmos/params/v1beta1/query.ts +525 -0
- package/src/cosmos/query/v1/query.ts +1 -0
- package/src/cosmos/reflection/v1/reflection.rpc.func.ts +14 -0
- package/src/cosmos/reflection/v1/reflection.ts +179 -0
- package/src/cosmos/slashing/module/v1/module.ts +99 -0
- package/src/cosmos/slashing/v1beta1/genesis.ts +492 -0
- package/src/cosmos/slashing/v1beta1/query.rpc.func.ts +36 -0
- package/src/cosmos/slashing/v1beta1/query.ts +598 -0
- package/src/cosmos/slashing/v1beta1/slashing.ts +357 -0
- package/src/cosmos/slashing/v1beta1/tx.registry.ts +47 -0
- package/src/cosmos/slashing/v1beta1/tx.rpc.func.ts +22 -0
- package/src/cosmos/slashing/v1beta1/tx.ts +390 -0
- package/src/cosmos/staking/module/v1/module.ts +157 -0
- package/src/cosmos/staking/v1beta1/authz.ts +323 -0
- package/src/cosmos/staking/v1beta1/genesis.ts +346 -0
- package/src/cosmos/staking/v1beta1/query.rpc.func.ts +157 -0
- package/src/cosmos/staking/v1beta1/query.ts +3073 -0
- package/src/cosmos/staking/v1beta1/staking.ts +3005 -0
- package/src/cosmos/staking/v1beta1/tx.registry.ts +137 -0
- package/src/cosmos/staking/v1beta1/tx.rpc.func.ts +67 -0
- package/src/cosmos/staking/v1beta1/tx.ts +1638 -0
- package/src/cosmos/store/internal/kv/v1beta1/kv.ts +207 -0
- package/src/cosmos/store/snapshots/v1/snapshot.ts +863 -0
- package/src/cosmos/store/snapshots/v2/snapshot.ts +823 -0
- package/src/cosmos/store/streaming/abci/grpc.ts +393 -0
- package/src/cosmos/store/v1beta1/commit_info.ts +362 -0
- package/src/cosmos/store/v1beta1/listening.ts +286 -0
- package/src/cosmos/streaming/v1/grpc.ts +985 -0
- package/src/cosmos/tx/config/v1/config.ts +127 -0
- package/src/cosmos/tx/signing/v1beta1/signing.ts +688 -0
- package/src/cosmos/tx/v1beta1/service.rpc.func.ts +102 -0
- package/src/cosmos/tx/v1beta1/service.ts +2294 -0
- package/src/cosmos/tx/v1beta1/tx.ts +2029 -0
- package/src/cosmos/upgrade/module/v1/module.ts +99 -0
- package/src/cosmos/upgrade/v1beta1/query.rpc.func.ts +58 -0
- package/src/cosmos/upgrade/v1beta1/query.ts +1016 -0
- package/src/cosmos/upgrade/v1beta1/tx.registry.ts +47 -0
- package/src/cosmos/upgrade/v1beta1/tx.rpc.func.ts +22 -0
- package/src/cosmos/upgrade/v1beta1/tx.ts +398 -0
- package/src/cosmos/upgrade/v1beta1/upgrade.ts +591 -0
- package/src/cosmos/validate/module/v1/module.ts +80 -0
- package/src/cosmos/vesting/module/v1/module.ts +80 -0
- package/src/cosmos/vesting/v1beta1/tx.registry.ts +65 -0
- package/src/cosmos/vesting/v1beta1/tx.rpc.func.ts +31 -0
- package/src/cosmos/vesting/v1beta1/tx.ts +698 -0
- package/src/cosmos/vesting/v1beta1/vesting.ts +735 -0
- package/src/cosmos_proto/cosmos.ts +341 -0
- package/src/cosmwasm/wasm/v1/authz.ts +1231 -0
- package/src/cosmwasm/wasm/v1/genesis.ts +532 -0
- package/src/cosmwasm/wasm/v1/ibc.ts +355 -0
- package/src/cosmwasm/wasm/v1/proposal_legacy.ts +2432 -0
- package/src/cosmwasm/wasm/v1/query.rpc.func.ts +124 -0
- package/src/cosmwasm/wasm/v1/query.ts +2560 -0
- package/src/cosmwasm/wasm/v1/tx.registry.ts +317 -0
- package/src/cosmwasm/wasm/v1/tx.rpc.func.ts +157 -0
- package/src/cosmwasm/wasm/v1/tx.ts +4191 -0
- package/src/cosmwasm/wasm/v1/types.ts +1120 -0
- package/src/ethermint/crypto/v1/ethsecp256k1/keys.ts +193 -0
- package/src/ethermint/evm/v1/events.ts +485 -0
- package/src/ethermint/evm/v1/evm.ts +1590 -0
- package/src/ethermint/evm/v1/genesis.ts +240 -0
- package/src/ethermint/evm/v1/query.rpc.func.ts +136 -0
- package/src/ethermint/evm/v1/query.ts +2535 -0
- package/src/ethermint/evm/v1/tx.registry.ts +47 -0
- package/src/ethermint/evm/v1/tx.rpc.func.ts +22 -0
- package/src/ethermint/evm/v1/tx.ts +1333 -0
- package/src/ethermint/feemarket/v1/events.ts +195 -0
- package/src/ethermint/feemarket/v1/feemarket.ts +213 -0
- package/src/ethermint/feemarket/v1/genesis.ts +114 -0
- package/src/ethermint/feemarket/v1/query.rpc.func.ts +36 -0
- package/src/ethermint/feemarket/v1/query.ts +487 -0
- package/src/ethermint/feemarket/v1/tx.registry.ts +29 -0
- package/src/ethermint/feemarket/v1/tx.rpc.func.ts +13 -0
- package/src/ethermint/feemarket/v1/tx.ts +197 -0
- package/src/ethermint/types/v1/account.ts +114 -0
- package/src/ethermint/types/v1/dynamic_fee.ts +91 -0
- package/src/ethermint/types/v1/indexer.ts +205 -0
- package/src/ethermint/types/v1/web3.ts +147 -0
- package/src/extern.ts +38 -0
- package/src/gogoproto/gogo.ts +1 -0
- package/src/google/api/annotations.ts +1 -0
- package/src/google/api/http.ts +1069 -0
- package/src/google/protobuf/any.ts +331 -0
- package/src/google/protobuf/descriptor.ts +7177 -0
- package/src/google/protobuf/duration.ts +225 -0
- package/src/google/protobuf/timestamp.ts +281 -0
- package/src/helper-func-types.ts +191 -0
- package/src/helpers.ts +259 -0
- package/src/ibc/applications/fee/v1/ack.ts +131 -0
- package/src/ibc/applications/fee/v1/fee.ts +481 -0
- package/src/ibc/applications/fee/v1/genesis.ts +661 -0
- package/src/ibc/applications/fee/v1/metadata.ts +121 -0
- package/src/ibc/applications/fee/v1/query.rpc.func.ts +113 -0
- package/src/ibc/applications/fee/v1/query.ts +2134 -0
- package/src/ibc/applications/fee/v1/tx.registry.ts +83 -0
- package/src/ibc/applications/fee/v1/tx.rpc.func.ts +40 -0
- package/src/ibc/applications/fee/v1/tx.ts +889 -0
- package/src/ibc/applications/interchain_accounts/controller/v1/controller.ts +105 -0
- package/src/ibc/applications/interchain_accounts/controller/v1/query.rpc.func.ts +25 -0
- package/src/ibc/applications/interchain_accounts/controller/v1/query.ts +379 -0
- package/src/ibc/applications/interchain_accounts/controller/v1/tx.registry.ts +65 -0
- package/src/ibc/applications/interchain_accounts/controller/v1/tx.rpc.func.ts +31 -0
- package/src/ibc/applications/interchain_accounts/controller/v1/tx.ts +685 -0
- package/src/ibc/applications/interchain_accounts/genesis/v1/genesis.ts +661 -0
- package/src/ibc/applications/interchain_accounts/host/v1/host.ts +253 -0
- package/src/ibc/applications/interchain_accounts/host/v1/query.rpc.func.ts +14 -0
- package/src/ibc/applications/interchain_accounts/host/v1/query.ts +177 -0
- package/src/ibc/applications/interchain_accounts/host/v1/tx.registry.ts +47 -0
- package/src/ibc/applications/interchain_accounts/host/v1/tx.rpc.func.ts +22 -0
- package/src/ibc/applications/interchain_accounts/host/v1/tx.ts +429 -0
- package/src/ibc/applications/interchain_accounts/v1/account.ts +112 -0
- package/src/ibc/applications/interchain_accounts/v1/metadata.ts +191 -0
- package/src/ibc/applications/interchain_accounts/v1/packet.ts +259 -0
- package/src/ibc/applications/transfer/v1/authz.ts +280 -0
- package/src/ibc/applications/transfer/v1/genesis.ts +153 -0
- package/src/ibc/applications/transfer/v1/query.rpc.func.ts +69 -0
- package/src/ibc/applications/transfer/v1/query.ts +1205 -0
- package/src/ibc/applications/transfer/v1/transfer.ts +261 -0
- package/src/ibc/applications/transfer/v1/tx.registry.ts +47 -0
- package/src/ibc/applications/transfer/v1/tx.rpc.func.ts +22 -0
- package/src/ibc/applications/transfer/v1/tx.ts +532 -0
- package/src/ibc/applications/transfer/v2/packet.ts +171 -0
- package/src/ibc/core/channel/v1/channel.ts +1510 -0
- package/src/ibc/core/channel/v1/genesis.ts +354 -0
- package/src/ibc/core/channel/v1/query.rpc.func.ts +190 -0
- package/src/ibc/core/channel/v1/query.ts +4354 -0
- package/src/ibc/core/channel/v1/tx.registry.ts +353 -0
- package/src/ibc/core/channel/v1/tx.rpc.func.ts +175 -0
- package/src/ibc/core/channel/v1/tx.ts +4866 -0
- package/src/ibc/core/channel/v1/upgrade.ts +388 -0
- package/src/ibc/core/client/v1/client.ts +927 -0
- package/src/ibc/core/client/v1/genesis.ts +426 -0
- package/src/ibc/core/client/v1/query.rpc.func.ts +113 -0
- package/src/ibc/core/client/v1/query.ts +2280 -0
- package/src/ibc/core/client/v1/tx.registry.ts +137 -0
- package/src/ibc/core/client/v1/tx.rpc.func.ts +67 -0
- package/src/ibc/core/client/v1/tx.ts +1543 -0
- package/src/ibc/core/commitment/v1/commitment.ts +418 -0
- package/src/ibc/core/connection/v1/connection.ts +1010 -0
- package/src/ibc/core/connection/v1/genesis.ts +146 -0
- package/src/ibc/core/connection/v1/query.rpc.func.ts +69 -0
- package/src/ibc/core/connection/v1/query.ts +1408 -0
- package/src/ibc/core/connection/v1/tx.registry.ts +101 -0
- package/src/ibc/core/connection/v1/tx.rpc.func.ts +49 -0
- package/src/ibc/core/connection/v1/tx.ts +1365 -0
- package/src/ibc/core/types/v1/genesis.ts +137 -0
- package/src/ibc/lightclients/localhost/v2/localhost.ts +100 -0
- package/src/ibc/lightclients/solomachine/v2/solomachine.ts +2103 -0
- package/src/ibc/lightclients/solomachine/v3/solomachine.ts +1070 -0
- package/src/ibc/lightclients/tendermint/v1/tendermint.ts +838 -0
- package/src/ibc/lightclients/wasm/v1/genesis.ts +197 -0
- package/src/ibc/lightclients/wasm/v1/query.rpc.func.ts +25 -0
- package/src/ibc/lightclients/wasm/v1/query.ts +404 -0
- package/src/ibc/lightclients/wasm/v1/tx.registry.ts +65 -0
- package/src/ibc/lightclients/wasm/v1/tx.rpc.func.ts +31 -0
- package/src/ibc/lightclients/wasm/v1/tx.ts +621 -0
- package/src/ibc/lightclients/wasm/v1/wasm.ts +438 -0
- package/src/react-query.ts +185 -0
- package/src/registry.ts +218 -0
- package/src/tendermint/abci/types.ts +6283 -0
- package/src/tendermint/crypto/keys.ts +103 -0
- package/src/tendermint/crypto/proof.ts +555 -0
- package/src/tendermint/p2p/types.ts +507 -0
- package/src/tendermint/types/block.ts +131 -0
- package/src/tendermint/types/evidence.ts +476 -0
- package/src/tendermint/types/params.ts +814 -0
- package/src/tendermint/types/types.ts +2157 -0
- package/src/tendermint/types/validator.ts +389 -0
- package/src/tendermint/version/types.ts +219 -0
- package/src/types.ts +155 -0
- package/src/utf8.ts +148 -0
- package/src/varint.ts +488 -0
- package/src/xpla/reward/v1beta1/genesis.ts +92 -0
- package/src/xpla/reward/v1beta1/query.rpc.func.ts +25 -0
- package/src/xpla/reward/v1beta1/query.ts +333 -0
- package/src/xpla/reward/v1beta1/reward.ts +153 -0
- package/src/xpla/reward/v1beta1/tx.registry.ts +47 -0
- package/src/xpla/reward/v1beta1/tx.rpc.func.ts +22 -0
- package/src/xpla/reward/v1beta1/tx.ts +391 -0
- package/src/xpla/volunteer/v1beta1/genesis.ts +92 -0
- package/src/xpla/volunteer/v1beta1/proposal.ts +649 -0
- package/src/xpla/volunteer/v1beta1/query.rpc.func.ts +14 -0
- package/src/xpla/volunteer/v1beta1/query.ts +160 -0
- package/src/xpla/volunteer/v1beta1/tx.registry.ts +47 -0
- package/src/xpla/volunteer/v1beta1/tx.rpc.func.ts +22 -0
- package/src/xpla/volunteer/v1beta1/tx.ts +448 -0
- package/src/xpla/volunteer/v1beta1/volunteervalidator.ts +107 -0
- package/tsconfig.esm.json +10 -0
- package/tsconfig.json +10 -0
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "../../../../binary";
|
|
2
|
+
import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../../helpers";
|
|
3
|
+
import { GlobalDecoderRegistry } from "../../../../registry";
|
|
4
|
+
/**
|
|
5
|
+
* MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey.
|
|
6
|
+
* See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers
|
|
7
|
+
* signed and with which modes.
|
|
8
|
+
*/
|
|
9
|
+
export interface MultiSignature {
|
|
10
|
+
signatures: Uint8Array[];
|
|
11
|
+
}
|
|
12
|
+
export interface MultiSignatureProtoMsg {
|
|
13
|
+
typeUrl: "/cosmos.crypto.multisig.v1beta1.MultiSignature";
|
|
14
|
+
value: Uint8Array;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey.
|
|
18
|
+
* See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers
|
|
19
|
+
* signed and with which modes.
|
|
20
|
+
*/
|
|
21
|
+
export interface MultiSignatureAmino {
|
|
22
|
+
signatures: string[];
|
|
23
|
+
}
|
|
24
|
+
export interface MultiSignatureAminoMsg {
|
|
25
|
+
type: "cosmos-sdk/MultiSignature";
|
|
26
|
+
value: MultiSignatureAmino;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* CompactBitArray is an implementation of a space efficient bit array.
|
|
30
|
+
* This is used to ensure that the encoded data takes up a minimal amount of
|
|
31
|
+
* space after proto encoding.
|
|
32
|
+
* This is not thread safe, and is not intended for concurrent usage.
|
|
33
|
+
*/
|
|
34
|
+
export interface CompactBitArray {
|
|
35
|
+
extraBitsStored: number;
|
|
36
|
+
elems: Uint8Array;
|
|
37
|
+
}
|
|
38
|
+
export interface CompactBitArrayProtoMsg {
|
|
39
|
+
typeUrl: "/cosmos.crypto.multisig.v1beta1.CompactBitArray";
|
|
40
|
+
value: Uint8Array;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* CompactBitArray is an implementation of a space efficient bit array.
|
|
44
|
+
* This is used to ensure that the encoded data takes up a minimal amount of
|
|
45
|
+
* space after proto encoding.
|
|
46
|
+
* This is not thread safe, and is not intended for concurrent usage.
|
|
47
|
+
*/
|
|
48
|
+
export interface CompactBitArrayAmino {
|
|
49
|
+
extra_bits_stored: number;
|
|
50
|
+
elems: string;
|
|
51
|
+
}
|
|
52
|
+
export interface CompactBitArrayAminoMsg {
|
|
53
|
+
type: "cosmos-sdk/CompactBitArray";
|
|
54
|
+
value: CompactBitArrayAmino;
|
|
55
|
+
}
|
|
56
|
+
function createBaseMultiSignature(): MultiSignature {
|
|
57
|
+
return {
|
|
58
|
+
signatures: []
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export const MultiSignature = {
|
|
62
|
+
typeUrl: "/cosmos.crypto.multisig.v1beta1.MultiSignature",
|
|
63
|
+
aminoType: "cosmos-sdk/MultiSignature",
|
|
64
|
+
is(o: any): o is MultiSignature {
|
|
65
|
+
return o && (o.$typeUrl === MultiSignature.typeUrl || Array.isArray(o.signatures) && (!o.signatures.length || o.signatures[0] instanceof Uint8Array || typeof o.signatures[0] === "string"));
|
|
66
|
+
},
|
|
67
|
+
isAmino(o: any): o is MultiSignatureAmino {
|
|
68
|
+
return o && (o.$typeUrl === MultiSignature.typeUrl || Array.isArray(o.signatures) && (!o.signatures.length || o.signatures[0] instanceof Uint8Array || typeof o.signatures[0] === "string"));
|
|
69
|
+
},
|
|
70
|
+
encode(message: MultiSignature, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
71
|
+
for (const v of message.signatures) {
|
|
72
|
+
writer.uint32(10).bytes(v!);
|
|
73
|
+
}
|
|
74
|
+
return writer;
|
|
75
|
+
},
|
|
76
|
+
decode(input: BinaryReader | Uint8Array, length?: number): MultiSignature {
|
|
77
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
78
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
79
|
+
const message = createBaseMultiSignature();
|
|
80
|
+
while (reader.pos < end) {
|
|
81
|
+
const tag = reader.uint32();
|
|
82
|
+
switch (tag >>> 3) {
|
|
83
|
+
case 1:
|
|
84
|
+
message.signatures.push(reader.bytes());
|
|
85
|
+
break;
|
|
86
|
+
default:
|
|
87
|
+
reader.skipType(tag & 7);
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return message;
|
|
92
|
+
},
|
|
93
|
+
fromPartial(object: DeepPartial<MultiSignature>): MultiSignature {
|
|
94
|
+
const message = createBaseMultiSignature();
|
|
95
|
+
message.signatures = object.signatures?.map(e => e) || [];
|
|
96
|
+
return message;
|
|
97
|
+
},
|
|
98
|
+
fromAmino(object: MultiSignatureAmino): MultiSignature {
|
|
99
|
+
const message = createBaseMultiSignature();
|
|
100
|
+
message.signatures = object.signatures?.map(e => bytesFromBase64(e)) || [];
|
|
101
|
+
return message;
|
|
102
|
+
},
|
|
103
|
+
toAmino(message: MultiSignature): MultiSignatureAmino {
|
|
104
|
+
const obj: any = {};
|
|
105
|
+
if (message.signatures) {
|
|
106
|
+
obj.signatures = message.signatures.map(e => base64FromBytes(e));
|
|
107
|
+
} else {
|
|
108
|
+
obj.signatures = message.signatures;
|
|
109
|
+
}
|
|
110
|
+
return obj;
|
|
111
|
+
},
|
|
112
|
+
fromAminoMsg(object: MultiSignatureAminoMsg): MultiSignature {
|
|
113
|
+
return MultiSignature.fromAmino(object.value);
|
|
114
|
+
},
|
|
115
|
+
toAminoMsg(message: MultiSignature): MultiSignatureAminoMsg {
|
|
116
|
+
return {
|
|
117
|
+
type: "cosmos-sdk/MultiSignature",
|
|
118
|
+
value: MultiSignature.toAmino(message)
|
|
119
|
+
};
|
|
120
|
+
},
|
|
121
|
+
fromProtoMsg(message: MultiSignatureProtoMsg): MultiSignature {
|
|
122
|
+
return MultiSignature.decode(message.value);
|
|
123
|
+
},
|
|
124
|
+
toProto(message: MultiSignature): Uint8Array {
|
|
125
|
+
return MultiSignature.encode(message).finish();
|
|
126
|
+
},
|
|
127
|
+
toProtoMsg(message: MultiSignature): MultiSignatureProtoMsg {
|
|
128
|
+
return {
|
|
129
|
+
typeUrl: "/cosmos.crypto.multisig.v1beta1.MultiSignature",
|
|
130
|
+
value: MultiSignature.encode(message).finish()
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
GlobalDecoderRegistry.register(MultiSignature.typeUrl, MultiSignature);
|
|
135
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(MultiSignature.aminoType, MultiSignature.typeUrl);
|
|
136
|
+
function createBaseCompactBitArray(): CompactBitArray {
|
|
137
|
+
return {
|
|
138
|
+
extraBitsStored: 0,
|
|
139
|
+
elems: new Uint8Array()
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
export const CompactBitArray = {
|
|
143
|
+
typeUrl: "/cosmos.crypto.multisig.v1beta1.CompactBitArray",
|
|
144
|
+
aminoType: "cosmos-sdk/CompactBitArray",
|
|
145
|
+
is(o: any): o is CompactBitArray {
|
|
146
|
+
return o && (o.$typeUrl === CompactBitArray.typeUrl || typeof o.extraBitsStored === "number" && (o.elems instanceof Uint8Array || typeof o.elems === "string"));
|
|
147
|
+
},
|
|
148
|
+
isAmino(o: any): o is CompactBitArrayAmino {
|
|
149
|
+
return o && (o.$typeUrl === CompactBitArray.typeUrl || typeof o.extra_bits_stored === "number" && (o.elems instanceof Uint8Array || typeof o.elems === "string"));
|
|
150
|
+
},
|
|
151
|
+
encode(message: CompactBitArray, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
152
|
+
if (message.extraBitsStored !== 0) {
|
|
153
|
+
writer.uint32(8).uint32(message.extraBitsStored);
|
|
154
|
+
}
|
|
155
|
+
if (message.elems.length !== 0) {
|
|
156
|
+
writer.uint32(18).bytes(message.elems);
|
|
157
|
+
}
|
|
158
|
+
return writer;
|
|
159
|
+
},
|
|
160
|
+
decode(input: BinaryReader | Uint8Array, length?: number): CompactBitArray {
|
|
161
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
162
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
163
|
+
const message = createBaseCompactBitArray();
|
|
164
|
+
while (reader.pos < end) {
|
|
165
|
+
const tag = reader.uint32();
|
|
166
|
+
switch (tag >>> 3) {
|
|
167
|
+
case 1:
|
|
168
|
+
message.extraBitsStored = reader.uint32();
|
|
169
|
+
break;
|
|
170
|
+
case 2:
|
|
171
|
+
message.elems = reader.bytes();
|
|
172
|
+
break;
|
|
173
|
+
default:
|
|
174
|
+
reader.skipType(tag & 7);
|
|
175
|
+
break;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
return message;
|
|
179
|
+
},
|
|
180
|
+
fromPartial(object: DeepPartial<CompactBitArray>): CompactBitArray {
|
|
181
|
+
const message = createBaseCompactBitArray();
|
|
182
|
+
message.extraBitsStored = object.extraBitsStored ?? 0;
|
|
183
|
+
message.elems = object.elems ?? new Uint8Array();
|
|
184
|
+
return message;
|
|
185
|
+
},
|
|
186
|
+
fromAmino(object: CompactBitArrayAmino): CompactBitArray {
|
|
187
|
+
const message = createBaseCompactBitArray();
|
|
188
|
+
if (object.extra_bits_stored !== undefined && object.extra_bits_stored !== null) {
|
|
189
|
+
message.extraBitsStored = object.extra_bits_stored;
|
|
190
|
+
}
|
|
191
|
+
if (object.elems !== undefined && object.elems !== null) {
|
|
192
|
+
message.elems = bytesFromBase64(object.elems);
|
|
193
|
+
}
|
|
194
|
+
return message;
|
|
195
|
+
},
|
|
196
|
+
toAmino(message: CompactBitArray): CompactBitArrayAmino {
|
|
197
|
+
const obj: any = {};
|
|
198
|
+
obj.extra_bits_stored = message.extraBitsStored === 0 ? undefined : message.extraBitsStored;
|
|
199
|
+
obj.elems = message.elems ? base64FromBytes(message.elems) : undefined;
|
|
200
|
+
return obj;
|
|
201
|
+
},
|
|
202
|
+
fromAminoMsg(object: CompactBitArrayAminoMsg): CompactBitArray {
|
|
203
|
+
return CompactBitArray.fromAmino(object.value);
|
|
204
|
+
},
|
|
205
|
+
toAminoMsg(message: CompactBitArray): CompactBitArrayAminoMsg {
|
|
206
|
+
return {
|
|
207
|
+
type: "cosmos-sdk/CompactBitArray",
|
|
208
|
+
value: CompactBitArray.toAmino(message)
|
|
209
|
+
};
|
|
210
|
+
},
|
|
211
|
+
fromProtoMsg(message: CompactBitArrayProtoMsg): CompactBitArray {
|
|
212
|
+
return CompactBitArray.decode(message.value);
|
|
213
|
+
},
|
|
214
|
+
toProto(message: CompactBitArray): Uint8Array {
|
|
215
|
+
return CompactBitArray.encode(message).finish();
|
|
216
|
+
},
|
|
217
|
+
toProtoMsg(message: CompactBitArray): CompactBitArrayProtoMsg {
|
|
218
|
+
return {
|
|
219
|
+
typeUrl: "/cosmos.crypto.multisig.v1beta1.CompactBitArray",
|
|
220
|
+
value: CompactBitArray.encode(message).finish()
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
GlobalDecoderRegistry.register(CompactBitArray.typeUrl, CompactBitArray);
|
|
225
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(CompactBitArray.aminoType, CompactBitArray.typeUrl);
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "../../../binary";
|
|
2
|
+
import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers";
|
|
3
|
+
import { GlobalDecoderRegistry } from "../../../registry";
|
|
4
|
+
/**
|
|
5
|
+
* PubKey defines a secp256k1 public key
|
|
6
|
+
* Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte
|
|
7
|
+
* if the y-coordinate is the lexicographically largest of the two associated with
|
|
8
|
+
* the x-coordinate. Otherwise the first byte is a 0x03.
|
|
9
|
+
* This prefix is followed with the x-coordinate.
|
|
10
|
+
*/
|
|
11
|
+
export interface PubKey {
|
|
12
|
+
key: Uint8Array;
|
|
13
|
+
}
|
|
14
|
+
export interface PubKeyProtoMsg {
|
|
15
|
+
typeUrl: "/cosmos.crypto.secp256k1.PubKey";
|
|
16
|
+
value: Uint8Array;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* PubKey defines a secp256k1 public key
|
|
20
|
+
* Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte
|
|
21
|
+
* if the y-coordinate is the lexicographically largest of the two associated with
|
|
22
|
+
* the x-coordinate. Otherwise the first byte is a 0x03.
|
|
23
|
+
* This prefix is followed with the x-coordinate.
|
|
24
|
+
*/
|
|
25
|
+
export interface PubKeyAmino {
|
|
26
|
+
key: string;
|
|
27
|
+
}
|
|
28
|
+
export interface PubKeyAminoMsg {
|
|
29
|
+
type: "tendermint/PubKeySecp256k1";
|
|
30
|
+
value: PubKeyAmino;
|
|
31
|
+
}
|
|
32
|
+
/** PrivKey defines a secp256k1 private key. */
|
|
33
|
+
export interface PrivKey {
|
|
34
|
+
key: Uint8Array;
|
|
35
|
+
}
|
|
36
|
+
export interface PrivKeyProtoMsg {
|
|
37
|
+
typeUrl: "/cosmos.crypto.secp256k1.PrivKey";
|
|
38
|
+
value: Uint8Array;
|
|
39
|
+
}
|
|
40
|
+
/** PrivKey defines a secp256k1 private key. */
|
|
41
|
+
export interface PrivKeyAmino {
|
|
42
|
+
key: string;
|
|
43
|
+
}
|
|
44
|
+
export interface PrivKeyAminoMsg {
|
|
45
|
+
type: "tendermint/PrivKeySecp256k1";
|
|
46
|
+
value: PrivKeyAmino;
|
|
47
|
+
}
|
|
48
|
+
function createBasePubKey(): PubKey {
|
|
49
|
+
return {
|
|
50
|
+
key: new Uint8Array()
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export const PubKey = {
|
|
54
|
+
typeUrl: "/cosmos.crypto.secp256k1.PubKey",
|
|
55
|
+
aminoType: "tendermint/PubKeySecp256k1",
|
|
56
|
+
is(o: any): o is PubKey {
|
|
57
|
+
return o && (o.$typeUrl === PubKey.typeUrl || o.key instanceof Uint8Array || typeof o.key === "string");
|
|
58
|
+
},
|
|
59
|
+
isAmino(o: any): o is PubKeyAmino {
|
|
60
|
+
return o && (o.$typeUrl === PubKey.typeUrl || o.key instanceof Uint8Array || typeof o.key === "string");
|
|
61
|
+
},
|
|
62
|
+
encode(message: PubKey, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
63
|
+
if (message.key.length !== 0) {
|
|
64
|
+
writer.uint32(10).bytes(message.key);
|
|
65
|
+
}
|
|
66
|
+
return writer;
|
|
67
|
+
},
|
|
68
|
+
decode(input: BinaryReader | Uint8Array, length?: number): PubKey {
|
|
69
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
70
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
71
|
+
const message = createBasePubKey();
|
|
72
|
+
while (reader.pos < end) {
|
|
73
|
+
const tag = reader.uint32();
|
|
74
|
+
switch (tag >>> 3) {
|
|
75
|
+
case 1:
|
|
76
|
+
message.key = reader.bytes();
|
|
77
|
+
break;
|
|
78
|
+
default:
|
|
79
|
+
reader.skipType(tag & 7);
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return message;
|
|
84
|
+
},
|
|
85
|
+
fromPartial(object: DeepPartial<PubKey>): PubKey {
|
|
86
|
+
const message = createBasePubKey();
|
|
87
|
+
message.key = object.key ?? new Uint8Array();
|
|
88
|
+
return message;
|
|
89
|
+
},
|
|
90
|
+
fromAmino(object: PubKeyAmino): PubKey {
|
|
91
|
+
const message = createBasePubKey();
|
|
92
|
+
if (object.key !== undefined && object.key !== null) {
|
|
93
|
+
message.key = bytesFromBase64(object.key);
|
|
94
|
+
}
|
|
95
|
+
return message;
|
|
96
|
+
},
|
|
97
|
+
toAmino(message: PubKey): PubKeyAmino {
|
|
98
|
+
const obj: any = {};
|
|
99
|
+
obj.key = message.key ? base64FromBytes(message.key) : undefined;
|
|
100
|
+
return obj;
|
|
101
|
+
},
|
|
102
|
+
fromAminoMsg(object: PubKeyAminoMsg): PubKey {
|
|
103
|
+
return PubKey.fromAmino(object.value);
|
|
104
|
+
},
|
|
105
|
+
toAminoMsg(message: PubKey): PubKeyAminoMsg {
|
|
106
|
+
return {
|
|
107
|
+
type: "tendermint/PubKeySecp256k1",
|
|
108
|
+
value: PubKey.toAmino(message)
|
|
109
|
+
};
|
|
110
|
+
},
|
|
111
|
+
fromProtoMsg(message: PubKeyProtoMsg): PubKey {
|
|
112
|
+
return PubKey.decode(message.value);
|
|
113
|
+
},
|
|
114
|
+
toProto(message: PubKey): Uint8Array {
|
|
115
|
+
return PubKey.encode(message).finish();
|
|
116
|
+
},
|
|
117
|
+
toProtoMsg(message: PubKey): PubKeyProtoMsg {
|
|
118
|
+
return {
|
|
119
|
+
typeUrl: "/cosmos.crypto.secp256k1.PubKey",
|
|
120
|
+
value: PubKey.encode(message).finish()
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
GlobalDecoderRegistry.register(PubKey.typeUrl, PubKey);
|
|
125
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(PubKey.aminoType, PubKey.typeUrl);
|
|
126
|
+
function createBasePrivKey(): PrivKey {
|
|
127
|
+
return {
|
|
128
|
+
key: new Uint8Array()
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
export const PrivKey = {
|
|
132
|
+
typeUrl: "/cosmos.crypto.secp256k1.PrivKey",
|
|
133
|
+
aminoType: "tendermint/PrivKeySecp256k1",
|
|
134
|
+
is(o: any): o is PrivKey {
|
|
135
|
+
return o && (o.$typeUrl === PrivKey.typeUrl || o.key instanceof Uint8Array || typeof o.key === "string");
|
|
136
|
+
},
|
|
137
|
+
isAmino(o: any): o is PrivKeyAmino {
|
|
138
|
+
return o && (o.$typeUrl === PrivKey.typeUrl || o.key instanceof Uint8Array || typeof o.key === "string");
|
|
139
|
+
},
|
|
140
|
+
encode(message: PrivKey, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
141
|
+
if (message.key.length !== 0) {
|
|
142
|
+
writer.uint32(10).bytes(message.key);
|
|
143
|
+
}
|
|
144
|
+
return writer;
|
|
145
|
+
},
|
|
146
|
+
decode(input: BinaryReader | Uint8Array, length?: number): PrivKey {
|
|
147
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
148
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
149
|
+
const message = createBasePrivKey();
|
|
150
|
+
while (reader.pos < end) {
|
|
151
|
+
const tag = reader.uint32();
|
|
152
|
+
switch (tag >>> 3) {
|
|
153
|
+
case 1:
|
|
154
|
+
message.key = reader.bytes();
|
|
155
|
+
break;
|
|
156
|
+
default:
|
|
157
|
+
reader.skipType(tag & 7);
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return message;
|
|
162
|
+
},
|
|
163
|
+
fromPartial(object: DeepPartial<PrivKey>): PrivKey {
|
|
164
|
+
const message = createBasePrivKey();
|
|
165
|
+
message.key = object.key ?? new Uint8Array();
|
|
166
|
+
return message;
|
|
167
|
+
},
|
|
168
|
+
fromAmino(object: PrivKeyAmino): PrivKey {
|
|
169
|
+
const message = createBasePrivKey();
|
|
170
|
+
if (object.key !== undefined && object.key !== null) {
|
|
171
|
+
message.key = bytesFromBase64(object.key);
|
|
172
|
+
}
|
|
173
|
+
return message;
|
|
174
|
+
},
|
|
175
|
+
toAmino(message: PrivKey): PrivKeyAmino {
|
|
176
|
+
const obj: any = {};
|
|
177
|
+
obj.key = message.key ? base64FromBytes(message.key) : undefined;
|
|
178
|
+
return obj;
|
|
179
|
+
},
|
|
180
|
+
fromAminoMsg(object: PrivKeyAminoMsg): PrivKey {
|
|
181
|
+
return PrivKey.fromAmino(object.value);
|
|
182
|
+
},
|
|
183
|
+
toAminoMsg(message: PrivKey): PrivKeyAminoMsg {
|
|
184
|
+
return {
|
|
185
|
+
type: "tendermint/PrivKeySecp256k1",
|
|
186
|
+
value: PrivKey.toAmino(message)
|
|
187
|
+
};
|
|
188
|
+
},
|
|
189
|
+
fromProtoMsg(message: PrivKeyProtoMsg): PrivKey {
|
|
190
|
+
return PrivKey.decode(message.value);
|
|
191
|
+
},
|
|
192
|
+
toProto(message: PrivKey): Uint8Array {
|
|
193
|
+
return PrivKey.encode(message).finish();
|
|
194
|
+
},
|
|
195
|
+
toProtoMsg(message: PrivKey): PrivKeyProtoMsg {
|
|
196
|
+
return {
|
|
197
|
+
typeUrl: "/cosmos.crypto.secp256k1.PrivKey",
|
|
198
|
+
value: PrivKey.encode(message).finish()
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
GlobalDecoderRegistry.register(PrivKey.typeUrl, PrivKey);
|
|
203
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(PrivKey.aminoType, PrivKey.typeUrl);
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "../../../binary";
|
|
2
|
+
import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers";
|
|
3
|
+
import { GlobalDecoderRegistry } from "../../../registry";
|
|
4
|
+
/** PubKey defines a secp256r1 ECDSA public key. */
|
|
5
|
+
export interface PubKey {
|
|
6
|
+
/**
|
|
7
|
+
* Point on secp256r1 curve in a compressed representation as specified in section
|
|
8
|
+
* 4.3.6 of ANSI X9.62: https://webstore.ansi.org/standards/ascx9/ansix9621998
|
|
9
|
+
*/
|
|
10
|
+
key: Uint8Array;
|
|
11
|
+
}
|
|
12
|
+
export interface PubKeyProtoMsg {
|
|
13
|
+
typeUrl: "/cosmos.crypto.secp256r1.PubKey";
|
|
14
|
+
value: Uint8Array;
|
|
15
|
+
}
|
|
16
|
+
/** PubKey defines a secp256r1 ECDSA public key. */
|
|
17
|
+
export interface PubKeyAmino {
|
|
18
|
+
/**
|
|
19
|
+
* Point on secp256r1 curve in a compressed representation as specified in section
|
|
20
|
+
* 4.3.6 of ANSI X9.62: https://webstore.ansi.org/standards/ascx9/ansix9621998
|
|
21
|
+
*/
|
|
22
|
+
key: string;
|
|
23
|
+
}
|
|
24
|
+
export interface PubKeyAminoMsg {
|
|
25
|
+
type: "cosmos-sdk/PubKey";
|
|
26
|
+
value: PubKeyAmino;
|
|
27
|
+
}
|
|
28
|
+
/** PrivKey defines a secp256r1 ECDSA private key. */
|
|
29
|
+
export interface PrivKey {
|
|
30
|
+
/** secret number serialized using big-endian encoding */
|
|
31
|
+
secret: Uint8Array;
|
|
32
|
+
}
|
|
33
|
+
export interface PrivKeyProtoMsg {
|
|
34
|
+
typeUrl: "/cosmos.crypto.secp256r1.PrivKey";
|
|
35
|
+
value: Uint8Array;
|
|
36
|
+
}
|
|
37
|
+
/** PrivKey defines a secp256r1 ECDSA private key. */
|
|
38
|
+
export interface PrivKeyAmino {
|
|
39
|
+
/** secret number serialized using big-endian encoding */
|
|
40
|
+
secret: string;
|
|
41
|
+
}
|
|
42
|
+
export interface PrivKeyAminoMsg {
|
|
43
|
+
type: "cosmos-sdk/PrivKey";
|
|
44
|
+
value: PrivKeyAmino;
|
|
45
|
+
}
|
|
46
|
+
function createBasePubKey(): PubKey {
|
|
47
|
+
return {
|
|
48
|
+
key: new Uint8Array()
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export const PubKey = {
|
|
52
|
+
typeUrl: "/cosmos.crypto.secp256r1.PubKey",
|
|
53
|
+
aminoType: "cosmos-sdk/PubKey",
|
|
54
|
+
is(o: any): o is PubKey {
|
|
55
|
+
return o && (o.$typeUrl === PubKey.typeUrl || o.key instanceof Uint8Array || typeof o.key === "string");
|
|
56
|
+
},
|
|
57
|
+
isAmino(o: any): o is PubKeyAmino {
|
|
58
|
+
return o && (o.$typeUrl === PubKey.typeUrl || o.key instanceof Uint8Array || typeof o.key === "string");
|
|
59
|
+
},
|
|
60
|
+
encode(message: PubKey, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
61
|
+
if (message.key.length !== 0) {
|
|
62
|
+
writer.uint32(10).bytes(message.key);
|
|
63
|
+
}
|
|
64
|
+
return writer;
|
|
65
|
+
},
|
|
66
|
+
decode(input: BinaryReader | Uint8Array, length?: number): PubKey {
|
|
67
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
68
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
69
|
+
const message = createBasePubKey();
|
|
70
|
+
while (reader.pos < end) {
|
|
71
|
+
const tag = reader.uint32();
|
|
72
|
+
switch (tag >>> 3) {
|
|
73
|
+
case 1:
|
|
74
|
+
message.key = reader.bytes();
|
|
75
|
+
break;
|
|
76
|
+
default:
|
|
77
|
+
reader.skipType(tag & 7);
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return message;
|
|
82
|
+
},
|
|
83
|
+
fromPartial(object: DeepPartial<PubKey>): PubKey {
|
|
84
|
+
const message = createBasePubKey();
|
|
85
|
+
message.key = object.key ?? new Uint8Array();
|
|
86
|
+
return message;
|
|
87
|
+
},
|
|
88
|
+
fromAmino(object: PubKeyAmino): PubKey {
|
|
89
|
+
const message = createBasePubKey();
|
|
90
|
+
if (object.key !== undefined && object.key !== null) {
|
|
91
|
+
message.key = bytesFromBase64(object.key);
|
|
92
|
+
}
|
|
93
|
+
return message;
|
|
94
|
+
},
|
|
95
|
+
toAmino(message: PubKey): PubKeyAmino {
|
|
96
|
+
const obj: any = {};
|
|
97
|
+
obj.key = message.key ? base64FromBytes(message.key) : undefined;
|
|
98
|
+
return obj;
|
|
99
|
+
},
|
|
100
|
+
fromAminoMsg(object: PubKeyAminoMsg): PubKey {
|
|
101
|
+
return PubKey.fromAmino(object.value);
|
|
102
|
+
},
|
|
103
|
+
toAminoMsg(message: PubKey): PubKeyAminoMsg {
|
|
104
|
+
return {
|
|
105
|
+
type: "cosmos-sdk/PubKey",
|
|
106
|
+
value: PubKey.toAmino(message)
|
|
107
|
+
};
|
|
108
|
+
},
|
|
109
|
+
fromProtoMsg(message: PubKeyProtoMsg): PubKey {
|
|
110
|
+
return PubKey.decode(message.value);
|
|
111
|
+
},
|
|
112
|
+
toProto(message: PubKey): Uint8Array {
|
|
113
|
+
return PubKey.encode(message).finish();
|
|
114
|
+
},
|
|
115
|
+
toProtoMsg(message: PubKey): PubKeyProtoMsg {
|
|
116
|
+
return {
|
|
117
|
+
typeUrl: "/cosmos.crypto.secp256r1.PubKey",
|
|
118
|
+
value: PubKey.encode(message).finish()
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
GlobalDecoderRegistry.register(PubKey.typeUrl, PubKey);
|
|
123
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(PubKey.aminoType, PubKey.typeUrl);
|
|
124
|
+
function createBasePrivKey(): PrivKey {
|
|
125
|
+
return {
|
|
126
|
+
secret: new Uint8Array()
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
export const PrivKey = {
|
|
130
|
+
typeUrl: "/cosmos.crypto.secp256r1.PrivKey",
|
|
131
|
+
aminoType: "cosmos-sdk/PrivKey",
|
|
132
|
+
is(o: any): o is PrivKey {
|
|
133
|
+
return o && (o.$typeUrl === PrivKey.typeUrl || o.secret instanceof Uint8Array || typeof o.secret === "string");
|
|
134
|
+
},
|
|
135
|
+
isAmino(o: any): o is PrivKeyAmino {
|
|
136
|
+
return o && (o.$typeUrl === PrivKey.typeUrl || o.secret instanceof Uint8Array || typeof o.secret === "string");
|
|
137
|
+
},
|
|
138
|
+
encode(message: PrivKey, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
139
|
+
if (message.secret.length !== 0) {
|
|
140
|
+
writer.uint32(10).bytes(message.secret);
|
|
141
|
+
}
|
|
142
|
+
return writer;
|
|
143
|
+
},
|
|
144
|
+
decode(input: BinaryReader | Uint8Array, length?: number): PrivKey {
|
|
145
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
146
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
147
|
+
const message = createBasePrivKey();
|
|
148
|
+
while (reader.pos < end) {
|
|
149
|
+
const tag = reader.uint32();
|
|
150
|
+
switch (tag >>> 3) {
|
|
151
|
+
case 1:
|
|
152
|
+
message.secret = reader.bytes();
|
|
153
|
+
break;
|
|
154
|
+
default:
|
|
155
|
+
reader.skipType(tag & 7);
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return message;
|
|
160
|
+
},
|
|
161
|
+
fromPartial(object: DeepPartial<PrivKey>): PrivKey {
|
|
162
|
+
const message = createBasePrivKey();
|
|
163
|
+
message.secret = object.secret ?? new Uint8Array();
|
|
164
|
+
return message;
|
|
165
|
+
},
|
|
166
|
+
fromAmino(object: PrivKeyAmino): PrivKey {
|
|
167
|
+
const message = createBasePrivKey();
|
|
168
|
+
if (object.secret !== undefined && object.secret !== null) {
|
|
169
|
+
message.secret = bytesFromBase64(object.secret);
|
|
170
|
+
}
|
|
171
|
+
return message;
|
|
172
|
+
},
|
|
173
|
+
toAmino(message: PrivKey): PrivKeyAmino {
|
|
174
|
+
const obj: any = {};
|
|
175
|
+
obj.secret = message.secret ? base64FromBytes(message.secret) : undefined;
|
|
176
|
+
return obj;
|
|
177
|
+
},
|
|
178
|
+
fromAminoMsg(object: PrivKeyAminoMsg): PrivKey {
|
|
179
|
+
return PrivKey.fromAmino(object.value);
|
|
180
|
+
},
|
|
181
|
+
toAminoMsg(message: PrivKey): PrivKeyAminoMsg {
|
|
182
|
+
return {
|
|
183
|
+
type: "cosmos-sdk/PrivKey",
|
|
184
|
+
value: PrivKey.toAmino(message)
|
|
185
|
+
};
|
|
186
|
+
},
|
|
187
|
+
fromProtoMsg(message: PrivKeyProtoMsg): PrivKey {
|
|
188
|
+
return PrivKey.decode(message.value);
|
|
189
|
+
},
|
|
190
|
+
toProto(message: PrivKey): Uint8Array {
|
|
191
|
+
return PrivKey.encode(message).finish();
|
|
192
|
+
},
|
|
193
|
+
toProtoMsg(message: PrivKey): PrivKeyProtoMsg {
|
|
194
|
+
return {
|
|
195
|
+
typeUrl: "/cosmos.crypto.secp256r1.PrivKey",
|
|
196
|
+
value: PrivKey.encode(message).finish()
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
GlobalDecoderRegistry.register(PrivKey.typeUrl, PrivKey);
|
|
201
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(PrivKey.aminoType, PrivKey.typeUrl);
|