Skip to content

Latest commit

 

History

History
305 lines (126 loc) · 9.77 KB

multichain_address.md

File metadata and controls

305 lines (126 loc) · 9.77 KB

Module 0x3::multichain_address

Struct MultiChainAddress

#[data_struct]
struct MultiChainAddress has copy, drop, store

Constants

const LENGTH: u64 = 31;

const ErrorMultiChainIDMismatch: u64 = 1;

const MULTICHAIN_ID_BITCOIN: u64 = 0;

const MULTICHAIN_ID_ETHER: u64 = 60;

const MULTICHAIN_ID_NOSTR: u64 = 1237;

const MULTICHAIN_ID_ROOCH: u64 = 20230101;

Function multichain_id_bitcoin

public fun multichain_id_bitcoin(): u64

Function multichain_id_ether

public fun multichain_id_ether(): u64

Function multichain_id_nostr

public fun multichain_id_nostr(): u64

Function multichain_id_rooch

public fun multichain_id_rooch(): u64

Function get_length

public fun get_length(): u64

Function new

public fun new(multichain_id: u64, raw_address: vector<u8>): multichain_address::MultiChainAddress

Function from_bytes

Function from_eth

Function from_bitcoin

Function multichain_id

Function raw_address

Function is_rooch_address

Function is_eth_address

Function is_bitcoin_address

Function into_rooch_address

Function into_eth_address

Function into_bitcoin_address

Function mapping_to_rooch_address

Mapping from MultiChainAddress to rooch address If the MultiChainAddress is not rooch address, it will generate a new rooch address based on the MultiChainAddress