24 lines
942 B
Plaintext
24 lines
942 B
Plaintext
// ACC-Insurance: 资产保险协议
|
|
// NAC 原生协议 - Charter 语言定义
|
|
// UID: nac.acc.ACCInsuranceProtocol.v1
|
|
|
|
protocol ACCInsuranceProtocol {
|
|
// 注入保险资金池
|
|
fn fund_pool(amount: u128) -> ();
|
|
// 签发保险单
|
|
fn issue_policy(
|
|
asset_id: Hash, insured: Address, insurer: Address,
|
|
insurance_type: InsuranceType, coverage_amount: u128,
|
|
premium_rate_bps: u16, duration_secs: u64, constitutional_receipt: Hash
|
|
) -> Result<Hash, Error>;
|
|
// 提交理赔申请
|
|
fn submit_claim(
|
|
policy_id: Hash, claimant: Address, claim_amount: u128,
|
|
claim_reason: String, evidence_hash: Hash, constitutional_receipt: Hash
|
|
) -> Result<Hash, Error>;
|
|
// 支付理赔(返回实际支付金额)
|
|
fn pay_claim(claim_id: Hash, constitutional_receipt: Hash) -> Result<u128, Error>;
|
|
// 查询保险单
|
|
fn get_policy(policy_id: Hash) -> Option<InsurancePolicy>;
|
|
}
|