Evolution SDK
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

PrefixNetworkAddress Type
addrMainnetBase/enterprise address
addr_testTestnetBase/enterprise address
stakeMainnetReward address
stake_testTestnetReward address

Next Steps

  • Addresses — Address types and operations
  • Hex — Hex encoding for raw data