# [Ride v4 and v3] Decoding functions
⚠️ This is the documentation for the Standard library version 4 and 3. We recommend to use version 6. Go to version 6
Name | Description | Complexity |
---|---|---|
addressFromString(String): Address|Unit | Decodes address from base58 string | 124 for Standard Library version 3 1 for Standard Library version 4 |
addressFromStringValue(String): Address | Decodes address from base58 string. Fails if the address cannot be decoded | 124 for Standard Library version 3 1 for Standard Library version 4 |
fromBase16String(String): ByteVector | Decodes base16 string to an array of bytes | 10 |
fromBase58String(String): ByteVector | Decodes base58 string to an array of bytes | 10 for Standard Library version 3 1 for Standard Library version 4 |
fromBase64String(String): ByteVector | Decodes base64 string to an array of bytes | 10 for Standard Library version 3 40 for Standard Library version 4 |
# addressFromString(String): Address|Unit
Decodes address from base58 string.
addressFromString(string: String): Address|Unit
For a description of the return value, see the Address article.
# Parameters
Parameter | Description |
---|---|
string : String | String to decode |
# Examples
let address = addressFromString("3NADPfTVhGvVvvRZuqQjhSU4trVqYHwnqjF")
# addressFromStringValue(String): Address
Decodes address from base58 string.
Fails if the address cannot be decoded.
addressFromStringValue(string: String): Address
For a description of the return value, see the Address article.
# Parameters
Parameter | Description |
---|---|
string : String | String to decode |
# Examples
let address = addressFromStringValue("3NADPfTVhGvVvvRZuqQjhSU4trVqYHwnqjF")
# fromBase16String(String): ByteVector
Decodes a base16 string to an array of bytes.
fromBase16String(str: String): ByteVector
# Parameters
Parameter | Description |
---|---|
str : String | String to decode |
# Examples
let bytes = fromBase16String("52696465")
# fromBase58String(String): ByteVector
Decodes a base58 string to an array of bytes.
fromBase58String(str: String): ByteVector
# Parameters
Parameter | Description |
---|---|
str : String | String to decode |
# Examples
let bytes = fromBase58String("37BPKA")
# fromBase64String(String): ByteVector
Decodes a base64 string to an array of bytes.
fromBase64String(str: String): ByteVector
# Parameters
Parameter | Description |
---|---|
str : String | String to decode |
# Examples
let bytes = fromBase64String("UmlkZQ==")