@oceanprotocol/lib 1.1.5 → 1.1.8
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 +41 -0
- package/CodeExamples.md +1 -1
- package/dist/lib.js +1 -1
- package/dist/lib.js.map +1 -1
- package/dist/lib.modern.js +1 -1
- package/dist/lib.modern.js.map +1 -1
- package/dist/lib.module.js +1 -1
- package/dist/lib.module.js.map +1 -1
- package/dist/lib.umd.js +1 -1
- package/dist/lib.umd.js.map +1 -1
- package/dist/src/@types/FileInfo.d.ts +5 -0
- package/dist/src/aquarius/Aquarius.d.ts +23 -0
- package/dist/src/provider/Provider.d.ts +1 -1
- package/dist/src/tokens/NFT.d.ts +10 -0
- package/package.json +9 -9
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import { Asset, DDO, ValidateMetadata } from '../@types/';
|
|
2
|
+
export interface SearchQuery {
|
|
3
|
+
from?: number;
|
|
4
|
+
size?: number;
|
|
5
|
+
query: any;
|
|
6
|
+
sort?: {
|
|
7
|
+
[jsonPath: string]: string;
|
|
8
|
+
};
|
|
9
|
+
aggs?: any;
|
|
10
|
+
}
|
|
2
11
|
export declare class Aquarius {
|
|
3
12
|
aquariusURL: any;
|
|
4
13
|
/**
|
|
@@ -28,5 +37,19 @@ export declare class Aquarius {
|
|
|
28
37
|
* @return {Promise<ValidateMetadata>}.
|
|
29
38
|
*/
|
|
30
39
|
validate(ddo: DDO, signal?: AbortSignal): Promise<ValidateMetadata>;
|
|
40
|
+
/**
|
|
41
|
+
* Search over the DDOs using a query.
|
|
42
|
+
* @param {string} did DID of the asset
|
|
43
|
+
* @param {AbortSignal} signal abort signal
|
|
44
|
+
* @return {Promise<QueryResult>}
|
|
45
|
+
*/
|
|
46
|
+
getAssetMetadata(did: string, signal?: AbortSignal): Promise<any>;
|
|
47
|
+
/**
|
|
48
|
+
* Search over the DDOs using a query.
|
|
49
|
+
* @param {SearchQuery} query Query to filter the DDOs.
|
|
50
|
+
* @param {AbortSignal} signal abort signal
|
|
51
|
+
* @return {Promise<QueryResult>}
|
|
52
|
+
*/
|
|
53
|
+
querySearch(query: SearchQuery, signal?: AbortSignal): Promise<any>;
|
|
31
54
|
}
|
|
32
55
|
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:
|
|
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
|
package/dist/src/tokens/NFT.d.ts
CHANGED
|
@@ -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
|
+
"version": "1.1.8",
|
|
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.
|
|
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.
|
|
80
|
+
"@types/node": "^18.0.1",
|
|
81
81
|
"@types/node-fetch": "^3.0.3",
|
|
82
|
-
"@typescript-eslint/eslint-plugin": "^5.30.
|
|
83
|
-
"@typescript-eslint/parser": "^5.30.
|
|
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.
|
|
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
|
|
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.
|
|
101
|
+
"ts-node": "^10.8.2",
|
|
102
102
|
"ts-node-register": "^1.0.0",
|
|
103
|
-
"typedoc": "0.23.
|
|
103
|
+
"typedoc": "0.23.5",
|
|
104
104
|
"typescript": "^4.7.4"
|
|
105
105
|
},
|
|
106
106
|
"nyc": {
|