aqua-ipfs-integration (WIP)

This commit is contained in:
Pavel Murygin 2021-12-28 22:47:17 +03:00
parent 52d08f583a
commit c36f776e60
10 changed files with 302 additions and 1297 deletions

View File

@ -0,0 +1,4 @@
# fluence
src/

View File

@ -22,8 +22,7 @@
"license": "MIT",
"dependencies": {
"@fluencelabs/aqua-ipfs": "0.4.2",
"@fluencelabs/aqua-lib": "0.1.14",
"@fluencelabs/fluence": "^0.14.2",
"@fluencelabs/fluence": "0.17.0",
"@fluencelabs/fluence-network-environment": "1.0.10",
"ipfs-http-client": "^50.1.2",
"it-all": "^1.0.5",
@ -31,7 +30,8 @@
"uint8arrays": "^2.1.5"
},
"devDependencies": {
"@fluencelabs/aqua": "^0.4.0-235",
"@fluencelabs/aqua": "^0.5.2-256",
"@fluencelabs/aqua-lib": "^0.3.2",
"typescript": "^4.0.0"
}
}

View File

@ -1,592 +0,0 @@
/**
*
* 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.4.0-235
*
*/
import { Fluence, FluencePeer } from '@fluencelabs/fluence';
import {
CallParams,
callFunction,
registerService,
} from '@fluencelabs/fluence/dist/internal/compilerSupport/v2';
// Services
// Functions
export function set_timeout(node: string, timeout_sec: number, config?: {ttl?: number}): Promise<void>;
export function set_timeout(peer: FluencePeer, node: string, timeout_sec: number, config?: {ttl?: number}): Promise<void>;
export function set_timeout(...args: any) {
let script = `
(xor
(seq
(seq
(seq
(seq
(call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-)
(call %init_peer_id% ("getDataSrv" "node") [] node)
)
(call %init_peer_id% ("getDataSrv" "timeout_sec") [] timeout_sec)
)
(call -relay- ("op" "noop") [])
)
(xor
(call node ("aqua-ipfs" "set_timeout") [timeout_sec])
(seq
(call -relay- ("op" "noop") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1])
)
)
)
(seq
(call -relay- ("op" "noop") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2])
)
)
`
return callFunction(
args,
{
"functionName" : "set_timeout",
"returnType" : {
"tag" : "void"
},
"argDefs" : [
{
"name" : "node",
"argType" : {
"tag" : "primitive"
}
},
{
"name" : "timeout_sec",
"argType" : {
"tag" : "primitive"
}
}
],
"names" : {
"relay" : "-relay-",
"getDataSrv" : "getDataSrv",
"callbackSrv" : "callbackSrv",
"responseSrv" : "callbackSrv",
"responseFnName" : "response",
"errorHandlingSrv" : "errorHandlingSrv",
"errorFnName" : "error"
}
},
script
)
}
export function get_and_cache(node: string, cid: string, from: string, error: (arg0: string, arg1: string, callParams: CallParams<'arg0' | 'arg1'>) => void | Promise<void>, config?: {ttl?: number}): Promise<string | null>;
export function get_and_cache(peer: FluencePeer, node: string, cid: string, from: string, error: (arg0: string, arg1: string, callParams: CallParams<'arg0' | 'arg1'>) => void | Promise<void>, config?: {ttl?: number}): Promise<string | null>;
export function get_and_cache(...args: any) {
let script = `
(xor
(seq
(seq
(seq
(seq
(seq
(seq
(seq
(call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-)
(call %init_peer_id% ("getDataSrv" "node") [] node)
)
(call %init_peer_id% ("getDataSrv" "cid") [] cid)
)
(call %init_peer_id% ("getDataSrv" "from") [] from)
)
(call -relay- ("op" "noop") [])
)
(xor
(seq
(call node ("aqua-ipfs" "get_from") [cid from] get)
(xor
(match get.$.success! true
(xor
(seq
(call node ("aqua-ipfs" "put") [get.$.path!] put)
(xor
(match put.$.success! true
(xor
(ap put.$.hash! $localCid)
(seq
(call -relay- ("op" "noop") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1])
)
)
)
(par
(seq
(call -relay- ("op" "noop") [])
(xor
(call %init_peer_id% ("callbackSrv" "error") ["Ipfs.put failed" put.$.error!])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2])
)
)
(null)
)
)
)
(seq
(call -relay- ("op" "noop") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 3])
)
)
)
(par
(seq
(call -relay- ("op" "noop") [])
(xor
(call %init_peer_id% ("callbackSrv" "error") ["Ipfs.get failed" get.$.error!])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 4])
)
)
(null)
)
)
)
(seq
(call -relay- ("op" "noop") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 5])
)
)
)
(call -relay- ("op" "noop") [])
)
(xor
(call %init_peer_id% ("callbackSrv" "response") [$localCid])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 6])
)
)
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 7])
)
`
return callFunction(
args,
{
"functionName" : "get_and_cache",
"returnType" : {
"tag" : "optional"
},
"argDefs" : [
{
"name" : "node",
"argType" : {
"tag" : "primitive"
}
},
{
"name" : "cid",
"argType" : {
"tag" : "primitive"
}
},
{
"name" : "from",
"argType" : {
"tag" : "primitive"
}
},
{
"name" : "error",
"argType" : {
"tag" : "callback",
"callback" : {
"argDefs" : [
{
"name" : "arg0",
"argType" : {
"tag" : "primitive"
}
},
{
"name" : "arg1",
"argType" : {
"tag" : "primitive"
}
}
],
"returnType" : {
"tag" : "void"
}
}
}
}
],
"names" : {
"relay" : "-relay-",
"getDataSrv" : "getDataSrv",
"callbackSrv" : "callbackSrv",
"responseSrv" : "callbackSrv",
"responseFnName" : "response",
"errorHandlingSrv" : "errorHandlingSrv",
"errorFnName" : "error"
}
},
script
)
}
export type Get_fromResult = { error: string; path: string; success: boolean; }
export function get_from(node: string, cid: string, from: string, config?: {ttl?: number}): Promise<Get_fromResult>;
export function get_from(peer: FluencePeer, node: string, cid: string, from: string, config?: {ttl?: number}): Promise<Get_fromResult>;
export function get_from(...args: any) {
let script = `
(xor
(seq
(seq
(seq
(seq
(seq
(seq
(seq
(call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-)
(call %init_peer_id% ("getDataSrv" "node") [] node)
)
(call %init_peer_id% ("getDataSrv" "cid") [] cid)
)
(call %init_peer_id% ("getDataSrv" "from") [] from)
)
(call -relay- ("op" "noop") [])
)
(xor
(call node ("aqua-ipfs" "get_from") [cid from] result)
(seq
(call -relay- ("op" "noop") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1])
)
)
)
(call -relay- ("op" "noop") [])
)
(xor
(call %init_peer_id% ("callbackSrv" "response") [result])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2])
)
)
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 3])
)
`
return callFunction(
args,
{
"functionName" : "get_from",
"returnType" : {
"tag" : "primitive"
},
"argDefs" : [
{
"name" : "node",
"argType" : {
"tag" : "primitive"
}
},
{
"name" : "cid",
"argType" : {
"tag" : "primitive"
}
},
{
"name" : "from",
"argType" : {
"tag" : "primitive"
}
}
],
"names" : {
"relay" : "-relay-",
"getDataSrv" : "getDataSrv",
"callbackSrv" : "callbackSrv",
"responseSrv" : "callbackSrv",
"responseFnName" : "response",
"errorHandlingSrv" : "errorHandlingSrv",
"errorFnName" : "error"
}
},
script
)
}
export type Get_local_api_multiaddrResult = { error: string; multiaddr: string; success: boolean; }
export function get_local_api_multiaddr(node: string, config?: {ttl?: number}): Promise<Get_local_api_multiaddrResult>;
export function get_local_api_multiaddr(peer: FluencePeer, node: string, config?: {ttl?: number}): Promise<Get_local_api_multiaddrResult>;
export function get_local_api_multiaddr(...args: any) {
let script = `
(xor
(seq
(seq
(seq
(seq
(seq
(call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-)
(call %init_peer_id% ("getDataSrv" "node") [] node)
)
(call -relay- ("op" "noop") [])
)
(xor
(call node ("aqua-ipfs" "get_local_api_multiaddr") [] result)
(seq
(call -relay- ("op" "noop") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1])
)
)
)
(call -relay- ("op" "noop") [])
)
(xor
(call %init_peer_id% ("callbackSrv" "response") [result])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2])
)
)
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 3])
)
`
return callFunction(
args,
{
"functionName" : "get_local_api_multiaddr",
"returnType" : {
"tag" : "primitive"
},
"argDefs" : [
{
"name" : "node",
"argType" : {
"tag" : "primitive"
}
}
],
"names" : {
"relay" : "-relay-",
"getDataSrv" : "getDataSrv",
"callbackSrv" : "callbackSrv",
"responseSrv" : "callbackSrv",
"responseFnName" : "response",
"errorHandlingSrv" : "errorHandlingSrv",
"errorFnName" : "error"
}
},
script
)
}
export type Get_external_swarm_multiaddrResult = { error: string; multiaddr: string; success: boolean; }
export function get_external_swarm_multiaddr(node: string, config?: {ttl?: number}): Promise<Get_external_swarm_multiaddrResult>;
export function get_external_swarm_multiaddr(peer: FluencePeer, node: string, config?: {ttl?: number}): Promise<Get_external_swarm_multiaddrResult>;
export function get_external_swarm_multiaddr(...args: any) {
let script = `
(xor
(seq
(seq
(seq
(seq
(seq
(call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-)
(call %init_peer_id% ("getDataSrv" "node") [] node)
)
(call -relay- ("op" "noop") [])
)
(xor
(call node ("aqua-ipfs" "get_external_swarm_multiaddr") [] result)
(seq
(call -relay- ("op" "noop") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1])
)
)
)
(call -relay- ("op" "noop") [])
)
(xor
(call %init_peer_id% ("callbackSrv" "response") [result])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2])
)
)
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 3])
)
`
return callFunction(
args,
{
"functionName" : "get_external_swarm_multiaddr",
"returnType" : {
"tag" : "primitive"
},
"argDefs" : [
{
"name" : "node",
"argType" : {
"tag" : "primitive"
}
}
],
"names" : {
"relay" : "-relay-",
"getDataSrv" : "getDataSrv",
"callbackSrv" : "callbackSrv",
"responseSrv" : "callbackSrv",
"responseFnName" : "response",
"errorHandlingSrv" : "errorHandlingSrv",
"errorFnName" : "error"
}
},
script
)
}
export type PutResult = { error: string; hash: string; success: boolean; }
export function put(node: string, path: string, config?: {ttl?: number}): Promise<PutResult>;
export function put(peer: FluencePeer, node: string, path: string, config?: {ttl?: number}): Promise<PutResult>;
export function put(...args: any) {
let script = `
(xor
(seq
(seq
(seq
(seq
(seq
(seq
(call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-)
(call %init_peer_id% ("getDataSrv" "node") [] node)
)
(call %init_peer_id% ("getDataSrv" "path") [] path)
)
(call -relay- ("op" "noop") [])
)
(xor
(call node ("aqua-ipfs" "put") [path] result)
(seq
(call -relay- ("op" "noop") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1])
)
)
)
(call -relay- ("op" "noop") [])
)
(xor
(call %init_peer_id% ("callbackSrv" "response") [result])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2])
)
)
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 3])
)
`
return callFunction(
args,
{
"functionName" : "put",
"returnType" : {
"tag" : "primitive"
},
"argDefs" : [
{
"name" : "node",
"argType" : {
"tag" : "primitive"
}
},
{
"name" : "path",
"argType" : {
"tag" : "primitive"
}
}
],
"names" : {
"relay" : "-relay-",
"getDataSrv" : "getDataSrv",
"callbackSrv" : "callbackSrv",
"responseSrv" : "callbackSrv",
"responseFnName" : "response",
"errorHandlingSrv" : "errorHandlingSrv",
"errorFnName" : "error"
}
},
script
)
}
export type Get_external_api_multiaddrResult = { error: string; multiaddr: string; success: boolean; }
export function get_external_api_multiaddr(node: string, config?: {ttl?: number}): Promise<Get_external_api_multiaddrResult>;
export function get_external_api_multiaddr(peer: FluencePeer, node: string, config?: {ttl?: number}): Promise<Get_external_api_multiaddrResult>;
export function get_external_api_multiaddr(...args: any) {
let script = `
(xor
(seq
(seq
(seq
(seq
(seq
(call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-)
(call %init_peer_id% ("getDataSrv" "node") [] node)
)
(call -relay- ("op" "noop") [])
)
(xor
(call node ("aqua-ipfs" "get_external_api_multiaddr") [] result)
(seq
(call -relay- ("op" "noop") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1])
)
)
)
(call -relay- ("op" "noop") [])
)
(xor
(call %init_peer_id% ("callbackSrv" "response") [result])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2])
)
)
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 3])
)
`
return callFunction(
args,
{
"functionName" : "get_external_api_multiaddr",
"returnType" : {
"tag" : "primitive"
},
"argDefs" : [
{
"name" : "node",
"argType" : {
"tag" : "primitive"
}
}
],
"names" : {
"relay" : "-relay-",
"getDataSrv" : "getDataSrv",
"callbackSrv" : "callbackSrv",
"responseSrv" : "callbackSrv",
"responseFnName" : "response",
"errorHandlingSrv" : "errorHandlingSrv",
"errorFnName" : "error"
}
},
script
)
}

View File

@ -1,2 +0,0 @@
export * from "./process";
export * from "./exports";

View File

@ -1,622 +0,0 @@
/**
*
* 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.4.0-235
*
*/
import { Fluence, FluencePeer } from '@fluencelabs/fluence';
import {
CallParams,
callFunction,
registerService,
} from '@fluencelabs/fluence/dist/internal/compilerSupport/v2';
// Services
export interface StringOpDef {
array: (s: string, callParams: CallParams<'s'>) => string[] | Promise<string[]>;
}
export function registerStringOp(service: StringOpDef): void;
export function registerStringOp(serviceId: string, service: StringOpDef): void;
export function registerStringOp(peer: FluencePeer, service: StringOpDef): void;
export function registerStringOp(peer: FluencePeer, serviceId: string, service: StringOpDef): void;
export function registerStringOp(...args: any) {
registerService(
args,
{
"defaultServiceId" : "op",
"functions" : [
{
"functionName" : "array",
"argDefs" : [
{
"name" : "s",
"argType" : {
"tag" : "primitive"
}
}
],
"returnType" : {
"tag" : "primitive"
}
}
]
}
);
}
// Functions
export function add_blueprint(module_hash: string, config?: {ttl?: number}): Promise<string>;
export function add_blueprint(peer: FluencePeer, module_hash: string, config?: {ttl?: number}): Promise<string>;
export function add_blueprint(...args: any) {
let script = `
(xor
(seq
(seq
(seq
(seq
(seq
(seq
(call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-)
(call %init_peer_id% ("getDataSrv" "module_hash") [] module_hash)
)
(call %init_peer_id% ("op" "concat_strings") ["hash:" module_hash] prefixed_hash)
)
(call %init_peer_id% ("op" "array") [prefixed_hash] dependencies)
)
(call %init_peer_id% ("dist" "make_blueprint") ["process_files" dependencies] blueprint)
)
(call %init_peer_id% ("dist" "add_blueprint") [blueprint] blueprint_id)
)
(xor
(call %init_peer_id% ("callbackSrv" "response") [blueprint_id])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1])
)
)
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2])
)
`
return callFunction(
args,
{
"functionName" : "add_blueprint",
"returnType" : {
"tag" : "primitive"
},
"argDefs" : [
{
"name" : "module_hash",
"argType" : {
"tag" : "primitive"
}
}
],
"names" : {
"relay" : "-relay-",
"getDataSrv" : "getDataSrv",
"callbackSrv" : "callbackSrv",
"responseSrv" : "callbackSrv",
"responseFnName" : "response",
"errorHandlingSrv" : "errorHandlingSrv",
"errorFnName" : "error"
}
},
script
)
}
export function put_file_size(relay: string, cid: string, ipfs: string, service_id: string, logSize: (arg0: number, callParams: CallParams<'arg0'>) => void | Promise<void>, error: (arg0: string, arg1: string, callParams: CallParams<'arg0' | 'arg1'>) => void | Promise<void>, config?: {ttl?: number}): Promise<{ error: string; hash: string; success: boolean; } | null>;
export function put_file_size(peer: FluencePeer, relay: string, cid: string, ipfs: string, service_id: string, logSize: (arg0: number, callParams: CallParams<'arg0'>) => void | Promise<void>, error: (arg0: string, arg1: string, callParams: CallParams<'arg0' | 'arg1'>) => void | Promise<void>, config?: {ttl?: number}): Promise<{ error: string; hash: string; success: boolean; } | null>;
export function put_file_size(...args: any) {
let script = `
(xor
(seq
(seq
(seq
(seq
(seq
(seq
(seq
(seq
(call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-)
(call %init_peer_id% ("getDataSrv" "relay") [] relay)
)
(call %init_peer_id% ("getDataSrv" "cid") [] cid)
)
(call %init_peer_id% ("getDataSrv" "ipfs") [] ipfs)
)
(call %init_peer_id% ("getDataSrv" "service_id") [] service_id)
)
(call -relay- ("op" "noop") [])
)
(xor
(seq
(call relay ("aqua-ipfs" "get_from") [cid ipfs] get)
(xor
(match get.$.success! true
(xor
(seq
(call relay (service_id "file_size") [get.$.path!] size)
(xor
(match size.$.success! true
(xor
(seq
(seq
(par
(seq
(call -relay- ("op" "noop") [])
(xor
(call %init_peer_id% ("callbackSrv" "logSize") [size.$.size!])
(seq
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1])
(call -relay- ("op" "noop") [])
)
)
)
(null)
)
(call relay (service_id "write_file_size") [size.$.size!] write)
)
(xor
(match write.$.success! true
(xor
(call relay ("aqua-ipfs" "put") [write.$.path!] $result)
(seq
(call -relay- ("op" "noop") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2])
)
)
)
(par
(seq
(call -relay- ("op" "noop") [])
(xor
(call %init_peer_id% ("callbackSrv" "error") ["ProcessFiles.write_file_size failed" write.$.error!])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 3])
)
)
(null)
)
)
)
(seq
(call -relay- ("op" "noop") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 4])
)
)
)
(par
(seq
(call -relay- ("op" "noop") [])
(xor
(call %init_peer_id% ("callbackSrv" "error") ["ProcessFiles.file_size failed" size.$.error!])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 5])
)
)
(null)
)
)
)
(seq
(call -relay- ("op" "noop") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 6])
)
)
)
(par
(seq
(call -relay- ("op" "noop") [])
(xor
(call %init_peer_id% ("callbackSrv" "error") ["Ipfs.get_from failed" get.$.error!])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 7])
)
)
(null)
)
)
)
(seq
(call -relay- ("op" "noop") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 8])
)
)
)
(call -relay- ("op" "noop") [])
)
(xor
(call %init_peer_id% ("callbackSrv" "response") [$result])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 9])
)
)
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 10])
)
`
return callFunction(
args,
{
"functionName" : "put_file_size",
"returnType" : {
"tag" : "optional"
},
"argDefs" : [
{
"name" : "relay",
"argType" : {
"tag" : "primitive"
}
},
{
"name" : "cid",
"argType" : {
"tag" : "primitive"
}
},
{
"name" : "ipfs",
"argType" : {
"tag" : "primitive"
}
},
{
"name" : "service_id",
"argType" : {
"tag" : "primitive"
}
},
{
"name" : "logSize",
"argType" : {
"tag" : "callback",
"callback" : {
"argDefs" : [
{
"name" : "arg0",
"argType" : {
"tag" : "primitive"
}
}
],
"returnType" : {
"tag" : "void"
}
}
}
},
{
"name" : "error",
"argType" : {
"tag" : "callback",
"callback" : {
"argDefs" : [
{
"name" : "arg0",
"argType" : {
"tag" : "primitive"
}
},
{
"name" : "arg1",
"argType" : {
"tag" : "primitive"
}
}
],
"returnType" : {
"tag" : "void"
}
}
}
}
],
"names" : {
"relay" : "-relay-",
"getDataSrv" : "getDataSrv",
"callbackSrv" : "callbackSrv",
"responseSrv" : "callbackSrv",
"responseFnName" : "response",
"errorHandlingSrv" : "errorHandlingSrv",
"errorFnName" : "error"
}
},
script
)
}
export function remove_service(relay: string, service_id: string, config?: {ttl?: number}): Promise<boolean>;
export function remove_service(peer: FluencePeer, relay: string, service_id: string, config?: {ttl?: number}): Promise<boolean>;
export function remove_service(...args: any) {
let script = `
(xor
(seq
(seq
(seq
(seq
(seq
(seq
(call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-)
(call %init_peer_id% ("getDataSrv" "relay") [] relay)
)
(call %init_peer_id% ("getDataSrv" "service_id") [] service_id)
)
(call -relay- ("op" "noop") [])
)
(xor
(call relay ("srv" "remove") [service_id])
(seq
(call -relay- ("op" "noop") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1])
)
)
)
(call -relay- ("op" "noop") [])
)
(xor
(call %init_peer_id% ("callbackSrv" "response") [true])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2])
)
)
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 3])
)
`
return callFunction(
args,
{
"functionName" : "remove_service",
"returnType" : {
"tag" : "primitive"
},
"argDefs" : [
{
"name" : "relay",
"argType" : {
"tag" : "primitive"
}
},
{
"name" : "service_id",
"argType" : {
"tag" : "primitive"
}
}
],
"names" : {
"relay" : "-relay-",
"getDataSrv" : "getDataSrv",
"callbackSrv" : "callbackSrv",
"responseSrv" : "callbackSrv",
"responseFnName" : "response",
"errorHandlingSrv" : "errorHandlingSrv",
"errorFnName" : "error"
}
},
script
)
}
export function add_module(name: string, path: string, config?: {ttl?: number}): Promise<string>;
export function add_module(peer: FluencePeer, name: string, path: string, config?: {ttl?: number}): Promise<string>;
export function add_module(...args: any) {
let script = `
(xor
(seq
(seq
(seq
(seq
(seq
(call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-)
(call %init_peer_id% ("getDataSrv" "name") [] name)
)
(call %init_peer_id% ("getDataSrv" "path") [] path)
)
(call %init_peer_id% ("dist" "default_module_config") [name] config)
)
(call %init_peer_id% ("dist" "add_module_from_vault") [path config] module_hash)
)
(xor
(call %init_peer_id% ("callbackSrv" "response") [module_hash])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1])
)
)
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2])
)
`
return callFunction(
args,
{
"functionName" : "add_module",
"returnType" : {
"tag" : "primitive"
},
"argDefs" : [
{
"name" : "name",
"argType" : {
"tag" : "primitive"
}
},
{
"name" : "path",
"argType" : {
"tag" : "primitive"
}
}
],
"names" : {
"relay" : "-relay-",
"getDataSrv" : "getDataSrv",
"callbackSrv" : "callbackSrv",
"responseSrv" : "callbackSrv",
"responseFnName" : "response",
"errorHandlingSrv" : "errorHandlingSrv",
"errorFnName" : "error"
}
},
script
)
}
export function deploy_service(relay: string, cid: string, ipfs: string, error: (arg0: string, arg1: string, callParams: CallParams<'arg0' | 'arg1'>) => void | Promise<void>, config?: {ttl?: number}): Promise<string | null>;
export function deploy_service(peer: FluencePeer, relay: string, cid: string, ipfs: string, error: (arg0: string, arg1: string, callParams: CallParams<'arg0' | 'arg1'>) => void | Promise<void>, config?: {ttl?: number}): Promise<string | null>;
export function deploy_service(...args: any) {
let script = `
(xor
(seq
(seq
(seq
(seq
(seq
(seq
(seq
(call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-)
(call %init_peer_id% ("getDataSrv" "relay") [] relay)
)
(call %init_peer_id% ("getDataSrv" "cid") [] cid)
)
(call %init_peer_id% ("getDataSrv" "ipfs") [] ipfs)
)
(call -relay- ("op" "noop") [])
)
(xor
(seq
(call relay ("aqua-ipfs" "get_from") [cid ipfs] get_result)
(xor
(match get_result.$.success! true
(xor
(seq
(seq
(seq
(seq
(seq
(seq
(call relay ("dist" "default_module_config") ["process_files"] config)
(call relay ("dist" "add_module_from_vault") [get_result.$.path! config] module_hash)
)
(call relay ("op" "concat_strings") ["hash:" module_hash] prefixed_hash)
)
(call relay ("op" "array") [prefixed_hash] dependencies)
)
(call relay ("dist" "make_blueprint") ["process_files" dependencies] blueprint)
)
(call relay ("dist" "add_blueprint") [blueprint] blueprint_id)
)
(call relay ("srv" "create") [blueprint_id] $service_id)
)
(seq
(call -relay- ("op" "noop") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1])
)
)
)
(par
(seq
(call -relay- ("op" "noop") [])
(xor
(call %init_peer_id% ("callbackSrv" "error") ["Ipfs.get_from failed" get_result.$.error!])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2])
)
)
(null)
)
)
)
(seq
(call -relay- ("op" "noop") [])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 3])
)
)
)
(call -relay- ("op" "noop") [])
)
(xor
(call %init_peer_id% ("callbackSrv" "response") [$service_id])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 4])
)
)
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 5])
)
`
return callFunction(
args,
{
"functionName" : "deploy_service",
"returnType" : {
"tag" : "optional"
},
"argDefs" : [
{
"name" : "relay",
"argType" : {
"tag" : "primitive"
}
},
{
"name" : "cid",
"argType" : {
"tag" : "primitive"
}
},
{
"name" : "ipfs",
"argType" : {
"tag" : "primitive"
}
},
{
"name" : "error",
"argType" : {
"tag" : "callback",
"callback" : {
"argDefs" : [
{
"name" : "arg0",
"argType" : {
"tag" : "primitive"
}
},
{
"name" : "arg1",
"argType" : {
"tag" : "primitive"
}
}
],
"returnType" : {
"tag" : "void"
}
}
}
}
],
"names" : {
"relay" : "-relay-",
"getDataSrv" : "getDataSrv",
"callbackSrv" : "callbackSrv",
"responseSrv" : "callbackSrv",
"responseFnName" : "response",
"errorHandlingSrv" : "errorHandlingSrv",
"errorFnName" : "error"
}
},
script
)
}

View File

@ -24,8 +24,7 @@
"license": "MIT",
"dependencies": {
"@fluencelabs/ipfs-execution-aqua": "file:../aqua",
"@fluencelabs/aqua": "0.3.0-225",
"@fluencelabs/fluence": "^0.14.3",
"@fluencelabs/fluence": "0.17.0",
"@fluencelabs/fluence-network-environment": "1.0.10",
"@fluencelabs/aqua-lib": "0.1.14",
"@fluencelabs/aqua-ipfs": "0.4.2",
@ -35,6 +34,8 @@
"multiaddr": "^10.0.0"
},
"devDependencies": {
"@fluencelabs/aqua": "^0.5.2-256",
"@fluencelabs/aqua-lib": "^0.3.2",
"typescript": "^4.0.0"
}
}

View File

@ -11,7 +11,7 @@
"web"
],
"dependencies": {
"@fluencelabs/fluence": "^0.14.3",
"@fluencelabs/fluence": "0.17.0",
"typescript": "^4.4.4"
},
"devDependencies": {
@ -29,8 +29,7 @@
"license": "MIT",
"dependencies": {
"@fluencelabs/aqua-ipfs": "0.4.2",
"@fluencelabs/aqua-lib": "0.1.14",
"@fluencelabs/fluence": "^0.14.2",
"@fluencelabs/fluence": "0.17.0",
"@fluencelabs/fluence-network-environment": "1.0.10",
"ipfs-http-client": "^50.1.2",
"it-all": "^1.0.5",
@ -38,10 +37,17 @@
"uint8arrays": "^2.1.5"
},
"devDependencies": {
"@fluencelabs/aqua": "^0.4.0-235",
"@fluencelabs/aqua": "^0.5.2-256",
"@fluencelabs/aqua-lib": "^0.3.2",
"typescript": "^4.0.0"
}
},
"aqua/node_modules/@fluencelabs/aqua-lib": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.3.2.tgz",
"integrity": "sha512-8+NKFwRg9SFzpbac1SvvTWcOgHhMoYZwRyb93qJRcNFaN7xjRcA8v0i6CF7Mkjno1zH3xixC9J44+LKQd8uvzA==",
"dev": true
},
"node_modules/@babel/code-frame": {
"version": "7.14.5",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz",
@ -1975,12 +1981,15 @@
}
},
"node_modules/@fluencelabs/aqua": {
"version": "0.4.0-235",
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua/-/aqua-0.4.0-235.tgz",
"integrity": "sha512-tbbHG3dhlwcSzlHMPoV4/MLW6JE00q3hiyznjLh+aW91ovBAXuWe5C1n9CKeRiJtYz3yIQCn2l3arI/PvzLx9Q==",
"version": "0.5.2-256",
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua/-/aqua-0.5.2-256.tgz",
"integrity": "sha512-LYIXXn/dS0yIOefsd0r2fVcir2fWxnY4aKsf+NDchcGShfQ92Xoqmy7KUtiBdK6uUfZIdNvQb/omeg2gtxNziA==",
"dev": true,
"dependencies": {
"@fluencelabs/fluence": "0.12.1"
"@fluencelabs/aqua-ipfs": "0.5.2",
"@fluencelabs/aqua-lib": "0.2.1",
"@fluencelabs/fluence": "0.15.2",
"ipfs-http-client": "50.1.2"
},
"bin": {
"aqua": "index.js",
@ -2000,14 +2009,35 @@
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.1.14.tgz",
"integrity": "sha512-H2Q4gIvociUxc4J2mwmH0D+mrU2N2Z+enKCHgBCanMVEE2wZDsZ80GTbDKsQjEq+gpqbnJIk8lJBYW6lyvLJTg=="
},
"node_modules/@fluencelabs/aqua/node_modules/@fluencelabs/aqua-ipfs": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua-ipfs/-/aqua-ipfs-0.5.2.tgz",
"integrity": "sha512-vSZYH6mjCGly7Cifts1c84icAzeq6pQf3aspEW3ttA0AFVQTjDWlr86Imseg+p3I9oaNUykv/W+VqWX1ouj9Vg==",
"dev": true,
"dependencies": {
"@fluencelabs/aqua-lib": "^0.1.14"
}
},
"node_modules/@fluencelabs/aqua/node_modules/@fluencelabs/aqua-ipfs/node_modules/@fluencelabs/aqua-lib": {
"version": "0.1.14",
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.1.14.tgz",
"integrity": "sha512-H2Q4gIvociUxc4J2mwmH0D+mrU2N2Z+enKCHgBCanMVEE2wZDsZ80GTbDKsQjEq+gpqbnJIk8lJBYW6lyvLJTg==",
"dev": true
},
"node_modules/@fluencelabs/aqua/node_modules/@fluencelabs/aqua-lib": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.2.1.tgz",
"integrity": "sha512-uLP9mbgFHR1Q1FYhehasNxNBlTclBsjNI9MvIPF8oXtVJtnvPi+R4rGGTOHtRJukunxhpAV/svWQU9a2BRyDmQ==",
"dev": true
},
"node_modules/@fluencelabs/aqua/node_modules/@fluencelabs/fluence": {
"version": "0.12.1",
"resolved": "https://registry.npmjs.org/@fluencelabs/fluence/-/fluence-0.12.1.tgz",
"integrity": "sha512-JrMKMHjYILAHQsLLd5H0fLt/UMZv+/PQYxJYe6h9HFyJlZrN1bUV+EcZnUw1u3DZE5k/RXBx0udfmkahggwrqA==",
"version": "0.15.2",
"resolved": "https://registry.npmjs.org/@fluencelabs/fluence/-/fluence-0.15.2.tgz",
"integrity": "sha512-RWGh70XkqcJusaqB4TR0tVBSVkzlMU9krwALQmgilLTxaSBMPtB6xMt13ceEJ/G6BwsLZWdgY2Wy6GvdSheKaw==",
"dev": true,
"dependencies": {
"@chainsafe/libp2p-noise": "4.0.0",
"@fluencelabs/avm": "0.14.4",
"@fluencelabs/avm": "0.16.0-restriction-operator.9",
"async": "3.2.0",
"base64-js": "1.5.1",
"bs58": "4.0.1",
@ -2021,6 +2051,8 @@
"loglevel": "1.7.0",
"multiaddr": "10.0.0",
"peer-id": "0.15.3",
"rxjs": "^7.3.0",
"ts-pattern": "^3.3.3",
"uuid": "8.3.0"
}
},
@ -2045,23 +2077,42 @@
"dev": true
},
"node_modules/@fluencelabs/avm": {
"version": "0.14.4",
"resolved": "https://registry.npmjs.org/@fluencelabs/avm/-/avm-0.14.4.tgz",
"integrity": "sha512-XyR+1H5k0CAc+mDHOkl81viX8XeW1Yqbw793xbsfUfju5bUb/hqk+gHv3q8lAFdbrCG5P45gdOT08a5RNODZaQ==",
"version": "0.16.0-restriction-operator.9",
"resolved": "https://registry.npmjs.org/@fluencelabs/avm/-/avm-0.16.0-restriction-operator.9.tgz",
"integrity": "sha512-34vJqo8TIho5H2+WhEAJOa6WxAPiS+c7Z3WKmRZVi+GAsZN3Hv2NiuiCFNFBmPRoD+juzHe4Dmv5cF7HZc6O6w==",
"dev": true,
"dependencies": {
"base64-js": "1.5.1"
}
},
"node_modules/@fluencelabs/avm-runner-background": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/@fluencelabs/avm-runner-background/-/avm-runner-background-0.1.1.tgz",
"integrity": "sha512-XUnw3eUakBDngLZMIhTUXIT3Oz6N+6aclo7p2YIvjRHqhUUnL5/VEZcbuxLdkdzMdSdbQE7C/btKNVTO2kWJBw==",
"dependencies": {
"@fluencelabs/avm-runner-interface": "^0.2.0",
"browser-or-node": "^2.0.0",
"threads": "^1.7.0"
},
"bin": {
"copy-avm-runner": "dist/copyRunnerScript.js"
}
},
"node_modules/@fluencelabs/avm-runner-interface": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/@fluencelabs/avm-runner-interface/-/avm-runner-interface-0.2.0.tgz",
"integrity": "sha512-Y41pL+UwZZVdormxju8cJQsNRp6tdER0VqJ9Kg9gH2wd1KJAaYTJkyVbn8NB7fEFRUbqfbb1BXHi9wWBYOgGYQ=="
},
"node_modules/@fluencelabs/fluence": {
"version": "0.14.3",
"resolved": "https://registry.npmjs.org/@fluencelabs/fluence/-/fluence-0.14.3.tgz",
"integrity": "sha512-JlF/B9Wtz0VMBJIfA+hZYZt44nX5AIJzgkhfbT1fKfwzb1CvS6IYaaH6PE8vLcBm556sJic94yYL++FpQrJUmQ==",
"version": "0.17.0",
"resolved": "https://registry.npmjs.org/@fluencelabs/fluence/-/fluence-0.17.0.tgz",
"integrity": "sha512-7GgDh+fonc0bWIMdM4iOH2/XVJdbPTyoLWedT1lQkrei3iBaTGZI6BzFcG0cYpBvy1i6w4XPxFDf08o3t/GR8g==",
"dependencies": {
"@chainsafe/libp2p-noise": "4.0.0",
"@fluencelabs/avm": "0.16.7",
"@fluencelabs/avm": "0.19.6",
"@fluencelabs/avm-runner-background": "0.1.1",
"@fluencelabs/avm-runner-interface": "^0.2.0",
"async": "3.2.0",
"base64-js": "1.5.1",
"bs58": "4.0.1",
"cids": "0.8.1",
"it-length-prefixed": "3.0.1",
@ -2076,6 +2127,9 @@
"rxjs": "^7.3.0",
"ts-pattern": "^3.3.3",
"uuid": "8.3.0"
},
"bin": {
"copy-avm-public": "dist/tools/copyAvmPublic.js"
}
},
"node_modules/@fluencelabs/fluence-network-environment": {
@ -2084,11 +2138,11 @@
"integrity": "sha512-aaWZDDFIIasSTgdFdw1KEz+boZMSn7pXffUENZNLX4DrP11rC3AEX4c8GnIJQbWqGsouOFZOPna2DSG6o2rLNQ=="
},
"node_modules/@fluencelabs/fluence/node_modules/@fluencelabs/avm": {
"version": "0.16.7",
"resolved": "https://registry.npmjs.org/@fluencelabs/avm/-/avm-0.16.7.tgz",
"integrity": "sha512-tSbEBRdHTz6PCxLuzEWe3ayZQeDiuJu/Dw0qJmdpYe6eJf0jSwUnAnRaEOv2d0ILnzT1b4us9tCKOhac41YlLg==",
"dependencies": {
"base64-js": "1.5.1"
"version": "0.19.6",
"resolved": "https://registry.npmjs.org/@fluencelabs/avm/-/avm-0.19.6.tgz",
"integrity": "sha512-T6UQsIuGVltf13Wc3bFmuCYmQzu/00Y4lPS7atBauQ2R4+BqhRg1dc5reSZ+MbAW3Vy+NmJY1EEYOFRpLCGBwg==",
"bin": {
"copy-avm": "dist/copyAvm.js"
}
},
"node_modules/@fluencelabs/fluence/node_modules/multiaddr": {
@ -5515,6 +5569,11 @@
"resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
"integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8="
},
"node_modules/browser-or-node": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/browser-or-node/-/browser-or-node-2.0.0.tgz",
"integrity": "sha512-3Lrks/Okgof+/cRguUNG+qRXSeq79SO3hY4QrXJayJofwJwHiGC0qi99uDjsfTwULUFSr1OGVsBkdIkygKjTUA=="
},
"node_modules/browser-process-hrtime": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz",
@ -8812,6 +8871,15 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/esm": {
"version": "3.2.25",
"resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz",
"integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==",
"optional": true,
"engines": {
"node": ">=6"
}
},
"node_modules/espree": {
"version": "7.3.1",
"resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz",
@ -12549,6 +12617,17 @@
"node": ">=0.10.0"
}
},
"node_modules/is-observable": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-observable/-/is-observable-2.1.0.tgz",
"integrity": "sha512-DailKdLb0WU+xX8K5w7VsJhapwHLZ9jjmazqCJq4X12CTgqq73TKnbRcnSLuXYPOoLQgV5IrD7ePiX/h1vnkBw==",
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/is-path-cwd": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz",
@ -16779,6 +16858,11 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/observable-fns": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/observable-fns/-/observable-fns-0.6.1.tgz",
"integrity": "sha512-9gRK4+sRWzeN6AOewNBTLXir7Zl/i3GB6Yl26gK4flxz8BXVpD3kt8amREmWNb0mxYOGDotvE5a4N+PtGGKdkg=="
},
"node_modules/obuf": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz",
@ -22811,6 +22895,23 @@
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
"integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ="
},
"node_modules/threads": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/threads/-/threads-1.7.0.tgz",
"integrity": "sha512-Mx5NBSHX3sQYR6iI9VYbgHKBLisyB+xROCBGjjWm1O9wb9vfLxdaGtmT/KCjUqMsSNW6nERzCW3T6H43LqjDZQ==",
"dependencies": {
"callsites": "^3.1.0",
"debug": "^4.2.0",
"is-observable": "^2.1.0",
"observable-fns": "^0.6.1"
},
"funding": {
"url": "https://github.com/andywer/threads.js?sponsor=1"
},
"optionalDependencies": {
"tiny-worker": ">= 2"
}
},
"node_modules/throat": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/throat/-/throat-5.0.0.tgz",
@ -22887,6 +22988,15 @@
"resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz",
"integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q="
},
"node_modules/tiny-worker": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/tiny-worker/-/tiny-worker-2.3.0.tgz",
"integrity": "sha512-pJ70wq5EAqTAEl9IkGzA+fN0836rycEuz2Cn6yeZ6FRzlVS5IDOkFHpIoEsksPRQV34GDqXm65+OlnZqUSyK2g==",
"optional": true,
"dependencies": {
"esm": "^3.2.25"
}
},
"node_modules/tmpl": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz",
@ -25641,10 +25751,9 @@
"version": "0.1.0",
"license": "MIT",
"dependencies": {
"@fluencelabs/aqua": "0.3.0-225",
"@fluencelabs/aqua-ipfs": "0.4.2",
"@fluencelabs/aqua-lib": "0.1.14",
"@fluencelabs/fluence": "^0.14.3",
"@fluencelabs/fluence": "0.17.0",
"@fluencelabs/fluence-network-environment": "1.0.10",
"@fluencelabs/ipfs-execution-aqua": "file:../aqua",
"ipfs-http-client": "^50.1.2",
@ -25653,25 +25762,23 @@
"uint8arrays": "^2.1.5"
},
"devDependencies": {
"@fluencelabs/aqua": "^0.5.2-256",
"@fluencelabs/aqua-lib": "^0.3.2",
"typescript": "^4.0.0"
}
},
"nodejs/node_modules/@fluencelabs/aqua": {
"version": "0.3.0-225",
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua/-/aqua-0.3.0-225.tgz",
"integrity": "sha512-FQYZe9o9vehiGXjL0Y6WpehRBzXwo4wqIJjwoUP0prGNZFU1nC2IwiRu5O5AvF/sbNcO4FS6eNYNQEMp4lKETQ==",
"bin": {
"aqua": "index.js",
"aqua-cli": "error.js",
"aqua-j": "index-java.js"
}
"nodejs/node_modules/@fluencelabs/aqua-lib": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.3.2.tgz",
"integrity": "sha512-8+NKFwRg9SFzpbac1SvvTWcOgHhMoYZwRyb93qJRcNFaN7xjRcA8v0i6CF7Mkjno1zH3xixC9J44+LKQd8uvzA==",
"dev": true
},
"web": {
"name": "ipfs-aqua-browser",
"version": "0.1.0",
"hasInstallScript": true,
"dependencies": {
"@fluencelabs/aqua-lib": "0.1.14",
"@fluencelabs/fluence": "^0.14.3",
"@fluencelabs/fluence": "0.17.0",
"@fluencelabs/fluence-network-environment": "1.0.10",
"@fluencelabs/ipfs-execution-aqua": "file:../aqua",
"@testing-library/jest-dom": "^5.14.1",
@ -25691,8 +25798,15 @@
"web-vitals": "^1.1.2"
},
"devDependencies": {
"@fluencelabs/aqua-lib": "^0.3.2",
"node-sass": "^6.0.1"
}
},
"web/node_modules/@fluencelabs/aqua-lib": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.3.2.tgz",
"integrity": "sha512-8+NKFwRg9SFzpbac1SvvTWcOgHhMoYZwRyb93qJRcNFaN7xjRcA8v0i6CF7Mkjno1zH3xixC9J44+LKQd8uvzA==",
"dev": true
}
},
"dependencies": {
@ -27020,22 +27134,48 @@
}
},
"@fluencelabs/aqua": {
"version": "0.4.0-235",
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua/-/aqua-0.4.0-235.tgz",
"integrity": "sha512-tbbHG3dhlwcSzlHMPoV4/MLW6JE00q3hiyznjLh+aW91ovBAXuWe5C1n9CKeRiJtYz3yIQCn2l3arI/PvzLx9Q==",
"version": "0.5.2-256",
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua/-/aqua-0.5.2-256.tgz",
"integrity": "sha512-LYIXXn/dS0yIOefsd0r2fVcir2fWxnY4aKsf+NDchcGShfQ92Xoqmy7KUtiBdK6uUfZIdNvQb/omeg2gtxNziA==",
"dev": true,
"requires": {
"@fluencelabs/fluence": "0.12.1"
"@fluencelabs/aqua-ipfs": "0.5.2",
"@fluencelabs/aqua-lib": "0.2.1",
"@fluencelabs/fluence": "0.15.2",
"ipfs-http-client": "50.1.2"
},
"dependencies": {
"@fluencelabs/aqua-ipfs": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua-ipfs/-/aqua-ipfs-0.5.2.tgz",
"integrity": "sha512-vSZYH6mjCGly7Cifts1c84icAzeq6pQf3aspEW3ttA0AFVQTjDWlr86Imseg+p3I9oaNUykv/W+VqWX1ouj9Vg==",
"dev": true,
"requires": {
"@fluencelabs/aqua-lib": "^0.1.14"
},
"dependencies": {
"@fluencelabs/aqua-lib": {
"version": "0.1.14",
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.1.14.tgz",
"integrity": "sha512-H2Q4gIvociUxc4J2mwmH0D+mrU2N2Z+enKCHgBCanMVEE2wZDsZ80GTbDKsQjEq+gpqbnJIk8lJBYW6lyvLJTg==",
"dev": true
}
}
},
"@fluencelabs/aqua-lib": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.2.1.tgz",
"integrity": "sha512-uLP9mbgFHR1Q1FYhehasNxNBlTclBsjNI9MvIPF8oXtVJtnvPi+R4rGGTOHtRJukunxhpAV/svWQU9a2BRyDmQ==",
"dev": true
},
"@fluencelabs/fluence": {
"version": "0.12.1",
"resolved": "https://registry.npmjs.org/@fluencelabs/fluence/-/fluence-0.12.1.tgz",
"integrity": "sha512-JrMKMHjYILAHQsLLd5H0fLt/UMZv+/PQYxJYe6h9HFyJlZrN1bUV+EcZnUw1u3DZE5k/RXBx0udfmkahggwrqA==",
"version": "0.15.2",
"resolved": "https://registry.npmjs.org/@fluencelabs/fluence/-/fluence-0.15.2.tgz",
"integrity": "sha512-RWGh70XkqcJusaqB4TR0tVBSVkzlMU9krwALQmgilLTxaSBMPtB6xMt13ceEJ/G6BwsLZWdgY2Wy6GvdSheKaw==",
"dev": true,
"requires": {
"@chainsafe/libp2p-noise": "4.0.0",
"@fluencelabs/avm": "0.14.4",
"@fluencelabs/avm": "0.16.0-restriction-operator.9",
"async": "3.2.0",
"base64-js": "1.5.1",
"bs58": "4.0.1",
@ -27049,6 +27189,8 @@
"loglevel": "1.7.0",
"multiaddr": "10.0.0",
"peer-id": "0.15.3",
"rxjs": "^7.3.0",
"ts-pattern": "^3.3.3",
"uuid": "8.3.0"
}
},
@ -27088,23 +27230,39 @@
"integrity": "sha512-H2Q4gIvociUxc4J2mwmH0D+mrU2N2Z+enKCHgBCanMVEE2wZDsZ80GTbDKsQjEq+gpqbnJIk8lJBYW6lyvLJTg=="
},
"@fluencelabs/avm": {
"version": "0.14.4",
"resolved": "https://registry.npmjs.org/@fluencelabs/avm/-/avm-0.14.4.tgz",
"integrity": "sha512-XyR+1H5k0CAc+mDHOkl81viX8XeW1Yqbw793xbsfUfju5bUb/hqk+gHv3q8lAFdbrCG5P45gdOT08a5RNODZaQ==",
"version": "0.16.0-restriction-operator.9",
"resolved": "https://registry.npmjs.org/@fluencelabs/avm/-/avm-0.16.0-restriction-operator.9.tgz",
"integrity": "sha512-34vJqo8TIho5H2+WhEAJOa6WxAPiS+c7Z3WKmRZVi+GAsZN3Hv2NiuiCFNFBmPRoD+juzHe4Dmv5cF7HZc6O6w==",
"dev": true,
"requires": {
"base64-js": "1.5.1"
}
},
"@fluencelabs/avm-runner-background": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/@fluencelabs/avm-runner-background/-/avm-runner-background-0.1.1.tgz",
"integrity": "sha512-XUnw3eUakBDngLZMIhTUXIT3Oz6N+6aclo7p2YIvjRHqhUUnL5/VEZcbuxLdkdzMdSdbQE7C/btKNVTO2kWJBw==",
"requires": {
"@fluencelabs/avm-runner-interface": "^0.2.0",
"browser-or-node": "^2.0.0",
"threads": "^1.7.0"
}
},
"@fluencelabs/avm-runner-interface": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/@fluencelabs/avm-runner-interface/-/avm-runner-interface-0.2.0.tgz",
"integrity": "sha512-Y41pL+UwZZVdormxju8cJQsNRp6tdER0VqJ9Kg9gH2wd1KJAaYTJkyVbn8NB7fEFRUbqfbb1BXHi9wWBYOgGYQ=="
},
"@fluencelabs/fluence": {
"version": "0.14.3",
"resolved": "https://registry.npmjs.org/@fluencelabs/fluence/-/fluence-0.14.3.tgz",
"integrity": "sha512-JlF/B9Wtz0VMBJIfA+hZYZt44nX5AIJzgkhfbT1fKfwzb1CvS6IYaaH6PE8vLcBm556sJic94yYL++FpQrJUmQ==",
"version": "0.17.0",
"resolved": "https://registry.npmjs.org/@fluencelabs/fluence/-/fluence-0.17.0.tgz",
"integrity": "sha512-7GgDh+fonc0bWIMdM4iOH2/XVJdbPTyoLWedT1lQkrei3iBaTGZI6BzFcG0cYpBvy1i6w4XPxFDf08o3t/GR8g==",
"requires": {
"@chainsafe/libp2p-noise": "4.0.0",
"@fluencelabs/avm": "0.16.7",
"@fluencelabs/avm": "0.19.6",
"@fluencelabs/avm-runner-background": "0.1.1",
"@fluencelabs/avm-runner-interface": "^0.2.0",
"async": "3.2.0",
"base64-js": "1.5.1",
"bs58": "4.0.1",
"cids": "0.8.1",
"it-length-prefixed": "3.0.1",
@ -27122,12 +27280,9 @@
},
"dependencies": {
"@fluencelabs/avm": {
"version": "0.16.7",
"resolved": "https://registry.npmjs.org/@fluencelabs/avm/-/avm-0.16.7.tgz",
"integrity": "sha512-tSbEBRdHTz6PCxLuzEWe3ayZQeDiuJu/Dw0qJmdpYe6eJf0jSwUnAnRaEOv2d0ILnzT1b4us9tCKOhac41YlLg==",
"requires": {
"base64-js": "1.5.1"
}
"version": "0.19.6",
"resolved": "https://registry.npmjs.org/@fluencelabs/avm/-/avm-0.19.6.tgz",
"integrity": "sha512-T6UQsIuGVltf13Wc3bFmuCYmQzu/00Y4lPS7atBauQ2R4+BqhRg1dc5reSZ+MbAW3Vy+NmJY1EEYOFRpLCGBwg=="
},
"multiaddr": {
"version": "10.0.0",
@ -27157,10 +27312,10 @@
"@fluencelabs/ipfs-execution": {
"version": "file:nodejs",
"requires": {
"@fluencelabs/aqua": "0.3.0-225",
"@fluencelabs/aqua": "^0.5.2-256",
"@fluencelabs/aqua-ipfs": "0.4.2",
"@fluencelabs/aqua-lib": "0.1.14",
"@fluencelabs/fluence": "^0.14.3",
"@fluencelabs/aqua-lib": "^0.3.2",
"@fluencelabs/fluence": "0.17.0",
"@fluencelabs/fluence-network-environment": "1.0.10",
"@fluencelabs/ipfs-execution-aqua": "file:../aqua",
"ipfs-http-client": "^50.1.2",
@ -27170,26 +27325,35 @@
"uint8arrays": "^2.1.5"
},
"dependencies": {
"@fluencelabs/aqua": {
"version": "0.3.0-225",
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua/-/aqua-0.3.0-225.tgz",
"integrity": "sha512-FQYZe9o9vehiGXjL0Y6WpehRBzXwo4wqIJjwoUP0prGNZFU1nC2IwiRu5O5AvF/sbNcO4FS6eNYNQEMp4lKETQ=="
"@fluencelabs/aqua-lib": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.3.2.tgz",
"integrity": "sha512-8+NKFwRg9SFzpbac1SvvTWcOgHhMoYZwRyb93qJRcNFaN7xjRcA8v0i6CF7Mkjno1zH3xixC9J44+LKQd8uvzA==",
"dev": true
}
}
},
"@fluencelabs/ipfs-execution-aqua": {
"version": "file:aqua",
"requires": {
"@fluencelabs/aqua": "^0.4.0-235",
"@fluencelabs/aqua": "^0.5.2-256",
"@fluencelabs/aqua-ipfs": "0.4.2",
"@fluencelabs/aqua-lib": "0.1.14",
"@fluencelabs/fluence": "^0.14.2",
"@fluencelabs/aqua-lib": "^0.3.2",
"@fluencelabs/fluence": "0.17.0",
"@fluencelabs/fluence-network-environment": "1.0.10",
"ipfs-http-client": "^50.1.2",
"it-all": "^1.0.5",
"multiaddr": "^10.0.0",
"typescript": "^4.0.0",
"uint8arrays": "^2.1.5"
},
"dependencies": {
"@fluencelabs/aqua-lib": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.3.2.tgz",
"integrity": "sha512-8+NKFwRg9SFzpbac1SvvTWcOgHhMoYZwRyb93qJRcNFaN7xjRcA8v0i6CF7Mkjno1zH3xixC9J44+LKQd8uvzA==",
"dev": true
}
}
},
"@gar/promisify": {
@ -29956,6 +30120,11 @@
"resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
"integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8="
},
"browser-or-node": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/browser-or-node/-/browser-or-node-2.0.0.tgz",
"integrity": "sha512-3Lrks/Okgof+/cRguUNG+qRXSeq79SO3hY4QrXJayJofwJwHiGC0qi99uDjsfTwULUFSr1OGVsBkdIkygKjTUA=="
},
"browser-process-hrtime": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz",
@ -32541,6 +32710,12 @@
}
}
},
"esm": {
"version": "3.2.25",
"resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz",
"integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==",
"optional": true
},
"espree": {
"version": "7.3.1",
"resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz",
@ -34628,8 +34803,8 @@
"ipfs-aqua-browser": {
"version": "file:web",
"requires": {
"@fluencelabs/aqua-lib": "0.1.14",
"@fluencelabs/fluence": "^0.14.3",
"@fluencelabs/aqua-lib": "^0.3.2",
"@fluencelabs/fluence": "0.17.0",
"@fluencelabs/fluence-network-environment": "1.0.10",
"@fluencelabs/ipfs-execution-aqua": "file:../aqua",
"@testing-library/jest-dom": "^5.14.1",
@ -34648,6 +34823,14 @@
"recoil": "^0.3.1",
"typescript": "^4.3.5",
"web-vitals": "^1.1.2"
},
"dependencies": {
"@fluencelabs/aqua-lib": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.3.2.tgz",
"integrity": "sha512-8+NKFwRg9SFzpbac1SvvTWcOgHhMoYZwRyb93qJRcNFaN7xjRcA8v0i6CF7Mkjno1zH3xixC9J44+LKQd8uvzA==",
"dev": true
}
}
},
"ipfs-core-types": {
@ -35571,6 +35754,11 @@
"resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz",
"integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8="
},
"is-observable": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-observable/-/is-observable-2.1.0.tgz",
"integrity": "sha512-DailKdLb0WU+xX8K5w7VsJhapwHLZ9jjmazqCJq4X12CTgqq73TKnbRcnSLuXYPOoLQgV5IrD7ePiX/h1vnkBw=="
},
"is-path-cwd": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz",
@ -39038,6 +39226,11 @@
"es-abstract": "^1.18.2"
}
},
"observable-fns": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/observable-fns/-/observable-fns-0.6.1.tgz",
"integrity": "sha512-9gRK4+sRWzeN6AOewNBTLXir7Zl/i3GB6Yl26gK4flxz8BXVpD3kt8amREmWNb0mxYOGDotvE5a4N+PtGGKdkg=="
},
"obuf": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz",
@ -43834,6 +44027,18 @@
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
"integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ="
},
"threads": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/threads/-/threads-1.7.0.tgz",
"integrity": "sha512-Mx5NBSHX3sQYR6iI9VYbgHKBLisyB+xROCBGjjWm1O9wb9vfLxdaGtmT/KCjUqMsSNW6nERzCW3T6H43LqjDZQ==",
"requires": {
"callsites": "^3.1.0",
"debug": "^4.2.0",
"is-observable": "^2.1.0",
"observable-fns": "^0.6.1",
"tiny-worker": ">= 2"
}
},
"throat": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/throat/-/throat-5.0.0.tgz",
@ -43911,6 +44116,15 @@
"resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz",
"integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q="
},
"tiny-worker": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/tiny-worker/-/tiny-worker-2.3.0.tgz",
"integrity": "sha512-pJ70wq5EAqTAEl9IkGzA+fN0836rycEuz2Cn6yeZ6FRzlVS5IDOkFHpIoEsksPRQV34GDqXm65+OlnZqUSyK2g==",
"optional": true,
"requires": {
"esm": "^3.2.25"
}
},
"tmpl": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz",

View File

@ -9,7 +9,7 @@
"build": "check-node-version --npm '>= 7' && npm run build -w aqua -w nodejs -w web"
},
"dependencies": {
"@fluencelabs/fluence": "^0.14.3",
"@fluencelabs/fluence": "0.17.0",
"typescript": "^4.4.4"
},
"engines": {

View File

@ -4,9 +4,8 @@
"private": true,
"dependencies": {
"@fluencelabs/ipfs-execution-aqua": "file:../aqua",
"@fluencelabs/fluence": "^0.14.3",
"@fluencelabs/fluence": "0.17.0",
"@fluencelabs/fluence-network-environment": "1.0.10",
"@fluencelabs/aqua-lib": "0.1.14",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^11.2.7",
"@testing-library/user-event": "^12.8.3",
@ -24,6 +23,7 @@
"web-vitals": "^1.1.2"
},
"scripts": {
"postinstall": "copy-avm-public public",
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
@ -48,6 +48,7 @@
]
},
"devDependencies": {
"node-sass": "^6.0.1"
"node-sass": "^6.0.1",
"@fluencelabs/aqua-lib": "^0.3.2"
}
}

File diff suppressed because one or more lines are too long