Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/types/src/Signers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export type MultibasePublicKey = Pick<VerificationMethod, 'publicKeyMultibase'>
export type MultibaseSecretKey = {
secretKeyMultibase: Base58BtcMultibaseString
}
export type MultibaseKeyPair = MultibasePublicKey & MultibaseSecretKey
export type MultibaseKeyPair = MultibasePublicKey &
MultibaseSecretKey & { publicKey: Uint8Array }

export type TypedKeypair<KeyTypes extends string> = {
publicKey: Uint8Array
Expand Down
5 changes: 4 additions & 1 deletion packages/utils/src/Signers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -497,5 +497,8 @@ export function generateKeypair({
const keyRingPair = makeKeypairFromUri(seed.toLowerCase(), typeForKeyring)

const { secretKey, publicKey } = extractPk(keyRingPair)
return encodeMultibaseKeypair({ publicKey, secretKey, type })
return {
...encodeMultibaseKeypair({ publicKey, secretKey, type }),
publicKey,
}
}
Loading