2021-09-27 22:11:35 +03:00
<!doctype html>
< html class = "default no-js" >
< head >
< meta charset = "utf-8" >
< meta http-equiv = "X-UA-Compatible" content = "IE=edge" >
< title > @fluencelabs/fluence< / title >
< meta name = "description" content = "Documentation for @fluencelabs/fluence" >
< meta name = "viewport" content = "width=device-width, initial-scale=1" >
< link rel = "stylesheet" href = "assets/css/main.css" >
< script async src = "assets/js/search.js" id = "search-script" > < / script >
< / head >
< body >
< header >
< div class = "tsd-page-toolbar" >
< div class = "container" >
< div class = "table-wrap" >
< div class = "table-cell" id = "tsd-search" data-index = "assets/js/search.json" data-base = "." >
< div class = "field" >
< label for = "tsd-search-field" class = "tsd-widget search no-caption" > Search< / label >
< input id = "tsd-search-field" type = "text" / >
< / div >
< ul class = "results" >
< li class = "state loading" > Preparing search index...< / li >
< li class = "state failure" > The search index is not available< / li >
< / ul >
< a href = "index.html" class = "title" > @fluencelabs/fluence< / a >
< / div >
< div class = "table-cell" id = "tsd-widgets" >
< div id = "tsd-filter" >
< a href = "#" class = "tsd-widget options no-caption" data-toggle = "options" > Options< / a >
< div class = "tsd-filter-group" >
< div class = "tsd-select" id = "tsd-filter-visibility" >
< span class = "tsd-select-label" > All< / span >
< ul class = "tsd-select-list" >
< li data-value = "public" > Public< / li >
< li data-value = "protected" > Public/Protected< / li >
< li data-value = "private" class = "selected" > All< / li >
< / ul >
< / div >
< input type = "checkbox" id = "tsd-filter-inherited" checked / >
< label class = "tsd-widget" for = "tsd-filter-inherited" > Inherited< / label >
< input type = "checkbox" id = "tsd-filter-externals" checked / >
< label class = "tsd-widget" for = "tsd-filter-externals" > Externals< / label >
< / div >
< / div >
< a href = "#" class = "tsd-widget menu no-caption" data-toggle = "menu" > Menu< / a >
< / div >
< / div >
< / div >
< / div >
< div class = "tsd-page-title" >
< div class = "container" >
< h1 > @fluencelabs/fluence< / h1 >
< / div >
< / div >
< / header >
< div class = "container container-main" >
< div class = "row" >
< div class = "col-8 col-content" >
< section class = "tsd-panel-group tsd-index-group" >
< h2 > Index< / h2 >
< section class = "tsd-panel tsd-index-panel" >
< div class = "tsd-index-content" >
< section class = "tsd-index-section " >
< h3 > Classes< / h3 >
< ul class = "tsd-index-list" >
< li class = "tsd-kind-class" > < a href = "classes/FluencePeer.html" class = "tsd-kind-icon" > Fluence< wbr > Peer< / a > < / li >
< li class = "tsd-kind-class" > < a href = "classes/KeyPair.html" class = "tsd-kind-icon" > Key< wbr > Pair< / a > < / li >
< / ul >
< / section >
< section class = "tsd-index-section " >
< h3 > Interfaces< / h3 >
< ul class = "tsd-index-list" >
< li class = "tsd-kind-interface tsd-has-type-parameter" > < a href = "interfaces/CallParams.html" class = "tsd-kind-icon" > Call< wbr > Params< / a > < / li >
2021-10-21 18:04:20 +03:00
< li class = "tsd-kind-interface" > < a href = "interfaces/PeerConfig.html" class = "tsd-kind-icon" > Peer< wbr > Config< / a > < / li >
2021-09-27 22:11:35 +03:00
< li class = "tsd-kind-interface" > < a href = "interfaces/PeerStatus.html" class = "tsd-kind-icon" > Peer< wbr > Status< / a > < / li >
< / ul >
< / section >
< section class = "tsd-index-section " >
< h3 > Type aliases< / h3 >
< ul class = "tsd-index-list" >
< li class = "tsd-kind-type-alias" > < a href = "modules.html#AvmLoglevel" class = "tsd-kind-icon" > Avm< wbr > Loglevel< / a > < / li >
< li class = "tsd-kind-type-alias" > < a href = "modules.html#PeerIdB58" class = "tsd-kind-icon" > Peer< wbr > IdB58< / a > < / li >
< / ul >
< / section >
< section class = "tsd-index-section " >
< h3 > Variables< / h3 >
< ul class = "tsd-index-list" >
< li class = "tsd-kind-variable" > < a href = "modules.html#Fluence" class = "tsd-kind-icon" > Fluence< / a > < / li >
< / ul >
< / section >
< section class = "tsd-index-section " >
< h3 > Functions< / h3 >
< ul class = "tsd-index-list" >
2022-04-21 14:13:26 +03:00
< li class = "tsd-kind-function tsd-is-external" > < a href = "modules.html#loadWasmFromFileSystem" class = "tsd-kind-icon" > load< wbr > Wasm< wbr > From< wbr > File< wbr > System< / a > < / li >
< li class = "tsd-kind-function tsd-is-external" > < a href = "modules.html#loadWasmFromNpmPackage" class = "tsd-kind-icon" > load< wbr > Wasm< wbr > From< wbr > Npm< wbr > Package< / a > < / li >
< li class = "tsd-kind-function tsd-is-external" > < a href = "modules.html#loadWasmFromServer" class = "tsd-kind-icon" > load< wbr > Wasm< wbr > From< wbr > Server< / a > < / li >
2021-09-27 22:11:35 +03:00
< li class = "tsd-kind-function" > < a href = "modules.html#setLogLevel" class = "tsd-kind-icon" > set< wbr > Log< wbr > Level< / a > < / li >
< / ul >
< / section >
< / div >
< / section >
< / section >
< section class = "tsd-panel-group tsd-member-group " >
< h2 > Type aliases< / h2 >
< section class = "tsd-panel tsd-member tsd-kind-type-alias" >
< a name = "AvmLoglevel" class = "tsd-anchor" > < / a >
< h3 > Avm< wbr > Loglevel< / h3 >
< div class = "tsd-signature tsd-kind-icon" > Avm< wbr > Loglevel< span class = "tsd-signature-symbol" > :< / span > < span class = "tsd-signature-type" > LogLevel< / span > < / div >
< aside class = "tsd-sources" >
< ul >
2022-04-24 10:49:57 +03:00
< li > Defined in < a href = "https://github.com/fluencelabs/fluence-js/blob/4fcb39b/src/internal/FluencePeer.ts#L47" > src/internal/FluencePeer.ts:47< / a > < / li >
2021-09-27 22:11:35 +03:00
< / ul >
< / aside >
< div class = "tsd-comment tsd-typography" >
< div class = "lead" >
< p > Enum representing the log level used in Aqua VM.
Possible values: ' info' , ' trace' , ' debug' , ' info' , ' warn' , ' error' , ' off' ;< / p >
< / div >
< / div >
< / section >
< section class = "tsd-panel tsd-member tsd-kind-type-alias" >
< a name = "PeerIdB58" class = "tsd-anchor" > < / a >
< h3 > Peer< wbr > IdB58< / h3 >
< div class = "tsd-signature tsd-kind-icon" > Peer< wbr > IdB58< span class = "tsd-signature-symbol" > :< / span > < span class = "tsd-signature-type" > string< / span > < / div >
< aside class = "tsd-sources" >
< ul >
2022-04-24 10:49:57 +03:00
< li > Defined in < a href = "https://github.com/fluencelabs/fluence-js/blob/4fcb39b/src/internal/commonTypes.ts#L22" > src/internal/commonTypes.ts:22< / a > < / li >
2021-09-27 22:11:35 +03:00
< / ul >
< / aside >
< div class = "tsd-comment tsd-typography" >
< div class = "lead" >
< p > Peer ID' s id as a base58 string (multihash/CIDv0).< / p >
< / div >
< / div >
< / section >
< / section >
< section class = "tsd-panel-group tsd-member-group " >
< h2 > Variables< / h2 >
< section class = "tsd-panel tsd-member tsd-kind-variable" >
< a name = "Fluence" class = "tsd-anchor" > < / a >
< h3 > < span class = "tsd-flag ts-flagConst" > Const< / span > Fluence< / h3 >
2022-04-21 14:13:26 +03:00
< div class = "tsd-signature tsd-kind-icon" > Fluence< span class = "tsd-signature-symbol" > :< / span > < span class = "tsd-signature-symbol" > { < / span > getPeer< span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-symbol" > (< / span > < span class = "tsd-signature-symbol" > )< / span > < span class = "tsd-signature-symbol" > => < / span > < a href = "classes/FluencePeer.html" class = "tsd-signature-type" data-tsd-kind = "Class" > FluencePeer< / a > < span class = "tsd-signature-symbol" > ; < / span > getStatus< span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-symbol" > (< / span > < span class = "tsd-signature-symbol" > )< / span > < span class = "tsd-signature-symbol" > => < / span > < a href = "interfaces/PeerStatus.html" class = "tsd-signature-type" data-tsd-kind = "Interface" > PeerStatus< / a > < span class = "tsd-signature-symbol" > ; < / span > registerMarineService< span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-symbol" > (< / span > wasm< span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > SharedArrayBuffer< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type" > Buffer< / span > , serviceId< span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > string< / span > < span class = "tsd-signature-symbol" > )< / span > < span class = "tsd-signature-symbol" > => < / span > < span class = "tsd-signature-type" > Promise< / span > < span class = "tsd-signature-symbol" > < < / span > < span class = "tsd-signature-type" > void< / span > < span class = "tsd-signature-symbol" > > < / span > < span class = "tsd-signature-symbol" > ; < / span > removeMarineService< span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-symbol" > (< / span > serviceId< span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > string< / span > < span class = "tsd-signature-symbol" > )< / span > < span class = "tsd-signature-symbol" > => < / span > < span class = "tsd-signature-type" > void< / span > < span class = "tsd-signature-symbol" > ; < / span > start< span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-symbol" > (< / span > config< span class = "tsd-signature-symbol" > ?: < / span > < a href = "interfaces/PeerConfig.html" class = "tsd-signature-type" data-tsd-kind = "Interface" > PeerConfig< / a > < span class = "tsd-signature-symbol" > )< / span > < span class = "tsd-signature-symbol" > => < / span > < span class = "tsd-signature-type" > Promise< / span > < span class = "tsd-signature-symbol" > < < / span > < span class = "tsd-signature-type" > void< / span > < span class = "tsd-signature-symbol" > > < / span > < span class = "tsd-signature-symbol" > ; < / span > stop< span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-symbol" > (< / span > < span class = "tsd-signature-symbol" > )< / span > < span class = "tsd-signature-symbol" > => < / span > < span class = "tsd-signature-type" > Promise< / span > < span class = "tsd-signature-symbol" > < < / span > < span class = "tsd-signature-type" > void< / span > < span class = "tsd-signature-symbol" > > < / span > < span class = "tsd-signature-symbol" > }< / span > < span class = "tsd-signature-symbol" > = ...< / span > < / div >
2021-09-27 22:11:35 +03:00
< aside class = "tsd-sources" >
< ul >
2022-04-24 10:49:57 +03:00
< li > Defined in < a href = "https://github.com/fluencelabs/fluence-js/blob/4fcb39b/src/index.ts#L37" > src/index.ts:37< / a > < / li >
2021-09-27 22:11:35 +03:00
< / ul >
< / aside >
< div class = "tsd-comment tsd-typography" >
< div class = "lead" >
< p > Public interface to Fluence JS< / p >
< / div >
< / div >
< div class = "tsd-type-declaration" >
< h4 > Type declaration< / h4 >
< ul class = "tsd-parameters" >
< li class = "tsd-parameter" >
< h5 > get< wbr > Peer< span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-symbol" > (< / span > < span class = "tsd-signature-symbol" > )< / span > < span class = "tsd-signature-symbol" > => < / span > < a href = "classes/FluencePeer.html" class = "tsd-signature-type" data-tsd-kind = "Class" > FluencePeer< / a > < / h5 >
< ul class = "tsd-parameters" >
< li class = "tsd-parameter-signature" >
< ul class = "tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-literal" >
< li class = "tsd-signature tsd-kind-icon" > < span class = "tsd-signature-symbol" > (< / span > < span class = "tsd-signature-symbol" > )< / span > < span class = "tsd-signature-symbol" > : < / span > < a href = "classes/FluencePeer.html" class = "tsd-signature-type" data-tsd-kind = "Class" > FluencePeer< / a > < / li >
< / ul >
< ul class = "tsd-descriptions" >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" >
< div class = "lead" >
< p > Get the default peer instance< / p >
< / div >
< / div >
< h4 class = "tsd-returns-title" > Returns < a href = "classes/FluencePeer.html" class = "tsd-signature-type" data-tsd-kind = "Class" > FluencePeer< / a > < / h4 >
< p > the default peer instance< / p >
< / li >
< / ul >
< / li >
< / ul >
< / li >
< li class = "tsd-parameter" >
< h5 > get< wbr > Status< span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-symbol" > (< / span > < span class = "tsd-signature-symbol" > )< / span > < span class = "tsd-signature-symbol" > => < / span > < a href = "interfaces/PeerStatus.html" class = "tsd-signature-type" data-tsd-kind = "Interface" > PeerStatus< / a > < / h5 >
< ul class = "tsd-parameters" >
< li class = "tsd-parameter-signature" >
< ul class = "tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-literal" >
< li class = "tsd-signature tsd-kind-icon" > < span class = "tsd-signature-symbol" > (< / span > < span class = "tsd-signature-symbol" > )< / span > < span class = "tsd-signature-symbol" > : < / span > < a href = "interfaces/PeerStatus.html" class = "tsd-signature-type" data-tsd-kind = "Interface" > PeerStatus< / a > < / li >
< / ul >
< ul class = "tsd-descriptions" >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" >
< div class = "lead" >
< p > Get the default peer' s status< / p >
< / div >
< / div >
< h4 class = "tsd-returns-title" > Returns < a href = "interfaces/PeerStatus.html" class = "tsd-signature-type" data-tsd-kind = "Interface" > PeerStatus< / a > < / h4 >
< p > Default peer' s status< / p >
< / li >
< / ul >
< / li >
< / ul >
< / li >
2022-04-21 14:13:26 +03:00
< li class = "tsd-parameter" >
< h5 > register< wbr > Marine< wbr > Service< span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-symbol" > (< / span > wasm< span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > SharedArrayBuffer< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type" > Buffer< / span > , serviceId< span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > string< / span > < span class = "tsd-signature-symbol" > )< / span > < span class = "tsd-signature-symbol" > => < / span > < span class = "tsd-signature-type" > Promise< / span > < span class = "tsd-signature-symbol" > < < / span > < span class = "tsd-signature-type" > void< / span > < span class = "tsd-signature-symbol" > > < / span > < / h5 >
< ul class = "tsd-parameters" >
< li class = "tsd-parameter-signature" >
< ul class = "tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-literal" >
< li class = "tsd-signature tsd-kind-icon" > < span class = "tsd-signature-symbol" > (< / span > wasm< span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > SharedArrayBuffer< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type" > Buffer< / span > , serviceId< span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > string< / span > < span class = "tsd-signature-symbol" > )< / span > < span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > Promise< / span > < span class = "tsd-signature-symbol" > < < / span > < span class = "tsd-signature-type" > void< / span > < span class = "tsd-signature-symbol" > > < / span > < / li >
< / ul >
< ul class = "tsd-descriptions" >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" >
< div class = "lead" >
< p > Registers marine service within the default Fluence peer from wasm file.
Following helper functions can be used to load wasm files:< / p >
< ul >
< li > loadWasmFromFileSystem< / li >
< li > loadWasmFromNpmPackage< / li >
< li > loadWasmFromServer< / li >
< / ul >
< / div >
< / div >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameters" >
< li >
< h5 > wasm: < span class = "tsd-signature-type" > SharedArrayBuffer< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type" > Buffer< / span > < / h5 >
< div class = "tsd-comment tsd-typography" >
< p > buffer with the wasm file for service< / p >
< / div >
< / li >
< li >
< h5 > serviceId: < span class = "tsd-signature-type" > string< / span > < / h5 >
< div class = "tsd-comment tsd-typography" >
< p > the service id by which the service can be accessed in aqua< / p >
< / div >
< / li >
< / ul >
< h4 class = "tsd-returns-title" > Returns < span class = "tsd-signature-type" > Promise< / span > < span class = "tsd-signature-symbol" > < < / span > < span class = "tsd-signature-type" > void< / span > < span class = "tsd-signature-symbol" > > < / span > < / h4 >
< / li >
< / ul >
< / li >
< / ul >
< / li >
< li class = "tsd-parameter" >
< h5 > remove< wbr > Marine< wbr > Service< span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-symbol" > (< / span > serviceId< span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > string< / span > < span class = "tsd-signature-symbol" > )< / span > < span class = "tsd-signature-symbol" > => < / span > < span class = "tsd-signature-type" > void< / span > < / h5 >
< ul class = "tsd-parameters" >
< li class = "tsd-parameter-signature" >
< ul class = "tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-literal" >
< li class = "tsd-signature tsd-kind-icon" > < span class = "tsd-signature-symbol" > (< / span > serviceId< span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > string< / span > < span class = "tsd-signature-symbol" > )< / span > < span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > void< / span > < / li >
< / ul >
< ul class = "tsd-descriptions" >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" >
< div class = "lead" >
< p > Removes the specified marine service from the default Fluence peer< / p >
< / div >
< / div >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameters" >
< li >
< h5 > serviceId: < span class = "tsd-signature-type" > string< / span > < / h5 >
< div class = "tsd-comment tsd-typography" >
< p > the service id to remove< / p >
< / div >
< / li >
< / ul >
< h4 class = "tsd-returns-title" > Returns < span class = "tsd-signature-type" > void< / span > < / h4 >
< / li >
< / ul >
< / li >
< / ul >
< / li >
2021-09-27 22:11:35 +03:00
< li class = "tsd-parameter" >
2021-10-21 18:04:20 +03:00
< h5 > start< span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-symbol" > (< / span > config< span class = "tsd-signature-symbol" > ?: < / span > < a href = "interfaces/PeerConfig.html" class = "tsd-signature-type" data-tsd-kind = "Interface" > PeerConfig< / a > < span class = "tsd-signature-symbol" > )< / span > < span class = "tsd-signature-symbol" > => < / span > < span class = "tsd-signature-type" > Promise< / span > < span class = "tsd-signature-symbol" > < < / span > < span class = "tsd-signature-type" > void< / span > < span class = "tsd-signature-symbol" > > < / span > < / h5 >
2021-09-27 22:11:35 +03:00
< ul class = "tsd-parameters" >
< li class = "tsd-parameter-signature" >
< ul class = "tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-literal" >
2021-10-21 18:04:20 +03:00
< li class = "tsd-signature tsd-kind-icon" > < span class = "tsd-signature-symbol" > (< / span > config< span class = "tsd-signature-symbol" > ?: < / span > < a href = "interfaces/PeerConfig.html" class = "tsd-signature-type" data-tsd-kind = "Interface" > PeerConfig< / a > < span class = "tsd-signature-symbol" > )< / span > < span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > Promise< / span > < span class = "tsd-signature-symbol" > < < / span > < span class = "tsd-signature-type" > void< / span > < span class = "tsd-signature-symbol" > > < / span > < / li >
2021-09-27 22:11:35 +03:00
< / ul >
< ul class = "tsd-descriptions" >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" >
< div class = "lead" >
< p > Initializes the default peer: starts the Aqua VM, initializes the default call service handlers
and (optionally) connect to the Fluence network< / p >
< / div >
< / div >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameters" >
< li >
2021-10-21 18:04:20 +03:00
< h5 > < span class = "tsd-flag ts-flagOptional" > Optional< / span > config: < a href = "interfaces/PeerConfig.html" class = "tsd-signature-type" data-tsd-kind = "Interface" > PeerConfig< / a > < / h5 >
2021-09-27 22:11:35 +03:00
< div class = "tsd-comment tsd-typography" >
< p > object specifying peer configuration< / p >
< / div >
< / li >
< / ul >
< h4 class = "tsd-returns-title" > Returns < span class = "tsd-signature-type" > Promise< / span > < span class = "tsd-signature-symbol" > < < / span > < span class = "tsd-signature-type" > void< / span > < span class = "tsd-signature-symbol" > > < / span > < / h4 >
< / li >
< / ul >
< / li >
< / ul >
< / li >
< li class = "tsd-parameter" >
< h5 > stop< span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-symbol" > (< / span > < span class = "tsd-signature-symbol" > )< / span > < span class = "tsd-signature-symbol" > => < / span > < span class = "tsd-signature-type" > Promise< / span > < span class = "tsd-signature-symbol" > < < / span > < span class = "tsd-signature-type" > void< / span > < span class = "tsd-signature-symbol" > > < / span > < / h5 >
< ul class = "tsd-parameters" >
< li class = "tsd-parameter-signature" >
< ul class = "tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-literal" >
< li class = "tsd-signature tsd-kind-icon" > < span class = "tsd-signature-symbol" > (< / span > < span class = "tsd-signature-symbol" > )< / span > < span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > Promise< / span > < span class = "tsd-signature-symbol" > < < / span > < span class = "tsd-signature-type" > void< / span > < span class = "tsd-signature-symbol" > > < / span > < / li >
< / ul >
< ul class = "tsd-descriptions" >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" >
< div class = "lead" >
2021-11-28 09:36:01 +03:00
< p > Un-initializes the default peer: stops all the underlying workflows, stops the Aqua VM
2021-09-27 22:11:35 +03:00
and disconnects from the Fluence network< / p >
< / div >
< / div >
< h4 class = "tsd-returns-title" > Returns < span class = "tsd-signature-type" > Promise< / span > < span class = "tsd-signature-symbol" > < < / span > < span class = "tsd-signature-type" > void< / span > < span class = "tsd-signature-symbol" > > < / span > < / h4 >
< / li >
< / ul >
< / li >
< / ul >
< / li >
< / ul >
< / div >
< / section >
< / section >
< section class = "tsd-panel-group tsd-member-group " >
< h2 > Functions< / h2 >
2022-04-21 14:13:26 +03:00
< section class = "tsd-panel tsd-member tsd-kind-function tsd-is-external" >
< a name = "loadWasmFromFileSystem" class = "tsd-anchor" > < / a >
< h3 > < span class = "tsd-flag ts-flagConst" > Const< / span > load< wbr > Wasm< wbr > From< wbr > File< wbr > System< / h3 >
< ul class = "tsd-signatures tsd-kind-function tsd-is-external" >
< li class = "tsd-signature tsd-kind-icon" > load< wbr > Wasm< wbr > From< wbr > File< wbr > System< span class = "tsd-signature-symbol" > (< / span > filePath< span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > string< / span > < span class = "tsd-signature-symbol" > )< / span > < span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > Promise< / span > < span class = "tsd-signature-symbol" > < < / span > < span class = "tsd-signature-type" > SharedArrayBuffer< / span > < span class = "tsd-signature-symbol" > > < / span > < / li >
< / ul >
< ul class = "tsd-descriptions" >
< li class = "tsd-description" >
< aside class = "tsd-sources" >
< ul >
< li > Defined in node_modules/@fluencelabs/marine-js/dist/loadWasmHelpers.d.ts:28< / li >
< / ul >
< / aside >
< div class = "tsd-comment tsd-typography" >
< div class = "lead" >
< p > Load wasm file from the file system. Only works in nodejs environment.
The functions returns SharedArrayBuffer compatible with FluenceAppService methods.< / p >
< / div >
< / div >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameters" >
< li >
< h5 > filePath: < span class = "tsd-signature-type" > string< / span > < / h5 >
< div class = "tsd-comment tsd-typography" >
< p > path to the wasm file< / p >
< / div >
< / li >
< / ul >
< h4 class = "tsd-returns-title" > Returns < span class = "tsd-signature-type" > Promise< / span > < span class = "tsd-signature-symbol" > < < / span > < span class = "tsd-signature-type" > SharedArrayBuffer< / span > < span class = "tsd-signature-symbol" > > < / span > < / h4 >
< p > SharedArrayBuffer with the wasm file< / p >
< / li >
< / ul >
< / section >
< section class = "tsd-panel tsd-member tsd-kind-function tsd-is-external" >
< a name = "loadWasmFromNpmPackage" class = "tsd-anchor" > < / a >
< h3 > < span class = "tsd-flag ts-flagConst" > Const< / span > load< wbr > Wasm< wbr > From< wbr > Npm< wbr > Package< / h3 >
< ul class = "tsd-signatures tsd-kind-function tsd-is-external" >
< li class = "tsd-signature tsd-kind-icon" > load< wbr > Wasm< wbr > From< wbr > Npm< wbr > Package< span class = "tsd-signature-symbol" > (< / span > source< span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-symbol" > { < / span > file< span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > string< / span > < span class = "tsd-signature-symbol" > ; < / span > package< span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > string< / span > < span class = "tsd-signature-symbol" > }< / span > < span class = "tsd-signature-symbol" > )< / span > < span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > Promise< / span > < span class = "tsd-signature-symbol" > < < / span > < span class = "tsd-signature-type" > SharedArrayBuffer< / span > < span class = "tsd-signature-symbol" > > < / span > < / li >
< / ul >
< ul class = "tsd-descriptions" >
< li class = "tsd-description" >
< aside class = "tsd-sources" >
< ul >
< li > Defined in node_modules/@fluencelabs/marine-js/dist/loadWasmHelpers.d.ts:18< / li >
< / ul >
< / aside >
< div class = "tsd-comment tsd-typography" >
< div class = "lead" >
< p > Load wasm file from npm package. Only works in nodejs environment.
The function returns SharedArrayBuffer compatible with FluenceAppService methods.< / p >
< / div >
< / div >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameters" >
< li >
< h5 > source: < span class = "tsd-signature-symbol" > { < / span > file< span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > string< / span > < span class = "tsd-signature-symbol" > ; < / span > package< span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > string< / span > < span class = "tsd-signature-symbol" > }< / span > < / h5 >
< div class = "tsd-comment tsd-typography" >
< p > object specifying the source of the file. Consist two fields: package name and file path.< / p >
< / div >
< ul class = "tsd-parameters" >
< li class = "tsd-parameter" >
< h5 > file< span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > string< / span > < / h5 >
< / li >
< li class = "tsd-parameter" >
< h5 > package< span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > string< / span > < / h5 >
< / li >
< / ul >
< / li >
< / ul >
< h4 class = "tsd-returns-title" > Returns < span class = "tsd-signature-type" > Promise< / span > < span class = "tsd-signature-symbol" > < < / span > < span class = "tsd-signature-type" > SharedArrayBuffer< / span > < span class = "tsd-signature-symbol" > > < / span > < / h4 >
< p > SharedArrayBuffer with the wasm file< / p >
< / li >
< / ul >
< / section >
< section class = "tsd-panel tsd-member tsd-kind-function tsd-is-external" >
< a name = "loadWasmFromServer" class = "tsd-anchor" > < / a >
< h3 > < span class = "tsd-flag ts-flagConst" > Const< / span > load< wbr > Wasm< wbr > From< wbr > Server< / h3 >
< ul class = "tsd-signatures tsd-kind-function tsd-is-external" >
< li class = "tsd-signature tsd-kind-icon" > load< wbr > Wasm< wbr > From< wbr > Server< span class = "tsd-signature-symbol" > (< / span > filePath< span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > string< / span > < span class = "tsd-signature-symbol" > )< / span > < span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > Promise< / span > < span class = "tsd-signature-symbol" > < < / span > < span class = "tsd-signature-type" > SharedArrayBuffer< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type" > Buffer< / span > < span class = "tsd-signature-symbol" > > < / span > < / li >
< / ul >
< ul class = "tsd-descriptions" >
< li class = "tsd-description" >
< aside class = "tsd-sources" >
< ul >
< li > Defined in node_modules/@fluencelabs/marine-js/dist/loadWasmHelpers.d.ts:11< / li >
< / ul >
< / aside >
< div class = "tsd-comment tsd-typography" >
< div class = "lead" >
< p > Load wasm file from the server. Only works in browsers.
The function will try load file into SharedArrayBuffer if the site is cross-origin isolated.
Otherwise the return value fallbacks to Buffer which is less performant but is still compatible with FluenceAppService methods.
We strongly recommend to set-up cross-origin headers. For more details see: See < a href = "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer#security_requirements" > https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer#security_requirements< / a >
Filename is relative to current origin.< / p >
< / div >
< / div >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameters" >
< li >
< h5 > filePath: < span class = "tsd-signature-type" > string< / span > < / h5 >
< div class = "tsd-comment tsd-typography" >
< p > path to the wasm file relative to current origin< / p >
< / div >
< / li >
< / ul >
< h4 class = "tsd-returns-title" > Returns < span class = "tsd-signature-type" > Promise< / span > < span class = "tsd-signature-symbol" > < < / span > < span class = "tsd-signature-type" > SharedArrayBuffer< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type" > Buffer< / span > < span class = "tsd-signature-symbol" > > < / span > < / h4 >
< p > Either SharedArrayBuffer or Buffer with the wasm file< / p >
< / li >
< / ul >
< / section >
2021-09-27 22:11:35 +03:00
< section class = "tsd-panel tsd-member tsd-kind-function" >
< a name = "setLogLevel" class = "tsd-anchor" > < / a >
< h3 > < span class = "tsd-flag ts-flagConst" > Const< / span > set< wbr > Log< wbr > Level< / h3 >
< ul class = "tsd-signatures tsd-kind-function" >
< li class = "tsd-signature tsd-kind-icon" > set< wbr > Log< wbr > Level< span class = "tsd-signature-symbol" > (< / span > level< span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > LogLevelDesc< / span > < span class = "tsd-signature-symbol" > )< / span > < span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > void< / span > < / li >
< / ul >
< ul class = "tsd-descriptions" >
< li class = "tsd-description" >
< aside class = "tsd-sources" >
< ul >
2022-04-24 10:49:57 +03:00
< li > Defined in < a href = "https://github.com/fluencelabs/fluence-js/blob/4fcb39b/src/index.ts#L26" > src/index.ts:26< / a > < / li >
2021-09-27 22:11:35 +03:00
< / ul >
< / aside >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameters" >
< li >
< h5 > level: < span class = "tsd-signature-type" > LogLevelDesc< / span > < / h5 >
< / li >
< / ul >
< h4 class = "tsd-returns-title" > Returns < span class = "tsd-signature-type" > void< / span > < / h4 >
< / li >
< / ul >
< / section >
< / section >
< / div >
< div class = "col-4 col-menu menu-sticky-wrap menu-highlight" >
< nav class = "tsd-navigation primary" >
< ul >
< li class = "current " >
< a href = "modules.html" > Exports< / a >
< / li >
< / ul >
< / nav >
< nav class = "tsd-navigation secondary menu-sticky" >
< ul class = "before-current" >
< li class = " tsd-kind-class" >
< a href = "classes/FluencePeer.html" class = "tsd-kind-icon" > Fluence< wbr > Peer< / a >
< / li >
< li class = " tsd-kind-class" >
< a href = "classes/KeyPair.html" class = "tsd-kind-icon" > Key< wbr > Pair< / a >
< / li >
< li class = " tsd-kind-interface tsd-has-type-parameter" >
< a href = "interfaces/CallParams.html" class = "tsd-kind-icon" > Call< wbr > Params< / a >
< / li >
2021-10-21 18:04:20 +03:00
< li class = " tsd-kind-interface" >
< a href = "interfaces/PeerConfig.html" class = "tsd-kind-icon" > Peer< wbr > Config< / a >
< / li >
2021-09-27 22:11:35 +03:00
< li class = " tsd-kind-interface" >
< a href = "interfaces/PeerStatus.html" class = "tsd-kind-icon" > Peer< wbr > Status< / a >
< / li >
< li class = " tsd-kind-type-alias" >
< a href = "modules.html#AvmLoglevel" class = "tsd-kind-icon" > Avm< wbr > Loglevel< / a >
< / li >
< li class = " tsd-kind-type-alias" >
< a href = "modules.html#PeerIdB58" class = "tsd-kind-icon" > Peer< wbr > IdB58< / a >
< / li >
< li class = " tsd-kind-variable" >
< a href = "modules.html#Fluence" class = "tsd-kind-icon" > Fluence< / a >
< / li >
2022-04-21 14:13:26 +03:00
< li class = " tsd-kind-function tsd-is-external" >
< a href = "modules.html#loadWasmFromFileSystem" class = "tsd-kind-icon" > load< wbr > Wasm< wbr > From< wbr > File< wbr > System< / a >
< / li >
< li class = " tsd-kind-function tsd-is-external" >
< a href = "modules.html#loadWasmFromNpmPackage" class = "tsd-kind-icon" > load< wbr > Wasm< wbr > From< wbr > Npm< wbr > Package< / a >
< / li >
< li class = " tsd-kind-function tsd-is-external" >
< a href = "modules.html#loadWasmFromServer" class = "tsd-kind-icon" > load< wbr > Wasm< wbr > From< wbr > Server< / a >
< / li >
2021-09-27 22:11:35 +03:00
< li class = " tsd-kind-function" >
< a href = "modules.html#setLogLevel" class = "tsd-kind-icon" > set< wbr > Log< wbr > Level< / a >
< / li >
< / ul >
< / nav >
< / div >
< / div >
< / div >
< footer class = "with-border-bottom" >
< div class = "container" >
< h2 > Legend< / h2 >
< div class = "tsd-legend-group" >
< ul class = "tsd-legend" >
< li class = "tsd-kind-constructor tsd-parent-kind-class" > < span class = "tsd-kind-icon" > Constructor< / span > < / li >
< li class = "tsd-kind-property tsd-parent-kind-class" > < span class = "tsd-kind-icon" > Property< / span > < / li >
< li class = "tsd-kind-method tsd-parent-kind-class" > < span class = "tsd-kind-icon" > Method< / span > < / li >
< / ul >
< ul class = "tsd-legend" >
< li class = "tsd-kind-property tsd-parent-kind-interface" > < span class = "tsd-kind-icon" > Property< / span > < / li >
< / ul >
< ul class = "tsd-legend" >
< li class = "tsd-kind-method tsd-parent-kind-class tsd-is-static" > < span class = "tsd-kind-icon" > Static method< / span > < / li >
< / ul >
< / div >
< / div >
< / footer >
< div class = "container tsd-generator" >
< p > Generated using < a href = "https://typedoc.org/" target = "_blank" > TypeDoc< / a > < / p >
< / div >
< div class = "overlay" > < / div >
< script src = "assets/js/main.js" > < / script >
< / body >
< / html >