Update JS SDK version and migrate to the new JS API (#11)

This commit is contained in:
Pavel
2021-09-08 13:00:24 +03:00
committed by GitHub
parent 200c33e969
commit 26c3fa7303
81 changed files with 10592 additions and 7903 deletions

View File

@ -1,6 +1,7 @@
import {FluenceClient} from "@fluencelabs/fluence";
import {getTwoResults} from "../compiled/examples/foldJoin";
import { FluencePeer } from '@fluencelabs/fluence';
import { getTwoResults } from '../compiled/examples/foldJoin';
export async function foldJoinCall(client: FluenceClient): Promise<number[]> {
return await getTwoResults(client, client.relayPeerId!, {ttl: 10000})
export async function foldJoinCall(): Promise<number[]> {
const relayPeerId = FluencePeer.default.connectionInfo.connectedRelay;
return await getTwoResults(relayPeerId);
}