NAC_Blockchain/charter-std/acc/acc_custody.ch

22 lines
816 B
Plaintext

// ACC-Custody: 资产托管协议
// NAC 原生协议 - Charter 语言定义
// UID: nac.acc.ACCCustodyProtocol.v1
protocol ACCCustodyProtocol {
// 创建托管记录
fn create_custody(
asset_id: Hash, owner: Address, custodian: Address,
custody_type: CustodyType, constitutional_receipt: Hash
) -> Result<Hash, Error>;
// 转移托管人
fn transfer_custody(
custody_id: Hash, new_custodian: Address, constitutional_receipt: Hash
) -> Result<(), Error>;
// 释放托管
fn release_custody(custody_id: Hash, constitutional_receipt: Hash) -> Result<(), Error>;
// 查询托管记录
fn get_custody(custody_id: Hash) -> Option<CustodyRecord>;
// 查询资产的所有托管记录
fn get_asset_custodies(asset_id: Hash) -> Vec<CustodyRecord>;
}