Injective defines its custom Account type that uses Ethereum’s ECDSA secp256k1 curve for keys. This satisfies the EIP84 for full BIP44 paths. The root HD path for Injective-based accounts is m/44'/60'/0'/0.
EthAccounts can be represented in both Bech32 and hex format for Ethereum’s Web3 tooling compatibility.The Bech32 format is the default format for Cosmos-SDK queries and transactions through CLI and REST clients. The hex format is the Ethereum common.Address representation of a Cosmos sdk.AccAddress.
Compressed Public Key: {"@type":"/injective.crypto.v1beta1.ethsecp256k1.PubKey","key":"ApNNebT58zlZxO2yjHiRTJ7a7ufjIzeq5HhLrbmtg9Y/"}
You can query an account address using the Cosmos CLI or REST clients:
Copy
Ask AI
# NOTE: the --output (-o) flag will define the output format in JSON or YAML (text)injectived q auth account $(injectived keys show <MYKEY> -a) -o text| '@type': /injective.types.v1beta1.EthAccount base_account: account_number: "3" address: inj14au322k9munkmx5wrchz9q30juf5wjgz2cfqku pub_key: null sequence: "0" code_hash: xdJGAYb3IzySfn2y3McDwOUAtlPKgic7e/rYBF2FpHA=
Copy
Ask AI
# GET /cosmos/auth/v1beta1/accounts/{address}curl -X GET "http://localhost:10337/cosmos/auth/v1beta1/accounts/inj14au322k9munkmx5wrchz9q30juf5wjgz2cfqku" -H "accept: application/json"
See the Swagger API reference for the full docs on the accounts API.
The Cosmos SDK Keyring output (i.e injectived keys) only supports addresses in Bech32 format.