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,...