@oceanprotocol/lib 0.20.2 → 1.0.0-next.3
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 +61 -0
- package/README.md +1 -1
- 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/src/@types/Asset.d.ts +36 -0
- package/dist/{node/ocean/interfaces → src/@types}/Compute.d.ts +13 -12
- package/dist/src/@types/DDO/Credentials.d.ts +8 -0
- package/dist/src/@types/DDO/DDO.d.ts +15 -0
- package/dist/src/@types/DDO/Event.d.ts +7 -0
- package/dist/src/@types/DDO/Metadata.d.ts +38 -0
- package/dist/src/@types/DDO/Service.d.ts +28 -0
- package/dist/src/@types/FileMetadata.d.ts +8 -0
- package/dist/src/@types/Provider.d.ts +15 -0
- package/dist/src/@types/index.d.ts +8 -0
- package/dist/src/aquarius/Aquarius.d.ts +10 -0
- package/dist/src/aquarius/index.d.ts +1 -0
- package/dist/src/factories/NFTFactory.d.ts +70 -0
- package/dist/src/factories/index.d.ts +1 -0
- package/dist/src/index.d.ts +8 -0
- package/dist/src/interfaces/DispenserInterface.d.ts +7 -0
- package/dist/src/interfaces/Erc20Interface.d.ts +11 -0
- package/dist/src/interfaces/FixedRateInterface.d.ts +19 -0
- package/dist/src/interfaces/PoolInterface.d.ts +36 -0
- package/dist/src/interfaces/RouterInterface.d.ts +12 -0
- package/dist/src/interfaces/index.d.ts +5 -0
- package/dist/{node → src}/models/Config.d.ts +10 -7
- package/dist/src/models/index.d.ts +1 -0
- package/dist/src/pools/Router.d.ts +46 -0
- package/dist/src/pools/balancer/Pool.d.ts +73 -0
- package/dist/src/pools/balancer/index.d.ts +1 -0
- package/dist/src/pools/dispenser/Dispenser.d.ts +37 -0
- package/dist/src/pools/dispenser/index.d.ts +1 -0
- package/dist/src/pools/fixedRate/FixedRateExchange.d.ts +95 -0
- package/dist/src/pools/fixedRate/index.d.ts +1 -0
- package/dist/src/pools/index.d.ts +3 -0
- package/dist/src/pools/ssContracts/SideStaking.d.ts +28 -0
- package/dist/src/pools/ssContracts/index.d.ts +1 -0
- package/dist/src/provider/Provider.d.ts +31 -0
- package/dist/src/provider/index.d.ts +1 -0
- package/dist/src/tokens/Datatoken.d.ts +77 -0
- package/dist/src/tokens/NFT.d.ts +57 -0
- package/dist/src/tokens/index.d.ts +2 -0
- package/dist/src/utils/ConfigHelper.d.ts +6 -0
- package/dist/src/utils/Constants.d.ts +1 -0
- package/dist/src/utils/ContractParams.d.ts +4 -0
- package/dist/src/utils/ConversionTypeHelper.d.ts +3 -0
- package/dist/{node/utils/Datatokens.d.ts → src/utils/DatatokenName.d.ts} +1 -1
- package/dist/src/utils/DdoHelpers.d.ts +2 -0
- package/dist/src/utils/FetchHelper.d.ts +5 -0
- package/dist/src/utils/GasUtils.d.ts +2 -0
- package/dist/{node → src}/utils/Logger.d.ts +0 -0
- package/dist/src/utils/SignatureUtils.d.ts +8 -0
- package/dist/src/utils/index.d.ts +9 -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/docs/beginners_guide.md +2 -2
- package/docs/quickstart_simple.md +2 -2
- package/package.json +38 -31
- package/dist/node/Instantiable.abstract.d.ts +0 -25
- package/dist/node/balancer/OceanPool.d.ts +0 -95
- package/dist/node/balancer/Pool.d.ts +0 -56
- package/dist/node/balancer/PoolFactory.d.ts +0 -15
- package/dist/node/datatokens/ContractEvent.d.ts +0 -19
- package/dist/node/datatokens/ContractHandler.d.ts +0 -12
- package/dist/node/datatokens/Datatokens.d.ts +0 -44
- package/dist/node/datatokens/EventHandler.d.ts +0 -19
- package/dist/node/datatokens/Network.d.ts +0 -5
- package/dist/node/datatokens/Web3Provider.d.ts +0 -5
- package/dist/node/datatokens/contracts/ContractBase.d.ts +0 -27
- package/dist/node/ddo/DDO.d.ts +0 -36
- package/dist/node/ddo/interfaces/AdditionalInformation.d.ts +0 -16
- package/dist/node/ddo/interfaces/Authentication.d.ts +0 -4
- package/dist/node/ddo/interfaces/BestPrice.d.ts +0 -10
- package/dist/node/ddo/interfaces/Consumable.d.ts +0 -5
- package/dist/node/ddo/interfaces/Credentials.d.ts +0 -9
- package/dist/node/ddo/interfaces/Curation.d.ts +0 -6
- package/dist/node/ddo/interfaces/DataTokenInfo.d.ts +0 -10
- package/dist/node/ddo/interfaces/EditableMetadata.d.ts +0 -9
- package/dist/node/ddo/interfaces/EditableMetadataLinks.d.ts +0 -5
- package/dist/node/ddo/interfaces/Event.d.ts +0 -7
- package/dist/node/ddo/interfaces/File.d.ts +0 -13
- package/dist/node/ddo/interfaces/Metadata.d.ts +0 -15
- package/dist/node/ddo/interfaces/MetadataAlgorithm.d.ts +0 -12
- package/dist/node/ddo/interfaces/MetadataMain.d.ts +0 -12
- package/dist/node/ddo/interfaces/Proof.d.ts +0 -6
- package/dist/node/ddo/interfaces/PublicKey.d.ts +0 -8
- package/dist/node/ddo/interfaces/PurgatoryData.d.ts +0 -4
- package/dist/node/ddo/interfaces/Service.d.ts +0 -99
- package/dist/node/ddo/interfaces/ServicePrices.d.ts +0 -4
- package/dist/node/ddo/interfaces/Status.d.ts +0 -5
- package/dist/node/ddo/interfaces/index.d.ts +0 -17
- package/dist/node/dispenser/Dispenser.d.ts +0 -44
- package/dist/node/exchange/FixedRateExchange.d.ts +0 -59
- package/dist/node/index.d.ts +0 -1
- package/dist/node/lib.d.ts +0 -15
- 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
- package/dist/node/metadatacache/MetadataCache.d.ts +0 -41
- package/dist/node/metadatacache/OnChainMetaData.d.ts +0 -31
- package/dist/node/ocean/Account.d.ts +0 -16
- package/dist/node/ocean/Accounts.d.ts +0 -9
- package/dist/node/ocean/Assets.d.ts +0 -56
- package/dist/node/ocean/AssetsCredential.d.ts +0 -6
- package/dist/node/ocean/Compute.d.ts +0 -75
- package/dist/node/ocean/DID.d.ts +0 -8
- package/dist/node/ocean/EventAccessControl.d.ts +0 -9
- package/dist/node/ocean/Ocean.d.ts +0 -34
- package/dist/node/ocean/OceanAuth.d.ts +0 -15
- package/dist/node/ocean/Versions.d.ts +0 -25
- package/dist/node/ocean/utils/SignatureUtils.d.ts +0 -13
- package/dist/node/ocean/utils/Utils.d.ts +0 -8
- package/dist/node/ocean/utils/WebServiceConnector.d.ts +0 -16
- package/dist/node/provider/Provider.d.ts +0 -56
- package/dist/node/utils/AssetResolverHelper.d.ts +0 -8
- package/dist/node/utils/ConfigHelper.d.ts +0 -17
- package/dist/node/utils/ContractUtils.d.ts +0 -5
- package/dist/node/utils/ConversionTypeHelpers.d.ts +0 -8
- package/dist/node/utils/GeneratorHelpers.d.ts +0 -1
- package/dist/node/utils/PromiseResolver.d.ts +0 -3
- package/dist/node/utils/SubscribableObserver.d.ts +0 -12
- package/dist/node/utils/SubscribablePromise.d.ts +0 -14
- package/dist/node/utils/Timeout.d.ts +0 -1
- package/dist/node/utils/index.d.ts +0 -9
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export * from './AdditionalInformation';
|
|
2
|
-
export * from './Authentication';
|
|
3
|
-
export * from './BestPrice';
|
|
4
|
-
export * from './Curation';
|
|
5
|
-
export * from './EditableMetadata';
|
|
6
|
-
export * from './EditableMetadataLinks';
|
|
7
|
-
export * from './Event';
|
|
8
|
-
export * from './File';
|
|
9
|
-
export * from './Metadata';
|
|
10
|
-
export * from './MetadataAlgorithm';
|
|
11
|
-
export * from './MetadataMain';
|
|
12
|
-
export * from './Proof';
|
|
13
|
-
export * from './PublicKey';
|
|
14
|
-
export * from './Service';
|
|
15
|
-
export * from './ServicePrices';
|
|
16
|
-
export * from './PurgatoryData';
|
|
17
|
-
export * from './Credentials';
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { TransactionReceipt } from 'web3-core';
|
|
2
|
-
import { Contract } from 'web3-eth-contract';
|
|
3
|
-
import { AbiItem } from 'web3-utils/types';
|
|
4
|
-
import Web3 from 'web3';
|
|
5
|
-
import { SubscribablePromise, Logger } from '../utils';
|
|
6
|
-
import { DataTokens } from '../datatokens/Datatokens';
|
|
7
|
-
import { ConfigHelperConfig } from '../utils/ConfigHelper';
|
|
8
|
-
export interface DispenserToken {
|
|
9
|
-
active: boolean;
|
|
10
|
-
owner: string;
|
|
11
|
-
minterApproved: boolean;
|
|
12
|
-
isTrueMinter: boolean;
|
|
13
|
-
maxTokens: string;
|
|
14
|
-
maxBalance: string;
|
|
15
|
-
balance: string;
|
|
16
|
-
}
|
|
17
|
-
export declare enum DispenserMakeMinterProgressStep {
|
|
18
|
-
MakeDispenserMinter = 0,
|
|
19
|
-
AcceptingNewMinter = 1
|
|
20
|
-
}
|
|
21
|
-
export declare enum DispenserCancelMinterProgressStep {
|
|
22
|
-
MakeOwnerMinter = 0,
|
|
23
|
-
AcceptingNewMinter = 1
|
|
24
|
-
}
|
|
25
|
-
export declare class OceanDispenser {
|
|
26
|
-
GASLIMIT_DEFAULT: number;
|
|
27
|
-
dispenserAddress: string;
|
|
28
|
-
dispenserABI: AbiItem | AbiItem[];
|
|
29
|
-
web3: Web3;
|
|
30
|
-
contract: Contract;
|
|
31
|
-
private logger;
|
|
32
|
-
datatokens: DataTokens;
|
|
33
|
-
startBlock: number;
|
|
34
|
-
private config;
|
|
35
|
-
constructor(web3: Web3, logger: Logger, dispenserAddress: string, dispenserABI: AbiItem | AbiItem[], datatokens: DataTokens, config?: ConfigHelperConfig);
|
|
36
|
-
status(dataTokenAddress: string): Promise<DispenserToken>;
|
|
37
|
-
activate(dataToken: string, maxTokens: string, maxBalance: string, address: string): Promise<TransactionReceipt>;
|
|
38
|
-
deactivate(dataToken: string, address: string): Promise<TransactionReceipt>;
|
|
39
|
-
makeMinter(dataToken: string, address: string): SubscribablePromise<DispenserMakeMinterProgressStep, TransactionReceipt>;
|
|
40
|
-
cancelMinter(dataToken: string, address: string): SubscribablePromise<DispenserCancelMinterProgressStep, TransactionReceipt>;
|
|
41
|
-
dispense(dataToken: string, address: string, amount?: string): Promise<TransactionReceipt>;
|
|
42
|
-
ownerWithdraw(dataToken: string, address: string): Promise<TransactionReceipt>;
|
|
43
|
-
isDispensable(dataToken: string, address: string, amount?: string): Promise<Boolean>;
|
|
44
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { TransactionReceipt } from 'web3-core';
|
|
2
|
-
import { Contract } from 'web3-eth-contract';
|
|
3
|
-
import { AbiItem } from 'web3-utils/types';
|
|
4
|
-
import Web3 from 'web3';
|
|
5
|
-
import { SubscribablePromise, Logger } from '../utils';
|
|
6
|
-
import { DataTokens } from '../datatokens/Datatokens';
|
|
7
|
-
import { ConfigHelperConfig } from '../utils/ConfigHelper';
|
|
8
|
-
export interface FixedPriceExchange {
|
|
9
|
-
exchangeID?: string;
|
|
10
|
-
exchangeOwner: string;
|
|
11
|
-
dataToken: string;
|
|
12
|
-
baseToken: string;
|
|
13
|
-
fixedRate: string;
|
|
14
|
-
active: boolean;
|
|
15
|
-
supply: string;
|
|
16
|
-
}
|
|
17
|
-
export interface FixedPriceSwap {
|
|
18
|
-
exchangeID: string;
|
|
19
|
-
caller: string;
|
|
20
|
-
baseTokenAmount: string;
|
|
21
|
-
dataTokenAmount: string;
|
|
22
|
-
}
|
|
23
|
-
export declare enum FixedRateCreateProgressStep {
|
|
24
|
-
CreatingExchange = 0,
|
|
25
|
-
ApprovingDatatoken = 1
|
|
26
|
-
}
|
|
27
|
-
export declare class OceanFixedRateExchange {
|
|
28
|
-
GASLIMIT_DEFAULT: number;
|
|
29
|
-
oceanAddress: string;
|
|
30
|
-
fixedRateExchangeAddress: string;
|
|
31
|
-
fixedRateExchangeABI: AbiItem | AbiItem[];
|
|
32
|
-
web3: Web3;
|
|
33
|
-
contract: Contract;
|
|
34
|
-
private logger;
|
|
35
|
-
datatokens: DataTokens;
|
|
36
|
-
startBlock: number;
|
|
37
|
-
private config;
|
|
38
|
-
constructor(web3: Web3, logger: Logger, fixedRateExchangeAddress: string, fixedRateExchangeABI: AbiItem | AbiItem[], oceanAddress: string, datatokens: DataTokens, config?: ConfigHelperConfig);
|
|
39
|
-
create(dataToken: string, rate: string, address: string, amount?: string): SubscribablePromise<FixedRateCreateProgressStep, TransactionReceipt>;
|
|
40
|
-
createExchange(baseToken: string, dataToken: string, rate: string, address: string, amount?: string): SubscribablePromise<FixedRateCreateProgressStep, TransactionReceipt>;
|
|
41
|
-
generateExchangeId(dataToken: string, owner: string): Promise<string>;
|
|
42
|
-
buyDT(exchangeId: string, dataTokenAmount: string, address: string): Promise<TransactionReceipt>;
|
|
43
|
-
getNumberOfExchanges(): Promise<number>;
|
|
44
|
-
setRate(exchangeId: string, newRate: number, address: string): Promise<TransactionReceipt>;
|
|
45
|
-
activate(exchangeId: string, address: string): Promise<TransactionReceipt>;
|
|
46
|
-
deactivate(exchangeId: string, address: string): Promise<TransactionReceipt>;
|
|
47
|
-
getRate(exchangeId: string): Promise<string>;
|
|
48
|
-
getSupply(exchangeId: string): Promise<string>;
|
|
49
|
-
getOceanNeeded(exchangeId: string, dataTokenAmount: string): Promise<string>;
|
|
50
|
-
getExchange(exchangeId: string): Promise<FixedPriceExchange>;
|
|
51
|
-
getExchanges(): Promise<string[]>;
|
|
52
|
-
isActive(exchangeId: string): Promise<boolean>;
|
|
53
|
-
CalcInGivenOut(exchangeId: string, dataTokenAmount: string): Promise<string>;
|
|
54
|
-
searchforDT(dataTokenAddress: string, minSupply: string): Promise<FixedPriceExchange[]>;
|
|
55
|
-
getExchangesbyCreator(account?: string): Promise<FixedPriceExchange[]>;
|
|
56
|
-
getExchangeSwaps(exchangeId: string, account?: string): Promise<FixedPriceSwap[]>;
|
|
57
|
-
getAllExchangesSwaps(account: string): Promise<FixedPriceSwap[]>;
|
|
58
|
-
private getEventData;
|
|
59
|
-
}
|
package/dist/node/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './lib';
|
package/dist/node/lib.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import Config from './models/Config';
|
|
2
|
-
import Account from './ocean/Account';
|
|
3
|
-
import DID from './ocean/DID';
|
|
4
|
-
import { Ocean } from './ocean/Ocean';
|
|
5
|
-
import { LoggerInstance as Logger, LogLevel } from './utils/Logger';
|
|
6
|
-
import { MetadataCache } from './metadatacache/MetadataCache';
|
|
7
|
-
import { DataTokens } from './datatokens/Datatokens';
|
|
8
|
-
import { ConfigHelper, ConfigHelperConfig } from './utils/ConfigHelper';
|
|
9
|
-
import * as utils from './utils';
|
|
10
|
-
import { Provider } from './provider/Provider';
|
|
11
|
-
export * from './ddo/DDO';
|
|
12
|
-
export * from './ddo/interfaces';
|
|
13
|
-
export { CreateProgressStep, OrderProgressStep } from './ocean/Assets';
|
|
14
|
-
export { OceanPlatformTechStatus, OceanPlatformTech, OceanPlatformVersions } from './ocean/Versions';
|
|
15
|
-
export { Ocean, Account, Config, DID, Logger, LogLevel, Provider, MetadataCache, DataTokens, utils, ConfigHelper, ConfigHelperConfig };
|