diff --git a/builtin.aqua b/builtin.aqua index adf1e8b..835a156 100644 --- a/builtin.aqua +++ b/builtin.aqua @@ -8,10 +8,10 @@ alias Pairs : [][]string alias Base58String : string alias Hash : string --- There are two types of dependencies: named and by-hash. +-- There are two types of dependencies: named and by-hash. -- name:foobar – specifies dependency by module name, points to a module with import name 'foobar' -- hash:04dc884... – specifies dependency by module hash --- By-hash dependencies are preffered since they are deteremenistic +-- By-hash dependencies are preffered since they are determenistic -- while by-name dependency can yield different modules at different points in time alias Dependency : string @@ -84,7 +84,7 @@ service Op("op"): -- Argument: s - string to apply sha256 to (hash is applied to utf8 bytes of s) -- Returns: returns sha256 multihash encoded as base58 sha256_string(s: string) -> Base58String - + -- concatenate strings (in AIR it takes any number of arguments) concat_strings(a: string, b: string) -> string @@ -127,7 +127,7 @@ service Kademlia("kad"): -- target – base58 string; result is sorted by XOR distance to target -- left – list of base58 strings -- right – list of base58 strings - -- count – how many items to return, unlimited by default + -- count – how many items to return; default 20 -- Returns: list of base58 strings sorted by distance to target; list will contain at most count elements merge(target: Base58String, left: []string, right: []string, count: ?u32) -> []string @@ -171,10 +171,10 @@ service Dist("dist"): -- logger_enabled - Defines whether Marine should provide a special host log_utf8_string function for this module -- preopened_files - Files available for this module. Module can access only files from this list -- envs - environment variables available for this module - -- mapped_dirs - Directory mapping, e.g. [["/sites", "./web/data"]] so all + -- mapped_dirs - Directory mapping, e.g. [["/sites", "./web/data"]] so all -- reads & writes to /sites will actually to go ./web/data - -- mounted_binaries - Mapping of host binaries available to call from module, - -- e.g. [["curl", "/usr/bin/curl"]] will allow module to + -- mounted_binaries - Mapping of host binaries available to call from module, + -- e.g. [["curl", "/usr/bin/curl"]] will allow module to -- call /usr/bin/curl binary as function 'curl' -- logging_mask - Binary mask to enable & disable logging targets. Targets are -- configured in WasmLoggerBuilder::with_target_map @@ -220,7 +220,7 @@ service Script("script"): -- Arguments: -- air_script - raw AIR script without any undefined variables -- interval - if not set, script will be ran only once - -- if set, script will be ran once in the interval + -- if set, script will be ran once in the interval -- (NOTE: actual interval may vary by up to 3 seconds) -- TODO: change interval to ?u64 when node API is updated add(air_script: string, interval: ?string) -> string