Skip to content

Commit

Permalink
* Added note about IS_TESTNET to ADdress from/to hex/bytes methods
Browse files Browse the repository at this point in the history
  • Loading branch information
christianschmitz committed Oct 17, 2023
1 parent 0abc42b commit 925d7b6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lang/builtins/address.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Represents a Cardano address.

### `from_bytes`

Decodes raw address bytes.
Decodes raw address bytes (see [CIP 19](https://cips.cardano.org/cips/cip19/)). [`IS_TESTNET`](../../api/reference/namespaces/config.md#is_testnet) must be set to `false` for this to work for mainnet addresses.

```helios
Address::from_bytes(bytes: ByteArray) -> Address
Expand All @@ -20,7 +20,7 @@ Address::from_data(data: Data) -> Address

### `from_hex`

Decodes the hexadecimal encoded bytes of a raw address.
Decodes the hexadecimal encoded bytes of a raw address (see [CIP 19](https://cips.cardano.org/cips/cip19/)). [`IS_TESTNET`](../../api/reference/namespaces/config.md#is_testnet) must be set to `false` for this to work for mainnet addresses.

```helios
Address::from_hex(hex: String) -> Address
Expand Down Expand Up @@ -79,15 +79,15 @@ address.serialize() -> ByteArray

### `to_bytes`

Returns the raw address bytes.
Returns the raw address bytes (see [CIP 19](https://cips.cardano.org/cips/cip19/)). [`IS_TESTNET`](../../api/reference/namespaces/config.md#is_testnet) must be set to `false` for this to return a raw mainnet addresses.

```helios
address.to_bytes() -> ByteArray
```

### `to_hex`

Encodes the raw address bytes as a hexadecimal `String`.
Encodes the raw address bytes as a hexadecimal `String` (see [CIP 19](https://cips.cardano.org/cips/cip19/)). [`IS_TESTNET`](../../api/reference/namespaces/config.md#is_testnet) must be set to `false` for this to return a raw mainnet addresses.

```
address.to_hex() -> String
Expand Down

0 comments on commit 925d7b6

Please sign in to comment.