Skip to content

Instantly share code, notes, and snippets.

View pelle's full-sized avatar

Pelle Braendgaard pelle

View GitHub Profile
contract EscrowContract {
address buyer;
address seller;
address agent;
// Each party has an entry here with the timestamp of their acceptance
uint[3] acceptances;
bool active;
@pelle
pelle / package.json
Created April 10, 2017 21:43
Uport Connect - React Native example
{
"name": "exampleapp",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node_modules/react-native/packager/packager.sh --nonPersistent",
"test": "jest",
"build-uport-connect": "node_modules/.bin/derequire node_modules/uport-connect/dist/uport-connect.js >src/vendor/uport-connect.js"
},
"dependencies": {
@pelle
pelle / eth
Last active October 24, 2017 23:17
0x48987918EFa6A28CA966fdb2b14729e12A2e2cA6
import { Credentials } from 'uport'
import { verifyJWT } from 'did-jwt'
async function mySigner (data) {
// bring up signing UX
// sign data with sha256/secpk256k1
// see https://github.com/uport-project/did-jwt#creating-custom-signers-for-integrating-with-hsm
return
}
@pelle
pelle / mainnet-connect.js
Created July 27, 2018 13:47
Main net Uport Connect
import { Connect } from 'uport-connect'
const uport = new Connect('My App', {
network: 'mainnet'
})
{
"@context": "https://www.w3.org/ns/did/v1",
"id": "did:example:123456789abcdefghi",
"authentication": [{
"id": "did:example:123456789abcdefghi#keys-1",
"type": "Ed25519VerificationKey2018",
"controller": "did:example:123456789abcdefghi",
"publicKeyBase58": "H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV"
}],
"service": [{