@oceanprotocol/lib 1.1.8 → 2.0.0-next.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.
Files changed (78) hide show
  1. package/CHANGELOG.md +28 -16
  2. package/CodeExamples.md +28 -315
  3. package/README.md +4 -7
  4. package/dist/lib.js +1 -1
  5. package/dist/lib.js.map +1 -1
  6. package/dist/lib.modern.js +1 -1
  7. package/dist/lib.modern.js.map +1 -1
  8. package/dist/lib.module.js +1 -1
  9. package/dist/lib.module.js.map +1 -1
  10. package/dist/lib.umd.js +1 -1
  11. package/dist/lib.umd.js.map +1 -1
  12. package/dist/src/@types/Asset.d.ts +4 -4
  13. package/dist/src/@types/Compute.d.ts +1 -1
  14. package/dist/src/@types/DDO/DDO.d.ts +2 -5
  15. package/dist/src/@types/{Erc20.d.ts → Datatoken.d.ts} +18 -1
  16. package/dist/src/@types/Dispenser.d.ts +9 -0
  17. package/dist/src/@types/FixedPrice.d.ts +24 -0
  18. package/dist/src/@types/{Erc721.d.ts → NFT.d.ts} +6 -0
  19. package/dist/src/@types/NFTFactory.d.ts +20 -0
  20. package/dist/src/@types/Provider.d.ts +8 -0
  21. package/dist/src/@types/ReturnTypes.d.ts +2 -0
  22. package/dist/src/@types/Router.d.ts +1 -1
  23. package/dist/src/@types/index.d.ts +11 -8
  24. package/dist/src/{models → config}/Config.d.ts +2 -23
  25. package/dist/src/{utils → config}/ConfigHelper.d.ts +1 -1
  26. package/dist/src/config/index.d.ts +2 -0
  27. package/dist/src/contracts/Datatoken.d.ts +232 -0
  28. package/dist/src/contracts/Dispenser.d.ts +73 -0
  29. package/dist/src/contracts/FixedRateExchange.d.ts +212 -0
  30. package/dist/src/contracts/NFT.d.ts +197 -0
  31. package/dist/src/contracts/NFTFactory.d.ts +144 -0
  32. package/dist/src/contracts/Router.d.ts +92 -0
  33. package/dist/src/contracts/SmartContract.d.ts +22 -0
  34. package/dist/src/contracts/SmartContractWithAddress.d.ts +18 -0
  35. package/dist/src/contracts/index.d.ts +8 -0
  36. package/dist/src/index.d.ts +4 -7
  37. package/dist/src/{aquarius → services}/Aquarius.d.ts +2 -3
  38. package/dist/src/{provider → services}/Provider.d.ts +5 -13
  39. package/dist/src/services/index.d.ts +2 -0
  40. package/dist/src/utils/Constants.d.ts +2 -0
  41. package/dist/src/utils/ContractUtils.d.ts +14 -8
  42. package/dist/src/utils/DdoHelpers.d.ts +1 -1
  43. package/dist/src/utils/FetchHelper.d.ts +1 -4
  44. package/dist/src/utils/Logger.d.ts +0 -1
  45. package/dist/src/utils/TokenUtils.d.ts +17 -39
  46. package/dist/src/utils/index.d.ts +6 -7
  47. package/dist/test/TestContractHandler.d.ts +4 -4
  48. package/dist/test/config.d.ts +1 -1
  49. package/dist/test/unit/{tokens/Datatoken.test.d.ts → Datatoken.test.d.ts} +0 -0
  50. package/dist/test/unit/{pools/dispenser/Dispenser.test.d.ts → Dispenser.test.d.ts} +0 -0
  51. package/dist/test/unit/{pools/fixedRate/FixedRateExchange.test.d.ts → FixedRateExchange.test.d.ts} +0 -0
  52. package/dist/test/unit/{tokens/Nft.test.d.ts → Nft.test.d.ts} +0 -0
  53. package/dist/test/unit/{factories/NftFactory.test.d.ts → NftFactory.test.d.ts} +0 -0
  54. package/dist/test/unit/{pools/Router.test.d.ts → Router.test.d.ts} +0 -0
  55. package/package.json +5 -18
  56. package/dist/src/@types/Pool.d.ts +0 -45
  57. package/dist/src/aquarius/index.d.ts +0 -1
  58. package/dist/src/factories/NFTFactory.d.ts +0 -275
  59. package/dist/src/factories/index.d.ts +0 -1
  60. package/dist/src/models/index.d.ts +0 -1
  61. package/dist/src/pools/Router.d.ts +0 -228
  62. package/dist/src/pools/balancer/Pool.d.ts +0 -395
  63. package/dist/src/pools/balancer/index.d.ts +0 -1
  64. package/dist/src/pools/dispenser/Dispenser.d.ts +0 -145
  65. package/dist/src/pools/dispenser/index.d.ts +0 -1
  66. package/dist/src/pools/fixedRate/FixedRateExchange.d.ts +0 -388
  67. package/dist/src/pools/fixedRate/index.d.ts +0 -1
  68. package/dist/src/pools/index.d.ts +0 -5
  69. package/dist/src/pools/ssContracts/SideStaking.d.ts +0 -133
  70. package/dist/src/pools/ssContracts/index.d.ts +0 -1
  71. package/dist/src/provider/index.d.ts +0 -1
  72. package/dist/src/tokens/Datatoken.d.ts +0 -413
  73. package/dist/src/tokens/NFT.d.ts +0 -364
  74. package/dist/src/tokens/index.d.ts +0 -2
  75. package/dist/src/utils/ConversionTypeHelper.d.ts +0 -3
  76. package/dist/src/utils/PoolHelpers.d.ts +0 -8
  77. package/dist/test/unit/pools/balancer/Pool.test.d.ts +0 -1
  78. package/dist/test/unit/pools/ssContracts/SideStaking.test.d.ts +0 -1
@@ -0,0 +1,18 @@
1
+ import Web3 from 'web3';
2
+ import { Contract } from 'web3-eth-contract';
3
+ import { AbiItem } from 'web3-utils';
4
+ import { Config } from '../config';
5
+ import { SmartContract } from './SmartContract';
6
+ export declare abstract class SmartContractWithAddress extends SmartContract {
7
+ address: string;
8
+ contract: Contract;
9
+ /**
10
+ * Instantiate the smart contract.
11
+ * @param {string} address Address of the smart contract
12
+ * @param {Web3} web3
13
+ * @param {string | number} network Network id or name
14
+ * @param {Config} config Configutation of the smart contract
15
+ * @param {AbiItem | AbiItem[]} abi ABI of the smart contract
16
+ */
17
+ constructor(address: string, web3: Web3, network?: string | number, config?: Config, abi?: AbiItem | AbiItem[]);
18
+ }
@@ -0,0 +1,8 @@
1
+ export * from './SmartContract';
2
+ export * from './SmartContractWithAddress';
3
+ export * from './Dispenser';
4
+ export * from './FixedRateExchange';
5
+ export * from './Router';
6
+ export * from './Datatoken';
7
+ export * from './NFT';
8
+ export * from './NFTFactory';
@@ -1,8 +1,5 @@
1
- export * from './aquarius';
2
- export * from './pools';
3
- export * from './tokens';
4
- export * from './factories';
5
- export * from './models';
6
- export * from './utils';
7
1
  export * from './@types';
8
- export * from './provider';
2
+ export * from './config';
3
+ export * from './contracts';
4
+ export * from './services';
5
+ export * from './utils';
@@ -1,4 +1,4 @@
1
- import { Asset, DDO, ValidateMetadata } from '../@types/';
1
+ import { Asset, DDO, ValidateMetadata } from '../@types';
2
2
  export interface SearchQuery {
3
3
  from?: number;
4
4
  size?: number;
@@ -9,7 +9,7 @@ export interface SearchQuery {
9
9
  aggs?: any;
10
10
  }
11
11
  export declare class Aquarius {
12
- aquariusURL: any;
12
+ aquariusURL: string;
13
13
  /**
14
14
  * Instantiate Aquarius
15
15
  * @param {String} aquariusURL
@@ -52,4 +52,3 @@ export declare class Aquarius {
52
52
  */
53
53
  querySearch(query: SearchQuery, signal?: AbortSignal): Promise<any>;
54
54
  }
55
- export default Aquarius;
@@ -1,16 +1,5 @@
1
1
  import Web3 from 'web3';
2
- import { FileInfo, ComputeJob, ComputeOutput, ComputeAlgorithm, ComputeAsset, ComputeEnvironment, ProviderInitialize, ProviderComputeInitializeResults } from '../@types/';
3
- export interface HttpCallback {
4
- (httpMethod: string, url: string, body: string, header: any): Promise<any>;
5
- }
6
- export interface ServiceEndpoint {
7
- serviceName: string;
8
- method: string;
9
- urlPath: string;
10
- }
11
- export interface UserCustomParameters {
12
- [key: string]: any;
13
- }
2
+ import { FileInfo, ComputeJob, ComputeOutput, ComputeAlgorithm, ComputeAsset, ComputeEnvironment, ProviderInitialize, ProviderComputeInitializeResults, ServiceEndpoint, UserCustomParameters } from '../@types';
14
3
  export declare class Provider {
15
4
  /**
16
5
  * Returns the provider endpoints
@@ -149,6 +138,9 @@ export declare class Provider {
149
138
  * @return {Promise<boolean>} string
150
139
  */
151
140
  isValidProvider(url: string, signal?: AbortSignal): Promise<boolean>;
141
+ private noZeroX;
142
+ private zeroXTransformer;
143
+ private inputMatch;
144
+ private getData;
152
145
  }
153
146
  export declare const ProviderInstance: Provider;
154
- export default ProviderInstance;
@@ -0,0 +1,2 @@
1
+ export * from './Aquarius';
2
+ export * from './Provider';
@@ -1,2 +1,4 @@
1
1
  export declare const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
2
2
  export declare const GASLIMIT_DEFAULT = 1000000;
3
+ export declare const MAX_UINT_256 = "115792089237316195423570985008687907853269984665640564039457584007913129639934";
4
+ export declare const FEE_HISTORY_NOT_SUPPORTED = "Returned error: Method eth_feeHistory not supported.";
@@ -1,13 +1,9 @@
1
1
  import Web3 from 'web3';
2
2
  import { Contract } from 'web3-eth-contract';
3
- import { Erc20CreateParams, FreCreationParams, FreOrderParams, PoolCreationParams } from '../@types';
4
- import { Config } from '../models';
3
+ import { Config } from '../config';
4
+ import { TransactionReceipt } from 'web3-core';
5
5
  export declare function setContractDefaults(contract: Contract, config: Config): Contract;
6
- export declare function getFairGasPrice(web3: Web3, config: Config): Promise<string>;
7
- export declare function getErcCreationParams(ercParams: Erc20CreateParams): any;
8
- export declare function getFreOrderParams(web3: Web3, freParams: FreOrderParams): Promise<any>;
9
- export declare function getFreCreationParams(freParams: FreCreationParams): any;
10
- export declare function getPoolCreationParams(web3: Web3, poolParams: PoolCreationParams): Promise<any>;
6
+ export declare function getFairGasPrice(web3: Web3, gasFeeMultiplier: number): Promise<string>;
11
7
  export declare function unitsToAmount(web3: Web3, token: string, amount: string, tokenDecimals?: number): Promise<string>;
12
8
  export declare function amountToUnits(web3: Web3, token: string, amount: string, tokenDecimals?: number): Promise<string>;
13
9
  /**
@@ -17,4 +13,14 @@ export declare function amountToUnits(web3: Web3, token: string, amount: string,
17
13
  * @param {...any[]} args arguments of the function
18
14
  * @return {Promise<number>} gas cost of the function
19
15
  */
20
- export declare function estimateGas(from: string, functionToEstimateGas: Function, ...args: any[]): Promise<any>;
16
+ export declare function calculateEstimatedGas(from: string, functionToEstimateGas: Function, ...args: any[]): Promise<number>;
17
+ /**
18
+ * Send the transation on chain
19
+ * @param {string} from account that calls the function
20
+ * @param {any} estGas estimated gas for the transaction
21
+ * @param {Web3} web3 web3 objcet
22
+ * @param {Function} functionToSend function that we need to send
23
+ * @param {...any[]} args arguments of the function
24
+ * @return {Promise<any>} transaction receipt
25
+ */
26
+ export declare function sendTx(from: string, estGas: number, web3: Web3, gasFeeMultiplier: number, functionToSend: Function, ...args: any[]): Promise<TransactionReceipt>;
@@ -1,2 +1,2 @@
1
- export declare function generateDid(erc721Address: string, chainId: number): string;
1
+ export declare function generateDid(nftAddress: string, chainId: number): string;
2
2
  export declare function getHash(data: any): string;
@@ -1,6 +1,3 @@
1
- import { DownloadResponse } from '../@types/DownloadResponse';
2
- export declare function fetchData(url: string, opts: RequestInit): Promise<Response>;
1
+ import { DownloadResponse } from '../@types';
3
2
  export declare function downloadFileBrowser(url: string): Promise<void>;
4
3
  export declare function downloadFile(url: string, index?: number): Promise<DownloadResponse>;
5
- export declare function getData(url: string): Promise<Response>;
6
- export declare function postData(url: string, payload: BodyInit): Promise<Response>;
@@ -17,4 +17,3 @@ export declare class Logger {
17
17
  private dispatch;
18
18
  }
19
19
  export declare const LoggerInstance: Logger;
20
- export default LoggerInstance;
@@ -1,27 +1,16 @@
1
- import { Contract } from 'web3-eth-contract';
2
- import { TransactionReceipt } from 'web3-core';
3
1
  import Web3 from 'web3';
4
- /**
5
- * Estimate gas cost for approval function
6
- * @param {String} account
7
- * @param {String} tokenAddress
8
- * @param {String} spender
9
- * @param {String} amount
10
- * @param {String} force
11
- * @param {Contract} contractInstance optional contract instance
12
- * @return {Promise<number>}
13
- */
14
- export declare function estApprove(web3: Web3, account: string, tokenAddress: string, spender: string, amount: string, contractInstance?: Contract): Promise<number>;
2
+ import { Config } from '../config';
3
+ import { ReceiptOrEstimate } from '../@types';
15
4
  /**
16
5
  * Approve spender to spent amount tokens
17
6
  * @param {String} account
18
7
  * @param {String} tokenAddress
19
8
  * @param {String} spender
20
- * @param {String} amount amount of ERC20 tokens (always expressed as wei)
9
+ * @param {String} amount amount of ERC20 Datatokens (always expressed as wei)
21
10
  * @param {boolean} force if true, will overwrite any previous allowence. Else, will check if allowence is enough and will not send a transaction if it's not needed
22
11
  * @param {number} tokenDecimals optional number of decimals of the token
23
12
  */
24
- export declare function approve(web3: Web3, account: string, tokenAddress: string, spender: string, amount: string, force?: boolean, tokenDecimals?: number): Promise<TransactionReceipt | string>;
13
+ export declare function approve<G extends boolean = false>(web3: Web3, config: Config, account: string, tokenAddress: string, spender: string, amount: string, force?: boolean, tokenDecimals?: number, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
25
14
  /**
26
15
  * Approve spender to spent amount tokens
27
16
  * @param {String} account
@@ -30,29 +19,18 @@ export declare function approve(web3: Web3, account: string, tokenAddress: strin
30
19
  * @param {String} amount amount of ERC20 tokens (always expressed as wei)
31
20
  * @param {boolean} force if true, will overwrite any previous allowence. Else, will check if allowence is enough and will not send a transaction if it's not needed
32
21
  */
33
- export declare function approveWei(web3: Web3, account: string, tokenAddress: string, spender: string, amount: string, force?: boolean): Promise<TransactionReceipt | string>;
34
- /**
35
- * Estimate gas cost for transfer function
36
- * @param {String} account
37
- * @param {String} tokenAddress
38
- * @param {String} recipient
39
- * @param {String} amount
40
- * @param {String} force
41
- * @param {Contract} contractInstance optional contract instance
42
- * @return {Promise<number>}
43
- */
44
- export declare function estTransfer(web3: Web3, account: string, tokenAddress: string, recipient: string, amount: string, contractInstance?: Contract): Promise<number>;
22
+ export declare function approveWei<G extends boolean = false>(web3: Web3, config: Config, account: string, tokenAddress: string, spender: string, amount: string, force?: boolean, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
45
23
  /**
46
24
  * Moves amount tokens from the caller’s account to recipient.
47
25
  * @param {String} account
48
26
  * @param {String} tokenAddress
49
27
  * @param {String} recipient
50
- * @param {String} amount amount of ERC20 tokens (not as wei)
28
+ * @param {String} amount amount of ERC20 Datatokens (not as wei)
51
29
  * @param {String} force if true, will overwrite any previous allowence. Else, will check if allowence is enough and will not send a transaction if it's not needed
52
30
  */
53
- export declare function transfer(web3: Web3, account: string, tokenAddress: string, recipient: string, amount: string): Promise<TransactionReceipt | string>;
31
+ export declare function transfer<G extends boolean = false>(web3: Web3, config: Config, account: string, tokenAddress: string, recipient: string, amount: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
54
32
  /**
55
- * Get Allowance for any erc20
33
+ * Get Allowance for any Datatoken
56
34
  * @param {Web3} web3
57
35
  * @param {String } tokenAdress
58
36
  * @param {String} account
@@ -61,24 +39,24 @@ export declare function transfer(web3: Web3, account: string, tokenAddress: stri
61
39
  */
62
40
  export declare function allowance(web3: Web3, tokenAddress: string, account: string, spender: string, tokenDecimals?: number): Promise<string>;
63
41
  /**
64
- * Get Allowance for any erc20
42
+ * Get balance for any Datatoken
65
43
  * @param {Web3} web3
66
- * @param {String } tokenAdress
67
- * @param {String} account
44
+ * @param {String} tokenAdress
45
+ * @param {String} owner
68
46
  * @param {String} spender
47
+ * @param {number} tokenDecimals optional number of decimals of the token
69
48
  */
70
- export declare function allowanceWei(web3: Web3, tokenAddress: string, account: string, spender: string, tokenDecimals?: number): Promise<string>;
49
+ export declare function balance(web3: Web3, tokenAddress: string, account: string, tokenDecimals?: number): Promise<string>;
71
50
  /**
72
- * Get balance for any erc20
51
+ * Get Allowance for any erc20
73
52
  * @param {Web3} web3
74
53
  * @param {String} tokenAdress
75
- * @param {String} owner
54
+ * @param {String} account
76
55
  * @param {String} spender
77
- * @param {number} tokenDecimals optional number of decimals of the token
78
56
  */
79
- export declare function balance(web3: Web3, tokenAddress: string, account: string, tokenDecimals?: number): Promise<string>;
57
+ export declare function allowanceWei(web3: Web3, tokenAddress: string, account: string, spender: string, tokenDecimals?: number): Promise<string>;
80
58
  /**
81
- * Get decimals for any erc20
59
+ * Get decimals for any Datatoken
82
60
  * @param {Web3} web3
83
61
  * @param {String} tokenAdress
84
62
  * @return {Promise<number>} Number of decimals of the token
@@ -1,11 +1,10 @@
1
- export * from './Logger';
2
- export * from './DatatokenName';
1
+ export * from './Constants';
3
2
  export * from './ContractUtils';
4
- export * from './FetchHelper';
5
- export * from './ConfigHelper';
3
+ export * from './DatatokenName';
6
4
  export * from './DdoHelpers';
7
- export * from './Constants';
5
+ export * from './FetchHelper';
6
+ export * from './General';
7
+ export * from './Logger';
8
+ export * from './minAbi';
8
9
  export * from './SignatureUtils';
9
10
  export * from './TokenUtils';
10
- export * from './General';
11
- export * from './PoolHelpers';
@@ -1,16 +1,16 @@
1
1
  import Web3 from 'web3';
2
2
  export interface Addresses {
3
3
  opfCommunityFeeCollectorAddress: string;
4
- poolTemplateAddress: string;
5
- erc20TemplateAddress: string;
6
- erc721TemplateAddress: string;
4
+ datatokenTemplateAddress: string;
5
+ nftTemplateAddress: string;
7
6
  oceanAddress: string;
8
7
  routerAddress: string;
9
8
  sideStakingAddress: string;
10
9
  fixedRateAddress: string;
11
10
  dispenserAddress: string;
12
- erc721FactoryAddress: string;
11
+ nftFactoryAddress: string;
13
12
  daiAddress: string;
14
13
  usdcAddress: string;
14
+ poolTemplateAddress: string;
15
15
  }
16
16
  export declare const deployContracts: (web3: Web3, owner: string) => Promise<Addresses>;
@@ -1,5 +1,5 @@
1
1
  import Web3 from 'web3';
2
2
  export declare const GAS_PRICE = "3000000000";
3
3
  export declare const web3: Web3;
4
- export declare const getTestConfig: (web3: Web3) => Promise<import("../src").Config>;
4
+ export declare const getTestConfig: (web3: Web3) => Promise<import("../src/config").Config>;
5
5
  export declare const getAddresses: () => any;
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.8",
4
+ "version": "2.0.0-next.0",
5
5
  "description": "JavaScript client library for Ocean Protocol",
6
6
  "main": "./dist/lib.js",
7
7
  "umd:main": "dist/lib.umd.js",
@@ -27,25 +27,12 @@
27
27
  "changelog": "auto-changelog -p",
28
28
  "prepublishOnly": "npm run build",
29
29
  "mocha": "TS_NODE_PROJECT='./test/tsconfig.json' mocha --config=test/.mocharc.json --node-env=test --exit",
30
- "test:nftfactory": "npm run mocha -- 'test/unit/factories/NftFactory.test.ts'",
31
- "test:nft": "npm run mocha -- 'test/unit/tokens/Nft.test.ts'",
32
- "test:datatoken": "npm run mocha -- 'test/unit/tokens/Datatoken.test.ts'",
33
- "test:router": "npm run mocha -- 'test/unit/pools/Router.test.ts'",
34
- "test:fixed": "npm run mocha -- 'test/unit/pools/fixedRate/FixedRateExchange.test.ts'",
35
- "test:ss": "npm run mocha -- 'test/unit/pools/ssContracts/SideStaking.test.ts'",
36
- "test:pool": "npm run mocha -- 'test/unit/pools/balancer/Pool.test.ts'",
37
- "test:dispenser": "npm run mocha -- 'test/unit/pools/dispenser/Dispenser.test.ts'",
38
- "test:publishAll": "npm run mocha -- 'test/integration/PublishFlows.test.ts'",
39
- "test:examples": "npm run mocha -- 'test/integration/CodeExamples.test.ts'",
40
- "test:provider": "npm run mocha -- 'test/integration/Provider.test.ts'",
41
30
  "test:unit": "npm run mocha -- 'test/unit/**/*.test.ts'",
42
31
  "test:unit:cover": "nyc --report-dir coverage/unit --exclude 'src/@types/**/*' npm run test:unit",
43
32
  "test:integration": "npm run mocha -- 'test/integration/**/*.test.ts'",
44
- "test:compute": "npm run mocha -- 'test/integration/ComputeFlow.test.ts'",
45
- "test:integration:cover": "nyc --report-dir coverage/integration --exclude 'src/@types/**/*' --no-clean npm run test:integration",
46
- "create:guide": "chmod +x ./scripts/createCodeExamples.sh && ./scripts/createCodeExamples.sh",
47
- "create:guide:mac": "chmod +x ./scripts/createCodeExamples-mac.sh && ./scripts/createCodeExamples-mac.sh",
48
- "commit:guide": "chmod +x scripts/commitChanges.sh && scripts/commitChanges.sh"
33
+ "test:integration:cover": "nyc --report-dir coverage/integration --no-clean npm run test:integration",
34
+ "create:guide": "./scripts/createCodeExamples.sh",
35
+ "commit:guide": "./scripts/commitChanges.sh"
49
36
  },
50
37
  "repository": {
51
38
  "type": "git",
@@ -96,7 +83,7 @@
96
83
  "nyc": "^15.1.0",
97
84
  "ora": "5.4.1",
98
85
  "prettier": "^2.7.1",
99
- "release-it": "^15.1.1",
86
+ "release-it": "^15.4.0",
100
87
  "source-map-support": "^0.5.19",
101
88
  "ts-node": "^10.8.2",
102
89
  "ts-node-register": "^1.0.0",
@@ -1,45 +0,0 @@
1
- export interface PoolCreationParams {
2
- ssContract: string;
3
- baseTokenAddress: string;
4
- baseTokenSender: string;
5
- publisherAddress: string;
6
- marketFeeCollector: string;
7
- poolTemplateAddress: string;
8
- rate: string;
9
- baseTokenDecimals: number;
10
- vestingAmount: string;
11
- vestedBlocks: number;
12
- initialBaseTokenLiquidity: string;
13
- swapFeeLiquidityProvider: string;
14
- swapFeeMarketRunner: string;
15
- }
16
- export interface CurrentFees {
17
- tokens: string[];
18
- amounts: string[];
19
- }
20
- export interface TokenInOutMarket {
21
- tokenIn: string;
22
- tokenOut: string;
23
- marketFeeAddress: string;
24
- tokenInDecimals?: number;
25
- tokenOutDecimals?: number;
26
- }
27
- export interface AmountsInMaxFee {
28
- tokenAmountIn: string;
29
- minAmountOut: string;
30
- swapMarketFee: string;
31
- maxPrice?: string;
32
- }
33
- export interface AmountsOutMaxFee {
34
- tokenAmountOut: string;
35
- maxAmountIn: string;
36
- swapMarketFee: string;
37
- maxPrice?: string;
38
- }
39
- export interface PoolPriceAndFees {
40
- tokenAmount: string;
41
- liquidityProviderSwapFeeAmount: string;
42
- oceanFeeAmount: string;
43
- publishMarketSwapFeeAmount: string;
44
- consumeMarketSwapFeeAmount: string;
45
- }
@@ -1 +0,0 @@
1
- export * from './Aquarius';