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
  • Description
  • Parameters
  • Example
  1. ZPass SDK
  2. Methods References

constructor

Description

The ZPassSDK provides an interface for interacting with the ZPass, including program management, account handling, and network communication. It leverages WebAssembly and supports integration with Aleo's ecosystem.

Parameters

  • privateKey (string): The private key for the Aleo account. Must start with APrivateKey1.

  • host (string, optional): The API host for the network client. Defaults to https://api.explorer.provable.com/v1 if not provided.

Example

const sdk = new ZPassSDK({
    privateKey: 'APrivateKey1...',
    host: 'http://localhost:3030'
});
PreviousMethods ReferencesNextsetNewHost

Last updated 4 months ago