{"id":23171711,"url":"https://github.com/code-monad/vex","last_synced_at":"2026-04-08T13:31:53.101Z","repository":{"id":264978854,"uuid":"894163075","full_name":"code-monad/vex","owner":"code-monad","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-15T23:11:04.000Z","size":226,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-06T03:08:48.896Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/code-monad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-25T21:37:42.000Z","updated_at":"2025-06-15T23:11:08.000Z","dependencies_parsed_at":"2025-02-25T02:29:01.043Z","dependency_job_id":"7d39b8e5-36b3-49fd-bedb-aba785be689a","html_url":"https://github.com/code-monad/vex","commit_stats":null,"previous_names":["code-monad/vex"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/code-monad/vex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-monad%2Fvex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-monad%2Fvex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-monad%2Fvex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-monad%2Fvex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/code-monad","download_url":"https://codeload.github.com/code-monad/vex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-monad%2Fvex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31558380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T10:21:54.569Z","status":"ssl_error","status_checked_at":"2026-04-08T10:21:38.171Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-18T04:19:19.660Z","updated_at":"2026-04-08T13:31:53.073Z","avatar_url":"https://github.com/code-monad.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vex - Transaction Event Processing Framework for CKB, Powered by Appraisal\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n![TypeScript Version](https://img.shields.io/badge/typescript-%5E5.0.0-blue)\n![Node Version](https://img.shields.io/badge/node-%5E18.0.0-green)\n\nA flexible and extensible framework for processing CKB transaction events(enriched by another project called [Appraisal](https://github.com/nervape/appraisal.git)). Built with TypeScript, it provides a plugin-based architecture for filtering and processing transactions based on configurable rules.\n\n## Features\n\n- **Plugin Architecture**: Easy-to-extend filter and processor system\n- **Configurable Rules**: YAML-based configuration for transaction filtering\n- **MQTT Integration**: Subscribe to transaction events from CKB nodes\n- **Mongodb Integration**: ORM support for Mongo and less pain for serialize data to db\n- **Type Safety**: Full TypeScript support with strict typing\n- **Error Handling**: Comprehensive error handling with retries\n- **Logging**: Detailed logging with Winston\n\n## Architecture\n\n```mermaid\ngraph LR\n    A[\"MQTT Source(Appraisal)\"] --\u003e|Enriched TX| B[Vex Service]\n    B --\u003e|TX Events| C{Filter System}\n    subgraph Filters\n        C --\u003e|Match| D[CodeHash Filter]\n        C --\u003e|Match| E[Spore Filter]\n        C --\u003e|Match| F[Anyway Filter]\n        C --\u003e|Match| G[Custom Filters...]\n    end\n    subgraph Processors\n        E --\u003e M[Spore Processor]\n        D --\u003e N[DelegateLock Processor]\n        D --\u003e O[DAO Processor]\n        F --\u003e P[Anyway Processor]\n        G --\u003e Q[Custom Processors...]\n    end\n```\n\n## Prerequisites\n\n- Node.js \u003e= 18.0.0\n- npm \u003e= 9.0.0\n- MQTT Broker(You may already setted up if you have Appraisal running)\n- [Appraisal](https://github.com/nervape/appraisal.git)\n\n## Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/nervape/vex.git\ncd vex\n\n# Install dependencies\nnpm install\n\n# Build the project\nnpm run build\n```\n\n## Configuration\n\nConfiguration is managed through YAML files in the `config` directory:\n\n```yaml\nmqtt:\n  host: \"localhost\"\n  port: 1883\n  clientId: \"vex-processor\"\n  topic: \"ckb.transactions.proposed.detailed\"\n  reconnectPeriod: 1000\n  qos: 1\n\nfilters:\n  - name: \"dao-tracker\"\n    filter: \"codeHash\"\n    codeHash: \"0x82d76d1b75fe2fd9a27dfbaa65a039221a380d76c926f378d3f81cf3e7e13f2e\"\n    processor: \"dao\"\n\n  - name: \"all-transactions\"\n    filter: \"anyway\"\n    processor: \"anyway\"\n\nretry:\n  maxAttempts: 3\n  initialDelay: 1000\n  maxDelay: 5000\n```\n\n## Extending the Framework\n\n### Creating a New Filter\n\n```typescript\nimport { BaseFilter } from \"./base\";\nimport { FilterConfig } from \"../types/config\";\nimport { Transaction } from \"../types/transaction\";\n\nexport class CustomFilter extends BaseFilter {\n    constructor(name: string, config: CustomFilterConfig) {\n        super(name, config);\n    }\n\n    matches(tx: Transaction): boolean {\n        // Implement your filtering logic\n        return true;\n    }\n}\n```\n\n### Creating a New Processor\n\n```typescript\nimport { BaseProcessor } from \"../base\";\nimport { Transaction } from \"../../types/transaction\";\nimport logger from \"../../utils/logger\";\n\nexport class CustomProcessor extends BaseProcessor {\n    constructor() {\n        super(\"custom\");\n    }\n\n    async process(tx: Transaction): Promise\u003cvoid\u003e {\n        // Implement your processing logic\n        logger.info(`Processing transaction: ${tx.hash}`);\n    }\n}\n```\n\n## Usage\n\n### Development Mode\n\n```bash\nnpm run dev\n```\n\n### Production Mode\n\n```bash\nnpm run build\nnpm start\n```\n\n### Environment Variables\n\n- `MQTT_HOST`: MQTT broker host\n- `MQTT_PORT`: MQTT broker port\n- `MQTT_TOPIC`: Transaction event topic\n- `LOG_LEVEL`: Logging level (default: info)\n\n## Project Structure\n\n```\nvex/\n├── src/\n│   ├── filters/        # Transaction filters\n│   ├── processors/     # Transaction processors\n│   ├── types/         # TypeScript type definitions\n│   ├── services/      # Core services\n│   └── utils/         # Utility functions\n├── config/           # Configuration files\n└── test/            # Test files\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## Copyrights\n\n- **Code Monad** - *Initial work* - [code@nervape.com](mailto:code@nervape.com)\n- **Nervape Studio** - [https://www.nervape.com](https://www.nervape.com)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- CKB Team for the blockchain platform\n- MQTT Protocol for reliable event delivery\n- TypeScript community for excellent tooling\n\n---\n\nFor more information, please contact the authors or visit the Nervape website.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-monad%2Fvex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode-monad%2Fvex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-monad%2Fvex/lists"}