@oceanprotocol/lib 1.1.4 → 1.1.7

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.
@@ -107,7 +107,7 @@ export interface Asset extends DDO {
107
107
  * How often an asset was consumed, meaning how often it was either downloaded or used as part of a compute job.
108
108
  * @type {string}
109
109
  */
110
- consume: number;
110
+ orders: number;
111
111
  };
112
112
  /**
113
113
  * Contains information about an asset's purgatory status defined in
@@ -30,6 +30,11 @@ export interface FileInfo {
30
30
  * @type {string}
31
31
  */
32
32
  method?: string;
33
+ /**
34
+ * Computed file checksum
35
+ * @type {string}
36
+ */
37
+ checksum?: string;
33
38
  /**
34
39
  * check if file exists
35
40
  * @type {boolean}
@@ -1,4 +1,22 @@
1
1
  import { Asset, DDO, ValidateMetadata } from '../@types/';
2
+ export interface SearchQuery {
3
+ from?: number;
4
+ size?: number;
5
+ query: {
6
+ match?: {
7
+ [property: string]: string | number | boolean | Record<string, string | number | boolean>;
8
+ };
9
+ query_string?: {
10
+ [property: string]: string | number | string[] | number[] | boolean;
11
+ };
12
+ simple_query_string?: {
13
+ [property: string]: string | number | string[] | number[] | boolean;
14
+ };
15
+ };
16
+ sort?: {
17
+ [jsonPath: string]: string;
18
+ };
19
+ }
2
20
  export declare class Aquarius {
3
21
  aquariusURL: any;
4
22
  /**
@@ -28,5 +46,19 @@ export declare class Aquarius {
28
46
  * @return {Promise<ValidateMetadata>}.
29
47
  */
30
48
  validate(ddo: DDO, signal?: AbortSignal): Promise<ValidateMetadata>;
49
+ /**
50
+ * Search over the DDOs using a query.
51
+ * @param {string} did DID of the asset
52
+ * @param {AbortSignal} signal abort signal
53
+ * @return {Promise<QueryResult>}
54
+ */
55
+ getAssetMetadata(did: string, signal?: AbortSignal): Promise<any>;
56
+ /**
57
+ * Search over the DDOs using a query.
58
+ * @param {SearchQuery} query Query to filter the DDOs.
59
+ * @param {AbortSignal} signal abort signal
60
+ * @return {Promise<QueryResult>}
61
+ */
62
+ querySearch(query: SearchQuery, signal?: AbortSignal): Promise<any>;
31
63
  }
32
64
  export default Aquarius;
@@ -48,7 +48,7 @@ export declare class Provider {
48
48
  * @param {AbortSignal} signal abort signal
49
49
  * @return {Promise<FileInfo[]>} urlDetails
50
50
  */
51
- checkDidFiles(did: string, serviceId: number, providerUri: string, signal?: AbortSignal): Promise<FileInfo[]>;
51
+ checkDidFiles(did: string, serviceId: string, providerUri: string, withChecksum?: boolean, signal?: AbortSignal): Promise<FileInfo[]>;
52
52
  /** Get URL details (if possible)
53
53
  * @param {string} url or did
54
54
  * @param {string} providerUri uri of the provider that will be used to check the file
@@ -316,6 +316,16 @@ export declare class Nft {
316
316
  * @return {Promise<TransactionReceipt>} transaction receipt
317
317
  */
318
318
  setTokenURI(nftAddress: string, address: string, data: string): Promise<any>;
319
+ /** setData
320
+ * This function allows to store data with a preset key (keccak256(ERC20Address)) into NFT 725 Store
321
+ * only ERC20Deployer can succeed
322
+ * @param nftAddress erc721 contract adress
323
+ * @param address user adress
324
+ * @param key Key of the data to be stored into 725Y standard
325
+ * @param value Data to be stored into 725Y standard
326
+ * @return {Promise<TransactionReceipt>} transactionId
327
+ */
328
+ setData(nftAddress: string, address: string, key: string, value: string): Promise<TransactionReceipt>;
319
329
  /** Get Owner
320
330
  * @param {String} nftAddress erc721 contract adress
321
331
  * @return {Promise<string>} string
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oceanprotocol/lib",
3
3
  "source": "./src/index.ts",
4
- "version": "1.1.4",
4
+ "version": "1.1.7",
5
5
  "description": "JavaScript client library for Ocean Protocol",
6
6
  "main": "./dist/lib.js",
7
7
  "umd:main": "dist/lib.umd.js",
@@ -72,23 +72,23 @@
72
72
  "web3-eth-contract": "^1.7.1"
73
73
  },
74
74
  "devDependencies": {
75
- "@truffle/hdwallet-provider": "^2.0.9",
75
+ "@truffle/hdwallet-provider": "^2.0.10",
76
76
  "@types/chai": "^4.3.1",
77
77
  "@types/chai-spies": "^1.0.3",
78
78
  "@types/crypto-js": "^4.1.1",
79
79
  "@types/mocha": "^9.1.1",
80
- "@types/node": "^18.0.0",
80
+ "@types/node": "^18.0.1",
81
81
  "@types/node-fetch": "^3.0.3",
82
- "@typescript-eslint/eslint-plugin": "^5.30.0",
83
- "@typescript-eslint/parser": "^5.30.0",
82
+ "@typescript-eslint/eslint-plugin": "^5.30.5",
83
+ "@typescript-eslint/parser": "^5.30.5",
84
84
  "auto-changelog": "^2.4.0",
85
85
  "chai": "^4.3.6",
86
86
  "chai-spies": "^1.0.0",
87
87
  "cross-env": "^7.0.3",
88
- "eslint": "^8.18.0",
88
+ "eslint": "^8.19.0",
89
89
  "eslint-config-oceanprotocol": "^2.0.3",
90
90
  "eslint-config-prettier": "^8.5.0",
91
- "eslint-plugin-prettier": "^4.1.0",
91
+ "eslint-plugin-prettier": "^4.2.1",
92
92
  "fs": "0.0.1-security",
93
93
  "microbundle": "0.14.2",
94
94
  "mocha": "^10.0.0",
@@ -98,9 +98,9 @@
98
98
  "prettier": "^2.7.1",
99
99
  "release-it": "^15.1.1",
100
100
  "source-map-support": "^0.5.19",
101
- "ts-node": "^10.8.0",
101
+ "ts-node": "^10.8.2",
102
102
  "ts-node-register": "^1.0.0",
103
- "typedoc": "0.23.2",
103
+ "typedoc": "0.23.5",
104
104
  "typescript": "^4.7.4"
105
105
  },
106
106
  "nyc": {