Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

GHG Wallet - Hello World

node v14.20.1
version: 1.0.0
endpointsharetweet
const GHGWALLET = require("ghg-wallet") // Setup some random dummy for certificate const zip = '69256'; const wh = Math.round(Math.random() * 5000 +100); const context = {usage:'Straßenverkehr'}; const app_wallet = await GHGWALLET.ghgwallet(/* Insert a Private Key here if you like*/); // Request Intermediate const intermediate = await app_wallet.app.requestIntermediate(zip,wh,context); const testHash = await app_wallet.tydids.hashMessage(intermediate.payload) console.log('Always validate hashes!'); // and some other values from intermediate. See test cases in Repository if(testHash !== intermediate.hash) throw "Big Failure"; // Request Certificate const certificate = await app_wallet.app.requestCertification(intermediate); console.log(certificate); // You just received a NFT token for your Greenhouse Gas Emissions, a certificate, verifieable presentations,...
Loading…

no comments

    sign in to comment