Encoding
Bech32
Bech32 encoding for Cardano addresses
Bech32 Encoding
Bech32 is the human-readable encoding format for Cardano addresses. Addresses look like addr_test1vr... (testnet) or addr1q... (mainnet). The Address module handles all Bech32 conversion.
Parse from Bech32
import { } from "@evolution-sdk/evolution"
const = .(
"addr_test1vrm9x2dgvdau8vckj4duc89m638t8djmluqw5pdrFollw8qd9k63"
)Convert to Bech32
import { } from "@evolution-sdk/evolution"
declare const : .
const = .()
// "addr_test1vrm9x2..."Other Formats
The Address module also supports hex and byte array representations:
import { } from "@evolution-sdk/evolution"
declare const : .
// To/from hex
const = .()
const = .()
// To/from bytes
const = .()
const = .()Bech32 Prefixes
| Prefix | Network | Address Type |
|---|---|---|
addr | Mainnet | Base/enterprise address |
addr_test | Testnet | Base/enterprise address |
stake | Mainnet | Reward address |
stake_test | Testnet | Reward address |