From e9498e13294f285b3aec620135c1f0289095a74e Mon Sep 17 00:00:00 2001 From: DieMyst Date: Mon, 14 Mar 2022 14:48:41 +0300 Subject: [PATCH] dump --- package-lock.json | 14 +- src/compiled/examples/aliases.ts | 2 +- src/compiled/examples/assignment.ts | 2 +- src/compiled/examples/callArrow.ts | 2 +- src/compiled/examples/closures.ts | 282 ++++++++++++------ src/compiled/examples/co.ts | 2 +- src/compiled/examples/collectionSugar.ts | 2 +- src/compiled/examples/complex.ts | 2 +- src/compiled/examples/constants.ts | 2 +- src/compiled/examples/dataAlias.ts | 2 +- src/compiled/examples/example.ts | 2 +- src/compiled/examples/fldist-sample.ts | 2 +- src/compiled/examples/fold.ts | 2 +- src/compiled/examples/foldJoin.ts | 2 +- src/compiled/examples/func.ts | 2 +- src/compiled/examples/helloWorld.ts | 2 +- src/compiled/examples/if.ts | 2 +- .../examples/imports_exports/declare.ts | 2 +- .../examples/imports_exports/exports.ts | 2 +- .../examples/imports_exports/gen/OneMore.ts | 2 +- .../examples/imports_exports/import2.ts | 2 +- .../examples/imports_exports/import3.ts | 2 +- .../examples/imports_exports/imports.ts | 2 +- .../examples/imports_exports/subImport.ts | 2 +- src/compiled/examples/join.ts | 2 +- src/compiled/examples/multiReturn.ts | 2 +- src/compiled/examples/nestedFuncs.ts | 2 +- src/compiled/examples/new-api-full.ts | 2 +- src/compiled/examples/new-api.ts | 2 +- src/compiled/examples/on.ts | 2 +- src/compiled/examples/option.ts | 2 +- src/compiled/examples/options/option_gen.ts | 2 +- src/compiled/examples/par.ts | 2 +- src/compiled/examples/passArgs.ts | 2 +- src/compiled/examples/println.ts | 2 +- src/compiled/examples/pushToStream.ts | 2 +- src/compiled/examples/recursiveStreams.ts | 2 +- src/compiled/examples/returnLiteral.ts | 2 +- src/compiled/examples/stream.ts | 2 +- src/compiled/examples/streamArgs.ts | 2 +- src/compiled/examples/streamCallback.ts | 2 +- src/compiled/examples/streamCan.ts | 2 +- src/compiled/examples/streamRestriction.ts | 2 +- src/compiled/examples/streamResults.ts | 2 +- src/compiled/examples/subImportUsage.ts | 2 +- src/compiled/examples/topology.ts | 2 +- src/compiled/examples/tryCatch.ts | 2 +- src/compiled/examples/tryOtherwise.ts | 2 +- src/compiled/examples/via.ts | 2 +- src/config.ts | 2 +- src/examples/closures.ts | 11 +- 51 files changed, 250 insertions(+), 153 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1fc255c..b320647 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "@fluencelabs/aqua-dht-ts": "0.1.38", - "@fluencelabs/fluence": "0.0.1-fix-recursive-632.0", + "@fluencelabs/fluence": "0.21.1", "@fluencelabs/fluence-network-environment": "1.0.13", "deep-equal": "^2.0.5" }, @@ -1225,9 +1225,9 @@ "integrity": "sha512-Y41pL+UwZZVdormxju8cJQsNRp6tdER0VqJ9Kg9gH2wd1KJAaYTJkyVbn8NB7fEFRUbqfbb1BXHi9wWBYOgGYQ==" }, "node_modules/@fluencelabs/fluence": { - "version": "0.0.1-fix-recursive-632.0", - "resolved": "https://registry.npmjs.org/@fluencelabs/fluence/-/fluence-0.0.1-fix-recursive-632.0.tgz", - "integrity": "sha512-y1PgST/PCh1DxZ5lMcw/euaDOkwa0+HM8LUbfte29bjPvTopHD6zzWN87Znwv3d65WDSFqKpINrTPBIemyKaoQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@fluencelabs/fluence/-/fluence-0.21.1.tgz", + "integrity": "sha512-gBphyaAaSFo8W8DXsDTg0PBDYIq7+rgPMCEjLC2R8OSV4YF8sCdPZc/laqm9rDeeSP6++MJq4dQ5dj3aE5Kqbw==", "dependencies": { "@chainsafe/libp2p-noise": "^4.1.1", "@fluencelabs/avm": "^0.21.3", @@ -10371,9 +10371,9 @@ "integrity": "sha512-Y41pL+UwZZVdormxju8cJQsNRp6tdER0VqJ9Kg9gH2wd1KJAaYTJkyVbn8NB7fEFRUbqfbb1BXHi9wWBYOgGYQ==" }, "@fluencelabs/fluence": { - "version": "0.0.1-fix-recursive-632.0", - "resolved": "https://registry.npmjs.org/@fluencelabs/fluence/-/fluence-0.0.1-fix-recursive-632.0.tgz", - "integrity": "sha512-y1PgST/PCh1DxZ5lMcw/euaDOkwa0+HM8LUbfte29bjPvTopHD6zzWN87Znwv3d65WDSFqKpINrTPBIemyKaoQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@fluencelabs/fluence/-/fluence-0.21.1.tgz", + "integrity": "sha512-gBphyaAaSFo8W8DXsDTg0PBDYIq7+rgPMCEjLC2R8OSV4YF8sCdPZc/laqm9rDeeSP6++MJq4dQ5dj3aE5Kqbw==", "requires": { "@chainsafe/libp2p-noise": "^4.1.1", "@fluencelabs/avm": "^0.21.3", diff --git a/src/compiled/examples/aliases.ts b/src/compiled/examples/aliases.ts index 5e548d3..d5e3a5d 100644 --- a/src/compiled/examples/aliases.ts +++ b/src/compiled/examples/aliases.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/assignment.ts b/src/compiled/examples/assignment.ts index 50a35e9..010cf10 100644 --- a/src/compiled/examples/assignment.ts +++ b/src/compiled/examples/assignment.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/callArrow.ts b/src/compiled/examples/callArrow.ts index 6dec01c..5b6efa4 100644 --- a/src/compiled/examples/callArrow.ts +++ b/src/compiled/examples/callArrow.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/closures.ts b/src/compiled/examples/closures.ts index d98aae3..dc801f3 100644 --- a/src/compiled/examples/closures.ts +++ b/src/compiled/examples/closures.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; @@ -46,6 +46,155 @@ export function registerLocalSrv(...args: any) { // Functions +export type ClosureBigResult = [string, string] +export function closureBig( + peer1: string, + peer2: string, + config?: {ttl?: number} +): Promise; + +export function closureBig( + peer: FluencePeer, + peer1: string, + peer2: string, + config?: {ttl?: number} +): Promise; + +export function closureBig(...args: any) { + + let script = ` + (xor + (seq + (seq + (seq + (seq + (seq + (seq + (seq + (call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-) + (call %init_peer_id% ("getDataSrv" "peer1") [] peer1) + ) + (call %init_peer_id% ("getDataSrv" "peer2") [] peer2) + ) + (par + (seq + (call -relay- ("op" "noop") []) + (xor + (seq + (call peer1 ("op" "identity") ["co on"] p1Id) + (call -relay- ("op" "noop") []) + ) + (seq + (call -relay- ("op" "noop") []) + (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1]) + ) + ) + ) + (null) + ) + ) + (new $p2Id-0 + (seq + (xor + (match "in" "in" + (xor + (seq + (call %init_peer_id% ("op" "identity") ["in"] p2) + (ap p2 $p2Id-0) + ) + (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2]) + ) + ) + (seq + (call %init_peer_id% ("peer" "identify") [] p2Info) + (ap p2Info.$.external_addresses.[0]! $p2Id-0) + ) + ) + (call %init_peer_id% ("op" "identity") [$p2Id-0.$.[0]!] p2Id-fix) + ) + ) + ) + (call -relay- ("op" "noop") []) + ) + (xor + (seq + (call -relay- ("op" "noop") []) + (new $p2Id + (seq + (xor + (match "on" "in" + (xor + (seq + (call %init_peer_id% ("op" "identity") ["on"] p2-0) + (ap p2-0 $p2Id) + ) + (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 3]) + ) + ) + (seq + (call %init_peer_id% ("peer" "identify") [] p2Info-0) + (ap p2Info-0.$.external_addresses.[0]! $p2Id) + ) + ) + (call %init_peer_id% ("op" "identity") [$p2Id.$.[0]!] p2Id-fix-0) + ) + ) + ) + (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 4]) + ) + ) + (xor + (call %init_peer_id% ("callbackSrv" "response") [p2Id-fix p2Id-fix-0]) + (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 5]) + ) + ) + (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 6]) + ) + ` + return callFunction( + args, + { + "functionName" : "closureBig", + "returnType" : { + "tag" : "multiReturn", + "returnItems" : [ + { + "tag" : "primitive" + }, + { + "tag" : "primitive" + } + ] + }, + "argDefs" : [ + { + "name" : "peer1", + "argType" : { + "tag" : "primitive" + } + }, + { + "name" : "peer2", + "argType" : { + "tag" : "primitive" + } + } + ], + "names" : { + "relay" : "-relay-", + "getDataSrv" : "getDataSrv", + "callbackSrv" : "callbackSrv", + "responseSrv" : "callbackSrv", + "responseFnName" : "response", + "errorHandlingSrv" : "errorHandlingSrv", + "errorFnName" : "error" + } +}, + script + ) +} + + export function closureIn( peer1: string, @@ -137,19 +286,19 @@ export function closureIn(...args: any) { } -export type ClosureOutResult = { air_version: string; external_addresses: string[]; node_version: string; } -export function closureOut( +export type ClosureOut2Result = { air_version: string; external_addresses: string[]; node_version: string; } +export function closureOut2( peer2: string, config?: {ttl?: number} -): Promise; +): Promise; -export function closureOut( +export function closureOut2( peer: FluencePeer, peer2: string, config?: {ttl?: number} -): Promise; +): Promise; -export function closureOut(...args: any) { +export function closureOut2(...args: any) { let script = ` (xor @@ -201,7 +350,7 @@ export function closureOut(...args: any) { return callFunction( args, { - "functionName" : "closureOut", + "functionName" : "closureOut2", "returnType" : { "tag" : "primitive" }, @@ -228,21 +377,19 @@ export function closureOut(...args: any) { } -export type ClosureBigResult = [string, string] -export function closureBig( - peer1: string, +export type ClosureOutResult = { air_version: string; external_addresses: string[]; node_version: string; } +export function closureOut( peer2: string, config?: {ttl?: number} -): Promise; +): Promise; -export function closureBig( +export function closureOut( peer: FluencePeer, - peer1: string, peer2: string, config?: {ttl?: number} -): Promise; +): Promise; -export function closureBig(...args: any) { +export function closureOut(...args: any) { let script = ` (xor @@ -254,116 +401,57 @@ export function closureBig(...args: any) { (seq (seq (call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-) - (call %init_peer_id% ("getDataSrv" "peer1") [] peer1) + (call %init_peer_id% ("getDataSrv" "peer2") [] peer2) ) - (call %init_peer_id% ("getDataSrv" "peer2") [] peer2) + (call -relay- ("op" "noop") []) ) - (par + (xor (seq - (call -relay- ("op" "noop") []) - (xor - (seq - (call peer1 ("op" "identity") ["co on"] p1Id) - (call -relay- ("op" "noop") []) - ) - (seq - (call -relay- ("op" "noop") []) - (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1]) - ) + (seq + (call -relay- ("op" "noop") []) + (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1]) ) + (call -relay- ("op" "noop") []) ) (null) ) ) - (new $p2Id-0 - (seq + (xor + (match "on" "in" (xor - (match "in" "in" - (xor - (seq - (call %init_peer_id% ("op" "identity") ["in"] p2) - (ap p2 $p2Id-0) - ) + (call peer2 ("local_srv" "inside") []) + (seq + (seq + (call -relay- ("op" "noop") []) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2]) ) - ) - (seq - (call %init_peer_id% ("peer" "identify") [] p2Info) - (ap p2Info.$.external_addresses.[0]! $p2Id-0) + (call -relay- ("op" "noop") []) ) ) - (call %init_peer_id% ("op" "identity") [$p2Id-0.$.[0]!] p2Id-fix) ) + (null) ) ) - (call -relay- ("op" "noop") []) - ) - (xor - (seq - (new $p2Id - (seq - (xor - (match "on" "in" - (xor - (seq - (call peer2 ("op" "identity") ["on"] p2-0) - (ap p2-0 $p2Id) - ) - (seq - (seq - (call -relay- ("op" "noop") []) - (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 3]) - ) - (call -relay- ("op" "noop") []) - ) - ) - ) - (seq - (call peer2 ("peer" "identify") [] p2Info-0) - (ap p2Info-0.$.external_addresses.[0]! $p2Id) - ) - ) - (call peer2 ("op" "identity") [$p2Id.$.[0]!] p2Id-fix-0) - ) - ) - (call -relay- ("op" "noop") []) - ) - (seq - (call -relay- ("op" "noop") []) - (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 4]) - ) + (call peer2 ("peer" "identify") [] p2Id) ) + (call -relay- ("op" "noop") []) ) (xor - (call %init_peer_id% ("callbackSrv" "response") [p2Id-fix p2Id-fix-0]) - (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 5]) + (call %init_peer_id% ("callbackSrv" "response") [p2Id]) + (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 3]) ) ) - (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 6]) + (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 4]) ) ` return callFunction( args, { - "functionName" : "closureBig", + "functionName" : "closureOut", "returnType" : { - "tag" : "multiReturn", - "returnItems" : [ - { - "tag" : "primitive" - }, - { - "tag" : "primitive" - } - ] + "tag" : "primitive" }, "argDefs" : [ - { - "name" : "peer1", - "argType" : { - "tag" : "primitive" - } - }, { "name" : "peer2", "argType" : { diff --git a/src/compiled/examples/co.ts b/src/compiled/examples/co.ts index d0d2d42..0afe0e9 100644 --- a/src/compiled/examples/co.ts +++ b/src/compiled/examples/co.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/collectionSugar.ts b/src/compiled/examples/collectionSugar.ts index 3ccd755..1908c9b 100644 --- a/src/compiled/examples/collectionSugar.ts +++ b/src/compiled/examples/collectionSugar.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/complex.ts b/src/compiled/examples/complex.ts index 0a539db..344a931 100644 --- a/src/compiled/examples/complex.ts +++ b/src/compiled/examples/complex.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/constants.ts b/src/compiled/examples/constants.ts index 6d561eb..139a1d3 100644 --- a/src/compiled/examples/constants.ts +++ b/src/compiled/examples/constants.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/dataAlias.ts b/src/compiled/examples/dataAlias.ts index 12b24ba..db40b5f 100644 --- a/src/compiled/examples/dataAlias.ts +++ b/src/compiled/examples/dataAlias.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/example.ts b/src/compiled/examples/example.ts index 130aca3..434ca68 100644 --- a/src/compiled/examples/example.ts +++ b/src/compiled/examples/example.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/fldist-sample.ts b/src/compiled/examples/fldist-sample.ts index c15f0c9..b9cc511 100644 --- a/src/compiled/examples/fldist-sample.ts +++ b/src/compiled/examples/fldist-sample.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/fold.ts b/src/compiled/examples/fold.ts index 76092ae..a709e2d 100644 --- a/src/compiled/examples/fold.ts +++ b/src/compiled/examples/fold.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/foldJoin.ts b/src/compiled/examples/foldJoin.ts index c9f2928..1f1655a 100644 --- a/src/compiled/examples/foldJoin.ts +++ b/src/compiled/examples/foldJoin.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/func.ts b/src/compiled/examples/func.ts index b8b1960..c1e462d 100644 --- a/src/compiled/examples/func.ts +++ b/src/compiled/examples/func.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/helloWorld.ts b/src/compiled/examples/helloWorld.ts index 5f3a5c8..cba2649 100644 --- a/src/compiled/examples/helloWorld.ts +++ b/src/compiled/examples/helloWorld.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/if.ts b/src/compiled/examples/if.ts index 4980e8c..32e2c22 100644 --- a/src/compiled/examples/if.ts +++ b/src/compiled/examples/if.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/imports_exports/declare.ts b/src/compiled/examples/imports_exports/declare.ts index 699954b..10272b4 100644 --- a/src/compiled/examples/imports_exports/declare.ts +++ b/src/compiled/examples/imports_exports/declare.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/imports_exports/exports.ts b/src/compiled/examples/imports_exports/exports.ts index 143d522..78a21f5 100644 --- a/src/compiled/examples/imports_exports/exports.ts +++ b/src/compiled/examples/imports_exports/exports.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/imports_exports/gen/OneMore.ts b/src/compiled/examples/imports_exports/gen/OneMore.ts index 9ee54e0..734654a 100644 --- a/src/compiled/examples/imports_exports/gen/OneMore.ts +++ b/src/compiled/examples/imports_exports/gen/OneMore.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/imports_exports/import2.ts b/src/compiled/examples/imports_exports/import2.ts index 8b7c66c..178d2b5 100644 --- a/src/compiled/examples/imports_exports/import2.ts +++ b/src/compiled/examples/imports_exports/import2.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/imports_exports/import3.ts b/src/compiled/examples/imports_exports/import3.ts index a7906be..d0b5b10 100644 --- a/src/compiled/examples/imports_exports/import3.ts +++ b/src/compiled/examples/imports_exports/import3.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/imports_exports/imports.ts b/src/compiled/examples/imports_exports/imports.ts index 6ce4565..174560c 100644 --- a/src/compiled/examples/imports_exports/imports.ts +++ b/src/compiled/examples/imports_exports/imports.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/imports_exports/subImport.ts b/src/compiled/examples/imports_exports/subImport.ts index dc152fc..28ce289 100644 --- a/src/compiled/examples/imports_exports/subImport.ts +++ b/src/compiled/examples/imports_exports/subImport.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/join.ts b/src/compiled/examples/join.ts index 26eee30..1c486f7 100644 --- a/src/compiled/examples/join.ts +++ b/src/compiled/examples/join.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/multiReturn.ts b/src/compiled/examples/multiReturn.ts index cda43d7..fc3b697 100644 --- a/src/compiled/examples/multiReturn.ts +++ b/src/compiled/examples/multiReturn.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/nestedFuncs.ts b/src/compiled/examples/nestedFuncs.ts index 60c0973..1b6e8cb 100644 --- a/src/compiled/examples/nestedFuncs.ts +++ b/src/compiled/examples/nestedFuncs.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/new-api-full.ts b/src/compiled/examples/new-api-full.ts index 21ce53a..c8684f1 100644 --- a/src/compiled/examples/new-api-full.ts +++ b/src/compiled/examples/new-api-full.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/new-api.ts b/src/compiled/examples/new-api.ts index 2f67df3..e2a6614 100644 --- a/src/compiled/examples/new-api.ts +++ b/src/compiled/examples/new-api.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/on.ts b/src/compiled/examples/on.ts index 86a2d56..94d3373 100644 --- a/src/compiled/examples/on.ts +++ b/src/compiled/examples/on.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/option.ts b/src/compiled/examples/option.ts index 2a86d11..9a26de6 100644 --- a/src/compiled/examples/option.ts +++ b/src/compiled/examples/option.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/options/option_gen.ts b/src/compiled/examples/options/option_gen.ts index f9acc0c..f24e3d1 100644 --- a/src/compiled/examples/options/option_gen.ts +++ b/src/compiled/examples/options/option_gen.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/par.ts b/src/compiled/examples/par.ts index 9aad1c5..ffdb0ed 100644 --- a/src/compiled/examples/par.ts +++ b/src/compiled/examples/par.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/passArgs.ts b/src/compiled/examples/passArgs.ts index ee278eb..611bd94 100644 --- a/src/compiled/examples/passArgs.ts +++ b/src/compiled/examples/passArgs.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/println.ts b/src/compiled/examples/println.ts index 5416451..903293e 100644 --- a/src/compiled/examples/println.ts +++ b/src/compiled/examples/println.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/pushToStream.ts b/src/compiled/examples/pushToStream.ts index 187fa16..e4cd8c9 100644 --- a/src/compiled/examples/pushToStream.ts +++ b/src/compiled/examples/pushToStream.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/recursiveStreams.ts b/src/compiled/examples/recursiveStreams.ts index 2b0f097..62c31e2 100644 --- a/src/compiled/examples/recursiveStreams.ts +++ b/src/compiled/examples/recursiveStreams.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/returnLiteral.ts b/src/compiled/examples/returnLiteral.ts index e0430c3..3692c93 100644 --- a/src/compiled/examples/returnLiteral.ts +++ b/src/compiled/examples/returnLiteral.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/stream.ts b/src/compiled/examples/stream.ts index 317658f..9e691c2 100644 --- a/src/compiled/examples/stream.ts +++ b/src/compiled/examples/stream.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/streamArgs.ts b/src/compiled/examples/streamArgs.ts index a846b83..885ae24 100644 --- a/src/compiled/examples/streamArgs.ts +++ b/src/compiled/examples/streamArgs.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/streamCallback.ts b/src/compiled/examples/streamCallback.ts index 05434a0..7918388 100644 --- a/src/compiled/examples/streamCallback.ts +++ b/src/compiled/examples/streamCallback.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/streamCan.ts b/src/compiled/examples/streamCan.ts index 96856f1..32a48e9 100644 --- a/src/compiled/examples/streamCan.ts +++ b/src/compiled/examples/streamCan.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/streamRestriction.ts b/src/compiled/examples/streamRestriction.ts index 4f6eb0b..a712d51 100644 --- a/src/compiled/examples/streamRestriction.ts +++ b/src/compiled/examples/streamRestriction.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/streamResults.ts b/src/compiled/examples/streamResults.ts index f8d1e21..53b8fa7 100644 --- a/src/compiled/examples/streamResults.ts +++ b/src/compiled/examples/streamResults.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/subImportUsage.ts b/src/compiled/examples/subImportUsage.ts index 214ca65..b9a71aa 100644 --- a/src/compiled/examples/subImportUsage.ts +++ b/src/compiled/examples/subImportUsage.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/topology.ts b/src/compiled/examples/topology.ts index 26d67c0..14bdda1 100644 --- a/src/compiled/examples/topology.ts +++ b/src/compiled/examples/topology.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/tryCatch.ts b/src/compiled/examples/tryCatch.ts index bc3fab6..333720e 100644 --- a/src/compiled/examples/tryCatch.ts +++ b/src/compiled/examples/tryCatch.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/tryOtherwise.ts b/src/compiled/examples/tryOtherwise.ts index fcae698..3086216 100644 --- a/src/compiled/examples/tryOtherwise.ts +++ b/src/compiled/examples/tryOtherwise.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/compiled/examples/via.ts b/src/compiled/examples/via.ts index 33460aa..bcc492e 100644 --- a/src/compiled/examples/via.ts +++ b/src/compiled/examples/via.ts @@ -3,7 +3,7 @@ * 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.6.3-SNAPSHOT + * Aqua version: 0.6.4-SNAPSHOT * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; diff --git a/src/config.ts b/src/config.ts index 448ee02..5ac9e84 100644 --- a/src/config.ts +++ b/src/config.ts @@ -22,4 +22,4 @@ export const testNetConfig = { tryCatchError: "Local service error, ret_code is 1, error message is '\"Service with id 'unex' not found (function getStr)\"'" } -export const config = stageConfig +export const config = krasnodarConfig diff --git a/src/examples/closures.ts b/src/examples/closures.ts index e4e1371..57532cd 100644 --- a/src/examples/closures.ts +++ b/src/examples/closures.ts @@ -11,8 +11,17 @@ export async function closuresCall(): Promise<[string, string[], string[], [stri registerLocalSrv({inside: () => console.log("call inside")}) const resIn = await closureIn(relays[4].peerId, {ttl: 15000}) - const resOut = await closureOut(relays[5].peerId, {ttl: 15000}) + console.log("11111111111") + let resOut; + try { + resOut = await closureOut(relays[5].peerId, {ttl: 15000}) + } catch (e) { + console.log(e) + } + + console.log("22222222222") const resOut2 = await closureOut2(relays[5].peerId, {ttl: 15000}) + console.log("333333333333333") const resBig = await closureBig(relays[4].peerId, relays[5].peerId, {ttl: 15000}) return [resIn, resOut.external_addresses, resOut2.external_addresses, resBig]