aqua: update sig service (#39)

This commit is contained in:
Aleksey Proshutisnkiy 2022-02-05 03:17:07 +03:00 committed by GitHub
parent 7c72a59bef
commit b9fbbbcafb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 50 additions and 55 deletions

View File

@ -10,7 +10,7 @@
"license": "MIT",
"dependencies": {
"@fluencelabs/aqua": "^0.5.2-257",
"@fluencelabs/aqua-lib": "^0.3.2",
"@fluencelabs/aqua-lib": "^0.3.4",
"@fluencelabs/fluence": "^0.18.0",
"@fluencelabs/fluence-network-environment": "^1.0.10",
"@fluencelabs/trust-graph": "file:../aqua",
@ -22,7 +22,7 @@
},
"../aqua": {
"name": "@fluencelabs/trust-graph",
"version": "0.2.0",
"version": "0.2.2",
"license": "MIT",
"dependencies": {
"@fluencelabs/aqua-lib": "^0.3.1"
@ -133,9 +133,9 @@
"integrity": "sha512-H2Q4gIvociUxc4J2mwmH0D+mrU2N2Z+enKCHgBCanMVEE2wZDsZ80GTbDKsQjEq+gpqbnJIk8lJBYW6lyvLJTg=="
},
"node_modules/@fluencelabs/aqua-lib": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.3.2.tgz",
"integrity": "sha512-8+NKFwRg9SFzpbac1SvvTWcOgHhMoYZwRyb93qJRcNFaN7xjRcA8v0i6CF7Mkjno1zH3xixC9J44+LKQd8uvzA=="
"version": "0.3.4",
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.3.4.tgz",
"integrity": "sha512-DH7TZgflTJDxK18URlELnHI65jYtZf7b5e25gjRL9AiT/nvdodQqSvCcdVKK/jvhPy9q3RXM/rOcHfqh5mmpSQ=="
},
"node_modules/@fluencelabs/aqua/node_modules/@fluencelabs/aqua-lib": {
"version": "0.2.1",
@ -4345,9 +4345,9 @@
}
},
"@fluencelabs/aqua-lib": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.3.2.tgz",
"integrity": "sha512-8+NKFwRg9SFzpbac1SvvTWcOgHhMoYZwRyb93qJRcNFaN7xjRcA8v0i6CF7Mkjno1zH3xixC9J44+LKQd8uvzA=="
"version": "0.3.4",
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.3.4.tgz",
"integrity": "sha512-DH7TZgflTJDxK18URlELnHI65jYtZf7b5e25gjRL9AiT/nvdodQqSvCcdVKK/jvhPy9q3RXM/rOcHfqh5mmpSQ=="
},
"@fluencelabs/avm": {
"version": "0.20.0",

View File

@ -14,7 +14,7 @@
"license": "MIT",
"dependencies": {
"@fluencelabs/aqua": "^0.5.2-257",
"@fluencelabs/aqua-lib": "^0.3.2",
"@fluencelabs/aqua-lib": "^0.3.4",
"@fluencelabs/fluence": "^0.18.0",
"@fluencelabs/fluence-network-environment": "^1.0.10",
"@fluencelabs/trust-graph": "file:../aqua",

18
aqua/package-lock.json generated
View File

@ -1,15 +1,15 @@
{
"name": "@fluencelabs/trust-graph",
"version": "0.2.0",
"version": "0.2.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@fluencelabs/trust-graph",
"version": "0.2.0",
"version": "0.2.2",
"license": "MIT",
"dependencies": {
"@fluencelabs/aqua-lib": "^0.3.1"
"@fluencelabs/aqua-lib": "^0.3.4"
},
"devDependencies": {
"@fluencelabs/aqua": "^0.5.2-257"
@ -130,9 +130,9 @@
"dev": true
},
"node_modules/@fluencelabs/aqua-lib": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.3.2.tgz",
"integrity": "sha512-8+NKFwRg9SFzpbac1SvvTWcOgHhMoYZwRyb93qJRcNFaN7xjRcA8v0i6CF7Mkjno1zH3xixC9J44+LKQd8uvzA=="
"version": "0.3.4",
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.3.4.tgz",
"integrity": "sha512-DH7TZgflTJDxK18URlELnHI65jYtZf7b5e25gjRL9AiT/nvdodQqSvCcdVKK/jvhPy9q3RXM/rOcHfqh5mmpSQ=="
},
"node_modules/@fluencelabs/aqua/node_modules/@fluencelabs/aqua-lib": {
"version": "0.2.1",
@ -4576,9 +4576,9 @@
}
},
"@fluencelabs/aqua-lib": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.3.2.tgz",
"integrity": "sha512-8+NKFwRg9SFzpbac1SvvTWcOgHhMoYZwRyb93qJRcNFaN7xjRcA8v0i6CF7Mkjno1zH3xixC9J44+LKQd8uvzA=="
"version": "0.3.4",
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.3.4.tgz",
"integrity": "sha512-DH7TZgflTJDxK18URlELnHI65jYtZf7b5e25gjRL9AiT/nvdodQqSvCcdVKK/jvhPy9q3RXM/rOcHfqh5mmpSQ=="
},
"@fluencelabs/avm": {
"version": "0.16.0-restriction-operator.9",

View File

@ -6,7 +6,7 @@
"*.aqua"
],
"dependencies": {
"@fluencelabs/aqua-lib": "^0.3.1"
"@fluencelabs/aqua-lib": "^0.3.4"
},
"scripts": {
"generate-aqua": "../service/build.sh",

View File

@ -27,21 +27,18 @@ func issue_trust(issuer: PeerId, issued_for: PeerId, expires_at_sec: u64) -> ?Tr
result: ?Trust
error: *Error
if bytes.success:
-- for %init_peer_id% Sig service available by default and registered as "sig"
-- for other peer ids custom Sig service should be implemented and registered with this peer id as service id
if issuer != %init_peer_id%:
Sig issuer
else:
Sig "sig"
Sig issuer
sig_res <- Sig.sign(bytes.result)
signature <- Sig.sign(bytes.result)
on HOST_PEER_ID:
issue_result <- TrustGraph.issue_trust(issued_for, expires_at_sec, issued_at_sec, signature)
if issue_result.success:
result <<- issue_result.trust
if sig_res.success:
on HOST_PEER_ID:
issue_result <- TrustGraph.issue_trust(issued_for, expires_at_sec, issued_at_sec, sig_res.signature!)
if issue_result.success:
result <<- issue_result.trust
else:
error <<- issue_result.error
else:
error <<- issue_result.error
error <<- sig_res.error!
else:
error <<- bytes.error
<- result, error
@ -133,21 +130,19 @@ func issue_revocation(revoked_by: PeerId, revoked: PeerId) -> ?Revocation, ?Erro
result: ?Revocation
error: *Error
if bytes.success:
-- for %init_peer_id% Sig service available by default and registered as "sig"
-- for other peer ids custom Sig service should be implemented and registered with this peer id as service id
if revoked_by != %init_peer_id%:
Sig revoked_by
else:
Sig "sig"
Sig revoked_by
signature <- Sig.sign(bytes.result)
sig_res <- Sig.sign(bytes.result)
on HOST_PEER_ID:
issue_result <- TrustGraph.issue_revocation(revoked_by, revoked, issued_at_sec, signature)
if issue_result.success:
result <<- issue_result.revocation
if sig_res.success:
on HOST_PEER_ID:
issue_result <- TrustGraph.issue_revocation(revoked_by, revoked, issued_at_sec, sig_res.signature!)
if issue_result.success:
result <<- issue_result.revocation
else:
error <<- issue_result.error
else:
error <<- issue_result.error
error <<- sig_res.error!
else:
error <<- bytes.error
<- result, error

View File

@ -10,7 +10,7 @@
"license": "MIT",
"dependencies": {
"@fluencelabs/aqua": "^0.5.2-257",
"@fluencelabs/aqua-lib": "^0.3.2",
"@fluencelabs/aqua-lib": "^0.3.4",
"@fluencelabs/fluence": "^0.18.0",
"@fluencelabs/fluence-network-environment": "^1.0.10",
"@fluencelabs/trust-graph": "file:../aqua",
@ -75,10 +75,10 @@
},
"../aqua": {
"name": "@fluencelabs/trust-graph",
"version": "0.2.0",
"version": "0.2.2",
"license": "MIT",
"dependencies": {
"@fluencelabs/aqua-lib": "^0.3.1"
"@fluencelabs/aqua-lib": "^0.3.4"
},
"devDependencies": {
"@fluencelabs/aqua": "^0.5.2-257"
@ -186,9 +186,9 @@
"integrity": "sha512-H2Q4gIvociUxc4J2mwmH0D+mrU2N2Z+enKCHgBCanMVEE2wZDsZ80GTbDKsQjEq+gpqbnJIk8lJBYW6lyvLJTg=="
},
"node_modules/@fluencelabs/aqua-lib": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.3.2.tgz",
"integrity": "sha512-8+NKFwRg9SFzpbac1SvvTWcOgHhMoYZwRyb93qJRcNFaN7xjRcA8v0i6CF7Mkjno1zH3xixC9J44+LKQd8uvzA=="
"version": "0.3.4",
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.3.4.tgz",
"integrity": "sha512-DH7TZgflTJDxK18URlELnHI65jYtZf7b5e25gjRL9AiT/nvdodQqSvCcdVKK/jvhPy9q3RXM/rOcHfqh5mmpSQ=="
},
"node_modules/@fluencelabs/aqua/node_modules/@fluencelabs/aqua-lib": {
"version": "0.2.1",
@ -4398,9 +4398,9 @@
}
},
"@fluencelabs/aqua-lib": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.3.2.tgz",
"integrity": "sha512-8+NKFwRg9SFzpbac1SvvTWcOgHhMoYZwRyb93qJRcNFaN7xjRcA8v0i6CF7Mkjno1zH3xixC9J44+LKQd8uvzA=="
"version": "0.3.4",
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.3.4.tgz",
"integrity": "sha512-DH7TZgflTJDxK18URlELnHI65jYtZf7b5e25gjRL9AiT/nvdodQqSvCcdVKK/jvhPy9q3RXM/rOcHfqh5mmpSQ=="
},
"@fluencelabs/avm": {
"version": "0.20.0",
@ -4455,7 +4455,7 @@
"version": "file:../aqua",
"requires": {
"@fluencelabs/aqua": "^0.5.2-257",
"@fluencelabs/aqua-lib": "^0.3.1"
"@fluencelabs/aqua-lib": "^0.3.4"
},
"dependencies": {
"@fluencelabs/aqua": {

View File

@ -14,7 +14,7 @@
"license": "MIT",
"dependencies": {
"@fluencelabs/aqua": "^0.5.2-257",
"@fluencelabs/aqua-lib": "^0.3.2",
"@fluencelabs/aqua-lib": "^0.3.4",
"@fluencelabs/fluence": "^0.18.0",
"@fluencelabs/fluence-network-environment": "^1.0.10",
"@fluencelabs/trust-graph": "file:../aqua",