stampery / node Goto Github PK
View Code? Open in Web Editor NEWStampery API for NodeJS. Notarize all your data using the blockchain
License: MIT License
Stampery API for NodeJS. Notarize all your data using the blockchain
License: MIT License
Title says it all. Please change from callbacks to Promises.
For stamping a SHA3-512 hash, you only have to make a call to the stamp method of our API, as seen in the examples to the right.
Since not being able to file an issue at your api docs repo, I would like ask if there is a typo in your documentation. Thanks for creating such great tool.
I can't find the stamp
method being used in the example provided. Do you mean the hash
method like stampery.hash
?
The following image shows a screenshot of a portion of your API doc and in the last paragraph, it says stamp
method but there is no stamp
in the example on the rightmost.
You require the stampery/msgpackrpc
package from github. Attempting to use node
in a test pure npm/JS project results in dependency failures.
The msgpackrpc
project does not contain JS code, only iced coffeescript.
~/src/stampery-test$ npm test
> [email protected] test /Users/glenn/src/stampery-test
> node index.js
module.js:339
throw err;
^
Error: Cannot find module 'msgpackrpc'
at Function.Module._resolveFilename (module.js:337:15)
at Function.Module._load (module.js:287:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/Users/glenn/src/stampery-test/node_modules/stampery/index
.js:16:16)
at Object.<anonymous> (/Users/glenn/src/stampery-test/node_modules/stampery/index
.js:390:4)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
npm ERR! Test failed. See above for more details.
I believe Grunt (and possibly other packages) should be a development only dependency. You are pulling this in for anyone that installs this package for use at runtime.
https://github.com/stampery/node/blob/newapi/package.json#L22
yarn add stampery
yields not found modules:
I am not sure if this is an error on my site, but shouldn't yarn
handle the installation of the dependencies?
I have been trying (in good faith) to try to get your API code to work. You have resolved some issues (#1, #2, #3), but it still fails. You really need tests for your code. Here is the latest failure example.
Also, you really should not close issues until it is confirmed with the submitter that the issue is actually resolved.
~/src/stampery-test$ node index.js
/Users/glenn/src/stampery-test/node_modules/stampery/index.js:77
this.clientId = this._hash('md5', this.clientSecret).substring(0, 15);
^
TypeError: this._hash is not a function
at new Stampery (/Users/glenn/src/stampery-test/node_modules/stampery/index.js:77:28)
at Object.<anonymous> (/Users/glenn/src/stampery-test/index.js:6:12)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Function.Module.runMain (module.js:467:10)
at startup (node.js:136:18)
at node.js:963:3
Here is the sample code I am trying to run (copied from the README of this project):
Stampery = require('stampery');
stampery = new Stampery('REDACTED')
stampery.on('proof', function(hash, proof) {
console.log("Received proof for " + hash, proof);
valid = stampery.prove(hash, proof);
console.log('Proof validity:', valid);
});
stampery.on('ready', function() {
stampery.receiveMissedProofs();
stampery.hash('The piano has been drinking', function(hash) {
stampery.stamp(hash);
});
});
My package.json looks like:
{
"name": "stampery-test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "node index.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"stampery": "^3.1.2"
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.