Getting Started Guide
Prerequisites
-
Node.js 20 or higher
-
npm or yarn package manager
-
Basic understanding of TypeScript/JavaScript
-
Familiarity with cryptographic concepts
Basic Usage
Importing the SDK
import {
ProofCreator,
ProofVerifier,
Signer,
canonicalizer,
hashing
} from '@the-hashgraph-group-ag/cryptosuites-core';
import { EdDSAProofCreator, EdDSAProofVerifier } from '@the-hashgraph-group-ag/cryptosuites-eddsa-v1';
import { InternalEd25519Signer, InternalEd25519Verifier } from '@the-hashgraph-group-ag/signer-internal-ed25519';
Creating a Simple Proof
// Initialize components
const proofCreator = new EdDSAProofCreator();
const signer = new InternalEd25519Signer(privateKey);
// Create proof options
const proofOptions = {
proofPurpose: 'assertionMethod',
verificationMethod: 'did:example:123#key-1',
};
// Create and sign document
const securedDocument = await signer.sign(
inputDocument,
proofOptions,
proofCreator
);
Next Steps
-
Explore the API Reference for detailed documentation
-
Check out the Architecture Guide to understand the system design
-
Review the other packages for specific cryptosuite implementations