refactoring test, update client and aqua, use krasnodar

This commit is contained in:
DieMyst
2022-02-23 09:56:04 +03:00
parent 321d311c07
commit 48c10bcc6c
53 changed files with 1042 additions and 199 deletions

View File

@ -4,19 +4,34 @@ import { config } from '../config';
const relays = config.relays
export async function viaCall(): Promise<string[][]> {
export async function viaArrCall(): Promise<string[]> {
const relayPeerId = Fluence.getPeer().getStatus().relayPeerId;
registerCustomId({
id: (args0) => {
return args0;
},
});
let res = await viaArr(relays[4].peerId, [relays[2].peerId, relays[1].peerId]);
return res.external_addresses;
}
export async function viaOptCall(): Promise<string[]> {
const relayPeerId = Fluence.getPeer().getStatus().relayPeerId;
let res2 = await viaOpt(relayPeerId, relays[4].peerId, relays[2].peerId);
return res2.external_addresses;
}
export async function viaOptNullCall(): Promise<string[]> {
const relayPeerId = Fluence.getPeer().getStatus().relayPeerId;
let res3 = await viaOpt(relayPeerId, relays[4].peerId, relays[2].peerId || null);
return res3.external_addresses;
}
export async function viaStreamCall(): Promise<string[]> {
const relayPeerId = Fluence.getPeer().getStatus().relayPeerId;
let res4 = await viaStream(relays[4].peerId, [relays[2].peerId, relays[1].peerId]);
return [res.external_addresses, res2.external_addresses, res3.external_addresses, res4.external_addresses];
return res4.external_addresses;
}