NAC_Blockchain/nac-serde/README.md

49 lines
842 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# NAC Serialization Framework
NAC序列化框架提供GNACS编码、宪法数据序列化和RWA资产序列化功能。
## GNACS编码系统
GNACS (Global NAC Asset Classification System) 是NAC公链的全球资产分类系统使用48位二进制编码对资产进行分类。
### 编码结构
```
[类别代码 12位][区域代码 12位][行业代码 12位][子类代码 12位]
```
### 使用示例
```rust
use nac_serde::*;
// 编码资产
let code = GnacsEncoder::encode("real_estate", "cn", "finance", "residential")?;
// 解码
let info = GnacsDecoder::decode(&code)?;
```
## 测试
```bash
cargo test
```
## 版本历史
### v0.2.0 (2026-02-18)
- ✅ 完整实现GNACS 48位编码系统
- ✅ 添加8个单元测试
- ✅ 完善API文档
### v0.1.0
- 基础的GNACS编码结构
## 许可证
NAC公链项目专有