example-js-sdk 0.0.1
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/README.md +89 -0
- package/lib/CarbonSDK.d.ts +145 -0
- package/lib/CarbonSDK.js +496 -0
- package/lib/clients/BatchQueryClient.d.ts +26 -0
- package/lib/clients/BatchQueryClient.js +88 -0
- package/lib/clients/BlockchainClient.d.ts +16 -0
- package/lib/clients/BlockchainClient.js +19 -0
- package/lib/clients/CarbonQueryClient.d.ts +108 -0
- package/lib/clients/CarbonQueryClient.js +109 -0
- package/lib/clients/ETHClient.d.ts +101 -0
- package/lib/clients/ETHClient.js +344 -0
- package/lib/clients/GasFee.d.ts +12 -0
- package/lib/clients/GasFee.js +30 -0
- package/lib/clients/GrpcQueryClient.d.ts +22 -0
- package/lib/clients/GrpcQueryClient.js +60 -0
- package/lib/clients/HydrogenClient.d.ts +28 -0
- package/lib/clients/HydrogenClient.js +225 -0
- package/lib/clients/InsightsQueryClient.d.ts +77 -0
- package/lib/clients/InsightsQueryClient.js +496 -0
- package/lib/clients/TokenClient.d.ts +93 -0
- package/lib/clients/TokenClient.js +715 -0
- package/lib/clients/index.d.ts +7 -0
- package/lib/clients/index.js +20 -0
- package/lib/codec/alliance/alliance/alliance.d.ts +72 -0
- package/lib/codec/alliance/alliance/alliance.js +369 -0
- package/lib/codec/alliance/alliance/delegations.d.ts +67 -0
- package/lib/codec/alliance/alliance/delegations.js +373 -0
- package/lib/codec/alliance/alliance/events.d.ts +76 -0
- package/lib/codec/alliance/alliance/events.js +451 -0
- package/lib/codec/alliance/alliance/export.d.ts +10 -0
- package/lib/codec/alliance/alliance/export.js +84 -0
- package/lib/codec/alliance/alliance/genesis.d.ts +80 -0
- package/lib/codec/alliance/alliance/genesis.js +503 -0
- package/lib/codec/alliance/alliance/gov.d.ts +84 -0
- package/lib/codec/alliance/alliance/gov.js +403 -0
- package/lib/codec/alliance/alliance/params.d.ts +37 -0
- package/lib/codec/alliance/alliance/params.js +204 -0
- package/lib/codec/alliance/alliance/query.d.ts +442 -0
- package/lib/codec/alliance/alliance/query.js +2036 -0
- package/lib/codec/alliance/alliance/redelegations.d.ts +60 -0
- package/lib/codec/alliance/alliance/redelegations.js +290 -0
- package/lib/codec/alliance/alliance/tx.d.ts +250 -0
- package/lib/codec/alliance/alliance/tx.js +1096 -0
- package/lib/codec/alliance/alliance/unbonding.d.ts +27 -0
- package/lib/codec/alliance/alliance/unbonding.js +128 -0
- package/lib/codec/amino/amino.d.ts +1 -0
- package/lib/codec/amino/amino.js +5 -0
- package/lib/codec/carbon-models.d.ts +23 -0
- package/lib/codec/carbon-models.js +59 -0
- package/lib/codec/cosmos/app/runtime/v1alpha1/module.d.ts +86 -0
- package/lib/codec/cosmos/app/runtime/v1alpha1/module.js +279 -0
- package/lib/codec/cosmos/app/v1alpha1/config.d.ts +86 -0
- package/lib/codec/cosmos/app/v1alpha1/config.js +237 -0
- package/lib/codec/cosmos/app/v1alpha1/module.d.ts +112 -0
- package/lib/codec/cosmos/app/v1alpha1/module.js +215 -0
- package/lib/codec/cosmos/app/v1alpha1/query.d.ts +49 -0
- package/lib/codec/cosmos/app/v1alpha1/query.js +118 -0
- package/lib/codec/cosmos/auth/module/v1/module.d.ts +43 -0
- package/lib/codec/cosmos/auth/module/v1/module.js +166 -0
- package/lib/codec/cosmos/auth/v1beta1/auth.d.ts +80 -0
- package/lib/codec/cosmos/auth/v1beta1/auth.js +424 -0
- package/lib/codec/cosmos/auth/v1beta1/export.d.ts +3 -0
- package/lib/codec/cosmos/auth/v1beta1/export.js +32 -0
- package/lib/codec/cosmos/auth/v1beta1/genesis.d.ts +25 -0
- package/lib/codec/cosmos/auth/v1beta1/genesis.js +88 -0
- package/lib/codec/cosmos/auth/v1beta1/query.d.ts +402 -0
- package/lib/codec/cosmos/auth/v1beta1/query.js +1110 -0
- package/lib/codec/cosmos/auth/v1beta1/tx.d.ts +69 -0
- package/lib/codec/cosmos/auth/v1beta1/tx.js +132 -0
- package/lib/codec/cosmos/authz/module/v1/module.d.ts +19 -0
- package/lib/codec/cosmos/authz/module/v1/module.js +51 -0
- package/lib/codec/cosmos/authz/v1beta1/authz.d.ts +78 -0
- package/lib/codec/cosmos/authz/v1beta1/authz.js +298 -0
- package/lib/codec/cosmos/authz/v1beta1/event.d.ts +43 -0
- package/lib/codec/cosmos/authz/v1beta1/event.js +165 -0
- package/lib/codec/cosmos/authz/v1beta1/genesis.d.ts +22 -0
- package/lib/codec/cosmos/authz/v1beta1/genesis.js +72 -0
- package/lib/codec/cosmos/authz/v1beta1/query.d.ts +131 -0
- package/lib/codec/cosmos/authz/v1beta1/query.js +473 -0
- package/lib/codec/cosmos/authz/v1beta1/tx.d.ts +135 -0
- package/lib/codec/cosmos/authz/v1beta1/tx.js +426 -0
- package/lib/codec/cosmos/autocli/v1/options.d.ts +191 -0
- package/lib/codec/cosmos/autocli/v1/options.js +737 -0
- package/lib/codec/cosmos/autocli/v1/query.d.ts +66 -0
- package/lib/codec/cosmos/autocli/v1/query.js +203 -0
- package/lib/codec/cosmos/bank/module/v1/module.d.ts +34 -0
- package/lib/codec/cosmos/bank/module/v1/module.js +105 -0
- package/lib/codec/cosmos/bank/v1beta1/authz.d.ts +33 -0
- package/lib/codec/cosmos/bank/v1beta1/authz.js +87 -0
- package/lib/codec/cosmos/bank/v1beta1/bank.d.ts +167 -0
- package/lib/codec/cosmos/bank/v1beta1/bank.js +554 -0
- package/lib/codec/cosmos/bank/v1beta1/export.d.ts +5 -0
- package/lib/codec/cosmos/bank/v1beta1/export.js +52 -0
- package/lib/codec/cosmos/bank/v1beta1/genesis.d.ts +56 -0
- package/lib/codec/cosmos/bank/v1beta1/genesis.js +210 -0
- package/lib/codec/cosmos/bank/v1beta1/query.d.ts +587 -0
- package/lib/codec/cosmos/bank/v1beta1/query.js +1710 -0
- package/lib/codec/cosmos/bank/v1beta1/tx.d.ts +184 -0
- package/lib/codec/cosmos/bank/v1beta1/tx.js +499 -0
- package/lib/codec/cosmos/base/abci/v1beta1/abci.d.ts +269 -0
- package/lib/codec/cosmos/base/abci/v1beta1/abci.js +1109 -0
- package/lib/codec/cosmos/base/node/v1beta1/query.d.ts +85 -0
- package/lib/codec/cosmos/base/node/v1beta1/query.js +374 -0
- package/lib/codec/cosmos/base/query/v1beta1/pagination.d.ts +87 -0
- package/lib/codec/cosmos/base/query/v1beta1/pagination.js +221 -0
- package/lib/codec/cosmos/base/reflection/v1beta1/reflection.d.ts +88 -0
- package/lib/codec/cosmos/base/reflection/v1beta1/reflection.js +233 -0
- package/lib/codec/cosmos/base/reflection/v2alpha1/reflection.d.ts +443 -0
- package/lib/codec/cosmos/base/reflection/v2alpha1/reflection.js +1537 -0
- package/lib/codec/cosmos/base/tendermint/v1beta1/query.d.ts +343 -0
- package/lib/codec/cosmos/base/tendermint/v1beta1/query.js +1530 -0
- package/lib/codec/cosmos/base/tendermint/v1beta1/types.d.ts +69 -0
- package/lib/codec/cosmos/base/tendermint/v1beta1/types.js +417 -0
- package/lib/codec/cosmos/base/v1beta1/coin.d.ts +74 -0
- package/lib/codec/cosmos/base/v1beta1/coin.js +237 -0
- package/lib/codec/cosmos/circuit/module/v1/module.d.ts +21 -0
- package/lib/codec/cosmos/circuit/module/v1/module.js +65 -0
- package/lib/codec/cosmos/circuit/v1/query.d.ts +106 -0
- package/lib/codec/cosmos/circuit/v1/query.js +356 -0
- package/lib/codec/cosmos/circuit/v1/tx.d.ts +137 -0
- package/lib/codec/cosmos/circuit/v1/tx.js +398 -0
- package/lib/codec/cosmos/circuit/v1/types.d.ts +84 -0
- package/lib/codec/cosmos/circuit/v1/types.js +289 -0
- package/lib/codec/cosmos/consensus/module/v1/module.d.ts +21 -0
- package/lib/codec/cosmos/consensus/module/v1/module.js +65 -0
- package/lib/codec/cosmos/consensus/v1/query.d.ts +54 -0
- package/lib/codec/cosmos/consensus/v1/query.js +118 -0
- package/lib/codec/cosmos/consensus/v1/tx.d.ts +70 -0
- package/lib/codec/cosmos/consensus/v1/tx.js +176 -0
- package/lib/codec/cosmos/crisis/module/v1/module.d.ts +23 -0
- package/lib/codec/cosmos/crisis/module/v1/module.js +79 -0
- package/lib/codec/cosmos/crisis/v1beta1/genesis.d.ts +25 -0
- package/lib/codec/cosmos/crisis/v1beta1/genesis.js +69 -0
- package/lib/codec/cosmos/crisis/v1beta1/tx.d.ts +96 -0
- package/lib/codec/cosmos/crisis/v1beta1/tx.js +250 -0
- package/lib/codec/cosmos/crypto/ed25519/keys.d.ts +41 -0
- package/lib/codec/cosmos/crypto/ed25519/keys.js +155 -0
- package/lib/codec/cosmos/crypto/hd/v1/hd.d.ts +33 -0
- package/lib/codec/cosmos/crypto/hd/v1/hd.js +115 -0
- package/lib/codec/cosmos/crypto/keyring/v1/record.d.ts +83 -0
- package/lib/codec/cosmos/crypto/keyring/v1/record.js +314 -0
- package/lib/codec/cosmos/crypto/multisig/keys.d.ts +26 -0
- package/lib/codec/cosmos/crypto/multisig/keys.js +85 -0
- package/lib/codec/cosmos/crypto/multisig/v1beta1/multisig.d.ts +42 -0
- package/lib/codec/cosmos/crypto/multisig/v1beta1/multisig.js +175 -0
- package/lib/codec/cosmos/crypto/secp256k1/keys.d.ts +38 -0
- package/lib/codec/cosmos/crypto/secp256k1/keys.js +155 -0
- package/lib/codec/cosmos/crypto/secp256r1/keys.d.ts +38 -0
- package/lib/codec/cosmos/crypto/secp256r1/keys.js +155 -0
- package/lib/codec/cosmos/distribution/module/v1/module.d.ts +22 -0
- package/lib/codec/cosmos/distribution/module/v1/module.js +79 -0
- package/lib/codec/cosmos/distribution/v1beta1/distribution.d.ts +237 -0
- package/lib/codec/cosmos/distribution/v1beta1/distribution.js +899 -0
- package/lib/codec/cosmos/distribution/v1beta1/export.d.ts +4 -0
- package/lib/codec/cosmos/distribution/v1beta1/export.js +63 -0
- package/lib/codec/cosmos/distribution/v1beta1/genesis.d.ts +164 -0
- package/lib/codec/cosmos/distribution/v1beta1/genesis.js +761 -0
- package/lib/codec/cosmos/distribution/v1beta1/query.d.ts +409 -0
- package/lib/codec/cosmos/distribution/v1beta1/query.js +1291 -0
- package/lib/codec/cosmos/distribution/v1beta1/tx.d.ts +304 -0
- package/lib/codec/cosmos/distribution/v1beta1/tx.js +820 -0
- package/lib/codec/cosmos/evidence/module/v1/module.d.ts +19 -0
- package/lib/codec/cosmos/evidence/module/v1/module.js +51 -0
- package/lib/codec/cosmos/evidence/v1beta1/evidence.d.ts +30 -0
- package/lib/codec/cosmos/evidence/v1beta1/evidence.js +130 -0
- package/lib/codec/cosmos/evidence/v1beta1/genesis.d.ts +22 -0
- package/lib/codec/cosmos/evidence/v1beta1/genesis.js +68 -0
- package/lib/codec/cosmos/evidence/v1beta1/query.d.ts +100 -0
- package/lib/codec/cosmos/evidence/v1beta1/query.js +312 -0
- package/lib/codec/cosmos/evidence/v1beta1/tx.d.ts +59 -0
- package/lib/codec/cosmos/evidence/v1beta1/tx.js +184 -0
- package/lib/codec/cosmos/feegrant/module/v1/module.d.ts +19 -0
- package/lib/codec/cosmos/feegrant/module/v1/module.js +51 -0
- package/lib/codec/cosmos/feegrant/v1beta1/feegrant.d.ts +100 -0
- package/lib/codec/cosmos/feegrant/v1beta1/feegrant.js +373 -0
- package/lib/codec/cosmos/feegrant/v1beta1/genesis.d.ts +22 -0
- package/lib/codec/cosmos/feegrant/v1beta1/genesis.js +70 -0
- package/lib/codec/cosmos/feegrant/v1beta1/query.d.ts +131 -0
- package/lib/codec/cosmos/feegrant/v1beta1/query.js +427 -0
- package/lib/codec/cosmos/feegrant/v1beta1/tx.d.ts +131 -0
- package/lib/codec/cosmos/feegrant/v1beta1/tx.js +340 -0
- package/lib/codec/cosmos/genutil/module/v1/module.d.ts +19 -0
- package/lib/codec/cosmos/genutil/module/v1/module.js +51 -0
- package/lib/codec/cosmos/genutil/v1beta1/genesis.d.ts +21 -0
- package/lib/codec/cosmos/genutil/v1beta1/genesis.js +107 -0
- package/lib/codec/cosmos/gov/module/v1/module.d.ts +26 -0
- package/lib/codec/cosmos/gov/module/v1/module.js +81 -0
- package/lib/codec/cosmos/gov/v1/export.d.ts +3 -0
- package/lib/codec/cosmos/gov/v1/export.js +53 -0
- package/lib/codec/cosmos/gov/v1/genesis.d.ts +65 -0
- package/lib/codec/cosmos/gov/v1/genesis.js +203 -0
- package/lib/codec/cosmos/gov/v1/gov.d.ts +354 -0
- package/lib/codec/cosmos/gov/v1/gov.js +1221 -0
- package/lib/codec/cosmos/gov/v1/query.d.ts +333 -0
- package/lib/codec/cosmos/gov/v1/query.js +1169 -0
- package/lib/codec/cosmos/gov/v1/tx.d.ts +308 -0
- package/lib/codec/cosmos/gov/v1/tx.js +995 -0
- package/lib/codec/cosmos/gov/v1beta1/genesis.d.ts +34 -0
- package/lib/codec/cosmos/gov/v1beta1/genesis.js +175 -0
- package/lib/codec/cosmos/gov/v1beta1/gov.d.ts +255 -0
- package/lib/codec/cosmos/gov/v1beta1/gov.js +971 -0
- package/lib/codec/cosmos/gov/v1beta1/query.d.ts +284 -0
- package/lib/codec/cosmos/gov/v1beta1/query.js +1064 -0
- package/lib/codec/cosmos/gov/v1beta1/tx.d.ts +165 -0
- package/lib/codec/cosmos/gov/v1beta1/tx.js +533 -0
- package/lib/codec/cosmos/group/module/v1/module.d.ts +30 -0
- package/lib/codec/cosmos/group/module/v1/module.js +85 -0
- package/lib/codec/cosmos/group/v1/events.d.ts +165 -0
- package/lib/codec/cosmos/group/v1/events.js +647 -0
- package/lib/codec/cosmos/group/v1/genesis.d.ts +46 -0
- package/lib/codec/cosmos/group/v1/genesis.js +196 -0
- package/lib/codec/cosmos/group/v1/query.d.ts +484 -0
- package/lib/codec/cosmos/group/v1/query.js +1829 -0
- package/lib/codec/cosmos/group/v1/tx.d.ts +526 -0
- package/lib/codec/cosmos/group/v1/tx.js +1927 -0
- package/lib/codec/cosmos/group/v1/types.d.ts +393 -0
- package/lib/codec/cosmos/group/v1/types.js +1329 -0
- package/lib/codec/cosmos/ics23/v1/proofs.d.ts +342 -0
- package/lib/codec/cosmos/ics23/v1/proofs.js +1353 -0
- package/lib/codec/cosmos/mint/module/v1/module.d.ts +22 -0
- package/lib/codec/cosmos/mint/module/v1/module.js +79 -0
- package/lib/codec/cosmos/mint/v1beta1/export.d.ts +3 -0
- package/lib/codec/cosmos/mint/v1beta1/export.js +16 -0
- package/lib/codec/cosmos/mint/v1beta1/genesis.d.ts +24 -0
- package/lib/codec/cosmos/mint/v1beta1/genesis.js +84 -0
- package/lib/codec/cosmos/mint/v1beta1/mint.d.ts +46 -0
- package/lib/codec/cosmos/mint/v1beta1/mint.js +198 -0
- package/lib/codec/cosmos/mint/v1beta1/query.d.ts +112 -0
- package/lib/codec/cosmos/mint/v1beta1/query.js +344 -0
- package/lib/codec/cosmos/mint/v1beta1/tx.d.ts +69 -0
- package/lib/codec/cosmos/mint/v1beta1/tx.js +132 -0
- package/lib/codec/cosmos/msg/textual/v1/textual.d.ts +1 -0
- package/lib/codec/cosmos/msg/textual/v1/textual.js +5 -0
- package/lib/codec/cosmos/msg/v1/msg.d.ts +1 -0
- package/lib/codec/cosmos/msg/v1/msg.js +5 -0
- package/lib/codec/cosmos/nft/module/v1/module.d.ts +19 -0
- package/lib/codec/cosmos/nft/module/v1/module.js +51 -0
- package/lib/codec/cosmos/nft/v1beta1/event.d.ts +61 -0
- package/lib/codec/cosmos/nft/v1beta1/event.js +251 -0
- package/lib/codec/cosmos/nft/v1beta1/genesis.d.ts +39 -0
- package/lib/codec/cosmos/nft/v1beta1/genesis.js +157 -0
- package/lib/codec/cosmos/nft/v1beta1/nft.d.ts +55 -0
- package/lib/codec/cosmos/nft/v1beta1/nft.js +238 -0
- package/lib/codec/cosmos/nft/v1beta1/query.d.ts +243 -0
- package/lib/codec/cosmos/nft/v1beta1/query.js +862 -0
- package/lib/codec/cosmos/nft/v1beta1/tx.d.ts +54 -0
- package/lib/codec/cosmos/nft/v1beta1/tx.js +153 -0
- package/lib/codec/cosmos/orm/module/v1alpha1/module.d.ts +23 -0
- package/lib/codec/cosmos/orm/module/v1alpha1/module.js +51 -0
- package/lib/codec/cosmos/orm/query/v1alpha1/query.d.ts +183 -0
- package/lib/codec/cosmos/orm/query/v1alpha1/query.js +680 -0
- package/lib/codec/cosmos/orm/v1/orm.d.ts +130 -0
- package/lib/codec/cosmos/orm/v1/orm.js +283 -0
- package/lib/codec/cosmos/orm/v1alpha1/schema.d.ts +78 -0
- package/lib/codec/cosmos/orm/v1alpha1/schema.js +257 -0
- package/lib/codec/cosmos/params/module/v1/module.d.ts +19 -0
- package/lib/codec/cosmos/params/module/v1/module.js +51 -0
- package/lib/codec/cosmos/params/v1beta1/export.d.ts +2 -0
- package/lib/codec/cosmos/params/v1beta1/export.js +12 -0
- package/lib/codec/cosmos/params/v1beta1/params.d.ts +39 -0
- package/lib/codec/cosmos/params/v1beta1/params.js +170 -0
- package/lib/codec/cosmos/params/v1beta1/query.d.ts +114 -0
- package/lib/codec/cosmos/params/v1beta1/query.js +308 -0
- package/lib/codec/cosmos/query/v1/query.d.ts +1 -0
- package/lib/codec/cosmos/query/v1/query.js +5 -0
- package/lib/codec/cosmos/reflection/v1/reflection.d.ts +55 -0
- package/lib/codec/cosmos/reflection/v1/reflection.js +118 -0
- package/lib/codec/cosmos/slashing/module/v1/module.d.ts +21 -0
- package/lib/codec/cosmos/slashing/module/v1/module.js +65 -0
- package/lib/codec/cosmos/slashing/v1beta1/export.d.ts +4 -0
- package/lib/codec/cosmos/slashing/v1beta1/export.js +22 -0
- package/lib/codec/cosmos/slashing/v1beta1/genesis.d.ts +80 -0
- package/lib/codec/cosmos/slashing/v1beta1/genesis.js +307 -0
- package/lib/codec/cosmos/slashing/v1beta1/query.d.ts +119 -0
- package/lib/codec/cosmos/slashing/v1beta1/query.js +353 -0
- package/lib/codec/cosmos/slashing/v1beta1/slashing.d.ts +61 -0
- package/lib/codec/cosmos/slashing/v1beta1/slashing.js +329 -0
- package/lib/codec/cosmos/slashing/v1beta1/tx.d.ts +99 -0
- package/lib/codec/cosmos/slashing/v1beta1/tx.js +223 -0
- package/lib/codec/cosmos/staking/module/v1/module.d.ts +31 -0
- package/lib/codec/cosmos/staking/module/v1/module.js +108 -0
- package/lib/codec/cosmos/staking/v1beta1/authz.d.ts +70 -0
- package/lib/codec/cosmos/staking/v1beta1/authz.js +227 -0
- package/lib/codec/cosmos/staking/v1beta1/export.d.ts +5 -0
- package/lib/codec/cosmos/staking/v1beta1/export.js +84 -0
- package/lib/codec/cosmos/staking/v1beta1/genesis.d.ts +57 -0
- package/lib/codec/cosmos/staking/v1beta1/genesis.js +297 -0
- package/lib/codec/cosmos/staking/v1beta1/query.d.ts +556 -0
- package/lib/codec/cosmos/staking/v1beta1/query.js +1804 -0
- package/lib/codec/cosmos/staking/v1beta1/staking.d.ts +448 -0
- package/lib/codec/cosmos/staking/v1beta1/staking.js +1924 -0
- package/lib/codec/cosmos/staking/v1beta1/tx.d.ts +299 -0
- package/lib/codec/cosmos/staking/v1beta1/tx.js +1012 -0
- package/lib/codec/cosmos/store/internal/kv/v1beta1/kv.d.ts +33 -0
- package/lib/codec/cosmos/store/internal/kv/v1beta1/kv.js +174 -0
- package/lib/codec/cosmos/store/snapshots/v1/snapshot.d.ts +126 -0
- package/lib/codec/cosmos/store/snapshots/v1/snapshot.js +563 -0
- package/lib/codec/cosmos/store/streaming/abci/grpc.d.ts +79 -0
- package/lib/codec/cosmos/store/streaming/abci/grpc.js +261 -0
- package/lib/codec/cosmos/store/v1beta1/commit_info.d.ts +57 -0
- package/lib/codec/cosmos/store/v1beta1/commit_info.js +292 -0
- package/lib/codec/cosmos/store/v1beta1/listening.d.ts +50 -0
- package/lib/codec/cosmos/store/v1beta1/listening.js +236 -0
- package/lib/codec/cosmos/tx/config/v1/config.d.ts +29 -0
- package/lib/codec/cosmos/tx/config/v1/config.js +79 -0
- package/lib/codec/cosmos/tx/signing/v1beta1/signing.d.ts +152 -0
- package/lib/codec/cosmos/tx/signing/v1beta1/signing.js +504 -0
- package/lib/codec/cosmos/tx/v1beta1/export.d.ts +2 -0
- package/lib/codec/cosmos/tx/v1beta1/export.js +43 -0
- package/lib/codec/cosmos/tx/v1beta1/service.d.ts +481 -0
- package/lib/codec/cosmos/tx/v1beta1/service.js +1357 -0
- package/lib/codec/cosmos/tx/v1beta1/tx.d.ts +390 -0
- package/lib/codec/cosmos/tx/v1beta1/tx.js +1149 -0
- package/lib/codec/cosmos/upgrade/module/v1/module.d.ts +21 -0
- package/lib/codec/cosmos/upgrade/module/v1/module.js +65 -0
- package/lib/codec/cosmos/upgrade/v1beta1/query.d.ts +226 -0
- package/lib/codec/cosmos/upgrade/v1beta1/query.js +571 -0
- package/lib/codec/cosmos/upgrade/v1beta1/tx.d.ts +104 -0
- package/lib/codec/cosmos/upgrade/v1beta1/tx.js +221 -0
- package/lib/codec/cosmos/upgrade/v1beta1/upgrade.d.ts +118 -0
- package/lib/codec/cosmos/upgrade/v1beta1/upgrade.js +346 -0
- package/lib/codec/cosmos/vesting/module/v1/module.d.ts +19 -0
- package/lib/codec/cosmos/vesting/module/v1/module.js +51 -0
- package/lib/codec/cosmos/vesting/v1beta1/export.d.ts +2 -0
- package/lib/codec/cosmos/vesting/v1beta1/export.js +17 -0
- package/lib/codec/cosmos/vesting/v1beta1/tx.d.ts +147 -0
- package/lib/codec/cosmos/vesting/v1beta1/tx.js +434 -0
- package/lib/codec/cosmos/vesting/v1beta1/vesting.d.ts +112 -0
- package/lib/codec/cosmos/vesting/v1beta1/vesting.js +481 -0
- package/lib/codec/cosmos-models.d.ts +10 -0
- package/lib/codec/cosmos-models.js +46 -0
- package/lib/codec/ethermint/crypto/v1/ethsecp256k1/export.d.ts +1 -0
- package/lib/codec/ethermint/crypto/v1/ethsecp256k1/export.js +6 -0
- package/lib/codec/ethermint/crypto/v1/ethsecp256k1/keys.d.ts +41 -0
- package/lib/codec/ethermint/crypto/v1/ethsecp256k1/keys.js +155 -0
- package/lib/codec/ethermint/evm/v1/events.d.ts +76 -0
- package/lib/codec/ethermint/evm/v1/events.js +314 -0
- package/lib/codec/ethermint/evm/v1/evm.d.ts +247 -0
- package/lib/codec/ethermint/evm/v1/evm.js +1146 -0
- package/lib/codec/ethermint/evm/v1/export.d.ts +5 -0
- package/lib/codec/ethermint/evm/v1/export.js +53 -0
- package/lib/codec/ethermint/evm/v1/genesis.d.ts +45 -0
- package/lib/codec/ethermint/evm/v1/genesis.js +166 -0
- package/lib/codec/ethermint/evm/v1/query.d.ts +451 -0
- package/lib/codec/ethermint/evm/v1/query.js +1687 -0
- package/lib/codec/ethermint/evm/v1/tx.d.ts +230 -0
- package/lib/codec/ethermint/evm/v1/tx.js +954 -0
- package/lib/codec/ethermint/feemarket/v1/events.d.ts +36 -0
- package/lib/codec/ethermint/feemarket/v1/events.js +127 -0
- package/lib/codec/ethermint/feemarket/v1/export.d.ts +4 -0
- package/lib/codec/ethermint/feemarket/v1/export.js +18 -0
- package/lib/codec/ethermint/feemarket/v1/feemarket.d.ts +52 -0
- package/lib/codec/ethermint/feemarket/v1/feemarket.js +176 -0
- package/lib/codec/ethermint/feemarket/v1/genesis.d.ts +27 -0
- package/lib/codec/ethermint/feemarket/v1/genesis.js +84 -0
- package/lib/codec/ethermint/feemarket/v1/query.d.ts +109 -0
- package/lib/codec/ethermint/feemarket/v1/query.js +300 -0
- package/lib/codec/ethermint/feemarket/v1/tx.d.ts +60 -0
- package/lib/codec/ethermint/feemarket/v1/tx.js +132 -0
- package/lib/codec/ethermint/types/v1/account.d.ts +27 -0
- package/lib/codec/ethermint/types/v1/account.js +83 -0
- package/lib/codec/ethermint/types/v1/dynamic_fee.d.ts +21 -0
- package/lib/codec/ethermint/types/v1/dynamic_fee.js +65 -0
- package/lib/codec/ethermint/types/v1/export.d.ts +4 -0
- package/lib/codec/ethermint/types/v1/export.js +11 -0
- package/lib/codec/ethermint/types/v1/indexer.d.ts +42 -0
- package/lib/codec/ethermint/types/v1/indexer.js +154 -0
- package/lib/codec/ethermint/types/v1/web3.d.ts +37 -0
- package/lib/codec/ethermint/types/v1/web3.js +135 -0
- package/lib/codec/ethermint-models.d.ts +4 -0
- package/lib/codec/ethermint-models.js +40 -0
- package/lib/codec/google/protobuf/any.d.ts +138 -0
- package/lib/codec/google/protobuf/any.js +120 -0
- package/lib/codec/google/protobuf/descriptor.d.ts +1446 -0
- package/lib/codec/google/protobuf/descriptor.js +4811 -0
- package/lib/codec/google/protobuf/duration.d.ts +93 -0
- package/lib/codec/google/protobuf/duration.js +81 -0
- package/lib/codec/google/protobuf/empty.d.ts +27 -0
- package/lib/codec/google/protobuf/empty.js +51 -0
- package/lib/codec/google/protobuf/timestamp.d.ts +122 -0
- package/lib/codec/google/protobuf/timestamp.js +81 -0
- package/lib/codec/google/protobuf/wrappers.d.ts +161 -0
- package/lib/codec/google/protobuf/wrappers.js +490 -0
- package/lib/codec/ibc/applications/fee/v1/ack.d.ts +25 -0
- package/lib/codec/ibc/applications/fee/v1/ack.js +134 -0
- package/lib/codec/ibc/applications/fee/v1/fee.d.ts +72 -0
- package/lib/codec/ibc/applications/fee/v1/fee.js +311 -0
- package/lib/codec/ibc/applications/fee/v1/genesis.d.ts +98 -0
- package/lib/codec/ibc/applications/fee/v1/genesis.js +433 -0
- package/lib/codec/ibc/applications/fee/v1/metadata.d.ts +26 -0
- package/lib/codec/ibc/applications/fee/v1/metadata.js +79 -0
- package/lib/codec/ibc/applications/fee/v1/query.d.ts +341 -0
- package/lib/codec/ibc/applications/fee/v1/query.js +1293 -0
- package/lib/codec/ibc/applications/fee/v1/tx.d.ts +182 -0
- package/lib/codec/ibc/applications/fee/v1/tx.js +540 -0
- package/lib/codec/ibc/applications/interchain_accounts/controller/export.d.ts +3 -0
- package/lib/codec/ibc/applications/interchain_accounts/controller/export.js +17 -0
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/controller.d.ts +24 -0
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/controller.js +65 -0
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/query.d.ts +77 -0
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/query.js +234 -0
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/tx.d.ts +122 -0
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/tx.js +435 -0
- package/lib/codec/ibc/applications/interchain_accounts/genesis/v1/genesis.d.ts +85 -0
- package/lib/codec/ibc/applications/interchain_accounts/genesis/v1/genesis.js +462 -0
- package/lib/codec/ibc/applications/interchain_accounts/host/export.d.ts +3 -0
- package/lib/codec/ibc/applications/interchain_accounts/host/export.js +11 -0
- package/lib/codec/ibc/applications/interchain_accounts/host/v1/host.d.ts +26 -0
- package/lib/codec/ibc/applications/interchain_accounts/host/v1/host.js +84 -0
- package/lib/codec/ibc/applications/interchain_accounts/host/v1/query.d.ts +49 -0
- package/lib/codec/ibc/applications/interchain_accounts/host/v1/query.js +118 -0
- package/lib/codec/ibc/applications/interchain_accounts/host/v1/tx.d.ts +55 -0
- package/lib/codec/ibc/applications/interchain_accounts/host/v1/tx.js +132 -0
- package/lib/codec/ibc/applications/interchain_accounts/v1/account.d.ts +22 -0
- package/lib/codec/ibc/applications/interchain_accounts/v1/account.js +83 -0
- package/lib/codec/ibc/applications/interchain_accounts/v1/export.d.ts +3 -0
- package/lib/codec/ibc/applications/interchain_accounts/v1/export.js +13 -0
- package/lib/codec/ibc/applications/interchain_accounts/v1/metadata.d.ts +37 -0
- package/lib/codec/ibc/applications/interchain_accounts/v1/metadata.js +127 -0
- package/lib/codec/ibc/applications/interchain_accounts/v1/packet.d.ts +48 -0
- package/lib/codec/ibc/applications/interchain_accounts/v1/packet.js +225 -0
- package/lib/codec/ibc/applications/transfer/v1/authz.d.ts +49 -0
- package/lib/codec/ibc/applications/transfer/v1/authz.js +188 -0
- package/lib/codec/ibc/applications/transfer/v1/export.d.ts +4 -0
- package/lib/codec/ibc/applications/transfer/v1/export.js +27 -0
- package/lib/codec/ibc/applications/transfer/v1/genesis.d.ts +29 -0
- package/lib/codec/ibc/applications/transfer/v1/genesis.js +117 -0
- package/lib/codec/ibc/applications/transfer/v1/query.d.ts +216 -0
- package/lib/codec/ibc/applications/transfer/v1/query.js +674 -0
- package/lib/codec/ibc/applications/transfer/v1/transfer.d.ts +55 -0
- package/lib/codec/ibc/applications/transfer/v1/transfer.js +141 -0
- package/lib/codec/ibc/applications/transfer/v1/tx.d.ts +113 -0
- package/lib/codec/ibc/applications/transfer/v1/tx.js +339 -0
- package/lib/codec/ibc/applications/transfer/v2/export.d.ts +1 -0
- package/lib/codec/ibc/applications/transfer/v2/export.js +5 -0
- package/lib/codec/ibc/applications/transfer/v2/packet.d.ts +33 -0
- package/lib/codec/ibc/applications/transfer/v2/packet.js +115 -0
- package/lib/codec/ibc/core/channel/v1/channel.d.ts +266 -0
- package/lib/codec/ibc/core/channel/v1/channel.js +1023 -0
- package/lib/codec/ibc/core/channel/v1/export.d.ts +5 -0
- package/lib/codec/ibc/core/channel/v1/export.js +103 -0
- package/lib/codec/ibc/core/channel/v1/genesis.d.ts +47 -0
- package/lib/codec/ibc/core/channel/v1/genesis.js +300 -0
- package/lib/codec/ibc/core/channel/v1/query.d.ts +724 -0
- package/lib/codec/ibc/core/channel/v1/query.js +2739 -0
- package/lib/codec/ibc/core/channel/v1/tx.d.ts +684 -0
- package/lib/codec/ibc/core/channel/v1/tx.js +3370 -0
- package/lib/codec/ibc/core/channel/v1/upgrade.d.ts +65 -0
- package/lib/codec/ibc/core/channel/v1/upgrade.js +242 -0
- package/lib/codec/ibc/core/client/v1/client.d.ts +168 -0
- package/lib/codec/ibc/core/client/v1/client.js +516 -0
- package/lib/codec/ibc/core/client/v1/export.d.ts +4 -0
- package/lib/codec/ibc/core/client/v1/export.js +48 -0
- package/lib/codec/ibc/core/client/v1/genesis.d.ts +70 -0
- package/lib/codec/ibc/core/client/v1/genesis.js +332 -0
- package/lib/codec/ibc/core/client/v1/query.d.ts +367 -0
- package/lib/codec/ibc/core/client/v1/query.js +1185 -0
- package/lib/codec/ibc/core/client/v1/tx.d.ts +281 -0
- package/lib/codec/ibc/core/client/v1/tx.js +946 -0
- package/lib/codec/ibc/core/commitment/v1/commitment.d.ts +74 -0
- package/lib/codec/ibc/core/commitment/v1/commitment.js +262 -0
- package/lib/codec/ibc/core/commitment/v1/export.d.ts +1 -0
- package/lib/codec/ibc/core/commitment/v1/export.js +8 -0
- package/lib/codec/ibc/core/connection/v1/connection.d.ts +177 -0
- package/lib/codec/ibc/core/connection/v1/connection.js +621 -0
- package/lib/codec/ibc/core/connection/v1/export.d.ts +3 -0
- package/lib/codec/ibc/core/connection/v1/export.js +38 -0
- package/lib/codec/ibc/core/connection/v1/genesis.d.ts +25 -0
- package/lib/codec/ibc/core/connection/v1/genesis.js +126 -0
- package/lib/codec/ibc/core/connection/v1/query.d.ts +260 -0
- package/lib/codec/ibc/core/connection/v1/query.js +892 -0
- package/lib/codec/ibc/core/connection/v1/tx.d.ts +234 -0
- package/lib/codec/ibc/core/connection/v1/tx.js +975 -0
- package/lib/codec/ibc/core/types/v1/genesis.d.ts +28 -0
- package/lib/codec/ibc/core/types/v1/genesis.js +103 -0
- package/lib/codec/ibc/lightclients/localhost/v2/export.d.ts +1 -0
- package/lib/codec/ibc/lightclients/localhost/v2/export.js +5 -0
- package/lib/codec/ibc/lightclients/localhost/v2/localhost.d.ts +22 -0
- package/lib/codec/ibc/lightclients/localhost/v2/localhost.js +69 -0
- package/lib/codec/ibc/lightclients/solomachine/v2/export.d.ts +1 -0
- package/lib/codec/ibc/lightclients/solomachine/v2/export.js +23 -0
- package/lib/codec/ibc/lightclients/solomachine/v2/solomachine.d.ts +314 -0
- package/lib/codec/ibc/lightclients/solomachine/v2/solomachine.js +1359 -0
- package/lib/codec/ibc/lightclients/solomachine/v3/export.d.ts +1 -0
- package/lib/codec/ibc/lightclients/solomachine/v3/export.js +12 -0
- package/lib/codec/ibc/lightclients/solomachine/v3/solomachine.d.ts +154 -0
- package/lib/codec/ibc/lightclients/solomachine/v3/solomachine.js +719 -0
- package/lib/codec/ibc/lightclients/tendermint/v1/export.d.ts +1 -0
- package/lib/codec/ibc/lightclients/tendermint/v1/export.js +9 -0
- package/lib/codec/ibc/lightclients/tendermint/v1/tendermint.d.ts +152 -0
- package/lib/codec/ibc/lightclients/tendermint/v1/tendermint.js +622 -0
- package/lib/codec/ibc/lightclients/wasm/v1/genesis.d.ts +34 -0
- package/lib/codec/ibc/lightclients/wasm/v1/genesis.js +161 -0
- package/lib/codec/ibc/lightclients/wasm/v1/query.d.ts +81 -0
- package/lib/codec/ibc/lightclients/wasm/v1/query.js +295 -0
- package/lib/codec/ibc/lightclients/wasm/v1/tx.d.ts +114 -0
- package/lib/codec/ibc/lightclients/wasm/v1/tx.js +419 -0
- package/lib/codec/ibc/lightclients/wasm/v1/wasm.d.ts +74 -0
- package/lib/codec/ibc/lightclients/wasm/v1/wasm.js +288 -0
- package/lib/codec/ibc-models.d.ts +13 -0
- package/lib/codec/ibc-models.js +49 -0
- package/lib/codec/index.d.ts +512 -0
- package/lib/codec/index.js +26760 -0
- package/lib/codec/mememax/orbix/adl/genesis.d.ts +19 -0
- package/lib/codec/mememax/orbix/adl/genesis.js +51 -0
- package/lib/codec/mememax/orbix/adl/query.d.ts +15 -0
- package/lib/codec/mememax/orbix/adl/query.js +12 -0
- package/lib/codec/mememax/orbix/adl/tx.d.ts +15 -0
- package/lib/codec/mememax/orbix/adl/tx.js +12 -0
- package/lib/codec/mememax/orbix/admin/export.d.ts +3 -0
- package/lib/codec/mememax/orbix/admin/export.js +22 -0
- package/lib/codec/mememax/orbix/admin/genesis.d.ts +24 -0
- package/lib/codec/mememax/orbix/admin/genesis.js +94 -0
- package/lib/codec/mememax/orbix/admin/params.d.ts +32 -0
- package/lib/codec/mememax/orbix/admin/params.js +114 -0
- package/lib/codec/mememax/orbix/admin/query.d.ts +97 -0
- package/lib/codec/mememax/orbix/admin/query.js +300 -0
- package/lib/codec/mememax/orbix/admin/tx.d.ts +134 -0
- package/lib/codec/mememax/orbix/admin/tx.js +419 -0
- package/lib/codec/mememax/orbix/bank/event.d.ts +70 -0
- package/lib/codec/mememax/orbix/bank/event.js +365 -0
- package/lib/codec/mememax/orbix/bank/export.d.ts +3 -0
- package/lib/codec/mememax/orbix/bank/export.js +21 -0
- package/lib/codec/mememax/orbix/bank/genesis.d.ts +20 -0
- package/lib/codec/mememax/orbix/bank/genesis.js +71 -0
- package/lib/codec/mememax/orbix/bank/query.d.ts +102 -0
- package/lib/codec/mememax/orbix/bank/query.js +492 -0
- package/lib/codec/mememax/orbix/bank/tx.d.ts +70 -0
- package/lib/codec/mememax/orbix/bank/tx.js +234 -0
- package/lib/codec/mememax/orbix/book/book.d.ts +61 -0
- package/lib/codec/mememax/orbix/book/book.js +350 -0
- package/lib/codec/mememax/orbix/book/event.d.ts +67 -0
- package/lib/codec/mememax/orbix/book/event.js +294 -0
- package/lib/codec/mememax/orbix/book/export.d.ts +4 -0
- package/lib/codec/mememax/orbix/book/export.js +26 -0
- package/lib/codec/mememax/orbix/book/genesis.d.ts +26 -0
- package/lib/codec/mememax/orbix/book/genesis.js +87 -0
- package/lib/codec/mememax/orbix/book/legacy.d.ts +23 -0
- package/lib/codec/mememax/orbix/book/legacy.js +125 -0
- package/lib/codec/mememax/orbix/book/query.d.ts +160 -0
- package/lib/codec/mememax/orbix/book/query.js +643 -0
- package/lib/codec/mememax/orbix/book/tx.d.ts +15 -0
- package/lib/codec/mememax/orbix/book/tx.js +12 -0
- package/lib/codec/mememax/orbix/bridge/bridge.d.ts +132 -0
- package/lib/codec/mememax/orbix/bridge/bridge.js +801 -0
- package/lib/codec/mememax/orbix/bridge/event.d.ts +316 -0
- package/lib/codec/mememax/orbix/bridge/event.js +1806 -0
- package/lib/codec/mememax/orbix/bridge/export.d.ts +6 -0
- package/lib/codec/mememax/orbix/bridge/export.js +122 -0
- package/lib/codec/mememax/orbix/bridge/genesis.d.ts +29 -0
- package/lib/codec/mememax/orbix/bridge/genesis.js +249 -0
- package/lib/codec/mememax/orbix/bridge/params.d.ts +71 -0
- package/lib/codec/mememax/orbix/bridge/params.js +376 -0
- package/lib/codec/mememax/orbix/bridge/pending_action.d.ts +102 -0
- package/lib/codec/mememax/orbix/bridge/pending_action.js +718 -0
- package/lib/codec/mememax/orbix/bridge/query.d.ts +365 -0
- package/lib/codec/mememax/orbix/bridge/query.js +1589 -0
- package/lib/codec/mememax/orbix/bridge/tx.d.ts +636 -0
- package/lib/codec/mememax/orbix/bridge/tx.js +3199 -0
- package/lib/codec/mememax/orbix/broker/amm.d.ts +49 -0
- package/lib/codec/mememax/orbix/broker/amm.js +278 -0
- package/lib/codec/mememax/orbix/broker/candlestick.d.ts +28 -0
- package/lib/codec/mememax/orbix/broker/candlestick.js +219 -0
- package/lib/codec/mememax/orbix/broker/event.d.ts +55 -0
- package/lib/codec/mememax/orbix/broker/event.js +474 -0
- package/lib/codec/mememax/orbix/broker/export.d.ts +7 -0
- package/lib/codec/mememax/orbix/broker/export.js +27 -0
- package/lib/codec/mememax/orbix/broker/genesis.d.ts +21 -0
- package/lib/codec/mememax/orbix/broker/genesis.js +70 -0
- package/lib/codec/mememax/orbix/broker/incoming_liquidations.d.ts +19 -0
- package/lib/codec/mememax/orbix/broker/incoming_liquidations.js +107 -0
- package/lib/codec/mememax/orbix/broker/pagination.d.ts +20 -0
- package/lib/codec/mememax/orbix/broker/pagination.js +79 -0
- package/lib/codec/mememax/orbix/broker/query.d.ts +116 -0
- package/lib/codec/mememax/orbix/broker/query.js +592 -0
- package/lib/codec/mememax/orbix/broker/tx.d.ts +59 -0
- package/lib/codec/mememax/orbix/broker/tx.js +198 -0
- package/lib/codec/mememax/orbix/coin/bridge.d.ts +25 -0
- package/lib/codec/mememax/orbix/coin/bridge.js +156 -0
- package/lib/codec/mememax/orbix/coin/event.d.ts +155 -0
- package/lib/codec/mememax/orbix/coin/event.js +787 -0
- package/lib/codec/mememax/orbix/coin/export.d.ts +9 -0
- package/lib/codec/mememax/orbix/coin/export.js +109 -0
- package/lib/codec/mememax/orbix/coin/genesis.d.ts +44 -0
- package/lib/codec/mememax/orbix/coin/genesis.js +239 -0
- package/lib/codec/mememax/orbix/coin/group.d.ts +56 -0
- package/lib/codec/mememax/orbix/coin/group.js +237 -0
- package/lib/codec/mememax/orbix/coin/params.d.ts +35 -0
- package/lib/codec/mememax/orbix/coin/params.js +148 -0
- package/lib/codec/mememax/orbix/coin/proposal.d.ts +22 -0
- package/lib/codec/mememax/orbix/coin/proposal.js +94 -0
- package/lib/codec/mememax/orbix/coin/query.d.ts +313 -0
- package/lib/codec/mememax/orbix/coin/query.js +1414 -0
- package/lib/codec/mememax/orbix/coin/token.d.ts +112 -0
- package/lib/codec/mememax/orbix/coin/token.js +714 -0
- package/lib/codec/mememax/orbix/coin/tx.d.ts +650 -0
- package/lib/codec/mememax/orbix/coin/tx.js +3318 -0
- package/lib/codec/mememax/orbix/evmbank/export.d.ts +2 -0
- package/lib/codec/mememax/orbix/evmbank/export.js +8 -0
- package/lib/codec/mememax/orbix/evmbank/genesis.d.ts +34 -0
- package/lib/codec/mememax/orbix/evmbank/genesis.js +173 -0
- package/lib/codec/mememax/orbix/evmbank/query.d.ts +45 -0
- package/lib/codec/mememax/orbix/evmbank/query.js +126 -0
- package/lib/codec/mememax/orbix/evmmerge/address.d.ts +20 -0
- package/lib/codec/mememax/orbix/evmmerge/address.js +79 -0
- package/lib/codec/mememax/orbix/evmmerge/event.d.ts +21 -0
- package/lib/codec/mememax/orbix/evmmerge/event.js +91 -0
- package/lib/codec/mememax/orbix/evmmerge/export.d.ts +6 -0
- package/lib/codec/mememax/orbix/evmmerge/export.js +20 -0
- package/lib/codec/mememax/orbix/evmmerge/genesis.d.ts +51 -0
- package/lib/codec/mememax/orbix/evmmerge/genesis.js +236 -0
- package/lib/codec/mememax/orbix/evmmerge/offchain.d.ts +26 -0
- package/lib/codec/mememax/orbix/evmmerge/offchain.js +121 -0
- package/lib/codec/mememax/orbix/evmmerge/query.d.ts +94 -0
- package/lib/codec/mememax/orbix/evmmerge/query.js +270 -0
- package/lib/codec/mememax/orbix/evmmerge/tx.d.ts +56 -0
- package/lib/codec/mememax/orbix/evmmerge/tx.js +142 -0
- package/lib/codec/mememax/orbix/fee/event.d.ts +21 -0
- package/lib/codec/mememax/orbix/fee/event.js +91 -0
- package/lib/codec/mememax/orbix/fee/export.d.ts +4 -0
- package/lib/codec/mememax/orbix/fee/export.js +27 -0
- package/lib/codec/mememax/orbix/fee/fee.d.ts +45 -0
- package/lib/codec/mememax/orbix/fee/fee.js +203 -0
- package/lib/codec/mememax/orbix/fee/genesis.d.ts +24 -0
- package/lib/codec/mememax/orbix/fee/genesis.js +89 -0
- package/lib/codec/mememax/orbix/fee/query.d.ts +125 -0
- package/lib/codec/mememax/orbix/fee/query.js +492 -0
- package/lib/codec/mememax/orbix/fee/tx.d.ts +119 -0
- package/lib/codec/mememax/orbix/fee/tx.js +454 -0
- package/lib/codec/mememax/orbix/insurance/event.d.ts +25 -0
- package/lib/codec/mememax/orbix/insurance/event.js +51 -0
- package/lib/codec/mememax/orbix/insurance/export.d.ts +5 -0
- package/lib/codec/mememax/orbix/insurance/export.js +26 -0
- package/lib/codec/mememax/orbix/insurance/fund.d.ts +51 -0
- package/lib/codec/mememax/orbix/insurance/fund.js +271 -0
- package/lib/codec/mememax/orbix/insurance/genesis.d.ts +27 -0
- package/lib/codec/mememax/orbix/insurance/genesis.js +90 -0
- package/lib/codec/mememax/orbix/insurance/params.d.ts +41 -0
- package/lib/codec/mememax/orbix/insurance/params.js +195 -0
- package/lib/codec/mememax/orbix/insurance/query.d.ts +121 -0
- package/lib/codec/mememax/orbix/insurance/query.js +453 -0
- package/lib/codec/mememax/orbix/insurance/tx.d.ts +76 -0
- package/lib/codec/mememax/orbix/insurance/tx.js +261 -0
- package/lib/codec/mememax/orbix/leverage/event.d.ts +22 -0
- package/lib/codec/mememax/orbix/leverage/event.js +103 -0
- package/lib/codec/mememax/orbix/leverage/export.d.ts +4 -0
- package/lib/codec/mememax/orbix/leverage/export.js +16 -0
- package/lib/codec/mememax/orbix/leverage/genesis.d.ts +25 -0
- package/lib/codec/mememax/orbix/leverage/genesis.js +72 -0
- package/lib/codec/mememax/orbix/leverage/leverage.d.ts +32 -0
- package/lib/codec/mememax/orbix/leverage/leverage.js +144 -0
- package/lib/codec/mememax/orbix/leverage/query.d.ts +77 -0
- package/lib/codec/mememax/orbix/leverage/query.js +257 -0
- package/lib/codec/mememax/orbix/leverage/tx.d.ts +48 -0
- package/lib/codec/mememax/orbix/leverage/tx.js +141 -0
- package/lib/codec/mememax/orbix/liquidation/event.d.ts +24 -0
- package/lib/codec/mememax/orbix/liquidation/event.js +159 -0
- package/lib/codec/mememax/orbix/liquidation/export.d.ts +5 -0
- package/lib/codec/mememax/orbix/liquidation/export.js +15 -0
- package/lib/codec/mememax/orbix/liquidation/genesis.d.ts +39 -0
- package/lib/codec/mememax/orbix/liquidation/genesis.js +153 -0
- package/lib/codec/mememax/orbix/liquidation/outstanding_position.d.ts +35 -0
- package/lib/codec/mememax/orbix/liquidation/outstanding_position.js +216 -0
- package/lib/codec/mememax/orbix/liquidation/query.d.ts +57 -0
- package/lib/codec/mememax/orbix/liquidation/query.js +256 -0
- package/lib/codec/mememax/orbix/liquidation/quote_changes.d.ts +23 -0
- package/lib/codec/mememax/orbix/liquidation/quote_changes.js +105 -0
- package/lib/codec/mememax/orbix/liquidation/tx.d.ts +15 -0
- package/lib/codec/mememax/orbix/liquidation/tx.js +12 -0
- package/lib/codec/mememax/orbix/market/event.d.ts +21 -0
- package/lib/codec/mememax/orbix/market/event.js +82 -0
- package/lib/codec/mememax/orbix/market/export.d.ts +7 -0
- package/lib/codec/mememax/orbix/market/export.js +71 -0
- package/lib/codec/mememax/orbix/market/fee.d.ts +134 -0
- package/lib/codec/mememax/orbix/market/fee.js +350 -0
- package/lib/codec/mememax/orbix/market/genesis.d.ts +33 -0
- package/lib/codec/mememax/orbix/market/genesis.js +164 -0
- package/lib/codec/mememax/orbix/market/market.d.ts +116 -0
- package/lib/codec/mememax/orbix/market/market.js +930 -0
- package/lib/codec/mememax/orbix/market/params.d.ts +81 -0
- package/lib/codec/mememax/orbix/market/params.js +754 -0
- package/lib/codec/mememax/orbix/market/proposal.d.ts +49 -0
- package/lib/codec/mememax/orbix/market/proposal.js +249 -0
- package/lib/codec/mememax/orbix/market/query.d.ts +267 -0
- package/lib/codec/mememax/orbix/market/query.js +1095 -0
- package/lib/codec/mememax/orbix/market/tx.d.ts +394 -0
- package/lib/codec/mememax/orbix/market/tx.js +1823 -0
- package/lib/codec/mememax/orbix/marketstats/export.d.ts +2 -0
- package/lib/codec/mememax/orbix/marketstats/export.js +8 -0
- package/lib/codec/mememax/orbix/marketstats/genesis.d.ts +19 -0
- package/lib/codec/mememax/orbix/marketstats/genesis.js +51 -0
- package/lib/codec/mememax/orbix/marketstats/marketstats.d.ts +32 -0
- package/lib/codec/mememax/orbix/marketstats/marketstats.js +263 -0
- package/lib/codec/mememax/orbix/marketstats/query.d.ts +45 -0
- package/lib/codec/mememax/orbix/marketstats/query.js +122 -0
- package/lib/codec/mememax/orbix/marketstats/tx.d.ts +15 -0
- package/lib/codec/mememax/orbix/marketstats/tx.js +12 -0
- package/lib/codec/mememax/orbix/misc/block.d.ts +22 -0
- package/lib/codec/mememax/orbix/misc/block.js +105 -0
- package/lib/codec/mememax/orbix/misc/export.d.ts +6 -0
- package/lib/codec/mememax/orbix/misc/export.js +29 -0
- package/lib/codec/mememax/orbix/misc/message.d.ts +25 -0
- package/lib/codec/mememax/orbix/misc/message.js +166 -0
- package/lib/codec/mememax/orbix/misc/message_type.d.ts +19 -0
- package/lib/codec/mememax/orbix/misc/message_type.js +65 -0
- package/lib/codec/mememax/orbix/misc/query.d.ts +209 -0
- package/lib/codec/mememax/orbix/misc/query.js +957 -0
- package/lib/codec/mememax/orbix/misc/trade.d.ts +29 -0
- package/lib/codec/mememax/orbix/misc/trade.js +228 -0
- package/lib/codec/mememax/orbix/misc/transaction.d.ts +47 -0
- package/lib/codec/mememax/orbix/misc/transaction.js +372 -0
- package/lib/codec/mememax/orbix/oracle/event.d.ts +39 -0
- package/lib/codec/mememax/orbix/oracle/event.js +229 -0
- package/lib/codec/mememax/orbix/oracle/export.d.ts +7 -0
- package/lib/codec/mememax/orbix/oracle/export.js +70 -0
- package/lib/codec/mememax/orbix/oracle/genesis.d.ts +31 -0
- package/lib/codec/mememax/orbix/oracle/genesis.js +172 -0
- package/lib/codec/mememax/orbix/oracle/historical.d.ts +47 -0
- package/lib/codec/mememax/orbix/oracle/historical.js +227 -0
- package/lib/codec/mememax/orbix/oracle/oracle.d.ts +42 -0
- package/lib/codec/mememax/orbix/oracle/oracle.js +284 -0
- package/lib/codec/mememax/orbix/oracle/params.d.ts +49 -0
- package/lib/codec/mememax/orbix/oracle/params.js +395 -0
- package/lib/codec/mememax/orbix/oracle/query.d.ts +363 -0
- package/lib/codec/mememax/orbix/oracle/query.js +1623 -0
- package/lib/codec/mememax/orbix/oracle/slashing.d.ts +35 -0
- package/lib/codec/mememax/orbix/oracle/slashing.js +189 -0
- package/lib/codec/mememax/orbix/oracle/tx.d.ts +333 -0
- package/lib/codec/mememax/orbix/oracle/tx.js +1627 -0
- package/lib/codec/mememax/orbix/order/event.d.ts +24 -0
- package/lib/codec/mememax/orbix/order/event.js +141 -0
- package/lib/codec/mememax/orbix/order/export.d.ts +6 -0
- package/lib/codec/mememax/orbix/order/export.js +46 -0
- package/lib/codec/mememax/orbix/order/genesis.d.ts +67 -0
- package/lib/codec/mememax/orbix/order/genesis.js +346 -0
- package/lib/codec/mememax/orbix/order/order.d.ts +98 -0
- package/lib/codec/mememax/orbix/order/order.js +812 -0
- package/lib/codec/mememax/orbix/order/params.d.ts +32 -0
- package/lib/codec/mememax/orbix/order/params.js +154 -0
- package/lib/codec/mememax/orbix/order/query.d.ts +188 -0
- package/lib/codec/mememax/orbix/order/query.js +748 -0
- package/lib/codec/mememax/orbix/order/tx.d.ts +228 -0
- package/lib/codec/mememax/orbix/order/tx.js +1010 -0
- package/lib/codec/mememax/orbix/perpspool/event.d.ts +182 -0
- package/lib/codec/mememax/orbix/perpspool/event.js +1158 -0
- package/lib/codec/mememax/orbix/perpspool/export.d.ts +9 -0
- package/lib/codec/mememax/orbix/perpspool/export.js +116 -0
- package/lib/codec/mememax/orbix/perpspool/genesis.d.ts +83 -0
- package/lib/codec/mememax/orbix/perpspool/genesis.js +506 -0
- package/lib/codec/mememax/orbix/perpspool/market.d.ts +139 -0
- package/lib/codec/mememax/orbix/perpspool/market.js +582 -0
- package/lib/codec/mememax/orbix/perpspool/params.d.ts +86 -0
- package/lib/codec/mememax/orbix/perpspool/params.js +765 -0
- package/lib/codec/mememax/orbix/perpspool/pool.d.ts +132 -0
- package/lib/codec/mememax/orbix/perpspool/pool.js +694 -0
- package/lib/codec/mememax/orbix/perpspool/query.d.ts +465 -0
- package/lib/codec/mememax/orbix/perpspool/query.js +2106 -0
- package/lib/codec/mememax/orbix/perpspool/quote.d.ts +52 -0
- package/lib/codec/mememax/orbix/perpspool/quote.js +238 -0
- package/lib/codec/mememax/orbix/perpspool/tx.d.ts +447 -0
- package/lib/codec/mememax/orbix/perpspool/tx.js +2030 -0
- package/lib/codec/mememax/orbix/perpspool/user_vault.d.ts +82 -0
- package/lib/codec/mememax/orbix/perpspool/user_vault.js +488 -0
- package/lib/codec/mememax/orbix/position/event.d.ts +38 -0
- package/lib/codec/mememax/orbix/position/event.js +221 -0
- package/lib/codec/mememax/orbix/position/export.d.ts +4 -0
- package/lib/codec/mememax/orbix/position/export.js +26 -0
- package/lib/codec/mememax/orbix/position/genesis.d.ts +25 -0
- package/lib/codec/mememax/orbix/position/genesis.js +72 -0
- package/lib/codec/mememax/orbix/position/position.d.ts +89 -0
- package/lib/codec/mememax/orbix/position/position.js +655 -0
- package/lib/codec/mememax/orbix/position/query.d.ts +148 -0
- package/lib/codec/mememax/orbix/position/query.js +625 -0
- package/lib/codec/mememax/orbix/position/tx.d.ts +47 -0
- package/lib/codec/mememax/orbix/position/tx.js +141 -0
- package/lib/codec/mememax/orbix/pricing/event.d.ts +91 -0
- package/lib/codec/mememax/orbix/pricing/event.js +430 -0
- package/lib/codec/mememax/orbix/pricing/export.d.ts +6 -0
- package/lib/codec/mememax/orbix/pricing/export.js +59 -0
- package/lib/codec/mememax/orbix/pricing/genesis.d.ts +28 -0
- package/lib/codec/mememax/orbix/pricing/genesis.js +105 -0
- package/lib/codec/mememax/orbix/pricing/legacy.d.ts +23 -0
- package/lib/codec/mememax/orbix/pricing/legacy.js +99 -0
- package/lib/codec/mememax/orbix/pricing/params.d.ts +41 -0
- package/lib/codec/mememax/orbix/pricing/params.js +293 -0
- package/lib/codec/mememax/orbix/pricing/pricing.d.ts +100 -0
- package/lib/codec/mememax/orbix/pricing/pricing.js +669 -0
- package/lib/codec/mememax/orbix/pricing/query.d.ts +252 -0
- package/lib/codec/mememax/orbix/pricing/query.js +1039 -0
- package/lib/codec/mememax/orbix/pricing/tx.d.ts +239 -0
- package/lib/codec/mememax/orbix/pricing/tx.js +916 -0
- package/lib/codec/mememax/orbix/sequence/export.d.ts +3 -0
- package/lib/codec/mememax/orbix/sequence/export.js +13 -0
- package/lib/codec/mememax/orbix/sequence/genesis.d.ts +32 -0
- package/lib/codec/mememax/orbix/sequence/genesis.js +136 -0
- package/lib/codec/mememax/orbix/sequence/query.d.ts +73 -0
- package/lib/codec/mememax/orbix/sequence/query.js +262 -0
- package/lib/codec/mememax/orbix/sequence/tx.d.ts +46 -0
- package/lib/codec/mememax/orbix/sequence/tx.js +155 -0
- package/lib/codec/mememax/orbix/subaccount/export.d.ts +5 -0
- package/lib/codec/mememax/orbix/subaccount/export.js +41 -0
- package/lib/codec/mememax/orbix/subaccount/genesis.d.ts +30 -0
- package/lib/codec/mememax/orbix/subaccount/genesis.js +128 -0
- package/lib/codec/mememax/orbix/subaccount/legacy.d.ts +20 -0
- package/lib/codec/mememax/orbix/subaccount/legacy.js +79 -0
- package/lib/codec/mememax/orbix/subaccount/params.d.ts +31 -0
- package/lib/codec/mememax/orbix/subaccount/params.js +134 -0
- package/lib/codec/mememax/orbix/subaccount/query.d.ts +275 -0
- package/lib/codec/mememax/orbix/subaccount/query.js +1197 -0
- package/lib/codec/mememax/orbix/subaccount/subaccount.d.ts +49 -0
- package/lib/codec/mememax/orbix/subaccount/subaccount.js +296 -0
- package/lib/codec/mememax/orbix/subaccount/tx.d.ts +145 -0
- package/lib/codec/mememax/orbix/subaccount/tx.js +519 -0
- package/lib/codec/oraclesvc/query.d.ts +23 -0
- package/lib/codec/oraclesvc/query.js +25 -0
- package/lib/codec/tendermint/abci/types.d.ts +867 -0
- package/lib/codec/tendermint/abci/types.js +4883 -0
- package/lib/codec/tendermint/crypto/keys.d.ts +21 -0
- package/lib/codec/tendermint/crypto/keys.js +121 -0
- package/lib/codec/tendermint/crypto/proof.d.ts +79 -0
- package/lib/codec/tendermint/crypto/proof.js +415 -0
- package/lib/codec/tendermint/libs/bits/types.d.ts +20 -0
- package/lib/codec/tendermint/libs/bits/types.js +93 -0
- package/lib/codec/tendermint/oracle/types.d.ts +96 -0
- package/lib/codec/tendermint/oracle/types.js +666 -0
- package/lib/codec/tendermint/p2p/types.d.ts +64 -0
- package/lib/codec/tendermint/p2p/types.js +416 -0
- package/lib/codec/tendermint/types/block.d.ts +24 -0
- package/lib/codec/tendermint/types/block.js +113 -0
- package/lib/codec/tendermint/types/evidence.d.ts +65 -0
- package/lib/codec/tendermint/types/evidence.js +402 -0
- package/lib/codec/tendermint/types/params.d.ts +148 -0
- package/lib/codec/tendermint/types/params.js +499 -0
- package/lib/codec/tendermint/types/types.d.ts +289 -0
- package/lib/codec/tendermint/types/types.js +1650 -0
- package/lib/codec/tendermint/types/validator.d.ts +62 -0
- package/lib/codec/tendermint/types/validator.js +353 -0
- package/lib/codec/tendermint/version/types.d.ts +42 -0
- package/lib/codec/tendermint/version/types.js +143 -0
- package/lib/constant/address.d.ts +3 -0
- package/lib/constant/address.js +5 -0
- package/lib/constant/eip6963Provider.d.ts +66 -0
- package/lib/constant/eip6963Provider.js +31 -0
- package/lib/constant/eip712.d.ts +46 -0
- package/lib/constant/eip712.js +106 -0
- package/lib/constant/generic.d.ts +24 -0
- package/lib/constant/generic.js +24 -0
- package/lib/constant/grant.d.ts +1 -0
- package/lib/constant/grant.js +4 -0
- package/lib/constant/ibc.d.ts +190 -0
- package/lib/constant/ibc.js +2145 -0
- package/lib/constant/index.d.ts +10 -0
- package/lib/constant/index.js +26 -0
- package/lib/constant/modules.d.ts +1 -0
- package/lib/constant/modules.js +2 -0
- package/lib/constant/network.d.ts +77 -0
- package/lib/constant/network.js +429 -0
- package/lib/constant/node.d.ts +5 -0
- package/lib/constant/node.js +80 -0
- package/lib/constant/token.d.ts +13 -0
- package/lib/constant/token.js +375 -0
- package/lib/constant/walletProvider.d.ts +10 -0
- package/lib/constant/walletProvider.js +15 -0
- package/lib/constant/web3Config.d.ts +23 -0
- package/lib/constant/web3Config.js +46 -0
- package/lib/eth/abis/axelarBridge.json +1150 -0
- package/lib/eth/abis/balanceReader.json +26 -0
- package/lib/eth/abis/bridgeEntrance.json +105 -0
- package/lib/eth/abis/erc20.json +222 -0
- package/lib/eth/abis/index.d.ts +9 -0
- package/lib/eth/abis/index.js +22 -0
- package/lib/eth/abis/keyStorage.json +44 -0
- package/lib/eth/abis/lockProxy.json +574 -0
- package/lib/eth/abis/nativeDepositer.json +167 -0
- package/lib/eth/abis/vault.json +119 -0
- package/lib/eth/index.d.ts +1 -0
- package/lib/eth/index.js +37 -0
- package/lib/hydrogen/feeQuote.d.ts +23 -0
- package/lib/hydrogen/feeQuote.js +2 -0
- package/lib/hydrogen/index.d.ts +3 -0
- package/lib/hydrogen/index.js +19 -0
- package/lib/hydrogen/relays.d.ts +34 -0
- package/lib/hydrogen/relays.js +2 -0
- package/lib/hydrogen/stats.d.ts +26 -0
- package/lib/hydrogen/stats.js +2 -0
- package/lib/hydrogen/transfer.d.ts +159 -0
- package/lib/hydrogen/transfer.js +10 -0
- package/lib/index.d.ts +12 -0
- package/lib/index.js +69 -0
- package/lib/insights/alliances.d.ts +39 -0
- package/lib/insights/alliances.js +2 -0
- package/lib/insights/balance.d.ts +74 -0
- package/lib/insights/balance.js +2 -0
- package/lib/insights/block.d.ts +25 -0
- package/lib/insights/block.js +2 -0
- package/lib/insights/chain.d.ts +40 -0
- package/lib/insights/chain.js +2 -0
- package/lib/insights/common.d.ts +101 -0
- package/lib/insights/common.js +83 -0
- package/lib/insights/competition.d.ts +196 -0
- package/lib/insights/competition.js +2 -0
- package/lib/insights/crosschain.d.ts +10 -0
- package/lib/insights/crosschain.js +2 -0
- package/lib/insights/delegation.d.ts +26 -0
- package/lib/insights/delegation.js +2 -0
- package/lib/insights/funding.d.ts +41 -0
- package/lib/insights/funding.js +2 -0
- package/lib/insights/index.d.ts +16 -0
- package/lib/insights/index.js +32 -0
- package/lib/insights/inflation.d.ts +6 -0
- package/lib/insights/inflation.js +2 -0
- package/lib/insights/market.d.ts +25 -0
- package/lib/insights/market.js +8 -0
- package/lib/insights/node.d.ts +32 -0
- package/lib/insights/node.js +2 -0
- package/lib/insights/oracles.d.ts +17 -0
- package/lib/insights/oracles.js +2 -0
- package/lib/insights/pool.d.ts +201 -0
- package/lib/insights/pool.js +2 -0
- package/lib/insights/position.d.ts +104 -0
- package/lib/insights/position.js +10 -0
- package/lib/insights/proposal.d.ts +21 -0
- package/lib/insights/proposal.js +2 -0
- package/lib/insights/transaction.d.ts +30 -0
- package/lib/insights/transaction.js +2 -0
- package/lib/insights/user.d.ts +148 -0
- package/lib/insights/user.js +2 -0
- package/lib/modules/admin.d.ts +298 -0
- package/lib/modules/admin.js +368 -0
- package/lib/modules/alliance.d.ts +43 -0
- package/lib/modules/alliance.js +79 -0
- package/lib/modules/bank.d.ts +14 -0
- package/lib/modules/bank.js +24 -0
- package/lib/modules/base.d.ts +12 -0
- package/lib/modules/base.js +18 -0
- package/lib/modules/bridge.d.ts +38 -0
- package/lib/modules/bridge.js +84 -0
- package/lib/modules/broker.d.ts +16 -0
- package/lib/modules/broker.js +37 -0
- package/lib/modules/coin.d.ts +54 -0
- package/lib/modules/coin.js +108 -0
- package/lib/modules/cosmwasm.d.ts +20 -0
- package/lib/modules/cosmwasm.js +69 -0
- package/lib/modules/evm.d.ts +45 -0
- package/lib/modules/evm.js +73 -0
- package/lib/modules/evmmerge.d.ts +12 -0
- package/lib/modules/evmmerge.js +24 -0
- package/lib/modules/fee.d.ts +5 -0
- package/lib/modules/fee.js +16 -0
- package/lib/modules/gov.d.ts +21 -0
- package/lib/modules/gov.js +55 -0
- package/lib/modules/grant.d.ts +29 -0
- package/lib/modules/grant.js +137 -0
- package/lib/modules/ibc.d.ts +46 -0
- package/lib/modules/ibc.js +244 -0
- package/lib/modules/index.d.ts +19 -0
- package/lib/modules/index.js +35 -0
- package/lib/modules/leverage.d.ts +14 -0
- package/lib/modules/leverage.js +41 -0
- package/lib/modules/market.d.ts +104 -0
- package/lib/modules/market.js +153 -0
- package/lib/modules/oracle.d.ts +5 -0
- package/lib/modules/oracle.js +10 -0
- package/lib/modules/order.d.ts +78 -0
- package/lib/modules/order.js +156 -0
- package/lib/modules/perpspool.d.ts +72 -0
- package/lib/modules/perpspool.js +178 -0
- package/lib/modules/position.d.ts +14 -0
- package/lib/modules/position.js +41 -0
- package/lib/modules/staking.d.ts +36 -0
- package/lib/modules/staking.js +81 -0
- package/lib/modules/subaccount.d.ts +24 -0
- package/lib/modules/subaccount.js +51 -0
- package/lib/provider/amino/AminoTypesMap.d.ts +3 -0
- package/lib/provider/amino/AminoTypesMap.js +27 -0
- package/lib/provider/amino/index.d.ts +1 -0
- package/lib/provider/amino/index.js +8 -0
- package/lib/provider/amino/types/admin.d.ts +4 -0
- package/lib/provider/amino/types/admin.js +132 -0
- package/lib/provider/amino/types/bank.d.ts +4 -0
- package/lib/provider/amino/types/bank.js +48 -0
- package/lib/provider/amino/types/bridge.d.ts +4 -0
- package/lib/provider/amino/types/bridge.js +59 -0
- package/lib/provider/amino/types/broker.d.ts +4 -0
- package/lib/provider/amino/types/broker.js +48 -0
- package/lib/provider/amino/types/coin.d.ts +4 -0
- package/lib/provider/amino/types/coin.js +66 -0
- package/lib/provider/amino/types/evm.d.ts +4 -0
- package/lib/provider/amino/types/evm.js +48 -0
- package/lib/provider/amino/types/evmmerge.d.ts +4 -0
- package/lib/provider/amino/types/evmmerge.js +48 -0
- package/lib/provider/amino/types/feemarket.d.ts +4 -0
- package/lib/provider/amino/types/feemarket.js +48 -0
- package/lib/provider/amino/types/gov.d.ts +4 -0
- package/lib/provider/amino/types/gov.js +358 -0
- package/lib/provider/amino/types/grant.d.ts +4 -0
- package/lib/provider/amino/types/grant.js +217 -0
- package/lib/provider/amino/types/group.d.ts +4 -0
- package/lib/provider/amino/types/group.js +64 -0
- package/lib/provider/amino/types/ibc.d.ts +4 -0
- package/lib/provider/amino/types/ibc.js +74 -0
- package/lib/provider/amino/types/index.d.ts +20 -0
- package/lib/provider/amino/types/index.js +46 -0
- package/lib/provider/amino/types/leverage.d.ts +4 -0
- package/lib/provider/amino/types/leverage.js +50 -0
- package/lib/provider/amino/types/market.d.ts +4 -0
- package/lib/provider/amino/types/market.js +104 -0
- package/lib/provider/amino/types/oracle.d.ts +4 -0
- package/lib/provider/amino/types/oracle.js +4 -0
- package/lib/provider/amino/types/order.d.ts +4 -0
- package/lib/provider/amino/types/order.js +105 -0
- package/lib/provider/amino/types/perpspool.d.ts +4 -0
- package/lib/provider/amino/types/perpspool.js +121 -0
- package/lib/provider/amino/types/position.d.ts +4 -0
- package/lib/provider/amino/types/position.js +48 -0
- package/lib/provider/amino/types/staking.d.ts +4 -0
- package/lib/provider/amino/types/staking.js +66 -0
- package/lib/provider/amino/types/subaccount.d.ts +4 -0
- package/lib/provider/amino/types/subaccount.js +60 -0
- package/lib/provider/amino/utils.d.ts +45 -0
- package/lib/provider/amino/utils.js +249 -0
- package/lib/provider/chainProvider/GetSigningCosmosClientOptions.d.ts +2 -0
- package/lib/provider/chainProvider/GetSigningCosmosClientOptions.js +18 -0
- package/lib/provider/chainProvider/index.d.ts +2 -0
- package/lib/provider/chainProvider/index.js +5 -0
- package/lib/provider/eip6963Provider/Eip6963Provider.d.ts +9 -0
- package/lib/provider/eip6963Provider/Eip6963Provider.js +27 -0
- package/lib/provider/eip6963Provider/index.d.ts +1 -0
- package/lib/provider/eip6963Provider/index.js +8 -0
- package/lib/provider/index.d.ts +10 -0
- package/lib/provider/index.js +22 -0
- package/lib/provider/keplr/KeplrAccount.d.ts +27 -0
- package/lib/provider/keplr/KeplrAccount.js +229 -0
- package/lib/provider/keplr/KeplrStore.d.ts +0 -0
- package/lib/provider/keplr/KeplrStore.js +1 -0
- package/lib/provider/keplr/index.d.ts +3 -0
- package/lib/provider/keplr/index.js +8 -0
- package/lib/provider/leap/LeapAccount.d.ts +28 -0
- package/lib/provider/leap/LeapAccount.js +203 -0
- package/lib/provider/leap/index.d.ts +3 -0
- package/lib/provider/leap/index.js +8 -0
- package/lib/provider/ledger/index.d.ts +1 -0
- package/lib/provider/ledger/index.js +8 -0
- package/lib/provider/ledger/ledger.d.ts +28 -0
- package/lib/provider/ledger/ledger.js +308 -0
- package/lib/provider/metamask/MetaMask.d.ts +83 -0
- package/lib/provider/metamask/MetaMask.js +665 -0
- package/lib/provider/metamask/error.d.ts +2 -0
- package/lib/provider/metamask/error.js +18 -0
- package/lib/provider/metamask/index.d.ts +1 -0
- package/lib/provider/metamask/index.js +5 -0
- package/lib/provider/metamask/legacy-accounts.d.ts +11 -0
- package/lib/provider/metamask/legacy-accounts.js +2254 -0
- package/lib/provider/rainbowKit/RainbowKitAccount.d.ts +41 -0
- package/lib/provider/rainbowKit/RainbowKitAccount.js +298 -0
- package/lib/provider/rainbowKit/index.d.ts +1 -0
- package/lib/provider/rainbowKit/index.js +8 -0
- package/lib/provider/sdk/SDKProvider.d.ts +13 -0
- package/lib/provider/sdk/SDKProvider.js +2 -0
- package/lib/provider/sdk/index.d.ts +1 -0
- package/lib/provider/sdk/index.js +2 -0
- package/lib/util/address.d.ts +72 -0
- package/lib/util/address.js +252 -0
- package/lib/util/alliance.d.ts +2 -0
- package/lib/util/alliance.js +27 -0
- package/lib/util/api.d.ts +122 -0
- package/lib/util/api.js +175 -0
- package/lib/util/auth.d.ts +31 -0
- package/lib/util/auth.js +46 -0
- package/lib/util/blockchain.d.ts +96 -0
- package/lib/util/blockchain.js +571 -0
- package/lib/util/bytes.d.ts +1 -0
- package/lib/util/bytes.js +9 -0
- package/lib/util/eip712.d.ts +10 -0
- package/lib/util/eip712.js +199 -0
- package/lib/util/ethermint.d.ts +9 -0
- package/lib/util/ethermint.js +131 -0
- package/lib/util/evm.d.ts +2 -0
- package/lib/util/evm.js +10 -0
- package/lib/util/external.d.ts +11 -0
- package/lib/util/external.js +7 -0
- package/lib/util/fetch.d.ts +1 -0
- package/lib/util/fetch.js +15 -0
- package/lib/util/generic.d.ts +40 -0
- package/lib/util/generic.js +163 -0
- package/lib/util/gov.d.ts +47 -0
- package/lib/util/gov.js +251 -0
- package/lib/util/grant.d.ts +21 -0
- package/lib/util/grant.js +59 -0
- package/lib/util/ibc.d.ts +19 -0
- package/lib/util/ibc.js +148 -0
- package/lib/util/index.d.ts +20 -0
- package/lib/util/index.js +56 -0
- package/lib/util/ledger.d.ts +3 -0
- package/lib/util/ledger.js +43 -0
- package/lib/util/legacyEIP712.d.ts +20 -0
- package/lib/util/legacyEIP712.js +100 -0
- package/lib/util/message.d.ts +2 -0
- package/lib/util/message.js +24 -0
- package/lib/util/network.d.ts +9 -0
- package/lib/util/network.js +39 -0
- package/lib/util/number.d.ts +9 -0
- package/lib/util/number.js +47 -0
- package/lib/util/order.d.ts +3 -0
- package/lib/util/order.js +13 -0
- package/lib/util/provider.d.ts +1 -0
- package/lib/util/provider.js +12 -0
- package/lib/util/token.d.ts +16 -0
- package/lib/util/token.js +23 -0
- package/lib/util/transferfees.d.ts +18 -0
- package/lib/util/transferfees.js +9 -0
- package/lib/util/tx.d.ts +559 -0
- package/lib/util/tx.js +168 -0
- package/lib/util/type.d.ts +22 -0
- package/lib/util/type.js +45 -0
- package/lib/wallet/CarbonSigner.d.ts +67 -0
- package/lib/wallet/CarbonSigner.js +131 -0
- package/lib/wallet/CarbonSigningClient.d.ts +41 -0
- package/lib/wallet/CarbonSigningClient.js +201 -0
- package/lib/wallet/CarbonWallet.d.ts +220 -0
- package/lib/wallet/CarbonWallet.js +790 -0
- package/lib/wallet/index.d.ts +2 -0
- package/lib/wallet/index.js +18 -0
- package/lib/websocket/channel.d.ts +3 -0
- package/lib/websocket/channel.js +209 -0
- package/lib/websocket/connector.d.ts +234 -0
- package/lib/websocket/connector.js +502 -0
- package/lib/websocket/index.d.ts +1 -0
- package/lib/websocket/index.js +17 -0
- package/lib/websocket/models.d.ts +332 -0
- package/lib/websocket/models.js +2 -0
- package/lib/websocket/types.d.ts +154 -0
- package/lib/websocket/types.js +44 -0
- package/package.json +90 -0
package/lib/util/tx.js
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.isLibMsg = exports.useSignDirectForMetamask = exports.TxGasCostTypeMap = exports.TxMinGasPriceTypeDefaultKey = exports.TxGasCostTypeDefaultKey = exports.DEFAULT_SIGN_OPTS = exports.Types = exports.CarbonCustomError = exports.ErrorType = exports.BroadcastTxMode = exports.getSender = exports.decode = void 0;
|
|
37
|
+
const codec_1 = require("../codec");
|
|
38
|
+
const CosmosModels = __importStar(require("../codec/cosmos-models"));
|
|
39
|
+
const constant_1 = require("../constant");
|
|
40
|
+
const address_1 = require("./address");
|
|
41
|
+
const bytes_1 = require("../util/bytes");
|
|
42
|
+
const msgUpdateClientInnerFields = [
|
|
43
|
+
"lastCommitHash",
|
|
44
|
+
"dataHash",
|
|
45
|
+
"validatorsHash",
|
|
46
|
+
"nextValidatorsHash",
|
|
47
|
+
"consensusHash",
|
|
48
|
+
"appHash",
|
|
49
|
+
"lastResultsHash",
|
|
50
|
+
"evidenceHash",
|
|
51
|
+
"hash",
|
|
52
|
+
"signature",
|
|
53
|
+
"proposerAddress",
|
|
54
|
+
"validatorAddress",
|
|
55
|
+
"address",
|
|
56
|
+
"ed25519",
|
|
57
|
+
"data",
|
|
58
|
+
];
|
|
59
|
+
const msgRecvPacketInnerFields = ["proofCommitment", "data"];
|
|
60
|
+
const decodeHexList = [...msgUpdateClientInnerFields, ...msgRecvPacketInnerFields];
|
|
61
|
+
const decodeNestedMsg = (obj) => {
|
|
62
|
+
for (const key in obj) {
|
|
63
|
+
const value = obj[key];
|
|
64
|
+
if (decodeHexList.includes(key) && value instanceof Uint8Array) {
|
|
65
|
+
obj[key] = Buffer.from(value).toString("hex");
|
|
66
|
+
}
|
|
67
|
+
else if (typeof value === "object" &&
|
|
68
|
+
value?.typeUrl !== undefined &&
|
|
69
|
+
value?.value !== undefined &&
|
|
70
|
+
Object.values(codec_1.TxTypes).includes(value?.typeUrl)) {
|
|
71
|
+
obj[key].value = codec_1.registry.decode(value);
|
|
72
|
+
obj[key] = decodeNestedMsg(value);
|
|
73
|
+
}
|
|
74
|
+
else if (value instanceof Object) {
|
|
75
|
+
obj[key] = decodeNestedMsg(value);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return obj;
|
|
79
|
+
};
|
|
80
|
+
const decode = (bytes) => {
|
|
81
|
+
if (!bytes)
|
|
82
|
+
return bytes;
|
|
83
|
+
const decodedTx = CosmosModels.Tx.Tx.decode((0, bytes_1.toUint8Array)(bytes));
|
|
84
|
+
const carbonTx = { ...decodedTx, body: undefined };
|
|
85
|
+
if (decodedTx.body) {
|
|
86
|
+
carbonTx.body = { ...decodedTx.body, messages: [] };
|
|
87
|
+
for (const message of decodedTx.body.messages) {
|
|
88
|
+
try {
|
|
89
|
+
carbonTx.body.messages.push({
|
|
90
|
+
typeUrl: message.typeUrl,
|
|
91
|
+
value: decodeNestedMsg(codec_1.registry.decode(message)),
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
catch (error) {
|
|
95
|
+
console.error(`failed to decode tx message: ${message?.typeUrl}`);
|
|
96
|
+
console.error(error);
|
|
97
|
+
carbonTx.body.messages.push(message);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
delete carbonTx.body;
|
|
103
|
+
}
|
|
104
|
+
return carbonTx;
|
|
105
|
+
};
|
|
106
|
+
exports.decode = decode;
|
|
107
|
+
const getSender = (decodedTx, opts) => {
|
|
108
|
+
const publicKey = decodedTx.authInfo?.signerInfos?.[0].publicKey?.value;
|
|
109
|
+
if (!publicKey) {
|
|
110
|
+
throw new Error(`could not get signer public key`);
|
|
111
|
+
}
|
|
112
|
+
const keyBuffer = Buffer.from(publicKey).slice(2);
|
|
113
|
+
return address_1.SWTHAddress.publicKeyToAddress(keyBuffer, opts);
|
|
114
|
+
};
|
|
115
|
+
exports.getSender = getSender;
|
|
116
|
+
var BroadcastTxMode;
|
|
117
|
+
(function (BroadcastTxMode) {
|
|
118
|
+
BroadcastTxMode["BroadcastTxSync"] = "sync";
|
|
119
|
+
BroadcastTxMode["BroadcastTxAsync"] = "async";
|
|
120
|
+
BroadcastTxMode["BroadcastTxBlock"] = "block";
|
|
121
|
+
})(BroadcastTxMode || (exports.BroadcastTxMode = BroadcastTxMode = {}));
|
|
122
|
+
var ErrorType;
|
|
123
|
+
(function (ErrorType) {
|
|
124
|
+
ErrorType["SIGNATURE_REJECTION"] = "signature_rejection";
|
|
125
|
+
ErrorType["BROADCAST_FAIL"] = "broadcast_fail";
|
|
126
|
+
ErrorType["BLOCK_FAIL"] = "block_fail";
|
|
127
|
+
})(ErrorType || (exports.ErrorType = ErrorType = {}));
|
|
128
|
+
class CarbonCustomError extends Error {
|
|
129
|
+
constructor(msg, type, data) {
|
|
130
|
+
super(msg);
|
|
131
|
+
this.type = type;
|
|
132
|
+
this.data = data;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
exports.CarbonCustomError = CarbonCustomError;
|
|
136
|
+
exports.Types = codec_1.TxTypes;
|
|
137
|
+
exports.DEFAULT_SIGN_OPTS = {
|
|
138
|
+
fee: constant_1.DEFAULT_FEE,
|
|
139
|
+
memo: "",
|
|
140
|
+
};
|
|
141
|
+
exports.TxGasCostTypeDefaultKey = "default_fee";
|
|
142
|
+
exports.TxMinGasPriceTypeDefaultKey = "swth";
|
|
143
|
+
exports.TxGasCostTypeMap = {};
|
|
144
|
+
const LibPackages = ['ibc', 'cosmos', 'alliance'];
|
|
145
|
+
const BacklistedMessages = [
|
|
146
|
+
'/cosmos.authz.v1beta1.MsgExec',
|
|
147
|
+
'/cosmos.authz.v1beta1.MsgGrant',
|
|
148
|
+
'/cosmos.feegrant.v1beta1.MsgGrantAllowance',
|
|
149
|
+
'/cosmos.feegrant.v1beta1.MsgRevokeAllowance',
|
|
150
|
+
];
|
|
151
|
+
// to use signDirect for metamask signing if messages are from libraries (cosmos-sdk, ibc, alliance).
|
|
152
|
+
// Reasons:
|
|
153
|
+
// 1. There is decoding issue with MsgGrantAllowance in amino
|
|
154
|
+
// 2. For Ibc MsgTransfer, there is an overflow issue with timeouttimestamp overflow (from uint32) during unmarshalJSON, even though it is defined as uint64
|
|
155
|
+
// (This can be resolved from the client side by use sendIBCTransfer instead of sendIBCTransferV2) but using signDirect here fixes it too.
|
|
156
|
+
// 3. Ethermint is still using legacyMsg.getSigners() to verify many amino signed eip712 txs. However, getSigners() is deprecated and not implmented in messages from cosmos-sdk anymore.
|
|
157
|
+
// 4. as of comsos-sdk v0.50 --> very few messages are using legacyDec so we can safely use signDirect
|
|
158
|
+
const useSignDirectForMetamask = (messages) => {
|
|
159
|
+
const typeUrls = messages.map(m => m.typeUrl);
|
|
160
|
+
return !!Object.values(codec_1.TxTypes).find(typeUrl => (0, exports.isLibMsg)(typeUrl) && typeUrls.includes(typeUrl));
|
|
161
|
+
};
|
|
162
|
+
exports.useSignDirectForMetamask = useSignDirectForMetamask;
|
|
163
|
+
const isLibMsg = (typeUrl) => {
|
|
164
|
+
// /ibc.core.client.v1.UpgradeProposal --> ibc
|
|
165
|
+
const pkg = typeUrl.split('.')[0].substring(1);
|
|
166
|
+
return LibPackages.includes(pkg) && !BacklistedMessages.includes(typeUrl);
|
|
167
|
+
};
|
|
168
|
+
exports.isLibMsg = isLibMsg;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Network } from "../constant";
|
|
2
|
+
export interface SimpleMap<T = unknown> {
|
|
3
|
+
[index: string]: T;
|
|
4
|
+
}
|
|
5
|
+
export interface NetworkMap<T> {
|
|
6
|
+
[Network.MainNet]: T;
|
|
7
|
+
[Network.TestNet]: T;
|
|
8
|
+
[Network.DevNet]: T;
|
|
9
|
+
[Network.LocalHost]: T;
|
|
10
|
+
}
|
|
11
|
+
export type OptionalNetworkMap<T> = Partial<NetworkMap<T>>;
|
|
12
|
+
/**
|
|
13
|
+
* converts snakecase strings to camelcase
|
|
14
|
+
* @param snakeStr string to convert to camelcase
|
|
15
|
+
*/
|
|
16
|
+
export declare const snakeToCamel: (snakeStr: string) => string;
|
|
17
|
+
/**
|
|
18
|
+
* converts snakecase strings to camelcase
|
|
19
|
+
* @param camelStr string to convert to camelcase
|
|
20
|
+
*/
|
|
21
|
+
export declare const camelToSnake: (camelStr: string) => string;
|
|
22
|
+
export declare const isDurationType: (value: any) => boolean;
|
package/lib/util/type.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.isDurationType = exports.camelToSnake = exports.snakeToCamel = void 0;
|
|
7
|
+
const constant_1 = require("../constant");
|
|
8
|
+
const long_1 = __importDefault(require("long"));
|
|
9
|
+
/**
|
|
10
|
+
* converts snakecase strings to camelcase
|
|
11
|
+
* @param snakeStr string to convert to camelcase
|
|
12
|
+
*/
|
|
13
|
+
const snakeToCamel = (snakeStr) => {
|
|
14
|
+
if (!snakeStr.includes("_")) {
|
|
15
|
+
return snakeStr;
|
|
16
|
+
}
|
|
17
|
+
const camelArr = snakeStr.split("_").map((snakeItem, index) => {
|
|
18
|
+
if (index === 0) {
|
|
19
|
+
return snakeItem;
|
|
20
|
+
}
|
|
21
|
+
return snakeItem.length > 1 ? `${snakeItem[0].toUpperCase()}${snakeItem.substr(1)}` : snakeItem.toUpperCase();
|
|
22
|
+
});
|
|
23
|
+
return camelArr.join("");
|
|
24
|
+
};
|
|
25
|
+
exports.snakeToCamel = snakeToCamel;
|
|
26
|
+
/**
|
|
27
|
+
* converts snakecase strings to camelcase
|
|
28
|
+
* @param camelStr string to convert to camelcase
|
|
29
|
+
*/
|
|
30
|
+
const camelToSnake = (camelStr) => {
|
|
31
|
+
if (camelStr.length <= 1) {
|
|
32
|
+
return camelStr;
|
|
33
|
+
}
|
|
34
|
+
let newSnake = "";
|
|
35
|
+
for (const letter of camelStr) {
|
|
36
|
+
const newLetter = letter !== letter.toLowerCase() ? `_${letter.toLowerCase()}` : letter;
|
|
37
|
+
newSnake = `${newSnake}${newLetter}`;
|
|
38
|
+
}
|
|
39
|
+
return newSnake;
|
|
40
|
+
};
|
|
41
|
+
exports.camelToSnake = camelToSnake;
|
|
42
|
+
const isDurationType = (value) => {
|
|
43
|
+
return long_1.default.isLong(value?.seconds) && typeof value?.nanos === "number";
|
|
44
|
+
};
|
|
45
|
+
exports.isDurationType = isDurationType;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import CarbonSDK from "../CarbonSDK";
|
|
2
|
+
import { SignDoc } from "cosmjs-types/cosmos/tx/v1beta1/tx";
|
|
3
|
+
import { CosmosLedger } from "../provider";
|
|
4
|
+
import { AminoSignResponse, OfflineAminoSigner, Secp256k1Wallet, StdSignDoc } from "@cosmjs/amino";
|
|
5
|
+
import { AccountData, DirectSecp256k1Wallet, DirectSignResponse, OfflineDirectSigner, OfflineSigner } from "@cosmjs/proto-signing";
|
|
6
|
+
import { ethers } from "ethers";
|
|
7
|
+
export declare enum CarbonSignerTypes {
|
|
8
|
+
Ledger = 0,
|
|
9
|
+
PrivateKey = 1,
|
|
10
|
+
BrowserInjected = 2,
|
|
11
|
+
PublicKey = 3
|
|
12
|
+
}
|
|
13
|
+
export interface EvmSigner {
|
|
14
|
+
readonly sendEvmTransaction: (api: CarbonSDK, req: ethers.providers.TransactionRequest) => Promise<string>;
|
|
15
|
+
}
|
|
16
|
+
export interface ArbitraryMessageSigner {
|
|
17
|
+
readonly signMessage: (address: string, message: string) => Promise<string>;
|
|
18
|
+
}
|
|
19
|
+
export interface EIP712Signer extends EvmSigner {
|
|
20
|
+
legacyEip712SignMode: boolean;
|
|
21
|
+
readonly signLegacyEip712: (signerAddress: string, signDoc: StdSignDoc) => Promise<LegacyEIP712AminoSignResponse>;
|
|
22
|
+
}
|
|
23
|
+
export type CarbonSigner = DirectCarbonSigner | AminoCarbonSigner | CarbonEIP712Signer;
|
|
24
|
+
export type CarbonEIP712Signer = (DirectCarbonSigner | AminoCarbonSigner) & EIP712Signer & ArbitraryMessageSigner;
|
|
25
|
+
export type DirectCarbonSigner = OfflineDirectSigner & EvmSigner & ArbitraryMessageSigner & {
|
|
26
|
+
type: CarbonSignerTypes;
|
|
27
|
+
};
|
|
28
|
+
export type AminoCarbonSigner = OfflineAminoSigner & EvmSigner & ArbitraryMessageSigner & {
|
|
29
|
+
type: CarbonSignerTypes;
|
|
30
|
+
};
|
|
31
|
+
export type LegacyEIP712AminoSignResponse = AminoSignResponse & {
|
|
32
|
+
feePayer: string;
|
|
33
|
+
};
|
|
34
|
+
export declare function isCarbonEIP712Signer(signer: OfflineSigner): boolean;
|
|
35
|
+
export declare class CarbonPrivateKeySigner implements DirectCarbonSigner, AminoCarbonSigner {
|
|
36
|
+
readonly privateKey: Uint8Array;
|
|
37
|
+
readonly prefix: string;
|
|
38
|
+
type: CarbonSignerTypes;
|
|
39
|
+
wallet?: DirectSecp256k1Wallet;
|
|
40
|
+
aminoWallet?: Secp256k1Wallet;
|
|
41
|
+
constructor(privateKey: Uint8Array, prefix: string);
|
|
42
|
+
initWallet(): Promise<DirectSecp256k1Wallet>;
|
|
43
|
+
initAminoWallet(): Promise<Secp256k1Wallet>;
|
|
44
|
+
getAccounts(): Promise<readonly AccountData[]>;
|
|
45
|
+
signAmino(signerAddress: string, signDoc: StdSignDoc): Promise<AminoSignResponse>;
|
|
46
|
+
signDirect(signerAddress: string, signDoc: SignDoc): Promise<DirectSignResponse>;
|
|
47
|
+
sendEvmTransaction(api: CarbonSDK, req: ethers.providers.TransactionRequest): Promise<string>;
|
|
48
|
+
signMessage(address: string, message: string): Promise<string>;
|
|
49
|
+
}
|
|
50
|
+
export declare class CarbonNonSigner implements DirectCarbonSigner {
|
|
51
|
+
type: CarbonSignerTypes;
|
|
52
|
+
getAccounts(): Promise<readonly AccountData[]>;
|
|
53
|
+
signDirect(): Promise<DirectSignResponse>;
|
|
54
|
+
sendEvmTransaction(api: CarbonSDK, req: ethers.providers.TransactionRequest): Promise<string>;
|
|
55
|
+
signMessage(address: string, message: string): Promise<string>;
|
|
56
|
+
}
|
|
57
|
+
export declare class CarbonLedgerSigner implements AminoCarbonSigner {
|
|
58
|
+
readonly ledger: CosmosLedger;
|
|
59
|
+
type: CarbonSignerTypes;
|
|
60
|
+
account?: AccountData;
|
|
61
|
+
retrieveAccount(): Promise<AccountData>;
|
|
62
|
+
getAccounts(): Promise<readonly AccountData[]>;
|
|
63
|
+
signAmino(_: string, doc: StdSignDoc): Promise<AminoSignResponse>;
|
|
64
|
+
sendEvmTransaction(api: CarbonSDK, req: ethers.providers.TransactionRequest): Promise<string>;
|
|
65
|
+
signMessage(_: string, message: string): Promise<string>;
|
|
66
|
+
constructor(ledger: CosmosLedger);
|
|
67
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CarbonLedgerSigner = exports.CarbonNonSigner = exports.CarbonPrivateKeySigner = exports.CarbonSignerTypes = void 0;
|
|
4
|
+
exports.isCarbonEIP712Signer = isCarbonEIP712Signer;
|
|
5
|
+
const constant_1 = require("../constant");
|
|
6
|
+
const ethermint_1 = require("../util/ethermint");
|
|
7
|
+
const generic_1 = require("../util/generic");
|
|
8
|
+
const message_1 = require("../util/message");
|
|
9
|
+
const amino_1 = require("@cosmjs/amino");
|
|
10
|
+
const proto_signing_1 = require("@cosmjs/proto-signing");
|
|
11
|
+
const ethers_1 = require("ethers");
|
|
12
|
+
var CarbonSignerTypes;
|
|
13
|
+
(function (CarbonSignerTypes) {
|
|
14
|
+
CarbonSignerTypes[CarbonSignerTypes["Ledger"] = 0] = "Ledger";
|
|
15
|
+
CarbonSignerTypes[CarbonSignerTypes["PrivateKey"] = 1] = "PrivateKey";
|
|
16
|
+
CarbonSignerTypes[CarbonSignerTypes["BrowserInjected"] = 2] = "BrowserInjected";
|
|
17
|
+
CarbonSignerTypes[CarbonSignerTypes["PublicKey"] = 3] = "PublicKey";
|
|
18
|
+
})(CarbonSignerTypes || (exports.CarbonSignerTypes = CarbonSignerTypes = {}));
|
|
19
|
+
function isCarbonEIP712Signer(signer) {
|
|
20
|
+
return signer.signLegacyEip712 !== undefined;
|
|
21
|
+
}
|
|
22
|
+
class CarbonPrivateKeySigner {
|
|
23
|
+
constructor(privateKey, prefix) {
|
|
24
|
+
this.privateKey = privateKey;
|
|
25
|
+
this.prefix = prefix;
|
|
26
|
+
this.type = CarbonSignerTypes.PrivateKey;
|
|
27
|
+
}
|
|
28
|
+
async initWallet() {
|
|
29
|
+
if (!this.wallet)
|
|
30
|
+
this.wallet = await proto_signing_1.DirectSecp256k1Wallet.fromKey(this.privateKey, this.prefix);
|
|
31
|
+
return this.wallet;
|
|
32
|
+
}
|
|
33
|
+
async initAminoWallet() {
|
|
34
|
+
if (!this.aminoWallet)
|
|
35
|
+
this.aminoWallet = await amino_1.Secp256k1Wallet.fromKey(this.privateKey, this.prefix);
|
|
36
|
+
return this.aminoWallet;
|
|
37
|
+
}
|
|
38
|
+
async getAccounts() {
|
|
39
|
+
const wallet = await this.initWallet();
|
|
40
|
+
return wallet.getAccounts();
|
|
41
|
+
}
|
|
42
|
+
async signAmino(signerAddress, signDoc) {
|
|
43
|
+
const aminoWallet = await this.initAminoWallet();
|
|
44
|
+
return await aminoWallet.signAmino(signerAddress, signDoc);
|
|
45
|
+
}
|
|
46
|
+
async signDirect(signerAddress, signDoc) {
|
|
47
|
+
const wallet = await this.initWallet();
|
|
48
|
+
return await wallet.signDirect(signerAddress, signDoc);
|
|
49
|
+
}
|
|
50
|
+
async sendEvmTransaction(api, req) {
|
|
51
|
+
const unsignedTx = await (0, ethermint_1.populateUnsignedEvmTranscation)(api, req);
|
|
52
|
+
const provider = new ethers_1.ethers.providers.JsonRpcProvider(constant_1.NetworkConfigs[api.network].evmJsonRpcUrl);
|
|
53
|
+
const evmWallet = new ethers_1.ethers.Wallet(api.wallet?.privateKey ?? '', provider);
|
|
54
|
+
const transactionResponse = await evmWallet.sendTransaction({
|
|
55
|
+
...unsignedTx,
|
|
56
|
+
type: unsignedTx.type ?? 2,
|
|
57
|
+
});
|
|
58
|
+
return transactionResponse.hash;
|
|
59
|
+
}
|
|
60
|
+
async signMessage(address, message) {
|
|
61
|
+
const aminoWallet = await this.initAminoWallet();
|
|
62
|
+
const signedDoc = await aminoWallet.signAmino(address, (0, message_1.constructAdr36SignDoc)(address, message));
|
|
63
|
+
return Buffer.from(signedDoc.signature.signature, 'base64').toString('hex');
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.CarbonPrivateKeySigner = CarbonPrivateKeySigner;
|
|
67
|
+
class CarbonNonSigner {
|
|
68
|
+
constructor() {
|
|
69
|
+
this.type = CarbonSignerTypes.PublicKey;
|
|
70
|
+
}
|
|
71
|
+
async getAccounts() {
|
|
72
|
+
throw new Error("signing not available");
|
|
73
|
+
}
|
|
74
|
+
async signDirect() {
|
|
75
|
+
throw new Error("signing not available");
|
|
76
|
+
}
|
|
77
|
+
async sendEvmTransaction(api, req) {
|
|
78
|
+
throw new Error("signing not available");
|
|
79
|
+
}
|
|
80
|
+
async signMessage(address, message) {
|
|
81
|
+
throw new Error("signing not available");
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.CarbonNonSigner = CarbonNonSigner;
|
|
85
|
+
// Uses amino because ledger does not work with protobuf yet
|
|
86
|
+
class CarbonLedgerSigner {
|
|
87
|
+
async retrieveAccount() {
|
|
88
|
+
if (!this.account) {
|
|
89
|
+
const address = await this.ledger.getCosmosAddress();
|
|
90
|
+
const pubkey = await this.ledger.getPubKey();
|
|
91
|
+
this.account = {
|
|
92
|
+
address,
|
|
93
|
+
algo: "secp256k1",
|
|
94
|
+
pubkey,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
return this.account;
|
|
98
|
+
}
|
|
99
|
+
async getAccounts() {
|
|
100
|
+
const account = await this.retrieveAccount();
|
|
101
|
+
return [account];
|
|
102
|
+
}
|
|
103
|
+
async signAmino(_, doc) {
|
|
104
|
+
const account = await this.retrieveAccount();
|
|
105
|
+
const { pubkey } = account;
|
|
106
|
+
const msg = JSON.stringify((0, generic_1.sortObject)(doc));
|
|
107
|
+
const signBytes = await this.ledger.sign(msg);
|
|
108
|
+
const signature = (0, amino_1.encodeSecp256k1Signature)(pubkey, signBytes);
|
|
109
|
+
return {
|
|
110
|
+
signed: doc,
|
|
111
|
+
signature,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
async sendEvmTransaction(api, req) {
|
|
115
|
+
throw new Error("signing not available");
|
|
116
|
+
}
|
|
117
|
+
async signMessage(_, message) {
|
|
118
|
+
const account = await this.retrieveAccount();
|
|
119
|
+
const { pubkey, address } = account;
|
|
120
|
+
const doc = (0, message_1.constructAdr36SignDoc)(address, message);
|
|
121
|
+
const msg = JSON.stringify((0, generic_1.sortObject)(doc));
|
|
122
|
+
const signBytes = await this.ledger.sign(msg);
|
|
123
|
+
const { signature } = (0, amino_1.encodeSecp256k1Signature)(pubkey, signBytes);
|
|
124
|
+
return Buffer.from(signature, 'base64').toString('hex');
|
|
125
|
+
}
|
|
126
|
+
constructor(ledger) {
|
|
127
|
+
this.ledger = ledger;
|
|
128
|
+
this.type = CarbonSignerTypes.Ledger;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
exports.CarbonLedgerSigner = CarbonLedgerSigner;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { TxRaw } from "../codec/cosmos/tx/v1beta1/tx";
|
|
2
|
+
import { CarbonSignerData } from "../util/tx";
|
|
3
|
+
import { AminoMsg } from "@cosmjs/amino";
|
|
4
|
+
import { EncodeObject, OfflineSigner, Registry } from "@cosmjs/proto-signing";
|
|
5
|
+
import { AminoTypes, GasPrice, SigningStargateClientOptions, StargateClient, StdFee } from "@cosmjs/stargate";
|
|
6
|
+
import { Tendermint37Client } from "@cosmjs/tendermint-rpc";
|
|
7
|
+
export interface StdSignDoc {
|
|
8
|
+
readonly chain_id: string;
|
|
9
|
+
readonly account_number: string;
|
|
10
|
+
readonly sequence: string;
|
|
11
|
+
readonly fee: StdFee;
|
|
12
|
+
readonly msgs: readonly AminoMsg[];
|
|
13
|
+
readonly memo: string;
|
|
14
|
+
readonly timeout_height: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function makeSignDocAmino(msgs: readonly AminoMsg[], fee: StdFee, chainId: string, memo: string | undefined, accountNumber: number | string, sequence: number | string, timeoutHeight?: number | string): StdSignDoc;
|
|
17
|
+
export declare class CarbonSigningClient extends StargateClient {
|
|
18
|
+
readonly signer: OfflineSigner;
|
|
19
|
+
readonly options: SigningStargateClientOptions;
|
|
20
|
+
readonly registry: Registry;
|
|
21
|
+
readonly aminoTypes: AminoTypes;
|
|
22
|
+
readonly broadcastTimeoutMs?: number;
|
|
23
|
+
readonly broadcastPollIntervalMs?: number;
|
|
24
|
+
readonly gasPrice?: GasPrice;
|
|
25
|
+
constructor(tmClient: Tendermint37Client, signer: OfflineSigner, options?: SigningStargateClientOptions);
|
|
26
|
+
/**
|
|
27
|
+
* @see SigningStargateClient
|
|
28
|
+
* Gets account number and sequence from the API, creates a sign doc,
|
|
29
|
+
* creates a single signature and assembles the signed transaction.
|
|
30
|
+
*
|
|
31
|
+
* The sign mode (SIGN_MODE_DIRECT or SIGN_MODE_LEGACY_AMINO_JSON) is determined by this client's signer.
|
|
32
|
+
*
|
|
33
|
+
* You can pass signer data (account number, sequence and chain ID) explicitly instead of querying them
|
|
34
|
+
* from the chain. This is needed when signing for a multisig account, but it also allows for offline signing
|
|
35
|
+
* (See the SigningStargateClient.offline constructor).
|
|
36
|
+
*/
|
|
37
|
+
sign(signerAddress: string, messages: readonly EncodeObject[], fee: StdFee, memo: string, signerData: CarbonSignerData, granterAddress?: string): Promise<TxRaw>;
|
|
38
|
+
private signDirect;
|
|
39
|
+
private signAmino;
|
|
40
|
+
private signLegacyEip712;
|
|
41
|
+
}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CarbonSigningClient = void 0;
|
|
7
|
+
exports.makeSignDocAmino = makeSignDocAmino;
|
|
8
|
+
const codec_1 = require("../codec");
|
|
9
|
+
const tx_1 = require("../codec/cosmos/tx/v1beta1/tx");
|
|
10
|
+
const web3_1 = require("../codec/ethermint/types/v1/web3");
|
|
11
|
+
const ethermint_1 = require("../util/ethermint");
|
|
12
|
+
const tx_2 = require("../util/tx");
|
|
13
|
+
const amino_1 = require("@cosmjs/amino");
|
|
14
|
+
const encoding_1 = require("@cosmjs/encoding");
|
|
15
|
+
const math_1 = require("@cosmjs/math");
|
|
16
|
+
const proto_signing_1 = require("@cosmjs/proto-signing");
|
|
17
|
+
const stargate_1 = require("@cosmjs/stargate");
|
|
18
|
+
const long_1 = __importDefault(require("long"));
|
|
19
|
+
const provider_1 = require("../provider");
|
|
20
|
+
const CarbonSigner_1 = require("./CarbonSigner");
|
|
21
|
+
// Added SignMode enum from cosmjs-types to resolve build error
|
|
22
|
+
var SignMode;
|
|
23
|
+
(function (SignMode) {
|
|
24
|
+
/**
|
|
25
|
+
* SIGN_MODE_UNSPECIFIED - SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be
|
|
26
|
+
* rejected
|
|
27
|
+
*/
|
|
28
|
+
SignMode[SignMode["SIGN_MODE_UNSPECIFIED"] = 0] = "SIGN_MODE_UNSPECIFIED";
|
|
29
|
+
/**
|
|
30
|
+
* SIGN_MODE_DIRECT - SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is
|
|
31
|
+
* verified with raw bytes from Tx
|
|
32
|
+
*/
|
|
33
|
+
SignMode[SignMode["SIGN_MODE_DIRECT"] = 1] = "SIGN_MODE_DIRECT";
|
|
34
|
+
/**
|
|
35
|
+
* SIGN_MODE_TEXTUAL - SIGN_MODE_TEXTUAL is a future signing mode that will verify some
|
|
36
|
+
* human-readable textual representation on top of the binary representation
|
|
37
|
+
* from SIGN_MODE_DIRECT
|
|
38
|
+
*/
|
|
39
|
+
SignMode[SignMode["SIGN_MODE_TEXTUAL"] = 2] = "SIGN_MODE_TEXTUAL";
|
|
40
|
+
/**
|
|
41
|
+
* SIGN_MODE_LEGACY_AMINO_JSON - SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses
|
|
42
|
+
* Amino JSON and will be removed in the future
|
|
43
|
+
*/
|
|
44
|
+
SignMode[SignMode["SIGN_MODE_LEGACY_AMINO_JSON"] = 127] = "SIGN_MODE_LEGACY_AMINO_JSON";
|
|
45
|
+
SignMode[SignMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
46
|
+
})(SignMode || (SignMode = {}));
|
|
47
|
+
function makeSignDocAmino(msgs, fee, chainId, memo, accountNumber, sequence, timeoutHeight = 0) {
|
|
48
|
+
const timeoutHeightStr = typeof timeoutHeight === "number" ? timeoutHeight.toString(10) : timeoutHeight;
|
|
49
|
+
return {
|
|
50
|
+
chain_id: chainId,
|
|
51
|
+
account_number: math_1.Uint53.fromString(accountNumber.toString()).toString(),
|
|
52
|
+
sequence: math_1.Uint53.fromString(sequence.toString()).toString(),
|
|
53
|
+
fee: fee,
|
|
54
|
+
msgs: msgs,
|
|
55
|
+
memo: memo || "",
|
|
56
|
+
timeout_height: timeoutHeightStr,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
class CarbonSigningClient extends stargate_1.StargateClient {
|
|
60
|
+
constructor(tmClient, signer, options = {}) {
|
|
61
|
+
super(tmClient, options);
|
|
62
|
+
this.signer = signer;
|
|
63
|
+
this.options = options;
|
|
64
|
+
const { registry = codec_1.registry, aminoTypes = provider_1.AminoTypesMap } = options;
|
|
65
|
+
this.registry = registry;
|
|
66
|
+
this.aminoTypes = aminoTypes;
|
|
67
|
+
this.signer = signer;
|
|
68
|
+
this.broadcastTimeoutMs = options.broadcastTimeoutMs;
|
|
69
|
+
this.broadcastPollIntervalMs = options.broadcastPollIntervalMs;
|
|
70
|
+
this.gasPrice = options.gasPrice;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* @see SigningStargateClient
|
|
74
|
+
* Gets account number and sequence from the API, creates a sign doc,
|
|
75
|
+
* creates a single signature and assembles the signed transaction.
|
|
76
|
+
*
|
|
77
|
+
* The sign mode (SIGN_MODE_DIRECT or SIGN_MODE_LEGACY_AMINO_JSON) is determined by this client's signer.
|
|
78
|
+
*
|
|
79
|
+
* You can pass signer data (account number, sequence and chain ID) explicitly instead of querying them
|
|
80
|
+
* from the chain. This is needed when signing for a multisig account, but it also allows for offline signing
|
|
81
|
+
* (See the SigningStargateClient.offline constructor).
|
|
82
|
+
*/
|
|
83
|
+
async sign(signerAddress, messages, fee, memo, signerData, granterAddress) {
|
|
84
|
+
if ((0, CarbonSigner_1.isCarbonEIP712Signer)(this.signer)) {
|
|
85
|
+
if (this.signer.legacyEip712SignMode) {
|
|
86
|
+
return this.signLegacyEip712(signerAddress, messages, fee, memo, signerData);
|
|
87
|
+
}
|
|
88
|
+
// workaround to use signDirect
|
|
89
|
+
if ((0, tx_2.useSignDirectForMetamask)(messages))
|
|
90
|
+
return this.signDirect(signerAddress, messages, fee, memo, signerData, granterAddress);
|
|
91
|
+
// Use amino sigining for metamask as there is a bug with signDirect signature verification
|
|
92
|
+
// ethermint verifies sign direct legacyDec type as shifted by 18dp when it should be unshifted (verified with keplr)
|
|
93
|
+
// therefore the alternative which works here would be to use signamino where the verification is not broken on ethermint.
|
|
94
|
+
return this.signAmino(signerAddress, messages, fee, memo, signerData, granterAddress);
|
|
95
|
+
}
|
|
96
|
+
return (0, proto_signing_1.isOfflineDirectSigner)(this.signer)
|
|
97
|
+
? this.signDirect(signerAddress, messages, fee, memo, signerData, granterAddress)
|
|
98
|
+
: this.signAmino(signerAddress, messages, fee, memo, signerData, granterAddress);
|
|
99
|
+
}
|
|
100
|
+
async signDirect(signerAddress, messages, fee, memo, { accountNumber, sequence, chainId, timeoutHeight }, granterAddress) {
|
|
101
|
+
const signer = this.signer;
|
|
102
|
+
const accountFromSigner = (await this.signer.getAccounts()).find((account) => account.address === signerAddress);
|
|
103
|
+
if (!(0, CarbonSigner_1.isCarbonEIP712Signer)(this.signer) && !accountFromSigner) {
|
|
104
|
+
throw new Error("Failed to retrieve account from signer");
|
|
105
|
+
}
|
|
106
|
+
const pubKeyBz = accountFromSigner ? accountFromSigner.pubkey : (await this.signer.getAccounts())[0].pubkey;
|
|
107
|
+
const pubkey = (0, CarbonSigner_1.isCarbonEIP712Signer)(this.signer) ? (0, ethermint_1.encodeAnyEthSecp256k1PubKey)(pubKeyBz) : (0, proto_signing_1.encodePubkey)((0, amino_1.encodeSecp256k1Pubkey)(pubKeyBz));
|
|
108
|
+
const txBodyEncodeObject = {
|
|
109
|
+
typeUrl: "/cosmos.tx.v1beta1.TxBody",
|
|
110
|
+
value: {
|
|
111
|
+
messages: messages,
|
|
112
|
+
memo: memo,
|
|
113
|
+
...(timeoutHeight && {
|
|
114
|
+
timeoutHeight: long_1.default.fromNumber(timeoutHeight),
|
|
115
|
+
}),
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
const txBodyBytes = this.registry.encode(txBodyEncodeObject);
|
|
119
|
+
const gasLimit = math_1.Int53.fromString(fee.gas).toNumber();
|
|
120
|
+
const authInfoBytes = (0, proto_signing_1.makeAuthInfoBytes)([{ pubkey, sequence }], fee.amount, gasLimit, granterAddress, (granterAddress ? signerAddress : undefined));
|
|
121
|
+
const signDoc = (0, proto_signing_1.makeSignDoc)(txBodyBytes, authInfoBytes, chainId, accountNumber);
|
|
122
|
+
const { signature, signed } = await signer.signDirect(signerAddress, signDoc);
|
|
123
|
+
return tx_1.TxRaw.fromPartial({
|
|
124
|
+
bodyBytes: signed.bodyBytes,
|
|
125
|
+
authInfoBytes: signed.authInfoBytes,
|
|
126
|
+
signatures: [(0, encoding_1.fromBase64)(signature.signature)],
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
async signAmino(signerAddress, messages, fee, memo, { accountNumber, sequence, chainId, timeoutHeight }, granterAddress) {
|
|
130
|
+
const signer = this.signer;
|
|
131
|
+
const accountFromSigner = (await this.signer.getAccounts()).find((account) => account.address === signerAddress);
|
|
132
|
+
if (!(0, CarbonSigner_1.isCarbonEIP712Signer)(this.signer) && !accountFromSigner) {
|
|
133
|
+
throw new Error("Failed to retrieve account from signer");
|
|
134
|
+
}
|
|
135
|
+
const pubKeyBz = accountFromSigner ? accountFromSigner.pubkey : (await this.signer.getAccounts())[0].pubkey;
|
|
136
|
+
const pubkey = (0, CarbonSigner_1.isCarbonEIP712Signer)(this.signer) ? (0, ethermint_1.encodeAnyEthSecp256k1PubKey)(pubKeyBz) : (0, proto_signing_1.encodePubkey)((0, amino_1.encodeSecp256k1Pubkey)(pubKeyBz));
|
|
137
|
+
const signMode = SignMode.SIGN_MODE_LEGACY_AMINO_JSON;
|
|
138
|
+
const msgs = messages.map((msg) => this.aminoTypes.toAmino(msg));
|
|
139
|
+
const signDoc = makeSignDocAmino(msgs, fee, chainId, memo, accountNumber, sequence, timeoutHeight ?? 0);
|
|
140
|
+
const { signature, signed } = await signer.signAmino(signerAddress, signDoc);
|
|
141
|
+
const signedTxBody = {
|
|
142
|
+
messages: signed.msgs.map((msg) => this.aminoTypes.fromAmino(msg)),
|
|
143
|
+
memo: signed.memo,
|
|
144
|
+
...(timeoutHeight && {
|
|
145
|
+
timeoutHeight: long_1.default.fromNumber(timeoutHeight),
|
|
146
|
+
}),
|
|
147
|
+
};
|
|
148
|
+
const signedTxBodyEncodeObject = {
|
|
149
|
+
typeUrl: "/cosmos.tx.v1beta1.TxBody",
|
|
150
|
+
value: signedTxBody,
|
|
151
|
+
};
|
|
152
|
+
const signedTxBodyBytes = this.registry.encode(signedTxBodyEncodeObject);
|
|
153
|
+
const signedGasLimit = math_1.Int53.fromString(signed.fee.gas).toNumber();
|
|
154
|
+
const signedSequence = math_1.Int53.fromString(signed.sequence).toNumber();
|
|
155
|
+
const signedAuthInfoBytes = (0, proto_signing_1.makeAuthInfoBytes)([{ pubkey, sequence: signedSequence }], signed.fee.amount, signedGasLimit, granterAddress, (granterAddress ? signerAddress : undefined), signMode);
|
|
156
|
+
return tx_1.TxRaw.fromPartial({
|
|
157
|
+
bodyBytes: signedTxBodyBytes,
|
|
158
|
+
authInfoBytes: signedAuthInfoBytes,
|
|
159
|
+
signatures: [(0, encoding_1.fromBase64)(signature.signature)],
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
async signLegacyEip712(signerAddress, messages, fee, memo, { accountNumber, sequence, evmChainId }, granterAddress) {
|
|
163
|
+
if (!evmChainId) {
|
|
164
|
+
throw new Error("evmChainId required for legacyEip712 tx");
|
|
165
|
+
}
|
|
166
|
+
const signer = this.signer;
|
|
167
|
+
const pubKeyBz = (await this.signer.getAccounts())[0].pubkey;
|
|
168
|
+
const pubkey = (0, ethermint_1.encodeAnyEthSecp256k1PubKey)(pubKeyBz);
|
|
169
|
+
const signMode = SignMode.SIGN_MODE_LEGACY_AMINO_JSON;
|
|
170
|
+
const msgs = messages.map((msg) => this.aminoTypes.toAmino(msg));
|
|
171
|
+
const signDoc = makeSignDocAmino(msgs, fee, evmChainId, memo, accountNumber, sequence);
|
|
172
|
+
const { signature, signed, feePayer } = await signer.signLegacyEip712(signerAddress, signDoc);
|
|
173
|
+
const eip712ExtensionOptions = {
|
|
174
|
+
typeUrl: "/ethermint.types.v1.ExtensionOptionsWeb3Tx",
|
|
175
|
+
value: web3_1.ExtensionOptionsWeb3Tx.encode(web3_1.ExtensionOptionsWeb3Tx.fromPartial({
|
|
176
|
+
typedDataChainId: (0, ethermint_1.parseChainId)(evmChainId),
|
|
177
|
+
feePayer,
|
|
178
|
+
feePayerSig: (0, encoding_1.fromBase64)(signature.signature),
|
|
179
|
+
})).finish(),
|
|
180
|
+
};
|
|
181
|
+
const signedGasLimit = math_1.Int53.fromString(signed.fee.gas).toNumber();
|
|
182
|
+
const signedSequence = math_1.Int53.fromString(signed.sequence).toNumber();
|
|
183
|
+
const signedAuthInfoBytes = (0, proto_signing_1.makeAuthInfoBytes)([{ pubkey, sequence: signedSequence }], signed.fee.amount, signedGasLimit, granterAddress, (granterAddress ? signerAddress : undefined), signMode);
|
|
184
|
+
const signedTxBody = {
|
|
185
|
+
messages: signed.msgs.map((msg) => this.aminoTypes.fromAmino(msg)),
|
|
186
|
+
memo: signed.memo,
|
|
187
|
+
extensionOptions: [eip712ExtensionOptions],
|
|
188
|
+
};
|
|
189
|
+
const signedTxBodyEncodeObject = {
|
|
190
|
+
typeUrl: "/cosmos.tx.v1beta1.TxBody",
|
|
191
|
+
value: signedTxBody,
|
|
192
|
+
};
|
|
193
|
+
const signedTxBodyBytes = this.registry.encode(signedTxBodyEncodeObject);
|
|
194
|
+
return tx_1.TxRaw.fromPartial({
|
|
195
|
+
bodyBytes: signedTxBodyBytes,
|
|
196
|
+
authInfoBytes: signedAuthInfoBytes,
|
|
197
|
+
signatures: [new Uint8Array()],
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
exports.CarbonSigningClient = CarbonSigningClient;
|