I went through the tutorial and I got this:
brent@brent-desktop:~/payswarm.js/examples$ curl http://listings.dev.payswarm.com/payswarm.js/143f0b8a0ab#asset | json_pp
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
103 3199 0 3199 0 0 11259 0 --:--:-- --:--:-- --:--:-- 25388
{
"@graph" : [
{
"assetContent" : "http://listings.dev.payswarm.com/payswarm.js/143f0b8a0ab",
"creator" : {
"fullName" : "publish-asset-for-sale.js Example"
},
"assetProvider" : "https://dev.payswarm.com/i/brentshambaugh",
"@context" : "https://w3id.org/payswarm/v1",
"signature" : {
"created" : "2014-02-02T03:51:08Z",
"signatureValue" : "bALjKXXuAbj2XnfyivqWQO6Kzm+JOursrmevlpeK0OmZfC06bZqC9AiO4La6FD7ShZlJizc6uxUxgLWgs5EjyuFsz6BkF3ezxv7fmQAa1v3Vr+zrw4VN+XBu8GTGpIkWAv226Wu8ELtrL72YEStL1YOmetoyC0Ec4lLQDunqYkkSscTOjJIl/l0l9NSjsQj3NYYTxS1dHcMs5j4PDLXCe4pkUoCA9FpJna6SMdgto0wbPSniDsmb6p6n3E/ILYd4VMOnB11eczUIZ94xpJ8EJyJdVTpMw7r/6eDZwVlpwtTIIH75ZZhOrIvW+DVMk7gt/ExNwCqk/5PHchb2jWFQMA==",
"creator" : "https://dev.payswarm.com/i/brentshambaugh/keys/1",
"type" : "GraphSignature2012"
},
"id" : "http://listings.dev.payswarm.com/payswarm.js/143f0b8a0ab#asset",
"type" : [
"Asset",
"pto:WebPage"
],
"title" : "Test Asset 143f0b8a0ab",
"listingRestrictions" : {
"validUntil" : "2015-02-02T03:51:08Z",
"payeeRule" : [
{
"payeeGroupPrefix" : [
"authority"
],
"type" : "PayeeRule"
},
{
"payeeRateType" : "FlatAmount",
"payeeGroup" : [
"vendor"
],
"type" : "PayeeRule",
"payeeApplyType" : "ApplyExclusively"
}
],
"payee" : [
{
"payeeRateType" : "Percentage",
"destination" : "https://dev.payswarm.com/i/brentshambaugh/accounts/primary",
"currency" : "USD",
"comment" : "Asset Provider Royalty",
"payeeRate" : "80",
"minimumAmount" : "0.01",
"payeeGroup" : [
"assetProvider"
],
"id" : "http://listings.dev.payswarm.com/payswarm.js/143f0b8a0ab#asset-payee-1",
"type" : "Payee",
"payeeApplyType" : "ApplyInclusively",
"payeeApplyGroup" : [
"vendor"
]
}
],
"validFrom" : "2014-02-02T03:51:08Z"
}
},
{
"licenseHash" : "urn:sha256:d9dcfb7b3ba057df52b99f777747e8fe0fc598a3bb364e3d3eb529f90d58e1b9",
"payeeRule" : [
{
"maximumPayeeRate" : "10",
"payeeRateType" : "Percentage",
"payeeGroupPrefix" : [
"authority"
],
"type" : "PayeeRule",
"payeeApplyType" : "ApplyInclusively"
}
],
"assetHash" : "urn:sha256:02817609f8ffb72502e002defe7a426f8d433802f866ac88fc93c318b9130840",
"payee" : [
{
"payeeRateType" : "FlatAmount",
"destination" : "https://dev.payswarm.com/i/brentshambaugh/accounts/primary",
"currency" : "USD",
"payeeRate" : "0.05",
"comment" : "Payment for selling Test Asset 143f0b8a0ab.",
"payeeGroup" : [
"vendor"
],
"id" : "http://listings.dev.payswarm.com/payswarm.js/143f0b8a0ab#listing-payee-1",
"type" : "Payee",
"payeeApplyType" : "ApplyExclusively"
}
],
"license" : "https://w3id.org/payswarm/licenses/blogging",
"validFrom" : "2014-02-02T03:51:08Z",
"validUntil" : "2015-02-02T03:51:08Z",
"signature" : {
"created" : "2014-02-02T03:51:08Z",
"signatureValue" : "fYb/QH0Ot3NALFtCsRxZR0rCAu76FUKjFwfWzD+PXYj/QtjC8Bcf+0eSlpo/89w/eZbuCqQ5O5SgTHyrhwGUgLFRlwsZYWwG7dgqXBlSh/zIAOf3PQ2IXyvGEQypIwggaJoBUmvRRoE1pJcBdVGXnINu3hTevUJisomPEDV37fi77EV+yihT+FRoQ9si/gXG7PQxD/8PnJ6a+N6Ix9jknRgF1q4xRf9mlBERW8fdP2GbPa2sHcrev4QD1fEUPjBonN+UxM0FEMM9rc7+PkiFribNStrV6F3s66MBF6m7zjkvRqXDuAdL3P2gQpOat9/P5iVmK6loHIHgZPePFoFf/A==",
"creator" : "https://dev.payswarm.com/i/brentshambaugh/keys/1",
"type" : "GraphSignature2012"
},
"@context" : "https://w3id.org/payswarm/v1",
"id" : "http://listings.dev.payswarm.com/payswarm.js/143f0b8a0ab#listing",
"type" : [
"Listing",
"gr:Offering"
],
"asset" : "http://listings.dev.payswarm.com/payswarm.js/143f0b8a0ab#asset",
"vendor" : "https://dev.payswarm.com/i/brentshambaugh"
}
],
"@context" : "https://w3id.org/payswarm/v1"
}
I have questions. In practice where does all of the JSON-LD data come from? Is it generated? How can I change it? If the PaySwarm Authority is involved in its creation, how can I change the Payswarm authority? How do I make sure that what i pay always goes back to the seller? How do I prevent impersonation?
ReplyDeleteHmm...It says this:
ReplyDelete"As explained in the second article, PaySwarm enables products and services to be listed for sale on the Web in a decentralized way. The specification allows content creators and developers to be in control of their own product descriptions and prices in addition to giving them the option to delegate this responsibility to an App Store or large retail website. " (https://hacks.mozilla.org/2013/04/web-payments-with-payswarm-purchasing-part-3-of-3/)