Skip to content

Latest commit

 

History

History
84 lines (40 loc) · 2.47 KB

base58.md

File metadata and controls

84 lines (40 loc) · 2.47 KB

Module 0x2::base58

Module which defines base58 functions.

Constants

const E_DECODE_FAILED: u64 = 1;

Function encoding

@param address_bytes: address bytes for base58 format Encode the address bytes with Base58 algorithm and returns an encoded base58 bytes

public fun encoding(address_bytes: &vector<u8>): vector<u8>

Function checksum_encoding

@param address_bytes: address bytes on the base58 checksum format @param version_byte: version byte used for verification of different types of checksum addresses Encode the address bytes with Base58Check algorithm and returns an encoded base58 bytes with checksum

public fun checksum_encoding(address_bytes: &vector<u8>, version_byte: u8): vector<u8>

Function decoding

@param encoded_address_bytes: encoded base58 address bytes Decode the base58 address bytes with Base58 algorithm and returns a raw base58 address bytes

public fun decoding(encoded_address_bytes: &vector<u8>): vector<u8>

Function checksum_decoding

@param encoded_address_bytes: encoded base58 address bytes @param version_byte: version byte used for verification of different types of base58 addresses Decode the base58 address bytes with Base58Check algorithm and returns a raw base58 address bytes without checksum

public fun checksum_decoding(encoded_address_bytes: &vector<u8>, version_byte: u8): vector<u8>