Keeta Network
  • Introduction
    • Start Developing
    • Create Your First Account
    • Send a Transaction
  • Architecture
    • Data Structure
    • Consensus
      • Voting Power
      • Votes
      • Vote Stapling
  • Components
    • Ledger
      • Get Ledger History
    • Blocks
      • Create a Block
      • Operations
        • Send
        • Receive
        • setInfo
        • modifyTokenSupply
        • modifyTokenBalance
        • updatePermissions
    • Nodes
      • Ledger Pruning
    • Accounts
      • Permissions
      • Storage Accounts
        • Create a Storage Account
        • Single-Token Storage Account
    • Key Pairs
      • Storing Key Pairs
    • Certificates
      • Get Certificates
  • Security
    • Digital Signatures
    • Post Quantum Readiness
    • Data Integrity
    • Protection From Common Attacks
  • Scalability
    • Benchmarks and Performance Metrics
    • Seperating Nodes from Hardware
    • Eliminating Mempools
  • Features
    • Identity Profiles
      • Utilizing Identity Profiles
    • Native Tokenization
      • Token Creation
        • Mint Tokens
        • Burn Tokens
        • Set Permissions
      • Built-in Rules Engine
    • Anchors
      • Creating an Anchor
  • Applications
    • Public Network
    • Private Sub Network
  • Industry Comparison
    • Keeta Network's Advantage
    • Resolving the Blockchain Trilemma
  • Guides
    • Tokenizing Real-World Assets
  • Other Documentation
    • Official Links
    • Tokenomics
    • Roadmap
    • Articles
      • Cryptographically Verifiable Identity Sharing with Keeta
Powered by GitBook
On this page
  1. Components
  2. Certificates

Get Certificates

PreviousCertificatesNextDigital Signatures

Last updated 5 hours ago

CtrlK

A certificate is a mechanism for one entity (the issuer) to assert specific attributes about another entity (the subject). Each certificate contains:

  • Subject's Public Key — The Keeta account identifier

  • Certified Attributes — Identity data like full name, email, or address

  • Issuer's Digital Signature — Cryptographic proof of authenticity

Keeta extends X.509 certificates to support both public and sensitive attributes. Sensitive attributes use encryption and cryptographic commitments to enable selective disclosure — subjects can prove specific values to third parties without exposing data to others

Get Certificates via the SDK

To fetch certificates tied to any Keeta account address (read-only), create a client with a null signer and pass the target account in the options:

import * as KeetaNet from '@keetanetwork/keetanet-client';

async function main() {
  // Target address
  const publicKeyString = 'keeta_aabg2lkwuy4gvzr44cniihdmwzinfuunqv4qgsuhbq7jpt4qms622tldjbdexwy';
 const account = await KeetaNet.lib.Account.fromPublicKeyString(publicKeyString);
  // Read-only client bound to target account
  const client = KeetaNet.UserClient.fromNetwork(
    'test',
    null,
    { account }
  );

  try {
    // Fetch and sort certificates by issuance date (newest first)
    const response = await client.getCertificates();
    const sorted = response.sort(
      (a, b) => b.certificate.notBefore.valueOf() - a.certificate.notBefore.valueOf()
    );

    console.log(`Found ${sorted.length} certificates for ${account}`);

    // Display basic info for each certificate
    sorted.forEach(({ certificate }) => {
      console.log('Issuer:', certificate.issuerDN);
      console.log('Subject:', certificate.subjectDN);
      console.log('Valid until:', certificate.notAfter.toISOString());
      console.log('—');
    });
  } finally {
    await client.destroy();
  }
}

main().catch(console.error);