quickstart remove generated files

This commit is contained in:
Pavel Murygin 2021-12-28 22:11:03 +03:00
parent 3baced7834
commit ef75f289b6
3 changed files with 0 additions and 823 deletions

View File

@ -1,138 +0,0 @@
/**
*
* 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.4.0-235
*
*/
import { Fluence, FluencePeer } from '@fluencelabs/fluence';
import {
CallParams,
callFunction,
registerService,
} from '@fluencelabs/fluence/dist/internal/compilerSupport/v2';
// Services
export interface HelloPeerDef {
hello: (from: string, callParams: CallParams<'from'>) => string | Promise<string>;
}
export function registerHelloPeer(service: HelloPeerDef): void;
export function registerHelloPeer(serviceId: string, service: HelloPeerDef): void;
export function registerHelloPeer(peer: FluencePeer, service: HelloPeerDef): void;
export function registerHelloPeer(peer: FluencePeer, serviceId: string, service: HelloPeerDef): void;
export function registerHelloPeer(...args: any) {
registerService(
args,
{
"defaultServiceId" : "HelloPeer",
"functions" : [
{
"functionName" : "hello",
"argDefs" : [
{
"name" : "from",
"argType" : {
"tag" : "primitive"
}
}
],
"returnType" : {
"tag" : "primitive"
}
}
]
}
);
}
// Functions
export function sayHello(targetPeerId: string, targetRelayPeerId: string, config?: {ttl?: number}): Promise<string>;
export function sayHello(peer: FluencePeer, targetPeerId: string, targetRelayPeerId: string, config?: {ttl?: number}): Promise<string>;
export function sayHello(...args: any) {
let script = `
(xor
(seq
(seq
(seq
(seq
(seq
(seq
(seq
(seq
(call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-)
(call %init_peer_id% ("getDataSrv" "targetPeerId") [] targetPeerId)
)
(call %init_peer_id% ("getDataSrv" "targetRelayPeerId") [] targetRelayPeerId)
)
(call -relay- ("op" "noop") [])
)
(call targetRelayPeerId ("op" "noop") [])
)
(xor
(call targetPeerId ("HelloPeer" "hello") [%init_peer_id%] res)
(seq
(seq
(seq
(call targetRelayPeerId ("op" "noop") [])
(call -relay- ("op" "noop") [])
)
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1])
)
(call -relay- ("op" "noop") [])
)
)
)
(call targetRelayPeerId ("op" "noop") [])
)
(call -relay- ("op" "noop") [])
)
(xor
(call %init_peer_id% ("callbackSrv" "response") [res])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2])
)
)
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 3])
)
`
return callFunction(
args,
{
"functionName" : "sayHello",
"returnType" : {
"tag" : "primitive"
},
"argDefs" : [
{
"name" : "targetPeerId",
"argType" : {
"tag" : "primitive"
}
},
{
"name" : "targetRelayPeerId",
"argType" : {
"tag" : "primitive"
}
}
],
"names" : {
"relay" : "-relay-",
"getDataSrv" : "getDataSrv",
"callbackSrv" : "callbackSrv",
"responseSrv" : "callbackSrv",
"responseFnName" : "response",
"errorHandlingSrv" : "errorHandlingSrv",
"errorFnName" : "error"
}
},
script
)
}

View File

@ -1,180 +0,0 @@
/**
*
* 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.4.0-235
*
*/
import { Fluence, FluencePeer } from '@fluencelabs/fluence';
import {
CallParams,
callFunction,
registerService,
} from '@fluencelabs/fluence/dist/internal/compilerSupport/v2';
// Services
export interface HelloWorldDef {
hello: (from: string, callParams: CallParams<'from'>) => { msg: string; reply: string; } | Promise<{ msg: string; reply: string; }>;
}
export function registerHelloWorld(serviceId: string, service: HelloWorldDef): void;
export function registerHelloWorld(peer: FluencePeer, serviceId: string, service: HelloWorldDef): void;
export function registerHelloWorld(...args: any) {
registerService(
args,
{
"functions" : [
{
"functionName" : "hello",
"argDefs" : [
{
"name" : "from",
"argType" : {
"tag" : "primitive"
}
}
],
"returnType" : {
"tag" : "primitive"
}
}
]
}
);
}
export interface HelloPeerDef {
hello: (message: string, callParams: CallParams<'message'>) => string | Promise<string>;
}
export function registerHelloPeer(service: HelloPeerDef): void;
export function registerHelloPeer(serviceId: string, service: HelloPeerDef): void;
export function registerHelloPeer(peer: FluencePeer, service: HelloPeerDef): void;
export function registerHelloPeer(peer: FluencePeer, serviceId: string, service: HelloPeerDef): void;
export function registerHelloPeer(...args: any) {
registerService(
args,
{
"defaultServiceId" : "HelloPeer",
"functions" : [
{
"functionName" : "hello",
"argDefs" : [
{
"name" : "message",
"argType" : {
"tag" : "primitive"
}
}
],
"returnType" : {
"tag" : "primitive"
}
}
]
}
);
}
// Functions
export function sayHello(targetPeerId: string, targetRelayPeerId: string, config?: {ttl?: number}): Promise<string>;
export function sayHello(peer: FluencePeer, targetPeerId: string, targetRelayPeerId: string, config?: {ttl?: number}): Promise<string>;
export function sayHello(...args: any) {
let script = `
(xor
(seq
(seq
(seq
(seq
(seq
(seq
(seq
(call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-)
(call %init_peer_id% ("getDataSrv" "targetPeerId") [] targetPeerId)
)
(call %init_peer_id% ("getDataSrv" "targetRelayPeerId") [] targetRelayPeerId)
)
(call -relay- ("op" "noop") [])
)
(xor
(seq
(call -relay- ("op" "noop") [])
(call "12D3KooWFEwNWcHqi9rtsmDhsYcDbRUCDXH84RC4FW6UfsFWaoHi" ("1e740ce4-81f6-4dd4-9bed-8d86e9c2fa50" "hello") [%init_peer_id%] comp)
)
(seq
(call -relay- ("op" "noop") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1])
)
)
)
(call -relay- ("op" "noop") [])
)
(par
(seq
(call targetRelayPeerId ("op" "noop") [])
(xor
(call targetPeerId ("HelloPeer" "hello") [%init_peer_id%] res)
(seq
(seq
(call targetRelayPeerId ("op" "noop") [])
(call -relay- ("op" "noop") [])
)
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2])
)
)
)
(null)
)
)
(xor
(call %init_peer_id% ("callbackSrv" "response") [comp.$.reply!])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 3])
)
)
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 4])
)
`
return callFunction(
args,
{
"functionName" : "sayHello",
"returnType" : {
"tag" : "primitive"
},
"argDefs" : [
{
"name" : "targetPeerId",
"argType" : {
"tag" : "primitive"
}
},
{
"name" : "targetRelayPeerId",
"argType" : {
"tag" : "primitive"
}
}
],
"names" : {
"relay" : "-relay-",
"getDataSrv" : "getDataSrv",
"callbackSrv" : "callbackSrv",
"responseSrv" : "callbackSrv",
"responseFnName" : "response",
"errorHandlingSrv" : "errorHandlingSrv",
"errorFnName" : "error"
}
},
script
)
}

View File

@ -1,505 +0,0 @@
/**
*
* 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.0-247
*
*/
import { Fluence, FluencePeer } from '@fluencelabs/fluence';
import {
CallParams,
callFunction,
registerService,
} from '@fluencelabs/fluence/dist/internal/compilerSupport/v2';
// Services
export interface AddOneDef {
add_one: (arg0: number, callParams: CallParams<'arg0'>) => number | Promise<number>;
}
export function registerAddOne(serviceId: string, service: AddOneDef): void;
export function registerAddOne(peer: FluencePeer, serviceId: string, service: AddOneDef): void;
export function registerAddOne(...args: any) {
registerService(
args,
{
"functions" : [
{
"functionName" : "add_one",
"argDefs" : [
{
"name" : "arg0",
"argType" : {
"tag" : "primitive"
}
}
],
"returnType" : {
"tag" : "primitive"
}
}
]
}
);
}
export interface MyOpDef {
identity: (u: number, callParams: CallParams<'u'>) => void | Promise<void>;
}
export function registerMyOp(service: MyOpDef): void;
export function registerMyOp(serviceId: string, service: MyOpDef): void;
export function registerMyOp(peer: FluencePeer, service: MyOpDef): void;
export function registerMyOp(peer: FluencePeer, serviceId: string, service: MyOpDef): void;
export function registerMyOp(...args: any) {
registerService(
args,
{
"defaultServiceId" : "op",
"functions" : [
{
"functionName" : "identity",
"argDefs" : [
{
"name" : "u",
"argType" : {
"tag" : "primitive"
}
}
],
"returnType" : {
"tag" : "void"
}
}
]
}
);
}
// Functions
export function add_one(
value: number,
node: string,
service_id: string,
config?: {ttl?: number}
): Promise<number>;
export function add_one(
peer: FluencePeer,
value: number,
node: string,
service_id: string,
config?: {ttl?: number}
): Promise<number>;
export function add_one(...args: any) {
let script = `
(xor
(seq
(seq
(seq
(seq
(seq
(seq
(seq
(call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-)
(call %init_peer_id% ("getDataSrv" "value") [] value)
)
(call %init_peer_id% ("getDataSrv" "node") [] node)
)
(call %init_peer_id% ("getDataSrv" "service_id") [] service_id)
)
(call -relay- ("op" "noop") [])
)
(xor
(seq
(call -relay- ("op" "noop") [])
(call node (service_id "add_one") [value] res)
)
(seq
(call -relay- ("op" "noop") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1])
)
)
)
(call -relay- ("op" "noop") [])
)
(xor
(call %init_peer_id% ("callbackSrv" "response") [res])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2])
)
)
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 3])
)
`
return callFunction(
args,
{
"functionName" : "add_one",
"returnType" : {
"tag" : "primitive"
},
"argDefs" : [
{
"name" : "value",
"argType" : {
"tag" : "primitive"
}
},
{
"name" : "node",
"argType" : {
"tag" : "primitive"
}
},
{
"name" : "service_id",
"argType" : {
"tag" : "primitive"
}
}
],
"names" : {
"relay" : "-relay-",
"getDataSrv" : "getDataSrv",
"callbackSrv" : "callbackSrv",
"responseSrv" : "callbackSrv",
"responseFnName" : "response",
"errorHandlingSrv" : "errorHandlingSrv",
"errorFnName" : "error"
}
},
script
)
}
export function add_one_three_times(
value: number,
ns_tuples: { node_id: string; service_id: string; }[],
config?: {ttl?: number}
): Promise<number>;
export function add_one_three_times(
peer: FluencePeer,
value: number,
ns_tuples: { node_id: string; service_id: string; }[],
config?: {ttl?: number}
): Promise<number>;
export function add_one_three_times(...args: any) {
let script = `
(xor
(seq
(seq
(seq
(seq
(seq
(seq
(seq
(seq
(call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-)
(call %init_peer_id% ("getDataSrv" "value") [] value)
)
(call %init_peer_id% ("getDataSrv" "ns_tuples") [] ns_tuples)
)
(call -relay- ("op" "noop") [])
)
(xor
(seq
(call -relay- ("op" "noop") [])
(call ns_tuples.$.[0].node_id! (ns_tuples.$.[0].service_id! "add_one") [value] res1)
)
(seq
(seq
(call -relay- ("op" "noop") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1])
)
(call -relay- ("op" "noop") [])
)
)
)
(xor
(call ns_tuples.$.[1].node_id! (ns_tuples.$.[1].service_id! "add_one") [res1] res2)
(seq
(seq
(call -relay- ("op" "noop") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2])
)
(call -relay- ("op" "noop") [])
)
)
)
(xor
(call ns_tuples.$.[2].node_id! (ns_tuples.$.[2].service_id! "add_one") [res2] res3)
(seq
(call -relay- ("op" "noop") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 3])
)
)
)
(call -relay- ("op" "noop") [])
)
(xor
(call %init_peer_id% ("callbackSrv" "response") [res3])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 4])
)
)
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 5])
)
`
return callFunction(
args,
{
"functionName" : "add_one_three_times",
"returnType" : {
"tag" : "primitive"
},
"argDefs" : [
{
"name" : "value",
"argType" : {
"tag" : "primitive"
}
},
{
"name" : "ns_tuples",
"argType" : {
"tag" : "primitive"
}
}
],
"names" : {
"relay" : "-relay-",
"getDataSrv" : "getDataSrv",
"callbackSrv" : "callbackSrv",
"responseSrv" : "callbackSrv",
"responseFnName" : "response",
"errorHandlingSrv" : "errorHandlingSrv",
"errorFnName" : "error"
}
},
script
)
}
export function add_one_par(
value: number,
ns_tuples: { node_id: string; service_id: string; }[],
config?: {ttl?: number}
): Promise<number[]>;
export function add_one_par(
peer: FluencePeer,
value: number,
ns_tuples: { node_id: string; service_id: string; }[],
config?: {ttl?: number}
): Promise<number[]>;
export function add_one_par(...args: any) {
let script = `
(xor
(seq
(seq
(seq
(seq
(call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-)
(call %init_peer_id% ("getDataSrv" "value") [] value)
)
(call %init_peer_id% ("getDataSrv" "ns_tuples") [] ns_tuples)
)
(new $res
(seq
(seq
(par
(seq
(fold ns_tuples ns
(par
(seq
(seq
(seq
(call -relay- ("op" "noop") [])
(xor
(seq
(call -relay- ("op" "noop") [])
(call ns.$.node_id! (ns.$.service_id! "add_one") [value] $res)
)
(seq
(call -relay- ("op" "noop") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1])
)
)
)
(call -relay- ("op" "noop") [])
)
(call %init_peer_id% ("op" "noop") [])
)
(next ns)
)
)
(call %init_peer_id% ("op" "noop") [])
)
(null)
)
(call %init_peer_id% ("op" "identity") [$res.$.[2]!])
)
(call %init_peer_id% ("op" "identity") [$res] res-fix)
)
)
)
(xor
(call %init_peer_id% ("callbackSrv" "response") [res-fix])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2])
)
)
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 3])
)
`
return callFunction(
args,
{
"functionName" : "add_one_par",
"returnType" : {
"tag" : "primitive"
},
"argDefs" : [
{
"name" : "value",
"argType" : {
"tag" : "primitive"
}
},
{
"name" : "ns_tuples",
"argType" : {
"tag" : "primitive"
}
}
],
"names" : {
"relay" : "-relay-",
"getDataSrv" : "getDataSrv",
"callbackSrv" : "callbackSrv",
"responseSrv" : "callbackSrv",
"responseFnName" : "response",
"errorHandlingSrv" : "errorHandlingSrv",
"errorFnName" : "error"
}
},
script
)
}
export function add_one_par_alt(
payload: { node_id: string; service_id: string; value: number; }[],
config?: {ttl?: number}
): Promise<number[]>;
export function add_one_par_alt(
peer: FluencePeer,
payload: { node_id: string; service_id: string; value: number; }[],
config?: {ttl?: number}
): Promise<number[]>;
export function add_one_par_alt(...args: any) {
let script = `
(xor
(seq
(seq
(seq
(call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-)
(call %init_peer_id% ("getDataSrv" "payload") [] payload)
)
(new $res
(seq
(seq
(par
(seq
(fold payload vns
(par
(seq
(seq
(seq
(call -relay- ("op" "noop") [])
(xor
(seq
(call -relay- ("op" "noop") [])
(call vns.$.node_id! (vns.$.service_id! "add_one") [vns.$.value!] $res)
)
(seq
(call -relay- ("op" "noop") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1])
)
)
)
(call -relay- ("op" "noop") [])
)
(call %init_peer_id% ("op" "noop") [])
)
(next vns)
)
)
(call %init_peer_id% ("op" "noop") [])
)
(null)
)
(call %init_peer_id% ("op" "identity") [$res.$.[2]!])
)
(call %init_peer_id% ("op" "identity") [$res] res-fix)
)
)
)
(xor
(call %init_peer_id% ("callbackSrv" "response") [res-fix])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2])
)
)
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 3])
)
`
return callFunction(
args,
{
"functionName" : "add_one_par_alt",
"returnType" : {
"tag" : "primitive"
},
"argDefs" : [
{
"name" : "payload",
"argType" : {
"tag" : "primitive"
}
}
],
"names" : {
"relay" : "-relay-",
"getDataSrv" : "getDataSrv",
"callbackSrv" : "callbackSrv",
"responseSrv" : "callbackSrv",
"responseFnName" : "response",
"errorHandlingSrv" : "errorHandlingSrv",
"errorFnName" : "error"
}
},
script
)
}