Compare commits

...

15 Commits

Author SHA1 Message Date
fluencebot
ac266a69bf
chore(main): release aqua-lib 0.12.1 (#93) 2024-09-18 11:39:51 +02:00
Maria Kuklina
cba9b785a3
fix: fix Peer.identify return type (#92) 2024-09-18 11:06:04 +02:00
fluencebot
49ca1fe7ff
chore(main): release aqua-lib 0.12.0 (#91) 2024-09-12 17:22:54 +02:00
Maria Kuklina
c8efe9c33a
update peer.identify (#90) 2024-09-12 17:16:33 +02:00
fluencebot
7bf3e62d3b
chore(main): release aqua-lib 0.11.0 (#89) 2024-08-08 13:37:03 +03:00
Aleksey Proshutinskiy
f8ef9f3a54
feat!: change Worker type in SubnetResolveResult (#88) 2024-08-08 13:28:08 +03:00
fluencebot
c01820d7ef
chore(main): release aqua-lib 0.10.2 (#87) 2024-02-24 13:50:32 +01:00
Maria Kuklina
b439997ba7
Add new method for module upload from vault (#86) 2024-02-24 13:39:51 +01:00
fluencebot
724bd44805
chore(main): release aqua-lib 0.10.1 (#85) 2024-02-19 20:12:54 +03:00
Nick
c92d3e3363
feat(worker): change cu_ids type (#84) 2024-02-19 20:12:24 +03:00
fluencebot
ae27eebd67
chore(main): release aqua-lib 0.10.0 (#83) 2024-02-19 18:41:30 +03:00
Nick
5414624156
feat(worker)!: add cu_ids to worker create (#82)
* feat(worker): add cu_ids to worker create

* add docs

* add docs
2024-02-19 18:35:02 +03:00
Maria Kuklina
f2665b0292
Remove Script API (#80) 2024-02-09 09:27:28 +01:00
fluencebot
5b5237dde6
chore(main): release aqua-lib 0.9.1 (#78) 2024-01-15 09:38:59 +01:00
InversionSpaces
60b91def4a
Add headers (#77) 2024-01-12 13:13:52 +01:00
8 changed files with 95 additions and 42 deletions

View File

@ -1,3 +1,3 @@
{
".": "0.9.0"
".": "0.12.1"
}

View File

@ -1,5 +1,66 @@
# Changelog
## [0.12.1](https://github.com/fluencelabs/aqua-lib/compare/aqua-lib-v0.12.0...aqua-lib-v0.12.1) (2024-09-18)
### Bug Fixes
* fix Peer.identify return type ([#92](https://github.com/fluencelabs/aqua-lib/issues/92)) ([cba9b78](https://github.com/fluencelabs/aqua-lib/commit/cba9b785a3eae32bfd02d55d08febdd076540844))
## [0.12.0](https://github.com/fluencelabs/aqua-lib/compare/aqua-lib-v0.11.0...aqua-lib-v0.12.0) (2024-09-12)
### ⚠ BREAKING CHANGES
* **builtins:** update peer.identify
### Features
* **builtins:** update peer.identify ([c8efe9c](https://github.com/fluencelabs/aqua-lib/commit/c8efe9c33a0730a5ebaeb17228c2f4db90f7729e))
## [0.11.0](https://github.com/fluencelabs/aqua-lib/compare/aqua-lib-v0.10.2...aqua-lib-v0.11.0) (2024-08-08)
### ⚠ BREAKING CHANGES
* change Worker type in SubnetResolveResult ([#88](https://github.com/fluencelabs/aqua-lib/issues/88))
### Features
* change Worker type in SubnetResolveResult ([#88](https://github.com/fluencelabs/aqua-lib/issues/88)) ([f8ef9f3](https://github.com/fluencelabs/aqua-lib/commit/f8ef9f3a5408354026b6b6fccbf3689b492ff929))
## [0.10.2](https://github.com/fluencelabs/aqua-lib/compare/aqua-lib-v0.10.1...aqua-lib-v0.10.2) (2024-02-24)
### Features
* Add new method for module upload from vault ([b439997](https://github.com/fluencelabs/aqua-lib/commit/b439997ba77168ea7a5e773368e0a03c6167d988))
## [0.10.1](https://github.com/fluencelabs/aqua-lib/compare/aqua-lib-v0.10.0...aqua-lib-v0.10.1) (2024-02-19)
### Features
* **worker:** change cu_ids type ([#84](https://github.com/fluencelabs/aqua-lib/issues/84)) ([c92d3e3](https://github.com/fluencelabs/aqua-lib/commit/c92d3e3363a936b0ba4db6bd0b2e2e42337bcfd1))
## [0.10.0](https://github.com/fluencelabs/aqua-lib/compare/aqua-lib-v0.9.1...aqua-lib-v0.10.0) (2024-02-19)
### ⚠ BREAKING CHANGES
* **worker:** add cu_ids to worker create ([#82](https://github.com/fluencelabs/aqua-lib/issues/82))
### Features
* **worker:** add cu_ids to worker create ([#82](https://github.com/fluencelabs/aqua-lib/issues/82)) ([5414624](https://github.com/fluencelabs/aqua-lib/commit/54146241562fcece7fd6783305d2c5fd32aa6da8))
## [0.9.1](https://github.com/fluencelabs/aqua-lib/compare/aqua-lib-v0.9.0...aqua-lib-v0.9.1) (2024-01-15)
### Features
* **aqua-lib:** Add headers ([60b91de](https://github.com/fluencelabs/aqua-lib/commit/60b91def4a481e56f849f5d04734d117eb29c902))
## [0.9.0](https://github.com/fluencelabs/aqua-lib/compare/aqua-lib-v0.8.2...aqua-lib-v0.9.0) (2023-12-21)

View File

@ -35,12 +35,18 @@ data Interface:
function_signatures: []FunctionSignature
record_types: []RecordType
data VmInfo:
ip: string
default_ssh_port: u16
forwarded_ports: []string
data Info:
external_addresses: []string
node_version: string
air_version: string
spell_version: string
allowed_binaries: []string
vm_info: ?VmInfo
data ModuleWASIConfig:
envs: ?Pairs
@ -65,13 +71,6 @@ data Blueprint:
name: string
dependencies: []CID
data ScriptInfo:
id: string
src: string
failures: u32
interval: string
owner: string
data Contact:
peer_id: string
addresses: []string
@ -284,20 +283,27 @@ service Dist("dist"):
-- module_name - import name of the module
default_module_config(module_name: string) -> ModuleConfig
-- Used to add modules to the node specified in the service call
-- Arguments:
-- bytes a base64 string containing the .wasm module to add.
-- config module info
-- Returns: blake3 hash of the module
-- NOTE: the config is IGNORED and only module's `name` is taken from it
add_module(wasm_b56_content: Bytes, conf: ModuleConfig) -> string
-- Adds module by copying it from Particle Vault directory
-- Arguments:
-- path path or a filename
-- config - module config
-- NOTE: the config is IGNORED and only module's `name` is taken from it
add_module_from_vault(path: Path, config: ModuleConfig) -> Hash
-- Adds module by copying it from Particle Vault directory
-- Arguments:
-- path path or a filename
-- config - module config
add_module_bytes_from_vault(name: string, module_cid: string) -> string
-- Get a list of modules available on the node
list_modules() -> []Module
@ -321,32 +327,6 @@ service Dist("dist"):
-- Get a single blueprint
get_blueprint(blueprint_id: string) -> Blueprint
service Script("script"):
-- Adds the given script to a node
-- Arguments:
-- air_script - raw AIR script without any undefined variables
-- interval - time to next run of the script in seconds
-- - if set, script will be ran once in the interval
-- - if not set, script will be ran only once
-- (NOTE: an actual interval may vary by up to 3 seconds)
add(air_script: string, interval: ?u64) -> string
-- Adds the script from the given path to a node
-- Arguments:
-- path - path to the AIR script without any undefined variables in the particle file vault
-- interval - time to next run of the script in seconds
-- - if set, script will be ran once in the interval
-- - if not set, script will be ran only once
-- (NOTE: an actual interval may vary by up to 3 seconds)
add_from_vault(path: Path, interval: ?u64) -> string
-- Removes recurring script from a node. Only the creator of the script can delete it
remove(script_id: string) -> bool
-- Returns a list of existing scripts on the node.
-- Each object in the list is of the following structure
list() -> []ScriptInfo
data SignResult:
-- Was call successful or not
success: bool

View File

@ -1,3 +1,5 @@
aqua MathLib declares *
service Math("math"):
-- x + y
add(x: i64, y: i64) -> i64

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@fluencelabs/aqua-lib",
"version": "0.9.0",
"version": "0.12.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@fluencelabs/aqua-lib",
"version": "0.9.0",
"version": "0.12.1",
"license": "MIT",
"devDependencies": {
"@fluencelabs/aqua": "0.9.4"

View File

@ -1,6 +1,6 @@
{
"name": "@fluencelabs/aqua-lib",
"version": "0.9.0",
"version": "0.12.1",
"description": "Aqua standard library",
"files": [
"builtin.aqua",

View File

@ -1,5 +1,7 @@
aqua SubnetLib declares *
data Worker:
pat_id: string
cu_ids: []string
host_id: string
worker_id: ?string

View File

@ -1,10 +1,18 @@
aqua WorkersLib declares *
import PeerId from "./builtin.aqua"
alias CUID : []u8
-- Available only on rust peers
service Worker("worker"):
-- Creates new worker associated with `deal_id`.
-- Throws an error if worker exists.
create(deal_id: string) -> PeerId
-- Creates new worker associated with `deal_id` and allows specifying custom `cu_ids`.
-- Arguments:
-- deal_id - ID of the deal
-- cu_ids an array of target compute unit IDs
-- Returns: PeerId - worker ID if creation was successful
-- Throws an error if a worker exists.
create(deal_id: string, cu_ids: []CUID) -> PeerId
-- Returns worker peer id associated with `deal_id`.
-- Returns nil if worker doesn't exist.