Abstract

This document describes a number of classes and properties that can be used to express purchase requests, digital receipts, rentals, contracts, licenses and payment-based exchanges on the Web. These include things such as payments for blog articles, video rentals, electronic magazine subscriptions, data vending, provisioning of Web services under legally enforceable contracts, and other novel business models that are powered by the universal payment standard for the Web. This vocabulary is a part of the W3C Web Payments Community Group work.

Status of This Document

This specification was published by the Web Payments Community Group. It is not a W3C Standard nor is it on the W3C Standards Track. Please note that under the W3C Community Contributor License Agreement (CLA) there is a limited opt-out and other conditions apply. Learn more about W3C Community and Business Groups.

There are a number of ways that you may participate in the development of this specification:

Table of Contents

1. Classes

1.1 Asset

An asset describes a particular item that is provided as a part of a commercial transaction. It is usually an item that can be accessed or acquired on the basis of a sale or rental under the terms of a particular license. Examples of assets include web pages, music files, video streams, use of virtual machines by the hour, 3D printer files for on-demand manufacturing, radio spectrum and many other items that are capable of being transacted.

Status
unstable
Parent Class
owl:Thing
Properties
dc:title, dc:creator, ps:contentUrl, ps:assetProvider, ps:authority, ps:validFrom, ps:validUntil, sec:signature

The following example describes a web page asset with the title "PaySwarm in Practice - Full Article #1". The article was created by "Digital Bazaar, Inc." and the information in the asset is valid from November 28th, 2010 to November 28th, 2011. The asset is digitally signed by the person providing it and thus can be cached, stored and then presented to someone else in a manner that is verifiable by the receiving party.

Example 1
{
   "@context": "https://w3id.org/payswarm/v1",
   "id": "https://example.org/articles/1#asset",
   "type": ["Asset", "WebPage"],
   "title": "PaySwarm in Practice",
   "creator": 
   {
      "fullName": "Digital Bazaar, Inc.",
   }
   "assetContent": "https://example.org/articles/1",
   "assetProvider": "https://example.org/person/john-doe#me",
   "validFrom": "2010-11-28T00:00:00Z",
   "validUntil": "2011-11-28T00:00:00Z"
   "signature": 
   {
       "type": "GraphSignature2012",
       "created": "2010-11-27T01:44:52Z",
       "creator": "https://payswarm.example.com/people/john-doe#key-5",
       "signatureValue": "OWM3YzI4OGQzNGVkMzV...IyZTk2MzQzNmExMgo="
   }
}
        

1.2 Contract

A contract is the result of a commercial transaction in PaySwarm and contains information such as the Listing, the Asset that was purchased, the parties involved in the transaction, the License outlining the rights to the Asset, and payment information associated with the transaction.

Status
unstable
Parent Class
com:Transaction
Properties
com:amount, com:currency, com:date, com:payee, com:transfer, dc:created, ps:asset, ps:assetProvider, ps:license, ps:listing, signature

The following example describes a purchase that occurred on April 25th, 2013 for a Web-based recipe for "Brown Sugar Fudge". The article was authored and listed for sale by 'chef' and a personal use license was acquired by Manu, who may now peruse the article.

Example 2
{
  "@context": "https://w3id.org/payswarm/v1",
  "id": "https://dev.payswarm.com/transactions/1.3.f4.3",
  "type": ["Transaction", "Contract"],
  "amount": "0.05",
  "currency": "USD",
  "created": "2013-04-25T02:20:26Z",
  "authorized": "2013-04-25T02:20:26Z",
  "settled": "2013-04-25T02:20:26Z",
  "asset": {
    "id": "http://recipes.payswarm.com/?p=10614#asset",
    "type": ["Asset", "pto:WebPage"],
    "creator": {
      "fullName": "chef"
    },
    "title": "Brown Sugar Fudge",
    "assetContent": "http://recipes.payswarm.com/?p=10614",
    "assetProvider": "https://dev.payswarm.com/i/wordpress-recipes",
    "listingRestrictions": {
      "vendor": "https://dev.payswarm.com/i/wordpress-recipes"
    },
    "signature": {
      "type": "GraphSignature2012",
      "created": "2013-04-25T00:37:16+00:00",
      "creator": "https://dev.payswarm.com/i/wordpress-recipes/keys/1",
      "signatureValue": "O9EGWL... s758A=="
    }
  },
  "assetProvider": {
    "id": "https://dev.payswarm.com/i/wordpress-recipes",
    "type": "VendorIdentity",
    "label": "wordpress-recipes",
    "website": "http://recipes.payswarm.com/",
    "description": "PaySwarm demonstration recipe blog - selling delicious meal recipes since 2012."
  },
  "license": {
    "id": "https://w3id.org/payswarm/licenses/blogging",
    "type": "License",
    "licenseTemplate": "Personal Use License for Articles\n\n... "
  },
  "listing": {
    "id": "http://recipes.payswarm.com/?p=10614#listing",
    "type": ["Listing", "gr:Offering"],
    "payee": [
      {
        "id": "http://recipes.payswarm.com/?p=10614#listing-payee",
        "type": "Payee",
        "comment": "Payment for Brown Sugar Fudge by chef.",
        "currency": "USD",
        "destination": "https://dev.payswarm.com/i/wordpress-recipes/accounts/blogging",
        "payeeApplyType": "ApplyExclusively",
        "payeeGroup": [ "vendor" ],
        "payeeRate": "0.0500000",
        "payeeRateType": "FlatAmount"
      }
    ],
    "payeeRule": [
      {
        "type": "PayeeRule",
        "maximumPayeeRate": "10.0000000",
        "payeeApplyType": "ApplyInclusively",
        "payeeGroupPrefix": [ "authority" ],
        "payeeRateType": "Percentage"
      }
    ],
    "vendor": "https://dev.payswarm.com/i/wordpress-recipes",
    "asset": "http://recipes.payswarm.com/?p=10614#asset",
    "assetHash": "urn:sha256:80cfb6bc234b3c3debb00c696b1c4eb0fa66946cbec1ce01ea824f5b634c3efb",
    "license": "https://w3id.org/payswarm/licenses/blogging",
    "licenseHash": "urn:sha256:d9dcfb7b3ba057df52b99f777747e8fe0fc598a3bb364e3d3eb529f90d58e1b9",
    "validFrom": "2013-04-25T00:37:16+00:00",
    "validUntil": "2013-04-26T00:37:16+00:00",
    "signature": {
      "type": "GraphSignature2012",
      "created": "2013-04-25T00:37:16+00:00",
      "creator": "https://dev.payswarm.com/i/wordpress-recipes/keys/1",
      "signatureValue": "TpwG9... S2Q=="
    }
  },
  "listingHash": "urn:sha256:152e3102e92eb64b2a40aa613caa0d46da732b69d6865ce25c5d9f5c2228a291",
  "payee": {
    "type": "Payee",
    "destination": "https://dev.payswarm.com/i/authority/accounts/main",
    "currency": "USD",
    "payeeGroup": [ "authority" ],
    "payeeRate": "2.00",
    "payeeRateType": "Percentage",
    "payeeApplyType": "ApplyInclusively",
    "maximumAmount": "10.00",
    "comment": "PaySwarm Sandbox Authority Processing"
  },
  "referenceId": "payswarm.https://dev.payswarm.com/transactions/1.3.f4.3",
  "transfer": [
    {
      "type": "Transfer",
      "source": "https://dev.payswarm.com/i/manu/accounts/primary",
      "destination": "https://dev.payswarm.com/i/wordpress-recipes/accounts/blogging",
      "amount": "0.0490000000",
      "currency": "USD",
      "comment": "Payment for Brown Sugar Fudge by chef."
    },
    {
      "type": "Transfer",
      "source": "https://dev.payswarm.com/i/manu/accounts/primary",
      "destination": "https://dev.payswarm.com/i/authority/accounts/main",
      "amount": "0.0010000000",
      "currency": "USD",
      "comment": "PaySwarm Sandbox Authority Processing"
    }
  ],
  "vendor": {
    "id": "https://dev.payswarm.com/i/wordpress-recipes",
    "type": "VendorIdentity",
    "label": "wordpress-recipes",
    "website": "http://recipes.payswarm.com/",
    "description": "PaySwarm demonstration recipe blog - selling delicious meal recipes since 2012."
  }
}
        

1.3 Data

The Data class is typically found as a decorator class for an Asset. That is, the Data class is usually found as an rdf:type descriptor attached to an Asset. Data is used to specify that the asset is a pre-recorded or live stream of bytes.

Status
unstable
Parent Class
owl:Thing
Properties
dc:title, dc:creator, ps:contentUrl, ps:assetProvider, ps:authority, ps:validFrom, ps:validUntil, signature

The following example shows an Data Asset for a byte stream for sale that is a video with the title "Learning How Cells Divide" by John Doe.

Example 3
{
   "id": "http://example.com/videos#cell-division",
   "type": ["Asset", "Data"],
   "creator": 
   {
      "fullName": "John Doe"
   },
   "title": "Learning How Cells Divide",
   "assetProvider": "https://payswarm.example.com/i/john",
   "assetContent": "http://example.com/video/cell-division.mpg",
   "signature": 
   {
      "type": "GraphSignature2012",
      "created": "2011-03-12T00:00:00Z",
      "creator": "https://payswarm.example.com/i/john/keys/2",
      "signatureValue": "ne56Qsc5IXuLEGuq+Nic8="
   }
}
        

1.4 License

A license is a legal description of a licensee's rights to a particular Asset. Licenses are usually included as a part of a contract to express what a buyer may do with the asset that has been purchased.

Status
unstable
Parent Class
owl:Thing
Properties
dc:format, ps:licenseTemplate, ps:licenseTerms

The following example describes an overly-simplified personal use license.

Example 4
{
   "@context": "https://w3id.org/payswarm/v1",
   "id": "http://payswarm.example.com/licenses/personal-use",
   "type": "License",
   "format": "text/html",
   "licenseTemplate": "This personal use license allows you to save the 
      purchased item onto any device that you own for your personal enjoyment
      and make up to <span property=\"ex:physicalCopies\" /> printed
      copies of the work for personal use."
   "licenseTerms": 
   {
      "ex:physicalCopies": 5
   }
}
        

1.5 Listing

A Listing describes the combination of an Asset that is for sale under a specific License and a set of payment terms that must be fulfilled in order to access the Asset. Listings are often published on websites that sell assets via PaySwarm as a way to express wares for sale in a decentralized manner.

Status
unstable
Parent Class
owl:Thing
Properties
com:payee, com:payeeRule, ps:asset, ps:assetHash, ps:license, ps:licenseHash, ps:signature, ps:validFrom, ps:validUntil

The following example describes an asset for sale for $0.05 USD under a license that covers basic blogging rights. The offer is valid from April 25th 2013 to April 26th 2013. The only restriction on additional payees is that the PaySwarm Authority (the organization processing the payment) may only take a maximum of 10% of the final sale price to cover their fees.

Example 5
{
  "id": "http://recipes.payswarm.com/?p=10614#listing",
  "type": ["Listing", "gr:Offering"],
  "payee": [
    {
      "id": "http://recipes.payswarm.com/?p=10614#listing-payee",
      "type": "Payee",
      "comment": "Payment for Brown Sugar Fudge by chef.",
      "currency": "USD",
      "destination": "https://dev.payswarm.com/i/wordpress-recipes/accounts/blogging",
      "payeeApplyType": "ApplyExclusively",
      "payeeGroup": [ "vendor" ],
      "payeeRate": "0.0500000",
      "payeeRateType": "FlatAmount"
    }
  ],
  "payeeRule": [
    {
      "type": "PayeeRule",
      "maximumPayeeRate": "10.0000000",
      "payeeApplyType": "ApplyInclusively",
      "payeeGroupPrefix": [ "authority" ],
      "payeeRateType": "Percentage"
    }
  ],
  "vendor": "https://dev.payswarm.com/i/wordpress-recipes",
  "asset": "http://recipes.payswarm.com/?p=10614#asset",
  "assetHash": "urn:sha256:80cfb6bc234b3c3debb00c696b1c4eb0fa66946cbec1ce01ea824f5b634c3efb",
  "license": "https://w3id.org/payswarm/licenses/blogging",
  "licenseHash": "urn:sha256:d9dcfb7b3ba057df52b99f777747e8fe0fc598a3bb364e3d3eb529f90d58e1b9",
  "validFrom": "2013-04-25T00:37:16+00:00",
  "validUntil": "2013-04-26T00:37:16+00:00",
  "signature": {
    "type": "GraphSignature2012",
    "created": "2013-04-25T00:37:16+00:00",
    "creator": "https://dev.payswarm.com/i/wordpress-recipes/keys/1",
    "signatureValue": "TpwG9... S2Q=="
  }
}
        

2. Constants

2.1 NoAdditionalPayees

The NoAdditionalPayees constant is used as a com:rateType value in a com:PayeeRule object to specify that no additional payees are allowed for the associated item. This is typically used when an asset owner does not want anyone else on the network to provide value-added services on top of their asset.

Status
unstable
Domain
com:rateType

The following example specifies that no additional non-PaySwarm Authority payees can be added to the list of payees as a result of the sale of an asset or service.

Example 6
{
    "@context": "https://w3id.org/payswarm/v1",
    "type": "PayeeRule",
    "payeeRateType": "NoAdditionalPayees",
}
        

3. Properties

3.1 asset

An asset property is used to specify an Asset for sale via PaySwarm. The asset property is typically found in a Listing or a Contract.

Status
unstable
Domain
com:Listing, com:Contract, owl:Thing
Range
com:Asset

The following example shows a portion of a contract containing the description of an Asset that was a part of the purchase.

Example 7
{
   "@context": "https://w3id.org/payswarm/v1",
   "id": "http://payswarm.example.com/contracts/28394729347",
   "type": ["Transaction", "Contract"],
   "amount": "0.05",
   "currency": "USD",
   "created": "2011-03-02T03:00:53Z",
   ...
   "asset": 
   {
     "id": "http://recipes.payswarm.com/?p=10614#asset",
     "type": ["Asset", "pto:WebPage"],
     "creator": {
       "fullName": "chef"
     },
     "title": "Brown Sugar Fudge",
     "assetContent": "http://recipes.payswarm.com/?p=10614",
     "assetProvider": "https://dev.payswarm.com/i/wordpress-recipes",
     "listingRestrictions": {
       "vendor": "https://dev.payswarm.com/i/wordpress-recipes"
     },
     "signature": {
       "type": "GraphSignature2012",
       "created": "2013-04-25T00:37:16+00:00",
       "creator": "https://dev.payswarm.com/i/wordpress-recipes/keys/1",
       "signatureValue": "O9EGWL... s758A=="
     }
   },
   "assetAcquirer": "https://payswarm.example.com/i/jane",
   ...
}
        

3.2 assetAcquirer

An asset acquirer is an entity that is in the process of acquiring or has acquired the rights to a particular asset via a PaySwarm Contract.

Status
unstable
Domain
com:Contract, owl:Thing
Range
xsd:anyURI

The following example shows a contract that specifies a ps:assetAcquirer with a value of https://payswarm.example.com/i/jane.

Example 8
{
   "@context": "https://w3id.org/payswarm/v1",
   "id": "http://payswarm.example.com/contracts/28394729347",
   "type": ["Transaction", "Contract"],
   "amount": "0.05",
   "currency": "USD",
   "created": "2011-03-02T03:00:53Z",
   ...
   "assetAcquirer": "https://payswarm.example.com/i/jane",
   ...
}
        

3.3 assetHash

An asset hash is used as a unique identifier for a graph of asset information. These hashes exist so that the asset provider can refer to the asset by the hash instead of having to re-transmit the entire asset when communicating with a PaySwarm Authority. The hashes also provide a checksum on asset information such that both the asset provider and PaySwarm Authority know that each is talking about the same asset when the hash is used in Web service calls. Asset hash information MAY be used to make Asset caching decisions by a PaySwarm Authority. The asset hash is generated by following this algorithm:

  1. Encode the Asset sub-graph in JSON-LD normalized form.
  2. Generate a SHA-1 on the JSON-LD normalized form.

When generating an asset hash, the following features MUST NOT exist in the Asset graph:

Status
unstable
Domain
ps:Asset
Range
xsd:string

The following example describes a listing that contains information about an ps:Asset as well as the ps:assetHash.

Example 9
{
    "@context": "https://w3id.org/payswarm/v1",
    "id": "https://example.org/articles/1#listing",
    "type": "Listing",
    "asset":
    {
        "id": "https://example.org/articles/1#asset",
        "type": ["Asset", "WebPage"],
        "title": "PaySwarm in Practice - Full Article #1",
        "creator": 
        {
           "fullName": "Digital Bazaar, Inc.",
        }
        "assetContent": "https://example.org/articles/1",
        "assetProvider": "https://example.org/person/john-doe#me",
        "validFrom": "2010-11-28T00:00:00Z",
        "validUntil": "2011-11-28T00:00:00Z"
        "signature": 
        {
            "type": "GraphSignature2012",
            "created": "2010-11-27T01:44:52Z",
            "creator": "https://payswarm.example.com/people/john-doe#key-5",
            "signatureValue": "OWM3YzI4OGQzNGVkMzVmMmQ3ODIyZDY3NjI4NTIyZTk2MzQzNmExMgo="
        }
    },
    "assetHash": "37b082b5c45a31d1c4b82da667f74e9b6686a95a"
}
        

3.4 assetProvider

An asset provider is the entity providing an asset for sale. Typically, the assetProvider is the legal owner of the asset that is being listed for sale. Ownership of an asset can manifest in a variety of different forms. Copyright ownership, physical ownership, and sub-leased property or services are just a few of the types of ownership that allow one to be listed as a ps:assetProvider.

Status
unstable
Domain
ps:Listing
Range
xsd:anyURI

The following example describes a ps:Listing that specifies a ps:assetProvider with a value of https://payswarm.example.com/i/bob.

Example 10
{
   "@context": "https://w3id.org/payswarm/v1",
   "id": "http://example.com/articles/1#listing",
   "type": ["Offering", "Listing"],
   "payee": 
   [
      {
         "id": "http://example.com/articles/1#listing-payee",
         "type": "Payee",
         "currency": "USD",
         "destination": "https://payswarm.example.com/i/bob/accounts/primary",
         "rate": "0.05",
         "payeeRateType": "FlatAmount",
         "comment": "Payment for PaySwarm in Practice by Digital Bazaar."
      }
   ],
   "payeeRule": 
   [
      {
         "type": "PayeeRule",
         "destinationOwnerType": "Authority",
         "maximumRate": "10",
         "payeeRateType": "InclusivePercentage"
      }
   ],
   "asset": "http://example.com/articles/1#asset",
   "assetHash": "14618b56ff597a2fed560db9aa0610fe442106a4",
   "assetProvider": "https://payswarm.example.com/i/bob",
   "license": "http://payswarm.example.com/licenses/blogging",
   "licenseHash": "0d8866836917f8ef58af44accb6efab9a10610ad",
   "signature": 
   {
      "type": "ps:JsonLdSignature",
      "created": "2011-03-02T00:00:00Z",
      "creator": "https://payswarm.example.com/i/bob/keys/4",
      "signatureValue": "KXtwA5kXZBJzj1rkPMJmGDROjM+fpi2cJIB+Xqf10="
   },
   "validFrom": "2011-03-02T00:00:00+0000",
   "validUntil": "2011-03-03T00:00:00+0000"
}
        

3.5 authority

An authority is used to specify a PaySwarm authority that should be used to process contracts containing a particular Listing or Asset.

Status
unstable
Domain
ps:Listing, ps:Asset, owl:Thing
Range
xsd:anyURI

The following example describes an asset that specifies that any purchase of the asset should be performed via the https://payswarm.example.com/client-config PaySwarm Authority.

Example 11
{
   "@context": "https://w3id.org/payswarm/v1",
   "id": "http://example.com/videos#cell-division",
   "type": ["Asset", "Data"],
   "creator": 
   {
      "fullName": "John Doe"
   },
   "title": "Learning How Cells Divide",
   "assetProvider": "https://payswarm.example.com/i/john",
   "assetContent": "http://example.com/video/cell-division.mpg",
   "signature": 
   {
      "type": "GraphSignature2012",
      "created": "2011-03-12T00:00:00Z",
      "creator": "https://payswarm.example.com/i/john/keys/2",
      "signatureValue": "ne56Qsc5IXuLEGuq+Nic8="
   }
}
        

3.6 contentUrl

The content URL is used to specify the viewing or the download location for a particular piece of content. The content URL is usually specified along-side the asset in the event that the asset description is expressed in a place that is different from the location of the asset.

Status
unstable
Domain
com:Asset, owl:Thing
Range
xsd:anyURI

The following example demonstrates an asset that has a content URL specified as https://example.org/articles/1.

Example 12
{
   "@context": "https://w3id.org/payswarm/v1",
   "id": "https://example.org/articles/1#asset",
   "type": ["Asset", "WebPage"],
   "title": "PaySwarm in Practice",
   "creator": 
   {
      "fullName": "Digital Bazaar, Inc.",
   }
   "assetContent": "https://example.org/articles/1",
   "assetProvider": "https://example.org/person/john-doe#me",
   "validFrom": "2010-11-28T00:00:00Z",
   "validUntil": "2011-11-28T00:00:00Z"
   "signature": 
   {
       "type": "GraphSignature2012",
       "created": "2010-11-27T01:44:52Z",
       "creator": "https://payswarm.example.com/people/john-doe#key-5",
       "signatureValue": "OWM3YzI4OGQzNGVkMzVmMmQ3ODIyZDY3NjI4NTIyZTk2MzQzNmExMgo="
   }
}
        

3.7 licenseTemplate

The license template is used to express the boilerplate language in a license. The template is usually expressed in HTML and contains portions of markup that are replaceable via software. For example, a section of the ps:licenseTemplate may contain the following markup: <span property="ex:physicalCopies" />. The previous code snippet would be expanded when the license is displayed. For instance, the number of times a document may be physically reproduced could be placed into the span element, like so: <span property="ex:physicalCopies">5</span>. The ps:licenseTemplate is frequently used in combination with the ps:licenseTerms property.

Status
unstable
Domain
ps:License, owl:Thing
Range
xsd:string

The following example shows how a license template is used in conjunction with a set of license terms.

Example 13
{
   "@context": "https://w3id.org/payswarm/v1",
   "id": "http://payswarm.example.com/licenses/personal-use",
   "type": "ps:License",
   "format": "text/html",
   "licenseTemplate": "This personal use license allows you to save the 
      purchased item onto any device that you own for your personal enjoyment
      and make up to <span property=\"ex:physicalCopies\" /> printed
      copies of the work for personal use.",
   "licenseTerms": 
   {
      "ex:physicalCopies": 5
   }
}
        

3.8 licenseTerms

The license terms are used in conjunction with the ps:licenseTemplate to create the final license that is associated with a PaySwarm contract. The license term values are used to insert specific values into the license template.

Status
unstable
Domain
ps:License
Range
xsd:string

The example below specifies a license with a single term that limits the number of printed physical copies of a work to 5.

Example 14
{
   "@context": "https://w3id.org/payswarm/v1",
   "id": "http://payswarm.example.com/licenses/personal-use",
   "type": "License",
   "format": "text/html",
   "licenseTemplate": "This personal use license allows you to save the 
      purchased item onto any device that you own for your personal enjoyment
      and make up to <span property=\"ex:physicalCopies\" /> printed
      copies of the work for personal use."
   "licenseTerms": 
   {
      "ex:physicalCopies": 5
   }
}
        

3.9 license

The license specifies a URL where the rights to an asset are described. Licenses are typically included in a Listing to express the rights that are conferred upon purchase. Licenses are also included in contracts to express the rights that govern the access and use of the asset. The value of this property is typically a URL which expresses a ps:licenseTemplate using HTML+RDFa or other human-readable semantic web markup language.

Status
unstable
Domain
ps:Listing, ps:Contract, owl:Thing
Range
xsd:anyURI

The following contract snippet below demonstrates how a license is expressed in a completed contract.

Example 15
{
   "@context": "https://w3id.org/payswarm/v1",
   "id": "http://payswarm.example.com/contracts/982378927357",
   "type": ["Transaction", "Contract"],
   "asset": { ... },
   "license":
   {
      "id": "http://payswarm.example.com/licenses/personal-use",
      "type": "ps:License",
      "format": "text/html",
      "licenseTemplate": "This personal use license allows you to save the 
         purchased item onto any device that you own for your personal enjoyment
         and make up to <span property=\"ex:physicalCopies\" /> printed
         copies of the work for personal use."
      "licenseTerms": 
      {
         "ex:physicalCopies": 5
      }
   }
   ...
}
        

3.10 licenseHash

The licenseHash is a cryptographic hashing of the contents of a license. Specifically, it is a hashing of the ps:licenseTemplate using the SHA-1 hashing algorithm.

Status
unstable
Domain
ps:Listing, ps:Contract
Range
xsd:string

The following listing snippet example below shows a license URL coupled with a licenseHash. A software agent working with the information may depend on a cache to determine whether or not the information associated with the ps:license would need to be fetched from the Web based on the value of the license hash.

Example 16
{
   "@context": "https://w3id.org/payswarm/v1",
   "id": "http://example.com/articles/1#listing",
   "type": ["Offering", "Listing"],
   "license": "http://payswarm.example.com/licenses/blogging",
   "licenseHash": "0d8866836917f8ef58af44accb6efab9a10610ad"
   ...
}
        

3.11 listing

A listing encapsulates an offer for sale. It typically includes an Asset and a License that governs the post-purchase use of that asset.

Status
unstable
Domain
ps:Contract, owl:Thing
Range
ps:Listing

The following contract snippet shows the portion of the contract that contains the listing information.

Example 17
{
   "@context": "https://w3id.org/payswarm/v1",
   "id": "http://payswarm.example.com/contracts/28394729347",
   "type": ["Transaction", "Contract"],
   "amount": "0.05",
   "currency": "USD",
   "created": "2011-03-02T03:00:53Z",
   ...
   "listing": 
   {
      "id": "http://example.com/articles/1#listing",
      "type": ["Offering", "Listing"],
      "payee": 
      [
         {
            "id": "http://example.com/articles/1#listing-payee",
            "type": "Payee",
            "currency": "USD",
            "destination": "https://payswarm.example.com/i/bob/accounts/primary",
            "rate": "0.05",
            "payeeRateType": "FlatAmount",
            "comment": "Payment for PaySwarm in Practice by Digital Bazaar."
         }
      ],
      "payeeRule": 
      [
         {
            "type": "PayeeRule",
            "destinationOwnerType": "Authority",
            "maximumRate": "10",
            "payeeRateType": "InclusivePercentage"
         }
      ],
      "asset": "http://example.com/articles/1#asset",
      "assetHash": "14618b56ff597a2fed560db9aa0610fe442106a4",
      "license": "http://payswarm.example.com/licenses/blogging",
      "licenseHash": "0d8866836917f8ef58af44accb6efab9a10610ad",
      "signature": 
      {
         "type": "GraphSignature2012",
         "created": "2011-03-02T00:00:00Z",
         "creator": "https://payswarm.example.com/i/bob/keys/4",
         "signatureValue": "KXtwA5kXZBJzj1rkPMJmGDROjM+fpi2cJIB+Xqf10="
      },
      "validFrom": "2011-03-02T00:00:00+0000",
      "validUntil": "2011-03-03T00:00:00+0000"
   },
   "listingHash": "1acbd23c3a7d8827270a959a2760f7c4ded98022",
   ...
}
        

3.12 listingHash

A listing hash is a checksum for the contents of a listing. Technically, it is a cryptographic hash of the graph information expressed in JSON-LD. To calculate a listing hash, the entire ps:listing sub-tree without any ps:signature values is normalized via standard JSON-LD normalization rules and then the SHA-1 hashing algorithm is performed on the result.

Status
unstable
Domain
ps:Contract, owl:Thing
Range
xsd:string

The contract snippet below shows the listing hash that is associated with the listing. A software agent working with the information may depend on a cache to determine whether or not the information associated with the ps:listing would need to be fetched from the Web based on the value of the listing hash.

Example 18
{
   "@context": "https://w3id.org/payswarm/v1",
   "id": "http://payswarm.example.com/contracts/583272397238",
   "type": ["Transaction", "Contract"],
   ...
   "listing": "http://example.com/articles/1#listing",
   "listingHash": "1acbd23c3a7d8827270a959a2760f7c4ded98022",
   ...
}
        

3.13 owner

An owner is typically an entity that fully or partially has rights or control over a particular resource. This property is most often used to express that a particular entity owns a public key, but may be used for other resources such as claiming ownership over a financial com:Account resource.

Status
unstable
Domain
com:Account, owl:Thing
Range
xsd:anyURI

The following example demonstrates the expression of a public key belonging to the identity https://payswarm.example.com/i/bob.

Example 19
{
   "@context": "https://w3id.org/payswarm/v1",
   "id": "https://payswarm.example.com/i/bob/keys/1",
   "type": "Key",
   "owner": "https://payswarm.example.com/i/bob",
   "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBG0BA...OClDQAB\n-----END PUBLIC KEY-----\n"
}
        

3.14 validFrom

The valid from property specifies the point at which a piece of information becomes reliable. It is often used to specify when Assets or Listings start their validity period. The information can be used to determine caching metrics.

Status
unstable
Domain
ps:Listing, owl:Thing
Range
xsd:dateTime

The following example is of an Asset that has a validity period starting at midnight on November 28th, 2010.

Example 20
{
   "@context": "https://w3id.org/payswarm/v1",
   "id": "https://example.org/articles/1#asset",
   "type": ["Asset", "WebPage"],
   "title": "PaySwarm in Practice",
   "creator": 
   {
      "fullName": "Digital Bazaar, Inc.",
   }
   "assetContent": "https://example.org/articles/1",
   "assetProvider": "https://example.org/person/john-doe#me",
   "validFrom": "2010-11-28T00:00:00Z",
   "validUntil": "2011-11-28T00:00:00Z"
   "signature": 
   {
       "type": "GraphSignature2012",
       "created": "2010-11-27T01:44:52Z",
       "creator": "https://payswarm.example.com/people/john-doe#key-5",
       "signatureValue": "OWM3YzI4OGQzNGVkMzVmMmQ3ODIyZDY3NjI4NTIyZTk2MzQzNmExMgo="
   }
}
        

3.15 validUntil

The valid until property specifies the point at which a piece of information ceases to be reliable. It is often used to specify when Assets or Listings expire. The information can be used to determine caching metrics.

Status
unstable
Domain
ps:Listing, owl:Thing
Range
xsd:dateTime

The following example is of an Asset that has a validity period ending at midnight on November 28th, 2011.

Example 21
{
   "@context": "https://w3id.org/payswarm/v1",
   "id": "https://example.org/articles/1#asset",
   "type": ["Asset", "WebPage"],
   "title": "PaySwarm in Practice",
   "creator": 
   {
      "fullName": "Digital Bazaar, Inc.",
   }
   "assetContent": "https://example.org/articles/1",
   "assetProvider": "https://example.org/person/john-doe#me",
   "validFrom": "2010-11-28T00:00:00Z",
   "validUntil": "2011-11-28T00:00:00Z"
   "signature": 
   {
       "type": "GraphSignature2012",
       "created": "2010-11-27T01:44:52Z",
       "creator": "https://payswarm.example.com/people/john-doe#key-5",
       "signatureValue": "OWM3YzI4OGQzNGVkMzVmMmQ3ODIyZDY3NjI4NTIyZTk2MzQzNmExMgo="
   }
}