Skip to content

Commit 4487425

Browse files
committed
DRAFT: Peer Endorsements.
1 parent 5c595f7 commit 4487425

1 file changed

Lines changed: 159 additions & 0 deletions

File tree

obip-peer-endorsements.md

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
<pre>
2+
OBIP: X
3+
Title: 3rd Party Peer Endorsements
4+
Author: Tyler Smith <tyler@ob1.io>
5+
Discussions-To: Github Issues
6+
Status: Draft
7+
Type: Standards Track
8+
Created: 02/28/2018
9+
Copyright: MIT
10+
Replaces: 8
11+
</pre>
12+
13+
## Abstract
14+
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.
15+
16+
## Motivation
17+
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.
18+
19+
## Endorsement endpoint
20+
21+
To provide endorsements a provider must have a public endpoint returning data with the following schema:
22+
23+
#### Example
24+
25+
```json
26+
{
27+
"data": {
28+
"name": "BazaarCo",
29+
"description": "Peers Endorsed by BazaarCo",
30+
"link": "https://bazaarco.example.com/endorsements"
31+
},
32+
"types": [
33+
{
34+
"name": "standard",
35+
"description": "A peer that has been vetted by BazaarCo",
36+
"badge": "https://bazaarco.example.com/standard_badge.png"
37+
},
38+
{
39+
"name": "small_bonded",
40+
"description": "A peer that has bonded $1000 with BazaarCo",
41+
"badge": "https://bazaarco.example.com/small_bonded_badge.png"
42+
},
43+
{
44+
"name": "accredited_investor_us",
45+
"description": "A peer that has been confirmed as a US accredited investor",
46+
"badge": "https://bazaarco.example.com/accredited_investor_us.png"
47+
},
48+
{
49+
"name": "real_life_lawyer_ca",
50+
"description": "A peer that has been confirmed as a licensed lawyer in Canada",
51+
"badge": "https://bazaarco.example.com/real_life_lawyer_ca.png"
52+
},
53+
{
54+
"name": "known_scammer",
55+
"description": "A peer that has been reported and confirmed as a scammer",
56+
"badge": "https://bazaarco.example.com/known_scammer.png"
57+
},
58+
],
59+
"peers": [
60+
{
61+
"id": "QmXFMkpBBpL4zcYAArVAecLyypFrRzp2Co4q9oXUtzF7XF",
62+
"type": "standard"
63+
},
64+
{
65+
"id": "QmVFNEj1rv2d3ZqSwhQZW2KT4zsext4cAMsTZRt5dAQqFJ",
66+
"type": "small_bonded"
67+
}
68+
]
69+
}
70+
```
71+
72+
#### Response Explanation
73+
74+
- `data` contains general overview information about the service to be displayed to the user in the client.
75+
- `name` is the name of the endorsement service.
76+
- `description` is a brief explanation of what this service is offering.
77+
- `link` is a URI to a document explaining further information about the service.
78+
- `types` is an array detailing the types of endorsements being offered.
79+
- `name` is the name of the endorsement type.
80+
- `description` is a brief explanation of what this type represents.
81+
- `badge` is a URI pointing to a badge icon to display on endorsed listings and profiles.
82+
- `peers` is the actual list of endorsed peers.
83+
- `id` is the ID of the peer being endorsed.
84+
- `type` is a reference to the `name` of the endorsement type for this peer.
85+
86+
#### JSON Schema
87+
88+
```json
89+
{
90+
"$schema": "http://json-schema.org/draft-06/schema#",
91+
"title": "Peer Endorsements",
92+
"description": "A set of endorsed peers",
93+
"type": "object",
94+
"properties": {
95+
"data": {
96+
"description": "General overview information about the service",
97+
"type": "object",
98+
"properties": {
99+
"name": {
100+
"description": "The name of the endorsement service",
101+
"type": "string"
102+
},
103+
"description": {
104+
"description": "A brief explanation of what this service is offering",
105+
"type": "string"
106+
},
107+
"link": {
108+
"description": "A URI to a document explaining further information about the service",
109+
"type": "string"
110+
}
111+
},
112+
"required": ["name", "description", "link"]
113+
},
114+
"types": {
115+
"description": "Types of endorsements",
116+
"type": "array",
117+
"minItems": 1,
118+
"items": {
119+
"type": "object",
120+
"properties": {
121+
"name": {
122+
"description": "The name of the endorsement type",
123+
"type": "string"
124+
},
125+
"description": {
126+
"description": "A brief explanation of what this type represents",
127+
"type": "string"
128+
},
129+
"badge": {
130+
"description": "A URI pointing to a badge icon to display on endorsed listings and profiles",
131+
"type": "string"
132+
}
133+
},
134+
"required": ["name", "description", "badge"]
135+
}
136+
},
137+
"peers": {
138+
"description": "Endorsed peer list",
139+
"type": "array",
140+
"minItems": 1,
141+
"items": {
142+
"type": "object",
143+
"properties": {
144+
"id": {
145+
"description": "The ID of the peer",
146+
"type": "string"
147+
},
148+
"type": {
149+
"description": "The type of endorsement for this peer",
150+
"type": "string"
151+
}
152+
},
153+
"required": ["id", "type"]
154+
}
155+
}
156+
},
157+
"required": ["data", "types", "peers"]
158+
}
159+
```

0 commit comments

Comments
 (0)