forked from OpenBazaar/OpenBazaar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
protocol.py
39 lines (33 loc) · 936 Bytes
/
protocol.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
def shout(data):
data['type'] = 'shout'
return data
def proto_page(uri, pubkey, guid, text, signature, nickname, PGPPubKey, email,
bitmessage, arbiter, notary, arbiter_description, sin):
data = {
'type': 'page',
'uri': uri,
'pubkey': pubkey,
'senderGUID': guid,
'text': text,
'nickname': nickname,
'PGPPubKey': PGPPubKey,
'email': email,
'bitmessage': bitmessage,
'arbiter': arbiter,
'notary': notary,
'arbiter_description': arbiter_description,
'sin': sin
}
return data
def query_page(guid):
data = {'type': 'query_page', 'findGUID': guid}
return data
def proto_store(key, value, originalPublisherID, age):
data = {
'type': 'store',
'key': key,
'value': value,
'originalPublisherID': originalPublisherID,
'age': age
}
return data