@@ -114,6 +114,7 @@ pub struct Zone {
114114 pub anchor : u32 ,
115115 pub sovereignty : String ,
116116 pub handle : String ,
117+ pub canonical : String ,
117118 pub alias : Option < String > ,
118119 pub script_pubkey : Vec < u8 > ,
119120 pub records : Option < Vec < u8 > > ,
@@ -127,6 +128,7 @@ fn zone_from_inner(z: &libveritas::Zone) -> Zone {
127128 anchor : z. anchor ,
128129 sovereignty : z. sovereignty . to_string ( ) ,
129130 handle : z. handle . to_string ( ) ,
131+ canonical : z. canonical . to_string ( ) ,
130132 alias : z. alias . as_ref ( ) . map ( |a| a. to_string ( ) ) ,
131133 script_pubkey : z. script_pubkey . as_bytes ( ) . to_vec ( ) ,
132134 records : z. records . as_ref ( ) . map ( |d| d. as_slice ( ) . to_vec ( ) ) ,
@@ -158,6 +160,9 @@ fn zone_to_inner(z: &Zone) -> Result<libveritas::Zone, VeritasError> {
158160 let handle = SName :: from_str ( & z. handle ) . map_err ( |e| VeritasError :: InvalidInput {
159161 msg : format ! ( "invalid handle: {e}" ) ,
160162 } ) ?;
163+ let canonical = SName :: from_str ( & z. canonical ) . map_err ( |e| VeritasError :: InvalidInput {
164+ msg : format ! ( "invalid canonical: {e}" ) ,
165+ } ) ?;
161166 let alias = z. alias . as_ref ( )
162167 . map ( |a| SLabel :: from_str_unprefixed ( a) )
163168 . transpose ( )
@@ -217,6 +222,7 @@ fn zone_to_inner(z: &Zone) -> Result<libveritas::Zone, VeritasError> {
217222 _ => libveritas:: SovereigntyState :: Dependent ,
218223 } ,
219224 handle,
225+ canonical,
220226 alias,
221227 script_pubkey : ScriptBuf :: from_bytes ( z. script_pubkey . clone ( ) ) ,
222228 records : z. records . as_ref ( ) . map ( |d| sip7:: RecordSet :: new ( d. clone ( ) ) ) ,
@@ -584,7 +590,7 @@ impl Veritas {
584590 self . inner . sovereignty_for ( commitment_height) . to_string ( )
585591 }
586592
587- /// Verify a message with default options (expand_names: true, dev_mode: false) .
593+ /// Verify a message with default options.
588594 pub fn verify (
589595 & self ,
590596 ctx : & QueryContext ,
@@ -603,20 +609,19 @@ impl Veritas {
603609 Ok ( Arc :: new ( VerifiedMessage { inner } ) )
604610 }
605611
606- /// Verify a message with explicit options .
612+ /// Verify a message with option flags (combine with bitwise OR) .
607613 pub fn verify_with_options (
608614 & self ,
609615 ctx : & QueryContext ,
610616 msg : & Message ,
611- expand_names : bool ,
612- dev_mode : bool ,
617+ options : u32 ,
613618 ) -> Result < Arc < VerifiedMessage > , VeritasError > {
614619 let ctx_guard = ctx. inner . read ( ) . unwrap ( ) ;
615620 let msg_inner = msg. inner . read ( ) . unwrap ( ) ;
616621
617622 let inner = self
618623 . inner
619- . verify_with_options ( & ctx_guard, msg_inner. clone ( ) , expand_names , dev_mode )
624+ . verify_with_options ( & ctx_guard, msg_inner. clone ( ) , options )
620625 . map_err ( |e| VeritasError :: VerificationFailed {
621626 msg : e. to_string ( ) ,
622627 } ) ?;
@@ -715,6 +720,15 @@ impl Lookup {
715720
716721// -- Free functions --
717722
723+ #[ uniffi:: export]
724+ pub fn verify_default ( ) -> u32 { libveritas:: VERIFY_DEFAULT }
725+
726+ #[ uniffi:: export]
727+ pub fn verify_dev_mode ( ) -> u32 { libveritas:: VERIFY_DEV_MODE }
728+
729+ #[ uniffi:: export]
730+ pub fn verify_enable_snark ( ) -> u32 { libveritas:: VERIFY_ENABLE_SNARK }
731+
718732/// Hash a message with the Spaces signed-message prefix (SHA256).
719733/// Returns the 32-byte digest suitable for Schnorr signing/verification.
720734#[ uniffi:: export]
0 commit comments