mirror of
https://github.com/fluencelabs/aqua-playground
synced 2025-06-20 13:16:35 +00:00
update compiled, add declare\import tests
This commit is contained in:
@ -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.1.13-SNAPSHOT
|
||||
* Aqua version: 0.1.14-SNAPSHOT
|
||||
*
|
||||
*/
|
||||
import { FluenceClient, PeerIdB58 } from '@fluencelabs/fluence';
|
||||
@ -11,6 +11,130 @@ import { RequestFlowBuilder } from '@fluencelabs/fluence/dist/api.unstable';
|
||||
import { RequestFlow } from '@fluencelabs/fluence/dist/internal/RequestFlow';
|
||||
|
||||
|
||||
// Services
|
||||
|
||||
//Srv
|
||||
//defaultId = "srv"
|
||||
|
||||
//add_alias: (alias: string, service_id: string) => void
|
||||
//create: (blueprint_id: string) => string
|
||||
//get_interface: (service_id: string) => {function_signatures:{arguments:string[][];name:string;output_types:string[]}[];record_types:{fields:string[][];id:number;name:string}[]}
|
||||
//list: () => {blueprint_id:string;id:string;owner_id:string}[]
|
||||
//remove: (service_id: string) => void
|
||||
//resolve_alias: (alias: string) => string
|
||||
//END Srv
|
||||
|
||||
|
||||
|
||||
|
||||
//TestS
|
||||
//defaultId = "some-id"
|
||||
|
||||
//multiline: (a: string, b: string, c: boolean) => string
|
||||
//t: (arg0: string) => string
|
||||
//END TestS
|
||||
|
||||
|
||||
|
||||
|
||||
//Peer
|
||||
//defaultId = "peer"
|
||||
|
||||
//connect: (id: string, multiaddrs: string[] | null) => boolean
|
||||
//get_contact: (peer: string) => {addresses:string[];peer_id:string}
|
||||
//identify: () => {external_addresses:string[]}
|
||||
//is_connected: (peer: string) => boolean
|
||||
//timestamp_ms: () => number
|
||||
//timestamp_sec: () => number
|
||||
//END Peer
|
||||
|
||||
|
||||
|
||||
|
||||
//StringExtra
|
||||
//defaultId = "service-id"
|
||||
|
||||
//addNameToHello: (arg0: string) => string
|
||||
//END StringExtra
|
||||
|
||||
|
||||
|
||||
|
||||
//Op
|
||||
//defaultId = "op"
|
||||
|
||||
//array: (a: string, b: string | null, c: string | null, d: string | null) => string[]
|
||||
//array_length: (array: string[]) => number
|
||||
//bytes_from_b58: (b: string) => number[]
|
||||
//bytes_to_b58: (bs: number[]) => string
|
||||
//concat: (a: string[], b: string[] | null, c: string[] | null, d: string[] | null) => string[]
|
||||
//concat_strings: (a: string, b: string) => string
|
||||
//identity: (s: string | null) => string | null
|
||||
//noop: () => void
|
||||
//sha256_string: (s: string) => string
|
||||
//string_from_b58: (b: string) => string
|
||||
//string_to_b58: (s: string) => string
|
||||
//END Op
|
||||
|
||||
|
||||
|
||||
|
||||
//Script
|
||||
//defaultId = "script"
|
||||
|
||||
//add: (air_script: string, interval: string | null) => string
|
||||
//list: () => {failures:number;id:string;interval:string;owner:string;src:string}
|
||||
//remove: (script_id: string) => boolean
|
||||
//END Script
|
||||
|
||||
|
||||
|
||||
|
||||
//TestSrv
|
||||
//defaultId = "test-service-id"
|
||||
|
||||
//str: () => string
|
||||
//END TestSrv
|
||||
|
||||
|
||||
|
||||
|
||||
//Dist
|
||||
//defaultId = "dist"
|
||||
|
||||
//add_blueprint: (blueprint: {dependencies:string[];name:string}) => string
|
||||
//add_module: (wasm_b56_content: number[], conf: {name:string}) => string
|
||||
//add_module_from_vault: (path: string, config: {name:string}) => string
|
||||
//default_module_config: (module_name: string) => {name:string}
|
||||
//get_interface: (module_id: string) => {function_signatures:{arguments:string[][];name:string;output_types:string[]}[];record_types:{fields:string[][];id:number;name:string}[]}
|
||||
//list_blueprints: () => {dependencies:string[];id:string;name:string}[]
|
||||
//list_modules: () => {config:{name:string};hash:string;name:string}[]
|
||||
//make_blueprint: (name: string, dependencies: string[]) => {dependencies:string[];name:string}
|
||||
//make_module_config: (name: string, mem_pages_count: number | null, logger_enabled: boolean | null, preopened_files: string[] | null, envs: string[][] | null, mapped_dirs: string[][] | null, mounted_binaries: string[][] | null, logging_mask: number | null) => {name:string}
|
||||
//END Dist
|
||||
|
||||
|
||||
|
||||
|
||||
//Kademlia
|
||||
//defaultId = "kad"
|
||||
|
||||
//merge: (target: string, left: string[], right: string[], count: number | null) => string[]
|
||||
//neighborhood: (key: string, already_hashed: boolean | null, count: number | null) => string[]
|
||||
//END Kademlia
|
||||
|
||||
|
||||
|
||||
|
||||
//Println
|
||||
//defaultId = "println-service-id"
|
||||
|
||||
//print: (arg0: string) => void
|
||||
//END Println
|
||||
|
||||
|
||||
|
||||
// Functions
|
||||
|
||||
export async function helloWorld(client: FluenceClient, name: string, config?: {ttl?: number}): Promise<string> {
|
||||
let request: RequestFlow;
|
||||
@ -325,4 +449,4 @@ h.on('getDataSrv', 'str', () => {return str;});
|
||||
await client.initiateFlow(request!);
|
||||
return promise;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user