These hooks must be used within a component wrapped by
InterwovenKitProvider and require an active wallet connection to return address values.Available Hooks
useAddress
The primary hook that returns the appropriate address format based on the default chain configuration.Current address in the format appropriate for the default chain:
- Hex format for MiniEVM chains
- Bech32 format for other chain types (MiniMove, MiniWasm, Initia L1)
useInitiaAddress
Returns the Bech32-formatted address compatible with Cosmos-based chains.Bech32-encoded address with the
init prefix (e.g., init1abc...xyz). Returns empty string if no wallet is connected.useHexAddress
Returns the hex-formatted address compatible with Ethereum-based chains.Hex-encoded address with
0x prefix (e.g., 0x1234...abcd). Returns empty string if no wallet is connected.Usage Patterns
Dynamic Address Display
Display the appropriate address format based on the current chain context:Chain-Specific Address Usage
Use specific address formats when interacting with different chain types:Address Format Details
Bech32 Format (Cosmos)
- Prefix:
initfor all Initia ecosystem addresses - Length: 44 characters total
- Example:
init1abc123...xyz789 - Use Case: Cosmos transactions, IBC transfers, native module interactions
Hex Format (Ethereum)
- Prefix:
0x - Length: 42 characters total (40 hex characters + prefix)
- Example:
0x1234abcd...5678efgh - Use Case: EVM transactions, smart contract interactions, ERC-20 transfers
Integration Examples
Multi-Chain Asset Transfer
Address Conversion
InterwovenKit automatically handles address conversion between formats. The same private key generates both address formats, ensuring they represent the same account across different chain types.Common Patterns
- Use
useAddress()for most cases - it automatically selects the right format - Use
useInitiaAddress()when specifically working with Cosmos-based chains - Use
useHexAddress()when specifically working with EVM-based chains - Store both formats if your application needs to support multi-chain operations