signGenEdDSA
A function to generate a signature for a given message using the EdDSA algorithm.
Import
import { signGenEdDSA } from '@silencelaboratories/react-native-duo-sdk';Usage
signGenEdDSA({
userToken,
partyKey,
keyshare,
hexMessageHash,
})Parameters
params: { userToken: string, partyKey: EdDSAP1PartyKeys, keyshare: EdDSAP1Keyshare, hexMessageHash: string }
params: { userToken: string, partyKey: EdDSAP1PartyKeys, keyshare: EdDSAP1Keyshare, hexMessageHash: string }userToken: stringThe user JWT token.
partyKey: EdDSAP1PartyKeysThe party key object.
keyshare: EdDSAP1KeyshareThe keyshare object to use for signature generation.
hexMessageHash: stringHash of a message, obtained by hashing it with a hash function and then encoding the result as a hexadecimal string.
Returns
Promise<string>
Promise<string>Promise which resolves to the generated signature.
The signature is a base64 encoded string.
Error
DuoSDKError | undefined | unknow
DuoSDKError | undefined | unknowIf signature generation fails, the error object is thrown.