Toronet Portal API

 

v0/v1

 

3rd Edition

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Toro Software Development Corp.

 

 

 

 

Date: May. 13, 2023

Updated May 17 2023

 

 


 

Contents

1. Overview.. 8

1.1 Blockchain Call Types. 8

1.2 Non-Custodial Calls. 8

1.3 Custodial Calls. 8

1.4 API Call Format 10

2. KeyStore Calls. 10

2.1 createKey. 10

2.2 getKey. 10

2.3 verifyKey. 11

2.4 updatekeypwd. 12

2.5 importkey. 12

2.6 deletekey. 13

3. Blockchain calls. 13

3.1        getstatus. 13

3.2        getblock. 13

3.3        gettransaction. 14

3.4        getreceipt 14

3.5        getrevertreason. 14

5. TNS calls. 26

5.1        getname. 26

5.2        getaddr. 26

5.3        isnameused. 27

5.4        isaddrassigned. 27

5.5        isseton. 27

5.6        isupdateon. 28

5.7        isdeleteon. 28

6. Role calls. 28

6.1        List of roles available. 28

6.2        isdebugger. 29

6.3        getdebuggerindex. 29

6.4        getnumberofdebugger. 29

6.5        getdebuggerbyindex. 29

6.6        issuperadmin. 30

6.7        getsuperadminindex. 30

6.8        getnumberofsuperadmin. 30

6.9        getsuperadminbyindex. 30

6.10     isadmin. 31

6.11     getadminindex. 31

6.12     getnumberofadmin. 31

6.13     getadminbyindex. 31

7. Token calls. 31

7.1        getbalance. 31

7.2        getname. 31

7.3        getsymbol 32

7.4        getdecimal 32

7.5        getminimumallowance. 32

7.6        getmaximumallowance. 33

7.7        getallowance. 33

7.8        gettransactionfeefixed. 33

7.9        gettransactionfeepercentage. 34

7.10     gettransactionfee. 34

7.11     getcommissionaddress. 34

7.12     getcommissionpercentage. 34

7.13     getreserve. 35

7.14     gettoller. 35

7.15     getotalcap. 35

7.16     gettotalreserving. 36

7.17     gettotalcirculating. 36

7.18     isenrolled. 36

7.19     isfrozen. 36

7.20     getallowselfenroll 37

7.21     getallowselftransactionfee. 37

7.22     getselftransactionfeefixed. 37

7.23     getselftransactionfeepercentage. 38

7.24     getselftransactionfee. 38

7.25     getallowselfallowance. 38

7.26     getselfminimumallowance. 39

7.27     getselfmaximumallowance. 39

7.28     getselfallowance. 39

7.29     istransferon. 40

7.30     isminton. 40

7.31     isburnon. 40

7.32     transfer. 40

7.33     calculatetxfee. 41

8. Currency calls. 41

8.1        List of supported currencies. 41

8.2        getbalance. 41

8.3        getname. 42

8.4        getsymbol 42

8.5        getdecimal 42

8.6        getexchangerate. 42

8.7        getminimumallowance. 43

8.8        getmaximumallowance. 43

8.9        getallowance. 43

8.10     gettranscationfeefixed. 44

8.11     gettransactionfeepercentage. 44

8.12     gettransactionfee. 44

8.13     getcommissionaddress. 44

8.14     getcommissionpercentage. 45

8.15     gettorobuyfeefixed. 45

8.16     gettorobuyfeepercentage. 45

8.17     gettorobuyfee. 45

8.18     gettoroselffeefixed. 46

8.19     gettorosellfeepercentage. 46

8.20     gettorosellfee. 46

8.21     getcurrencyimportfeefixed. 46

8.22     getcurrencyimportfeepercentage. 46

8.23     getcurrencyimportfee. 47

8.24     getcurrencyexportfeefixed. 47

8.25     getcurrencyexportfeepercentage. 47

8.26     getcurrencyexportfee. 47

8.27     getreserve. 47

8.28     gettoller. 47

8.29     gettotalcap. 47

8.30     gettotalreserving. 47

8.31     gettotalcirculating. 48

8.32     isenrolled. 48

8.33     isfrozen. 48

8.34     getallowselfenroll 48

8.35     getallowselftransactionfee. 48

8.36     getselftransactionfeefixed. 48

8.37     getselftransactionfeepercentage. 48

8.38     getselftransactionfee. 49

8.39     getallowselfallowance. 49

8.40     getselfallowance. 49

8.41     getallowselftorobuyfee. 49

8.42     getselftorobuyfeefixed. 49

8.43     getselftorobuyfeepercentage. 49

8.44     getselftorobuyfee. 49

8.45     getallowselftorosellfee. 50

8.46     getselftorosellfeefixed. 50

8.47     getselftorosellfeepercentage. 50

8.48     getselftorosellfee. 50

8.49     getallowselfcurrencyimportfee. 50

8.50     getselfcurrencyimportfeefixed. 50

8.51     getselfcurrencyimportfeepercentage. 50

8.52     getselfcurrencyimportfee. 51

8.53     getallowselfcurrencyexportfee. 51

8.54     getselfcurrencyexportfeefixed. 51

8.55     getselfcurrencyexportfeepercentage. 51

8.56     getselfcurrencyexportfee. 51

8.57     istransferon. 51

8.58     isbuyon. 51

8.59     issellon. 52

8.60     isimporton. 52

8.61     isexporton. 52

9              Crypto calls. 52

9.1        List of all supported cryptocurrencies. 52

9.2        getbalance. 52

9.3        getname. 53

9.4        getsymbol 53

9.5        getdecimal 53

9.6        getexchangerate. 53

9.7        getminimumallowance. 54

9.8        getmaximumallowance. 54

9.9        getallowance. 54

9.10     gettranscationfeefixed. 54

9.11     gettransactionfeepercentage. 55

9.12     gettransactionfee. 55

9.13     getcommissionaddress. 55

9.14     getcommissionpercentage. 56

9.15     gettorobuyfeefixed. 56

9.16     gettorobuyfeepercentage. 56

9.17     gettorobuyfee. 56

9.18     gettoroselffeefixed. 57

9.19     gettorosellfeepercentage. 57

9.20     gettorosellfee. 57

9.21     getcryptoimportfeefixed. 57

9.22     getcryptoimportfeepercentage. 57

9.23     getcryptoimportfee. 57

9.24     getcryptoexportfeefixed. 58

9.25     getcryptoexportfeepercentage. 58

9.26     getcryptoexportfee. 58

9.27     getreserve. 58

9.28     gettoller. 58

9.29     gettotalcap. 58

9.30     gettotalreserving. 58

9.31     gettotalcirculating. 59

9.32     isenrolled. 59

9.33     isfrozen. 59

9.34     getallowselfenroll 59

9.35     getallowselftransactionfee. 59

9.36     getselftransactionfeefixed. 59

9.37     getselftransactionfeepercentage. 59

9.38     getselftransactionfee. 59

9.39     getallowselfallowance. 60

9.40     getselfallowance. 60

9.41     getallowselftorobuyfee. 60

9.42     getselftorobuyfeefixed. 60

9.43     getselftorobuyfeepercentage. 60

9.44     getselftorobuyfee. 60

9.45     getallowselftorosellfee. 60

9.46     getselftorosellfeefixed. 61

9.47     getselftorosellfeepercentage. 61

9.48     getselftorosellfee. 61

9.49     getallowselfcryptoimportfee. 61

9.50     getselfcryptoimportfeefixed. 61

9.51     getselfcryptoimportfeepercentage. 61

9.52     getselfcryptoimportfee. 61

9.53     getallowselfcryptoexportfee. 62

9.54     getselfcryptoexportfeefixed. 62

9.55     getselfcryptoexportfeepercentage. 62

9.56     getselfcryptoexportfee. 62

9.57     istransferon. 62

9.58     isbuyon. 62

9.59     issellon. 62

9.60     isimporton. 63

9.61     isexporton. 63

 


 

1. Overview

 

In this API, RESTful https calls are provided to execute fundamental Tórónet tasks.

 

In this manual, both signed (non-custodial) and unsigned (custodial) calls will be introduced:

 

The current base access point for the RESTful API on the test portal is 

 

https://testnet.toronet.org/api/

 

In this manual, the syntax, arguments, and responses will be introduced.

 

 

 

1.1 Blockchain Call Types

 

There are two types of blockchain calls:

 

1         Calls that request information from the blockchain. Blockchain information is public and transparent. There are several calls that is provided to access such data. However, while data is publicly available, note that such data could also be encrypted by process or smart contracts; which ensures that certain information can still be made accessible only to owners of such data. Calls that request information do not typically need to be signed to obtain such information.

 

2         Calls that make changes to the blockchain. These calls add data to a block, and needs to be added by the blockchain consensus algorithm. The process pf generating a new block is sometimes called mining. All calls that generate data that needs to be added to the blockchain needs to be signed by an account. The account could be a user account, or a contract account. To sign an account, the account owner needs to have access and ownership to the primary key of the account. Only that primary key can encrypt the information corresponding to the public key. There are two ways this can be accomplished, and they are described below.

 

 

1.2 Non-Custodial Calls

 

For non-custodial calls, the primary keys for the accounts are located on the device of the owner of the account. The account owner accesses that primary key, utilizing software on that device to encrypt the information. The encrypted information is then transmitted to the blockchain network where is will be saved in a pool of potential new transactions or data intended to be included in the next block. The blockchain nodes then pick up that transaction or block of data, verifies that it is duly signed, and if so will include it in a block and process the block as the next block through the consensus procedure of the chain.

 

Sometimes, the primary key itself is saved in a keyfile, which is then password-protected. The user can then use the password to simply unlock and use it to sign the transaction they intend to send. The primary key itself, in that situation, does not need to be directly accessed or even known by the user – just the password. Note that gaining access to the keyfile, without knowing the password accomplishes absolutely nothing. What makes the process non-custodial is simply the location of the primary key, or it’s representative keyfile.

 

 

1.3 Custodial Calls

 

For custodial calls, the keyfile described above is saved on the API server. However, the password to it is still only known to the user. To initiate a transaction, the API software over a secure layer would request the user to use their password to unlock the keyfile and then sign the intended transaction the same way as for custodial transaction. Note that similarly, the keyfile itself is completely useless without the password that can unlock it. This process is similar to the overall blockchain principle which we term data in plain sight secured by sovereign users. Blockchain data are available publicly made possible via encryption, and only those who have ownership or authority over such data can order, decrypt, or modify the data.


 

1.4 API Call Format

 

All Toronet API calls use JSON format for the input, as well as the output. Much of the input and output are also formatted as name/value pairs. This becomes clear after reviewing a few examples. In the next few sections, we review all currently available calls including their input, output, and in the case of an error, the various error messages returned.

 

2. KeyStore Calls

 

2.1 createKey  

 

This call creates a new blockchain address. The syntax of the call is as follows:

 

{

      "op": "createkey",

      "params":

   [

                        {

 "name""password",

           "value"“Toronet”

                        }

   ]

}

 

 

The argument or attribute of the call are:

 

Attributes

Type

Meaning

op

string

Policy unique id

name

string constant

Name of insurance company

value

string

Insurance category / insurance class / insurance type

Policy insured item type

 

The response for this call is a new public address or account on the blockchain.

 

Response Attributes

Type

Meaning

Address

string/address

Policy unique id

Policy insured item type

 

2.2 getKey

 

This call retrieves the key of the blockchain address. The payload is as follows:

 

{

      "op": "getkey",

      "params":

   [

                        {

 "name""addr",

           "value"“0x432c7294c152c4f4930373a79e833cd22b9925b3”

                        }

   ]

}

 

The arguments of the call are:

 

Attributes

Type

Meaning

op

string

Policy unique id

name

string constant

Name of insurance company

value

string

Insurance category / insurance class / insurance type

Policy insured item type

 

The response for this call is the keystoredata

 

{

    "result": true,

    "keystoredata": {

        "address": "432c7294c152c4f4930373a79e833cd22b9925b3",

        "crypto": {

            "cipher": "aes-128-ctr",

            "ciphertext": "561a6c0998109babb828fa51a54e03557ca6620854ec41b9a99ca3e66d517b21",

            "cipherparams": {

                "iv": "ab4c9793b35edb7315c7cc851a29074e"

            },

            "mac": "17063e95e2b850c4f3714c30e3e5875705e4684b46fdeba0f48aa60167bcdc57",

            "kdf": "pbkdf2",

            "kdfparams": {

                "c": 262144,

                "dklen": 32,

                "prf": "hmac-sha256",

                "salt": "beee530d83acaa730d4df6857148e83256125f79cf50da37f4a09e38b5ce4fb8"

            }

        },

        "id": "01b9c4ea-8eeb-48f9-8d68-ddc88ed2942d",

        "version": 3

    },

    "message": "keystore record has been found"

}

2.3 verifyKey

 

This call is used to verify the validity of a cryptographic key stored in the keystore. The payload is as follows:

 

 

{

      "op": "verifykey",

      "params":

   [

                        {

 "name""addr",

           "value"“0x432c7294c152c4f4930373a79e833cd22b9925b3”

                        }

          {

 "name""pwd",

           "value"“toronet”

                        }

 

   ]

}

 

The response for this call is the result

 

{
    "result": true,
    "message": "keystore record is found and the password has been verified"
}

 

 

2.4 updatekeypwd

 

This call is used to update the key stored in the keystore. The payload is as follows:

 

 

{

      "op": "updatepwd",

      "params":

   [

                        {

 "name""addr",

           "value"“0x432c7294c152c4f4930373a79e833cd22b9925b3”

                        }

          {

 "name""oldpwd",

           "value"“toronet2”

                        }

          {

 "name""newpwd",

           "value"“toronet”

                        }

 

 

   ]

}

 

The arguments of the call are:

 

Attributes

Type

Meaning

op

string

Policy unique id

name

string constant

Name of insurance company

value

string

Insurance category / insurance class / insurance type

oldpwd & pwd

 

string

Old password and new password

Policy insured item type

 

2.5 importkey

 

This is called to import a keystore record by private key and password, The payload is as follows:

 

 

{ "op":"importkey", "params":[{"name":"prvkey", "value":"8da4ef21b864d2cc526dbdb2a120bd2874c36c9d0a1fb7f8c63d7f7a8b41de8f"}, {"name":"pwd", "value":"toronet"}] }

 

 

The response for this call is:

 

{

    "result": true,

    "address": "0x63fac9201494f0bd17b9892b9fae4d52fe3bd377",

    "message": "keystore record has been imported"

}

 

2.6 deletekey

 

This call is used to delete key from the API server. The payload is as follows:

 

{ "op":"deletekey", "params":[{"name":"addr", "value":"63fac9201494f0bd17b9892b9fae4d52fe3bd377"}, {"name":"pwd", "value":"toronet"}] }

 

 

The response for this call is:

 

{

    "result": true,

    "message": "keystore record has been deleted"

}

 

 

3. Blockchain calls

 

3.1 getstatus

 

This call is used to get basic information about the Blockchain.

 

http://testnet.toronet.org/api/blockchain

 

The response for this call is:

 

{

    "result": true,

    "blockchaininfo": {

        "chain": "testnet",

        "chainid": 54321,

        "latestblock": 11575975,

        "datetime": "2023/05/17 10:09:54"

    },

    "message": "current blockchain status has been updated"

}

 

3.2 getblock

 

This call is used to query the latest block on the Blockchain. The payload is as follows:

 

{ "op":"getblock", "params":[{"name":"id", "value":"latest"}] }

 

The response for this call is:

 

{

    "result": true,

    "block": {

        "difficulty": "1",

        "extraData": "0xd883010a03846765746888676f312e31352e37856c696e7578000000000000003dceef6a6945796b0800db6ca275925fb0477983ccfaa121d23f6af3e8082c8b5f55dc0b42fbd22f35b1831f79641a10c339135dcb61efc62b3bbd8ef303919401",

        "gasLimit": 1000000000,

        "gasUsed": 0,

        "hash": "0xae2b664309d0b62f3afd9eebf54814169427193f636995e3d03dd9d7fb51a4d8",

        "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",

        "miner": "0x0000000000000000000000000000000000000000",

        "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",

        "nonce": "0x0000000000000000",

        "number": 11575996,

        "parentHash": "0x8ec9b7bff6a75df8a9e55c5ba6f4a252419db817df6675d7b886823e97604ea2",

        "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",

        "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",

        "size": 610,

        "stateRoot": "0xb90ffca291a40ed452566f7de3011526efffa81903c11bb6f0737e67f094a790",

        "timestamp": 1684318298,

        "totalDifficulty": "20277133",

        "transactions": [],

        "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",

        "uncles": []

    },

    "message": "block 'latest' has been queried"

}

 

 

3.3 gettransaction

 

This call is used to retrieve information about a specific transaction in the Blockchain. The payload is as follows:

 

{ "op":"gettransaction", "params":[{"name":"id", "value":"0xed23ba5f0e66ab2a0fec6cce2d91cbb8015b8de99b6ace976ef0d584791122f9"}] }

 

3.4 getreceipt

 

This call is used to get transaction receipt info by transaction hash

 

{ "op":"getreceipt", "params":[{"name":"id", "value":"0xed23ba5f0e66ab2a0fec6cce2d91cbb8015b8de99b6ace976ef0d584791122f9"}] }

 

3.5 getrevertreason

 

This call is used to get revert reason with transaction hash. The payload for this request is as follows:

 

{ "op":"getrevertreason", "params":[{"name":"id", "value":"0xedd9369339b2b56c466b266df3c812359ba6bab1375f72dd8ae520522448808a"}] }

 

 

5. TNS calls

 

5.1 getname

 

This call is used to retrieve the name associated with a specific address; the payload is as follows:

 

{ "op":"getname", "params":[{"name":"addr", "value":"0x43F78b342084e370f10e0Cd07d56d95c1728C9D4"}] }

 

The response for this call is:

 

5.2 getaddr

 

This call is used to retrieve the address associated with a specific name. The payload is as follows:

 

{ "op":"getaddr", "params":[{"name":"name", "value":"owner"}] }

 

The response for this call is:

 

{

    "result": true,

    "address": "0x314EF41554Dc423C88836DCDce55b3f61d1804B1",

    "message": "tns address for 'owner' is '0x314EF41554Dc423C88836DCDce55b3f61d1804B1'"

}

 

5.3 isnameused

 

This call is used to check if a specific name is already used in the TNS, the payload is as follows:

 

{ "op":"isnameused", "params":[{"name":"name", "value":"owner"}] }

 

 

The response for this call is:

 

{

    "result": true,

    "isused": true,

    "message": "name 'owner' is used in tns"

}

 

 

5.4 isaddrassigned

 

This call is used to check if a specific address has been assigned in the TNS. They payload for this request is as follows:

 

{ "op":"isaddrassigned", "params":[{"name":"addr", "value":"0x43F78b342084e370f10e0Cd07d56d95c1728C9D4"}] }

 

 

The response for this call is:

 

{

    "result": true,

    "isassigned": false,

    "message": "address '0x43F78b342084e370f10e0Cd07d56d95c1728C9D4' is not assigned in tns"

}

 

 

5.5 isseton

 

This call is used to check if the TNS is currently enabled

 

{ "op":"isseton", "params":[] }

 

 

The response for this call is:

 

{

    "result": true,

    "ison": false,

    "message": "client tns name set is off"

}

 

 

5.6 isupdateon

 

This call is used to check if the update functionality of the TNS is currently enabled

 

{ "op":"isupdateon", "params":[] }

 

 

The response of this call is:

 

{

    "result": true,

    "ison": false,

    "message": "client tns name update is off"

}

 

5.7 isdeleteon

 

This call is used to check if the delete functionality of the TNS is currently enabled

 

{ "op":"isdeleteon", "params":[] }

 

The response for this call is:

 

{

    "result": true,

    "ison": false,

    "message": "client tns name delete is off"

}

 

6. Role calls

 

6.1 List of roles available

 

The list of roles that are currently available on the blockchain are

-          debugger

-          superadmin

-          admin

 

http://testnet.toronet.org/api/role/debugger

 

6.2 isdebugger

 

This call is used to check if the role of an address is debugger, the payload is as follows:

 

{ "op":"isdebugger", "params":[{"name":"addr", "value":"0x9d78cbc4d102bf38c825b3f6460fc2d89852486a"}] }

 

 

The sample response for this call is:

 

{

    "result": true,

    "isdebugger": true,

    "message": "'0x9d78cbc4d102bf38c825b3f6460fc2d89852486a' is a debugger"

}

 

6.3 getdebuggerindex

 

This call is used to get the index of the debugger, the payload is as follows:

 

{ "op":"getdebuggerindex", "params":[{"name":"addr", "value":"0x9d78cbc4d102bf38c825b3f6460fc2d89852486a"}] }

 

The sample response for this call is:

 

{

    "result": true,

    "index": 0,

    "message": "index of debugger '0x9d78cbc4d102bf38c825b3f6460fc2d89852486a' is 0"

}

 

6.4 getnumberofdebugger

 

This call is used to get the total number of debuggers on the blockchain, the payload is as follows:

 

{ "op":"getnumberofdebugger", "params":[] }

 

The sample response for this call is:

 

{

    "result": true,

    "number": "2",

    "message": "There are 2 debuggers"

}

 

6.5 getdebuggerbyindex

 

This call is used to get a debugger by index, the payload is as follows:

 

{ "op":"getdebuggerbyindex", "params":[{"name":"index", "value":0}] }

 

The sample response for this call is:

 

{

    "result": true,

    "debugger": "0x9d78cBc4D102bf38c825B3f6460Fc2D89852486A",

    "message": "debugger at index 0 is '0x9d78cBc4D102bf38c825B3f6460Fc2D89852486A'"

}

 

 

http://testnet.toronet.org/api/role/superadmin

 

6.6 issuperadmin

 

This call is used to check if the role of an address is superadmin, the payload is as follows:

 

{ "op":"issuperadmin", "params":[{"name":"addr", "value":"0xd81f3d3ec6eedbc1e1d6245d1adfff5e492bb787"}] }

 

The sample response for this call is:

 

{

    "result": true,

    "issuperadmin": true,

    "message": "'0x9d78cbc4d102bf38c825b3f6460fc2d89852486a' is not a superadmin"

}

 

6.7 getsuperadminindex

 

This call is used to get the index of a superadmin, the payload is as follows:

 

{ "op":"getsuperadminindex", "params":[{"name":"addr", "value":"0xd81f3d3ec6eedbc1e1d6245d1adfff5e492bb787"}] }

 

6.8 getnumberofsuperadmin

 

This call is used to get the number of superadmins in the blockchain

 

{ "op":"getnumberofsuperadmin", "params":[] }

 

The sample response for this call is:

 

{

    "result": true,

    "number": "3",

    "message": "There are 3 super admins"

}

 

6.9 getsuperadminbyindex

 

This call is used to get a superadmin by index, the payload is as follows:

 

{ "op":"getsuperadminbyindex", "params":[{"name":"index", "value":0}] }

 

 

http://testnet.toronet.org/api/role/admin

 

6.10         isadmin

 

This call is used to check whether an address has the role of an admin, the payload is as follows:

 

{ "op":"isadmin", "params":[{"name":"addr", "value":"0xea45bcd1b04233f9240c01d52f773b832704fed0"}] }

 

6.11         getadminindex

 

This call is used to get the index of a specific admin in the blockchain, the payload is as follows:

 

{ "op":"getadminindex", "params":[{"name":"addr", "value":"0xea45bcd1b04233f9240c01d52f773b832704fed0"}] }

 

6.12         getnumberofadmin

 

This call is used to get the total number of admins in the blockchain

 

{ "op":"getnumberofadmin", "params":[] }

 

6.13         getadminbyindex

 

This call is used to get an admin by index, the payload is as follows:

 

{ "op":"getadminbyindex", "params":[{"name":"index", "value":0}] }

 

7. Token calls

 

7.1 getbalance

 

This call is used to get The Tọ̀rọ̀ balance for an address, the payload is as follows:

 

{ "op":"getbalance", "params":[{"name":"addr", "value":"0x314ef41554dc423c88836dcdce55b3f61d1804b1"}] }

 

The response for this call is:

 

{

    "result": true,

    "balance": "400",

    "message": "toro balance for '0x314ef41554dc423c88836dcdce55b3f61d1804b1' is '400'"

}

 

7.2 getname

 

This call is used to get the token’s name.

 

{ "op":"getname", "params":[] }

 

The response for this call is:

 

{

    "result": true,

    "name": "Toro",

    "message": "token name is 'Toro'"

}

 

 

7.3 getsymbol

 

This call is used to get the token’s symbol

 

{ "op":"getsymbol", "params":[] }

 

The response for this call is:

 

{

    "result": true,

    "symbol": "TORO",

    "message": "token symbol is 'TORO'"

}

 

7.4 getdecimal

 

This call is used to get the token’s decimal

 

{ "op":"getdecimal", "params":[] }

 

 

The response for this call is:

 

{

    "result": true,

    "decimal": "18",

    "message": "token decimal is '18'"

}

 

 

7.5 getminimumallowance

 

This call is used to get the token’s minimum transfer allowance

 

{ "op":"getminimumallowance", "params":[] }

 

 

The response for this call is:

 

{

    "result": true,

    "minimumallowance": "0",

    "message": "toro minimum transfer allowance is '0'"

}

 

7.6 getmaximumallowance

 

This call is used to get the token’s maximum transfer allowance

 

{ "op":"getmaximumallowance", "params":[] }

 

 

The response for this call is:

 

{

    "result": true,

    "maximumallowance": "10000",

    "message": "toro maximum transfer allowance is '10000'"

}

 

 

7.7 getallowance

 

This call is used to get the maximum / minimum transfer allowance

 

{ "op":"getallowance", "params":[] }

 

 

The response for this call is:

 

{

    "result": true,

    "minimumallowance": "0",

    "maximumallowance": "10000",

    "message": "toro maximum / minimum transfer allowance are '10000 / 0'"

}

 

7.8 gettransactionfeefixed

 

This call is used to get the transaction (this is fixed)

 

{ "op":"gettransactionfeefixed", "params":[] }

 

The response for this call is:

 

 {

    "result": true,

    "txfeefixed": "0",

    "message": "toro fixed transaction fee is '0'"

}

 

 

7.9 gettransactionfeepercentage

 

This call is used to get the transaction fee in percentage (%)

 

{ "op":"gettransactionfeepercentage", "params":[] }

 

 

The sample response for this response is:

 

{

    "result": true,

    "txfeepercentage": "0",

    "message": "toro percentage transaction fee is '0%'"

}

 

 

7.10         gettransactionfee

 

This call is used to get the transaction fee

 

{ "op":"gettransactionfee", "params":[] }

 

The sample response for this call is:

 

{

    "result": true,

    "txfeefixed": "0",

    "txfeepercentage": "0",

    "message": "toro fixed / percentage transfer fee are '0' / '0%'"

}

 

 

7.11         getcommissionaddress

 

This call is used to get the commission address

 

{ "op":"getcommissionaddress", "params":[] }

 

The sample response for this call is:

 

{

    "result": true,

    "commissionaddress": "0xa231BB16803d8F7dcb6885B04183c9E71F4cdDF3",

    "message": "commission address is '0xa231BB16803d8F7dcb6885B04183c9E71F4cdDF3'"

}

 

 

7.12         getcommissionpercentage

 

This call is used to get the commission percentage (%)

 

{ "op":"getcommissionpercentage", "params":[] }

 

The response for this call is:

 

{

    "result": true,

    "commissionpercentage": "0",

    "message": "commission percentage is '0 %'"

}

 

 

7.13         getreserve

 

This call is used to get the reserve address

 

{ "op":"getreserve", "params":[] }

 

The response for this call is:

 

{

    "result": true,

    "reserve": "0xf3CDfC4a1DCE2D98FF878971626B798279954c43",

    "message": "reserve address is '0xf3CDfC4a1DCE2D98FF878971626B798279954c43'"

}

 

 

7.14         gettoller

 

This call is used to get the toller address

 

"op":"gettoller", "params":[] }

 

The sample response for this call is:

 

{

    "result": true,

    "toller": "0xa231BB16803d8F7dcb6885B04183c9E71F4cdDF3",

    "message": "toller address is '0xa231BB16803d8F7dcb6885B04183c9E71F4cdDF3'"

}

 

 

7.15         getotalcap

 

This call is used to get the token’s total cap

 

{ "op":"gettotalcap", "params":[] }

 

 

The sample response for this call is:

 

{

    "result": true,

    "totalcap": "0",

    "message": "toro total cap is '0'"

}

 

7.16         gettotalreserving

 

This call is used to get the total token that is currently in reserve

 

{ "op":"gettotalreserving", "params":[] }

 

 

The sample response for this call is:

 

{

    "result": true,

    "totalreserving": "71987.274205605201720169",