Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

blockstack-proofs

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blockstack-proofs

A library for verifying proofs (twitter, github, domains etc) linked to a Blockstack ID

latest
Source
npmnpm
Version
0.3.0
Version published
Weekly downloads
17
750%
Maintainers
2
Weekly downloads
 
Created
Source

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.

FAQs

Package last updated on 15 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts