@oceanprotocol/lib 0.19.3 → 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 CHANGED
@@ -4,8 +4,20 @@ 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
+
7
17
  #### [v0.19.3](https://github.com/oceanprotocol/ocean.js/compare/v0.19.2...v0.19.3)
8
18
 
19
+ > 26 November 2021
20
+
9
21
  - Feature/issue 1060 change credential type [`#1073`](https://github.com/oceanprotocol/ocean.js/pull/1073)
10
22
  - Bump @truffle/hdwallet-provider from 1.5.1 to 1.6.0 [`#1103`](https://github.com/oceanprotocol/ocean.js/pull/1103)
11
23
  - Bump @types/node from 16.11.4 to 16.11.7 [`#1108`](https://github.com/oceanprotocol/ocean.js/pull/1108)
@@ -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, startBlock?: number);
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
- constructor(web3: Web3, logger: Logger, factoryABI?: AbiItem | AbiItem[], factoryAddress?: string);
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
- constructor(factoryAddress: string, factoryABI: AbiItem | AbiItem[], datatokensABI: AbiItem | AbiItem[], web3: Web3, logger: Logger, startBlock?: number);
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[];
@@ -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
- constructor(web3: Web3, logger: Logger, dispenserAddress: string, dispenserABI: AbiItem | AbiItem[], datatokens: DataTokens, startBlock?: number);
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
- constructor(web3: Web3, logger: Logger, fixedRateExchangeAddress: string, fixedRateExchangeABI: AbiItem | AbiItem[], oceanAddress: string, datatokens: DataTokens, startBlock?: number);
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>;