23 lines
799 B
Plaintext
23 lines
799 B
Plaintext
// ACC-Reserve: 多资产储备协议
|
|
// NAC 原生协议 - Charter 语言定义
|
|
// UID: nac.acc.ACCReserveProtocol.v1
|
|
|
|
protocol ACCReserveProtocol {
|
|
// 存入储备资产
|
|
fn deposit(
|
|
asset_symbol: String, amount: u128, custodian: Address,
|
|
constitutional_receipt: Hash
|
|
) -> Result<(), Error>;
|
|
// 提取储备资产(需要宪法收据)
|
|
fn withdraw(
|
|
asset_symbol: String, amount: u128, recipient: Address,
|
|
constitutional_receipt: Hash
|
|
) -> Result<(), Error>;
|
|
// 审计储备(记录审计哈希)
|
|
fn audit(asset_symbol: String, audit_hash: Hash) -> Result<(), Error>;
|
|
// 查询储备余额
|
|
fn get_reserve(asset_symbol: String) -> Option<ReserveEntry>;
|
|
// 查询储备资产总数
|
|
fn total_reserve_count() -> u64;
|
|
}
|