diff --git a/aqua/tests/sig-tests.aqua b/aqua/tests/sig-tests.aqua index bdf97fdd..a3ca9a66 100644 --- a/aqua/tests/sig-tests.aqua +++ b/aqua/tests/sig-tests.aqua @@ -1,5 +1,7 @@ +module Export + import SignResult, Sig from "../src/services.aqua" -export Sig +export Sig, DataProvider, callSig service DataProvider("data"): provide_data() -> []u8 diff --git a/package-lock.json b/package-lock.json index 47520516..df853c5f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@fluencelabs/fluence", - "version": "0.0.0", + "version": "0.0.1-fix-sig.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@fluencelabs/fluence", - "version": "0.0.0", + "version": "0.0.1-fix-sig.0", "license": "Apache-2.0", "dependencies": { "@chainsafe/libp2p-noise": "^4.1.1", @@ -37,8 +37,8 @@ "copy-avm-public": "dist/tools/copyAvmPublic.js" }, "devDependencies": { - "@fluencelabs/aqua": "^0.5.3-258", - "@fluencelabs/aqua-lib": "^0.3.4", + "@fluencelabs/aqua": "^0.7.0-285", + "@fluencelabs/aqua-lib": "^0.4.3", "@types/jest": "^26.0.22", "jest": "^26.6.3", "js-base64": "^3.7.2", @@ -686,14 +686,15 @@ } }, "node_modules/@fluencelabs/aqua": { - "version": "0.5.3-258", - "resolved": "https://registry.npmjs.org/@fluencelabs/aqua/-/aqua-0.5.3-258.tgz", - "integrity": "sha512-OM//lyc+xzvvm73/LD8ZoFmcvfNH/Ks/oRrHVAy40B3DwmXh1Y1YsaCYnzzC7Banc5ckW2JZDQsV1kZk+6pT3A==", + "version": "0.7.0-285", + "resolved": "https://registry.npmjs.org/@fluencelabs/aqua/-/aqua-0.7.0-285.tgz", + "integrity": "sha512-LvQyvuRh+IF6iK3SMGDeIOYyKolMSjQDxVsuVGKkZmhJXJl0BtX3ccah2QeQIjqa0ef1BtepLALDs+6vCeW2hw==", "dev": true, "dependencies": { "@fluencelabs/aqua-ipfs": "0.5.2", - "@fluencelabs/aqua-lib": "0.3.2", - "@fluencelabs/fluence": "0.18.0", + "@fluencelabs/aqua-lib": "0.4.0", + "@fluencelabs/fluence": "0.21.5", + "@fluencelabs/fluence-network-environment": "1.0.13", "ipfs-http-client": "50.1.2" }, "bin": { @@ -717,15 +718,15 @@ "dev": true }, "node_modules/@fluencelabs/aqua-lib": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.3.4.tgz", - "integrity": "sha512-DH7TZgflTJDxK18URlELnHI65jYtZf7b5e25gjRL9AiT/nvdodQqSvCcdVKK/jvhPy9q3RXM/rOcHfqh5mmpSQ==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.4.3.tgz", + "integrity": "sha512-IKhxn4UUWQnrxnZgLVXiO6O+49E+9TAN8RTfRGjJk02JJor854+4WbtfhaapOdx7R6SXq074PVFTbrfnFVhRcQ==", "dev": true }, "node_modules/@fluencelabs/aqua/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.4.0", + "resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.4.0.tgz", + "integrity": "sha512-bad282cCZrE//I+Hzsl/vWgudwXuNiaqJOonv11xkgOBBvL7Gg3SIap8HioNvkaDxIvylVB+POjYJ7E5sGNoVQ==", "dev": true }, "node_modules/@fluencelabs/avm": { @@ -755,27 +756,31 @@ "integrity": "sha512-Y41pL+UwZZVdormxju8cJQsNRp6tdER0VqJ9Kg9gH2wd1KJAaYTJkyVbn8NB7fEFRUbqfbb1BXHi9wWBYOgGYQ==" }, "node_modules/@fluencelabs/fluence": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/@fluencelabs/fluence/-/fluence-0.18.0.tgz", - "integrity": "sha512-YmDgpyu3ffFYkWrzILyfJH8hvca11QpeY0TZiN0ptHTRGxOeFThw5Ikcf68kErPTT7OQUhsjSKHGHT0Yopb3mg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@fluencelabs/fluence/-/fluence-0.21.5.tgz", + "integrity": "sha512-Zldn2I09ENp+F4MDYxsIMkJQOIQyfpiYmcAmVl60yTdKls78GmmnSyvAI+dZxUcNrhPqscnrtaENJoKwGwgm+Q==", "dev": true, "dependencies": { - "@chainsafe/libp2p-noise": "4.0.0", - "@fluencelabs/avm": "0.20.0", - "@fluencelabs/avm-runner-background": "0.1.2", + "@chainsafe/libp2p-noise": "^4.1.1", + "@fluencelabs/avm": "^0.21.3", + "@fluencelabs/avm-runner-background": "0.2.0", "@fluencelabs/avm-runner-interface": "^0.2.0", + "@fluencelabs/marine-js": "0.1.0", "async": "3.2.0", + "browser-or-node": "^2.0.0", "bs58": "4.0.1", + "buffer": "^6.0.3", "cids": "0.8.1", "it-length-prefixed": "3.0.1", "it-pipe": "1.1.0", - "libp2p": "0.32.3", - "libp2p-crypto": "0.19.7", - "libp2p-mplex": "0.10.4", - "libp2p-websockets": "0.16.1", + "libp2p": "=0.33.0", + "libp2p-crypto": "=0.20.0", + "libp2p-mplex": "=0.10.2", + "libp2p-websockets": "^0.16.2", "loglevel": "1.7.0", - "multiaddr": "10.0.0", - "peer-id": "0.15.3", + "multiaddr": "^10.0.1", + "multiformats": "^9.6.4", + "peer-id": "=0.15.4", "rxjs": "^7.3.0", "ts-pattern": "^3.3.3", "uuid": "8.3.0" @@ -784,282 +789,12 @@ "copy-avm-public": "dist/tools/copyAvmPublic.js" } }, - "node_modules/@fluencelabs/fluence/node_modules/@chainsafe/libp2p-noise": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@chainsafe/libp2p-noise/-/libp2p-noise-4.0.0.tgz", - "integrity": "sha512-Q9gcC1IzN8/aQQXl/ntRbldTD/3c35j5lK5guIKEB+QU/Ogi0EyaihkL3YGx9QrSiFTyz0ABlSfxA0Wxfw5R1A==", - "dev": true, - "dependencies": { - "@stablelib/chacha20poly1305": "^1.0.1", - "@stablelib/hkdf": "^1.0.1", - "@stablelib/sha256": "^1.0.1", - "@stablelib/x25519": "^1.0.1", - "debug": "^4.3.1", - "it-buffer": "^0.1.1", - "it-length-prefixed": "^5.0.2", - "it-pair": "^1.0.0", - "it-pb-rpc": "^0.1.9", - "it-pipe": "^1.1.0", - "libp2p-crypto": "^0.19.0", - "peer-id": "^0.15.0", - "protobufjs": "^6.10.1", - "uint8arrays": "^2.0.5" - } - }, - "node_modules/@fluencelabs/fluence/node_modules/@chainsafe/libp2p-noise/node_modules/it-length-prefixed": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/it-length-prefixed/-/it-length-prefixed-5.0.3.tgz", - "integrity": "sha512-b+jDHLcnOnPDQN79ronmzF5jeBjdJsy0ce2O6i6X4J5tnaO8Fd146ZA/tMbzaLlKnTpXa0eKtofpYhumXGENeg==", - "dev": true, - "dependencies": { - "bl": "^5.0.0", - "buffer": "^6.0.3", - "varint": "^6.0.0" - } - }, - "node_modules/@fluencelabs/fluence/node_modules/@fluencelabs/avm": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@fluencelabs/avm/-/avm-0.20.0.tgz", - "integrity": "sha512-dDtXh9iJ4U/lZhdS36Dsef55fzeCYGSYVBey1mi+OHzyDtQoxxAkac9HeMlgWWQoZzy9i43JmX0t0iX7tBt+4A==", - "dev": true, - "bin": { - "copy-avm": "dist/copyAvm.js" - } - }, - "node_modules/@fluencelabs/fluence/node_modules/@fluencelabs/avm-runner-background": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@fluencelabs/avm-runner-background/-/avm-runner-background-0.1.2.tgz", - "integrity": "sha512-06E8l6ZLkWkpWas1TTojVrs+tekOg/OvnNI6/GKdm4zJL/9ePxW1WYE8Ieg1dIk6FpcP+ZxcEfZZKDoDwn68pQ==", - "dev": true, - "dependencies": { - "@fluencelabs/avm-runner-interface": "^0.2.0", - "browser-or-node": "^2.0.0", - "threads": "^1.7.0" - }, - "bin": { - "copy-avm-runner": "dist/copyRunnerScript.js" - } - }, - "node_modules/@fluencelabs/fluence/node_modules/es6-promisify": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-6.1.1.tgz", - "integrity": "sha512-HBL8I3mIki5C1Cc9QjKUenHtnG0A5/xA8Q/AllRcfiwl2CZFXGK7ddBiCoRwAix4i2KxcQfjtIVcrVbB3vbmwg==", + "node_modules/@fluencelabs/fluence-network-environment": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@fluencelabs/fluence-network-environment/-/fluence-network-environment-1.0.13.tgz", + "integrity": "sha512-2pci3T0sUHE08jwEs1r/vHKVT4XUh/A3j/QJ0eIhddsxyIjEksjdn05X7DF6STD14CF8GgBVOJEPgav8qaUMpA==", "dev": true }, - "node_modules/@fluencelabs/fluence/node_modules/interface-datastore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/interface-datastore/-/interface-datastore-5.2.0.tgz", - "integrity": "sha512-nthO4C4BMJM2j9x/mT2KFa/g/sbcY8yf9j/kOBgli3u5mq9ZdPvQyDxi0OhKzr4JmoM81OYh5xcFjyebquqwvA==", - "dev": true, - "dependencies": { - "err-code": "^3.0.1", - "interface-store": "^1.0.2", - "ipfs-utils": "^8.1.2", - "it-all": "^1.0.2", - "it-drain": "^1.0.1", - "it-filter": "^1.0.2", - "it-take": "^1.0.1", - "nanoid": "^3.0.2", - "uint8arrays": "^3.0.0" - } - }, - "node_modules/@fluencelabs/fluence/node_modules/interface-datastore/node_modules/uint8arrays": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", - "dev": true, - "dependencies": { - "multiformats": "^9.4.2" - } - }, - "node_modules/@fluencelabs/fluence/node_modules/interface-store": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-1.0.2.tgz", - "integrity": "sha512-rUBLYsgoWwxuUpnQoSUr+DR/3dH3reVeIu5aOHFZK31lAexmb++kR6ZECNRgrx6WvoaM3Akdo0A7TDrqgCzZaQ==", - "dev": true - }, - "node_modules/@fluencelabs/fluence/node_modules/libp2p": { - "version": "0.32.3", - "resolved": "https://registry.npmjs.org/libp2p/-/libp2p-0.32.3.tgz", - "integrity": "sha512-FD1cweUmWgI510JIRfr80yCD/SugAawZPUQXPKPtOtaFeAynpEj7DEIE6iiVpc6Ed56nnyUivVikY7C8L50f9g==", - "dev": true, - "dependencies": { - "@motrix/nat-api": "^0.3.1", - "@vascosantos/moving-average": "^1.1.0", - "abort-controller": "^3.0.0", - "aggregate-error": "^3.1.0", - "any-signal": "^2.1.1", - "bignumber.js": "^9.0.1", - "class-is": "^1.1.0", - "debug": "^4.3.1", - "err-code": "^3.0.0", - "es6-promisify": "^6.1.1", - "events": "^3.3.0", - "hashlru": "^2.3.0", - "interface-datastore": "^5.1.1", - "it-all": "^1.0.4", - "it-buffer": "^0.1.2", - "it-drain": "^1.0.3", - "it-filter": "^1.0.1", - "it-first": "^1.0.4", - "it-handshake": "^2.0.0", - "it-length-prefixed": "^5.0.2", - "it-map": "^1.0.4", - "it-merge": "^1.0.0", - "it-pipe": "^1.1.0", - "it-take": "^1.0.0", - "libp2p-crypto": "^0.19.4", - "libp2p-interfaces": "^1.0.0", - "libp2p-utils": "^0.4.0", - "mafmt": "^10.0.0", - "merge-options": "^3.0.4", - "multiaddr": "^10.0.0", - "multiformats": "^9.0.0", - "multistream-select": "^2.0.0", - "mutable-proxy": "^1.0.0", - "node-forge": "^0.10.0", - "p-any": "^3.0.0", - "p-fifo": "^1.0.0", - "p-retry": "^4.4.0", - "p-settle": "^4.1.1", - "peer-id": "^0.15.0", - "private-ip": "^2.1.0", - "protobufjs": "^6.10.2", - "retimer": "^3.0.0", - "sanitize-filename": "^1.6.3", - "set-delayed-interval": "^1.0.0", - "streaming-iterables": "^6.0.0", - "timeout-abort-controller": "^1.1.1", - "uint8arrays": "^2.1.3", - "varint": "^6.0.0", - "wherearewe": "^1.0.0", - "xsalsa20": "^1.1.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@fluencelabs/fluence/node_modules/libp2p-crypto": { - "version": "0.19.7", - "resolved": "https://registry.npmjs.org/libp2p-crypto/-/libp2p-crypto-0.19.7.tgz", - "integrity": "sha512-Qb5o/3WFKF2j6mYSt4UBPyi2kbKl3jYV0podBJoJCw70DlpM5Xc+oh3fFY9ToSunu8aSQQ5GY8nutjXgX/uGRA==", - "dev": true, - "dependencies": { - "err-code": "^3.0.1", - "is-typedarray": "^1.0.0", - "iso-random-stream": "^2.0.0", - "keypair": "^1.0.1", - "multiformats": "^9.4.5", - "node-forge": "^0.10.0", - "pem-jwk": "^2.0.0", - "protobufjs": "^6.11.2", - "secp256k1": "^4.0.0", - "uint8arrays": "^3.0.0", - "ursa-optional": "^0.10.1" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@fluencelabs/fluence/node_modules/libp2p-crypto/node_modules/uint8arrays": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", - "dev": true, - "dependencies": { - "multiformats": "^9.4.2" - } - }, - "node_modules/@fluencelabs/fluence/node_modules/libp2p-mplex": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/libp2p-mplex/-/libp2p-mplex-0.10.4.tgz", - "integrity": "sha512-a8Oy68EXaSBBXGOGYMuwBcpnynkhqAFJ3LiyV24u9fE4wTxvuWTr0prSyKc+KC8QsLuX3A+CAdSgxqm09NbumQ==", - "dev": true, - "dependencies": { - "abort-controller": "^3.0.0", - "abortable-iterator": "^3.0.0", - "bl": "^5.0.0", - "debug": "^4.3.1", - "err-code": "^3.0.1", - "it-pipe": "^1.1.0", - "it-pushable": "^1.4.1", - "varint": "^6.0.0" - } - }, - "node_modules/@fluencelabs/fluence/node_modules/libp2p-websockets": { - "version": "0.16.1", - "resolved": "https://registry.npmjs.org/libp2p-websockets/-/libp2p-websockets-0.16.1.tgz", - "integrity": "sha512-HXaCdlAkG5RDZCehEnkoVzQjT1C6NIaCKLERkkZ1ArKG77K7Y7uy+8y81uNZhy4OLQ8jGUMyOvKnjw6EjKJPmw==", - "dev": true, - "dependencies": { - "abortable-iterator": "^3.0.0", - "class-is": "^1.1.0", - "debug": "^4.3.1", - "err-code": "^3.0.1", - "ipfs-utils": "^8.1.2", - "it-ws": "^4.0.0", - "libp2p-utils": "^0.4.0", - "mafmt": "^10.0.0", - "multiaddr": "^10.0.0", - "multiaddr-to-uri": "^8.0.0", - "p-defer": "^3.0.0", - "p-timeout": "^4.1.0" - } - }, - "node_modules/@fluencelabs/fluence/node_modules/libp2p/node_modules/it-length-prefixed": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/it-length-prefixed/-/it-length-prefixed-5.0.3.tgz", - "integrity": "sha512-b+jDHLcnOnPDQN79ronmzF5jeBjdJsy0ce2O6i6X4J5tnaO8Fd146ZA/tMbzaLlKnTpXa0eKtofpYhumXGENeg==", - "dev": true, - "dependencies": { - "bl": "^5.0.0", - "buffer": "^6.0.3", - "varint": "^6.0.0" - } - }, - "node_modules/@fluencelabs/fluence/node_modules/multiaddr": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-10.0.0.tgz", - "integrity": "sha512-yP3LzFkM0GORZHNenS8Ok2spsaICRBhxLEohAfKKwwrgHIEWrDUhMRIkh/MONDBThNqaiGl7Ch1H7qblRDNHyg==", - "dev": true, - "dependencies": { - "dns-over-http-resolver": "^1.0.0", - "err-code": "^3.0.1", - "is-ip": "^3.1.0", - "multiformats": "^9.0.2", - "uint8arrays": "^2.1.3", - "varint": "^6.0.0" - } - }, - "node_modules/@fluencelabs/fluence/node_modules/peer-id": { - "version": "0.15.3", - "resolved": "https://registry.npmjs.org/peer-id/-/peer-id-0.15.3.tgz", - "integrity": "sha512-pass5tk6Fbaz7PTD/3fJg2KWqaproHY0B0Ki8GQMEuMjkoLRcS2Vqt9yy6ob/+8uGBmWjRLtbMhaLV4HTyMDfw==", - "dev": true, - "dependencies": { - "class-is": "^1.1.0", - "libp2p-crypto": "^0.19.0", - "minimist": "^1.2.5", - "multiformats": "^9.4.5", - "protobufjs": "^6.10.2", - "uint8arrays": "^3.0.0" - }, - "bin": { - "peer-id": "src/bin.js" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@fluencelabs/fluence/node_modules/peer-id/node_modules/uint8arrays": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", - "dev": true, - "dependencies": { - "multiformats": "^9.4.2" - } - }, "node_modules/@fluencelabs/marine-js": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/@fluencelabs/marine-js/-/marine-js-0.1.0.tgz", @@ -10463,21 +10198,22 @@ } }, "@fluencelabs/aqua": { - "version": "0.5.3-258", - "resolved": "https://registry.npmjs.org/@fluencelabs/aqua/-/aqua-0.5.3-258.tgz", - "integrity": "sha512-OM//lyc+xzvvm73/LD8ZoFmcvfNH/Ks/oRrHVAy40B3DwmXh1Y1YsaCYnzzC7Banc5ckW2JZDQsV1kZk+6pT3A==", + "version": "0.7.0-285", + "resolved": "https://registry.npmjs.org/@fluencelabs/aqua/-/aqua-0.7.0-285.tgz", + "integrity": "sha512-LvQyvuRh+IF6iK3SMGDeIOYyKolMSjQDxVsuVGKkZmhJXJl0BtX3ccah2QeQIjqa0ef1BtepLALDs+6vCeW2hw==", "dev": true, "requires": { "@fluencelabs/aqua-ipfs": "0.5.2", - "@fluencelabs/aqua-lib": "0.3.2", - "@fluencelabs/fluence": "0.18.0", + "@fluencelabs/aqua-lib": "0.4.0", + "@fluencelabs/fluence": "0.21.5", + "@fluencelabs/fluence-network-environment": "1.0.13", "ipfs-http-client": "50.1.2" }, "dependencies": { "@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.4.0", + "resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.4.0.tgz", + "integrity": "sha512-bad282cCZrE//I+Hzsl/vWgudwXuNiaqJOonv11xkgOBBvL7Gg3SIap8HioNvkaDxIvylVB+POjYJ7E5sGNoVQ==", "dev": true } } @@ -10500,9 +10236,9 @@ } }, "@fluencelabs/aqua-lib": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.3.4.tgz", - "integrity": "sha512-DH7TZgflTJDxK18URlELnHI65jYtZf7b5e25gjRL9AiT/nvdodQqSvCcdVKK/jvhPy9q3RXM/rOcHfqh5mmpSQ==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.4.3.tgz", + "integrity": "sha512-IKhxn4UUWQnrxnZgLVXiO6O+49E+9TAN8RTfRGjJk02JJor854+4WbtfhaapOdx7R6SXq074PVFTbrfnFVhRcQ==", "dev": true }, "@fluencelabs/avm": { @@ -10526,302 +10262,42 @@ "integrity": "sha512-Y41pL+UwZZVdormxju8cJQsNRp6tdER0VqJ9Kg9gH2wd1KJAaYTJkyVbn8NB7fEFRUbqfbb1BXHi9wWBYOgGYQ==" }, "@fluencelabs/fluence": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/@fluencelabs/fluence/-/fluence-0.18.0.tgz", - "integrity": "sha512-YmDgpyu3ffFYkWrzILyfJH8hvca11QpeY0TZiN0ptHTRGxOeFThw5Ikcf68kErPTT7OQUhsjSKHGHT0Yopb3mg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@fluencelabs/fluence/-/fluence-0.21.5.tgz", + "integrity": "sha512-Zldn2I09ENp+F4MDYxsIMkJQOIQyfpiYmcAmVl60yTdKls78GmmnSyvAI+dZxUcNrhPqscnrtaENJoKwGwgm+Q==", "dev": true, "requires": { - "@chainsafe/libp2p-noise": "4.0.0", - "@fluencelabs/avm": "0.20.0", - "@fluencelabs/avm-runner-background": "0.1.2", + "@chainsafe/libp2p-noise": "^4.1.1", + "@fluencelabs/avm": "^0.21.3", + "@fluencelabs/avm-runner-background": "0.2.0", "@fluencelabs/avm-runner-interface": "^0.2.0", + "@fluencelabs/marine-js": "0.1.0", "async": "3.2.0", + "browser-or-node": "^2.0.0", "bs58": "4.0.1", + "buffer": "^6.0.3", "cids": "0.8.1", "it-length-prefixed": "3.0.1", "it-pipe": "1.1.0", - "libp2p": "0.32.3", - "libp2p-crypto": "0.19.7", - "libp2p-mplex": "0.10.4", - "libp2p-websockets": "0.16.1", + "libp2p": "=0.33.0", + "libp2p-crypto": "=0.20.0", + "libp2p-mplex": "=0.10.2", + "libp2p-websockets": "^0.16.2", "loglevel": "1.7.0", - "multiaddr": "10.0.0", - "peer-id": "0.15.3", + "multiaddr": "^10.0.1", + "multiformats": "^9.6.4", + "peer-id": "=0.15.4", "rxjs": "^7.3.0", "ts-pattern": "^3.3.3", "uuid": "8.3.0" - }, - "dependencies": { - "@chainsafe/libp2p-noise": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@chainsafe/libp2p-noise/-/libp2p-noise-4.0.0.tgz", - "integrity": "sha512-Q9gcC1IzN8/aQQXl/ntRbldTD/3c35j5lK5guIKEB+QU/Ogi0EyaihkL3YGx9QrSiFTyz0ABlSfxA0Wxfw5R1A==", - "dev": true, - "requires": { - "@stablelib/chacha20poly1305": "^1.0.1", - "@stablelib/hkdf": "^1.0.1", - "@stablelib/sha256": "^1.0.1", - "@stablelib/x25519": "^1.0.1", - "debug": "^4.3.1", - "it-buffer": "^0.1.1", - "it-length-prefixed": "^5.0.2", - "it-pair": "^1.0.0", - "it-pb-rpc": "^0.1.9", - "it-pipe": "^1.1.0", - "libp2p-crypto": "^0.19.0", - "peer-id": "^0.15.0", - "protobufjs": "^6.10.1", - "uint8arrays": "^2.0.5" - }, - "dependencies": { - "it-length-prefixed": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/it-length-prefixed/-/it-length-prefixed-5.0.3.tgz", - "integrity": "sha512-b+jDHLcnOnPDQN79ronmzF5jeBjdJsy0ce2O6i6X4J5tnaO8Fd146ZA/tMbzaLlKnTpXa0eKtofpYhumXGENeg==", - "dev": true, - "requires": { - "bl": "^5.0.0", - "buffer": "^6.0.3", - "varint": "^6.0.0" - } - } - } - }, - "@fluencelabs/avm": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@fluencelabs/avm/-/avm-0.20.0.tgz", - "integrity": "sha512-dDtXh9iJ4U/lZhdS36Dsef55fzeCYGSYVBey1mi+OHzyDtQoxxAkac9HeMlgWWQoZzy9i43JmX0t0iX7tBt+4A==", - "dev": true - }, - "@fluencelabs/avm-runner-background": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@fluencelabs/avm-runner-background/-/avm-runner-background-0.1.2.tgz", - "integrity": "sha512-06E8l6ZLkWkpWas1TTojVrs+tekOg/OvnNI6/GKdm4zJL/9ePxW1WYE8Ieg1dIk6FpcP+ZxcEfZZKDoDwn68pQ==", - "dev": true, - "requires": { - "@fluencelabs/avm-runner-interface": "^0.2.0", - "browser-or-node": "^2.0.0", - "threads": "^1.7.0" - } - }, - "es6-promisify": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-6.1.1.tgz", - "integrity": "sha512-HBL8I3mIki5C1Cc9QjKUenHtnG0A5/xA8Q/AllRcfiwl2CZFXGK7ddBiCoRwAix4i2KxcQfjtIVcrVbB3vbmwg==", - "dev": true - }, - "interface-datastore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/interface-datastore/-/interface-datastore-5.2.0.tgz", - "integrity": "sha512-nthO4C4BMJM2j9x/mT2KFa/g/sbcY8yf9j/kOBgli3u5mq9ZdPvQyDxi0OhKzr4JmoM81OYh5xcFjyebquqwvA==", - "dev": true, - "requires": { - "err-code": "^3.0.1", - "interface-store": "^1.0.2", - "ipfs-utils": "^8.1.2", - "it-all": "^1.0.2", - "it-drain": "^1.0.1", - "it-filter": "^1.0.2", - "it-take": "^1.0.1", - "nanoid": "^3.0.2", - "uint8arrays": "^3.0.0" - }, - "dependencies": { - "uint8arrays": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", - "dev": true, - "requires": { - "multiformats": "^9.4.2" - } - } - } - }, - "interface-store": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-1.0.2.tgz", - "integrity": "sha512-rUBLYsgoWwxuUpnQoSUr+DR/3dH3reVeIu5aOHFZK31lAexmb++kR6ZECNRgrx6WvoaM3Akdo0A7TDrqgCzZaQ==", - "dev": true - }, - "libp2p": { - "version": "0.32.3", - "resolved": "https://registry.npmjs.org/libp2p/-/libp2p-0.32.3.tgz", - "integrity": "sha512-FD1cweUmWgI510JIRfr80yCD/SugAawZPUQXPKPtOtaFeAynpEj7DEIE6iiVpc6Ed56nnyUivVikY7C8L50f9g==", - "dev": true, - "requires": { - "@motrix/nat-api": "^0.3.1", - "@vascosantos/moving-average": "^1.1.0", - "abort-controller": "^3.0.0", - "aggregate-error": "^3.1.0", - "any-signal": "^2.1.1", - "bignumber.js": "^9.0.1", - "class-is": "^1.1.0", - "debug": "^4.3.1", - "err-code": "^3.0.0", - "es6-promisify": "^6.1.1", - "events": "^3.3.0", - "hashlru": "^2.3.0", - "interface-datastore": "^5.1.1", - "it-all": "^1.0.4", - "it-buffer": "^0.1.2", - "it-drain": "^1.0.3", - "it-filter": "^1.0.1", - "it-first": "^1.0.4", - "it-handshake": "^2.0.0", - "it-length-prefixed": "^5.0.2", - "it-map": "^1.0.4", - "it-merge": "^1.0.0", - "it-pipe": "^1.1.0", - "it-take": "^1.0.0", - "libp2p-crypto": "^0.19.4", - "libp2p-interfaces": "^1.0.0", - "libp2p-utils": "^0.4.0", - "mafmt": "^10.0.0", - "merge-options": "^3.0.4", - "multiaddr": "^10.0.0", - "multiformats": "^9.0.0", - "multistream-select": "^2.0.0", - "mutable-proxy": "^1.0.0", - "node-forge": "^0.10.0", - "p-any": "^3.0.0", - "p-fifo": "^1.0.0", - "p-retry": "^4.4.0", - "p-settle": "^4.1.1", - "peer-id": "^0.15.0", - "private-ip": "^2.1.0", - "protobufjs": "^6.10.2", - "retimer": "^3.0.0", - "sanitize-filename": "^1.6.3", - "set-delayed-interval": "^1.0.0", - "streaming-iterables": "^6.0.0", - "timeout-abort-controller": "^1.1.1", - "uint8arrays": "^2.1.3", - "varint": "^6.0.0", - "wherearewe": "^1.0.0", - "xsalsa20": "^1.1.0" - }, - "dependencies": { - "it-length-prefixed": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/it-length-prefixed/-/it-length-prefixed-5.0.3.tgz", - "integrity": "sha512-b+jDHLcnOnPDQN79ronmzF5jeBjdJsy0ce2O6i6X4J5tnaO8Fd146ZA/tMbzaLlKnTpXa0eKtofpYhumXGENeg==", - "dev": true, - "requires": { - "bl": "^5.0.0", - "buffer": "^6.0.3", - "varint": "^6.0.0" - } - } - } - }, - "libp2p-crypto": { - "version": "0.19.7", - "resolved": "https://registry.npmjs.org/libp2p-crypto/-/libp2p-crypto-0.19.7.tgz", - "integrity": "sha512-Qb5o/3WFKF2j6mYSt4UBPyi2kbKl3jYV0podBJoJCw70DlpM5Xc+oh3fFY9ToSunu8aSQQ5GY8nutjXgX/uGRA==", - "dev": true, - "requires": { - "err-code": "^3.0.1", - "is-typedarray": "^1.0.0", - "iso-random-stream": "^2.0.0", - "keypair": "^1.0.1", - "multiformats": "^9.4.5", - "node-forge": "^0.10.0", - "pem-jwk": "^2.0.0", - "protobufjs": "^6.11.2", - "secp256k1": "^4.0.0", - "uint8arrays": "^3.0.0", - "ursa-optional": "^0.10.1" - }, - "dependencies": { - "uint8arrays": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", - "dev": true, - "requires": { - "multiformats": "^9.4.2" - } - } - } - }, - "libp2p-mplex": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/libp2p-mplex/-/libp2p-mplex-0.10.4.tgz", - "integrity": "sha512-a8Oy68EXaSBBXGOGYMuwBcpnynkhqAFJ3LiyV24u9fE4wTxvuWTr0prSyKc+KC8QsLuX3A+CAdSgxqm09NbumQ==", - "dev": true, - "requires": { - "abort-controller": "^3.0.0", - "abortable-iterator": "^3.0.0", - "bl": "^5.0.0", - "debug": "^4.3.1", - "err-code": "^3.0.1", - "it-pipe": "^1.1.0", - "it-pushable": "^1.4.1", - "varint": "^6.0.0" - } - }, - "libp2p-websockets": { - "version": "0.16.1", - "resolved": "https://registry.npmjs.org/libp2p-websockets/-/libp2p-websockets-0.16.1.tgz", - "integrity": "sha512-HXaCdlAkG5RDZCehEnkoVzQjT1C6NIaCKLERkkZ1ArKG77K7Y7uy+8y81uNZhy4OLQ8jGUMyOvKnjw6EjKJPmw==", - "dev": true, - "requires": { - "abortable-iterator": "^3.0.0", - "class-is": "^1.1.0", - "debug": "^4.3.1", - "err-code": "^3.0.1", - "ipfs-utils": "^8.1.2", - "it-ws": "^4.0.0", - "libp2p-utils": "^0.4.0", - "mafmt": "^10.0.0", - "multiaddr": "^10.0.0", - "multiaddr-to-uri": "^8.0.0", - "p-defer": "^3.0.0", - "p-timeout": "^4.1.0" - } - }, - "multiaddr": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-10.0.0.tgz", - "integrity": "sha512-yP3LzFkM0GORZHNenS8Ok2spsaICRBhxLEohAfKKwwrgHIEWrDUhMRIkh/MONDBThNqaiGl7Ch1H7qblRDNHyg==", - "dev": true, - "requires": { - "dns-over-http-resolver": "^1.0.0", - "err-code": "^3.0.1", - "is-ip": "^3.1.0", - "multiformats": "^9.0.2", - "uint8arrays": "^2.1.3", - "varint": "^6.0.0" - } - }, - "peer-id": { - "version": "0.15.3", - "resolved": "https://registry.npmjs.org/peer-id/-/peer-id-0.15.3.tgz", - "integrity": "sha512-pass5tk6Fbaz7PTD/3fJg2KWqaproHY0B0Ki8GQMEuMjkoLRcS2Vqt9yy6ob/+8uGBmWjRLtbMhaLV4HTyMDfw==", - "dev": true, - "requires": { - "class-is": "^1.1.0", - "libp2p-crypto": "^0.19.0", - "minimist": "^1.2.5", - "multiformats": "^9.4.5", - "protobufjs": "^6.10.2", - "uint8arrays": "^3.0.0" - }, - "dependencies": { - "uint8arrays": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", - "dev": true, - "requires": { - "multiformats": "^9.4.2" - } - } - } - } } }, + "@fluencelabs/fluence-network-environment": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@fluencelabs/fluence-network-environment/-/fluence-network-environment-1.0.13.tgz", + "integrity": "sha512-2pci3T0sUHE08jwEs1r/vHKVT4XUh/A3j/QJ0eIhddsxyIjEksjdn05X7DF6STD14CF8GgBVOJEPgav8qaUMpA==", + "dev": true + }, "@fluencelabs/marine-js": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/@fluencelabs/marine-js/-/marine-js-0.1.0.tgz", diff --git a/package.json b/package.json index 207c22d4..c70fadf1 100644 --- a/package.json +++ b/package.json @@ -47,8 +47,8 @@ "uuid": "8.3.0" }, "devDependencies": { - "@fluencelabs/aqua": "^0.5.3-258", - "@fluencelabs/aqua-lib": "^0.3.4", + "@fluencelabs/aqua": "^0.7.0-285", + "@fluencelabs/aqua-lib": "^0.4.3", "@types/jest": "^26.0.22", "jest": "^26.6.3", "js-base64": "^3.7.2", diff --git a/src/__test__/_aqua/sig-tests.ts b/src/__test__/_aqua/sig-tests.ts index 6c449cc7..db5780f4 100644 --- a/src/__test__/_aqua/sig-tests.ts +++ b/src/__test__/_aqua/sig-tests.ts @@ -3,11 +3,11 @@ * This file is auto-generated. Do not edit manually: changes may be erased. * Generated by Aqua compiler: https://github.com/fluencelabs/aqua/. * If you find any bugs, please write an issue on GitHub: https://github.com/fluencelabs/aqua/issues - * Aqua version: 0.5.3-258 + * Aqua version: 0.7.0-285 * */ -import { Fluence, FluencePeer } from '../../'; -import { CallParams, callFunction, registerService } from '../../internal/compilerSupport/v2'; +import { Fluence, FluencePeer } from '../../index'; +import { CallParams, callFunction, registerService } from '../../internal/compilerSupport/v3'; // Services @@ -22,15 +22,29 @@ export function registerDataProvider(peer: FluencePeer, serviceId: string, servi export function registerDataProvider(...args: any) { registerService(args, { defaultServiceId: 'data', - functions: [ - { - functionName: 'provide_data', - argDefs: [], - returnType: { - tag: 'primitive', + functions: { + tag: 'labeledProduct', + fields: { + provide_data: { + tag: 'arrow', + domain: { + tag: 'nil', + }, + codomain: { + tag: 'unlabeledProduct', + items: [ + { + tag: 'array', + type: { + tag: 'scalar', + name: 'u8', + }, + }, + ], + }, }, }, - ], + }, }); } @@ -56,49 +70,104 @@ export function registerSig(peer: FluencePeer, serviceId: string, service: SigDe export function registerSig(...args: any) { registerService(args, { defaultServiceId: 'sig', - functions: [ - { - functionName: 'get_pub_key', - argDefs: [], - returnType: { - tag: 'primitive', + functions: { + tag: 'labeledProduct', + fields: { + get_pub_key: { + tag: 'arrow', + domain: { + tag: 'nil', + }, + codomain: { + tag: 'unlabeledProduct', + items: [ + { + tag: 'scalar', + name: 'string', + }, + ], + }, }, - }, - { - functionName: 'sign', - argDefs: [ - { - name: 'data', - argType: { - tag: 'primitive', + sign: { + tag: 'arrow', + domain: { + tag: 'labeledProduct', + fields: { + data: { + tag: 'array', + type: { + tag: 'scalar', + name: 'u8', + }, + }, }, }, - ], - returnType: { - tag: 'primitive', + codomain: { + tag: 'unlabeledProduct', + items: [ + { + tag: 'struct', + name: 'SignResult', + fields: { + error: { + tag: 'option', + type: { + tag: 'scalar', + name: 'string', + }, + }, + signature: { + tag: 'option', + type: { + tag: 'array', + type: { + tag: 'scalar', + name: 'u8', + }, + }, + }, + success: { + tag: 'scalar', + name: 'bool', + }, + }, + }, + ], + }, }, - }, - { - functionName: 'verify', - argDefs: [ - { - name: 'signature', - argType: { - tag: 'primitive', + verify: { + tag: 'arrow', + domain: { + tag: 'labeledProduct', + fields: { + signature: { + tag: 'array', + type: { + tag: 'scalar', + name: 'u8', + }, + }, + data: { + tag: 'array', + type: { + tag: 'scalar', + name: 'u8', + }, + }, }, }, - { - name: 'data', - argType: { - tag: 'primitive', - }, + codomain: { + tag: 'unlabeledProduct', + items: [ + { + tag: 'scalar', + name: 'bool', + }, + ], }, - ], - returnType: { - tag: 'primitive', }, }, - ], + }, }); } @@ -135,17 +204,50 @@ export function callSig(...args: any) { args, { functionName: 'callSig', - returnType: { - tag: 'primitive', - }, - argDefs: [ - { - name: 'sigId', - argType: { - tag: 'primitive', + arrow: { + tag: 'arrow', + domain: { + tag: 'labeledProduct', + fields: { + sigId: { + tag: 'scalar', + name: 'string', + }, }, }, - ], + codomain: { + tag: 'unlabeledProduct', + items: [ + { + tag: 'struct', + name: 'SignResult', + fields: { + error: { + tag: 'option', + type: { + tag: 'scalar', + name: 'string', + }, + }, + signature: { + tag: 'option', + type: { + tag: 'array', + type: { + tag: 'scalar', + name: 'u8', + }, + }, + }, + success: { + tag: 'scalar', + name: 'bool', + }, + }, + }, + ], + }, + }, names: { relay: '-relay-', getDataSrv: 'getDataSrv', diff --git a/src/internal/_aqua/services.ts b/src/internal/_aqua/services.ts index 4662ed93..97eb082b 100644 --- a/src/internal/_aqua/services.ts +++ b/src/internal/_aqua/services.ts @@ -3,11 +3,11 @@ * This file is auto-generated. Do not edit manually: changes may be erased. * Generated by Aqua compiler: https://github.com/fluencelabs/aqua/. * If you find any bugs, please write an issue on GitHub: https://github.com/fluencelabs/aqua/issues - * Aqua version: 0.5.3-258 + * Aqua version: 0.7.0-285 * */ -import { Fluence, FluencePeer } from '../../'; -import { CallParams, callFunction, registerService } from '../../internal/compilerSupport/v2'; +import { Fluence, FluencePeer } from '../../index'; +import { CallParams, callFunction, registerService } from '../../internal/compilerSupport/v3'; // Services @@ -33,49 +33,104 @@ export function registerSig(peer: FluencePeer, serviceId: string, service: SigDe export function registerSig(...args: any) { registerService(args, { defaultServiceId: 'sig', - functions: [ - { - functionName: 'get_pub_key', - argDefs: [], - returnType: { - tag: 'primitive', + functions: { + tag: 'labeledProduct', + fields: { + get_pub_key: { + tag: 'arrow', + domain: { + tag: 'nil', + }, + codomain: { + tag: 'unlabeledProduct', + items: [ + { + tag: 'scalar', + name: 'string', + }, + ], + }, }, - }, - { - functionName: 'sign', - argDefs: [ - { - name: 'data', - argType: { - tag: 'primitive', + sign: { + tag: 'arrow', + domain: { + tag: 'labeledProduct', + fields: { + data: { + tag: 'array', + type: { + tag: 'scalar', + name: 'u8', + }, + }, }, }, - ], - returnType: { - tag: 'primitive', + codomain: { + tag: 'unlabeledProduct', + items: [ + { + tag: 'struct', + name: 'SignResult', + fields: { + error: { + tag: 'option', + type: { + tag: 'scalar', + name: 'string', + }, + }, + signature: { + tag: 'option', + type: { + tag: 'array', + type: { + tag: 'scalar', + name: 'u8', + }, + }, + }, + success: { + tag: 'scalar', + name: 'bool', + }, + }, + }, + ], + }, }, - }, - { - functionName: 'verify', - argDefs: [ - { - name: 'signature', - argType: { - tag: 'primitive', + verify: { + tag: 'arrow', + domain: { + tag: 'labeledProduct', + fields: { + signature: { + tag: 'array', + type: { + tag: 'scalar', + name: 'u8', + }, + }, + data: { + tag: 'array', + type: { + tag: 'scalar', + name: 'u8', + }, + }, }, }, - { - name: 'data', - argType: { - tag: 'primitive', - }, + codomain: { + tag: 'unlabeledProduct', + items: [ + { + tag: 'scalar', + name: 'bool', + }, + ], }, - ], - returnType: { - tag: 'primitive', }, }, - ], + }, }); }