@oceanprotocol/lib 3.4.4 → 3.4.6
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 -3
- package/CodeExamples.md +2 -2
- package/ComputeExamples.md +2 -2
- 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/types/@types/DDO/Metadata.d.ts +1 -1
- package/dist/types/contracts/NFTFactory.d.ts +1 -1
- package/dist/types/services/Aquarius.d.ts +2 -2
- package/dist/types/utils/Adresses.d.ts +23 -0
- package/dist/types/utils/Assets.d.ts +0 -22
- package/dist/types/utils/OrderUtils.d.ts +5 -1
- package/docs/classes/Aquarius.md +6 -4
- package/docs/classes/NftFactory.md +1 -1
- package/docs/interfaces/Metadata.md +1 -1
- package/package.json +2 -2
|
@@ -117,7 +117,7 @@ export declare class NftFactory extends SmartContractWithAddress {
|
|
|
117
117
|
* - consumeFeeTokens
|
|
118
118
|
* - publishMarketFeeTokens
|
|
119
119
|
* - ERC20 Datatokens
|
|
120
|
-
* @param {TokenOrder[]} orders array of
|
|
120
|
+
* @param {TokenOrder[]} orders array of orders
|
|
121
121
|
* @param {Boolean} [estimateGas] if True, return gas estimate
|
|
122
122
|
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
123
123
|
*/
|
|
@@ -22,13 +22,13 @@ export declare class Aquarius {
|
|
|
22
22
|
*/
|
|
23
23
|
resolve(did: string, signal?: AbortSignal): Promise<Asset>;
|
|
24
24
|
/**
|
|
25
|
-
* Blocks until
|
|
25
|
+
* Blocks until Indexer will cache the did (or the update for that did) or timeouts
|
|
26
26
|
* @param {string} did DID of the asset.
|
|
27
27
|
* @param {string} txid used when the did exists and we expect an update with that txid.
|
|
28
28
|
* @param {AbortSignal} signal abort signal
|
|
29
29
|
* @return {Promise<Asset>} DDO of the asset.
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
waitForIndexer(did: string, txid?: string, signal?: AbortSignal, interval?: number, maxRetries?: number): Promise<Asset>;
|
|
32
32
|
/**
|
|
33
33
|
* Validate DDO content
|
|
34
34
|
* @param {DDO} ddo DID Descriptor Object content.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Signer } from 'ethers';
|
|
2
|
+
/**
|
|
3
|
+
* Get the artifacts address from the address.json file
|
|
4
|
+
* either from the env or from the ocean-contracts dir
|
|
5
|
+
* @returns data or null
|
|
6
|
+
*/
|
|
7
|
+
export declare function getOceanArtifactsAdresses(): any;
|
|
8
|
+
/**
|
|
9
|
+
* Get the artifacts address from the address.json file, for the given chain
|
|
10
|
+
* either from the env or from the ocean-contracts dir, safer than above, because sometimes the network name
|
|
11
|
+
* is mispeled, best example "optimism_sepolia" vs "optimism-sepolia"
|
|
12
|
+
* @returns data or null
|
|
13
|
+
*/
|
|
14
|
+
export declare function getOceanArtifactsAdressesByChainId(chain: number): any;
|
|
15
|
+
/**
|
|
16
|
+
* Use this function to accurately calculate the template index, and also checking if the template is active
|
|
17
|
+
* @param owner the signer account
|
|
18
|
+
* @param nftContractAddress the nft contract address, usually artifactsAddresses.ERC721Factory
|
|
19
|
+
* @param template the template ID or template address (from smart contract getId() function)
|
|
20
|
+
* @returns index of the template on the list
|
|
21
|
+
*/
|
|
22
|
+
export declare function calculateActiveTemplateIndex(owner: Signer, nftContractAddress: string, // addresses.ERC721Factory,
|
|
23
|
+
template: string | number): Promise<number>;
|
|
@@ -2,28 +2,6 @@ import { Signer } from 'ethers';
|
|
|
2
2
|
import { Aquarius } from '../services/Aquarius';
|
|
3
3
|
export declare const DEVELOPMENT_CHAIN_ID = 8996;
|
|
4
4
|
export declare function useOasisSDK(network: string | number): boolean;
|
|
5
|
-
/**
|
|
6
|
-
* Get the artifacts address from the address.json file
|
|
7
|
-
* either from the env or from the ocean-contracts dir
|
|
8
|
-
* @returns data or null
|
|
9
|
-
*/
|
|
10
|
-
export declare function getOceanArtifactsAdresses(): any;
|
|
11
|
-
/**
|
|
12
|
-
* Get the artifacts address from the address.json file, for the given chain
|
|
13
|
-
* either from the env or from the ocean-contracts dir, safer than above, because sometimes the network name
|
|
14
|
-
* is mispeled, best example "optimism_sepolia" vs "optimism-sepolia"
|
|
15
|
-
* @returns data or null
|
|
16
|
-
*/
|
|
17
|
-
export declare function getOceanArtifactsAdressesByChainId(chain: number): any;
|
|
18
|
-
/**
|
|
19
|
-
* Use this function to accurately calculate the template index, and also checking if the template is active
|
|
20
|
-
* @param owner the signer account
|
|
21
|
-
* @param nftContractAddress the nft contract address, usually artifactsAddresses.ERC721Factory
|
|
22
|
-
* @param template the template ID or template address (from smart contract getId() function)
|
|
23
|
-
* @returns index of the template on the list
|
|
24
|
-
*/
|
|
25
|
-
export declare function calculateActiveTemplateIndex(owner: Signer, nftContractAddress: string, // addresses.ERC721Factory,
|
|
26
|
-
template: string | number): Promise<number>;
|
|
27
5
|
/**
|
|
28
6
|
*
|
|
29
7
|
* @param name asset name
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { Signer } from 'ethers';
|
|
2
|
-
import {
|
|
2
|
+
import { Asset } from '../@types/Asset';
|
|
3
|
+
import { Config } from '../config/Config';
|
|
4
|
+
import { Datatoken } from '../contracts/Datatoken';
|
|
5
|
+
import { ConsumeMarketFee } from '../@types/Datatoken';
|
|
6
|
+
import { ProviderFees } from '../@types/Provider';
|
|
3
7
|
/**
|
|
4
8
|
* Orders an asset based on the specified pricing schema and configuration.
|
|
5
9
|
* @param {Asset} asset - The asset to be ordered.
|
package/docs/classes/Aquarius.md
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
- [querySearch](Aquarius.md#querysearch)
|
|
19
19
|
- [resolve](Aquarius.md#resolve)
|
|
20
20
|
- [validate](Aquarius.md#validate)
|
|
21
|
-
- [
|
|
21
|
+
- [waitForIndexer](Aquarius.md#waitForIndexer)
|
|
22
22
|
|
|
23
23
|
## Constructors
|
|
24
24
|
|
|
@@ -146,11 +146,11 @@ Validate DDO content
|
|
|
146
146
|
|
|
147
147
|
___
|
|
148
148
|
|
|
149
|
-
###
|
|
149
|
+
### waitForIndexer
|
|
150
150
|
|
|
151
|
-
▸ **
|
|
151
|
+
▸ **waitForIndexer**(`did`, `txid?`, `signal?`, `interval=3000`,`maxRetries=100`): `Promise`<[`Asset`](../interfaces/Asset.md)\>
|
|
152
152
|
|
|
153
|
-
Blocks until
|
|
153
|
+
Blocks until Indexer will cache the did (or the update for that did) or timeouts
|
|
154
154
|
|
|
155
155
|
#### Parameters
|
|
156
156
|
|
|
@@ -159,6 +159,8 @@ Blocks until Aqua will cache the did (or the update for that did) or timeouts
|
|
|
159
159
|
| `did` | `string` | DID of the asset. |
|
|
160
160
|
| `txid?` | `string` | used when the did exists and we expect an update with that txid. |
|
|
161
161
|
| `signal?` | `AbortSignal` | abort signal |
|
|
162
|
+
| `interval` | `number` | retry interval in miliseconds. Default is 3000 |
|
|
163
|
+
| `maxRetries` | `number` | max number of retries. Default is 100 |
|
|
162
164
|
|
|
163
165
|
#### Returns
|
|
164
166
|
|
|
@@ -817,7 +817,7 @@ Used as a proxy to order multiple services
|
|
|
817
817
|
|
|
818
818
|
| Name | Type | Description |
|
|
819
819
|
| :------ | :------ | :------ |
|
|
820
|
-
| `orders` | [`TokenOrder`](../interfaces/TokenOrder.md)[] | array of
|
|
820
|
+
| `orders` | [`TokenOrder`](../interfaces/TokenOrder.md)[] | array of orders |
|
|
821
821
|
| `estimateGas?` | `G` | if True, return gas estimate |
|
|
822
822
|
|
|
823
823
|
#### Returns
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oceanprotocol/lib",
|
|
3
3
|
"source": "./src/index.ts",
|
|
4
|
-
"version": "3.4.
|
|
4
|
+
"version": "3.4.6",
|
|
5
5
|
"description": "JavaScript client library for Ocean Protocol",
|
|
6
6
|
"main": "./dist/lib.js",
|
|
7
7
|
"umd:main": "dist/lib.umd.js",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"microbundle": "0.14.2",
|
|
84
84
|
"mocha": "^10.0.0",
|
|
85
85
|
"mock-local-storage": "^1.1.21",
|
|
86
|
-
"nyc": "^
|
|
86
|
+
"nyc": "^17.1.0",
|
|
87
87
|
"ora": "5.4.1",
|
|
88
88
|
"prettier": "^2.7.1",
|
|
89
89
|
"release-it": "^15.4.2",
|