@the-hashgraph-group-ag/cryptosuites-eddsa-v1 / EdDSAProofCreator
Class: EdDSAProofCreator
EdDSAProofCreator is a class that implements the Data Integrity EdDSA Cryptosuite v1.0 for the Ed25519 algorithm. It is used to create a proof of the input document.
See
Usage:
const proofCreator = new EdDSAProofCreator();
const signingRequest = await proofCreator.createSigningRequest(inputDocument, proofOptions);
const securedDocument = await proofCreator.attachSignature(inputDocument, signingRequest.proofConfig, signature);
Methods
attachSignature()
attachSignature<
Input>(inputDocument,proofConfig,proofBytes):SecuredDataDocument<Input>
Attaches a signature to the input document.
canSign()
canSign(
proofType):boolean
Checks if the proof creator can sign with the given proof type.
constructProof()
constructProof(
proofConfig,proofBytes):Proof
Constructs a proof from a signing request and a signature.
createSigningRequest()
createSigningRequest<
Input>(inputDocument,proofOptions):Promise<ProofSigningRequest<link:../type-aliases/EdDSA_ALGORITHM.md>>
Creates a signing request for the input document to create a proof.
Parameters
======= inputDocument
Input
The input document to create a proof for.
======= proofOptions
The options for the proof.