TRTL Services Has Launched
Today we are celebrating our one millionth block in style with the release of the TurtleCoin as a Service (TaaS) platform at TRTL Services!
What is TRTL Services?
TRTL Services provides the infrastructure and the tools for developers to build on-chain apps in an easy, fun and fast way on the TRTL Network.
TRTL Services does this by offering access to a role-based access control RESTful API backed by an off-chain cache of your wallet. TRTL Services comes with a variety of tools, including: a push notification system; wallet monitoring and alert service; a dashboard with oversight and statistics; and a bundle of libraries in varies languages to get started right away.
RESTful Application Programming Interace (API)
TRTL Services stores publically available data in an off-chain database, which users can interact with via the RESTful API. This offloads the heavy duty work from the wallet to TRTL Services, improving stability and allowing developers to build more powerful and intensive apps.
The workers scan every online wallet container on a one minute interval for new transactions, using the stored sub-addresses generated with the container and continuing from the last scanned block. Unconfirmed transaction are updated every minute by the system to reflect the number of confirmations, and checks if it has reached the minimal amount of confirmations required to unlock a transaction — this is configurable for each wallet container.
Applications and users can interact with the API with a JSON Web Token access token that is generated under each registered application in the TRTL Services Dashboard. Users can assign an expiration date to the token and which API methods it may interact with.
Access tokens are not stored by TRTL Services and should be treated as a secret key. It is wise to make use of multiple access tokens and take advantage of the roles and expiration features.
The API documentation can be found at trtl.services/docs. Manuals and documentation on the TRTL Services Dashboard are still in progress — consider this to be your guide.
HTTP Callbacks (Webhooks)
A webhook is a HTTP callback (POST) that is triggered when an event occurs or when defined conditions are met. They interact with your application in an asynchronous fashion and act as a push notification.
Users can register the route to their webhook endpoint under an app in the TRTL Services Dashboard. TRTL Services provides HTTP callbacks for the following events
- Incoming transaction:
- Outgoing transaction
- Transaction confirmation status:
- Transaction failure:
- App / Wallet alerts:
TRTL Services offers an elegant dashboard where developers and merchants can manage their apps and wallet containers. It comes with a few tools, including: a simple overview and visualized statistics on registered apps and wallets; historical activity overview and export to CSV function; and error logging and alert overview.
The overview dashboard provides a simple overview on the total and locked balance, as well as showing the a graph of the incoming vs outgoing total balance of the past seven days.
The wallet monitor page provides a quick glimpse on the status of your wallet. It checks for your wallet uptime every 10 minute, logging and sending a webhook on downtime. It provides a simple overview on the total number of addresses generated with the container and the transactions belonging to them.
Future plans include an modified version of turtlecoind-ha that will allow direct interaction with the wallet container process, allowing much better control, logging and monitoring.
Activity + Export to CSV
Turtle Services offers complete historical logs regarding user accounts, apps and wallets. Each log can be viewed in the dashboard or exported with a click of a button.
Part of the monitoring system includes an alert system in the Dashboard. Whenever there is a wallet or app process error it gets logged and a webhook is send out with the query
alert. Alerts can be viewed in the Dashboard and exported in CSV.
Future plans include integrating it the alert module more closely with the wallet monitoring system once a modified version of turtlecoind-ha is released.
Libraries & Third Party Plugins
TRTL Services has a wide range of application, ranging from small apps such as tipping bots to larger, more complex apps such as a payment gateway. Some potential ideas applications:
- Integrate TRTL into a game as virtual currency
- TRTL powered message board powered by tips
- Crowdsourcing platform in TRTL
- Tipping / wallet bot for social media platforms
- Mobile apps
Real World Case
TurtleWallet has been operating on TRTL Services for six weeks now and is doing just fine! A simple online web wallet that is accessible on every device. Users can generate as many addresses as they please and send and receive transactions. The wallet comes with a pricing chart, price conversion and and allow users to export their keys.
TRTL Services has a few limitations, however, few are due to design and most will get addressed. Limitations include, but are not limited to:
- Privacy is reduced linking transactions to addresses in the database.
- Sensitive stored data — the wallet RPC password is stored, encrypted.
- Centralized point of attack
Originally published on November 23, 2018 (block 100,000,0) on HackMd.