-
Notifications
You must be signed in to change notification settings - Fork 19
DRAFT: Peer Endorsements. #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ghost
wants to merge
1
commit into
master
Choose a base branch
from
TS_peer_endorsements
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,159 @@ | ||
| <pre> | ||
| OBIP: X | ||
| Title: 3rd Party Peer Endorsements | ||
| Author: Tyler Smith <tyler@ob1.io> | ||
| Discussions-To: Github Issues | ||
| Status: Draft | ||
| Type: Standards Track | ||
| Created: 02/28/2018 | ||
| Copyright: MIT | ||
| Replaces: 8 | ||
| </pre> | ||
|
|
||
| ## Abstract | ||
| A change to the OBIP8 Verified Moderators system to make it a more generic and flexible service. It outlines a specification for a system allowing 3rd parties to provide a list of peers that it is endorsing in some way, with the nature of the endorsements being defined by the 3rd party itself. | ||
|
|
||
| ## Motivation | ||
| Allow users on OpenBazaar to have more information about the identity and reputation of peers that they interact with. If a 3rd party can provide accurate endorsements then users can make safer decisions. | ||
|
|
||
| ## Endorsement endpoint | ||
|
|
||
| To provide endorsements a provider must have a public endpoint returning data with the following schema: | ||
|
|
||
| #### Example | ||
|
|
||
| ```json | ||
| { | ||
| "data": { | ||
| "name": "BazaarCo", | ||
| "description": "Peers Endorsed by BazaarCo", | ||
| "link": "https://bazaarco.example.com/endorsements" | ||
| }, | ||
| "types": [ | ||
| { | ||
| "name": "standard", | ||
| "description": "A peer that has been vetted by BazaarCo", | ||
| "badge": "https://bazaarco.example.com/standard_badge.png" | ||
| }, | ||
| { | ||
| "name": "small_bonded", | ||
| "description": "A peer that has bonded $1000 with BazaarCo", | ||
| "badge": "https://bazaarco.example.com/small_bonded_badge.png" | ||
| }, | ||
| { | ||
| "name": "accredited_investor_us", | ||
| "description": "A peer that has been confirmed as a US accredited investor", | ||
| "badge": "https://bazaarco.example.com/accredited_investor_us.png" | ||
| }, | ||
| { | ||
| "name": "real_life_lawyer_ca", | ||
| "description": "A peer that has been confirmed as a licensed lawyer in Canada", | ||
| "badge": "https://bazaarco.example.com/real_life_lawyer_ca.png" | ||
| }, | ||
| { | ||
| "name": "known_scammer", | ||
| "description": "A peer that has been reported and confirmed as a scammer", | ||
| "badge": "https://bazaarco.example.com/known_scammer.png" | ||
| }, | ||
| ], | ||
| "peers": [ | ||
| { | ||
| "id": "QmXFMkpBBpL4zcYAArVAecLyypFrRzp2Co4q9oXUtzF7XF", | ||
| "type": "standard" | ||
| }, | ||
| { | ||
| "id": "QmVFNEj1rv2d3ZqSwhQZW2KT4zsext4cAMsTZRt5dAQqFJ", | ||
| "type": "small_bonded" | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| #### Response Explanation | ||
|
|
||
| - `data` contains general overview information about the service to be displayed to the user in the client. | ||
| - `name` is the name of the endorsement service. | ||
| - `description` is a brief explanation of what this service is offering. | ||
| - `link` is a URI to a document explaining further information about the service. | ||
| - `types` is an array detailing the types of endorsements being offered. | ||
| - `name` is the name of the endorsement type. | ||
| - `description` is a brief explanation of what this type represents. | ||
| - `badge` is a URI pointing to a badge icon to display on endorsed listings and profiles. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should accept/use IPFS image links |
||
| - `peers` is the actual list of endorsed peers. | ||
| - `id` is the ID of the peer being endorsed. | ||
| - `type` is a reference to the `name` of the endorsement type for this peer. | ||
|
|
||
| #### JSON Schema | ||
|
|
||
| ```json | ||
| { | ||
| "$schema": "http://json-schema.org/draft-06/schema#", | ||
| "title": "Peer Endorsements", | ||
| "description": "A set of endorsed peers", | ||
| "type": "object", | ||
| "properties": { | ||
| "data": { | ||
| "description": "General overview information about the service", | ||
| "type": "object", | ||
| "properties": { | ||
| "name": { | ||
| "description": "The name of the endorsement service", | ||
| "type": "string" | ||
| }, | ||
| "description": { | ||
| "description": "A brief explanation of what this service is offering", | ||
| "type": "string" | ||
| }, | ||
| "link": { | ||
| "description": "A URI to a document explaining further information about the service", | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "required": ["name", "description", "link"] | ||
| }, | ||
| "types": { | ||
| "description": "Types of endorsements", | ||
| "type": "array", | ||
| "minItems": 1, | ||
| "items": { | ||
| "type": "object", | ||
| "properties": { | ||
| "name": { | ||
| "description": "The name of the endorsement type", | ||
| "type": "string" | ||
| }, | ||
| "description": { | ||
| "description": "A brief explanation of what this type represents", | ||
| "type": "string" | ||
| }, | ||
| "badge": { | ||
| "description": "A URI pointing to a badge icon to display on endorsed listings and profiles", | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "required": ["name", "description", "badge"] | ||
| } | ||
| }, | ||
| "peers": { | ||
| "description": "Endorsed peer list", | ||
| "type": "array", | ||
| "minItems": 1, | ||
| "items": { | ||
| "type": "object", | ||
| "properties": { | ||
| "id": { | ||
| "description": "The ID of the peer", | ||
| "type": "string" | ||
| }, | ||
| "type": { | ||
| "description": "The type of endorsement for this peer", | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "required": ["id", "type"] | ||
| } | ||
| } | ||
| }, | ||
| "required": ["data", "types", "peers"] | ||
| } | ||
| ``` | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the types are so different from each other, should they each have a link? I can imagine some providers would want a page, or a section of a page, for each one.