Skip to content

bind-protocol/examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

              ━━━╸  888888b. 8888888888b    8888888888b.
            ━━━━━╸  888  "88b  888  8888b   888888  "Y88b
          ━━━━━━━╸  888  .88P  888  88888b  888888    888
        ━━━━━━━━━╸  8888888K.  888  888Y88b 888888    888
      ━━━━━━━━━━━╸  888  "Y88b 888  888 Y88b888888    888
    ━━━━━━━━━━━━━╸  888    888 888  888  Y88888888    888
  ━━━━━━━━━━━━━━━╸  888   d88P 888  888   Y8888888  .d88P
━━━━━━━━━━━━━━━━━╸  8888888P"8888888888    Y8888888888P"

                               P R O T O C O L

Bind Protocol SDK Examples

Working examples for @bind-protocol/sdk.

Getting Started

Create a Bind account

  • Sign up at https://dashboard.bindprotocol.xyz
    • Select Prover account type (Verifer accounts cannot create proofs, only verify shared proofs and issue W2C JWT credentials)
    • Check your email for the confirmation code
  • Navigate to the Policy Marketplace
    • Install one of the demo policies, such as Credit Score Demo
  • Create an API key
    • Copy the key
  • Run the setup script (npm run setup or bash setip.sh) in the example folder for the policy you installed
    • You will be prompted to provide your API key
    • You will also be prompted for a verifer key, you can use the same API key from your Prover account
  • Run the various example steps
  • Once you've generated a proof you will get timeboxes, pre-signed S3 download links for the proof artifacts. You can drag and drop these into the associated file drops in on the Verify Proof page if you wish, or you can navigate to the Prove Jobs page.
  • If you've run the verify step you can see an issued credential on the Credentials page

Prerequisites

  • Node.js 18+
  • A Bind Protocol API key

Examples

Example Description Key concepts
credit-score Credit-score verification with ZK proofs PASS_FAIL policy, prove jobs, proof sharing, credential verification
dimo-risk Vehicle risk band assessment using DIMO telemetry SCORE→BAND policy, rule contributions, insurance underwriting

Quick Start

cd credit-score   # or dimo-risk
npm run setup

The setup script walks you through creating a .env file and installing dependencies. From there, run npm start to execute the full demo flow.

How It Works

Each example follows the same core flow:

sequenceDiagram
    participant User
    participant Bind as Bind Protocol
    participant Source as Data Source<br/>(HTTPS API)
    participant Verifier

    Note over User,Verifier: 1. PROVE

    User->>Bind: Submit policy + private inputs
    Bind->>Source: Fetch data via zkTLS
    Source-->>Bind: Authenticated response
    Bind->>Bind: Execute policy against data
    Bind->>Bind: Generate ZK proof
    Bind-->>User: Verifiable Credential + ZK proof

    Note over User,Verifier: 2. SHARE

    User->>Verifier: Present credential + proof
    Note right of User: Private inputs are never<br/>included in the payload

    Note over User,Verifier: 3. VERIFY

    Verifier->>Verifier: Cryptographically verify ZK proof
    Verifier->>Verifier: Read disclosed output fields
    Verifier-->>User: Accepted ✓

    Note over User,Verifier: Private inputs never leave the User's device
Loading

See each example's README for the full walkthrough.

References

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors