PasskeyKeypair class
A passkey signer implementing SIP-9. Holds the 33-byte compressed secp256r1
public key and a PasskeyProvider; the private key never leaves the
authenticator. Mirrors Mysten's PasskeyKeypair.
Constructors
- PasskeyKeypair(Uint8List publicKey, PasskeyProvider provider, [Uint8List? credentialId])
Properties
- credentialId → Uint8List?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- provider → PasskeyProvider
-
final
- publicKey → Uint8List
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getCredentialId(
) → Uint8List? -
getKeyScheme(
) → SignatureScheme -
getPublicKey(
) → PasskeyPublicKey -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sign(
Uint8List data) → Future< Uint8List> -
Signs
data(the challenge, i.e.blake2b(intentMessage)) with the passkey and returns the serializedPasskeyAuthenticatorBCS bytes (without the outer passkey flag). -
signPersonalMessage(
Uint8List bytes) → Future< SignatureWithBytes> -
signTransactionBlock(
Uint8List bytes) → Future< SignatureWithBytes> -
signWithIntent(
Uint8List bytes, IntentScope intent) → Future< SignatureWithBytes> -
Signs
bytesunderintent, returning the base64 passkey signature (flag(0x06) || BCS(PasskeyAuthenticator)) and the base64 message bytes. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
getPasskeyInstance(
PasskeyProvider provider) → Future< PasskeyKeypair> - Creates a passkey signer by invoking the provider to create a fresh credential. Only call this when creating a passkey wallet for the first time. To reconstruct from an existing passkey, use signAndRecover.
-
signAndRecover(
PasskeyProvider provider, Uint8List message) → Future< List< PasskeyPublicKey> > -
Asks the passkey to sign
messageand returns every (up to 4) public key that could have produced the signature. Call twice with different messages and intersect with findCommonPublicKey to identify a previously created passkey wallet whose public key isn't stored locally.