trust-graph/admin/aqua/export.aqua
InversionSpaces 175e51d5db
feat(trust-graph): Update aqua code (#141)
* Update aqua

* Update aqua-lib

* Update admin aqua

* Remove aqua dep

* Update example aqua

* Fix package.json

* Update admin/package.json

Co-authored-by: Aleksey Proshutinskiy <justprosh@users.noreply.github.com>

* Update aqua/package.json

Co-authored-by: Aleksey Proshutinskiy <justprosh@users.noreply.github.com>

* Update example/package.json

Co-authored-by: Aleksey Proshutinskiy <justprosh@users.noreply.github.com>

* Setup fluence in CI

---------

Co-authored-by: Aleksey Proshutinskiy <justprosh@users.noreply.github.com>
2023-12-29 13:46:10 +01:00

26 lines
838 B
Plaintext

aqua Admin
export timestamp_sec, get_trust_bytes, issue_trust
export get_trust_bytes, issue_trust
import "@fluencelabs/trust-graph/trust-graph.aqua"
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