mirror of
https://github.com/fluencelabs/fluence-js.git
synced 2024-12-05 02:10:18 +00:00
update aqua (#988)
This commit is contained in:
parent
581193b044
commit
14a8463d3a
42
package-lock.json
generated
42
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "fluence",
|
||||
"version": "0.7.77",
|
||||
"version": "0.7.82",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@ -25,9 +25,9 @@
|
||||
}
|
||||
},
|
||||
"@fluencelabs/aquamarine-stepper": {
|
||||
"version": "0.0.10",
|
||||
"resolved": "https://registry.npmjs.org/@fluencelabs/aquamarine-stepper/-/aquamarine-stepper-0.0.10.tgz",
|
||||
"integrity": "sha512-TvJdDFqSlQmsUQ15y8Buk/dx20FpGRNkCX31fPRIn+a7lp4L+dpa4rS3ZxjhgDhUYdhVTxtEtnQwY64Z678wFA=="
|
||||
"version": "0.0.13",
|
||||
"resolved": "https://registry.npmjs.org/@fluencelabs/aquamarine-stepper/-/aquamarine-stepper-0.0.13.tgz",
|
||||
"integrity": "sha512-DymSTILKXUeZsyOB9b7zKv4ZfGsbGUCMjCsafUHQIaAsMxD+p4DJsQ4FdHRI6rh9MqWmv5OVFXEpHhqai7fqug=="
|
||||
},
|
||||
"@sinonjs/commons": {
|
||||
"version": "1.7.2",
|
||||
@ -81,6 +81,14 @@
|
||||
"integrity": "sha1-WCskdhaabLpGCiFNR2x0REHYc9U=",
|
||||
"dev": true
|
||||
},
|
||||
"@types/bl": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/bl/-/bl-2.1.0.tgz",
|
||||
"integrity": "sha512-1TdA9IXOy4sdqn8vgieQ6GZAiHiPNrOiO1s2GJjuYPw4QVY7gYoVjkW049avj33Ez7IcIvu43hQsMsoUFbCn2g==",
|
||||
"requires": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"@types/bs58": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/bs58/-/bs58-4.0.1.tgz",
|
||||
@ -135,8 +143,7 @@
|
||||
"@types/node": {
|
||||
"version": "13.13.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.2.tgz",
|
||||
"integrity": "sha512-LB2R1Oyhpg8gu4SON/mfforE525+Hi/M1ineICEDftqNVTyFg1aRIeGuTvXAoWHc4nbrFncWtJgMmoyRvuGh7A==",
|
||||
"dev": true
|
||||
"integrity": "sha512-LB2R1Oyhpg8gu4SON/mfforE525+Hi/M1ineICEDftqNVTyFg1aRIeGuTvXAoWHc4nbrFncWtJgMmoyRvuGh7A=="
|
||||
},
|
||||
"@types/source-list-map": {
|
||||
"version": "0.1.2",
|
||||
@ -3857,13 +3864,26 @@
|
||||
}
|
||||
},
|
||||
"it-pb-rpc": {
|
||||
"version": "0.1.8",
|
||||
"resolved": "https://registry.npmjs.org/it-pb-rpc/-/it-pb-rpc-0.1.8.tgz",
|
||||
"integrity": "sha512-YePzUUonithCTIdVKcOeQEn5mpipCg7ZoWsq7jfjXXtAS6gm6R7KzCe6YBV97i6bljU8hGllTG67FiGfweKNKg==",
|
||||
"version": "0.1.9",
|
||||
"resolved": "https://registry.npmjs.org/it-pb-rpc/-/it-pb-rpc-0.1.9.tgz",
|
||||
"integrity": "sha512-IMPXz+a+lUEclV5qIlT/1WAjCMIZyqQtMRaKaL8cwgvH2P5LtMJlrbNZr3b4VEONK1H6mqAV1upfMTSSBSrOqA==",
|
||||
"requires": {
|
||||
"is-buffer": "^2.0.4",
|
||||
"it-handshake": "^1.0.1",
|
||||
"it-length-prefixed": "^3.0.1"
|
||||
"it-handshake": "^1.0.2",
|
||||
"it-length-prefixed": "^3.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"it-length-prefixed": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/it-length-prefixed/-/it-length-prefixed-3.1.0.tgz",
|
||||
"integrity": "sha512-E5GwT6qfZEwh3/XThyYwgjKJ4/hxvTC9kdbj3gxXDeUDKtC7+K2T647sPeX7xDEWqunsnoQyvOrjoHPegaT3uw==",
|
||||
"requires": {
|
||||
"@types/bl": "^2.1.0",
|
||||
"bl": "^4.0.2",
|
||||
"buffer": "^5.5.0",
|
||||
"varint": "^5.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"it-pipe": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "fluence",
|
||||
"version": "0.7.80",
|
||||
"version": "0.7.83",
|
||||
"description": "the browser js-libp2p client for the Fluence network",
|
||||
"main": "./dist/fluence.js",
|
||||
"typings": "./dist/fluence.d.ts",
|
||||
@ -15,7 +15,7 @@
|
||||
"author": "Fluence Labs",
|
||||
"license": "Apache 2.0",
|
||||
"dependencies": {
|
||||
"@fluencelabs/aquamarine-stepper": "0.0.10",
|
||||
"@fluencelabs/aquamarine-stepper": "0.0.13",
|
||||
"async": "3.2.0",
|
||||
"base64-js": "1.3.1",
|
||||
"bs58": "4.0.1",
|
||||
|
@ -176,7 +176,7 @@ export class FluenceClient {
|
||||
}
|
||||
|
||||
nodeIdentityCall(): string {
|
||||
return `(call "${this.nodePeerIdStr}" ("identity" "") [] void[])`
|
||||
return `(call "${this.nodePeerIdStr}" ("op" "identity") [] void[])`
|
||||
}
|
||||
|
||||
async requestResponse<T>(name: string, call: (nodeId: string) => string, returnValue: string, data: Map<string, any>, handleResponse: (args: any[]) => T, nodeId?: string, ttl?: number): Promise<T> {
|
||||
@ -229,7 +229,7 @@ export class FluenceClient {
|
||||
data.set("module_bytes", moduleBase64)
|
||||
data.set("module_config", config)
|
||||
|
||||
let call = (nodeId: string) => `(call "${nodeId}" ("add_module" "") [module_bytes module_config] void[])`
|
||||
let call = (nodeId: string) => `(call "${nodeId}" ("dist" "add_module") [module_bytes module_config] void[])`
|
||||
|
||||
return this.requestResponse("addModule", call, "", data, () => {}, nodeId, ttl)
|
||||
}
|
||||
@ -239,7 +239,7 @@ export class FluenceClient {
|
||||
*/
|
||||
async addBlueprint(name: string, dependencies: string[], nodeId?: string, ttl?: number): Promise<string> {
|
||||
let returnValue = "blueprint_id";
|
||||
let call = (nodeId: string) => `(call "${nodeId}" ("add_blueprint" "") [blueprint] ${returnValue})`
|
||||
let call = (nodeId: string) => `(call "${nodeId}" ("dist" "add_blueprint") [blueprint] ${returnValue})`
|
||||
|
||||
let data = new Map()
|
||||
data.set("blueprint", { name: name, dependencies: dependencies })
|
||||
@ -252,7 +252,7 @@ export class FluenceClient {
|
||||
*/
|
||||
async createService(blueprintId: string, nodeId?: string, ttl?: number): Promise<string> {
|
||||
let returnValue = "service_id";
|
||||
let call = (nodeId: string) => `(call "${nodeId}" ("create" "") [blueprint_id] ${returnValue})`
|
||||
let call = (nodeId: string) => `(call "${nodeId}" ("srv" "create") [blueprint_id] ${returnValue})`
|
||||
|
||||
let data = new Map()
|
||||
data.set("blueprint_id", blueprintId)
|
||||
@ -265,7 +265,7 @@ export class FluenceClient {
|
||||
*/
|
||||
async getAvailableModules(nodeId?: string, ttl?: number): Promise<string[]> {
|
||||
let returnValue = "modules";
|
||||
let call = (nodeId: string) => `(call "${nodeId}" ("get_available_modules" "") [] ${returnValue})`
|
||||
let call = (nodeId: string) => `(call "${nodeId}" ("dist" "get_modules") [] ${returnValue})`
|
||||
|
||||
return this.requestResponse("getAvailableModules", call, returnValue, new Map(), (args: any[]) => args[0] as string[], nodeId, ttl)
|
||||
}
|
||||
@ -275,7 +275,7 @@ export class FluenceClient {
|
||||
*/
|
||||
async getBlueprints(nodeId: string, ttl?: number): Promise<string[]> {
|
||||
let returnValue = "blueprints";
|
||||
let call = (nodeId: string) => `(call "${nodeId}" ("get_available_modules" "") [] ${returnValue})`
|
||||
let call = (nodeId: string) => `(call "${nodeId}" ("dist" "get_blueprints") [] ${returnValue})`
|
||||
|
||||
return this.requestResponse("getBlueprints", call, returnValue, new Map(), (args: any[]) => args[0] as string[], nodeId, ttl)
|
||||
}
|
||||
@ -284,7 +284,7 @@ export class FluenceClient {
|
||||
* Add a provider to DHT network to neighborhood around a key.
|
||||
*/
|
||||
async addProvider(key: Buffer, providerPeer: string, providerServiceId?: string, nodeId?: string, ttl?: number): Promise<void> {
|
||||
let call = (nodeId: string) => `(call "${nodeId}" ("add_provider" "") [key provider] void[])`
|
||||
let call = (nodeId: string) => `(call "${nodeId}" ("dht" "add_provider") [key provider] void[])`
|
||||
|
||||
key = bs58.encode(key)
|
||||
|
||||
@ -307,7 +307,7 @@ export class FluenceClient {
|
||||
key = bs58.encode(key)
|
||||
|
||||
let returnValue = "providers"
|
||||
let call = (nodeId: string) => `(call "${nodeId}" ("get_providers" "") [key] providers[])`
|
||||
let call = (nodeId: string) => `(call "${nodeId}" ("dht" "get_providers") [key] providers[])`
|
||||
|
||||
let data = new Map()
|
||||
data.set("key", key)
|
||||
@ -320,7 +320,7 @@ export class FluenceClient {
|
||||
*/
|
||||
async neighborhood(node: string, ttl?: number): Promise<string[]> {
|
||||
let returnValue = "neighborhood"
|
||||
let call = (nodeId: string) => `(call "${nodeId}" ("neighborhood" "") [node] ${returnValue})`
|
||||
let call = (nodeId: string) => `(call "${nodeId}" ("dht" "neighborhood") [node] ${returnValue})`
|
||||
|
||||
let data = new Map()
|
||||
data.set("node", node)
|
||||
@ -333,7 +333,7 @@ export class FluenceClient {
|
||||
*/
|
||||
async relayIdentity(fields: string[], data: Map<string, any>, nodeId?: string, ttl?: number): Promise<any> {
|
||||
let returnValue = "id";
|
||||
let call = (nodeId: string) => `(call "${nodeId}" ("identity" "") [${fields.join(" ")}] ${returnValue})`
|
||||
let call = (nodeId: string) => `(call "${nodeId}" ("op" "identity") [${fields.join(" ")}] ${returnValue})`
|
||||
|
||||
return this.requestResponse("getIdentity", call, returnValue, data, (args: any[]) => args[0], nodeId, ttl)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user