blockstack-proofs

    0.3.0 • Public • Published

    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.

    Keywords

    none

    Install

    npm i blockstack-proofs

    DownloadsWeekly Downloads

    1

    Version

    0.3.0

    License

    MIT

    Last publish

    Collaborators

    • ablankstein
    • shea256
    • larrysalibra