Skip to content

Commit

Permalink
fix: add missing API functions (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
feri42 authored Jan 13, 2025
1 parent 1394aa1 commit 8b3330f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions features/keychain/api/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@ export interface KeychainApi {
exportKey(params: KeySource): Promise<PublicKeys>
exportKey(params: { exportPrivate: false } & KeySource): Promise<PublicKeys>
exportKey(params: { exportPrivate: true } & KeySource): Promise<PublicKeys & PrivateKeys>
exportKey(params: { exportPrivate: true; exportPublic: false } & KeySource): Promise<PrivateKeys>
getPublicKey(params: KeySource): Promise<Buffer>
signBuffer(
params: {
data: Buffer
signatureType: string
extraEntropy?: Buffer
tweak?: Buffer
enc: string
} & KeySource
): Promise<Buffer>
arePrivateKeysLocked(seeds: Buffer[]): boolean
removeSeeds(seeds: Buffer[]): string[]
sodium: {
Expand Down
2 changes: 2 additions & 0 deletions features/keychain/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ const createKeychainApi = ({ keychain }) => {
return {
keychain: {
exportKey: (...args) => keychain.exportKey(...args),
getPublicKey: (...args) => keychain.getPublicKey(...args),
signBuffer: (...args) => keychain.signBuffer(...args),
arePrivateKeysLocked: (seeds) => keychain.arePrivateKeysLocked(seeds),
sodium: {
sign: keychain.sodium.sign,
Expand Down

0 comments on commit 8b3330f

Please sign in to comment.