TIBADO Cash API

The Coin Arithmetic and Signing Handler (Cash) Module is used to make different value combinations of coins

The three following options are available when using the Cash Module:

Swap Coin

The option to swap means that you are able to check the origins of your received coin and can validate when used in a transaction.

Split Coin

The option to split means that you can able split your original coin value down into two coins.

Merge Coin

The option to merge means that you can merge two coins to make one larger value coin.

Whilst coins flow out of the Cash Module it is important to know that coins are actively checked to be both genuine and active. With issues of duplication that can occur within digital currency transactions the knowledge of having the Cash Module can always be utilised for this reason.

Hosted online, the Cash Module provided a HTTP API for software applications to perform these operations.
cash mdl
Each Cash-API operation follows a two-step handshake which ensures the client has received the resulting coin or coins. These steps ensure the client has received the resulting coin or coins. 

Step 1 Step 2
To run the calculation itself To provide confirmation to finalise the operation

The Cash Module API demonstrator is available to view here.

Swap Coin operation

With the swap coin operation, it simply swaps one coin for another of the same value. This is normally used to validate a coin’s originality.

When passing coins to the Cash Module, each coin must be labelled to identify which role and the following parameters display the processes during each calculation.

ori_coin The original coin to swap Base64 encoded coin text
ori_coin_img The original coin to swap Base64 encoded coin image
currency_code The coin currency Integer
res_coin The resulting swapped coin Base64 encoded coin text
res_coin_img The resulting swapped coin Base64 encoded coin image

Swap Coin Command Step walkthrough

Step 1 - Swap Coin request and response

Request Header

URL: https://j8e7vhhb43.execute-api.eu-west-1.amazonaws.com/prod/swap-coin
Method: POST
content-type: application/json

Request Body

{ 
"ori_coin":"AAEAAQAAAAAAAAAAAAIJkAAAAAEAAAAKHqDUHQAAAkk8JPQMFPsyaSVaAihuFKYgQSqbXAM3SovPvGmRiULddw==",
"currency_code":1
}

Response Status Codes

200 Success
400 Bad Request
500 Internal Server Error

Response Body

{ "ori_coin":"AAEAAQAAAAAAAAAAAAIJkAAAAAEAAAAKHqDUHQAAAkk8JPQMFPsyaSVaAihuFKYgQSqbXAM3SovPvGmRiULddw==", "res_coin":"AAEAAQAAAAAAAAAAAAIJhwAAAAEAAAAKHqDPpwAAApiYxLrPrKaz4R0Hi4sshXCJpNYpiV2K+CD5Ub89Bei+Dg==", "ori_coin_img":"iVBORw0KGgoAAAANSUhEUgAAAT4AAAE9CAI...kSuQmCC", "res_coin_img":"iVBORw0KGgoAAAANSUhEUgAAAT4AAAE9CAI...ErkJggg==" } 

Step 2 - Swap Coin Confirm request and response

Request Header

URL: https://j8e7vhhb43.execute-api.eu-west-1.amazonaws.com/prod/swap-confirm
Method: POST
content-type: application/json

Request Body

 { "ori_coin":"AAEAAQAAAAAAAAAAAAIJkAAAAAEAAAAKHqDUHQAAAkk8JPQMFPsyaSVaAihuFKYgQSqbXAM3SovPvGmRiULddw==", "res_coin":"AAEAAQAAAAAAAAAAAAIJhwAAAAEAAAAKHqDPpwAAApiYxLrPrKaz4R0Hi4sshXCJpNYpiV2K+CD5Ub89Bei+Dg==" } 

Response Status Codes

200 Success
400 Bad Request
500 Internal Server Error


On successful execution of the Swap Coin command, a Success status code is returned along with the resulting coin. When the client has checked the validity of the resulting coin if original, can then proceed to the Swap Coin confirm command.

On successful execution, a Success status code is returned.

Split Coin operation

With the split coin operation, it simply splits your original coin value down into two coins.

When passing coins to the Cash Module, each coin must be labelled to identify which role and the following parameters display the processes during each calculation.

min_coin The coin from which is to be subtracted Base64 encoded coin text
min_coin_img The coin from which is to be subtracted Base64 encoded coin image
amount The value to be subtracted from the minuend coin Integer
currency_code The coin currency Integer
dif_coin The coin to the value of the difference Base64 encoded coin text
dif_coin_img The coin to the value of the difference Base64 encoded coin image
sub_coin The coin to the value of the amount Base64 encoded coin text
sub_coin_img The coin to the value of the amount Base64 encoded coin image

Split Coin Command Step walkthrough

Step 1 - Split Coin request and response

Request Header

URL: https://j8e7vhhb43.execute-api.eu-west-1.amazonaws.com/prod/split-coin
Method: POST
content-type: application/json

Request Body

 { "min_coin":"AAEAAQAAAAAAAAAAAAJRQQAAAAEAAAACIAuHvQAAA7nJD6C1wobJX6bRDE4X9Ztq5EXLo9QV3SfAGHunKP/WAA==", "amount":1, "currency_code": 1 }

Response Status Codes

200 Success
400 Bad Request
500 Internal Server Error

Response Body

 { "min_coin":"AAEAAQAAAAAAAAAAAAJRQQAAAAEAAAACIAuHvQAAA7nJD6C1wobJX6bRDE4X9Ztq5EXLo9QV3SfAGHunKP/WAA==", "dif_coin":"AAEAAQAAAAAAAAAAAAJRQwAAAAEAAAABIAuMfQAAAC5d1zi/IRKcxE0HxVPhuCkMxsH/q2cQyzTamw+sI2xDMw==", "sub_coin":"AAEAAQAAAAAAAAAAAAJRRAAAAAEAAAABIAuMfQAAAC5lEqbs5+IMkjUBJhyiPmDZOjwnCkB79jTZpVxIUNkWBQ==", "min_coin_img":"AAEAAQAAAAAAAAAAAAHeiwAAAA...el0qU0AAAAASUVORK5CYII=", "dif_coin_img":"AAEAAQAAAAAAAAAAAAHeiwAAAA...ujPCS8AAAAASUVORK5CYII=", "sub_coin_img":"AAEAAQAAAAAAAAAAAAHeiwAAAA...SgydZQAAAAASUVORK5CYII=" } 

Step 2 - Split Coin Confirm request and response

Request Header

URL: https://j8e7vhhb43.execute-api.eu-west-1.amazonaws.com/prod/split-confirm
Method: POST
content-type: application/json

Request Body

{ "min_coin":"AAEAAQAAAAAAAAAAAAJRQQAAAAEAAAACIAuHvQAAA7nJD6C1wobJX6bRDE4X9Ztq5EXLo9QV3SfAGHunKP/WAA==", "dif_coin":"AAEAAQAAAAAAAAAAAAJRQwAAAAEAAAABIAuMfQAAAC5d1zi/IRKcxE0HxVPhuCkMxsH/q2cQyzTamw+sI2xDMw==", "sub_coin":"AAEAAQAAAAAAAAAAAAJRRAAAAAEAAAABIAuMfQAAAC5lEqbs5+IMkjUBJhyiPmDZOjwnCkB79jTZpVxIUNkWBQ==" } 

Response Status Codes

200 Success
400 Bad Request
500 Internal Server Error

On successful execution of the Split Coin command, a Success status code is returned along with the two resulting coins. When the client has checked that the two resulting coins combined is equal to the original coin, can then proceed to the Split Coin confirm command.

On successful execution, a Success status code is returned.

Merge Coin operation

With the merge coin operation, it simply adds two coins together to produce one larger value coin.

When passing coins to the Cash Module, each coin must be labelled to identify which role and the following parameters display the processes during each calculation.

aug_coin The coin to which another is added Base64 encoded coin text
aug_coin_img The coin to which another is added Base64 encoded coin image
add_coin The coin which is added to the augend coin Base64 encoded coin text
add_coin_img The coin which is added to the augend coin Base64 encoded coin image
currency_code The coin currency Integer
res_coin The resulting merged coin Base64 encoded coin text
res_coin_img The resulting merged coin Base64 encoded coin image

Merge Coin Command Step walkthrough

Step 1 - Merge Coin request and response

Request Header

URL: https://j8e7vhhb43.execute-api.eu-west-1.amazonaws.com/prod/merge-coins
Method: POST
content-type: application/json

Request Body

{ "aug_coin":"AAEAAQAAAAAAAAAAAAHelgAAAAEAAAPoHgGF7gAAAGUHeOqmuTgM/y9xfagAs7kUH6itKJneNGmBWa3/B//nPg==", "add_coin":"AAEAAQAAAAAAAAAAAAHejAAAAAEAAAADAAAAAAAAAAChGrNzMPr2QJ+jK1d2c1zGgwr9j9M6LiUDL2L/1lLG/Q==", "currency_code":1 }

Response Status Codes

200 Success
400 Bad Request
500 Internal Server Error

Response Body

 { "aug_coin":"AAEAAQAAAAAAAAAAAAJRQQAAAAEAAAACIAuHvQAAA7nJD6C1wobJX6bRDE4X9Ztq5EXLo9QV3SfAGHunKP/WAA==", "add_coin":"AAEAAQAAAAAAAAAAAAJRPwAAAAEAAAABIAuHnwAAAIQ1wS2NOcn4U9g0p2OV2JOJYV2ikGP6ozfg3zQGlz0E+g==", "res_coin":"AAEAAQAAAAAAAAAAAAJRQgAAAAEAAAADIAuH1gAAAxW/vBDuqX315gX2tcuE8F9LmBYy1HsMUWRn1wdgC77hMQ==" "aug_coin_img":"iVBORw0KGgoAAAANSUhEUgAAAT4AAAE9CAIAAAA...Jggg==", "add_coin_img":"iVBORw0KGgoAAAANSUhEUgAAAT4AAAE9CAIAAAA...SuQmCC", "res_coin_img":"iVBORw0KGgoAAAANSUhEUgAAAT4AAAE9CAIAAAA...5CYII=" } 

Step 2 - Merge Coin Confirm request and response

Request Header

URL: https://j8e7vhhb43.execute-api.eu-west-1.amazonaws.com/prod/merge-confirm
Method: POST
content-type: application/json

Request Body

{ "aug_coin":"AAEAAQAAAAAAAAAAAAJRQQAAAAEAAAACIAuHvQAAA7nJD6C1wobJX6bRDE4X9Ztq5EXLo9QV3SfAGHunKP/WAA==", "add_coin":"AAEAAQAAAAAAAAAAAAJRPwAAAAEAAAABIAuHnwAAAIQ1wS2NOcn4U9g0p2OV2JOJYV2ikGP6ozfg3zQGlz0E+g==", "res_coin":"AAEAAQAAAAAAAAAAAAJRQgAAAAEAAAADIAuH1gAAAxW/vBDuqX315gX2tcuE8F9LmBYy1HsMUWRn1wdgC77hMQ==" } 

Response Status Codes

200 Success
400 Bad Request
500 Internal Server Error

On successful execution of the Merge Coin command, a Success status code is returned along with the resulting coin. When the client has checked the resulting coin is correct, can then proceed to the Merge Coin confirm command.

On successful execution, a Success status code is returned.

Contact Us

If you are researching or planning a project or just need some information please get in touch and we will get right back to you.

captcha

Our Address

TIBADO Ltd.
Gratwicke House
10 East Street, Littlehampton
West Sussex, BN17 6AW

t: +44 (0)1903 721 668
e: This email address is being protected from spambots. You need JavaScript enabled to view it.

Connect With Us