@oceanprotocol/lib 1.0.0-next.0 → 1.0.0-next.4
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 +28 -0
- package/dist/lib.js +2 -0
- package/dist/lib.js.map +1 -0
- package/dist/lib.modern.js +2 -0
- package/dist/lib.modern.js.map +1 -0
- package/dist/lib.module.js +2 -0
- package/dist/lib.module.js.map +1 -0
- package/dist/lib.umd.js +2 -0
- package/dist/lib.umd.js.map +1 -0
- package/dist/{node/src → src}/@types/Asset.d.ts +0 -0
- package/dist/{node/src → src}/@types/Compute.d.ts +0 -0
- package/dist/{node/src → src}/@types/DDO/Credentials.d.ts +0 -0
- package/dist/{node/src → src}/@types/DDO/DDO.d.ts +0 -0
- package/dist/{node/src → src}/@types/DDO/Event.d.ts +0 -0
- package/dist/{node/src → src}/@types/DDO/Metadata.d.ts +0 -0
- package/dist/{node/src → src}/@types/DDO/Service.d.ts +0 -0
- package/dist/{node/src → src}/@types/FileMetadata.d.ts +0 -0
- package/dist/{node/src → src}/@types/Provider.d.ts +0 -0
- package/dist/{node/src → src}/@types/index.d.ts +0 -0
- package/dist/{node/src → src}/aquarius/Aquarius.d.ts +0 -0
- package/dist/{node/src → src}/aquarius/index.d.ts +0 -0
- package/dist/{node/src → src}/factories/NFTFactory.d.ts +0 -0
- package/dist/{node/src → src}/factories/index.d.ts +0 -0
- package/dist/{node/src → src}/index.d.ts +0 -0
- package/dist/{node/src → src}/interfaces/DispenserInterface.d.ts +0 -0
- package/dist/{node/src → src}/interfaces/Erc20Interface.d.ts +0 -0
- package/dist/{node/src → src}/interfaces/FixedRateInterface.d.ts +0 -0
- package/dist/{node/src → src}/interfaces/PoolInterface.d.ts +0 -0
- package/dist/{node/src → src}/interfaces/RouterInterface.d.ts +0 -0
- package/dist/{node/src → src}/interfaces/index.d.ts +0 -0
- package/dist/{node/src → src}/models/Config.d.ts +0 -0
- package/dist/{node/src → src}/models/index.d.ts +0 -0
- package/dist/{node/src → src}/pools/Router.d.ts +0 -0
- package/dist/{node/src → src}/pools/balancer/Pool.d.ts +0 -0
- package/dist/{node/src → src}/pools/balancer/index.d.ts +0 -0
- package/dist/{node/src → src}/pools/dispenser/Dispenser.d.ts +0 -0
- package/dist/{node/src → src}/pools/dispenser/index.d.ts +0 -0
- package/dist/{node/src → src}/pools/fixedRate/FixedRateExchange.d.ts +0 -0
- package/dist/{node/src → src}/pools/fixedRate/index.d.ts +0 -0
- package/dist/{node/src → src}/pools/index.d.ts +0 -0
- package/dist/{node/src → src}/pools/ssContracts/SideStaking.d.ts +0 -0
- package/dist/{node/src → src}/pools/ssContracts/index.d.ts +0 -0
- package/dist/{node/src → src}/provider/Provider.d.ts +0 -0
- package/dist/{node/src → src}/provider/index.d.ts +0 -0
- package/dist/{node/src → src}/tokens/Datatoken.d.ts +0 -0
- package/dist/{node/src → src}/tokens/NFT.d.ts +0 -0
- package/dist/{node/src → src}/tokens/index.d.ts +0 -0
- package/dist/{node/src → src}/utils/ConfigHelper.d.ts +0 -0
- package/dist/{node/src → src}/utils/Constants.d.ts +0 -0
- package/dist/{node/src → src}/utils/ContractParams.d.ts +0 -0
- package/dist/{node/src → src}/utils/ConversionTypeHelper.d.ts +0 -0
- package/dist/{node/src → src}/utils/DatatokenName.d.ts +0 -0
- package/dist/{node/src → src}/utils/DdoHelpers.d.ts +0 -0
- package/dist/{node/src → src}/utils/FetchHelper.d.ts +0 -0
- package/dist/{node/src → src}/utils/GasUtils.d.ts +0 -0
- package/dist/{node/src → src}/utils/Logger.d.ts +0 -0
- package/dist/{node/src → src}/utils/SignatureUtils.d.ts +0 -0
- package/dist/{node/src → src}/utils/index.d.ts +0 -0
- package/dist/test/TestContractHandler.d.ts +44 -0
- package/dist/test/integration/ComputeFlow.test.d.ts +1 -0
- package/dist/test/integration/Provider.test.d.ts +1 -0
- package/dist/test/integration/PublishFlows.test.d.ts +1 -0
- package/dist/test/integration/SimplePublishConsumeFlow.test.d.ts +1 -0
- package/dist/test/integration/config.d.ts +3 -0
- package/dist/test/unit/NftFactory.test.d.ts +1 -0
- package/dist/test/unit/config.d.ts +3 -0
- package/dist/test/unit/pools/Router.test.d.ts +1 -0
- package/dist/test/unit/pools/balancer/Pool.test.d.ts +1 -0
- package/dist/test/unit/pools/dispenser/Dispenser.test.d.ts +1 -0
- package/dist/test/unit/pools/fixedRate/FixedRateExchange.test.d.ts +1 -0
- package/dist/test/unit/pools/ssContracts/SideStaking.test.d.ts +1 -0
- package/dist/test/unit/tokens/Datatoken.test.d.ts +1 -0
- package/dist/test/unit/tokens/Nft.test.d.ts +1 -0
- package/package.json +22 -19
- package/artifacts/ERC721Factory.sol/ERC721Factory.json +0 -1164
- package/artifacts/addresses/address.json +0 -21
- package/artifacts/communityFee/OPFCommunityFeeCollector.sol/OPFCommunityFeeCollector.json +0 -116
- package/artifacts/pools/FactoryRouter.sol/FactoryRouter.json +0 -1086
- package/artifacts/pools/balancer/BPool.sol/BPool.json +0 -1744
- package/artifacts/pools/dispenser/Dispenser.sol/Dispenser.json +0 -358
- package/artifacts/pools/fixedRate/FixedRateExchange.sol/FixedRateExchange.json +0 -917
- package/artifacts/pools/ssContracts/SideStaking.sol/SideStaking.json +0 -428
- package/artifacts/templates/ERC20Template.sol/ERC20Template.json +0 -1382
- package/artifacts/templates/ERC20TemplateEnterprise.sol/ERC20TemplateEnterprise.json +0 -1530
- package/artifacts/templates/ERC721Template.sol/ERC721Template.json +0 -1534
- package/artifacts/utils/mock/MockERC20.sol/MockERC20.json +0 -302
- package/artifacts/utils/mock/MockERC20Decimals.sol/MockERC20Decimals.json +0 -302
- package/dist/node/lib.js +0 -2
- package/dist/node/lib.js.map +0 -1
- package/dist/node/lib.module.js +0 -2
- package/dist/node/lib.module.js.map +0 -1
- package/dist/node/lib.umd.js +0 -2
- package/dist/node/lib.umd.js.map +0 -1
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import Web3 from 'web3';
|
|
2
|
+
import { Contract } from 'web3-eth-contract';
|
|
3
|
+
import { AbiItem } from 'web3-utils/types';
|
|
4
|
+
export declare class TestContractHandler {
|
|
5
|
+
accounts: string[];
|
|
6
|
+
ERC721Factory: Contract;
|
|
7
|
+
ERC20Template: Contract;
|
|
8
|
+
ERC721Template: Contract;
|
|
9
|
+
Router: Contract;
|
|
10
|
+
SideStaking: Contract;
|
|
11
|
+
FixedRate: Contract;
|
|
12
|
+
Dispenser: Contract;
|
|
13
|
+
OPFCollector: Contract;
|
|
14
|
+
PoolTemplate: Contract;
|
|
15
|
+
MockERC20: Contract;
|
|
16
|
+
MockOcean: Contract;
|
|
17
|
+
ERC721FactoryBytecode: string;
|
|
18
|
+
ERC20TemplateBytecode: string;
|
|
19
|
+
ERC721TemplateBytecode: string;
|
|
20
|
+
RouterBytecode: string;
|
|
21
|
+
SideStakingBytecode: string;
|
|
22
|
+
FixedRateBytecode: string;
|
|
23
|
+
DispenserBytecode: string;
|
|
24
|
+
PoolTemplateBytecode: string;
|
|
25
|
+
OPFCollectorBytecode: string;
|
|
26
|
+
MockERC20Bytecode: string;
|
|
27
|
+
OPFBytecode: string;
|
|
28
|
+
factory721Address: string;
|
|
29
|
+
template721Address: string;
|
|
30
|
+
template20Address: string;
|
|
31
|
+
routerAddress: string;
|
|
32
|
+
sideStakingAddress: string;
|
|
33
|
+
fixedRateAddress: string;
|
|
34
|
+
dispenserAddress: string;
|
|
35
|
+
poolTemplateAddress: string;
|
|
36
|
+
opfCollectorAddress: string;
|
|
37
|
+
oceanAddress: string;
|
|
38
|
+
daiAddress: string;
|
|
39
|
+
usdcAddress: string;
|
|
40
|
+
web3: Web3;
|
|
41
|
+
constructor(web3: Web3, ERC721TemplateABI: AbiItem | AbiItem[], ERC20TemplateABI: AbiItem | AbiItem[], PoolTemplateABI?: AbiItem | AbiItem[], ERC721FactoryABI?: AbiItem | AbiItem[], RouterABI?: AbiItem | AbiItem[], SideStakingABI?: AbiItem | AbiItem[], FixedRateABI?: AbiItem | AbiItem[], DispenserABI?: AbiItem | AbiItem[], OPFABI?: AbiItem | AbiItem[], template721Bytecode?: string, template20Bytecode?: string, poolTemplateBytecode?: string, factory721Bytecode?: string, routerBytecode?: string, sideStakingBytecode?: string, fixedRateBytecode?: string, dispenserBytecode?: string, opfBytecode?: string);
|
|
42
|
+
getAccounts(): Promise<string[]>;
|
|
43
|
+
deployContracts(owner: string, routerABI?: AbiItem | AbiItem[]): Promise<void>;
|
|
44
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oceanprotocol/lib",
|
|
3
3
|
"source": "./src/index.ts",
|
|
4
|
-
"version": "1.0.0-next.
|
|
4
|
+
"version": "1.0.0-next.4",
|
|
5
5
|
"description": "JavaScript client library for Ocean Protocol",
|
|
6
|
-
"main": "./dist/
|
|
7
|
-
"
|
|
8
|
-
"module": "./dist/
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
"main": "./dist/lib.js",
|
|
7
|
+
"umd:main": "dist/lib.umd.js",
|
|
8
|
+
"module": "./dist/lib.module.js",
|
|
9
|
+
"exports": {
|
|
10
|
+
"require": "./dist/lib.js",
|
|
11
|
+
"default": "./dist/lib.modern.js"
|
|
12
|
+
},
|
|
13
|
+
"types": "./dist/src/index.d.ts",
|
|
12
14
|
"scripts": {
|
|
13
15
|
"start": "npm run clean && npm run build:metadata && tsc -w",
|
|
14
|
-
"build": "npm run clean && npm run build:metadata && microbundle build --format
|
|
16
|
+
"build": "npm run clean && npm run build:metadata && microbundle build --format modern,esm,cjs,umd --compress --tsconfig tsconfig.json",
|
|
15
17
|
"build:tsc": "tsc --sourceMap",
|
|
16
18
|
"build:metadata": "node ./scripts/get-metadata.js > src/metadata.json",
|
|
17
19
|
"clean": "rm -rf ./dist/ ./doc/ ./.nyc_output",
|
|
@@ -24,18 +26,19 @@
|
|
|
24
26
|
"release": "release-it --non-interactive",
|
|
25
27
|
"changelog": "auto-changelog -p",
|
|
26
28
|
"prepublishOnly": "npm run build",
|
|
27
|
-
"
|
|
28
|
-
"test:
|
|
29
|
-
"test:
|
|
30
|
-
"test:
|
|
31
|
-
"test:
|
|
32
|
-
"test:
|
|
33
|
-
"test:
|
|
34
|
-
"test:
|
|
35
|
-
"test:
|
|
36
|
-
"test:
|
|
29
|
+
"mocha": "TS_NODE_PROJECT='./test/tsconfig.json' mocha --config=test/.mocharc.json --node-env=test --exit",
|
|
30
|
+
"test:ss": "npm run mocha -- 'test/unit/pools/ssContracts/SideStaking.test.ts'",
|
|
31
|
+
"test:fixed": "npm run mocha -- 'test/unit/pools/fixedRate/FixedRateExchange.test.ts'",
|
|
32
|
+
"test:pool": "npm run mocha -- 'test/unit/pools/balancer/Pool.test.ts'",
|
|
33
|
+
"test:dispenser": "npm run mocha -- 'test/unit/pools/dispenser/Dispenser.test.ts'",
|
|
34
|
+
"test:dt": "npm run mocha -- 'test/unit/tokens/Datatoken.test.ts'",
|
|
35
|
+
"test:nftDt": "npm run mocha -- 'test/unit/Nft.test.ts'",
|
|
36
|
+
"test:factory": "npm run mocha -- 'test/unit/NftFactory.test.ts'",
|
|
37
|
+
"test:router": "npm run mocha -- 'test/unit/pools/Router.test.ts'",
|
|
38
|
+
"test:publishAll": "npm run mocha -- 'test/integration/PublishFlows.test.ts'",
|
|
39
|
+
"test:unit": "npm run mocha -- 'test/unit/**/*.test.ts'",
|
|
37
40
|
"test:unit:cover": "nyc --report-dir coverage/unit npm run test:unit",
|
|
38
|
-
"test:integration": "
|
|
41
|
+
"test:integration": "npm run mocha -- 'test/integration/**/*.test.ts'",
|
|
39
42
|
"test:integration:cover": "nyc --report-dir coverage/integration --no-clean npm run test:integration"
|
|
40
43
|
},
|
|
41
44
|
"repository": {
|