# blockchain_ts **Repository Path**: dociosly/blockchain_ts ## Basic Information - **Project Name**: blockchain_ts - **Description**: 使用TypeScript实现区块链,区块链的应用 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-05-24 - **Last Updated**: 2024-05-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: TypeScript, Blockchain ## README ## 一个示例块类型 ```javascript interface Block { index: number; // 区块索引 timestamp: number; // 区块生成时间 data: string; // 区块数据 nonce: number; // 需要挖掘的数字 previousHash: string; // 上一个区块的哈希值 hash: string; // 当前区块的哈希值 } ``` ### 简单的hash和挖掘示例 ``` . ├── hashStudy │ ├── hash_nonce_demo.js ``` ## 开发第一个区块链 ### 无工作量证明的区块链 ``` . ├── firstBlockChain │ ├── src │ │ ├── bc101.ts ``` 编译并运行 ```bash npm run tsc node dist/bc101.js ```