Interface: DataIntegrityProof ​
Defined in: data-integrity-proof/interface.ts:145
Interface representing a BIP-340 DataIntegrityProof. DataIntegrityProof
Properties ​
cryptosuite ​
cryptosuite:
Cryptosuite
Defined in: data-integrity-proof/interface.ts:149
Cryptosuite class object
Methods ​
addProof() ​
addProof(
document,config):BTCR2SignedUpdate
Defined in: data-integrity-proof/interface.ts:157
Add a proof to a document.
Parameters ​
document ​
The document to add a proof to.
config ​
The config to use when adding the proof.
Returns ​
The document with the added proof.
verifyProof() ​
verifyProof(
document,expectedPurpose,mediaType?,expectedDomain?,expectedChallenge?):VerificationResult
Defined in: data-integrity-proof/interface.ts:168
Verify a proof.
Parameters ​
document ​
string
The document to verify.
expectedPurpose ​
string
The expected purpose of the proof.
mediaType? ​
string
The media type of the document.
expectedDomain? ​
string[]
The expected domain of the proof.
expectedChallenge? ​
string
The expected challenge of the proof.
Returns ​
The result of verifying the proof.