diff --git a/packages/protocol-kit/src/Safe.ts b/packages/protocol-kit/src/Safe.ts index 6b39deeb8..bffc06fdc 100644 --- a/packages/protocol-kit/src/Safe.ts +++ b/packages/protocol-kit/src/Safe.ts @@ -1704,9 +1704,11 @@ class Safe { /** * This method creates a signer to be used with the init method * @param {Credential} credential - The credential to be used to create the signer. Can be generated in the web with navigator.credentials.create - * @returns {PasskeyArgType} - The signer to be used with the init method + * @returns {Pick} - The signer to be used with the init method */ - static createPasskeySigner = async (credential: Credential): Promise => { + static createPasskeySigner = async ( + credential: Credential + ): Promise> => { return extractPasskeyData(credential) } } diff --git a/packages/protocol-kit/src/utils/passkeys/extractPasskeyData.ts b/packages/protocol-kit/src/utils/passkeys/extractPasskeyData.ts index f11807270..363e0d9d5 100644 --- a/packages/protocol-kit/src/utils/passkeys/extractPasskeyData.ts +++ b/packages/protocol-kit/src/utils/passkeys/extractPasskeyData.ts @@ -172,12 +172,14 @@ export async function decodePublicKey( * Extracts and returns the passkey data (coordinates and rawId) from a given passkey Credential. * * @param {Credential} passkeyCredential - The passkey credential generated via `navigator.credentials.create()` or other method in another platforms. - * @returns {Promise} A promise that resolves to an object containing the coordinates and the rawId derived from the passkey. + * @returns {Promise>} A promise that resolves to an object containing the coordinates and the rawId derived from the passkey. * This is the important information in the Safe account context and should be stored securely as it is used to verify the passkey and to instantiate the SDK * as a signer (`Safe.init()) * @throws {Error} Throws an error if the coordinates could not be extracted */ -export async function extractPasskeyData(passkeyCredential: Credential): Promise { +export async function extractPasskeyData( + passkeyCredential: Credential +): Promise> { const passkeyPublicKeyCredential = passkeyCredential as PublicKeyCredential const rawId = Buffer.from(passkeyPublicKeyCredential.rawId).toString('hex')