This repository has been archived by the owner on Jan 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6a75de7
commit 2438ba7
Showing
6 changed files
with
224 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,14 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"required": [ | ||
"blinded_utxo" | ||
], | ||
"properties": { | ||
"blinded_utxo": { | ||
"type": "string", | ||
"description": "the blinded UTXO for which we want to download consignment data" | ||
} | ||
} | ||
} |
This file contains 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,14 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"required": [ | ||
"result" | ||
], | ||
"properties": { | ||
"result": { | ||
"type": "string", | ||
"description": "`true` when first successful upload. `false` when the same file was already uploaded before." | ||
} | ||
} | ||
} |
This file contains 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,14 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"required": [ | ||
"blinded_utxo" | ||
], | ||
"properties": { | ||
"blinded_utxo": { | ||
"type": "string", | ||
"description": "the blinded UTXO for which we want to upload consingment file" | ||
} | ||
} | ||
} |
This file contains 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,14 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"required": [ | ||
"result" | ||
], | ||
"properties": { | ||
"result": { | ||
"type": "boolean", | ||
"description": "`true` when first successful upload. `false` when the same file was already uploaded before." | ||
} | ||
} | ||
} |
This file contains 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,145 @@ | ||
|
||
{ | ||
"methods": [ | ||
{ | ||
"name": "server.info", | ||
"summary": "get server info", | ||
"description": "get server info", | ||
"params": [], | ||
"result": { | ||
"$ref": "server.info.schema.json" | ||
} | ||
}, | ||
{ | ||
"name": "consignment.post", | ||
"summary": "Upload consignment info", | ||
"description": "In addition to json-rpc request, the media file needs to be attached under \"file\" name via multipart form", | ||
"params": [ | ||
{ | ||
"$ref": "consignment.post.request.json" | ||
} | ||
], | ||
"result": { | ||
"$ref": "consignment.post.schema.json" | ||
}, | ||
"errors": [ | ||
{ | ||
"$ref": "#/components/errors/CANNOT_CHANGE_ACK" | ||
}, | ||
{ | ||
"$ref": "#/components/errors/INVALID_BLINDED_UTXO" | ||
}, | ||
{ | ||
"$ref": "#/components/errors/MISSING_BLINDED_UTXO" | ||
}, | ||
{ | ||
"$ref": "#/components/errors/MISSING_FILE" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "consignment.get", | ||
"summary": "get previously uploaded consignment", | ||
"params": [ | ||
{ | ||
"$ref": "consignment.get.request.json" | ||
} | ||
], | ||
"result": { | ||
"$ref": "consignment.get.schema.json" | ||
}, | ||
"errors": [ | ||
{ | ||
"$ref": "#/components/errors/INVALID_BLINDED_UTXO" | ||
}, | ||
{ | ||
"$ref": "#/components/errors/MISSING_BLINDED_UTXO" | ||
}, | ||
{ | ||
"$ref": "#/components/errors/CONSIGNMENT_FILE_NOT_FOUND" | ||
} | ||
] | ||
} | ||
], | ||
"components": { | ||
"errors": { | ||
"CANNOT_CHANGE_ACK": { | ||
"code": -100, | ||
"message": "Cannot change ACK", | ||
"data": { | ||
"type": "object" | ||
} | ||
}, | ||
"CANNOT_CHANGE_FILES": { | ||
"code": -101, | ||
"message": "Cannot change uploaded files", | ||
"data": { | ||
"type": "object" | ||
} | ||
}, | ||
"INVALID_ACK": { | ||
"code": -200, | ||
"message": "Invalid ACK", | ||
"data": { | ||
"type": "object" | ||
} | ||
}, | ||
"INVALID_ATTACHMENT_ID": { | ||
"code": -201, | ||
"message": "Invalid ACK", | ||
"data": { | ||
"type": "object" | ||
} | ||
}, | ||
"INVALID_BLINDED_UTXO": { | ||
"code": -202, | ||
"message": "Invalid blinded utxo", | ||
"data": { | ||
"type": "object" | ||
} | ||
}, | ||
"MISSING_ACK": { | ||
"code": -300, | ||
"message": "Missing ACK", | ||
"data": { | ||
"type": "object" | ||
} | ||
}, | ||
"MISSING_ATTACHMENT_ID": { | ||
"code": -301, | ||
"message": "Missing attachment id", | ||
"data": { | ||
"type": "object" | ||
} | ||
}, | ||
"MISSING_BLINDED_UTXO": { | ||
"code": -302, | ||
"message": "Missing blinded utxo", | ||
"data": { | ||
"type": "object" | ||
} | ||
}, | ||
"MISSING_FILE": { | ||
"code": -303, | ||
"message": "Missing file", | ||
"data": { | ||
"type": "object" | ||
} | ||
}, | ||
"CONSIGNMENT_FILE_NOT_FOUND": { | ||
"code": -400, | ||
"message": "Consignment file not found", | ||
"data": { | ||
"type": "object" | ||
} | ||
}, | ||
"MEDIA_FILE_NOT_FOUND": { | ||
"code": -400, | ||
"message": "Media file not found", | ||
"data": { | ||
"type": "object" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains 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,23 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"required": [ | ||
"protocol_version", | ||
"version" | ||
], | ||
"properties": { | ||
"protocol_version": { | ||
"type": "string", | ||
"description": "version of the JSON-RPC protocol" | ||
}, | ||
"version": { | ||
"type": "string", | ||
"description": "node software version" | ||
}, | ||
"uptime": { | ||
"type": "integer", | ||
"description": "how long the server has been run (in seconds)." | ||
} | ||
} | ||
} |