@oceanprotocol/lib 0.19.0 → 0.20.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.
- package/CHANGELOG.md +65 -0
- package/README.md +1 -1
- package/dist/node/balancer/OceanPool.d.ts +2 -1
- package/dist/node/balancer/Pool.d.ts +2 -1
- package/dist/node/balancer/PoolFactory.d.ts +3 -1
- package/dist/node/datatokens/Datatokens.d.ts +3 -1
- package/dist/node/ddo/interfaces/Credentials.d.ts +1 -5
- package/dist/node/ddo/interfaces/Event.d.ts +7 -0
- package/dist/node/ddo/interfaces/index.d.ts +1 -0
- package/dist/node/dispenser/Dispenser.d.ts +3 -1
- package/dist/node/exchange/FixedRateExchange.d.ts +3 -1
- package/dist/node/lib.js +1 -1
- package/dist/node/lib.js.map +1 -1
- package/dist/node/lib.module.js +1 -1
- package/dist/node/lib.module.js.map +1 -1
- package/dist/node/lib.umd.js +1 -1
- package/dist/node/lib.umd.js.map +1 -1
- package/dist/node/metadatacache/OnChainMetaData.d.ts +3 -1
- package/dist/node/models/Config.d.ts +1 -0
- package/dist/node/ocean/Assets.d.ts +4 -5
- package/dist/node/ocean/AssetsCredential.d.ts +5 -5
- package/dist/node/ocean/Compute.d.ts +4 -4
- package/dist/node/ocean/EventAccessControl.d.ts +9 -0
- package/dist/node/ocean/Ocean.d.ts +2 -0
- package/dist/node/ocean/interfaces/Compute.d.ts +9 -4
- package/dist/node/provider/Provider.d.ts +8 -1
- package/dist/node/utils/ConfigHelper.d.ts +4 -0
- package/dist/node/utils/ContractUtils.d.ts +5 -0
- package/dist/node/utils/index.d.ts +1 -1
- package/package.json +14 -14
- package/dist/node/utils/GasUtils.d.ts +0 -2
- package/docs/parameters.md +0 -63
package/CHANGELOG.md
CHANGED
|
@@ -4,9 +4,74 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
#### [v0.20.0](https://github.com/oceanprotocol/ocean.js/compare/v0.19.3...v0.20.0)
|
|
8
|
+
|
|
9
|
+
- Bump @truffle/hdwallet-provider from 1.6.0 to 1.7.0 [`#1123`](https://github.com/oceanprotocol/ocean.js/pull/1123)
|
|
10
|
+
- Bump release-it from 14.11.7 to 14.11.8 [`#1124`](https://github.com/oceanprotocol/ocean.js/pull/1124)
|
|
11
|
+
- Bump mock-local-storage from 1.1.17 to 1.1.18 [`#1122`](https://github.com/oceanprotocol/ocean.js/pull/1122)
|
|
12
|
+
- configurable web3 params [`#1112`](https://github.com/oceanprotocol/ocean.js/pull/1112)
|
|
13
|
+
- add compute getResult [`#983`](https://github.com/oceanprotocol/ocean.js/pull/983)
|
|
14
|
+
- Bump web3 from 1.6.0 to 1.6.1 [`#1115`](https://github.com/oceanprotocol/ocean.js/pull/1115)
|
|
15
|
+
- Bump microbundle from 0.14.1 to 0.14.2 [`#1118`](https://github.com/oceanprotocol/ocean.js/pull/1118)
|
|
16
|
+
|
|
17
|
+
#### [v0.19.3](https://github.com/oceanprotocol/ocean.js/compare/v0.19.2...v0.19.3)
|
|
18
|
+
|
|
19
|
+
> 26 November 2021
|
|
20
|
+
|
|
21
|
+
- Feature/issue 1060 change credential type [`#1073`](https://github.com/oceanprotocol/ocean.js/pull/1073)
|
|
22
|
+
- Bump @truffle/hdwallet-provider from 1.5.1 to 1.6.0 [`#1103`](https://github.com/oceanprotocol/ocean.js/pull/1103)
|
|
23
|
+
- Bump @types/node from 16.11.4 to 16.11.7 [`#1108`](https://github.com/oceanprotocol/ocean.js/pull/1108)
|
|
24
|
+
- Bump release-it from 14.11.6 to 14.11.7 [`#1113`](https://github.com/oceanprotocol/ocean.js/pull/1113)
|
|
25
|
+
- Bump typedoc from 0.22.6 to 0.22.9 [`#1114`](https://github.com/oceanprotocol/ocean.js/pull/1114)
|
|
26
|
+
- Bump @types/node from 16.11.2 to 16.11.4 [`#1087`](https://github.com/oceanprotocol/ocean.js/pull/1087)
|
|
27
|
+
- Bump ts-node from 10.3.1 to 10.4.0 [`#1086`](https://github.com/oceanprotocol/ocean.js/pull/1086)
|
|
28
|
+
- Bump @types/node from 16.11.1 to 16.11.2 [`#1085`](https://github.com/oceanprotocol/ocean.js/pull/1085)
|
|
29
|
+
- Bump ts-node from 10.3.0 to 10.3.1 [`#1084`](https://github.com/oceanprotocol/ocean.js/pull/1084)
|
|
30
|
+
- Bump @types/node from 16.11.0 to 16.11.1 [`#1077`](https://github.com/oceanprotocol/ocean.js/pull/1077)
|
|
31
|
+
- Bump mocha from 9.1.2 to 9.1.3 [`#1078`](https://github.com/oceanprotocol/ocean.js/pull/1078)
|
|
32
|
+
- Bump typedoc from 0.22.5 to 0.22.6 [`#1079`](https://github.com/oceanprotocol/ocean.js/pull/1079)
|
|
33
|
+
- Bump @types/node from 16.10.4 to 16.11.0 [`#1074`](https://github.com/oceanprotocol/ocean.js/pull/1074)
|
|
34
|
+
- Bump microbundle from 0.14.0 to 0.14.1 [`#1075`](https://github.com/oceanprotocol/ocean.js/pull/1075)
|
|
35
|
+
- Bump @types/node from 16.10.3 to 16.10.4 [`#1071`](https://github.com/oceanprotocol/ocean.js/pull/1071)
|
|
36
|
+
- Bump typescript from 4.4.3 to 4.4.4 [`#1070`](https://github.com/oceanprotocol/ocean.js/pull/1070)
|
|
37
|
+
- Bump ts-node from 10.2.1 to 10.3.0 [`#1069`](https://github.com/oceanprotocol/ocean.js/pull/1069)
|
|
38
|
+
- Delete parameters.md [`#1063`](https://github.com/oceanprotocol/ocean.js/pull/1063)
|
|
39
|
+
- Bump @truffle/hdwallet-provider from 1.5.0 to 1.5.1 [`#1067`](https://github.com/oceanprotocol/ocean.js/pull/1067)
|
|
40
|
+
- Bump @types/node from 16.10.2 to 16.10.3 [`#1065`](https://github.com/oceanprotocol/ocean.js/pull/1065)
|
|
41
|
+
- Bump microbundle from 0.13.3 to 0.14.0 [`#1066`](https://github.com/oceanprotocol/ocean.js/pull/1066)
|
|
42
|
+
- Bump @typescript-eslint/eslint-plugin from 4.32.0 to 4.33.0 [`#1062`](https://github.com/oceanprotocol/ocean.js/pull/1062)
|
|
43
|
+
- Bump @typescript-eslint/parser from 4.32.0 to 4.33.0 [`#1061`](https://github.com/oceanprotocol/ocean.js/pull/1061)
|
|
44
|
+
- #1060 Event access control validation [`d7a21e7`](https://github.com/oceanprotocol/ocean.js/commit/d7a21e7e342e2094a864e1d1492324d5810f63db)
|
|
45
|
+
- Fix bug [`be79812`](https://github.com/oceanprotocol/ocean.js/commit/be798129f9cb007d603ce78632c75dcc18506796)
|
|
46
|
+
- Fix codeclimate [`bd4f663`](https://github.com/oceanprotocol/ocean.js/commit/bd4f663113597b9d23f44a56b57d5f1fb5ab3e7b)
|
|
47
|
+
|
|
48
|
+
#### [v0.19.2](https://github.com/oceanprotocol/ocean.js/compare/v0.19.1...v0.19.2)
|
|
49
|
+
|
|
50
|
+
> 4 October 2021
|
|
51
|
+
|
|
52
|
+
- Changing files name event.d.ts -> event.ts [`#1058`](https://github.com/oceanprotocol/ocean.js/pull/1058)
|
|
53
|
+
- Release 0.19.2 [`5af26f0`](https://github.com/oceanprotocol/ocean.js/commit/5af26f08e49c9eb357e2ae9cd8e39dc0b3182448)
|
|
54
|
+
|
|
55
|
+
#### [v0.19.1](https://github.com/oceanprotocol/ocean.js/compare/v0.19.0...v0.19.1)
|
|
56
|
+
|
|
57
|
+
> 4 October 2021
|
|
58
|
+
|
|
59
|
+
- bump contracts + add networks [`#1059`](https://github.com/oceanprotocol/ocean.js/pull/1059)
|
|
60
|
+
- Bump typedoc from 0.21.9 to 0.22.5 [`#1056`](https://github.com/oceanprotocol/ocean.js/pull/1056)
|
|
61
|
+
- Bump web3 from 1.5.3 to 1.6.0 [`#1052`](https://github.com/oceanprotocol/ocean.js/pull/1052)
|
|
62
|
+
- Bump @types/node from 16.10.1 to 16.10.2 [`#1049`](https://github.com/oceanprotocol/ocean.js/pull/1049)
|
|
63
|
+
- Bump @typescript-eslint/eslint-plugin from 4.31.2 to 4.32.0 [`#1045`](https://github.com/oceanprotocol/ocean.js/pull/1045)
|
|
64
|
+
- Bump @typescript-eslint/parser from 4.31.2 to 4.32.0 [`#1044`](https://github.com/oceanprotocol/ocean.js/pull/1044)
|
|
65
|
+
- Bump @types/node from 16.9.6 to 16.10.1 [`#1043`](https://github.com/oceanprotocol/ocean.js/pull/1043)
|
|
66
|
+
- Bump mocha from 9.1.1 to 9.1.2 [`#1042`](https://github.com/oceanprotocol/ocean.js/pull/1042)
|
|
67
|
+
- Release 0.19.1 [`606d5c2`](https://github.com/oceanprotocol/ocean.js/commit/606d5c2a0bbe36b1f7bb7b7b79796ef77d6170bb)
|
|
68
|
+
|
|
7
69
|
#### [v0.19.0](https://github.com/oceanprotocol/ocean.js/compare/v0.18.0...v0.19.0)
|
|
8
70
|
|
|
71
|
+
> 24 September 2021
|
|
72
|
+
|
|
9
73
|
- Custom user parameters [`#944`](https://github.com/oceanprotocol/ocean.js/pull/944)
|
|
74
|
+
- Release 0.19.0 [`9c94a87`](https://github.com/oceanprotocol/ocean.js/commit/9c94a8789c8dc5ca88b798196cfa5fb807811651)
|
|
10
75
|
|
|
11
76
|
#### [v0.18.0](https://github.com/oceanprotocol/ocean.js/compare/v0.18.0-next.0...v0.18.0)
|
|
12
77
|
|
package/README.md
CHANGED
|
@@ -156,7 +156,7 @@ Running all tests requires running Ocean Protocol components beforehand with [Ba
|
|
|
156
156
|
git clone https://github.com/oceanprotocol/barge
|
|
157
157
|
cd barge
|
|
158
158
|
|
|
159
|
-
./start_ocean.sh --with-provider2 --no-dashboard
|
|
159
|
+
./start_ocean.sh --with-provider2 --no-dashboard --with-rbac
|
|
160
160
|
```
|
|
161
161
|
|
|
162
162
|
You can then proceed to run in another terminal.
|
|
@@ -3,6 +3,7 @@ import { AbiItem } from 'web3-utils/types';
|
|
|
3
3
|
import { TransactionReceipt } from 'web3-core';
|
|
4
4
|
import { Pool } from './Pool';
|
|
5
5
|
import { SubscribablePromise, Logger } from '../utils';
|
|
6
|
+
import { ConfigHelperConfig } from '../utils/ConfigHelper';
|
|
6
7
|
declare type PoolTransactionType = 'swap' | 'join' | 'exit';
|
|
7
8
|
export interface PoolDetails {
|
|
8
9
|
poolAddress: string;
|
|
@@ -40,7 +41,7 @@ export declare class OceanPool extends Pool {
|
|
|
40
41
|
oceanAddress: string;
|
|
41
42
|
dtAddress: string;
|
|
42
43
|
startBlock: number;
|
|
43
|
-
constructor(web3: Web3, logger: Logger, factoryABI?: AbiItem | AbiItem[], poolABI?: AbiItem | AbiItem[], factoryAddress?: string, oceanAddress?: string,
|
|
44
|
+
constructor(web3: Web3, logger: Logger, factoryABI?: AbiItem | AbiItem[], poolABI?: AbiItem | AbiItem[], factoryAddress?: string, oceanAddress?: string, config?: ConfigHelperConfig);
|
|
44
45
|
create(account: string, dtAddress: string, dtAmount: string, dtWeight: string, oceanAmount: string, fee: string): SubscribablePromise<PoolCreateProgressStep, TransactionReceipt>;
|
|
45
46
|
getDTAddress(poolAddress: string): Promise<string>;
|
|
46
47
|
getOceanReserve(poolAddress: string): Promise<string>;
|
|
@@ -3,6 +3,7 @@ import { AbiItem } from 'web3-utils/types';
|
|
|
3
3
|
import { TransactionReceipt } from 'web3-core';
|
|
4
4
|
import { Logger } from '../utils';
|
|
5
5
|
import { PoolFactory } from './PoolFactory';
|
|
6
|
+
import { ConfigHelperConfig } from '../utils/ConfigHelper';
|
|
6
7
|
export interface TokensToAdd {
|
|
7
8
|
address: string;
|
|
8
9
|
amount: string;
|
|
@@ -10,7 +11,7 @@ export interface TokensToAdd {
|
|
|
10
11
|
}
|
|
11
12
|
export declare class Pool extends PoolFactory {
|
|
12
13
|
poolABI: AbiItem | AbiItem[];
|
|
13
|
-
constructor(web3: Web3, logger: Logger, factoryABI?: AbiItem | AbiItem[], poolABI?: AbiItem | AbiItem[], factoryAddress?: string);
|
|
14
|
+
constructor(web3: Web3, logger: Logger, factoryABI?: AbiItem | AbiItem[], poolABI?: AbiItem | AbiItem[], factoryAddress?: string, config?: ConfigHelperConfig);
|
|
14
15
|
createPool(account: string): Promise<TransactionReceipt>;
|
|
15
16
|
setup(account: string, poolAddress: string, dataToken: string, dataTokenAmount: string, dataTokenWeight: string, baseToken: string, baseTokenAmount: string, baseTokenWeight: string, swapFee: string): Promise<string>;
|
|
16
17
|
allowance(tokenAdress: string, owner: string, spender: string): Promise<string>;
|
|
@@ -2,12 +2,14 @@ import Web3 from 'web3';
|
|
|
2
2
|
import { AbiItem } from 'web3-utils/types';
|
|
3
3
|
import { Logger } from '../utils';
|
|
4
4
|
import { TransactionReceipt } from 'web3-core';
|
|
5
|
+
import { ConfigHelperConfig } from '../utils/ConfigHelper';
|
|
5
6
|
export declare class PoolFactory {
|
|
6
7
|
GASLIMIT_DEFAULT: number;
|
|
7
8
|
web3: Web3;
|
|
8
9
|
factoryABI: AbiItem | AbiItem[];
|
|
9
10
|
factoryAddress: string;
|
|
10
11
|
logger: Logger;
|
|
11
|
-
|
|
12
|
+
config: ConfigHelperConfig;
|
|
13
|
+
constructor(web3: Web3, logger: Logger, factoryABI?: AbiItem | AbiItem[], factoryAddress?: string, config?: ConfigHelperConfig);
|
|
12
14
|
createPool(account: string): Promise<TransactionReceipt>;
|
|
13
15
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Web3 from 'web3';
|
|
2
2
|
import { AbiItem } from 'web3-utils/types';
|
|
3
|
+
import { ConfigHelperConfig } from '../utils/ConfigHelper';
|
|
3
4
|
import { Logger } from '../utils';
|
|
4
5
|
import { TransactionReceipt } from 'web3-core';
|
|
5
6
|
export declare class DataTokens {
|
|
@@ -10,7 +11,8 @@ export declare class DataTokens {
|
|
|
10
11
|
web3: Web3;
|
|
11
12
|
private logger;
|
|
12
13
|
startBlock: number;
|
|
13
|
-
|
|
14
|
+
private config;
|
|
15
|
+
constructor(factoryAddress: string, factoryABI: AbiItem | AbiItem[], datatokensABI: AbiItem | AbiItem[], web3: Web3, logger: Logger, config?: ConfigHelperConfig);
|
|
14
16
|
generateDtName(wordList?: {
|
|
15
17
|
nouns: string[];
|
|
16
18
|
adjectives: string[];
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
export declare enum CredentialType {
|
|
2
|
-
address = "address",
|
|
3
|
-
credential3Box = "credential3Box"
|
|
4
|
-
}
|
|
5
1
|
export declare type CredentialAction = 'allow' | 'deny';
|
|
6
2
|
export interface Credential {
|
|
7
|
-
type:
|
|
3
|
+
type: string;
|
|
8
4
|
values: string[];
|
|
9
5
|
}
|
|
10
6
|
export interface Credentials {
|
|
@@ -4,6 +4,7 @@ import { AbiItem } from 'web3-utils/types';
|
|
|
4
4
|
import Web3 from 'web3';
|
|
5
5
|
import { SubscribablePromise, Logger } from '../utils';
|
|
6
6
|
import { DataTokens } from '../datatokens/Datatokens';
|
|
7
|
+
import { ConfigHelperConfig } from '../utils/ConfigHelper';
|
|
7
8
|
export interface DispenserToken {
|
|
8
9
|
active: boolean;
|
|
9
10
|
owner: string;
|
|
@@ -30,7 +31,8 @@ export declare class OceanDispenser {
|
|
|
30
31
|
private logger;
|
|
31
32
|
datatokens: DataTokens;
|
|
32
33
|
startBlock: number;
|
|
33
|
-
|
|
34
|
+
private config;
|
|
35
|
+
constructor(web3: Web3, logger: Logger, dispenserAddress: string, dispenserABI: AbiItem | AbiItem[], datatokens: DataTokens, config?: ConfigHelperConfig);
|
|
34
36
|
status(dataTokenAddress: string): Promise<DispenserToken>;
|
|
35
37
|
activate(dataToken: string, maxTokens: string, maxBalance: string, address: string): Promise<TransactionReceipt>;
|
|
36
38
|
deactivate(dataToken: string, address: string): Promise<TransactionReceipt>;
|
|
@@ -4,6 +4,7 @@ import { AbiItem } from 'web3-utils/types';
|
|
|
4
4
|
import Web3 from 'web3';
|
|
5
5
|
import { SubscribablePromise, Logger } from '../utils';
|
|
6
6
|
import { DataTokens } from '../datatokens/Datatokens';
|
|
7
|
+
import { ConfigHelperConfig } from '../utils/ConfigHelper';
|
|
7
8
|
export interface FixedPriceExchange {
|
|
8
9
|
exchangeID?: string;
|
|
9
10
|
exchangeOwner: string;
|
|
@@ -33,7 +34,8 @@ export declare class OceanFixedRateExchange {
|
|
|
33
34
|
private logger;
|
|
34
35
|
datatokens: DataTokens;
|
|
35
36
|
startBlock: number;
|
|
36
|
-
|
|
37
|
+
private config;
|
|
38
|
+
constructor(web3: Web3, logger: Logger, fixedRateExchangeAddress: string, fixedRateExchangeABI: AbiItem | AbiItem[], oceanAddress: string, datatokens: DataTokens, config?: ConfigHelperConfig);
|
|
37
39
|
create(dataToken: string, rate: string, address: string, amount?: string): SubscribablePromise<FixedRateCreateProgressStep, TransactionReceipt>;
|
|
38
40
|
createExchange(baseToken: string, dataToken: string, rate: string, address: string, amount?: string): SubscribablePromise<FixedRateCreateProgressStep, TransactionReceipt>;
|
|
39
41
|
generateExchangeId(dataToken: string, owner: string): Promise<string>;
|