@oceanprotocol/lib 4.0.2 → 4.0.3
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/CHANGELOG.md +44 -4
- package/CodeExamples.md +38 -13
- package/ComputeExamples.md +92 -54
- package/dist/lib.cjs +1 -1
- package/dist/lib.cjs.map +1 -1
- package/dist/lib.modern.js +1 -1
- package/dist/lib.modern.js.map +1 -1
- package/dist/lib.module.mjs +1 -1
- package/dist/lib.module.mjs.map +1 -1
- package/dist/lib.umd.js +1 -1
- package/dist/lib.umd.js.map +1 -1
- package/dist/types/@types/Compute.d.ts +1 -1
- package/dist/types/@types/File.d.ts +1 -42
- package/dist/types/@types/NFT.d.ts +1 -1
- package/dist/types/@types/index.d.ts +0 -7
- package/dist/types/config/Config.d.ts +2 -12
- package/dist/types/contracts/NFT.d.ts +2 -1
- package/dist/types/services/Aquarius.d.ts +1 -1
- package/dist/types/services/Provider.d.ts +2 -2
- package/dist/types/utils/Assets.d.ts +2 -1
- package/dist/types/utils/OrderUtils.d.ts +1 -1
- package/package.json +5 -4
- package/dist/types/@types/Asset.d.ts +0 -148
- package/dist/types/@types/DDO/ConsumerParameter.d.ts +0 -37
- package/dist/types/@types/DDO/Credentials.d.ts +0 -8
- package/dist/types/@types/DDO/DDO.d.ts +0 -55
- package/dist/types/@types/DDO/Event.d.ts +0 -27
- package/dist/types/@types/DDO/Metadata.d.ts +0 -141
- package/dist/types/@types/DDO/Service.d.ts +0 -106
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { ConsumerParameter } from './ConsumerParameter.js';
|
|
2
|
-
import { Credentials } from './Credentials.js';
|
|
3
|
-
export interface PublisherTrustedAlgorithm {
|
|
4
|
-
/**
|
|
5
|
-
* The DID of the algorithm which is trusted by the publisher.
|
|
6
|
-
* @type {string}
|
|
7
|
-
*/
|
|
8
|
-
did: string;
|
|
9
|
-
/**
|
|
10
|
-
* Hash of algorithm’s files section.
|
|
11
|
-
* @type {string}
|
|
12
|
-
*/
|
|
13
|
-
filesChecksum: string;
|
|
14
|
-
/**
|
|
15
|
-
* Hash of algorithm’s metadata.algorithm.container section.
|
|
16
|
-
* @type {string}
|
|
17
|
-
*/
|
|
18
|
-
containerSectionChecksum: string;
|
|
19
|
-
}
|
|
20
|
-
export interface ServiceComputeOptions {
|
|
21
|
-
/**
|
|
22
|
-
* If true, any passed raw text will be allowed to run.
|
|
23
|
-
* Useful for an algorithm drag & drop use case, but increases risk of data escape through malicious user input.
|
|
24
|
-
* Should be false by default in all implementations.
|
|
25
|
-
* @type {boolean}
|
|
26
|
-
*/
|
|
27
|
-
allowRawAlgorithm: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* If true, the algorithm job will have network access.
|
|
30
|
-
* @type {boolean}
|
|
31
|
-
*/
|
|
32
|
-
allowNetworkAccess: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* If empty, then any published algorithm is allowed.
|
|
35
|
-
* Otherwise, only published algorithms by some publishers are allowed
|
|
36
|
-
* @type {string[]}
|
|
37
|
-
*/
|
|
38
|
-
publisherTrustedAlgorithmPublishers: string[];
|
|
39
|
-
/**
|
|
40
|
-
* If empty, then any published algorithm is allowed. (see below)
|
|
41
|
-
* @type {PublisherTrustedAlgorithm[]}
|
|
42
|
-
*/
|
|
43
|
-
publisherTrustedAlgorithms: PublisherTrustedAlgorithm[];
|
|
44
|
-
}
|
|
45
|
-
export interface Service {
|
|
46
|
-
/**
|
|
47
|
-
* Unique ID
|
|
48
|
-
* @type {string}
|
|
49
|
-
*/
|
|
50
|
-
id: string;
|
|
51
|
-
/**
|
|
52
|
-
* Type of service (access, compute, wss.
|
|
53
|
-
* @type {string}
|
|
54
|
-
*/
|
|
55
|
-
type: 'access' | 'compute' | string;
|
|
56
|
-
/**
|
|
57
|
-
* Encrypted file URLs.
|
|
58
|
-
* @type {string}
|
|
59
|
-
*/
|
|
60
|
-
files: string;
|
|
61
|
-
/**
|
|
62
|
-
* Datatoken address
|
|
63
|
-
* @type {string}
|
|
64
|
-
*/
|
|
65
|
-
datatokenAddress: string;
|
|
66
|
-
/**
|
|
67
|
-
* Provider URL (schema + host).
|
|
68
|
-
* @type {string}
|
|
69
|
-
*/
|
|
70
|
-
serviceEndpoint: string;
|
|
71
|
-
/**
|
|
72
|
-
* Describes the credentials needed to access a service
|
|
73
|
-
* @type {Credentials}
|
|
74
|
-
*/
|
|
75
|
-
credentials?: Credentials;
|
|
76
|
-
/**
|
|
77
|
-
* Describing how long the service can be used after consumption is initiated.
|
|
78
|
-
* @type {number}
|
|
79
|
-
*/
|
|
80
|
-
timeout: number;
|
|
81
|
-
/**
|
|
82
|
-
* Service friendly name
|
|
83
|
-
* @type {string}
|
|
84
|
-
*/
|
|
85
|
-
name?: string;
|
|
86
|
-
/**
|
|
87
|
-
* Service description
|
|
88
|
-
* @type {string}
|
|
89
|
-
*/
|
|
90
|
-
description?: string;
|
|
91
|
-
/**
|
|
92
|
-
* If service is of type compute, holds information about the compute-related privacy settings & resources.
|
|
93
|
-
* @type {ServiceComputeOptions}
|
|
94
|
-
*/
|
|
95
|
-
compute?: ServiceComputeOptions;
|
|
96
|
-
/**
|
|
97
|
-
* Array of objects describing the consumer parameters
|
|
98
|
-
* @type {ConsumerParameter[]}
|
|
99
|
-
*/
|
|
100
|
-
consumerParameters?: ConsumerParameter[];
|
|
101
|
-
/**
|
|
102
|
-
* Stores service specific additional information, this is customizable by publisher
|
|
103
|
-
* @type {any}
|
|
104
|
-
*/
|
|
105
|
-
additionalInformation?: any;
|
|
106
|
-
}
|