Skip to content

Commit

Permalink
make generate key async
Browse files Browse the repository at this point in the history
Signed-off-by: Berend Sliedrecht <[email protected]>
  • Loading branch information
berendsliedrecht committed Nov 15, 2024
1 parent 6999268 commit 9706277
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/SecureEnvironment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const expoSecureEnvironment = requireNativeModule<SecureEnvironment & { supports
export interface SecureEnvironment {
generateKeypair(id: string, biometricsBacked?: boolean): Promise<void> | void
getPublicBytesForKeyId(keyId: string): Promise<Uint8Array> | Uint8Array
sign(keyId: string, message: Uint8Array, biometricsBacked?: boolean): Promise<Uint8Array> | Uint8Array
sign(keyId: string, message: Uint8Array, biometricsBacked?: boolean): Promise<Uint8Array>
}

let isExpoSecureEnvironmentSupported: boolean
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { getSecureEnvironment } from './SecureEnvironment'

export { SecureEnvironment, setFallbackSecureEnvironment } from './SecureEnvironment'

export function generateKeypair(id: string, biometricsBacked = true) {
getSecureEnvironment().generateKeypair(id, biometricsBacked)
export async function generateKeypair(id: string, biometricsBacked = true): Promise<void> {
await getSecureEnvironment().generateKeypair(id, biometricsBacked)
}

export async function getPublicBytesForKeyId(keyId: string): Promise<Uint8Array> {
Expand Down

0 comments on commit 9706277

Please sign in to comment.