Socket
Socket
Sign inDemoInstall

stampery

Package Overview
Dependencies
72
Maintainers
3
Versions
31
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    stampery

Stampery API for NodeJS. Notarize all your data using the blockchain


Version published
Maintainers
3
Created

Readme

Source

Stampery

NPM Package

NodeJS client library for Stampery API, the blockchain-powered, industrial-scale certification platform.

Seamlessly integrate industrial-scale data certification into your own NodeJS apps. The Stampery API adds a layer of transparency, attribution, accountability and auditability to your applications by connecting them to Stampery's infinitely scalable Blockchain Timestamping Architecture.

Installation

  1. Install stampery into your project and add it as a dependency in your package.json:
npm install --save stampery
  1. Go to the API dashboard, sign up and create a token for your application. It will resemble this:
2f6215c7-ad87-4d6e-bf9e-e9f07aa35f1a

Usage

Stampery = require('stampery');

// Sign up and get your secret token at https://api-dashboard.stampery.com
// Please use 'beta' for testing and 'prod' for production
stampery = new Stampery('yourSecretToken', 'prod')

stampery.on('proof', function(hash, proof) {
  console.log("Received proof for " + hash, proof);
  stampery.prove(hash, proof, function (valid) {
    console.log('Proof validity:', valid);
  });
});

stampery.on('ready', function() {
  stampery.receiveMissedProofs();
  stampery.hash('The piano has been drinking', function(hash) {
    stampery.stamp(hash);
  });
});

Here is the same example, just using our beloved IcedCoffeeScript:

Stampery = require 'stampery'

# Sign up and get your secret token at https://api-dashboard.stampery.com
# Please use 'beta' for testing and 'prod' for production
stampery = new Stampery 'your-secret-token', 'prod'

stampery.on 'proof', (hash, proof) ->
  console.log "Received proof for #{hash}", proof
  await stampery.prove hash, proof, defer valid
  console.log 'Proof validity:', valid

stampery.on 'ready', ->
  stampery.receiveMissedProofs()
  await stampery.hash 'The piano has been drinking', defer hash
  stampery.stamp hash

Client libraries for other platforms

Feedback

Ping us at support@stampery.com and we will more than happy to help you! 😃

License

Code released under the MIT license.

Copyright 2015-2016 Stampery, Inc.

Keywords

FAQs

Last updated on 14 Dec 2016

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc