Function sign

  • Description

    Sign bytes

    Returns

    The signed bytes

    Example

    import { magicBytes as magicBytesMap } from 'sotez';

    cryptoUtils.sign(opbytes, keys.sk, magicBytesMap.generic)
    .then(({ bytes, magicBytes, sig, prefixSig, sbytes }) => console.log(bytes, magicBytes, sig, prefixSig, sbytes));

    Parameters

    • bytes: string

      The bytes to sign

    • sk: string

      The secret key to sign the bytes with

    • Optional magicBytes: Uint8Array

      The magic bytes for the operation

    • Optional password: string = ''

      The password used to encrypt the sk

    Returns Promise<Signed>

Generated using TypeDoc