@@ -261,17 +261,18 @@ enum Commands {
261
261
SignEvent {
262
262
/// Space name (e.g., @example)
263
263
space : String ,
264
-
265
264
/// Path to a Nostr event json file (omit for stdin)
266
265
#[ arg( short, long) ]
267
266
input : Option < PathBuf > ,
267
+ /// Prefer the most recent trust path (not recommended)
268
+ #[ arg( long) ]
269
+ prefer_recent : bool ,
268
270
} ,
269
271
/// Verify a signed Nostr event against the space's public key
270
272
#[ command( name = "verifyevent" ) ]
271
273
VerifyEvent {
272
274
/// Space name (e.g., @example)
273
275
space : String ,
274
-
275
276
/// Path to a signed Nostr event json file (omit for stdin)
276
277
#[ arg( short, long) ]
277
278
input : Option < PathBuf > ,
@@ -283,6 +284,9 @@ enum Commands {
283
284
space : String ,
284
285
/// The DNS zone file path (omit for stdin)
285
286
input : Option < PathBuf > ,
287
+ /// Prefer the most recent trust path (not recommended)
288
+ #[ arg( long) ]
289
+ prefer_recent : bool ,
286
290
} ,
287
291
/// Updates the Merkle trust path for space-anchored Nostr events
288
292
#[ command( name = "refreshanchor" ) ]
@@ -836,20 +840,28 @@ async fn handle_commands(cli: &SpaceCli, command: Commands) -> Result<(), Client
836
840
cli. client . verify_listing ( listing) . await ?;
837
841
println ! ( "{} Listing verified" , "✓" . color( Color :: Green ) ) ;
838
842
}
839
- Commands :: SignEvent { space, input } => {
843
+ Commands :: SignEvent {
844
+ space,
845
+ input,
846
+ prefer_recent,
847
+ } => {
840
848
let space = normalize_space ( & space) ;
841
849
let event = read_event ( input)
842
850
. map_err ( |e| ClientError :: Custom ( format ! ( "input error: {}" , e. to_string( ) ) ) ) ?;
843
851
844
- let result = cli. sign_event ( space, event, false ) . await ?;
852
+ let result = cli. sign_event ( space, event, prefer_recent ) . await ?;
845
853
println ! ( "{}" , serde_json:: to_string( & result) . expect( "result" ) ) ;
846
854
}
847
- Commands :: SignZone { space, input } => {
855
+ Commands :: SignZone {
856
+ space,
857
+ input,
858
+ prefer_recent,
859
+ } => {
848
860
let space = normalize_space ( & space) ;
849
861
let event = encode_dns_update ( input)
850
862
. map_err ( |e| ClientError :: Custom ( format ! ( "Parse error: {}" , e) ) ) ?;
851
863
852
- let result = cli. sign_event ( space, event, false ) . await ?;
864
+ let result = cli. sign_event ( space, event, prefer_recent ) . await ?;
853
865
println ! ( "{}" , serde_json:: to_string( & result) . expect( "result" ) ) ;
854
866
}
855
867
Commands :: RefreshAnchor {
0 commit comments