aqua-libdefines a number of services available on peers in the Fluence Network:
Op- short for "Operations". Functions for data transformation.
Peer- functions affecting peer's internal state
Kademlia- functions to manipulate libp2p Kademlia
Srv- short for "Service". Functions for service manipulation
Dist- short for "Distribution". Functions for module and blueprint distribution
Script- functions to run and remove scheduled (recurring) scripts
@fluencelabs/aqua-libto your dependencies as described in Libraries doc, and then import it in your Aqua script:
aqua-libis meant to be used to write Aqua scripts, and since
aqua-libdoesn't export any top-level functions, it's not callable directly in the TypeScript.
aqua-libAPI. But there's a way around that.
Op.concat_stringsas an example. You can use it to concatenate several strings.
aqua-libprovides the following signature:
concat_stringsaccepts any number of arguments, so you can redeclare it with the number of arguments that you want:
Op.concat- can concatenate any number of arrays
Op.array- wraps any number of arguments into an array
Op.concat_string- concatenates any number of strings