2023-12-29 12:46:10 +00:00
|
|
|
aqua Admin
|
|
|
|
|
|
|
|
export timestamp_sec, get_trust_bytes, issue_trust
|
2021-11-12 13:19:16 +00:00
|
|
|
export get_trust_bytes, issue_trust
|
|
|
|
|
2023-12-29 12:46:10 +00:00
|
|
|
import "@fluencelabs/trust-graph/trust-graph.aqua"
|
2021-11-12 13:19:16 +00:00
|
|
|
import "@fluencelabs/aqua-lib/builtin.aqua"
|
|
|
|
|
|
|
|
func timestamp_sec(node: string) -> u64:
|
|
|
|
on node:
|
|
|
|
result <- Peer.timestamp_sec()
|
2023-12-29 12:46:10 +00:00
|
|
|
|
2021-11-12 13:19:16 +00:00
|
|
|
<- result
|
2022-02-04 15:45:37 +00:00
|
|
|
|
|
|
|
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)
|
2023-12-29 12:46:10 +00:00
|
|
|
|
2022-02-04 15:45:37 +00:00
|
|
|
<- 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)
|
2023-12-29 12:46:10 +00:00
|
|
|
|
2022-02-04 15:45:37 +00:00
|
|
|
<- result
|