Swapped secio with noise (#32)

Update libp2p-related packages and switch from secio to noise
This commit is contained in:
Pavel
2021-03-10 15:56:12 +03:00
committed by GitHub
parent 6013f623d4
commit f732a30eb8
5 changed files with 2355 additions and 882 deletions

View File

@ -257,9 +257,9 @@ export const createService = async (
* @param {[string]} nodeId - Optional node peer id to get available blueprints from
* @param {[string]} nodeId - Optional node peer id to deploy service to
* @param {[number]} ttl - Optional ttl for the particle which does the job
* @returns { Array<string> } - List of available blueprints
* @returns { Array<object> } - List of available blueprints
*/
export const getBlueprints = async (client: FluenceClient, nodeId?: string, ttl?: number): Promise<string[]> => {
export const getBlueprints = async (client: FluenceClient, nodeId?: string, ttl?: number): Promise<[{dependencies, id: string, name: string}]> => {
let returnValue = 'blueprints';
let call = (nodeId: string) => `(call "${nodeId}" ("dist" "list_blueprints") [] ${returnValue})`;
@ -269,7 +269,7 @@ export const getBlueprints = async (client: FluenceClient, nodeId?: string, ttl?
call,
returnValue,
new Map(),
(args: any[]) => args[0] as string[],
(args: any[]) => args[0],
nodeId,
ttl,
);