@oceanprotocol/lib 4.0.2 → 4.1.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.
@@ -1,27 +0,0 @@
1
- export interface Event {
2
- /**
3
- * TX id of the last create/update
4
- * @type {string}
5
- */
6
- txid?: string;
7
- /**
8
- * Block of txid
9
- * @type {number}
10
- */
11
- block?: number;
12
- /**
13
- * Sender of tx
14
- * @type {String}
15
- */
16
- from?: string;
17
- /**
18
- * Contract
19
- * @type {String}
20
- */
21
- contract?: string;
22
- /**
23
- * datetime of tx
24
- * @type {String}
25
- */
26
- datetime?: string;
27
- }
@@ -1,141 +0,0 @@
1
- import { ConsumerParameter } from './ConsumerParameter';
2
- export interface MetadataAlgorithm {
3
- /**
4
- * Programming language used to implement the software.
5
- * @type {string}
6
- */
7
- language?: string;
8
- /**
9
- * Version of the software preferably in SemVer notation.
10
- * @type {string}
11
- */
12
- version?: string;
13
- /**
14
- * Rawcode
15
- * @type {string}
16
- */
17
- rawcode?: string;
18
- /**
19
- * Object describing the Docker container image.
20
- * @type {Object}
21
- */
22
- container: {
23
- /**
24
- * The command to execute, or script to run inside the Docker image.
25
- * @type {string}
26
- */
27
- entrypoint: string;
28
- /**
29
- * Name of the Docker image.
30
- * @type {string}
31
- */
32
- image: string;
33
- /**
34
- * Tag of the Docker image.
35
- * @type {string}
36
- */
37
- tag: string;
38
- /**
39
- * Checksum of the Docker image.
40
- * @type {string}
41
- */
42
- checksum: string;
43
- /**
44
- * Array of objects describing the consumer parameters
45
- * @type {ConsumerParameter[]}
46
- */
47
- consumerParameters?: ConsumerParameter[];
48
- };
49
- /**
50
- * Array of objects describing the consumer parameters
51
- * @type {ConsumerParameter[]}
52
- */
53
- consumerParameters?: ConsumerParameter[];
54
- }
55
- export interface Metadata {
56
- /**
57
- * Contains the date of publishing in ISO Date Time
58
- * @type {string}
59
- */
60
- created: string;
61
- /**
62
- * Contains the date of last update in ISO Date Time
63
- * @type {string}
64
- */
65
- updated: string;
66
- /**
67
- * Descriptive name or title of the asset.
68
- * @type {string}
69
- */
70
- name: string;
71
- /**
72
- * Details of what the resource is.
73
- * @type {string}
74
- */
75
- description: string;
76
- /**
77
- * Asset type. Includes "dataset" (e.g. csv file), "algorithm" (e.g. Python script).
78
- * Each type needs a different subset of metadata attributes.
79
- * @type {'dataset' | 'algorithm'}
80
- */
81
- type: 'dataset' | 'algorithm';
82
- /**
83
- * Name of the entity generating this data (e.g. Tfl, Disney Corp, etc.).
84
- * @type {string}
85
- */
86
- author: string;
87
- /**
88
- * Short name referencing the license of the asset.
89
- * If it’s not specified, the following value will be added: “No License Specified”.
90
- * @type {string}
91
- */
92
- license: string;
93
- /**
94
- * Mapping of URL strings for data samples, or links to find out more information.
95
- * Links may be to either a URL or another asset.
96
- * @type {string[]}
97
- */
98
- links?: string[];
99
- /**
100
- * Array of keywords or tags used to describe this content. Empty by default.
101
- * @type {string[]}
102
- */
103
- tags?: string[];
104
- /**
105
- * Array of categories associated to the asset. Note: recommended to use tags instead of this.
106
- * @type {string[]}
107
- */
108
- categories?: string[];
109
- /**
110
- * The party holding the legal copyright. Empty by default.
111
- * @type {string}
112
- */
113
- copyrightHolder?: string;
114
- /**
115
- *The language of the content. Use one of the language codes from the IETF BCP 47 standard
116
- * @type {string}
117
- */
118
- contentLanguage?: string;
119
- /**
120
- * Information about asset of type algorithm. Required for algorithm assets.
121
- * @type {MetadataAlgorithm}
122
- */
123
- algorithm?: MetadataAlgorithm;
124
- /**
125
- * Stores additional information, this is customizable by publisher
126
- * @type {any}
127
- */
128
- additionalInformation?: any;
129
- }
130
- export interface MetadataProof {
131
- validatorAddress?: string;
132
- r?: string;
133
- s?: string;
134
- v?: number;
135
- }
136
- export interface ValidateMetadata {
137
- valid: Boolean;
138
- errors?: Object;
139
- hash?: string;
140
- proof?: MetadataProof;
141
- }
@@ -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
- }