useECDSASignGen
Hook for generating ECDSA signature.
Import
Usage
Returns
isLoading: boolean
isLoading: boolean
Indicates if the signature generation is in progress.
signature: ECDSAP1Signature | undefined
signature: ECDSAP1Signature | undefined
The generated signature.
error: DuoSDKError | undefined | unknow
error: DuoSDKError | undefined | unknow
The error object if the signature generation fails.
sign: (params: { userToken: string, partyKey: ECDSAP1PartyKeys, keyshare: ECDSAP1KeyshareV2, hexMessageHash: string }) => void
sign: (params: { userToken: string, partyKey: ECDSAP1PartyKeys, keyshare: ECDSAP1KeyshareV2, hexMessageHash: string }) => void
userToken: string
The user JWT token.
partyKey: ECDSAP1PartyKeys
The party key object.
keyshare: ECDSAP1KeyshareV2
The keyshare object to use for signature generation.
hexMessageHash: string
Hash of a message, obtained by hashing it with a hash function and then encoding the result as a hexadecimal string.
The function to generate the signature.
asyncSign: (params: { userToken: string, partyKey: ECDSAP1PartyKeys, keyshare: ECDSAP1KeyshareV2, hexMessageHash: string }) => Promise<ECDSAP1Signature>
asyncSign: (params: { userToken: string, partyKey: ECDSAP1PartyKeys, keyshare: ECDSAP1KeyshareV2, hexMessageHash: string }) => Promise<ECDSAP1Signature>
similar to
sign
but returns a promise which can be awaited.
Types
ECDSAP1Signature
Last updated