Skip to content

Instantly share code, notes, and snippets.

View mbwhite's full-sized avatar

Matthew B White mbwhite

View GitHub Profile
@mbwhite
mbwhite / metadata.ts
Created May 10, 2019 09:11
Example client app to get data from Hyperledger Fabric Contract
/*
SPDX-License-Identifier: Apache-2.0
*/
/**
* Client application to get the metadata from a deployed Fabric Contract.
*
* Good example of the essentials of connecting a client to Fabric, and how to
* issue a simple transaction. As this is an 'evaluate' transaction (i.e. nothing is
* committed to the ledger) it is also a useful 'ping' transactions. All chaincode's start
@mbwhite
mbwhite / Notes.md
Last active April 19, 2019 08:18
Leon on Raspberry PI
let selected = {};
let ready = (callback) => {
// in case the document is already rendered
if (document.readyState != 'loading') callback();
// modern browsers
else if (document.addEventListener) document.addEventListener('DOMContentLoaded', callback);
// IE <= 8
else document.attachEvent('onreadystatechange', function () {
@mbwhite
mbwhite / Write-up of the starter-kit.md
Last active May 15, 2018 14:20
Write-up of the starter-kit

Notes on the dev experience

Based on the (continued) developing of the Commercial Paper stack

API Notes

toHex(str) {
let hex = '';
for(let i=0;i<str.length;i++) {
let s = str.charCodeAt(i).toString(16);
hex += (s.length===1 ? '0' : '')+ str.charCodeAt(i).toString(16)+ ' ';
}
return hex;
}
@mbwhite
mbwhite / OneName
Created January 15, 2016 12:16
OneName
Verifying that +calanais is my blockchain ID. https://onename.com/calanais