Icon SunFilledIcon MoonStars

Icon LinkAddresses

Addresses and varying address formats are commonplace when interacting with decentralized applications. Furthermore, different networks may enforce different address formats.

The Fuel Network uses the Bech32 address format for its interactions, an example of which can be seen below:

const bech32 = 'fuel1d5cfwekq78r0zq73g7eg0747etkaxxltrqx5tncm7lvg89awe3hswhqjhs';

However, a hexlified Bits256 (hex) is another common address format; an example can be seen below:

const bits256 = '0xbebd3baab326f895289ecbd4210cf886ce41952316441ae4cac35f00f0e882a6';

At times, these can even be wrapped in a Struct . Such as an Asset ID or a EVM Address :

// #import { EvmAddress };
const address: EvmAddress = {
	value: '0x000000000000000000000000210cf886ce41952316441ae4cac35f00f0e882a6',

The TS-SDK makes converting between these addresses simple using the Address helper, which provides various utilities for conversion.

The following conversion guide will show how to utilize this class to convert between address formats, as well as Sway Standard Types.