mirror of
https://github.com/fluencelabs/trust-graph
synced 2025-03-15 12:50:48 +00:00
20 lines
764 B
Plaintext
20 lines
764 B
Plaintext
import "@fluencelabs/trust-graph/trust-graph.aqua"
|
|
export get_trust_bytes, issue_trust
|
|
|
|
import "@fluencelabs/aqua-lib/builtin.aqua"
|
|
|
|
func timestamp_sec(node: string) -> u64:
|
|
on node:
|
|
result <- Peer.timestamp_sec()
|
|
<- result
|
|
|
|
func get_trust_bytes(node: string, issued_for_peer_id: string, expires_at_sec: u64, issued_at_sec: u64) -> GetTrustBytesResult:
|
|
on node:
|
|
result <- TrustGraph.get_trust_bytes(issued_for_peer_id, expires_at_sec, issued_at_sec)
|
|
<- result
|
|
|
|
func issue_trust(node: string, issued_for_peer_id: string, expires_at_sec: u64, issued_at_sec: u64, trust_bytes: []u8) ->IssueTrustResult:
|
|
on node:
|
|
result <- TrustGraph.issue_trust(issued_for_peer_id, expires_at_sec, issued_at_sec, trust_bytes)
|
|
<- result
|