https://t.co/v3B4ouNCj7
go-kaspabook is a lightweight indexed kaspa REST-API system suitable for integration with dApps/CEXs/organizations (but not suitable as a data source for browsers).
It is an early version, just about 10 days of work. I need a few more days to test it, then I will use it in several projects and observe how it performs.
The API doc is currently generated by AI, I will optimize it later.
Key features:
Data fetching via Kaspad vspc2 (only focuses on the chain-blocks and the accepted-txns data.);
Using the local RocksDB with support for daascore-to-live pruning;
Using protobuf data format to save disk space;
An aggressive data item storage strategy (more index-params will be added later to support additional data);
Reorg processing mechanism for index-keys.
book-API:
GET - /book/status
GET - /book/vspcs/daascore/:score[?count=10&prev=1]
GET - /book/vspcs/bluescore/:score[?count=10&prev=1]
GET - /book/blocks/:hash
GET - /book/transactions/:txId
GET - /book/addresses/:address/transactions[?daascore|bluescore=12345&count=10&prev=1]
kaspad-API:
GET - /kaspad/addresses/:address/balance
GET - /kaspad/addresses/:address/utxos
POST - /kaspad/transactions
POST - /kaspad/transactions/rbf
@Valodeous I recall this was a "misunderstanding" caused by different field names in the API. I think we can fix it by adding a set of "v2" APIs (instead of changing the original ones).
@Valodeous While not the main point, the top 100 holder statistics have indeed been implemented, if that's what you're referring to. Additionally, KRC-20 nodes will support a debug API, allowing direct access to raw data for all states.
@supertypo_kas@kaspa_stream @kasfyi Super thanks! Light-node are underway (via the new vspc2), which will allow for low-cost deployment and API compatibility.
I don’t know much about Sparkle, but I think it’s a system at different levels. Sparkle looks like a more complex infrastructure at the bottom level, but the Lua-based VM provides a simplified implementation of the application layer. It is lighter and faster than solidity-EVM, but still slower than golang.
EVM means a fixed technology path (with bloated compatibility builds), which is certainly true. But we can also explore other possibilities after untying some old shackles. For example, it can easily implement parallel computing, has very simple and easy-to-learn programming syntax, and has relatively faster execution speed, etc.
@oneforonehaha@SentinelKaspa@kaspador_@Kaspa_KEF@kasplex It is still a very early experimental version. As an open SC environment, it still needs at least two modifications to the underlying mechanism, but it is sufficient for the system contract of KRC20. Next, I need to tune the performance.
@shit_o_shi As an embedded scripting language, it is very lightweight and fast (with the JIT-compiler). I think that in some specific application scenarios, it is not worth making things too complicated or even creating a new language😃.