mirror of
https://github.com/fluencelabs/trust-graph
synced 2024-12-04 23:30:19 +00:00
88 lines
2.3 KiB
Plaintext
88 lines
2.3 KiB
Plaintext
|
module TrustGraph declares *
|
||
|
|
||
|
data AddRootResult:
|
||
|
success: bool
|
||
|
error: string
|
||
|
|
||
|
data AddTrustResult:
|
||
|
success: bool
|
||
|
error: string
|
||
|
weight: u32
|
||
|
|
||
|
data Trust:
|
||
|
issued_for: string
|
||
|
expires_at: u64
|
||
|
signature: string
|
||
|
sig_type: string
|
||
|
issued_at: u64
|
||
|
|
||
|
data Certificate:
|
||
|
chain: []Trust
|
||
|
|
||
|
data AllCertsResult:
|
||
|
success: bool
|
||
|
certificates: []Certificate
|
||
|
error: string
|
||
|
|
||
|
data GetRevokeBytesResult:
|
||
|
success: bool
|
||
|
error: string
|
||
|
result: []u8
|
||
|
|
||
|
data GetTrustBytesResult:
|
||
|
success: bool
|
||
|
error: string
|
||
|
result: []u8
|
||
|
|
||
|
data InsertResult:
|
||
|
success: bool
|
||
|
error: string
|
||
|
|
||
|
data Revoke:
|
||
|
revoked_peer_id: string
|
||
|
revoked_at: u64
|
||
|
signature: string
|
||
|
sig_type: string
|
||
|
revoked_by: string
|
||
|
|
||
|
data IssueRevocationResult:
|
||
|
success: bool
|
||
|
error: string
|
||
|
revoke: Revoke
|
||
|
|
||
|
data IssueTrustResult:
|
||
|
success: bool
|
||
|
error: string
|
||
|
trust: Trust
|
||
|
|
||
|
data RevokeResult:
|
||
|
success: bool
|
||
|
error: string
|
||
|
|
||
|
data VerifyTrustResult:
|
||
|
success: bool
|
||
|
error: string
|
||
|
|
||
|
data WeightResult:
|
||
|
success: bool
|
||
|
weight: u32
|
||
|
peer_id: string
|
||
|
error: string
|
||
|
|
||
|
service TrustGraph("trust-graph"):
|
||
|
add_root(peer_id: string, weight_factor: u32) -> AddRootResult
|
||
|
add_trust(trust: Trust, issuer_peer_id: string, timestamp_sec: u64) -> AddTrustResult
|
||
|
get_all_certs(issued_for: string, timestamp_sec: u64) -> AllCertsResult
|
||
|
get_host_certs(timestamp_sec: u64) -> AllCertsResult
|
||
|
get_host_certs_from(issuer: string, timestamp_sec: u64) -> AllCertsResult
|
||
|
get_revoke_bytes(revoked_peer_id: string, revoked_at: u64) -> GetRevokeBytesResult
|
||
|
get_trust_bytes(issued_for_peer_id: string, expires_at_sec: u64, issued_at_sec: u64) -> GetTrustBytesResult
|
||
|
get_weight(peer_id: string, timestamp_sec: u64) -> WeightResult
|
||
|
get_weight_factor(max_chain_len: u32) -> u32
|
||
|
insert_cert(certificate: Certificate, timestamp_sec: u64) -> InsertResult
|
||
|
insert_cert_raw(certificate: string, timestamp_sec: u64) -> InsertResult
|
||
|
issue_revocation(revoked_peer_id: string, revoked_by_peer_id: string, revoked_at_sec: u64, signature_bytes: []u8) -> IssueRevocationResult
|
||
|
issue_trust(issued_for_peer_id: string, expires_at_sec: u64, issued_at_sec: u64, trust_bytes: []u8) -> IssueTrustResult
|
||
|
revoke(revoke: Revoke, timestamp_sec: u64) -> RevokeResult
|
||
|
verify_trust(trust: Trust, issuer_peer_id: string, timestamp_sec: u64) -> VerifyTrustResult
|