TNS Digital Names API
The Total Network Services, Incorporated Digital Names API is a system by which third parties can connect with a suite of capabilities that are associated with the creation, usage, and management of Digital Names.
The API commands that can be leveraged all fall within seven categories...read commands, write commands, account commands, marketplace commands, Digital Name commands, admin commands, and speculator commands. Additionally, there is a small collection of specialty feature commands that include a rewards program, speculator program, and developer program.
Characteristics of Digital Names
Digital Names are strings consisting of any combination of letters and numbers. Regarding letters, they may be either lowercase or uppercase, with no emphasis placed on distinguishing which case a letter has taken the form of. Important to note is that ALL Digital Names must be preceded with the "$" character.
At this time, it is appropriate to address limitations pertaining to the use of special characters.
Characters That Can't Be Used
As alluded to earlier, there are certain characters that cannot be used when creating a Digital Name. They are as follows:
- $ (This is not counting the "$" that must precede the Digital Name)
- " " (This denotes an empty space)
Basic Operation Of Digital Names
Digital Names work by pointing to the user's crypto private keys. Each Digital Name can be assigned seperate public keys for each desired crypto token. Examples are supplied below. Note how the ticker symbol for that crypto currency is supplied as a suffix to the Digital Name:
- Digital Name with a Bitcoin suffix: $Crypto.btc = bc1qa0rsnsnqjm34aj5495rlxfwytsz6h7rzzkfnen
- Digital Name with a Litecoin suffix: $Crypto.ltc = MN2eDwnftQDG2ans86UYzSNU7AQ6r5mv53
- Digital Name with an Ethereum suffix: $Crypto.eth = 0xbacfc61737ff34a5eef79d79bfa1e0493bf668c6
In the examples above, there are 3 API calls that could immediately come into use. There is the API call to set a public Key to a Digital Name, which is "https://usa.tnsapi.cloud/call.cfm?apikey=**&command=blockchainkey&digitalname=*Crypto*&cc=**&symbol=*btc*&key=** ", there is the API call that provides a list of available crypto symbols: "https://usa.tnsapi.cloud/call.cfm?apikey=**&command=listcurrency&display=JSON ", and there is an API call that lists all public keys assigned to a Digital Name: "https://usa.tnsapi.cloud/call.cfm?apikey=**&command=namekeylist&display=JSON&digitalname=*crytpo*".
Users only need to apply the base Digital Name when creating a transaction. The common method is to allow a user to enter a Digital Name in the field a public key is typically entered. Upon submitting the transaction, first it is checked whether a Digital Name is entered or a valid public key. If a Digital Name is entered, then the following API call is made to retrieve the coresponding public key. The wallet operator adds the crypto symbol to the Digital Name to complete the call.
The return contains the assigned public key. This key is then used to complete the transaction. Changing a public key simply requires sending the same API call that initially set the public key, but with a different public key. To remove a key without replacing it, the same API call is used but the key field is left blank.
API Command Categories
- Read Commands: These are the commands that are used for such tasks as searching to see if a Digital Name is available, finding out what blockchain public keys are attached to a Digital Name, listing all the digital names from a particular user, and more.
- Write Commands: Creation of new Digital Names is handled by the commands in the write category.
- Account Commands: In order to combine multiple accounts with Digital Names, "Link Application" within the Account Commands must be used.
- Marketplace Commands: One exciting prospect surrounding the TNS Digital Names API is the ability to create an open marketplace for trade. This set of commands realize that ability.
- Digital Name Commands: This category of commands handles all the functionality that pertains to managing a Digital Name and modifying its state.
- Admin Commands: As the name suggests, commands within this category deal with administrative tasks and concerns.
- Speculator Commands: The commands in this category make it possible to enter the speculative market as a reseller of Digital Names.
Specialty Feature Commands
We are always adding more features and flexibility for our resellers to integrate not only digital names, but the other features they will need to make a better service for their customers.
TNS Wallet Commands
In addition to our Digital Name functionality, reward program, and other features, our robust API includes commands that enable developers to create a crypto currency wallet within their applications.
|General API Error Codes||Security API Error Codes||API Command Error Codes||Command (namelookup)||Command (keylookup||Command (expdate)||Command (listcurrency)|
|0 = undefinded error||15 = digital name offline||20 = no command||0 = digital name is available||30 = access to command denied||40 = access to command denied||80 = access to command denied|
|1` = success||16` = write access denied||21 = command not valid||1 = digital name is taken||31 = no digital name||41 = no digital name|
|10 = no API Key||5 = digital name is Listed For Sale||32 = digital name not valid||42 = digital name not valid|
|11 = API Key not valid||33 = digital name key not found|
|12` = API Key suspended|
|13 = API Key not active|
The TNS Digital Names API utilizes several layers of security, with each focusing on different aspects of the user to server interaction. Though TNS cannot disclose all of the security measures in place for obvious reasons, one example of a security measure in place is, no matter what category of command that a third party wishes to use, a TNS account must be created by that third party. Through the creation of a TNS account, the third party is then able to obtain a unique API key that is integrated within the command for each API call.