Skip to main content

ecsign

Callable

  • ecsign(msgHash: Buffer, privateKey: Buffer, chainId?: bigint): ECDSASignature

  • Returns the ECDSA signature of a message hash.

    If chainId is provided assume an EIP-155-style signature and calculate the v value accordingly, otherwise return a “static” v just derived from the recovery bit


    Parameters

    • msgHash: Buffer
    • privateKey: Buffer
    • optionalchainId: bigint

    Returns ECDSASignature