API

Four Services and General Errors:

File Formats:

 

Directory Service:

The purpose of the Directory Service API is to allow a program (or user) to learn the names or IP addresses of the RAIDA servers so they can be contacted.

The client sends a GET Directory Request and the Directory Server will respond with a Server List.
I. Directory Request Client uses HTTPS to GET the server.html page located on different marketing servers.
Example usage: //www.cloudcoin.co/servers.html. The final home for the directory will probably be //www.cloudcoin.ch/servers.html

  • URL the Fully Qualified Domain name of the Server
  • bkURL a backup URL in case the DNS of one goes down.
  • Name: The name of the Server.
  • status: When we have a dynamic system, this might tell the people that the server is down and why.
  • MS (milliseconds): Time to echo (This could be used if have mirrors of the same server up in the future)
  • ext: File Extention of the service, like aspx, or php.
  • MS (milliseconds): Time to echo (This could be used if have mirrors of the same server up in the future)
  • Location: Where the or who runs the RAIDA
  • img: An image file that can be associated with the RAIDA
  • Protocol: http, or https. Could be something different in the future such as smtp, TFTP, FTP
  • Port: Port number. Usually 80 or 443

II. Directory Response: Server returns a JSON string that describes the URLs of the RAIDAs, the status, the milliseconds required to contact, and a port to use.

 

 

 

 

 

 

Expand for a Example response:
{
  "server": [
    {
      "url": "RAIDA0.CloudCoin.Global",
      "bkurl": "RAIDA0.CloudCoin.ch",
      "name": "RAIDA0",
      "status": "unknown",
      "ms": "0",
      "location":"USA",
      "img":"cloudcoin.global\/flags\/usa1.png",
      "protocol":"https",
      "port": "443"
    },
    {
      "url": "212.120.69.50",
      "bkurl": "RAIDA1.CloudCoin.ch",
      "name": "RAIDA1",
      "status": "unknown",
      "ms": "0",
      "location":"Macedonia",
      "img":"cloudcoin.global\/flags\/usa1.png",
      "protocol":"http",
      "port": "80"
    },

     {
      "url": "RAIDA2.CloudCoin.Global",
      "bkurl": "RAIDA2.CloudCoin.ch",
      "name": "RAIDA2",
      "status": "unknown",
      "ms": "0",
      "location":"Philippines",
      "img":"cloudcoin.global\/flags\/usa1.png",
      "protocol":"https",
      "port": "443"
    },
    {
      "url": "RAIDA3.CloudCoin.Global",
      "bkurl": "RAIDA3.CloudCoin.ch",
      "name": "RAIDA3",
      "status": "unknown",
      "ms": "0",
      "location":"Serbia",
      "img":"cloudcoin.global\/flags\/usa1.png",
      "protocol":"https",
      "port": "443"
    },
    {
      "url": "RAIDA4.CloudCoin.Global",
      "bkurl": "RAIDA4.CloudCoin.ch",
      "name": "RAIDA4",
      "status": "unknown",
      "ms": "0",
      "location":"Hawaii",
      "img":"cloudcoin.global\/flags\/usa1.png",
      "protocol":"https",
      "port": "443"
    },
    {
      "url": "RAIDA5.CloudCoin.Global",
      "bkurl": "RAIDA5.CloudCoin.ch",
      "name": "RAIDA5",
      "status": "unknown",
      "ms": "0",
      "location":"Sweden",
      "img":"cloudcoin.global\/flags\/usa1.png",
      "protocol":"https",
      "port": "443"
    },
    {
      "url": "RAIDA6.CloudCoin.Global",
      "bkurl": "RAIDA6.CloudCoin.ch",
      "name": "RAIDA6",
      "status": "unknown",
      "ms": "0",
      "location":"Switzerland",
      "img":"cloudcoin.global\/flags\/usa1.png",
      "protocol":"https",
      "port": "443"
    },
    {
      "url": "RAIDA7.CloudCoin.Global",
      "bkurl": "RAIDA7.CloudCoin.ch",
      "name": "RAIDA7",
      "status": "unknown",
      "ms": "0",
      "location":"Australia",
      "img":"cloudcoin.global\/flags\/usa1.png",
      "protocol":"https",
      "port": "443"
    },
    {
      "url": "RAIDA8.CloudCoin.Global",
      "bkurl": "RAIDA8.CloudCoin.ch",
      "name": "RAIDA8",
      "status": "unknown",
      "ms": "0",
      "location":"India",
      "img":"cloudcoin.global\/flags\/usa1.png",
      "protocol":"https",
      "port": "443"
    },
    {
      "url": "RAIDA9.CloudCoin.Global",
      "bkurl": "RAIDA9.CloudCoin.ch",
      "name": "RAIDA9",
      "status": "unknown",
      "ms": "0",
      "location":"India",
      "img":"cloudcoin.global\/flags\/usa1.png",
      "protocol":"https",
      "port": "443"
    },
    {
      "url": "RAIDA10.CloudCoin.Global",
      "bkurl": "RAIDA10.CloudCoin.ch",
      "name": "RAIDA10",
      "status": "unknown",
      "ms": "0",
      "location":"USA",
      "img":"cloudcoin.global\/flags\/usa1.png",
      "protocol":"https",
      "port": "443"
    },
    {
      "url": "RAIDA11.CloudCoin.Global",
      "bkurl": "RAIDA11.CloudCoin.ch",
      "name": "RAIDA11",
      "status": "unknown",
      "ms": "0",
      "location":"Russia",
      "img":"cloudcoin.global\/flags\/usa1.png",
      "protocol":"https",
      "port": "443"
    },
    {
      "url": "RAIDA12.CloudCoin.Global",
      "bkurl": "RAIDA12.CloudCoin.ch",
      "name": "RAIDA12",
      "status": "unknown",
      "ms": "0",
      "location":"Romainia",
      "img":"cloudcoin.global\/flags\/usa1.png",
      "protocol":"https",
      "port": "443"
    },
    {
      "url": "RAIDA13.CloudCoin.Global",
      "bkurl": "RAIDA13.CloudCoin.ch",
      "name": "RAIDA13",
      "status": "unknown",
      "ms": "0",
      "location":"Taiwan",
      "img":"cloudcoin.global\/flags\/usa1.png",
      "protocol":"https",
      "port": "443"
    },
    {
      "url": "RAIDA14.CloudCoin.Global",
      "bkurl": "RAIDA14.CloudCoin.ch",
      "name": "RAIDA14",
      "status": "unknown",
      "ms": "0",
      "location":"USA",
      "img":"cloudcoin.global\/flags\/usa1.png",
      "protocol":"https",
      "port": "443"
    },
    {
      "url": "RAIDA15.CloudCoin.Global",
      "bkurl": "RAIDA15.CloudCoin.ch",
      "name": "RAIDA15",
      "status": "unknown",
      "ms": "0",
      "location":"USA",
      "img":"cloudcoin.global\/flags\/usa1.png",
      "protocol":"https",
      "port": "443"
    },
    {
      "url": "RAIDA16.CloudCoin.Global",
      "bkurl": "RAIDA16.CloudCoin.ch",
      "name": "RAIDA16",
      "status": "unknown",
      "ms": "0",
      "location":"USA",
      "img":"cloudcoin.global\/flags\/usa1.png",
      "protocol":"https",
      "port": "443"
    },
    {
      "url": "RAIDA17.CloudCoin.Global",
      "bkurl": "RAIDA17.CloudCoin.ch",
      "name": "RAIDA17",
      "status": "unknown",
      "ms": "0",
      "location":"USA",
      "img":"cloudcoin.global\/flags\/usa1.png",
      "protocol":"https",
      "port": "443"
    },
    {
      "url": "RAIDA18.CloudCoin.Global",
      "bkurl": "RAIDA18.CloudCoin.ch",
      "name": "RAIDA18",
      "status": "unknown",
      "ms": "0",
      "location":"USA",
      "img":"cloudcoin.global\/flags\/usa1.png",
      "protocol":"https",
      "port": "443"
    },
    {
      "url": "RAIDA19.CloudCoin.Global",
      "bkurl": "RAIDA19.CloudCoin.ch",
      "name": "RAIDA19",
      "status": "unknown",
      "ms": "0",
      "location":"USA",
      "img":"cloudcoin.global\/flags\/usa1.png",
      "protocol":"https",
      "port": "443"
    },
    {
      "url": "RAIDA20.CloudCoin.Global",
      "bkurl": "RAIDA20.CloudCoin.ch",
      "name": "RAIDA20",
      "status": "unknown",
      "ms": "0",
      "location":"USA",
      "img":"cloudcoin.global\/flags\/usa1.png",
      "protocol":"https",
      "port": "443"
    },
    {
      "url": "RAIDA21.CloudCoin.Global",
      "bkurl": "RAIDA21.CloudCoin.ch",
      "name": "RAIDA21",
      "status": "unknown",
      "ms": "0",
      "location":"USA",
      "img":"cloudcoin.global\/flags\/usa1.png",
      "protocol":"https",
      "port": "443"
    },
    {
      "url": "RAIDA22.CloudCoin.Global",
      "bkurl": "RAIDA22.CloudCoin.ch",
      "name": "RAIDA22",
      "status": "unknown",
      "ms": "0",
      "location":"USA",
      "img":"cloudcoin.global\/flags\/usa1.png",
      "protocol":"https",
      "port": "443"
    },
    {
      "url": "RAIDA23.CloudCoin.Global",
      "bkurl": "RAIDA23.CloudCoin.ch",
      "name": "RAIDA23",
      "status": "unknown",
      "ms": "0",
      "location":"USA",
      "img":"cloudcoin.global\/flags\/usa1.png",
      "protocol":"https",
      "port": "443"
    },
    {
      "url": "RAIDA24.CloudCoin.Global",
      "bkurl": "RAIDA24.CloudCoin.ch",
      "name": "RAIDA24",
      "status": "unknown",
      "ms": "0",
      "location":"USA",
      "img":"cloudcoin.global\/flags\/usa1.png",
      "protocol":"https",
      "port": "443"
    }
  ]
}

 

 

 

 

 

 

Rules:

  • The Directory Service may not respond if it is unavailable.
  • It is possible to add backup — or secondary — RAIDA by adding items with the same «name» to the directory. Then, RAIDA with the smallest ms could be contacted first.
  • The Directory may be cached in case it becomes unavailable or even hard-coded in an application as a backup for fault tolerance.
  • The values are case-insensitive and should be compared accordingly.
  • bkurl s the Backup URL in case name resolution fails for the url.
  • ext is the File Extention used on the web service. Should be something like aspx, php, cf, etc.
  • Typically, the ms (milliseconds required to contact) and the status are to be determined by the client using the Echo Service.
  • The possible statuses are:
    1. «unknown» because no attempt has been made to contact the RAIDA
    2. «ready» because an echo request was sent to the RAIDA and it came back «ready»
    3. «error» because an echo request was sent to the RAIDA but there was an error.
    4. «no_contact» because an echo request was sent to the RAIDA and it did not return any response.
  • The Directory Service may provide the RAIDA contact information in a different (and yet uninvented) format if convenient to the application. In other words, a separate, non-JSON service could easily be created.
  • A dynamic RAIDA Directory is planned for the future but may not be necessary for years.

 

Echo Service:

The purpose of the echo API is to allow a program (or user) to establish that a RAIDA is ready to detect the authenticity of CloudCoins and how many milliseconds the contact requires. We may ofent call CloudCoins «units» in case the registered trademark that has been applied for is not awarded.

The client sends the RAIDA an Echo Request and the RAIDA will respond with a Echo Response.

  1. Echo Request: Client uses HTTPS to GET the echo page located in the service file on the RAIDA server.
    Example usage: //RAIDA0.CloudCoin.Global/service/echo
  2. Echo Response: Server returns a Response Object using JSON that describes the name of the server, the status, a message, and a timestamp. Example usage:
    {"server":"RAIDA0","status":"ready","message":"Up: Detection agent ready to detect authenticity.","time":"2016-49-21 7:49:PM"}

Rules:

  • The RAIDA may not respond if it is unavailable.
  • All Return Objects’ key values are case in-sensitive and should be compared accordingly.
  • The names of the servers on Network 1 will always be one of 25 servers: RAIDA0 through RAIDA24. Note: server names are case-insensitive and should be compared accordingly.
  • In the future, if Doubling occurs, the names of the servers will have a network extension such as RAIDA0Net2 through RAIDA24Net2 where Net2 means they are on network 2.
  • The status will always be ready otherwise it will return an error. See General Errors.
  • The message will always be divided in two parts with a colon: The Subject and the Details.
  • The subject of the echo response will always be «Up» and the details will always be «Detection agent ready to detect authenticity.» otherwise it will return an error. See General Errors.
  • The time is in GMT.

Echo Service Brief:

Breif allows for the a shorter response:

  1. Echo Request: Client uses HTTPS to GET the echo page located in the service file on the RAIDA server.
    Example usage: //RAIDA0.CloudCoin.Global/service/echo?b=t
  2. Echo Response: Server returns one word: Example usage:
    ready

 

Test Service: (This is turned off now that we are in production mode)

The purpose of the Test API is to allow a program (or user) to establish that a RAIDA is able to execute stored procedures or otherwise contact it’s datastore. The test service returns the number of records in the RAIDA.

The client sends the RAIDA an Test Request and the RAIDA will respond with a Test Response.

  1. Test Request: Client uses HTTPS to GET the test.aspx or test.php page located in the service file on the RAIDA server.
    Example usage: //RAIDA0.CloudCoin.Global/service/test
  2. Test Response: Server returns a Response Object using JSON that describes the name of the server, the status, a message, and a timestamp. Example usage:
    {"server":"RAIDA0","status":"ready","message":"Up: There are 16777216 records in the DB.","time":"2016-49-21 7:49:PM"}

Rules:

  • The RAIDA may not respond if it is unavailable.
  • All Return Objects’ key values are case in-sensitive and should be compared accordingly.
  • The names of the servers on Network 1 will always be one of 25 servers: RAIDA0 through RAIDA24. Note: server names are case-insensitive and should be compared accordingly.
  • In the future, if Doubling occurs, the names of the servers will have a network extension such as RAIDA0Net2 through RAIDA24Net2 where Net2 means they are on network 2.
  • The status will always be ready otherwise it will return an error. See General Errors.
  • The time is in GMT.

 


Detection Service:

The purpose of the Detect API is to allow the program or user to change the Authenticity Number in the RAIDA to a Proposed Authenticity Number so that ownership change of CloudCoin is possible.

  1. Detection Request:The program sends the RAIDA server an HTTPS GET request including the NN (network number), SN (Serial Number), AN (Authenticity Number), PAN(Proposed Authenticity Number) and Denomination of the CloudCoin that is to change ownership. The SN and the Denomination are like the CloudCoin’s username.The AN is like the CloudCoins’ password. The PAN is like a new password. A sample Detection Request is:
    //RAIDA20.cloudcoin.global/service/detect?nn=1&sn=1&an=1836843d928347fb22c2142b49d772b5&pan=1836843d928347fb22c2142b49d772b5&denomination=1
  2. Detection Response:Server returns a Response Object using JSON that describes the name of the server, the status, a message, and a timestamp. Example responses:
    • If Passed:
      {"server":"RAIDA1","status":"pass","sn":"1","nn":"1","message":"Authentic:1 is an authentic
      1-unit. Your Proposed Authenticity Number is now the new Authenticty Number. Update your file.","time":"2016-44-19 7:44:PM"}
      Note that the 1 after the word Authentic: is the serial number of the unit that was tested.
    • If failed to authenticate:
      {"server":"RAIDA1","status":"fail""sn":"1","nn":"1","message":"Counterfeit: The unit failed
      to authenticate on this server. You may need to fix it on other servers.","time":"2016-44-19 7:44:PM"}
    • If failed because the denomination of the coin is not its real denomination (Someone is trying to falsify the denomination):
      {"server":"RAIDA1","status":"fail","sn":"1","nn":"1""message":"Denomination:
      The item you are authenticating is a 250 units. However, the request was for a 25 units.
      Someone may be trying to pass you a money unit that is not of the true value ","time":"2016-11-21 9:11:PM"}
    • If failed because of missing or out-of-range GET NN parameter:
      {"server":"RAIDA1","status":"error","message":"NN: The unit's network number was
      out of range or not on this server.","time":"2016-15-21 9:15:PM"}
    • If failed because of missing or out-of-range GET SN parameter:
      {"server":"RAIDA1","status":"error","message":"SN: The unit's serial number was out of range.","time":"2016-15-21 9:15:PM"}
    • If failed because of missing or out-of-range GET Denomination parameter:
      {"server":"RAIDA1","status":"error","message":"Denomination: The unit's Denomination was out of range.","time":"2016-04-21 9:04:PM"}
    • If failed because of missing or out-of-range GET PAN parameter:
      {"server":"RAIDA1","status":"error","message":"PAN: The unit's Proposed Authenticity Number
      was out of range.","time":"2016-06-21 9:06:PM"}
    • If failed because of missing or out-of-range GET AN parameter:
      {"server":"RAIDA1","status":"error","message":"AN: The unit's Authenticity Number was out of range.","time":"2016-07-21 9:07:PM"}
    • Otherwise Detect should return a General Error

Detection Service Brief:

The RAIDA responds with one word. A b=t is added to the GET request. Breif = True;

  1. Detection Request:A sample Detection Request is:
    //RAIDA20.cloudcoin.global/service/detect?nn=1&sn=1&an=1836843d928347fb22c2142b49d772b5&pan=1836843d928347fb22c2142b49d772b5&denomination=1&b=t
  2. Detection Response:Server returns one word, either pass, fail or error. Example responses: pass

 


Fix Service:

The purpose of the Fix API is to allow the program or user to repair «fractured» CloudCoins. A fractured CloudCoin is a CloudCoin that has some RAIDA servers failing authenticity. The CloudCoin owners can request that the fractured server ask its trusted servers (Neighbors) to vouch for them. By default, each RAIDA requires three servers to vouch for cloudcoin in order to self-repair. There are four combinations of servers that the each RAIDA will trust. They will trust the three «corner» RAIDA on any of their four corners. With the numbers arranged in a circle like a clock, and the RAIDA being repaired being zero, the three servers needed to trust are -1.-5.-6 OR +1, -4, -5 OR -1, +4, +5 OR +1, +5 and +6. RAIDA12, for example, will trust RAIDA11 AND RAIDA7 AND RAIDA6 together, OR the three other combinations of three servers. Note that the Administrator for each RAIDA can change the server that their RAIDA trusts.

    1. Trusted Server Identification:The program or user that has the fractured CloudCoin will identify the four fractured RAIDA’s trusted servers.
      Rules:

      • There are four combination of three corner servers that are trusted. See the four-corner diagram above. Note the numbers wrap around like a clock (see image above).
      • In order to repair, a fratured RAIDA must receive three tickets from specific triad of these trusted servers.
    2. Ticket Request:Client makes a Ticket Request to trusted server triad. Note that there are three separate requests going to three separate RAIDAs.
      Sample usage of an attempt to fix a fractured RAIDA1:

      //raida0.cloudcoin.global/service/get_ticket?nn=1&sn=16777005&toserver=1&an=7ac477841f5cce2889e4329a0e994ee3&pan=7ac477841f5cce2889e4329a0e994ee3&denomination=250
      //raida2.cloudcoin.global/service/get_ticket?nn=1&sn=16777005&toserver=1&an=98f094b7ed7d0a3f80db7ef0b03c740f&pan=98f094b7ed7d0a3f80db7ef0b03c740f&denomination=250

      These Ticket Request are the same as the Detection Request except that they include a «toserver» parameters. The toserver parameter describes the RAIDA number that is to be repaired (0 through 24). This facilitiates advanced encryption between the fractureed RAIDA and the trusted RAIDA if it becomes necessary.

    3. Ticket Response: The client will recieve a «ticket» from each RAIDA that authenticates the Ticket Request. The ticket is exactly 44 characterse in length and is a random and secret hexidecimal number. By default, the RAIDA servers will only honor a ticket that is less than 15 seconds old, but this amount can be changed by each RAIDA Administrator.
      Note that the «message» from the Ticket Response is not divided into subject and details when it returns a ticket.Sample Ticket:23a399c5358fe88be678c45fa65747c81d31293cf44cSample Responses:If Ticket Response is successful:

      {"server":"RAIDA2","status":"ticket","sn":"1","nn":"1","message":"23a399c5358fe88be678c45fa65747c81d31293cf44c","time":"2016-40-21 10:40:PM"}

 

 

 

 

 

 

 

 

The fails are identical to the Detection fails
If failed to authenticate:
{"server":"RAIDA1","status":"fail","sn":"1","nn":"1","message":"Counterfeit: The unit failed to authenticate on this server. You may need to fix it on other servers.","time":"2016-44-19 7:44:PM"}

If failed because the denomination of the coin is not its real denomination (Someone is trying to falsify the denomination):
{"server":"RAIDA1","status":"fail","sn":"1","nn":"1","message":"Denomination: The item you are authenticating is a 250 units. However, the request was for a 25 units. Someone may be trying to pass you a money unit that is not of the true value ","time":"2016-11-21 9:11:PM"}

If failed because of missing or out-of-range GET NN parameter:
{"server":"RAIDA1","status":"error","message":"NN: The unit's network number was out of range or not on this server.","time":"2016-15-21 9:15:PM"}

If failed because of missing or out of range GET SN parameter:
{"server":"RAIDA1","status":"error","message":"SN: The unit's serial number was out of range.","time":"2016-15-21 9:15:PM"}

If failed because of missing or out of range GET Denomination parameter:
{"server":"RAIDA1","status":"error","message":"Denomination: The unit's Denomination was out of range.","time":"2016-04-21 9:04:PM"}

If failed because of missing or out of range GET PAN parameter:
{"server":"RAIDA1","status":"error","message":"PAN: The unit's Proposed Authenticity Number was out of range.","time":"2016-06-21 9:06:PM"}

If failed because of missing or out of range GET AN parameter:
{"server":"RAIDA1","status":"error","message":"AN: The unit's Authenticity Number was out of range.","time":"2016-07-21 9:07:PM"}

Otherwise Detect should return a General Error

 

 

 

 

 

 

 

 

  1. Fix Request:The fix request combines the outcomes of three ticket requests to send to the fractured RAIDA. The tickets must come from three of the corner servers.
    Sample fix Request attempting to fix RAIDA1:

    //raida1.cloudcoin.global/service/fix?fromserver1=0&message1=4aa2b02d3d2279216009cfcdd8a04b46b24835f63632
    &fromserver2=2&message2=5ce45a6141ac9cb00233b11a900ea5302e9745051659&fromserver3=4&message3=23e45a6141ac9cb00233b11a900ea5302e9745051659&pan=E9611BF6FCBB1CB58CB62A5FC24A4B39
  2. Fix Response: The fix response tells the client if the fix attempt was successful or failed.
    1. If success in repairing the fractured RAIDA:
      {"server":"RAIDA1","status":"success","message":"Fixed: Unit's AN was changed to the PAN. Update your AN to the new PAN.","time":"2016-09-22 1:09:PM"}
    2. If failed because a server number is not between the range of zero to 24 (inclusive):
      RAIDA1: {"server":"RAIDA1","status":"error","message":"Server: Server 26 Out of Range.","time":"2016-39-22 11:39:AM"}

      Note that the «26» number is a variable that will change.

    3. If failed because the ticket (message) is not exactly 44 characters long:
      RAIDA1: {"server":"RAIDA1","status":"error","message":"Ticket: Message 1 Out of Range.","time":"2016-39-22 11:39:AM"}

      Note that the «Message 1» could be «Message 2».

    4. If failed because a tickets (message) is not from a trusted server:
      RAIDA1: {"server":"RAIDA1","status":"error","message":"Trust: Server 2 Not Trusted.","time":"2016-39-22 11:39:AM"}

      Note that the «2» number is a variable(0-24) that will change.

    5. If failed because a GET parameters where not supplied ( message1, message2, fromeserver1, fromserver2 and pan ):
      RAIDA1: {"server":"RAIDA1","status":"error","message":"GET Parameters: You must provide a message1, message2, fromeserver1, fromserver2 and pan.","time":"2016-39-22 11:39:AM"}
    6. If failed because one of the trusted servers could not be contacted by the fractured RAIDA server:
      RAIDA1: {"server":"RAIDA1","status":"error","message":"Connection: Could not connect to Server 0.","time":"2016-39-22 11:39:AM"}

      Note: «The «0» number is a variable (0-24) that will change.

    7. If failed because one of the trusted servers reported that the Ticket(message/RN) was invalid (not 44 hex symbols):
      RAIDA1: {"server":"RAIDA1","status":"error","message":"Remote Ticket: Server 4 said invalid ticket.","time":"2016-39-22 11:39:AM"}

      Note: The «4» number is a variable (0-24) that will change.

    8. If failed because one of the trusted servers reported that it did not authorize the Ticket ( Random Number ) and that the ticket was not found in its Fixit List:
      RAIDA1: {"server":"RAIDA1","status":"error","message":"Remote Ticket: No Ticket found on Server 2.","time":"2016-39-22 11:39:AM"}

      Note: The «2» number is a variable (0-24) that will change.

    9. If failed because one of the trusted servers’ databases reported some kind of error:
      RAIDA1: {"server":"RAIDA1","status":"error","message":"Remote Ticket: Server 4 database said invalid ticket.","time":"2016-39-22 11:39:AM"}

      Note: The «2» number is a variable (0-24) that will change.

    10. If failed because one of the trusted servers reported a fixit-log time that was longer than the fractured RAIDA allows for:
      RAIDA1: {"server":"RAIDA1","status":"error","message":"Time: Only 15 seconds where allowed for the fix but server 2 took 29.","time":"2016-39-22 11:39:AM"}

      Note: The 15 seconds is a variable that can be changed by the RAIDA Administrator. The «2» number is a variable (0-24) that will change.

    11. If failed because one of the trusted servers errored while trying to connect to it:
      {"server":"RAIDA1","status":"error","message":"Connection Exception: Server 0 System.Net.WebException: The remote server returned an error: (500) Internal Server Error. at System.Net.HttpWebRequest.GetResponse() at ASP.service_fix_aspx.Page_Load(Object sender, EventArgs e)//raida0.cloudcoin.global/service/hints?rn=f67d8b84ed22b806ac81f00227ca5637476a9197ef6a.","time":"2016-09-22 1:09:PM"}

      Note: The «0» number is a variable (0-24) that will change.

    12. If failed because the two trusted servers returned different serial numbers (they should return the same serial number):
      {"server":"RAIDA1","status":"error","message":"Mismatch: The Serial Numbers specified by the trusted remote servers did not match.","time":"2016-09-22 1:09:PM"}
    13. If failed because one of the trusted servers returned a serial number that was invalid (Greater than 16,777,216 or less than 1:
      {"server":"RAIDA1","status":"error","message":"Remote SN: The trusted server provided an invalid Serial Number.","time":"2016-09-22 1:09:PM"}

      Note: The «0» number is a variable (0-24) that will change.

    14. If failed because of an unknown problem:
      {"server":"RAIDA1","status":"error","message":"Unknown: There was a problem and the unit was not fixed. Most likely, the SN did not exist..","time":"2016-09-22 1:09:PM"}

 

General Errors:

The purpose of custom errors provided in JSON form is that webapplications can more easilty handle common errors. Note: RAIDA Administrators may turn off custom errors in order to troubleshoot problems. This assumes that Custom Errors are turned on in the RAIDA servers’ webserver.

    • {"server":"RAIDA1","status":"error","message":"500: Internal Server Error","time":"2016-09-22 1:09:PM"}
    • {"server":"RAIDA1","status":"error","message":"404: Not Found","time":"2016-09-22 1:09:PM"}

The failure numbers will have values over 400.

    • 4xx Client Error.
    • 5xx Server Error.
    • 6.3 Cloudflare.

 

CloudCoin Structure:

Name Range Description
NN (Network Number) To start with must be 1 Could increase later after doubling
SN (Serial Number) 1-16,777,215 The SN determines the denomination
AN (Authenticity Numbers) GUID without hyphens There are 25 of these
Denomination 1,5,25,100 or 250 This is derived from the SN (See denomination table)
Account / Owner ID GUID without hyphens This is optional but space is reserved (may not be true)
Last Health Status (THIS HAS NOT YET BEEN FINALIZED) 25 symbols, 0 (unknown), 1 (pass) or F (fail) like ‘11111011001f111111111111’ Used to show the RAIDA status the last time the money was checked for Authenticity (may not be true)
Expiration Date A date no more than 2 years in the future CloudCoins must be checked for Authenticity every two years because they are scavenged every two years for last CloudCoins.(may not be true)

Denominations

SN Start SN End Denomination
1 2,097,152 One
2,097,153 4,194,304 Five
4,194,305 6,291,456 Twenty Five
6,291,457 14,680,064 One Hundred
14,680,065 16,777,216 Two Hundred Fifty

JPEG:

CloudCoin JPEG File Naming Convention. Users may name the jpegs what every they like. Uncirculated coins are as follows: Denomination «CloudCoin», NN, SN, a user tag and «.jpg» separated by dots. Example: 250.cloudcoin.1.14589548.mintTagHere.jpg
APP0 Marker FFD8 FFE0 01C3 4A46494600 0101 01 0060 0060 1D 05 20 Bytes Long.
Byte Numbers Bytes Name File Bytes Mandatory Hex Value Value varies?
1 & 2 2 SOI (Start of Image) Always the first bytes FF D8 No
3 & 4 2 Start of APP0 Marker The APP0 is Used to identify the file a a JPEG FIF file. This is the start of this marker FF E0 No
5 & 6 2 APP0 Length Shows the Length of the APP0 Marker Excluding the first 2 bytes. In CloudCoins, this Equals 16+ 435 16 is fixed APPO stuff and 435 is the CloudCoin. 01 c3 No
7 => 11 5 File identity Writes «JFIF» in ASCII, terminated by a null byte 4A 46 49 46 00 No
12 & 13 2 Version First byte for major version, second byte for minor version (01 02 for 1.02) 01 01 No
14 1 Density units 00 or 01 = pixels per inch. 02 = pixels per centimeter. 01 No
15 & 16 2 Xdensity ? 00 60 No
17 & 18 2 Ydensity ? 00 60 No
19 1 Thumbnail Horizontal Pixel Count CloudCoin data is in the thumbnail and is 29 pixels wide 1D No
20 1 Thumbnail Vertical Pixel Count CloudCoin data is in the thumbnail and is 5 pixels high 05 No
CloudCoin in Thumbnail: Each pixel holds three bytes. So 29 pixels by 5 pixels = 45 pixels. 45* 3 bytes each = 435 bytes for the entire CloudCoin.
21 => 421 400 ANs: 25 Authenticity Numbers 25 GUIDs without hyphens. The Jpeg thumbnail dimensions are 29 pixels * 5 pixels * 3 bytes each = 435 bytes. Each AN is 16 bytes and 25 x 16 = 400 bytes so there are 35 bytes left for other info (AOID, Has Comment, Health Status, Expiration Date, Network Number and Serial Number. Too Large to show Yes
422 => 448 27 AOID: Account / Owner ID Bytes can be used by the owner for their uses. Too Large to show Yes
449 1 HC: Has comments? Indicates if there are any other information in the comments section of the Jpeg that is used by applications. 00 = No, More than zero = Yes (Program should look in the comments section of JPEG for more owner information). There is room for 255 codes so if you need to put some data it could fit here. Yes
449 1 LHS: Last Health Status How many servers were fractured (0=>25) last time the money was authenticated. 00 = 100% Good 19(hex)= 100% bad. Yes
451 & 452 2 ED: Expiration Date Month and year only. First nibble is the month. Last three nibbles are the year. Hex 97E0 = 9 2016 Yes
453 1 NN: Network Number 1 Through 256 01 Yes
454, 455 & 456 3 SN: Serial Number sn in Hex 6 bytes FF FFFF = 16,777,215 FF FFFF Yes
Rest of JPEG Image. Size will vary

JSON

CloudCoin JSON File Naming Convention: Total Amount of CloudCoins in file, «.CloudCoin» , then a random number or use defined tab in case there are other stack/chests with the same amount of CloudCoins separated by dots. The extension could be Chest or stack. Example: 12750.cloudcoin.mytag.stack. Stack files are for the public. Chest files are for founders uncirculated coins. 12750.cloudcoin.userTagHere.chest If the stack is full of counterfeit CloudCoins then it may have a .counterfeit extension. If the stack is full of lost coins then it may have the .lost extension. If the stack has a .fracked extension, it is full of fracked coins.
Key Sample Value Notes
NN 1 Network Number (1-256)
SN 16,777,216 Serial Number (1-16,777,216)
ANs 2E2720222C231C1C2837292C30313434 Array of 25 ANs.
ED 9-2016 Expiration Date. Month and year separated with a hyphen.
AOID from_email:Sean@Worthington.com Array of key value pairs created by the user for the user. Could be standardize later. Ok to leave blank and ignore now but at least provide opening and closing brackets [].
Here is a sample JSON file with two CloudCoins in it:

{
	"cloudcoin": [{
		"nn": "1",
		"sn": "16777215",
		"an": ["6A415F1CC541353C9AA5CE6FEAFC15B3", "1F07C89ACEF44EFC936C3685EF013D32", "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", 
                       "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", 
                       "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", 
                       "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", 
                       "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3"],
		"ed": "9-2016",
		"aoid": []
	}, {
		"nn": "1",
		"sn": "24589",
		"an": ["7A415F1CC541353C9AA5CE6FEAFC15B3", "1F07C89ACEF44EFC936C3685EF013D32", "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", 
                       "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3",
                       "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", 
                       "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", 
                       "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3", "6A415F1CC541353C9AA5CE6FEAFC15B3"],
		"ed": "9-2016",
		"aoid": ["from_email=Sean@Worthington.com", "account=859562525630"]
	}]
}

AOID used internally for applications. AOID can be ignored by apps and data should be stripped when importing. Here is a standard for internal user
Key Sample Value Explanation
fracked ppfpppppppppppupppppeppp Tracking the status of detection attempts. p = passed, f= failed, e=error, u = undetected
app_status Sample Value Statuses include «suspect», «fracked», «authentic», «counterfeit», «exported»,»lost»
from_email Sean@Worthington.com The email of the person who sent the money
from_name Sample Value Explanation
from_account 568545221474 Explanation
memo Can I write anything here? Explanation
date_recieved 2016-09-15 5:30:20″ Explanation
date_sent 2016-09-15 5:30:20″ Explanation
escrow_id 85521144 If the money is kept for escrow
fund Vacation What every pupose the money will be used for.

Grading CloudCoins after Detection

public String[] gradeStatus(){ 
        int passed = 0; 
        int failed = 0; 
        int other = 0; 
        String passedDesc =""; 
        String failedDesc =""; 
        String otherDesc =""; 
        for( int i=0; i< 25; i++ ){ if( pastStatus[i].equalsIgnoreCase("pass") ){ passed++; }else if( pastStatus[i].equalsIgnoreCase("fail")){ failed++; }else{ other++; }//end if pass, fail or unknown }//for each status //Calculate passed if( passed == 25 ){ passedDesc = "100% Passed!"; }else if( passed > 17 ){ 
            passedDesc = "Super Majority"; 
        }else if( passed > 13){ 
            passedDesc = "Majority"; 
        }else if( passed == 0){ 
            passedDesc = "None"; 
        }else if(passed < 5) { passedDesc = "Super Minority"; }else{ passedDesc = "Minority"; } //Calculate failed if( failed == 25 ){ failedDesc = "100% Failed!"; }else if( failed > 17 ){ 
            failedDesc = "Super Majority"; 
        }else if( failed > 13){ 
            failedDesc = "Majority"; 
        }else if( failed == 0){ 
            failedDesc = "None"; 
        }else if(failed < 5) { failedDesc = "Super Minority"; }else{ failedDesc = "Minority"; } //Calcualte Other RAIDA Servers did not help. switch( other ){ case 0: otherDesc = "100% of RAIDA responded"; break; case 1: case 2: otherDesc = "Four or less RAIDA errors"; break; case 3: case 4: otherDesc = "Four or less RAIDA errors"; break; case 5: case 6: otherDesc = "Six or less RAIDA errors"; break; case 7: case 8: case 9: case 10: case 11: case 12: otherDesc = "Between 7 and 12 RAIDA errors"; break; case 13: case 14: case 15: case 16: case 17: case 18: case 19: case 20: case 21: case 22: case 23: case 24: case 25: otherDesc = "RAIDA total failure"; break; default: otherDesc = "FAILED TO EVALUATE RAIDA HEALTH"; break; }//end RAIDA other errors and unknowns //Coin will go to bank, counterfeit or fracked if(other > 12) 
        {//not enough RAIDA to have a quorum 
            this.extension = "suspect"; 
        } 
        else if( failed > passed ) 
        {//failed out numbers passed with a quorum: Counterfeit 
            this.extension = "counterfeit"; 
        } 
        else if( failed > 0) 
        { //The quorum majority said the coin passed but some disagreed: fracked.  
            this.extension = "fracked"; 
        } 
        else 
        {//No fails, all passes: bank 
            this.extension = "bank"; 
        } 

        this.gradeStatus[0] = passedDesc; 
        this.gradeStatus[1] = failedDesc; 
        this.gradeStatus[2] = otherDesc; 
        return  gradeStatus; 
    }//end gradeStatus