zPass docs
  • zPass
    • Introduction
    • Quickstart
    • Background
    • Benefits & Use Cases
    • Technical Foundations
    • System Participants
    • Powered by Aleo
  • Fundamentals
    • Issuer
    • Holder
    • Verifier
    • Off-chain flow
    • On-chain flow
    • Local Execution with WASM
  • ZPass Programs
    • Background
    • Verify offchain program
    • zPass issuance program
    • zPass hiding program
    • zPass invalidate program
    • zPass invalidate hiding program
    • zPass merkle tree size 8 program
  • ZPass SDK
    • Methods References
      • constructor
      • setNewHost
      • issueZPass
      • getZPassRecord
      • proveOnChain
      • proveOffChain
      • verifyOnChain
      • verifyOffChain
      • signCredential
      • initThreadPool
      • createAleoWorker
      • getMerkleRoot
      • getMerkleTree
      • getMerkleProof
      • getLeavesHashes
      • signMerkleRoot
  • Example Usage
    • Step-by-step Guide
Powered by GitBook
On this page
  • Core Operations
  • Credential Management
  • Proof Operations
  • Merkle Tree Operations
  • Worker Management
  • Getting Started
  1. ZPass SDK

Methods References

The ZPass SDK provides a comprehensive set of methods for interacting with ZPass credentials on the Aleo blockchain.

Core Operations

Credential Management

  • signCredential - Sign credential data with a private key

  • issueZPass - Issue a new ZPass credential on-chain

  • getZPassRecord - Retrieve and decrypt a ZPass record from the blockchain

Proof Operations

  • proveOnChain - Generate an on-chain proof for a ZPass credential

  • proveOffChain - Generate an off-chain proof locally

  • verifyOnChain - Verify an on-chain ZPass proof

  • verifyOffChain - Verify an off-chain ZPass proof locally

Merkle Tree Operations

  • getMerkleRoot - Computes the Merkle root from an array of leaves

  • getMerkleTree - Constructs and serializes a Merkle tree from a list of leaves.

  • getMerkleProof - Generates a Merkle proof for a specified leaf index.

  • getLeavesHashes - Hashes an array of raw values to produce leaf nodes.

  • signMerkleRoot - Signs a Merkle root using the account’s private key.

Worker Management

  • createAleoWorker - Create a Web Worker for Aleo computations

  • initThreadPool - Initialize a thread pool for improved performance

Getting Started

For a quick introduction to using the SDK, check out Quickstart.

PreviouszPass merkle tree size 8 programNextconstructor

Last updated 2 months ago