Skip to content

Latest commit

 

History

History
47 lines (30 loc) · 1.2 KB

README.md

File metadata and controls

47 lines (30 loc) · 1.2 KB

txmond

Proof of Concept: blockchain transactions (tx) monitoring (mon) daemon (d).

This service monitors a list of subscribed wallets and watches for new transactions on every new block. txmond exposes a REST API (add wallet, get transactions), and has an optional webhook to pass the event as soon as possible (e.g. into another service delivering the push notifications).

Supported blockchains

  • Ethereum

REST endpoints

HTTPie

# Get the current block (last processed by the daemon)
http GET :9901/v1/ethereum/block/current/

# Add a wallet to start being monitored
http --json POST :9901/v1/ethereum/wallet/ address="0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B"

# Get all transactions since being inserted
http GET :9901/v1/ethereum/wallet/transactions/ address=="0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B"

Supported storages

  • temp (no persistance, wallet list/transaction history are lost when the process closes)
  • redis @TODO

Configuration

See .env.dist

Webhook

HTTP callback to TXMOND_WEBHOOK_URL=http://localhost:3000/txmond

{
   "from": "0x123",
   "to": "0x456",
   "value": "100",
}

Testing: npx http-echo-server