0.0.18-alpha.3 β€’ Published 6 months ago

@originvault/ov-id-sdk v0.0.18-alpha.3

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

πŸš€ @originvault/ov-id-sdk (in alpha)

Decentralized Identity SDK for OriginVault

@originvault/ov-id-sdk a TypeScript SDK for decentralized identity (DID) management, verifiable credential (VC) signing and verification, and cryptographic commit signing. It enables secure DID operations, private key management, W3C-compliant credential handling, and signed commits/releases with verifiable metadata.

πŸ”Ή Features

  • βœ… DID Creation & Import β†’ Generate or restore did:cheqd and did:vda identities
  • βœ… Secure Key Storage β†’ Encrypt and store private keys securely, retrieve when needed
  • βœ… Primary DID Management β†’ Set and retrieve the default DID for signing credentials
  • βœ… Verifiable Credential Signing & Verification β†’ Issue & verify W3C-compliant credentials
  • βœ… Cryptographic Release Signing β†’ Sign and verify Git software releases using DID credentials
  • βœ… Development Environment Metadata β†’ Capture system & package metadata for auditability
  • βœ… Web5 Trust Layer Integration β†’ Designed for OriginVault’s decentralized identity and verification ecosystem

πŸ“¦ Installation

npm install @originvault/ov-id-sdk

Example Release Cert


πŸš€ Quick Start

1️⃣ Create or Import a DID

import { createDID, importDID } from "@originvault/ov-id-sdk";
import { userStore } from "@originvault/ov-id-sdk";

// βœ… Create a new DID
const { agent } = await userStore.initialize();
const publisherDID = await userStore.getPrimaryDID();
const { did } = await createDID({ method: "cheqd", agent, publisherDID});

console.log("New DID:", did);

// Optional: Set the new DID as the primary DID & customize the alias
const { agent } = await userStore.initialize();
const publisherDID = await userStore.getPrimaryDID();

const { did } = await createDID({ 
      method: "cheqd", 
      agent, 
      publisherDID, 
      isPrimary: true, 
      alias: "did:cheqd:mainnet:1234"
});

console.log("New DID:", did);

// βœ… Import an existing DID from a mnemonic
const importedDID = await importDID("your mnemonic phrase here", "cheqd");
console.log("Imported DID:", importedDID);

2️⃣ Securely Store & Retrieve a Private Key

import { storePrivateKey, retrievePrivateKey } from "@originvault/ov-id-sdk";

// βœ… Store a private key securely
await storePrivateKey("did:cheqd:mainnet:1234", "your-private-key");

// βœ… Retrieve the private key when needed
const privateKey = await retrievePrivateKey("did:cheqd:mainnet:1234");
console.log("Retrieved Private Key:", privateKey);

3️⃣ Set & Get a Primary DID for Signing

import { setPrimaryDID, getPrimaryDID } from "@originvault/ov-id-sdk";

// βœ… Set a primary DID
await setPrimaryDID("did:cheqd:mainnet:1234");

// βœ… Get the primary DID (for signing operations)
const primaryDID = await getPrimaryDID();
console.log("Primary DID:", primaryDID);

4️⃣ Sign & Verify Verifiable Credentials

import { signVC, verifyVC } from "@originvault/ov-id-sdk";

// βœ… Sign a Verifiable Credential
const vcJwt = await signVC("did:cheqd:mainnet:1234", "subject-id");
console.log("Signed VC:", vcJwt);

// βœ… Verify a Verifiable Credential
const isValid = await verifyVC(vcJwt);
console.log("VC Verification:", isValid);

5️⃣ Sign Releases

import { parentStore, signRelease } from "@originvault/ov-id-sdk";

// βœ… Self-sign a release
const { signRelease: signParentRelease } = await parentStore.initialize();
await signRelease(parentStore) || await signParentRelease();

console.log("Latest release signed successfully. Ready to publish.");

7️⃣ Get Development Environment Metadata

import { getEnvironmentMetadata } from "@originvault/ov-id-sdk";

// βœ… Get development environment metadata
const packageJsonPath = path.join(__dirname, '../package.json');
const environment = getEnvironmentMetadata(packageJsonPath);
console.log("Development Environment:", environment);

πŸ›  Configuration

Environment VariableDescription
COMMIT_HASH(Optional) Commit hash to sign
COSMOS_PAYER_SEED(Optional) Cosmos payer seed
CHEQD_RPC_URL(Optional) Cheqd RPC URL
ENCRYPTION_KEY(Optional if key can be shared through the terminal) Encryption key for private keys

πŸ— Built With


πŸ“œ License

@originvault/ov-id-sdk is licensed under MIT.


πŸš€ Next Steps

  • Add multi-user key management
  • Support additional DID methods
  • Provide browser-compatible secure storage

🌟 Contributors & Feedback

If you have suggestions or want to contribute, open an issue or pull request on GitHub.

πŸš€ Now, ov-id-sdk is ready to power decentralized identity in Web5!

0.0.18-alpha.3

6 months ago

0.0.18-alpha.2

6 months ago

0.0.18-alpha.1

6 months ago

0.0.18-alpha.0

6 months ago

0.0.17

8 months ago

0.0.17-alpha.12

8 months ago

0.0.17-alpha.11

8 months ago

0.0.17-alpha.10

8 months ago

0.0.17-alpha.9

8 months ago

0.0.17-alpha.8

8 months ago

0.0.17-alpha.7

8 months ago

0.0.17-alpha.6

8 months ago

0.0.17-alpha.5

8 months ago

0.0.17-alpha.4

8 months ago

0.0.17-alpha.3

8 months ago

0.0.17-alpha.2

8 months ago

0.0.17-alpha.1

8 months ago

0.0.16

8 months ago

0.0.15

8 months ago

0.0.14

8 months ago

0.0.13

8 months ago

0.0.12

9 months ago

0.0.11

9 months ago

0.0.10

9 months ago

0.0.9

9 months ago

0.0.9-alpha.1

9 months ago

0.0.8

9 months ago

0.0.7

9 months ago

0.0.6

9 months ago

0.0.5

9 months ago

0.0.3

9 months ago

0.0.2

9 months ago

0.0.1-alpha.71

9 months ago

0.0.1-alpha.70

9 months ago

0.0.1-alpha.68

9 months ago

0.0.1-alpha.67

9 months ago

0.0.1-alpha.65

9 months ago

0.0.1-alpha.64

9 months ago

0.0.1-alpha.62

9 months ago

0.0.1-alpha.61

9 months ago

0.0.1-alpha.60

9 months ago

0.0.1-alpha.59

9 months ago

0.0.1-alpha.58

9 months ago

0.0.1-alpha.57

9 months ago

0.0.1-alpha.56

9 months ago

0.0.1-alpha.55

9 months ago

0.0.1-alpha.54

9 months ago

0.0.1-alpha.53

9 months ago

0.0.1-alpha.52

9 months ago

0.0.1-alpha.51

9 months ago

0.0.1-alpha.50

9 months ago

0.0.1-alpha.49

9 months ago

0.0.1-alpha.48

9 months ago

0.0.1-alpha.46

9 months ago

0.0.1-alpha.45

9 months ago

0.0.1-alpha.44

9 months ago

0.0.1-alpha.43

9 months ago

0.0.1-alpha.42

9 months ago

0.0.1-alpha.41

9 months ago

0.0.1-alpha.40

9 months ago

0.0.1-alpha.38

9 months ago

0.0.1-alpha.37

9 months ago

0.0.1-alpha.36

9 months ago

0.0.1-alpha.35

9 months ago

0.0.1-alpha.34

9 months ago

0.0.1-alpha.33

9 months ago

0.0.1-alpha.32

9 months ago

0.0.1-alpha.31

9 months ago

0.0.1-alpha.30

9 months ago

0.0.1-alpha.29

9 months ago

0.0.1-alpha.28

9 months ago

0.0.1-alpha.27

9 months ago

0.0.1-alpha.26

9 months ago

0.0.1-alpha.25

9 months ago

0.0.1-alpha.24

9 months ago

0.0.1-alpha.23

9 months ago

0.0.1-alpha.20

9 months ago

0.0.1-alpha.17

9 months ago

0.0.1-alpha.16

9 months ago

0.0.1-alpha.15

9 months ago

0.0.1-alpha.14

9 months ago

0.0.1-alpha.13

9 months ago

0.0.1-alpha.12

9 months ago

0.0.1-alpha.11

9 months ago

0.0.1-alpha.10

9 months ago

0.0.1-alpha.9

9 months ago

0.0.1-alpha.8

9 months ago

0.0.1-alpha.7

9 months ago

0.0.1-alpha.6

9 months ago

0.0.1-alpha.5

9 months ago

0.0.1-alpha.4

9 months ago

0.0.1-alpha.3

9 months ago

0.0.1-alpha.2

9 months ago

0.0.1-alpha.1

9 months ago

0.0.1

9 months ago