Interface: ICryptosuite ​
Defined in: cryptosuite/interface.ts:50
Interface representing a BIP-340 Cryptosuite. ICryptosuite
Properties ​
cryptosuite ​
cryptosuite:
string
Defined in: cryptosuite/interface.ts:55
multikey ​
multikey:
SchnorrMultikey
Defined in: cryptosuite/interface.ts:58
type ​
type:
"DataIntegrityProof"
Defined in: cryptosuite/interface.ts:52
Methods ​
createProof() ​
createProof(
params):Promise<Proof>
Defined in: cryptosuite/interface.ts:67
Create a proof for an insecure document.
Parameters ​
params ​
See CreateProofParams for details.
Returns ​
Promise<Proof>
The proof for the document.
generateHash() ​
generateHash(
params):Hex
Defined in: cryptosuite/interface.ts:93
Generate a hash of the canonical proof configuration and document.
Parameters ​
params ​
See GenerateHashParams for details.
Returns ​
The hash string of the proof configuration and document.
proofConfiguration() ​
proofConfiguration(
options):Promise<string>
Defined in: cryptosuite/interface.ts:101
Configure the proof by canonicalzing it.
Parameters ​
options ​
The options to use when transforming the proof.
Returns ​
Promise<string>
The canonicalized proof configuration.
Throws ​
if the proof configuration cannot be canonicalized.
proofSerialization() ​
proofSerialization(
params):Bytes
Defined in: cryptosuite/interface.ts:111
Serialize the proof into a byte array.
Parameters ​
params ​
See ProofSerializationParams for details.
Returns ​
The serialized proof.
Throws ​
if the multikey does not match the verification method.
proofVerification() ​
proofVerification(
params):boolean
Defined in: cryptosuite/interface.ts:122
Verify the proof by comparing the hash of the proof configuration and document to the proof bytes.
Parameters ​
params ​
See ProofVerificationParams for details.
Returns ​
boolean
True if the proof is verified, false otherwise.
Throws ​
if the multikey does not match the verification method.
transformDocument() ​
transformDocument(
params):Promise<string>
Defined in: cryptosuite/interface.ts:84
Transform a document (secure didUpdateInvocation or insecure didUpdatePayload) into canonical form.
Parameters ​
params ​
See TransformDocumentParams for details.
Returns ​
Promise<string>
The canonicalized document.
Throws ​
if the document cannot be transformed.
verifyProof() ​
verifyProof(
document):Promise<VerificationResult>
Defined in: cryptosuite/interface.ts:74
Verify a proof for a secure document.
Parameters ​
document ​
The secure document to verify.
Returns ​
Promise<VerificationResult>
The result of the verification.