Labyrinth
WhitepaperResearchGet Private Access
  • 🔭Labyrinth Overview
    • Introduction
    • Why Labyrinth?
    • Who can use Labyrinth?
    • Reward and Fee in Labyrinth
    • Compliance
  • ⭐Use Labyrinth web App
    • How to use the Labyrinth app?
  • 📦Labyrinth SDK
    • ❓What is Labyrinth SDK?
    • ⚒️Quickstart
      • Setup Environment
      • Initialization
      • Private Transactions
      • Balance And Transaction History
      • Protocol Integration
    • 1️⃣Getting Started
    • 🔐Shielded Account
    • 📈Transaction
    • ▶️Initializing SDK
    • 💰Balances And History
    • 📤Sending Transaction
    • 🔌Integrating with DeFi Protocols
    • Labyrinth fee structure
  • Compliance Solution
    • Overview of Compliance
    • How Compliance Works
  • 💻CLI
    • ▶️Running SeDe CLI
  • Technical Implementation
    • Cryptographic Primitives
    • Shielded Account
    • Shielded Address
    • Account Abstraction
    • 🔵Core Architecture
      • 💵Note
      • 🌲Merkle Tree
      • 🔀JoinSplits
      • 🛡️Shielded Transaction
    • 🔄Protocol Interoperability
  • Resource and support
    • Roadmap
    • FAQs
    • Whitepaper
    • Selective De-Anonymization Compliance Paper
  • Contact and socials
    • Labyrinth Website
    • Twitter
    • Discord
    • Contact Us
Powered by GitBook
On this page
  1. Labyrinth SDK

Getting Started

The SDK is a monorepo of multiple packages that are dependencies to the core. These packages are:

  • @zkfi-tech/account: For handling and using the shielded account of a user.

  • @zkfi-tech/babyjubjub: Primitives for all the elliptic curve cryptography operations on the BabyJubJub curve.

  • @zkfi-tech/transaction: For creation and handling of different kinds of transactions in the protocol.

  • @zkfi-tech/zk-prover: For facilitating the generation of zkSNARK proof given transaction details.

  • @zkfi-tech/services: Multiple services utilized in the protocol like address resolver, Merkle tree builder, events fetcher, etc.

  • @zkfi-tech/utils: Common utilities used across the different packages.

  • @zkfi-tech/shared-types: TypeScript types shared across the packages.

  • @zkfi-tech/core: The core that exposes the APIs for private transactions.

  • @zkfi-tech/react(Coming Soon): React components and hooks for easy usage in React apps.

However, you don't need to install all of the packages. Just install @zkfi-tech/core in your project using your package manager,

# pnpm
pnpm add @zkfi-tech/core

# yarn
yarn add @zkfi-tech/core

# npm
npm i @zkfi-tech/core

Now you can simply import and use the SDK in your project,

import { CoreOptions, Core } from '@zkfi-tech/core';

const opts: CoreOptions = { ... }

const zkfi = new Core(opts);

Before we move further into usage, let's clear a couple of concepts in the next sections so you can use it effectively!

PreviousProtocol IntegrationNextShielded Account

Last updated 1 year ago

📦
1️⃣