dcl-catalyst-client 15.0.0 → 17.0.0
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/.eslintignore +2 -1
- package/.github/workflows/build-and-publish.yml +13 -74
- package/README.md +50 -44
- package/coverage/clover.xml +352 -442
- package/coverage/coverage-final.json +9 -14
- package/coverage/lcov-report/index.html +47 -32
- package/coverage/lcov.info +656 -892
- package/dist/package.json +77 -0
- package/package.json +16 -19
- package/scripts/generate-snapshots.ts +49 -0
- package/dist/CatalystAPI.d.ts +0 -5
- package/dist/CatalystAPI.js +0 -3
- package/dist/CatalystAPI.js.map +0 -1
- package/dist/CatalystClient.d.ts +0 -46
- package/dist/CatalystClient.js +0 -93
- package/dist/CatalystClient.js.map +0 -1
- package/dist/CatalystsList.d.ts +0 -13
- package/dist/CatalystsList.js +0 -78
- package/dist/CatalystsList.js.map +0 -1
- package/dist/ContentAPI.d.ts +0 -30
- package/dist/ContentAPI.js +0 -3
- package/dist/ContentAPI.js.map +0 -1
- package/dist/ContentClient.d.ts +0 -53
- package/dist/ContentClient.js +0 -175
- package/dist/ContentClient.js.map +0 -1
- package/dist/LambdasAPI.d.ts +0 -38
- package/dist/LambdasAPI.js +0 -3
- package/dist/LambdasAPI.js.map +0 -1
- package/dist/LambdasClient.d.ts +0 -25
- package/dist/LambdasClient.js +0 -112
- package/dist/LambdasClient.js.map +0 -1
- package/dist/index.d.ts +0 -7
- package/dist/index.js +0 -24
- package/dist/index.js.map +0 -1
- package/dist/utils/CatalystClientBuilder.d.ts +0 -5
- package/dist/utils/CatalystClientBuilder.js +0 -53
- package/dist/utils/CatalystClientBuilder.js.map +0 -1
- package/dist/utils/DeploymentBuilder.d.ts +0 -48
- package/dist/utils/DeploymentBuilder.js +0 -180
- package/dist/utils/DeploymentBuilder.js.map +0 -1
- package/dist/utils/Environment.d.ts +0 -1
- package/dist/utils/Environment.js +0 -5
- package/dist/utils/Environment.js.map +0 -1
- package/dist/utils/Helper.d.ts +0 -63
- package/dist/utils/Helper.js +0 -276
- package/dist/utils/Helper.js.map +0 -1
- package/dist/utils/catalystList.d.ts +0 -11
- package/dist/utils/catalystList.js +0 -81
- package/dist/utils/catalystList.js.map +0 -1
- package/dist/utils/common.d.ts +0 -1
- package/dist/utils/common.js +0 -12
- package/dist/utils/common.js.map +0 -1
- package/dist/utils/fetcher.d.ts +0 -11
- package/dist/utils/fetcher.js +0 -57
- package/dist/utils/fetcher.js.map +0 -1
- package/dist/utils/index.d.ts +0 -4
- package/dist/utils/index.js +0 -21
- package/dist/utils/index.js.map +0 -1
- package/scripts/generate-catalysts-list.ts +0 -32
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dcl-catalyst-client",
|
|
3
|
+
"version": "0.0.0-development",
|
|
4
|
+
"commit": "Unknown",
|
|
5
|
+
"description": "A client to query and perform changes on Decentraland's catalyst servers",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"typings": "./dist/index.d.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"prebuild": "rm -rf dist",
|
|
10
|
+
"generate:snapshots": "ts-node -T scripts/generate-snapshots.ts",
|
|
11
|
+
"build": "tsc --project tsconfig-build.json && yarn generate:snapshots",
|
|
12
|
+
"prewatch": "rm -rf dist",
|
|
13
|
+
"watch": "tsc --watch --project tsconfig-build.json",
|
|
14
|
+
"test": "jest --forceExit --detectOpenHandles --coverage --verbose",
|
|
15
|
+
"lint:fix": "eslint '**/*.{js,ts,tsx}' --quiet --fix",
|
|
16
|
+
"lint:check": "eslint '**/*.{js,ts,tsx}' --quiet"
|
|
17
|
+
},
|
|
18
|
+
"nyc": {
|
|
19
|
+
"all": true,
|
|
20
|
+
"include": [
|
|
21
|
+
"src"
|
|
22
|
+
],
|
|
23
|
+
"extension": [
|
|
24
|
+
".ts"
|
|
25
|
+
],
|
|
26
|
+
"reporter": [
|
|
27
|
+
"text-summary"
|
|
28
|
+
],
|
|
29
|
+
"sourceMap": true,
|
|
30
|
+
"instrument": true
|
|
31
|
+
},
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "git+https://github.com/decentraland/catalyst-client.git"
|
|
35
|
+
},
|
|
36
|
+
"keywords": [
|
|
37
|
+
"decentraland"
|
|
38
|
+
],
|
|
39
|
+
"author": "Decentraland",
|
|
40
|
+
"license": "Apache-2.0",
|
|
41
|
+
"bugs": {
|
|
42
|
+
"url": "https://github.com/decentraland/catalyst-client/issues"
|
|
43
|
+
},
|
|
44
|
+
"homepage": "https://github.com/decentraland/catalyst-client#readme",
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@dcl/crypto": "^3.4.0",
|
|
47
|
+
"@dcl/hashing": "^1.1.0",
|
|
48
|
+
"@dcl/protocol": "^1.0.0-4747376947.commit-d770e0d",
|
|
49
|
+
"@dcl/schemas": "^6.4.2",
|
|
50
|
+
"@well-known-components/fetch-component": "^1.0.0",
|
|
51
|
+
"cookie": "^0.5.0",
|
|
52
|
+
"cross-fetch": "^3.1.5",
|
|
53
|
+
"form-data": "^4.0.0"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@dcl/eslint-config": "^1.0.6",
|
|
57
|
+
"@types/form-data": "^2.5.0",
|
|
58
|
+
"@well-known-components/env-config-provider": "^1.1.1",
|
|
59
|
+
"@well-known-components/http-server": "^1.1.6",
|
|
60
|
+
"@well-known-components/interfaces": "^1.4.0",
|
|
61
|
+
"@well-known-components/logger": "^3.0.0",
|
|
62
|
+
"@well-known-components/test-helpers": "^1.2.1",
|
|
63
|
+
"busboy": "^1.6.0",
|
|
64
|
+
"ts-node": "^10.4.0",
|
|
65
|
+
"typescript": "^4.4.4"
|
|
66
|
+
},
|
|
67
|
+
"prettier": {
|
|
68
|
+
"printWidth": 120,
|
|
69
|
+
"semi": false,
|
|
70
|
+
"singleQuote": true,
|
|
71
|
+
"trailingComma": "none",
|
|
72
|
+
"tabWidth": 2
|
|
73
|
+
},
|
|
74
|
+
"optionalDependencies": {
|
|
75
|
+
"ethers": "6.2.3"
|
|
76
|
+
}
|
|
77
|
+
}
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dcl-catalyst-client",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.0.0",
|
|
4
|
+
"commit": "c0d519f8ad897f2b323c847dc9b2f9996882c381",
|
|
4
5
|
"description": "A client to query and perform changes on Decentraland's catalyst servers",
|
|
5
6
|
"main": "dist/index.js",
|
|
6
7
|
"typings": "./dist/index.d.ts",
|
|
7
8
|
"scripts": {
|
|
8
|
-
"prebuild": "rm -rf dist
|
|
9
|
-
"
|
|
10
|
-
"build": "tsc --project tsconfig-build.json",
|
|
9
|
+
"prebuild": "rm -rf dist",
|
|
10
|
+
"generate:snapshots": "ts-node -T scripts/generate-snapshots.ts",
|
|
11
|
+
"build": "tsc --project tsconfig-build.json && yarn generate:snapshots",
|
|
11
12
|
"prewatch": "rm -rf dist",
|
|
12
13
|
"watch": "tsc --watch --project tsconfig-build.json",
|
|
13
14
|
"test": "jest --forceExit --detectOpenHandles --coverage --verbose",
|
|
14
|
-
"commit-msg": "validate-commit-msg",
|
|
15
15
|
"lint:fix": "eslint '**/*.{js,ts,tsx}' --quiet --fix",
|
|
16
16
|
"lint:check": "eslint '**/*.{js,ts,tsx}' --quiet"
|
|
17
17
|
},
|
|
@@ -43,31 +43,26 @@
|
|
|
43
43
|
},
|
|
44
44
|
"homepage": "https://github.com/decentraland/catalyst-client#readme",
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@dcl/
|
|
46
|
+
"@dcl/crypto": "^3.4.0",
|
|
47
47
|
"@dcl/hashing": "^1.1.0",
|
|
48
|
+
"@dcl/protocol": "^1.0.0-4747376947.commit-d770e0d",
|
|
48
49
|
"@dcl/schemas": "^6.4.2",
|
|
49
|
-
"@
|
|
50
|
+
"@well-known-components/fetch-component": "^1.0.0",
|
|
50
51
|
"cookie": "^0.5.0",
|
|
51
52
|
"cross-fetch": "^3.1.5",
|
|
52
|
-
"dcl-catalyst-commons": "^9.0.6",
|
|
53
53
|
"form-data": "^4.0.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@dcl/eslint-config": "^1.0.6",
|
|
57
|
-
"@types/
|
|
57
|
+
"@types/form-data": "^2.5.0",
|
|
58
58
|
"@well-known-components/env-config-provider": "^1.1.1",
|
|
59
|
-
"@well-known-components/http-server": "^1.1.
|
|
60
|
-
"@well-known-components/interfaces": "^1.
|
|
59
|
+
"@well-known-components/http-server": "^1.1.6",
|
|
60
|
+
"@well-known-components/interfaces": "^1.4.0",
|
|
61
61
|
"@well-known-components/logger": "^3.0.0",
|
|
62
62
|
"@well-known-components/test-helpers": "^1.2.1",
|
|
63
|
-
"busboy": "^
|
|
64
|
-
"isomorphic-fetch": "^3.0.0",
|
|
65
|
-
"jest": "^27.3.1",
|
|
66
|
-
"ts-jest": "^27.0.7",
|
|
67
|
-
"ts-mockito": "^2.6.1",
|
|
63
|
+
"busboy": "^1.6.0",
|
|
68
64
|
"ts-node": "^10.4.0",
|
|
69
|
-
"typescript": "^4.4.4"
|
|
70
|
-
"validate-commit-msg": "^1.1.3"
|
|
65
|
+
"typescript": "^4.4.4"
|
|
71
66
|
},
|
|
72
67
|
"prettier": {
|
|
73
68
|
"printWidth": 120,
|
|
@@ -76,5 +71,7 @@
|
|
|
76
71
|
"trailingComma": "none",
|
|
77
72
|
"tabWidth": 2
|
|
78
73
|
},
|
|
79
|
-
"
|
|
74
|
+
"optionalDependencies": {
|
|
75
|
+
"ethers": "6.2.3"
|
|
76
|
+
}
|
|
80
77
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { JsonRpcProvider } from 'ethers'
|
|
2
|
+
import fs from 'fs'
|
|
3
|
+
import { getCatalystServersFromDAO, getNameDenylistFromContract, getPoiFromContract } from '../src/contracts'
|
|
4
|
+
|
|
5
|
+
async function main(): Promise<void> {
|
|
6
|
+
console.log('Updating cache')
|
|
7
|
+
|
|
8
|
+
const providers = {
|
|
9
|
+
mainnet: new JsonRpcProvider('https://rpc.decentraland.org/mainnet?project=catalyst-client-build'),
|
|
10
|
+
goerli: new JsonRpcProvider('https://rpc.decentraland.org/goerli?project=catalyst-client-build'),
|
|
11
|
+
polygon: new JsonRpcProvider('https://rpc.decentraland.org/polygon?project=catalyst-client-build'),
|
|
12
|
+
mumbai: new JsonRpcProvider('https://rpc.decentraland.org/mumbai?project=catalyst-client-build')
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async function getDenylists() {
|
|
16
|
+
const [mainnet] = await Promise.all([getNameDenylistFromContract('mainnet', providers.mainnet)])
|
|
17
|
+
return { mainnet }
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
async function getCatalysts() {
|
|
21
|
+
const [mainnet, goerli] = await Promise.all([
|
|
22
|
+
getCatalystServersFromDAO('mainnet', providers.mainnet),
|
|
23
|
+
getCatalystServersFromDAO('goerli', providers.goerli)
|
|
24
|
+
])
|
|
25
|
+
return { mainnet, goerli }
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
async function getPois() {
|
|
29
|
+
const [polygon, mumbai] = await Promise.all([
|
|
30
|
+
getPoiFromContract('polygon', providers.polygon),
|
|
31
|
+
getPoiFromContract('mumbai', providers.mumbai)
|
|
32
|
+
])
|
|
33
|
+
return { polygon, mumbai }
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const content = {
|
|
37
|
+
catalysts: await getCatalysts(),
|
|
38
|
+
nameDenylist: await getDenylists(),
|
|
39
|
+
pois: await getPois()
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const s = `export const cache = ${JSON.stringify(content, null, 4)}`
|
|
43
|
+
|
|
44
|
+
await fs.promises.writeFile('src/contracts-snapshots/data.ts', Buffer.from(s))
|
|
45
|
+
|
|
46
|
+
console.log('Cache updated')
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
main().catch((error) => console.error('Failed to update the catalyst list', error))
|
package/dist/CatalystAPI.d.ts
DELETED
package/dist/CatalystAPI.js
DELETED
package/dist/CatalystAPI.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CatalystAPI.js","sourceRoot":"","sources":["../src/CatalystAPI.ts"],"names":[],"mappings":""}
|
package/dist/CatalystClient.d.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { Entity } from '@dcl/schemas';
|
|
3
|
-
import { HealthStatus } from 'dcl-catalyst-commons';
|
|
4
|
-
import { CatalystAPI } from './CatalystAPI';
|
|
5
|
-
import { BuildEntityOptions, BuildEntityWithoutFilesOptions } from './ContentClient';
|
|
6
|
-
import { EmotesFilters, OwnedItems, ServerMetadata, WearablesFilters } from './LambdasAPI';
|
|
7
|
-
import { DeploymentBuilder, DeploymentData, DeploymentPreparationData, IFetchComponent, RequestOptions } from './utils';
|
|
8
|
-
export type CatalystClientOptions = {
|
|
9
|
-
catalystUrl: string;
|
|
10
|
-
fetcher?: IFetchComponent;
|
|
11
|
-
deploymentBuilderClass?: typeof DeploymentBuilder;
|
|
12
|
-
};
|
|
13
|
-
export declare class CatalystClient implements CatalystAPI {
|
|
14
|
-
private readonly contentClient;
|
|
15
|
-
private readonly lambdasClient;
|
|
16
|
-
private readonly catalystUrl;
|
|
17
|
-
constructor(options: CatalystClientOptions);
|
|
18
|
-
buildEntity(options: BuildEntityOptions): Promise<DeploymentPreparationData>;
|
|
19
|
-
buildEntityWithoutNewFiles(options: BuildEntityWithoutFilesOptions): Promise<DeploymentPreparationData>;
|
|
20
|
-
/** @deprecated use deploy instead */
|
|
21
|
-
deployEntity(deployData: DeploymentData, fix?: boolean, options?: RequestOptions): Promise<number>;
|
|
22
|
-
deploy(deployData: DeploymentData, options?: RequestOptions): Promise<unknown>;
|
|
23
|
-
fetchEntitiesByPointers(pointers: string[], options?: RequestOptions): Promise<Entity[]>;
|
|
24
|
-
fetchEntitiesByIds(ids: string[], options?: RequestOptions): Promise<Entity[]>;
|
|
25
|
-
fetchEntityById(id: string, options?: RequestOptions): Promise<Entity>;
|
|
26
|
-
downloadContent(contentHash: string, options?: RequestOptions): Promise<Buffer>;
|
|
27
|
-
fetchProfiles(ethAddresses: string[], options?: RequestOptions): Promise<any[]>;
|
|
28
|
-
fetchWearables(filters: WearablesFilters, options?: RequestOptions): Promise<any[]>;
|
|
29
|
-
fetchOwnedWearables<B extends boolean>(ethAddress: string, includeDefinitions: B, options?: RequestOptions): Promise<OwnedItems<B>>;
|
|
30
|
-
fetchOwnedThirdPartyWearables<B extends boolean>(ethAddress: string, thirdPartyId: string, includeDefinitions: B, options?: RequestOptions): Promise<OwnedItems<B>>;
|
|
31
|
-
fetchEmotes(filters: EmotesFilters, options?: RequestOptions): Promise<any[]>;
|
|
32
|
-
fetchOwnedEmotes<B extends boolean>(ethAddress: string, includeDefinitions: B, options?: RequestOptions): Promise<OwnedItems<B>>;
|
|
33
|
-
fetchOwnedThirdPartyEmotes<B extends boolean>(ethAddress: string, thirdPartyId: string, includeDefinitions: B, options?: RequestOptions): Promise<OwnedItems<B>>;
|
|
34
|
-
fetchCatalystsApprovedByDAO(options?: RequestOptions): Promise<ServerMetadata[]>;
|
|
35
|
-
fetchLambdasStatus(options?: RequestOptions): Promise<{
|
|
36
|
-
contentServerUrl: string;
|
|
37
|
-
}>;
|
|
38
|
-
fetchPeerHealth(options?: RequestOptions): Promise<Record<string, HealthStatus>>;
|
|
39
|
-
getCatalystUrl(): string;
|
|
40
|
-
getContentUrl(): string;
|
|
41
|
-
getLambdasUrl(): string;
|
|
42
|
-
static connectedToCatalystIn(options: CatalystConnectOptions): Promise<CatalystClient>;
|
|
43
|
-
}
|
|
44
|
-
export type CatalystConnectOptions = {
|
|
45
|
-
network: 'mainnet' | 'goerli';
|
|
46
|
-
};
|
package/dist/CatalystClient.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CatalystClient = void 0;
|
|
4
|
-
const ContentClient_1 = require("./ContentClient");
|
|
5
|
-
const LambdasClient_1 = require("./LambdasClient");
|
|
6
|
-
const utils_1 = require("./utils");
|
|
7
|
-
const CatalystClientBuilder_1 = require("./utils/CatalystClientBuilder");
|
|
8
|
-
class CatalystClient {
|
|
9
|
-
constructor(options) {
|
|
10
|
-
this.catalystUrl = (0, utils_1.sanitizeUrl)(options.catalystUrl);
|
|
11
|
-
const fetcher = options.fetcher
|
|
12
|
-
? options.fetcher
|
|
13
|
-
: (0, utils_1.createFetchComponent)({ headers: (0, utils_1.getHeadersWithUserAgent)('catalyst-client') });
|
|
14
|
-
this.contentClient = new ContentClient_1.ContentClient({
|
|
15
|
-
contentUrl: this.catalystUrl + '/content',
|
|
16
|
-
fetcher: fetcher,
|
|
17
|
-
deploymentBuilderClass: options.deploymentBuilderClass
|
|
18
|
-
});
|
|
19
|
-
this.lambdasClient = new LambdasClient_1.LambdasClient({
|
|
20
|
-
lambdasUrl: this.catalystUrl + '/lambdas',
|
|
21
|
-
fetcher: fetcher
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
buildEntity(options) {
|
|
25
|
-
return this.contentClient.buildEntity(options);
|
|
26
|
-
}
|
|
27
|
-
buildEntityWithoutNewFiles(options) {
|
|
28
|
-
return this.contentClient.buildEntityWithoutNewFiles(options);
|
|
29
|
-
}
|
|
30
|
-
/** @deprecated use deploy instead */
|
|
31
|
-
deployEntity(deployData, fix = false, options) {
|
|
32
|
-
return this.contentClient.deployEntity(deployData, fix, options);
|
|
33
|
-
}
|
|
34
|
-
deploy(deployData, options) {
|
|
35
|
-
return this.contentClient.deploy(deployData, options);
|
|
36
|
-
}
|
|
37
|
-
fetchEntitiesByPointers(pointers, options) {
|
|
38
|
-
return this.contentClient.fetchEntitiesByPointers(pointers, options);
|
|
39
|
-
}
|
|
40
|
-
fetchEntitiesByIds(ids, options) {
|
|
41
|
-
return this.contentClient.fetchEntitiesByIds(ids, options);
|
|
42
|
-
}
|
|
43
|
-
fetchEntityById(id, options) {
|
|
44
|
-
return this.contentClient.fetchEntityById(id, options);
|
|
45
|
-
}
|
|
46
|
-
downloadContent(contentHash, options) {
|
|
47
|
-
return this.contentClient.downloadContent(contentHash, options);
|
|
48
|
-
}
|
|
49
|
-
fetchProfiles(ethAddresses, options) {
|
|
50
|
-
return this.lambdasClient.fetchProfiles(ethAddresses, options);
|
|
51
|
-
}
|
|
52
|
-
fetchWearables(filters, options) {
|
|
53
|
-
return this.lambdasClient.fetchWearables(filters, options);
|
|
54
|
-
}
|
|
55
|
-
fetchOwnedWearables(ethAddress, includeDefinitions, options) {
|
|
56
|
-
return this.lambdasClient.fetchOwnedWearables(ethAddress, includeDefinitions, options);
|
|
57
|
-
}
|
|
58
|
-
fetchOwnedThirdPartyWearables(ethAddress, thirdPartyId, includeDefinitions, options) {
|
|
59
|
-
return this.lambdasClient.fetchOwnedThirdPartyWearables(ethAddress, thirdPartyId, includeDefinitions, options);
|
|
60
|
-
}
|
|
61
|
-
fetchEmotes(filters, options) {
|
|
62
|
-
return this.lambdasClient.fetchEmotes(filters, options);
|
|
63
|
-
}
|
|
64
|
-
fetchOwnedEmotes(ethAddress, includeDefinitions, options) {
|
|
65
|
-
return this.lambdasClient.fetchOwnedEmotes(ethAddress, includeDefinitions, options);
|
|
66
|
-
}
|
|
67
|
-
fetchOwnedThirdPartyEmotes(ethAddress, thirdPartyId, includeDefinitions, options) {
|
|
68
|
-
return this.lambdasClient.fetchOwnedThirdPartyEmotes(ethAddress, thirdPartyId, includeDefinitions, options);
|
|
69
|
-
}
|
|
70
|
-
fetchCatalystsApprovedByDAO(options) {
|
|
71
|
-
return this.lambdasClient.fetchCatalystsApprovedByDAO(options);
|
|
72
|
-
}
|
|
73
|
-
fetchLambdasStatus(options) {
|
|
74
|
-
return this.lambdasClient.fetchLambdasStatus(options);
|
|
75
|
-
}
|
|
76
|
-
fetchPeerHealth(options) {
|
|
77
|
-
return this.lambdasClient.fetchPeerHealth(options);
|
|
78
|
-
}
|
|
79
|
-
getCatalystUrl() {
|
|
80
|
-
return this.catalystUrl;
|
|
81
|
-
}
|
|
82
|
-
getContentUrl() {
|
|
83
|
-
return this.contentClient.getContentUrl();
|
|
84
|
-
}
|
|
85
|
-
getLambdasUrl() {
|
|
86
|
-
return this.lambdasClient.getLambdasUrl();
|
|
87
|
-
}
|
|
88
|
-
static connectedToCatalystIn(options) {
|
|
89
|
-
return (0, CatalystClientBuilder_1.clientConnectedToCatalystIn)(options);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
exports.CatalystClient = CatalystClient;
|
|
93
|
-
//# sourceMappingURL=CatalystClient.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CatalystClient.js","sourceRoot":"","sources":["../src/CatalystClient.ts"],"names":[],"mappings":";;;AAGA,mDAAmG;AAEnG,mDAA+C;AAC/C,mCASgB;AAChB,yEAA2E;AAQ3E,MAAa,cAAc;IAKzB,YAAY,OAA8B;QACxC,IAAI,CAAC,WAAW,GAAG,IAAA,mBAAW,EAAC,OAAO,CAAC,WAAW,CAAC,CAAA;QACnD,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO;YAC7B,CAAC,CAAC,OAAO,CAAC,OAAO;YACjB,CAAC,CAAC,IAAA,4BAAoB,EAAC,EAAE,OAAO,EAAE,IAAA,+BAAuB,EAAC,iBAAiB,CAAC,EAAE,CAAC,CAAA;QACjF,IAAI,CAAC,aAAa,GAAG,IAAI,6BAAa,CAAC;YACrC,UAAU,EAAE,IAAI,CAAC,WAAW,GAAG,UAAU;YACzC,OAAO,EAAE,OAAO;YAChB,sBAAsB,EAAE,OAAO,CAAC,sBAAsB;SACvD,CAAC,CAAA;QACF,IAAI,CAAC,aAAa,GAAG,IAAI,6BAAa,CAAC;YACrC,UAAU,EAAE,IAAI,CAAC,WAAW,GAA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AAO,CAAC,CAAA;IACpD,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,WAAW,CAAA;IACzB,CAAC;IAED,aAAa;QACX,OAAO,IAAI,CAAC,aAAa,CAAC,aAAa,EAAE,CAAA;IAC3C,CAAC;IAED,aAAa;QACX,OAAO,IAAI,CAAC,aAAa,CAAC,aAAa,EAAE,CAAA;IAC3C,CAAC;IAEM,MAAM,CAAC,qBAAqB,CAAC,OAA+B;QACjE,OAAO,IAAA,mDAA2B,EAAC,OAAO,CAAC,CAAA;IAC7C,CAAC;CACF;AA/HD,wCA+HC"}
|
package/dist/CatalystsList.d.ts
DELETED
package/dist/CatalystsList.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
module.exports = ({
|
|
3
|
-
"mainnet": [
|
|
4
|
-
{
|
|
5
|
-
"address": "https://interconnected.online",
|
|
6
|
-
"owner": "0x75e1d32289679dfcB2F01fBc0e043B3d7F9Cd443",
|
|
7
|
-
"id": "0xa88ccc81441dd364f33f0db770508d63e6ce933e2a2f24039974c887e535e2cd"
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
"address": "https://peer.decentral.io",
|
|
11
|
-
"owner": "0xa7C825BB8c2C4d18288af8efe38c8Bf75A1AAB51",
|
|
12
|
-
"id": "0xad3b7e8fa348ce19794a65b7502866731d48ee273921fd454d26e03310d3d765"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"address": "https://peer.melonwave.com",
|
|
16
|
-
"owner": "0x6327Ef6bAE918584B86AcfD58bDEB6EF9211e371",
|
|
17
|
-
"id": "0xdc79f86d81f8be2e8ecf51f5be7df04edca3c815846f890c8b1bcade6bcf2a6c"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"address": "https://peer.kyllian.me",
|
|
21
|
-
"owner": "0xF78Dfd2a940c1c204d9eb5D1fF7988b7AEC3F01a",
|
|
22
|
-
"id": "0x77fa03b44621846a18358ca6e766a5fa6959a1b25ae2229f16be328dac8931df"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"address": "https://peer-ap1.decentraland.org",
|
|
26
|
-
"owner": "0xF1598bC1aD6474d6e884684706ABdd1e3468D199",
|
|
27
|
-
"id": "0x201a63dfe16e0e870f83367ac0ce1dd90b6e851f78baae140c81741e3f5fc9ec"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"address": "https://peer.uadevops.com",
|
|
31
|
-
"owner": "0x3f95F857F89357fb1592C74dEd1f4556c6272edB",
|
|
32
|
-
"id": "0x242d013bc99da6593970d01f044f46194eee33b8947384efbafc10ae1a7917fc"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"address": "https://peer.dclnodes.io",
|
|
36
|
-
"owner": "0x3d7C732f54f7D60d14eabca8A7Da3097cEc3AF1e",
|
|
37
|
-
"id": "0xd5d98a65db8d09437f138b06d112a630c762cca7082c96fa0dcd4102abfc0aef"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"address": "https://peer-eu1.decentraland.org",
|
|
41
|
-
"owner": "0xEfc549434A03756F6e37A43757a2927605D8839B",
|
|
42
|
-
"id": "0x4e55ad26203dfef9b2235dfea39d531b2b64814e606c0294768c0d1469124479"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"address": "https://peer-ec1.decentraland.org",
|
|
46
|
-
"owner": "0xe5d0c3fEA1e5F01CA4098e9580B93B3b5d0Ea768",
|
|
47
|
-
"id": "0x63edaad1a9bdfa5a492b12d4920655c5812c8572d1cdeca2f3f5e8cc49efc593"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"address": "https://peer-wc1.decentraland.org",
|
|
51
|
-
"owner": "0x4eAC6325e1DBF1Ac90434d39766e164Dca71139E",
|
|
52
|
-
"id": "0xca6c9aff525af8ae6fb73c59c402619030323150b0dfcb39574c9eed608e7309"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"address": "https://peer-ec2.decentraland.org",
|
|
56
|
-
"owner": "0xFE95E04A628087FCdD5f278E61F148B47471Af4A",
|
|
57
|
-
"id": "0xfb2e343efdf90aa09f8f02849e453fac3c0b21edbc1de23ac6e6fb1981f5d009"
|
|
58
|
-
}
|
|
59
|
-
],
|
|
60
|
-
"goerli": [
|
|
61
|
-
{
|
|
62
|
-
"address": "https://peer-ap1.decentraland.zone",
|
|
63
|
-
"owner": "0xE4747cc0606a622E9388BecbDf528ABE94E68F1c",
|
|
64
|
-
"id": "0xdac0e1d5e7bf7311873e0d2f05eaade8b96a162f80fb9ff631984f397904fc2c"
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"address": "https://peer.decentraland.zone",
|
|
68
|
-
"owner": "0x079BED9C31CB772c4C156F86E1CFf15bf751ADd0",
|
|
69
|
-
"id": "0x3ab65b7710c476a899412fc8bfcd6f4d55fa68f5a58bb548bb8dbff9f3ae76be"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"address": "https://peer-ue-2.decentraland.zone",
|
|
73
|
-
"owner": "0xe355ec3f4ac741fCEf88719001c825fe5138f0E1",
|
|
74
|
-
"id": "0x420dee17fad0e311afa59ffb8dc2dd724700e508fc9ccf47806ce1763b152394"
|
|
75
|
-
}
|
|
76
|
-
]
|
|
77
|
-
});
|
|
78
|
-
//# sourceMappingURL=CatalystsList.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CatalystsList.js","sourceRoot":"","sources":["../src/CatalystsList.ts"],"names":[],"mappings":";AACA,iBAAS,CACT;IACI,SAAS,EAAE;QACP;YACI,SAAS,EAAE,+BAA+B;YAC1C,OAAO,EAAE,4CAA4C;YACrD,IAAI,EAAE,oEAAoE;SAC7E;QACD;YACI,SAAS,EAAE,2BAA2B;YACtC,OAAO,EAAE,4CAA4C;YACrD,IAAI,EAAE,oEAAoE;SAC7E;QACD;YACI,SAAS,EAAE,4BAA4B;YACvC,OAAO,EAAE,4CAA4C;YACrD,IAAI,EAAE,oEAAoE;SAC7E;QACD;YACI,SAAS,EAAE,yBAAyB;YACpC,OAAO,EAAE,4CAA4C;YACrD,IAAI,EAAE,oEAAoE;SAC7E;QACD;YACI,SAAS,EAAE,mCAAmC;YAC9C,OAAO,EAAE,4CAA4C;YACrD,IAAI,EAAE,oEAAoE;SAC7E;QACD;YACI,SAAS,EAAE,2BAA2B;YACtC,OAAO,EAAE,4CAA4C;YACrD,IAAI,EAAE,oEAAoE;SAC7E;QACD;YACI,SAAS,EAAE,0BAA0B;YACrC,OAAO,EAAE,4CAA4C;YACrD,IAAI,EAAE,oEAAoE;SAC7E;QACD;YACI,SAAS,EAAE,mCAAmC;YAC9C,OAAO,EAAE,4CAA4C;YACrD,IAAI,EAAE,oEAAoE;SAC7E;QACD;YACI,SAAS,EAAE,mCAAmC;YAC9C,OAAO,EAAE,4CAA4C;YACrD,IAAI,EAAE,oEAAoE;SAC7E;QACD;YACI,SAAS,EAAE,mCAAmC;YAC9C,OAAO,EAAE,4CAA4C;YACrD,IAAI,EAAE,oEAAoE;SAC7E;QACD;YACI,SAAS,EAAE,mCAAmC;YAC9C,OAAO,EAAE,4CAA4C;YACrD,IAAI,EAAE,oEAAoE;SAC7E;KACJ;IACD,QAAQ,EAAE;QACN;YACI,SAAS,EAAE,oCAAoC;YAC/C,OAAO,EAAE,4CAA4C;YACrD,IAAI,EAAE,oEAAoE;SAC7E;QACD;YACI,SAAS,EAAE,gCAAgC;YAC3C,OAAO,EAAE,4CAA4C;YACrD,IAAI,EAAE,oEAAoE;SAC7E;QACD;YACI,SAAS,EAAE,qCAAqC;YAChD,OAAO,EAAE,4CAA4C;YACrD,IAAI,EAAE,oEAAoE;SAC7E;KACJ;CACJ,CACA,CAAA"}
|
package/dist/ContentAPI.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { AuthChain, Entity } from '@dcl/schemas';
|
|
3
|
-
import { BuildEntityOptions, BuildEntityWithoutFilesOptions } from './ContentClient';
|
|
4
|
-
import { DeploymentData, DeploymentPreparationData, RequestOptions } from './utils';
|
|
5
|
-
export type AvailableContentResult = Array<{
|
|
6
|
-
cid: string;
|
|
7
|
-
available: boolean;
|
|
8
|
-
}>;
|
|
9
|
-
export type EntityAuditInfoResponse = {
|
|
10
|
-
localTimestamp: number;
|
|
11
|
-
authChain: AuthChain;
|
|
12
|
-
};
|
|
13
|
-
export interface ContentAPI {
|
|
14
|
-
/** Build entities */
|
|
15
|
-
buildEntity({ type, pointers, files, metadata }: BuildEntityOptions): Promise<DeploymentPreparationData>;
|
|
16
|
-
buildEntityWithoutNewFiles({ type, pointers, hashesByKey, metadata }: BuildEntityWithoutFilesOptions): Promise<DeploymentPreparationData>;
|
|
17
|
-
/** Retrieve / Download */
|
|
18
|
-
fetchEntitiesByPointers(pointers: string[], options?: RequestOptions): Promise<Entity[]>;
|
|
19
|
-
fetchEntitiesByIds(ids: string[], options?: RequestOptions): Promise<Entity[]>;
|
|
20
|
-
fetchEntityById(id: string, options?: RequestOptions): Promise<Entity>;
|
|
21
|
-
downloadContent(contentHash: string, options?: RequestOptions): Promise<Buffer>;
|
|
22
|
-
/** @deprecated use deploy instead */
|
|
23
|
-
deployEntity(deployData: DeploymentData, fix?: boolean, options?: RequestOptions): Promise<number>;
|
|
24
|
-
/**
|
|
25
|
-
* Deploys an entity to the content server.
|
|
26
|
-
*/
|
|
27
|
-
deploy(deployData: DeploymentData, options?: RequestOptions): Promise<unknown>;
|
|
28
|
-
/** Status */
|
|
29
|
-
getContentUrl(): string;
|
|
30
|
-
}
|
package/dist/ContentAPI.js
DELETED
package/dist/ContentAPI.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContentAPI.js","sourceRoot":"","sources":["../src/ContentAPI.ts"],"names":[],"mappings":""}
|
package/dist/ContentClient.d.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { Entity, EntityType } from '@dcl/schemas';
|
|
3
|
-
import FormData from 'form-data';
|
|
4
|
-
import { AvailableContentResult, ContentAPI } from './ContentAPI';
|
|
5
|
-
import { IFetchComponent, RequestOptions } from './utils';
|
|
6
|
-
import { DeploymentBuilder, DeploymentData, DeploymentPreparationData } from './utils/DeploymentBuilder';
|
|
7
|
-
export type ContentClientOptions = {
|
|
8
|
-
contentUrl: string;
|
|
9
|
-
fetcher?: IFetchComponent;
|
|
10
|
-
deploymentBuilderClass?: typeof DeploymentBuilder;
|
|
11
|
-
};
|
|
12
|
-
export declare class ContentClient implements ContentAPI {
|
|
13
|
-
private readonly contentUrl;
|
|
14
|
-
private readonly fetcher;
|
|
15
|
-
private readonly deploymentBuilderClass;
|
|
16
|
-
constructor(options: ContentClientOptions);
|
|
17
|
-
buildEntityWithoutNewFiles({ type, pointers, hashesByKey, metadata, timestamp }: BuildEntityWithoutFilesOptions): Promise<DeploymentPreparationData>;
|
|
18
|
-
buildEntity({ type, pointers, files, metadata, timestamp }: BuildEntityOptions): Promise<DeploymentPreparationData>;
|
|
19
|
-
buildEntityFormDataForDeployment(deployData: DeploymentData, options?: RequestOptions): Promise<FormData>;
|
|
20
|
-
deployEntity(deployData: DeploymentData, fix?: boolean, options?: RequestOptions): Promise<number>;
|
|
21
|
-
deploy(deployData: DeploymentData, options?: RequestOptions): Promise<unknown>;
|
|
22
|
-
fetchEntitiesByPointers(pointers: string[], options?: RequestOptions): Promise<Entity[]>;
|
|
23
|
-
fetchEntitiesByIds(ids: string[], options?: RequestOptions): Promise<Entity[]>;
|
|
24
|
-
fetchEntityById(id: string, options?: RequestOptions): Promise<Entity>;
|
|
25
|
-
downloadContent(contentHash: string, options?: Partial<RequestOptions>): Promise<Buffer>;
|
|
26
|
-
isContentAvailable(cids: string[], options?: RequestOptions): Promise<AvailableContentResult>;
|
|
27
|
-
getContentUrl(): string;
|
|
28
|
-
/** Given an array of file hashes, return a set with those already uploaded on the server */
|
|
29
|
-
private hashesAlreadyOnServer;
|
|
30
|
-
}
|
|
31
|
-
export interface BuildEntityOptions {
|
|
32
|
-
type: EntityType;
|
|
33
|
-
pointers: string[];
|
|
34
|
-
files?: Map<string, Uint8Array>;
|
|
35
|
-
metadata?: any;
|
|
36
|
-
timestamp?: number;
|
|
37
|
-
}
|
|
38
|
-
export interface BuildEntityWithoutFilesOptions {
|
|
39
|
-
type: EntityType;
|
|
40
|
-
pointers: string[];
|
|
41
|
-
hashesByKey?: Map<string, string>;
|
|
42
|
-
metadata?: any;
|
|
43
|
-
timestamp?: number;
|
|
44
|
-
}
|
|
45
|
-
export declare class DeploymentFields {
|
|
46
|
-
private readonly fields;
|
|
47
|
-
static readonly AUDIT_INFO: DeploymentFields;
|
|
48
|
-
static readonly POINTERS_CONTENT_METADATA_AND_AUDIT_INFO: DeploymentFields;
|
|
49
|
-
static readonly POINTERS_CONTENT_AND_METADATA: DeploymentFields;
|
|
50
|
-
private constructor();
|
|
51
|
-
getFields(): string;
|
|
52
|
-
isFieldIncluded(name: string): boolean;
|
|
53
|
-
}
|