Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ĞMixer-py
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pascal Engélibert
ĞMixer-py
Commits
2e197728
Commit
2e197728
authored
5 years ago
by
Pascal Engélibert
Browse files
Options
Downloads
Patches
Plain Diff
Update protocol doc
parent
e81dd740
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#5995
passed
5 years ago
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+75
-25
75 additions, 25 deletions
README.md
with
75 additions
and
25 deletions
README.md
+
75
−
25
View file @
2e197728
...
@@ -74,47 +74,97 @@ To unactivate proxy, set `client.proxy` to `null`.
...
@@ -74,47 +74,97 @@ To unactivate proxy, set `client.proxy` to `null`.
## Protocols
## Protocols
### Peer list file
### Documents
#### Identity signature
A document which explicitly link a ĞMixer node which uses PUBKEY to another member pubkey.
sign(
ubjson(
{
"doctype": "gmixer/idtysig",
"docver": IDTYSIG_VERSION,
"pubkey": PUBKEY,
"sigtime": time()
}
)
)
#### Peer info
A document generated periodically by a node, then sent to other nodes.
{
"pubkey": PUBKEY,
"raw": sign(
ubjson(
{
"doctype": "gmixer/peer",
"docver": PEER_VERSION,
"currency": CURRENCY,
"pubkey": PUBKEY,
"sigtime": time(),
"host": [PUBLIC_ADDR, PUBLIC_PORT],
"idty": IDTY_PUBKEY,
"idtysig": IDTY_SIG,
"peers": [
{
"hash": PEER_HASH,
"up_in": True|False|None,
"up_out": True|False|None
},
...
]
}
)
)
}
#### Peer info file
A peer info file is useful for connecting a node to an existing network. It contains a list of peer infos. Format: UBJSON.
pubkey host port
...
Example:
### HTTP API
DCovzCEnQm9GUWe6mr8u42JR1JAuoj3HbQUGdCkfTzSr localhost 10951
URL is used like commandline arguments. Arguments are separated by slashes. Different commands can be set in the same request.
EiZ8LNJmtwCDQa8W8PcnB9n8Q7QreMHsB24kS14iV5vV 12.34.56.78 443
### HTTP API
Command:
**/json**
send response in JSON instead of default UBJSON if possible (impossible if response contains binary values)
**Warning**
: This doc is outdated!
Command:
**/peers**
list known peers (excluding itself)
URL is used like commandline arguments. Arguments are separated by slashes. Different commands can be set in the same request.
// response:
"peers": [
{
"raw": PEER_INFO,
"up_in": True|False|None,
"up_out": True|False|None
},
...
]
Command:
**/
list**
list known peers (excluding itself)
Command:
**/
info**
give local peer info
// response: (clear json)
// response:
"peers": [
"info": PEER_INFO
{ "pubkey": "DCovzCEnQm9GUWe6mr8u42JR1JAuoj3HbQUGdCkfTzSr", "localhost", "10951" },
...
]
Command:
**/pubkey**
get peer pubkey
Command:
**/pubkey**
get peer pubkey
// response:
(clear json)
// response:
"pubkey":
"ENSD6KikoZAcUVGBWJNKFREG2ryrGaHUD68GCYsiY2pK"
"pubkey":
PUBKEY
Command:
**/version**
get peer version
Command:
**/version**
get peer version
// response: (clear json)
// response:
"version": "0.1.0"
"version": VERSION
Command:
**/new**
tell the peer about a new peer
Content: a peer info document
Command:
**/new/_pubkey_**
tell the peer about a new peer
**ToDo**
: check behind
// request: (encrypted then signed json)
Command:
**/getconfirm/_sender\_pubkey_/_in\_seed1_**
"pubkey": "EiZ8LNJmtwCDQa8W8PcnB9n8Q7QreMHsB24kS14iV5vV", // new peer pubkey
"host": "12.34.56.78", // new peer host
"port": "443", // new peer port
"time": 1551444674 // timestamp
Command:
**/mix/_pubkey_/_amount_/_base_**
mix a transaction
Command:
**/mix/_pubkey_/_amount_/_base_**
mix a transaction
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment