Accounts
Dis page get plenti plenti grammar and we no fit translate everything
Abobi
Dis document go yarn about something important for Injective Chain: how dem keep track of your money.
Abeg, before you jump into di main thing, read dis one first.
Accounts for Injective
Injective don make ein own account as dem want am, dis na Account type wey dey use Ethereum's ECDSA secp256k1 curve for keys. Ein dey belleful di EIP84 for full BIP44 paths. Di main di main HD path for Injective-based accounts na m/44'/60'/0'/0.
Addresses and Public Keys
Na 3 Ogbonke Addresses/PubKeys dey from di start as dem make Injective:
One na di Addresses and Keys for accounts, wey dey see users (e.g. the sender of a
message). Dem dey get am are with dieth_secp256k1curve.Another na di Addresses and Keys for validator operators, wey dey put eye for di operators of validators. You fit use di
eth_secp256k1curve get am.Another come be di Addresses and Keys for consensus nodes, e dey identify divalidator nodes wey dey put mouth for consensus. You fit use di
ed25519curve get am.
Accounts
inj
injpub
eth_secp256k1
20
33 (compressed)
Validator Operator
injvaloper
injvaloperpub
eth_secp256k1
20
33 (compressed)
Consensus Nodes
injvalcons
injvalconspub
ed25519
20
32
Address formats for clients
EthAccount fit turn up as Bech32 and hex format wey dem dey use for Ethereum's Web3 tooling compatibility.
Di Bech32 format na di default format wey dem dey use for Cosmos-SDK queries and transactions through CLI and REST clients. Di hex format for di other hand, na di Ethereum common.Address representation of a Cosmos sdk.AccAddress.
Address (Bech32):
inj14au322k9munkmx5wrchz9q30juf5wjgz2cfqkuAddress (EIP55 Hex):
0xAF79152AC5dF276D9A8e1E2E22822f9713474902Compressed Public Key:
{"@type":"/injective.crypto.v1beta1.ethsecp256k1.PubKey","key":"ApNNebT58zlZxO2yjHiRTJ7a7ufjIzeq5HhLrbmtg9Y/"}
You fit use Cosmos CLI or REST clients query account address
Check di Swagger API reference for thedi full gist on top accounts API matter.
::: tip The Cosmos SDK Keyring output (i.e injectived keys) dey only supports addresses in Bech32 format. :::
Deriving Injective Account from a private key/mnemonicβ
Make we see how di code go be to derive Injective Account from a private key and/or a mnemonic phase:
Make we put eye for how code to derive a public key from a private key dey:
Last updated