Intro to TurtleCoin

Turtle-Service / Wallet-API

Fun Fact: Turtle-Service is the #1 most confused tool in the core suite, and yet we still include it in every build. Why is that?

In the early days of the network, the core wallet was called simplewallet, and what is today called Turtle-Service was called Walletd. As you can imagine, there was quite the confusion when users would run Walletd expecting a simple command line wallet, and just got a blank screen. The purpose of Turtle-Service is to give access to programs who need to manage a wallet, as opposed to a human, who would use something like Zedwallet. Zedwallet has a frontend, which means it has menus and things that allow you to navigate through different functions like creating a wallet or sending some coins to a friend. Turtle-Service, as you might have noticed, doesn’t really do anything if you just run the program. You can try it now, and you may just get a black window that pops up and disappears, or it might just do nothing at all.

 

Turtle-Service doesn’t actually have any buttons or anything you can touch, really. It speaks through what’s called a JSON request. You may or may not know what that means, but to put it simply, it’s expecting a program like a web wallet to send it a request that is written in JSON that says something like “Create a new wallet in the container” or “send X coins to so and so”. JSON stands for Javascript Object Notation and this is the last time you’ll ever need to know that. It’s not important that you know what goes in one of these requests unless you want to go on to being a developer, but here’s what it would look like if you wanted to generate one in your command line to check the balance of a wallet.

 

curl -d '{"jsonrpc":"2.0","id":1,"password":"passw0rd","method":"getBalance","params":{"address":"TRTLxxxx..."}}' http://localhost:8070/json_rpc

 

Turtle-Service would emit a response, and it would look something like this:

{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "availableBalance": 10000,
    "lockedAmount": 0
  }
}

This means that Turtle-Service is great for use with web wallets, graphical wallets, online stores and mining pools. Most commonly, a lot of graphical wallets use Turtle-Service as their core. The GUI is just button shortcuts that mask commands that happen in the background. If you run most of our graphical wallets and then look at the running processes on your computer, you’ll see “Turtle-Service” in the list because at almost every GUI’s core is Turtle-Service.

 

Recently, a new contender has entered the ring, and that is Wallet-API. Wallet-API functions much the same way that Walletd and Turtle Service did, but much better, as it is a from scratch rewrite by the same person who brought you ZedWallet.

GiottoPress by Enrique Chavez