I hereby claim:
- I am dlongley on github.
- I am dlongley (https://keybase.io/dlongley) on keybase.
- I have a public key whose fingerprint is 6A91 B5D1 77F3 6E62 6F07 1E06 CC8A 9C73 4ED9 30CF
To claim this, I am signing this object:
const jsonld = require('jsonld'); | |
const input = { | |
"@context": { | |
"@vocab": "http://vocab.example/" | |
}, | |
"age": { | |
"@value": "27", | |
"@type": "http://www.w3.org/2001/XMLSchema#integer" | |
} |
{ | |
'@context': 'https://w3id.org/veres-one/v1', | |
id: did, | |
// implicitly has a type of LinkedDataObjectCapability itself | |
authentication: [{ | |
type: 'RsaSignatureAuthentication2018', | |
publicKey: { | |
// this key can be used to authenticate as DID entity | |
id: did + '#authn-key-1', | |
type: 'RsaSigningKey2018', |
I hereby claim:
To claim this, I am signing this object:
{ | |
"id": "http://example.com/identity/dave.longley" | |
"assertion": [{ | |
"id": "http://example.net/assertions/bar", | |
"type": "Passport", | |
"endorsement": { | |
"id": "http://example.com/identity/dave.longley", | |
"name": "Dave Longley", | |
"governmentId": "38940954909823" | |
}, |
Change this: | |
function payswarm_hash($obj) { | |
// SHA-1 hash JSON | |
$options = array('format' => 'application/nquads'); | |
return 'urn:sha256:' . hash('sha256', jsonld_normalize($obj, $options)); | |
} | |
To this: |
/* Begin node.js Style */ | |
playground.performAction = function(input, callback) { | |
var processor = new jsonld.JsonLdProcessor(); | |
if(playground.activeTab === 'tab-compacted') { | |
processor.compact(input, function(err, compacted) { | |
if(err) { | |
return callback(err); | |
} |
{ | |
"@context": { | |
"@vocab": "http://schema.org/", | |
"id": "@id", | |
"ref": "@id", | |
"type": "@type" | |
}, | |
"@graph": [ | |
{ | |
"type": "http://schema.org/Event", |
{ | |
"@context": { | |
"@vocab": "http://schema.org/", | |
"id": "@id", | |
"ref": "@id", | |
"type": "@type" | |
} | |
} |