
There have been some major improvements to Krist. Over the past few weeks I have been developing a brand new Krist server, written in Node.JS from scratch. With this server comes many new features, along with more updates to come.
New Server
As mentioned, this is a complete rewrite of the old server. It is more modular, uses a less stupid language, and is certainly less ugly (trust me, you did not want to see the old code). You can browse the new source code
at my GitHub. The new server is hosted in London on my DigitalOcean droplet, and is
much faster compared to the old one.
The new server:
- Is faster
- Is properly maintained
- Doesn't go down every 5 hours
- Doesn't use XAMPP (uses NGINX)
- Doesn't use PHP (uses Node.JS)
New API
The biggest change is that there is a new API. Don't worry, the old one still exists and is documented at
3d6's profile. The API URL is still
http://krist.ceriat.net.
The new API:
- Uses HTTP verbs (GET/POST for CC, with PUT/DELETE as alternatives)
- Uses HTTP status code responses (?cc will return 200 no matter what, so that you can recieve the errors from CC)
- Uses JSON responses
- Is RESTful in general
- Is properly documented
- Supports HTTPS
- No longer uses SQLite (yay, no more db locking!)
New Features
Webhooks
A new feature is webhooks. These are more important to developers. These send a HTTP request (GET or POST) to a specified URL whenever a block changes, a transaction is made or a name is registered. For each webhook you wish to register, you require to own a name (.kst domain). As well as this, there is a limit of 6 webhooks per hostname.
KristWallet will soon have support for webhooks.
To register a webhook, send a POST request to
http://krist.ceriat.net/webhooks. The required POST parameters are:
- privatekey - Your address's privatekey (not your KristWallet key!)
- owner - Your address, used to verify that you are registering as the right address (so you don't waste any webhooks under the limit)
- event - The event to listen to (transaction, block or name)
- url - The URL to call when the event occurs
- method - Optional, defaults to 'get', can be 'post'
- addresses - Optional. Only valid for transaction or name events - a comma delimited list of Krist addresses to whitelist for this event. If this it not specified, it will occur for all addresses.
For further documentation, see the
API docs. If you require further clarification, do not hesitate to ask.
Upcoming Features
Websockets
Websockets are currently being developed. These are a feature that are more important to developers. They will allow you to maintain a connection to Krist, and it will send events when a transaction is made, when the block changes etc. They are useful for many things, for example:
- Miners - prevent having to constantly poll /work to know when the work has changed, and to submit blocks slightly faster.
- Mining pools - similarly, to prevent constant polling and for faster data retrieval
- Clientside event notification (sadly not possible in CC, yet)
- And more!
Web Wallet
As well as this, I am working on a fully featured web Krist wallet. It will support local storage of Krist wallets, login remembering, system notifications etc. This will be fully clientside, and may also be downloadable as a desktop app (probably via Electron as much as I hate it).
There are many more features to come for Krist. I will most likely be taking over backend development from here on out, but 3d6 and many other great people are working on several other new Krist related things, so keep an eye out for those!
luker2009, on 14 February 2016 - 03:30 AM, said:
Little bit of a bug report: Schrodinger's cat is not returned as either alive or dead by the API (Please fix this very important bug!)
Sorry about that, fixed that now.
P.S. Look at this speeeeed
Edited by Lemmmy, 14 February 2016 - 04:03 AM.