Skip to main content

hash256

Macro hash256 

Source
hash256!() { /* proc-macro */ }
Expand description

Converts a 64-character hex string to a 32-byte [Hash256] (UInt<32>) at compile time.

Accepts uppercase, lowercase, and mixed-case hex. Wrong length or non-hex characters are compile errors.

§Example

use xrpl_wasm_stdlib::hash256;
use xrpl_wasm_stdlib::core::types::uint::Hash256;

const H: Hash256 =
    hash256!("0000000000000000000000000000000000000000000000000000000000000001");