@oceanprotocol/lib 1.1.6 → 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.
@@ -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;
@@ -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.6",
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",