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",

    "message": "toro total reserving is '71987.274205605201720169'"

}

 

 

7.17         gettotalcirculating

 

This call is used to get to total token that is currently circulating

 

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

 

 

The sample response for this call is:

 

{

    "result": true,

    "totalcirculating": "38412.725794394798279831",

    "message": "toro total circulating is '38412.725794394798279831'"

}

 

7.18         isenrolled

 

This call is used to check if a wallet address has been enrolled for Toro, the payload is as follows:

 

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

 

 

The sample response is:

 

{

    "result": true,

    "isenrolled": true,

    "message": "'0x314ef41554dc423c88836dcdce55b3f61d1804b1' is enrolled for toro"

}

 

7.19         isfrozen

 

This call is used to check if a wallet address is frozen, the payload is as follows:

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "isfrozen": false,

    "message": "'0x314ef41554dc423c88836dcdce55b3f61d1804b1' is not frozen"

}

 

 

7.20         getallowselfenroll

 

This call is used to check if automatic Toro enrollment is allowed

 

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

 

 

The sample response for this call is:

 

{

    "result": true,

    "allowselfenroll": true,

    "message": "automatic toro enrollment is allowed"

}

 

 

7.21         getallowselftransactionfee

 

This call is used to check if account specified transaction fee is allowed, the payload is as follows:

 

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

 

 

The sample response for this call is:

 

{

    "result": true,

    "allowselftransactionfee": false,

    "message": "account specified transaction fee is not set for '0x314ef41554dc423c88836dcdce55b3f61d1804b1'"

}

 

7.22         getselftransactionfeefixed

 

This call is used to check if account specified transaction fee is allowed, the payload is as follows:

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "selftxfeefixed": "0",

    "message": "toro account specified fixed transaction fee for '0x314ef41554dc423c88836dcdce55b3f61d1804b1' is '0'"

}

 

7.23         getselftransactionfeepercentage

 

This call gets the account’s specified transaction fee percentage, the payload is as follows:

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "selftxfeepercentage": "0",

    "message": "toro account specified percentage transaction fee for '0x314ef41554dc423c88836dcdce55b3f61d1804b1' is '0 %'"

}

 

7.24         getselftransactionfee

 

This call is used to get an account’s specified fixed/percentage transaction fee, the payload is as follows:

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "selftxfeefixed": "0",

    "selftxfeepercentage": "0",

    "message": "toro account specified fixed / percentage transaction fee for '0x314ef41554dc423c88836dcdce55b3f61d1804b1' are '0' / '0%'"

}

 

7.25         getallowselfallowance

 

This call is used to check if specified transfer allowance is set for a wallet address, the payload is as follows:

 

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

 

 

The sample response for this call is:

 

{

    "result": true,

    "allowselfallowance": false,

    "message": "account specified transfer allowance is not set for '0x314ef41554dc423c88836dcdce55b3f61d1804b1'"

}

 

7.26         getselfminimumallowance

 

This call is used to get the specified minimum transfer allowance for an account, the payload is as follows:

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "selfminimumallowance": "0",

    "message": "toro account specified minimum transfer allowance for '0x314ef41554dc423c88836dcdce55b3f61d1804b1' is '0'"

}

 

 

7.27         getselfmaximumallowance

 

This call is used to get the specified maximum transfer allowance for an account, the payload is as follows:

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "selfmaximumallowance": "0",

    "message": "toro account specified maximum transfer allowance for '0x314ef41554dc423c88836dcdce55b3f61d1804b1' is '0'"

}

 

 

7.28         getselfallowance

 

This call is used to get the specified minimum/maximum transfer allowance for an account, the payload is as follows:

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "selfminimumallowance": "0",

    "selfmaximumallowance": "0",

    "message": "toro account specified minimum / maximum transfer allowance for '0x314ef41554dc423c88836dcdce55b3f61d1804b1' are '0 / 0'"

}

 

7.29         istransferon

 

This call is used to check if Toro transfer is allowed

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "istransferon": true,

    "message": "toro transfer is allowed"

}

 

7.30         isminton

 

This call is used to check if Toro min is allowed

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "isminton": true,

    "message": "toro mint is allowed"

}

 

7.31         isburnon

 

This call is used to check if Toro burn is allowed

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "isburnon": true,

    "message": "toro burn is allowed"

}

 

7.32         transfer

 

This call is used to transfer Toro token from one address to the other

 

{ "op":"transfer", "params":[{"name":"client", "value":"0xf3cdfc4a1dce2d98ff878971626b798279954c43"}, {"name":"clientpwd", "value":"toronet"}, {"name":"to", "value":"0x314ef41554dc423c88836dcdce55b3f61d1804b1"}, {"name":"val", "value":"2"}] }

 

7.33         calculatetxfee

 

This call is used to calculate transaction fee

 

{ "op":"calculatetxfee", "params":[{"name":"client", "value":"0xf3cdfc4a1dce2d98ff878971626b798279954c43"}, {"name":"val", "value":"2"}] }

 

The sample response for this call is:

 

{

    "result": true,

    "fee": "0",

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

}

 

 

8. Currency calls

8.1  List of supported currencies

 

The currencies that are currently supported on the Toronet Blockchain are:

 

-          dollar

-          naira

-          euro

-          pound

-          egb

-          ksh

-          zar

 

all API examples are for Dollar. To obtain the corresponding API calls for naira, euro and other currencies, simply change the "/dollar/" to "/naira/" or "/euro/" or the corresponding currency in given API examples

 

http://testnet.toronet.org/api/currency/dollar/

8.2  getbalance

 

This call is used to get the balance of an address, the payload for this call is as follow:

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "balance": "0",

    "message": "dollar balance for '0x314ef41554dc423c88836dcdce55b3f61d1804b1' is '0'"

}

 

8.3  getname

 

This call is used to get name of the currency

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "name": "Dollar",

    "message": "currency name is 'Dollar'"

}

 

8.4  getsymbol

 

This call is used to get the symbol of the currency

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "symbol": "USD",

    "message": "currency symbol is 'USD'"

}

 

8.5 getdecimal

 

This call is used to get the currency decimal

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "decimal": "18",

    "message": "currency decimal is '18'"

}

 

8.6 getexchangerate

 

This call is used to get the current exchange rate between Toro token an a currency

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "exchangerate": "1",

    "message": "toro / dollar exchange rate is '1'"

}

 

8.7 getminimumallowance

 

This call is used to get the minimum transfer allowance for the currency

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "minimumallowance": "0",

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

}

 

8.8 getmaximumallowance

 

This call is used to get the maximum transfer allowance for the currency

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "maximumallowance": "115792089237316195423570985008687907853269984665640564039457.584007913129639935",

    "message": "dollar maximum transfer allowance is '115792089237316195423570985008687907853269984665640564039457.584007913129639935'"

}

 

8.9 getallowance

 

This call is used to get the maximum and minimum transfer allowance for a currency

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "minimumallowance": "0",

    "maximumallowance": "115792089237316195423570985008687907853269984665640564039457.584007913129639935",

    "message": "dollar maximum / minimum transfer allowance are '115792089237316195423570985008687907853269984665640564039457.584007913129639935 / 0'"

}

 

8.10         gettranscationfeefixed

 

This call is used to get the fixed transaction fee

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "txfeefixed": "0",

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

}

 

8.11         gettransactionfeepercentage

 

This call is used to get the transaction fee percentage

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "txfeepercentage": "0",

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

}

 

8.12         gettransactionfee

 

This call is used to get the transaction fixed fee and transaction fee percentage

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "txfeefixed": "0",

    "txfeepercentage": "0",

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

}

 

8.13         getcommissionaddress

 

This call is used to get the commission address

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "commissionaddress": "0xcd6B225362bc99cDf7c4FEeA23f13602A281445F",

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

}

 

8.14         getcommissionpercentage

 

This call is used to get the commission percentage

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "commissionpercentage": "0",

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

}

 

8.15         gettorobuyfeefixed

 

This call is used to get the currency fixed toro buy fee

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "txfeefixed": "0",

    "message": "dollar fixed toro buy fee is '0'"

}

 

8.16         gettorobuyfeepercentage

 

This call is used to get the currency percentage toro buy fee

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "txfeepercentage": "0",

    "message": "dollar percentage toro buy fee is '0%'"

}

 

8.17         gettorobuyfee

 

This call is used to get the fixed and percentage toro buy fee

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "txfeefixed": "0",

    "txfeepercentage": "0",

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

}

 

8.18         gettoroselffeefixed

 

This call is used to get the currency fixed toro sell fee

 

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

 

This sample response for this call is:

 

{

    "result": true,

    "txfeefixed": "0",

    "message": "dollar fixed toro sell fee is '0'"

}

 

8.19         gettorosellfeepercentage

 

This call is used to get the currency toro sell percentage

 

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

 

 

8.20         gettorosellfee

 

This call is used to get the toro sell fee and toro sell fee percentage

 

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

 

8.21         getcurrencyimportfeefixed

 

This call is used to get the currency import fee (fixed)

 

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

 

8.22         getcurrencyimportfeepercentage

 

This call is used to get the currency import fee in percentage

 

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

 

8.23         getcurrencyimportfee

 

This call is used to get the fixed / percentage currency import fee

 

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

 

 

8.24         getcurrencyexportfeefixed

 

This call is used to get the currency export fee (fixed)

 

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

 

 

8.25         getcurrencyexportfeepercentage

 

This call is used to get the currency export fee in percentage

 

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

 

8.26         getcurrencyexportfee

 

This call is used to get the fixed/percentage currency export fee

 

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

 

 

8.27         getreserve

 

This call is used to get the currency in reserve

 

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

 

8.28         gettoller

 

This call is used to get the toller address

 

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

 

8.29         gettotalcap

 

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

 

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

 

8.30         gettotalreserving

 

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

 

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

 

8.31         gettotalcirculating

 

This call is used to get the total currency that is currently circulating

 

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

 

8.32         isenrolled

 

This call is used to check if an address is currently enrolled for this currency, the payload is as follows:

 

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

 

8.33         isfrozen

 

This call is used to check if the currency of an address is currently frozen, the payload is as follows:

 

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

 

8.34         getallowselfenroll

 

This call is used to check if automatic currency enrollment is allowed

 

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

 

8.35         getallowselftransactionfee

 

This call is used to check if account specified transaction fee is allowed, the payload is as follows:

 

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

 

8.36         getselftransactionfeefixed

 

This call is used to get the transaction fee (fixed), the payload is follows:

 

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

 

8.37         getselftransactionfeepercentage

 

This call is used to get the transaction fee in percentage, the payload is as follows:

 

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

 

8.38         getselftransactionfee

 

This call is used to get the fixed and percentage transaction fee, the payload is as follows:

 

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

 

8.39         getallowselfallowance

 

This call is used to check if specified transfer allowance is set for a wallet address, the payload is as follows:

 

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

 

8.40         getselfallowance

 

This call is used to get the minimum and maximum transfer allowance set for an address in the blockchain, the payload is as follows:

 

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

 

8.41         getallowselftorobuyfee

 

This call is used to check if account specified Toro buy fee has been set, the payload is as follows:

 

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

 

8.42         getselftorobuyfeefixed

 

This call is used to check the specified dollar fixed Toro buy fee for an address, the payload is as follows:

 

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

 

8.43         getselftorobuyfeepercentage

 

This call is used to check the specified percentage for dollar/Toro buy fee for an address, the payload is as follows:

 

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

 

8.44         getselftorobuyfee

 

This call is used to check the account specified Toro buy fee, the payload is as follows:

 

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

 

8.45         getallowselftorosellfee

 

This call is used to check if account specified Toro sell fee has been set, the payload is as follows:

 

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

 

8.46         getselftorosellfeefixed

 

This call is used to check the specified dollar fixed Toro sell fee for an address, the payload is as follows:

 

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

 

8.47         getselftorosellfeepercentage

 

This call is used to check the specified percentage for dollar/Toro sell fee for an address, the payload is as follows:

 

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

 

8.48         getselftorosellfee

 

This call is used to check the account specified Toro sell fee; the payload is as follows:

 

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

 

8.49         getallowselfcurrencyimportfee

 

This call is used to check if the account specified import fee has been set for an address, the payload is as follows:

 

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

 

8.50         getselfcurrencyimportfeefixed

 

This call is used to check the fixed currency import fee for an address, the payload is as follows:

 

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

 

8.51         getselfcurrencyimportfeepercentage

 

This call is used to check the currency import fee in percentage, the payload is as follows:

 

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

 

8.52         getselfcurrencyimportfee

 

This call is used to get the specified fixed and percentage import fee for an address, the payload is as follows:

 

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

 

8.53         getallowselfcurrencyexportfee

 

This call is used to check if a specified fixed and percentage export fee has been set for an address, the payload is as follows:

 

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

 

8.54         getselfcurrencyexportfeefixed

 

This call is used to get the currency fixed export fee for an address, the payload is as follows:

 

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

 

8.55         getselfcurrencyexportfeepercentage

 

This call is used to get the currency export fee percentage for an address, the payload is as follows:

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

 

8.56         getselfcurrencyexportfee

 

This call is used to get the account specified fixed and percentage export fee for an address, the payload is as follows:

 

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

 

8.57         istransferon

 

This call is used to check if currency transfer is allowed

 

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

 

8.58         isbuyon

 

This call is used to check if buying of currency is allowed

 

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

 

8.59         issellon

 

This call is used to check if selling of currency is allowed

 

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

 

8.60         isimporton

 

This call is used to check if currency import is allowed

 

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

 

8.61         isexporton

 

This call is used to check if currency export is on

 

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

 

 

9       Crypto calls

 

9.1 List of all supported cryptocurrencies

 

The currencies that are currently supported on the Toronet Blockchain are:

 

-          Ethereum (eth)

 

All API examples are cureently for Ethereum.

 

http://testnet.toronet.org/api/crypto/eth/

 

 

9.2 getbalance

 

This call is used to get the balance of an address, the payload for this call is as follow:

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "balance": "0",

    "message": "eth balance for '0x314ef41554dc423c88836dcdce55b3f61d1804b1' is '0'"

}

 

 

9.3 getname

 

This call is used to get name of the currency

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "name": "Ethereum",

    "message": "currency name is 'Ethereum'"

}

 

9.4 getsymbol

 

This call is used to get the symbol of the currency

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "symbol": "eth",

    "message": "currency symbol is 'eth'"

}

 

9.5 getdecimal

 

This call is used to get the currency decimal

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "decimal": "18",

    "message": "currency decimal is '18'"

}

 

9.6 getexchangerate

 

This call is used to get the current exchange rate between Toro token an a currency

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "exchangerate": "1",

    "message": "toro / eth exchange rate is '1'"

}

 

9.7 getminimumallowance

 

This call is used to get the minimum transfer allowance for the currency

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "minimumallowance": "0",

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

}

 

9.8 getmaximumallowance

 

This call is used to get the maximum transfer allowance for the crypto currency

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "maximumallowance": "115792089237316195423570985008687907853269984665640564039457.584007913129639935",

    "message": "eth maximum transfer allowance is '115792089237316195423570985008687907853269984665640564039457.584007913129639935'"

}

 

9.9 getallowance

 

This call is used to get the maximum and minimum transfer allowance for a crypto

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "minimumallowance": "0",

    "maximumallowance": "115792089237316195423570985008687907853269984665640564039457.584007913129639935",

    "message": "eth maximum / minimum transfer allowance are '115792089237316195423570985008687907853269984665640564039457.584007913129639935 / 0'"

}

 

9.10         gettranscationfeefixed

 

This call is used to get the fixed transaction fee

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "txfeefixed": "0",

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

}

 

9.11         gettransactionfeepercentage

 

This call is used to get the transaction fee percentage

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "txfeepercentage": "0",

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

}

 

9.12         gettransactionfee

 

This call is used to get the transaction fixed fee and transaction fee percentage

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "txfeefixed": "0",

    "txfeepercentage": "0",

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

}

 

9.13         getcommissionaddress

 

This call is used to get the commission address

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "commissionaddress": "0xcd6B225362bc99cDf7c4FEeA23f13602A281445F",

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

}

 

9.14         getcommissionpercentage

 

This call is used to get the commission percentage

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "commissionpercentage": "0",

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

}

 

9.15         gettorobuyfeefixed

 

This call is used to get the crypto fixed toro buy fee

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "txfeefixed": "0",

    "message": "eth fixed toro buy fee is '0'"

}

 

9.16         gettorobuyfeepercentage

 

This call is used to get the currency percentage toro buy fee

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "txfeepercentage": "0",

    "message": "eth percentage toro buy fee is '0%'"

}

 

9.17         gettorobuyfee

 

This call is used to get the fixed and percentage toro buy fee

 

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

 

The sample response for this call is:

 

{

    "result": true,

    "txfeefixed": "0",

    "txfeepercentage": "0",

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

}

 

9.18         gettoroselffeefixed

 

This call is used to get the currency fixed toro sell fee

 

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

 

This sample response for this call is:

 

{

    "result": true,

    "txfeefixed": "0",

    "message": "eth fixed toro sell fee is '0'"

}

 

9.19         gettorosellfeepercentage

 

This call is used to get the crypto currency toro sell percentage

 

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

 

 

9.20         gettorosellfee

 

This call is used to get the toro sell fee and toro sell fee percentage

 

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

 

9.21         getcryptoimportfeefixed

 

This call is used to get the crypto currency import fee (fixed)

 

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

 

9.22         getcryptoimportfeepercentage

 

This call is used to get the crypto currency import fee in percentage

 

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

 

9.23         getcryptoimportfee

 

This call is used to get the fixed / percentage crypto currency import fee

 

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

 

 

9.24         getcryptoexportfeefixed

 

This call is used to get the currency export fee (fixed)

 

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

 

 

9.25         getcryptoexportfeepercentage

 

This call is used to get the currency export fee in percentage

 

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

 

9.26         getcryptoexportfee

 

This call is used to get the fixed/percentage currency export fee

 

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

 

 

9.27         getreserve

 

This call is used to get the crypto currency in reserve

 

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

 

9.28         gettoller

 

This call is used to get the toller address

 

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

 

9.29         gettotalcap

 

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

 

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

 

9.30         gettotalreserving

 

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

 

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

 

9.31         gettotalcirculating

 

This call is used to get the total currency that is currently circulating

 

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

 

9.32         isenrolled

 

This call is used to check if an address is currently enrolled for this currency, the payload is as follows:

 

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

 

9.33         isfrozen

 

This call is used to check if the currency of an address is currently frozen, the payload is as follows:

 

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

 

9.34         getallowselfenroll

 

This call is used to check if automatic currency enrollment is allowed

 

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

 

9.35         getallowselftransactionfee

 

This call is used to check if account specified transaction fee is allowed, the payload is as follows:

 

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

 

9.36         getselftransactionfeefixed

 

This call is used to get the transaction fee (fixed), the payload is follows:

 

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

 

9.37         getselftransactionfeepercentage

 

This call is used to get the transaction fee in percentage, the payload is as follows:

 

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

 

9.38         getselftransactionfee

 

This call is used to get the fixed and percentage transaction fee, the payload is as follows:

 

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

 

9.39         getallowselfallowance

 

This call is used to check if specified transfer allowance is set for a wallet address, the payload is as follows:

 

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

 

9.40         getselfallowance

 

This call is used to get the minimum and maximum transfer allowance set for an address in the blockchain, the payload is as follows:

 

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

 

9.41         getallowselftorobuyfee

 

This call is used to check if account specified Toro buy fee has been set, the payload is as follows:

 

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

 

9.42         getselftorobuyfeefixed

 

This call is used to check the specified dollar fixed Toro buy fee for an address, the payload is as follows:

 

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

 

9.43         getselftorobuyfeepercentage

 

This call is used to check the specified percentage for dollar/Toro buy fee for an address, the payload is as follows:

 

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

 

9.44         getselftorobuyfee

 

This call is used to check the account specified Toro buy fee, the payload is as follows:

 

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

 

9.45         getallowselftorosellfee

 

This call is used to check if account specified Toro sell fee has been set, the payload is as follows:

 

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

 

9.46         getselftorosellfeefixed

 

This call is used to check the specified dollar fixed Toro sell fee for an address, the payload is as follows:

 

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

 

9.47         getselftorosellfeepercentage

 

This call is used to check the specified percentage for dollar/Toro sell fee for an address, the payload is as follows:

 

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

 

9.48         getselftorosellfee

 

This call is used to check the account specified Toro sell fee; the payload is as follows:

 

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

 

9.49         getallowselfcryptoimportfee

 

This call is used to check if the account specified import fee has been set for an address, the payload is as follows:

 

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

 

9.50         getselfcryptoimportfeefixed

 

This call is used to check the fixed currency import fee for an address, the payload is as follows:

 

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

 

9.51         getselfcryptoimportfeepercentage

 

This call is used to check the currency import fee in percentage, the payload is as follows:

 

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

 

9.52         getselfcryptoimportfee

 

This call is used to get the specified fixed and percentage import fee for an address, the payload is as follows:

 

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

 

9.53         getallowselfcryptoexportfee

 

This call is used to check if a specified fixed and percentage export fee has been set for an address, the payload is as follows:

 

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

 

9.54         getselfcryptoexportfeefixed

 

This call is used to get the currency fixed export fee for an address, the payload is as follows:

 

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

 

9.55         getselfcryptoexportfeepercentage

 

This call is used to get the currency export fee percentage for an address, the payload is as follows:

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

 

9.56         getselfcryptoexportfee

 

This call is used to get the account specified fixed and percentage export fee for an address, the payload is as follows:

 

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

 

9.57         istransferon

 

This call is used to check if currency transfer is allowed

 

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

 

9.58         isbuyon

 

This call is used to check if buying of currency is allowed

 

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

 

9.59         issellon

 

This call is used to check if selling of currency is allowed

 

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

 

9.60         isimporton

 

This call is used to check if currency import is allowed

 

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

 

9.61         isexporton

 

This call is used to check if currency export is on

 

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

 

Download the Collection