blob!() { /* proc-macro */ }Expand description
Converts a hex string to a compile-time [Blob<N>].
Two forms:
blob!("DEADBEEF")โ exact-fitBlob<4>whereNequals the decoded byte count.blob!("DEADBEEF", 128)โBlob<128>zero-padded to the given capacity; the decoded byte count must not exceed the capacity.
In both forms len is set to the decoded byte count. The hex string must
have an even number of characters.
ยงExample
โ
use xrpl_wasm_stdlib::blob;
use xrpl_wasm_stdlib::core::types::blob::Blob;
const EXACT: Blob<4> = blob!("DEADBEEF");
const PADDED: Blob<32> = blob!("DEADBEEF", 32);