@audius/sdk 3.0.3-beta.83 → 3.0.3-beta.84
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/ServiceProvider.d.ts +1 -31
- package/dist/index.cjs.js +69 -872
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +74 -876
- package/dist/index.esm.js.map +1 -1
- package/dist/legacy.js +69 -872
- package/dist/legacy.js.map +1 -1
- package/dist/native-libs.js +1955 -2757
- package/dist/native-libs.js.map +1 -1
- package/dist/services/creatorNode/index.d.ts +0 -1
- package/dist/web-libs.js +69 -872
- package/dist/web-libs.js.map +1 -1
- package/package.json +2 -2
- package/src/api/ServiceProvider.ts +1 -108
- package/src/services/creatorNode/index.ts +0 -1
- package/dist/services/creatorNode/CreatorNodeSelection.d.ts +0 -96
- package/dist/services/creatorNode/CreatorNodeSelection.test.d.ts +0 -1
- package/src/services/creatorNode/CreatorNodeSelection.test.ts +0 -1022
- package/src/services/creatorNode/CreatorNodeSelection.ts +0 -428
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
import { Base, BaseConstructorArgs } from './base';
|
|
2
|
-
import type {
|
|
3
|
-
declare type AutoSelectCreatorNodesConfig = {
|
|
4
|
-
numberOfNodes?: number;
|
|
5
|
-
whitelist?: Nullable<Set<string>>;
|
|
6
|
-
blacklist?: Nullable<Set<string>>;
|
|
7
|
-
performSyncCheck?: boolean;
|
|
8
|
-
timeout?: number;
|
|
9
|
-
equivalencyDelta?: number;
|
|
10
|
-
preferHigherPatchForPrimary?: boolean;
|
|
11
|
-
preferHigherPatchForSecondaries?: boolean;
|
|
12
|
-
log?: boolean;
|
|
13
|
-
getServices?: () => Promise<string[]>;
|
|
14
|
-
};
|
|
2
|
+
import type { ServiceWithEndpoint } from '../utils';
|
|
15
3
|
/**
|
|
16
4
|
* API methods to interact with Audius service providers.
|
|
17
5
|
* Types of services include:
|
|
@@ -37,23 +25,6 @@ export declare class ServiceProvider extends Base {
|
|
|
37
25
|
blockNumber: number;
|
|
38
26
|
delegateOwnerWallet: any;
|
|
39
27
|
}[]>;
|
|
40
|
-
/**
|
|
41
|
-
* Fetches healthy Content Nodes filtered down to a given whitelist and blacklist
|
|
42
|
-
*/
|
|
43
|
-
getSelectableCreatorNodes(whitelist?: Nullable<Set<string>>, // whether or not to include only specified nodes (default no whiltelist)
|
|
44
|
-
blacklist?: Nullable<Set<string>>, // whether or not to exclude any nodes (default no blacklist)
|
|
45
|
-
timeout?: number): Promise<{
|
|
46
|
-
[id: string]: any;
|
|
47
|
-
}>;
|
|
48
|
-
/**
|
|
49
|
-
* Fetches healthy Content Nodes and autoselects a primary
|
|
50
|
-
* and two secondaries.
|
|
51
|
-
*/
|
|
52
|
-
autoSelectCreatorNodes({ numberOfNodes, whitelist, blacklist, performSyncCheck, timeout, equivalencyDelta, preferHigherPatchForPrimary, preferHigherPatchForSecondaries, log, getServices }: AutoSelectCreatorNodesConfig): Promise<{
|
|
53
|
-
primary: string;
|
|
54
|
-
secondaries: string[];
|
|
55
|
-
services: Record<string, any>;
|
|
56
|
-
}>;
|
|
57
28
|
/**
|
|
58
29
|
* Selects numNodes storage nodes from the list of registered storage nodes on chain, optionally ordering them (descending) by rendezvous score.
|
|
59
30
|
* TODO: This might want to handle blocklist/allowlist, latency checks, health checks, etc... but for now it just uses all nodes.
|
|
@@ -80,4 +51,3 @@ export declare class ServiceProvider extends Base {
|
|
|
80
51
|
useWhitelist?: boolean;
|
|
81
52
|
}): Promise<string[]>;
|
|
82
53
|
}
|
|
83
|
-
export {};
|