0.3.0 • Published 7 years ago

blockstack-proofs v0.3.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

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 fqdn = "naval.id"
validateProofs(profile, fqdn).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.

0.3.0

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago