0xa1::bytes32
Bytes32
new
default
from_bytes
from_address
to_bytes
length
peel
use 0x2::address;
use 0x2::bcs;
Bytes32
struct Bytes32 has copy, drop, store
bytes: address
const LENGTH: u64 = 32;
new
Casts an address to a bytes32
public fun new(bytes: address): bytes32::Bytes32
default
public fun default(): bytes32::Bytes32
from_bytes
public fun from_bytes(bytes: vector<u8>): bytes32::Bytes32
public fun from_bytes(bytes: vector<u8>): Bytes32 {
new(address::from_bytes(bytes))
}
from_address
public fun from_address(addr: address): bytes32::Bytes32
public fun from_address(addr: address): Bytes32 {
new(addr)
}
to_bytes
public fun to_bytes(self: bytes32::Bytes32): vector<u8>
length
public fun length(_self: &bytes32::Bytes32): u64
peel
public(friend) fun peel(bcs: &mut bcs::BCS): bytes32::Bytes32