Skip to content

Commit 175e51d

Browse files
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 <[email protected]> * Update aqua/package.json Co-authored-by: Aleksey Proshutinskiy <[email protected]> * Update example/package.json Co-authored-by: Aleksey Proshutinskiy <[email protected]> * Setup fluence in CI --------- Co-authored-by: Aleksey Proshutinskiy <[email protected]>
1 parent 34cbc31 commit 175e51d

14 files changed

+106
-15879
lines changed

.github/workflows/tests.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ name: Run tests with workflow_call
22

33
on:
44
workflow_call:
5+
inputs:
6+
fcli-version:
7+
description: "@fluencelabs/cli version"
8+
type: string
9+
default: "main"
510

611
jobs:
712
trust-graph:
@@ -51,6 +56,12 @@ jobs:
5156
cache-dependency-path: "aqua/package-lock.json"
5257
cache: "npm"
5358

59+
- name: Setup fcli
60+
uses: fluencelabs/setup-fluence@v1
61+
with:
62+
artifact: fcli
63+
version: ${{ inputs.fcli-version }}
64+
5465
- run: npm i
5566
working-directory: aqua
5667

admin/aqua/export.aqua

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
1-
import "@fluencelabs/trust-graph/trust-graph.aqua"
1+
aqua Admin
2+
3+
export timestamp_sec, get_trust_bytes, issue_trust
24
export get_trust_bytes, issue_trust
35

6+
import "@fluencelabs/trust-graph/trust-graph.aqua"
47
import "@fluencelabs/aqua-lib/builtin.aqua"
58

69
func timestamp_sec(node: string) -> u64:
710
on node:
811
result <- Peer.timestamp_sec()
12+
913
<- result
1014

1115
func get_trust_bytes(node: string, issued_for_peer_id: string, expires_at_sec: u64, issued_at_sec: u64) -> GetTrustBytesResult:
1216
on node:
1317
result <- TrustGraph.get_trust_bytes(issued_for_peer_id, expires_at_sec, issued_at_sec)
18+
1419
<- result
1520

1621
func issue_trust(node: string, issued_for_peer_id: string, expires_at_sec: u64, issued_at_sec: u64, trust_bytes: []u8) ->IssueTrustResult:
1722
on node:
1823
result <- TrustGraph.issue_trust(issued_for_peer_id, expires_at_sec, issued_at_sec, trust_bytes)
24+
1925
<- result

0 commit comments

Comments
 (0)