Icon HelpCircleForumIcon Link

⌘K

Icon HelpCircleForumIcon Link

Icon LinkBech32

Icon InfoCircle

[!NOTE] Note Bech32 addresses like fuel1.. are now deprecated. Use B256 addresses instead. (help Icon Link)

The SDK uses the Bech32 type as the core property of the Address Icon Link class, specifically through the bech32Address property.

Originally designed for Bitcoin, the Bech32 format offers numerous advantages such as enhanced error detection, simplified integrations, and improved compatibility with future upgrades. Given these benefits, the Address Icon Link class is constructed around the Bech32 type.

You can read more about the Bech32 type here Icon Link.

Icon LinkDefault Human-Readable Part (HRP)

A Bech32 address consists of an HRP (Human-Readable Part) followed by the number 1, which acts as a separator:

/**
 * @deprecated
 * Type `Bech32Address` is now deprecated. Use `B256` addresses instead. ([help](https://docs.fuel.network/docs/specs/abi/argument-encoding/#b256))
 */
export type Bech32Address = `fuel${string}`;

A complete Bech32 address will resemble the following:

import { Address } from 'fuels';
 
const address = Address.fromRandom();
 
console.log('Bech32', address.bech32Address);
 
// fuel1d5cfwekq78r0zq73g7eg0747etkaxxltrqx5tncm7lvg89awe3hswhqjhs

The HRP in the example above is fuel. This human-readable prefix is included to provide better readability and prevent users from accidentally using addresses on the wrong network.