Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blockstack Proofs

npm npm npm Slack

Contents

A library for verifying blockstack profile proofs.

Note: this document uses ES6 in its examples but it is compiled down to Javascript (ES5) and is perfectly compatible with it. If you're using the latter, just make a few adjustments to the examples below (e.g. use "let" instead of "var").

Installation

$ npm install blockstack-proofs

Importing

ES6

import {
  validateProofs
} from 'blockstack-proofs'

Node

var blockstackProofs = require('blockstack-proofs')

Usage

let username = "naval"
validateProofs(profile, username).then((proofs) => {
  console.log(proofs)
})


[
  { "identifier": "naval",
    "proof_url": "https://twitter.com/naval/status/486609266212499456",
    "service": "twitter",
    "valid": true
  },
  {
      "identifier": "navalr",
      "proof_url": "https://facebook.com/navalr/posts/10152190734077261",
      "service": "facebook",
      "valid": true
  },
  {
    "identifier": "navalr",
    "proof_url": "https://gist.github.com/navalr/f31a74054f859ec0ac6a",
    "service": "github",
    "valid": true
  }
]

Testing

Run npm run test to run the test suite.

Testing in a browser

This test will only work with your browser's Cross-Origin Restrictions disabled.

Run npm run compile; npm run browserify before opening the file test.html in your browser.

About

JavaScript libraries for identity, auth, storage and transactions on the Stacks blockchain.

Resources

Stars

975 stars

Watchers

58 watching

Forks

Releases

Used by

Contributors

Languages