This repository was archived by the owner on Sep 20, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
API Reference
MaxiHuHe04 edited this page Sep 8, 2019
·
3 revisions
No parameters.
Responses:
- Success:
{
"time_stamp": "<Time of the creation of the wallet [string, 'YYYY-MM-DD HH:MM:SS.mmmmmm']>",
"source_uuid": "<UUID of the wallet [string, UUID]>",
"key": "<Secure key of the wallet [string, 10 digit hexadecimal key]>",
"amount": "<Amount of morphcoins on the wallet [number]>",
"user_uuid": "<UUID of the owner of the wallet [string, UUID]>"
}- You already have a wallet
{"error": "already_own_a_wallet"}Required parameters:
-
source_uuid: UUID of the wallet [string, UUID] -
keySecure key of the wallet [string, 10 digit hexadecimal key]
Responses:
- Success:
{
"time_stamp": "<Time of the creation of the wallet [string, 'YYYY-MM-DD HH:MM:SS.mmmmmm']>",
"source_uuid": "<UUID of the wallet [string, UUID]>",
"key": "<Secure key of the wallet [string, 10 digit hexadecimal key]>",
"amount": "<Amount of morphcoins on the wallet [number]>",
"user_uuid": "<UUID of the owner of the wallet [string, UUID]>",
"transactions": [{
"id": "<Number of the transaction [number]>",
"time_stamp": "<Time of the transaction [string, 'YYYY-MM-DD HH:MM:SS.mmmmmm']>",
"source_uuid": "<UUID of the source wallet [string, UUID]>",
"send_amount": "<Transaction amount of morphcoins [number]>",
"destination_uuid": "<UUID of the destination wallet [string, UUID]>",
"usage": "<Description of the transaction [string]>",
"origin": "<Origin of the transaction (0 = from a user, 1 = from a crypto-miner) [number]>"
}]
}-
keyis wrong:
{"error": "permission_denied"}- Missing or invalid parameters:
{"error": "invalid_input_data"}No parameters
Responses:
- Success:
{
"wallets": [
"<UUID of the wallet [string, UUID]>"
]
}Required parameters:
-
source_uuid: UUID of the source wallet [string, UUID] -
keySecret key of the source wallet [string, 10 digit hexadecimal key] -
send_amountAmount of morphcoins to send from the source wallet to the destination wallet [number, min: 1] -
destination_uuid: UUID of the destination wallet [string, UUID] -
usage: Description of the transaction [string]
Responses:
- Success:
{"ok": true}- Source or destination UUID invalid:
{"error": "unknown_source_or_destination"}- Not enough morphcoins in the source wallet:
{"error": "not_enough_coins"}-
keyis wrong:
{"error": "permission_denied"}- Missing or invalid parameters:
{"error": "invalid_input_data"}Required parameters:
-
source_uuid: UUID of the wallet to delete [string, UUID]
Responses:
- Success:
{"ok": true}- Wallet UUID invalid:
{"error": "unknown_source_or_destination"}- The wallet does not belong to you:
{"error": "permission_denied"}- Missing or invalid parameters:
{"error": "invalid_input_data"}Required parameters:
-
source_uuid: UUID of the wallet to delete [string, UUID] -
key: Secret key of the wallet [string, 10 digit hexadecimal key]
Responses:
- Success:
{"ok": true}- Wallet UUID is invalid or
keyis wrong:
{"error": "unknown_source_or_destination"}- Missing or invalid parameters:
{"error": "invalid_input_data"}Required parameters:
-
source_uuid: The UUID of the wallet [string, UUID]
Responses:
- The wallet exists:
{"exists": true}- The wallet does not exist:
{"exists": false}Required parameters:
-
amountAmount of morphcoins the destination wallet should get [number] -
destination_uuid: UUID of the destination wallet [string, UUID]
Optional parameters:
-
create_transaction: Whether a transaction should be created or just the coin amount should change on the wallet [boolean]
Parameters if create_transaction is truthy:
-
source_uuid: UUID of the (fake) source wallet [string, UUID] -
usage: Description of the transaction [string] -
origin: Origin of the transaction (0 = from a user, 1 = from a crypto-miner) [number]
Responses:
- Success (without transaction):
{"success": true}- Success (with transaction):
{
"id": "<Number of the transaction [number]>",
"time_stamp": "<Time of the transaction [string, 'YYYY-MM-DD HH:MM:SS.mmmmmm']>",
"source_uuid": "<UUID of the source wallet [string, UUID]>",
"send_amount": "<Transaction amount of morphcoins [number]>",
"destination_uuid": "<UUID of the destination wallet [string, UUID]>",
"usage": "<Description of the transaction [string]>",
"origin": "<Origin of the transaction (0 = from a user, 1 = from a crypto-miner) [number]>"
}- Source or destination UUID invalid:
{"error": "unknown_source_or_destination"}Required parameters:
-
amountAmount of morphcoins to take away from the destination [number] -
source_uuid: UUID of the wallet to take coins away [string, UUID] -
key: Secure key of the wallet to take coins away [string, 10 digit hexadecimal key]
Optional parameters:
-
create_transaction: Whether a transaction should be created or just the coin amount should change on the wallet [boolean]
Parameters if create_transaction is truthy:
-
destination_uuid: UUID of the (fake) destination wallet [string, UUID] -
usage: Description of the transaction [string] -
origin: Origin of the transaction (0 = from a user, 1 = from a crypto-miner) [number]
Responses:
- Success (without transaction):
{"success": true}- Success (with transaction):
{
"id": "<Number of the transaction [number]>",
"time_stamp": "<Time of the transaction [string, 'YYYY-MM-DD HH:MM:SS.mmmmmm']>",
"source_uuid": "<UUID of the source wallet [string, UUID]>",
"send_amount": "<Transaction amount of morphcoins [number]>",
"destination_uuid": "<UUID of the destination wallet [string, UUID]>",
"usage": "<Description of the transaction [string]>",
"origin": "<Origin of the transaction (0 = from a user, 1 = from a crypto-miner) [number]>"
}- Source or destination UUID invalid:
{"error": "unknown_source_or_destination"}-
keyis wrong:
{"error": "permission_denied"}- You want to take more coins than there are on the wallet:
{"error": "not_enough_coins"}