This repository was archived by the owner on Jul 10, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,3 +7,4 @@ node_modules/ | |
|
|
||
| # Build directory | ||
| **/dist | ||
| **/public | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,7 +15,6 @@ | |
| */ | ||
|
|
||
| import { JSONValue } from "../commonTypes.js"; | ||
| import { IFluenceInternalApi } from "../fluenceClient.js"; | ||
|
|
||
| import { | ||
| FnConfig, | ||
|
|
@@ -38,11 +37,12 @@ export type PassedArgs = { [key: string]: JSONValue | ArgCallbackFunction }; | |
| /** | ||
| * Arguments for callAquaFunction function | ||
| */ | ||
| // TODO: move to js-client side | ||
| export interface CallAquaFunctionArgs { | ||
| /** | ||
| * Peer to call the function on | ||
| */ | ||
| peer: IFluenceInternalApi; | ||
| peer: unknown; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that's a little weird
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be refactored and moved to JS-client. Previous type was essentially the same. I will add |
||
|
|
||
| /** | ||
| * Function definition | ||
|
|
@@ -79,7 +79,7 @@ export interface RegisterServiceArgs { | |
| /** | ||
| * Peer to register the service on | ||
| */ | ||
| peer: IFluenceInternalApi; | ||
| peer: unknown; | ||
|
|
||
| /** | ||
| * Service definition | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,18 @@ | |
| * limitations under the License. | ||
| */ | ||
|
|
||
| import type { Node } from "./commonTypes.js"; | ||
| /** | ||
| * Peer ID's id as a base58 string (multihash/CIDv0). | ||
| */ | ||
| export type PeerIdB58 = string; | ||
|
|
||
| /** | ||
| * Node of the Fluence network specified as a pair of node's multiaddr and it's peer id | ||
| */ | ||
| export type Node = { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe rename since it's private now? like, Peer or something |
||
| peerId: PeerIdB58; | ||
| multiaddr: string; | ||
| }; | ||
|
|
||
| /** | ||
| * A node in Fluence network a client can connect to. | ||
|
|
@@ -37,64 +48,6 @@ export type KeyPairOptions = { | |
| source: "random" | Uint8Array; | ||
| }; | ||
|
|
||
| /** | ||
| * Configuration used when initiating Fluence Client | ||
| */ | ||
| export interface ClientConfig { | ||
| /** | ||
| * Specify the KeyPair to be used to identify the Fluence Peer. | ||
| * Will be generated randomly if not specified | ||
| */ | ||
| keyPair?: KeyPairOptions; | ||
|
|
||
| /** | ||
| * Options to configure the connection to the Fluence network | ||
| */ | ||
| connectionOptions?: { | ||
| /** | ||
| * When the peer established the connection to the network it sends a ping-like message to check if it works correctly. | ||
| * The options allows to specify the timeout for that message in milliseconds. | ||
| * If not specified the default timeout will be used | ||
| */ | ||
| skipCheckConnection?: boolean; | ||
|
|
||
| /** | ||
| * The dialing timeout in milliseconds | ||
| */ | ||
| dialTimeoutMs?: number; | ||
|
|
||
| /** | ||
| * The maximum number of inbound streams for the libp2p node. | ||
| * Default: 1024 | ||
| */ | ||
| maxInboundStreams?: number; | ||
|
|
||
| /** | ||
| * The maximum number of outbound streams for the libp2p node. | ||
| * Default: 1024 | ||
| */ | ||
| maxOutboundStreams?: number; | ||
| }; | ||
|
|
||
| /** | ||
| * Sets the default TTL for all particles originating from the peer with no TTL specified. | ||
| * If the originating particle's TTL is defined then that value will be used | ||
| * If the option is not set default TTL will be 7000 | ||
| */ | ||
| defaultTtlMs?: number; | ||
|
|
||
| /** | ||
| * Enables\disabled various debugging features | ||
| */ | ||
| debug?: { | ||
| /** | ||
| * If set to true, newly initiated particle ids will be printed to console. | ||
| * Useful to see what particle id is responsible for aqua function | ||
| */ | ||
| printParticleId?: boolean; | ||
| }; | ||
| } | ||
|
|
||
| /** | ||
| * Fluence JS Client connection states as string literals | ||
| */ | ||
|
|
@@ -153,3 +106,66 @@ export interface IFluenceClient extends IFluenceInternalApi { | |
| */ | ||
| getRelayPeerId(): string; | ||
| } | ||
|
|
||
| /** | ||
| * Configuration used when initiating Fluence Client | ||
| */ | ||
| export interface ClientConfig { | ||
| /** | ||
| * Specify the KeyPair to be used to identify the Fluence Peer. | ||
| * Will be generated randomly if not specified | ||
| */ | ||
| keyPair?: KeyPairOptions; | ||
|
|
||
| /** | ||
| * Options to configure the connection to the Fluence network | ||
| */ | ||
| connectionOptions?: { | ||
| /** | ||
| * When the peer established the connection to the network it sends a ping-like message to check if it works correctly. | ||
| * The options allows to specify the timeout for that message in milliseconds. | ||
| * If not specified the default timeout will be used | ||
| */ | ||
| skipCheckConnection?: boolean; | ||
|
|
||
| /** | ||
| * The dialing timeout in milliseconds | ||
| */ | ||
| dialTimeoutMs?: number; | ||
|
|
||
| /** | ||
| * The maximum number of inbound streams for the libp2p node. | ||
| * Default: 1024 | ||
| */ | ||
| maxInboundStreams?: number; | ||
|
|
||
| /** | ||
| * The maximum number of outbound streams for the libp2p node. | ||
| * Default: 1024 | ||
| */ | ||
| maxOutboundStreams?: number; | ||
| }; | ||
|
|
||
| /** | ||
| * Sets the default TTL for all particles originating from the peer with no TTL specified. | ||
| * If the originating particle's TTL is defined then that value will be used | ||
| * If the option is not set default TTL will be 7000 | ||
| */ | ||
| defaultTtlMs?: number; | ||
|
|
||
| /** | ||
| * Property for passing custom CDN Url to load dependencies from browser. https://unpkg.com used by default | ||
| */ | ||
| CDNUrl?: string; | ||
|
|
||
| /** | ||
| * Enables\disabled various debugging features | ||
| */ | ||
| debug?: { | ||
| /** | ||
| * If set to true, newly initiated particle ids will be printed to console. | ||
| * Useful to see what particle id is responsible for aqua function | ||
| */ | ||
| printParticleId?: boolean; | ||
| }; | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will URL be reported in an error, if it is not available?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will give you runtime error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JS-client will throw when you try to run it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will the error message include URL? I think it should