Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/studiowebux/ledger
typescript experiment to build a ledger for learning, a bit inspired on the UTXO model
https://github.com/studiowebux/ledger
deno deno-2 experimental ledger mock multi-assets no-dependencies poc typescript utxo
Last synced: 15 days ago
JSON representation
typescript experiment to build a ledger for learning, a bit inspired on the UTXO model
- Host: GitHub
- URL: https://github.com/studiowebux/ledger
- Owner: studiowebux
- Created: 2024-12-02T01:50:42.000Z (21 days ago)
- Default Branch: main
- Last Pushed: 2024-12-02T05:35:20.000Z (21 days ago)
- Last Synced: 2024-12-02T06:25:59.373Z (20 days ago)
- Topics: deno, deno-2, experimental, ledger, mock, multi-assets, no-dependencies, poc, typescript, utxo
- Language: TypeScript
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Ledger
A Small experiment using ChatGPT to build a simple Ledger inspired from the UTXO Model.
My goal is to get more familiar with the concepts and for that I like to build random stuff to learn.- Supports multi assets
- 100% in typescript
- Moved to Postgres DB
- 2 External dependencies: Kafka, Postgres and cbor
- 1 working example, with multiple sequences
- Manager and processors to connect external events (mocked)
- Built with Deno 2
- Exponential backoff mechanism to retry processing requests when selected UTXO is already spent.
- Moved to Distributed architecture using Kafka.
- 3 postgres Tables, one for utxos, one for transaction status and one to configure assets.
- Added a feature to Burn Assets (configurable in the policies table)
- Decoupled few parts of the code (Requires more efforts on that side)## Usage
1. Install deno.
2. Run containers
```bash
docker compose up -d
```
3. Enjoy.```bash
deno run -A __tests__/setup.test.ts
deno run -A __tests__/policy.test.ts
```**Start at least two of those to get faster processing**
```bash
deno run -A __tests__/consumer.test.ts
deno run -A __tests__/consumer.test.ts
``````bash
deno run -A __tests__/producer.test.ts
```**To burn tokens**
```bash
deno run -A __tests__/burn.test.ts
```