mirror of
https://github.com/fluencelabs/gitbook-docs
synced 2025-05-03 19:52:16 +00:00
fix reference link
This commit is contained in:
parent
6be60a21eb
commit
2a284f996b
@ -21,7 +21,7 @@
|
|||||||
* [In-depth](js-sdk/3_in_depth.md)
|
* [In-depth](js-sdk/3_in_depth.md)
|
||||||
* [Running app in nodejs](js-sdk/5_run_in_node.md)
|
* [Running app in nodejs](js-sdk/5_run_in_node.md)
|
||||||
* [Running app in browser](js-sdk/4_run_in_browser-1.md)
|
* [Running app in browser](js-sdk/4_run_in_browser-1.md)
|
||||||
* [Api reference](js-sdk/6-reference.md)
|
* [API reference](js-sdk/6-reference.md)
|
||||||
* [Changelog](js-sdk/changelog.md)
|
* [Changelog](js-sdk/changelog.md)
|
||||||
* [Security](knowledge_security.md)
|
* [Security](knowledge_security.md)
|
||||||
* [Tutorials](tutorials_tutorials/README.md)
|
* [Tutorials](tutorials_tutorials/README.md)
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
# Api reference
|
# API reference
|
||||||
|
|
||||||
|
API reference is available at https://fluence.network/fluence-js/
|
||||||
|
@ -1,128 +0,0 @@
|
|||||||
# Class: FluencePeer
|
|
||||||
|
|
||||||
This class implements the Fluence protocol for javascript-based environments.
|
|
||||||
It provides all the necessary features to communicate with Fluence network
|
|
||||||
|
|
||||||
## Table of contents
|
|
||||||
|
|
||||||
### Constructors
|
|
||||||
|
|
||||||
- [constructor](js-sdk/6_reference/classes/FluencePeer.md#constructor)
|
|
||||||
|
|
||||||
### Accessors
|
|
||||||
|
|
||||||
- [connectionInfo](js-sdk/6_reference/classes/FluencePeer.md#connectioninfo)
|
|
||||||
- [internals](js-sdk/6_reference/classes/FluencePeer.md#internals)
|
|
||||||
- [default](js-sdk/6_reference/classes/FluencePeer.md#default)
|
|
||||||
|
|
||||||
### Methods
|
|
||||||
|
|
||||||
- [init](js-sdk/6_reference/classes/FluencePeer.md#init)
|
|
||||||
- [uninit](js-sdk/6_reference/classes/FluencePeer.md#uninit)
|
|
||||||
|
|
||||||
## Constructors
|
|
||||||
|
|
||||||
### constructor
|
|
||||||
|
|
||||||
• **new FluencePeer**()
|
|
||||||
|
|
||||||
Creates a new Fluence Peer instance. Does not start the workflows.
|
|
||||||
In order to work with the Peer it has to be initialized with the `init` method
|
|
||||||
|
|
||||||
#### Defined in
|
|
||||||
|
|
||||||
[internal/FluencePeer.ts:111](https://github.com/fluencelabs/fluence-js/blob/480d630/src/internal/FluencePeer.ts#L111)
|
|
||||||
|
|
||||||
## Accessors
|
|
||||||
|
|
||||||
### connectionInfo
|
|
||||||
|
|
||||||
• `get` **connectionInfo**(): `ConnectionInfo`
|
|
||||||
|
|
||||||
Get the information about Fluence Peer connections
|
|
||||||
|
|
||||||
#### Returns
|
|
||||||
|
|
||||||
`ConnectionInfo`
|
|
||||||
|
|
||||||
#### Defined in
|
|
||||||
|
|
||||||
[internal/FluencePeer.ts:116](https://github.com/fluencelabs/fluence-js/blob/480d630/src/internal/FluencePeer.ts#L116)
|
|
||||||
|
|
||||||
___
|
|
||||||
|
|
||||||
### internals
|
|
||||||
|
|
||||||
• `get` **internals**(): `Object`
|
|
||||||
|
|
||||||
Does not intended to be used manually. Subject to change
|
|
||||||
|
|
||||||
#### Returns
|
|
||||||
|
|
||||||
`Object`
|
|
||||||
|
|
||||||
| Name | Type |
|
|
||||||
| :------ | :------ |
|
|
||||||
| `callServiceHandler` | `CallServiceHandler` |
|
|
||||||
| `initiateFlow` | (`request`: `RequestFlow`) => `Promise`<`void`\> |
|
|
||||||
|
|
||||||
#### Defined in
|
|
||||||
|
|
||||||
[internal/FluencePeer.ts:190](https://github.com/fluencelabs/fluence-js/blob/480d630/src/internal/FluencePeer.ts#L190)
|
|
||||||
|
|
||||||
___
|
|
||||||
|
|
||||||
### default
|
|
||||||
|
|
||||||
• `Static` `get` **default**(): [`FluencePeer`](js-sdk/6_reference/classes/FluencePeer.md)
|
|
||||||
|
|
||||||
Get the default Fluence peer instance. The default peer is used automatically in all the functions generated
|
|
||||||
by the Aqua compiler if not specified otherwise.
|
|
||||||
|
|
||||||
#### Returns
|
|
||||||
|
|
||||||
[`FluencePeer`](js-sdk/6_reference/classes/FluencePeer.md)
|
|
||||||
|
|
||||||
#### Defined in
|
|
||||||
|
|
||||||
[internal/FluencePeer.ts:181](https://github.com/fluencelabs/fluence-js/blob/480d630/src/internal/FluencePeer.ts#L181)
|
|
||||||
|
|
||||||
## Methods
|
|
||||||
|
|
||||||
### init
|
|
||||||
|
|
||||||
▸ **init**(`config?`): `Promise`<`void`\>
|
|
||||||
|
|
||||||
Initializes the peer: starts the Aqua VM, initializes the default call service handlers
|
|
||||||
and (optionally) connect to the Fluence network
|
|
||||||
|
|
||||||
#### Parameters
|
|
||||||
|
|
||||||
| Name | Type | Description |
|
|
||||||
| :------ | :------ | :------ |
|
|
||||||
| `config?` | `PeerConfig` | object specifying peer configuration |
|
|
||||||
|
|
||||||
#### Returns
|
|
||||||
|
|
||||||
`Promise`<`void`\>
|
|
||||||
|
|
||||||
#### Defined in
|
|
||||||
|
|
||||||
[internal/FluencePeer.ts:130](https://github.com/fluencelabs/fluence-js/blob/480d630/src/internal/FluencePeer.ts#L130)
|
|
||||||
|
|
||||||
___
|
|
||||||
|
|
||||||
### uninit
|
|
||||||
|
|
||||||
▸ **uninit**(): `Promise`<`void`\>
|
|
||||||
|
|
||||||
Uninitializes the peer: stops all the underltying workflows, stops the Aqua VM
|
|
||||||
and disconnects from the Fluence network
|
|
||||||
|
|
||||||
#### Returns
|
|
||||||
|
|
||||||
`Promise`<`void`\>
|
|
||||||
|
|
||||||
#### Defined in
|
|
||||||
|
|
||||||
[internal/FluencePeer.ts:172](https://github.com/fluencelabs/fluence-js/blob/480d630/src/internal/FluencePeer.ts#L172)
|
|
@ -1,92 +0,0 @@
|
|||||||
# Interface: CallParams<ArgName\>
|
|
||||||
|
|
||||||
Additional information about a service call
|
|
||||||
|
|
||||||
## Type parameters
|
|
||||||
|
|
||||||
| Name | Type |
|
|
||||||
| :------ | :------ |
|
|
||||||
| `ArgName` | extends `string` \| ``null`` |
|
|
||||||
|
|
||||||
## Table of contents
|
|
||||||
|
|
||||||
### Properties
|
|
||||||
|
|
||||||
- [initPeerId](js-sdk/6_reference/interfaces/CallParams.md#initpeerid)
|
|
||||||
- [particleId](js-sdk/6_reference/interfaces/CallParams.md#particleid)
|
|
||||||
- [signature](js-sdk/6_reference/interfaces/CallParams.md#signature)
|
|
||||||
- [tetraplets](js-sdk/6_reference/interfaces/CallParams.md#tetraplets)
|
|
||||||
- [timeStamp](js-sdk/6_reference/interfaces/CallParams.md#timestamp)
|
|
||||||
- [ttl](js-sdk/6_reference/interfaces/CallParams.md#ttl)
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
### initPeerId
|
|
||||||
|
|
||||||
• **initPeerId**: `string`
|
|
||||||
|
|
||||||
The peer id which created the particle
|
|
||||||
|
|
||||||
#### Defined in
|
|
||||||
|
|
||||||
[internal/commonTypes.ts:36](https://github.com/fluencelabs/fluence-js/blob/480d630/src/internal/commonTypes.ts#L36)
|
|
||||||
|
|
||||||
___
|
|
||||||
|
|
||||||
### particleId
|
|
||||||
|
|
||||||
• **particleId**: `string`
|
|
||||||
|
|
||||||
The identifier of particle which triggered the call
|
|
||||||
|
|
||||||
#### Defined in
|
|
||||||
|
|
||||||
[internal/commonTypes.ts:31](https://github.com/fluencelabs/fluence-js/blob/480d630/src/internal/commonTypes.ts#L31)
|
|
||||||
|
|
||||||
___
|
|
||||||
|
|
||||||
### signature
|
|
||||||
|
|
||||||
• **signature**: `string`
|
|
||||||
|
|
||||||
Particle's signature
|
|
||||||
|
|
||||||
#### Defined in
|
|
||||||
|
|
||||||
[internal/commonTypes.ts:51](https://github.com/fluencelabs/fluence-js/blob/480d630/src/internal/commonTypes.ts#L51)
|
|
||||||
|
|
||||||
___
|
|
||||||
|
|
||||||
### tetraplets
|
|
||||||
|
|
||||||
• **tetraplets**: { [key in string]: SecurityTetraplet[]}
|
|
||||||
|
|
||||||
Security tetraplets
|
|
||||||
|
|
||||||
#### Defined in
|
|
||||||
|
|
||||||
[internal/commonTypes.ts:56](https://github.com/fluencelabs/fluence-js/blob/480d630/src/internal/commonTypes.ts#L56)
|
|
||||||
|
|
||||||
___
|
|
||||||
|
|
||||||
### timeStamp
|
|
||||||
|
|
||||||
• **timeStamp**: `number`
|
|
||||||
|
|
||||||
Particle's timestamp when it was created
|
|
||||||
|
|
||||||
#### Defined in
|
|
||||||
|
|
||||||
[internal/commonTypes.ts:41](https://github.com/fluencelabs/fluence-js/blob/480d630/src/internal/commonTypes.ts#L41)
|
|
||||||
|
|
||||||
___
|
|
||||||
|
|
||||||
### ttl
|
|
||||||
|
|
||||||
• **ttl**: `number`
|
|
||||||
|
|
||||||
Time to live in milliseconds. The time after the particle should be expired
|
|
||||||
|
|
||||||
#### Defined in
|
|
||||||
|
|
||||||
[internal/commonTypes.ts:46](https://github.com/fluencelabs/fluence-js/blob/480d630/src/internal/commonTypes.ts#L46)
|
|
@ -1,134 +0,0 @@
|
|||||||
# @fluencelabs/fluence
|
|
||||||
|
|
||||||
## Table of contents
|
|
||||||
|
|
||||||
### Classes
|
|
||||||
|
|
||||||
- [FluencePeer](js-sdk/6_reference/classes/FluencePeer.md)
|
|
||||||
|
|
||||||
### Interfaces
|
|
||||||
|
|
||||||
- [CallParams](js-sdk/6_reference/interfaces/CallParams.md)
|
|
||||||
|
|
||||||
### Type aliases
|
|
||||||
|
|
||||||
- [AvmLoglevel](js-sdk/6_reference/modules.md#avmloglevel)
|
|
||||||
- [PeerIdB58](js-sdk/6_reference/modules.md#peeridb58)
|
|
||||||
|
|
||||||
### Functions
|
|
||||||
|
|
||||||
- [peerIdFromEd25519SK](js-sdk/6_reference/modules.md#peeridfromed25519sk)
|
|
||||||
- [peerIdToEd25519SK](js-sdk/6_reference/modules.md#peeridtoed25519sk)
|
|
||||||
- [randomPeerId](js-sdk/6_reference/modules.md#randompeerid)
|
|
||||||
- [setLogLevel](js-sdk/6_reference/modules.md#setloglevel)
|
|
||||||
|
|
||||||
## Type aliases
|
|
||||||
|
|
||||||
### AvmLoglevel
|
|
||||||
|
|
||||||
Ƭ **AvmLoglevel**: `LogLevel`
|
|
||||||
|
|
||||||
Enum representing the log level used in Aqua VM.
|
|
||||||
Possible values: 'info', 'trace', 'debug', 'info', 'warn', 'error', 'off';
|
|
||||||
|
|
||||||
#### Defined in
|
|
||||||
|
|
||||||
[internal/FluencePeer.ts:35](https://github.com/fluencelabs/fluence-js/blob/480d630/src/internal/FluencePeer.ts#L35)
|
|
||||||
|
|
||||||
___
|
|
||||||
|
|
||||||
### PeerIdB58
|
|
||||||
|
|
||||||
Ƭ **PeerIdB58**: `string`
|
|
||||||
|
|
||||||
Peer ID's id as a base58 string (multihash/CIDv0).
|
|
||||||
|
|
||||||
#### Defined in
|
|
||||||
|
|
||||||
[internal/commonTypes.ts:22](https://github.com/fluencelabs/fluence-js/blob/480d630/src/internal/commonTypes.ts#L22)
|
|
||||||
|
|
||||||
## Functions
|
|
||||||
|
|
||||||
### peerIdFromEd25519SK
|
|
||||||
|
|
||||||
▸ `Const` **peerIdFromEd25519SK**(`sk`): `Promise`<`PeerId`\>
|
|
||||||
|
|
||||||
Generates a new peer id from base64 string contatining the 32 byte Ed25519S secret key
|
|
||||||
|
|
||||||
#### Parameters
|
|
||||||
|
|
||||||
| Name | Type |
|
|
||||||
| :------ | :------ |
|
|
||||||
| `sk` | `string` |
|
|
||||||
|
|
||||||
#### Returns
|
|
||||||
|
|
||||||
`Promise`<`PeerId`\>
|
|
||||||
|
|
||||||
- Promise with the created Peer Id
|
|
||||||
|
|
||||||
#### Defined in
|
|
||||||
|
|
||||||
[internal/peerIdUtils.ts:26](https://github.com/fluencelabs/fluence-js/blob/480d630/src/internal/peerIdUtils.ts#L26)
|
|
||||||
|
|
||||||
___
|
|
||||||
|
|
||||||
### peerIdToEd25519SK
|
|
||||||
|
|
||||||
▸ `Const` **peerIdToEd25519SK**(`peerId`): `string`
|
|
||||||
|
|
||||||
Converts peer id into base64 string contatining the 32 byte Ed25519S secret key
|
|
||||||
|
|
||||||
#### Parameters
|
|
||||||
|
|
||||||
| Name | Type |
|
|
||||||
| :------ | :------ |
|
|
||||||
| `peerId` | `PeerId` |
|
|
||||||
|
|
||||||
#### Returns
|
|
||||||
|
|
||||||
`string`
|
|
||||||
|
|
||||||
- base64 of Ed25519S secret key
|
|
||||||
|
|
||||||
#### Defined in
|
|
||||||
|
|
||||||
[internal/peerIdUtils.ts:45](https://github.com/fluencelabs/fluence-js/blob/480d630/src/internal/peerIdUtils.ts#L45)
|
|
||||||
|
|
||||||
___
|
|
||||||
|
|
||||||
### randomPeerId
|
|
||||||
|
|
||||||
▸ `Const` **randomPeerId**(): `Promise`<`PeerId`\>
|
|
||||||
|
|
||||||
Generates a new peer id with random private key
|
|
||||||
|
|
||||||
#### Returns
|
|
||||||
|
|
||||||
`Promise`<`PeerId`\>
|
|
||||||
|
|
||||||
- Promise with the created Peer Id
|
|
||||||
|
|
||||||
#### Defined in
|
|
||||||
|
|
||||||
[internal/peerIdUtils.ts:59](https://github.com/fluencelabs/fluence-js/blob/480d630/src/internal/peerIdUtils.ts#L59)
|
|
||||||
|
|
||||||
___
|
|
||||||
|
|
||||||
### setLogLevel
|
|
||||||
|
|
||||||
▸ `Const` **setLogLevel**(`level`): `void`
|
|
||||||
|
|
||||||
#### Parameters
|
|
||||||
|
|
||||||
| Name | Type |
|
|
||||||
| :------ | :------ |
|
|
||||||
| `level` | `LogLevelDesc` |
|
|
||||||
|
|
||||||
#### Returns
|
|
||||||
|
|
||||||
`void`
|
|
||||||
|
|
||||||
#### Defined in
|
|
||||||
|
|
||||||
[index.ts:23](https://github.com/fluencelabs/fluence-js/blob/480d630/src/index.ts#L23)
|
|
Loading…
x
Reference in New Issue
Block a user