2021-05-04 18:49:59 +03:00
|
|
|
import {FluenceClient, registerServiceFunction} from "@fluencelabs/fluence";
|
2021-04-14 17:23:42 +03:00
|
|
|
import {doStuff} from "./compiled/complex";
|
2021-05-04 18:49:59 +03:00
|
|
|
import {testNet} from "@fluencelabs/fluence-network-environment";
|
2021-04-14 17:23:42 +03:00
|
|
|
|
|
|
|
export async function complexCall(client: FluenceClient) {
|
2021-05-04 18:49:59 +03:00
|
|
|
|
|
|
|
registerServiceFunction(client, "some-id", "t", (args: any[], _) => {
|
|
|
|
return args[0]
|
|
|
|
})
|
|
|
|
|
|
|
|
let peer2 = testNet[0]
|
|
|
|
|
|
|
|
return await doStuff(client, client.relayPeerId!, client.selfPeerId, true, true, ["1", "2"], ["3", "4"])
|
2021-04-15 12:45:18 +03:00
|
|
|
}
|