Class: BIP340DataIntegrityProof ​
Defined in: data-integrity-proof/index.ts:13
Implements section 2.2.1 DataIntegrityProof of the Data Integrity BIP-340 Cryptosuite spec
Implements ​
BIP340DataIntegrityProof
Implements ​
Constructors ​
Constructor ​
new BIP340DataIntegrityProof(
cryptosuite):BIP340DataIntegrityProof
Defined in: data-integrity-proof/index.ts:21
Creates an instance of BIP340DataIntegrityProof.
Parameters ​
cryptosuite ​
The cryptosuite to use for proof generation and verification.
Returns ​
BIP340DataIntegrityProof
Properties ​
cryptosuite ​
cryptosuite:
BIP340Cryptosuite
Defined in: data-integrity-proof/index.ts:15
Cryptosuite class object
Implementation of ​
DataIntegrityProof.cryptosuite
Methods ​
addProof() ​
addProof(
unsignedDocument,config):BTCR2SignedUpdate
Defined in: data-integrity-proof/index.ts:31
Add a proof to a document.
Parameters ​
unsignedDocument ​
The document to add the proof to.
config ​
The configuration for generating the proof.
Returns ​
A document with a proof added.
Implementation of ​
verifyProof() ​
verifyProof(
document,expectedPurpose,mediaType?,expectedDomain?,expectedChallenge?):VerificationResult
Defined in: data-integrity-proof/index.ts:83
Verify a proof.
Parameters ​
document ​
string
The stringified document to verify.
expectedPurpose ​
string
The expected purpose of the proof.
mediaType? ​
string
The media type of the document.
expectedDomain? ​
The expected domain of the proof.
string | string[]
expectedChallenge? ​
string
The expected challenge of the proof.
Returns ​
The result of verifying the proof.