Chronik Python plugins tell Chronik how to index novel protocols

Rationale

A Python plugin interface for Chronik would allow people to experiment with new protocols without having to dig deep into the complicated world of Rust+Chronik.

Instead, they could use a very familiar language, Python, and only describe how the protocol looks like, and let Chronik handle all the complicated stuff, like the mempool, blocks, reorgs, finalization, querying, websocket, etc…

By providing one standard interface, an entire ecosystem of plugins could emerge, where newcomers and veterans alike can come up with new protocols on eCash, and those that work well can be shared with others, which would allow people to build all kinds of dApps.

Covenants

There are certain “anyone can spend” covenant types, which only really become useful if there’s decent indexing infrastructure present.

If covenant txs have an OP_RETURN (or an eMPP pushdata) that describes the terms of the covenant, it suddenly becomes relatively easy to use the covenants, all that’s left is to index them, where these plugins come in handy.

Examples include:

  1. SLPAgora, where UTXOs can be “bought” by anyone, as long as they give some XEC to a fixed address in return.
  2. SLPDEX, which is similar to SLPAgora, but token sales can be accepted partially, such that the leftover tokens have to be sent back to the same UTXO.
  3. Similar covenants can be imagined but with more complex rules, e.g. where accepting a small amount has a higher price than a big amount
  4. Mecenas, or other kinds of recurrent payment protocols, are hard to use/integrate by wallets because the UTXOs are hard to find
  5. be.cash allows wallets where the sender can be offline, e.g. on a smart card. It is hard to integrate into existing wallets as the UTXOs are hard to find, since they change their address on every tx.

Games

One can also imagine games that are played by exchanging txs.

  1. CryptoKitties: Based on the blockhash of the tx, a cat (represented by an output) could have certain random traits
  2. MMORPG/RTS: Resources could be generated by burning some tokens, buildings/characters/etc. could be upgraded using some other mechanism, and randomness can be added using blockhashes as entropy
  3. Puzzles: Authors could publish genuinely difficult puzzles, puzzlers could commit to answers and after some time people reveal their answers and get points if they solved the puzzle / how well they did

Why Python?