I went to https://web-payments.org/specs/source/web-commerce/
and looked at Example 4 in section 4.3. I changed @context namespace from http://w3id.org/payments/v1 to https://w3id.org/payswarm/v1 as the first namespace did not resolve in the browser. By observing the payswarm-v1.jsonld file at https://web-payments.org/contexts/payswarm-v1.jsonld (deduced from https://github.com/perma-id/w3id.org/tree/master/webpayments) and https://web-payments.org/vocabs/commerce I was able to make the following conclusions:
{
"@context": "https://w3id.org/payswarm/v1",
"id": "http://www.example.org/car_partOf.owl#",
"type": "Offer",
"payee": [
"id": "http://example.org/outsiders/foaf.rdf#me",
"type": "Payee",
"currency": "USD",
"destination": "http://bshambaugh.org/foaf.rdf#me",
"com:rate": "120.00",
"com:rateType": "FlatAmount",
"comment": "Payment for Wheel of Car through Ripple Network."
}],
"payeeRule": [{
"type": "PayeeRule",
"com:destinationOwnerType": "payment processor",
"com:maximumRate": "10",
"com:rateType": "com:InclusivePercentage"
}],
"asset": "http://www.example.org/car_partOf.owl#",
"assetHash": "urn:sha256:02817609f8ffb72502e002defe7a426f8d433802f866ac88fc93c318b9130840",
"license": "http://www.tapr.org/TAPR_Open_Hardware_License_v1.0.txt",
"licenseHash": "0d8866836917f8ef58af44accb6efab9a10610ad",
"validFrom": "2014-02-02T03:51:08Z",
"signature": {
"type": "GraphSignature2012",
"created": "2014-02-02T03:51:08Z",
"creator": "https://dev.payswarm.com/i/brentshambaugh/keys/1",
"signatureValue": "fYb/QH0Ot3NALFtCsRxZR0rCAu76FUKjFwfWzD+PXYj/QtjC8Bcf+0eSlpo/89w/eZbuCqQ5O5SgTHyrhwGUgLFRlwsZYWwG7dgqXBlSh/zIAOf3PQ2IXyvGEQypIwggaJoBUmvRRoE1pJcBdVGXnINu3hTevUJisomPEDV37fi77EV+yihT+FRoQ9si/gXG7PQxD/8PnJ6a+N6Ix9jknRgF1q4xRf9mlBERW8fdP2GbPa2sHcrev4QD1fEUPjBonN+UxM0FEMM9rc7+PkiFribNStrV6F3s66MBF6m7zjkvRqXDuAdL3P2gQpOat9/P5iVmK6loHIHgZPePFoFf/A=="
The assetHash, licenseHash, signatureValue, and created are taken from an earlier blog post. I could not get my payswarm client to work as the npm package ursa (or something that I do not know about) was causing trouble.
1st question: Should ""http://www.example.org/car_partOf.owl#" for the first id be changed?
ReplyDeleteAdd something like "http://example.com/articles/1#offer" per the web commerce 1.0 spec (https://web-payments.org/specs/source/web-commerce/)
ReplyDelete