Within this document, we’ll outline some examples on how to convert addresses between different formats and derivation paths.Documentation Index
Fetch the complete documentation index at: https://injectivelabs-mintlify-jp-developers-first-half-1777019423.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Convert Hex ↔ Bech32 address
As we’ve mentioned in the wallet section, Injective addresses are compatible with Ethereum addresses. You can convert between the two formats easily.Using TypeScript
You can easily convert between an Injective address and Ethereum address by using our utility functions in the@injectivelabs/sdk-ts package:
Convert Cosmos address to Injective Address
As Injective has a different derivation path than the default Cosmos one, you need thepublicKey of the account to convert a Cosmos publicAddress to Injective one.
Using TypeScript
More examples can be found in wallet accounts.
