File tree Expand file tree Collapse file tree 6 files changed +30
-16
lines changed Expand file tree Collapse file tree 6 files changed +30
-16
lines changed Original file line number Diff line number Diff line change 1+ // Copyright (c) 2025 IOTA Stiftung
2+ // SPDX-License-Identifier: Apache-2.0
3+
4+ pub mod passkey;
5+ pub mod simple;
Original file line number Diff line number Diff line change 1+ // Copyright (c) 2025 IOTA Stiftung
2+ // SPDX-License-Identifier: Apache-2.0
3+
4+ use iota_crypto:: Verifier ;
5+
6+ use crate :: {
7+ error:: Result ,
8+ types:: { crypto:: passkey:: PasskeyAuthenticator , signature:: SimpleSignature } ,
9+ } ;
10+
11+ #[ derive( uniffi:: Object ) ]
12+ pub struct PasskeyVerifier ( iota_crypto:: passkey:: PasskeyVerifier ) ;
13+
14+ #[ uniffi:: export]
15+ impl PasskeyVerifier {
16+ #[ uniffi:: constructor]
17+ pub fn new ( ) -> Self {
18+ Self ( iota_crypto:: passkey:: PasskeyVerifier :: new ( ) )
19+ }
20+
21+ pub fn verify ( & self , message : & [ u8 ] , authenticator : & PasskeyAuthenticator ) -> Result < ( ) > {
22+ Ok ( self . 0 . verify ( message, & authenticator. 0 ) ?)
23+ }
24+ }
File renamed without changes.
Original file line number Diff line number Diff line change 106106#![ expect( unused) ]
107107#![ allow( clippy:: wrong_self_convention) ]
108108
109+ mod crypto;
109110mod error;
110111mod faucet;
111112mod graphql;
Original file line number Diff line number Diff line change 33
44pub mod multisig;
55pub mod passkey;
6- pub mod simple;
76pub mod validator;
87pub mod zklogin;
98
Original file line number Diff line number Diff line change @@ -66,18 +66,3 @@ impl PasskeyAuthenticator {
6666 self . 0 . signature ( ) . into ( )
6767 }
6868}
69-
70- #[ derive( uniffi:: Object ) ]
71- pub struct PasskeyVerifier ( iota_crypto:: passkey:: PasskeyVerifier ) ;
72-
73- #[ uniffi:: export]
74- impl PasskeyVerifier {
75- #[ uniffi:: constructor]
76- pub fn new ( ) -> Self {
77- Self ( iota_crypto:: passkey:: PasskeyVerifier :: new ( ) )
78- }
79-
80- pub fn verify ( & self , message : & [ u8 ] , authenticator : & PasskeyAuthenticator ) -> Result < ( ) > {
81- Ok ( self . 0 . verify ( message, & authenticator. 0 ) ?)
82- }
83- }
You can’t perform that action at this time.
0 commit comments