{"_id":"@alphea-dev/blockexplorer-sharedtypes","name":"@alphea-dev/blockexplorer-sharedtypes","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@alphea-dev/blockexplorer-sharedtypes","version":"1.0.0","description":"Shared TypeScript types for Aphexplorer services","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","dev":"tsc --watch","prepublishOnly":"npm run build","version:patch":"npm version patch && git push --follow-tags","version:minor":"npm version minor && git push --follow-tags","version:major":"npm version major && git push --follow-tags","publish:npm":"npm publish","release:patch":"npm run version:patch && npm run publish:npm","release:minor":"npm run version:minor && npm run publish:npm","release:major":"npm run version:major && npm run publish:npm"},"keywords":["typescript","types","blockchain","aphexplorer"],"author":{"name":"ALPHEA Core Team"},"license":"MIT","dependencies":{},"devDependencies":{"typescript":"^5.3.3"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Alphea-Dev/shared-types.git"},"homepage":"https://github.com/Alphea-Dev/shared-types","bugs":{"url":"https://github.com/Alphea-Dev/shared-types/issues"},"_id":"@alphea-dev/blockexplorer-sharedtypes@1.0.0","_nodeVersion":"22.17.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-ToXkxWfTTTfLQmBNPNSZarAToslPCmgbNk/F50Wz+QP14cD+tBugfk9zvM+w+LYcsXhmSsZCyMDmUBS+Pwuwdw==","shasum":"d4162754858f8450f3f8682a052597541c441580","tarball":"https://registry.npmjs.org/@alphea-dev/blockexplorer-sharedtypes/-/blockexplorer-sharedtypes-1.0.0.tgz","fileCount":22,"unpackedSize":24760,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDuHrcAIKz6gNWtETwnK1OLUmCEI13/6I1RYvG/MIGVlwIgJGGZ3iNSOtHhtl0Swd1pnIUhnAVaP6NWKKWKdwJW7DA="}]},"_npmUser":{"name":"alpheadev","email":"spark.justdev@gmail.com"},"directories":{},"maintainers":[{"name":"alpheadev","email":"spark.justdev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/blockexplorer-sharedtypes_1.0.0_1756200057602_0.3324188013883893"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-26T09:20:57.454Z","1.0.0":"2025-08-26T09:20:57.781Z","modified":"2025-08-26T09:20:58.088Z"},"maintainers":[{"name":"alpheadev","email":"spark.justdev@gmail.com"}],"description":"Shared TypeScript types for Aphexplorer services","homepage":"https://github.com/Alphea-Dev/shared-types","keywords":["typescript","types","blockchain","aphexplorer"],"repository":{"type":"git","url":"git+https://github.com/Alphea-Dev/shared-types.git"},"author":{"name":"ALPHEA Core Team"},"bugs":{"url":"https://github.com/Alphea-Dev/shared-types/issues"},"license":"MIT","readme":"# Shared Types for Aphexplorer\n\nTypeScript type definitions shared across all Aphexplorer services.\n\n## Overview\n\nThis package provides common interfaces and types for:\n- **API** - REST and GraphQL request/response types\n- **Blockchain** - Block, transaction, address, and contract types  \n- **Database** - Entity interfaces and configuration types\n- **Messages** - Kafka message formats for inter-service communication\n\n## Installation\n\n```bash\nnpm install @aphexplorer/shared-types\n```\n\n## Usage\n\n```typescript\nimport { \n  BlockData, \n  TransactionData, \n  APIResponse \n} from '@aphexplorer/shared-types';\n\n// Use in your service\nconst block: BlockData = {\n  hash: '0x...',\n  number: 12345,\n  timestamp: Date.now()\n};\n\nconst response: APIResponse<BlockData> = {\n  success: true,\n  data: block\n};\n```\n\n## Development\n\n### Setup\n\n```bash\nnpm install\n```\n\n### Build\n\n```bash\nnpm run build\n```\n\n### Development with Watch Mode\n\n```bash\nnpm run dev\n```\n\n## Package Structure\n\n```\nsrc/\n├── api/           # API request/response types\n├── blockchain/    # Blockchain entity types\n├── database/      # Database configuration types\n├── messages/      # Kafka message formats\n└── index.ts       # Main exports\n```\n\n## Type Categories\n\n### API Types\n- `APIResponse<T>` - Standard API response wrapper\n- `APIError` - Error response format\n- Request/response types for all endpoints\n\n### Blockchain Types\n- `BlockData` - Block information\n- `TransactionData` - Transaction details\n- `AddressData` - Address information\n- `ContractData` - Smart contract data\n\n### Message Types\n- `BlockMessage` - Block data for Kafka\n- `TransactionMessage` - Transaction data for Kafka\n- `ContractEventMessage` - Contract event data\n\n## Versioning\n\nThis package follows [Semantic Versioning](https://semver.org/):\n\n- **Patch** (1.0.X) - Add optional fields, fix typos\n- **Minor** (1.X.0) - Add new types, extend interfaces\n- **Major** (X.0.0) - Breaking changes, remove fields\n\n## Publishing\n\n```bash\n# Update version\nnpm version patch|minor|major\n\n# Publish to registry\nnpm publish\n```\n\n## Services Using This Package\n\n- **aphexplorer-api** - REST/GraphQL API service\n- **aphexplorer-agent** - Blockchain data collection\n- **aphexplorer-ingestion** - Data processing service\n\n## Contributing\n\n1. Add new types to appropriate category in `src/`\n2. Export from `src/index.ts`\n3. Update version in `package.json`\n4. Update CHANGELOG.md with changes\n5. Test with dependent services before publishing\n\n## License\n\nMIT","readmeFilename":"README.md","_rev":"1-e49953d4473e1bcb50b6d48144284a07"}