useECDSAKeyGen
Hook for generating ECDSA keyshares.
Import
Usage
Returns
isLoading: boolean
isLoading: boolean
Indicates if the key generation is in progress.
keyshare: ECDSAP1KeyshareV2 | undefined
keyshare: ECDSAP1KeyshareV2 | undefined
The generated keyshare.
error: DuoSDKError | undefined | unknow
error: DuoSDKError | undefined | unknow
The error object if the key generation fails.
keygen: (params: { userToken: string, partyKey: ECDSAP1PartyKeys }) => void
keygen: (params: { userToken: string, partyKey: ECDSAP1PartyKeys }) => void
userToken: string
The user JWT token.
partyKey: ECDSAP1PartyKeys
The party key object.
Sync key-generation function.
asyncKeygen: (params: { userToken: string, partyKey: ECDSAP1PartyKeys }) => Promise<ECDSAP1KeyshareV2>
asyncKeygen: (params: { userToken: string, partyKey: ECDSAP1PartyKeys }) => Promise<ECDSAP1KeyshareV2>
similar to
keygen
but returns a promise which can be awaited.
Last updated