@oceanprotocol/lib 1.0.0-next.0 → 1.0.0-next.12
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 +97 -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/src/@types/Asset.d.ts +119 -0
- package/dist/{node/src → src}/@types/Compute.d.ts +17 -0
- package/dist/{node/src → src}/@types/DDO/Credentials.d.ts +0 -0
- package/dist/src/@types/DDO/DDO.d.ts +58 -0
- package/dist/src/@types/DDO/Event.d.ts +27 -0
- package/dist/src/@types/DDO/Metadata.d.ts +126 -0
- package/dist/src/@types/DDO/Service.d.ts +124 -0
- package/dist/{node/src/interfaces/DispenserInterface.d.ts → src/@types/Dispenser.d.ts} +0 -0
- package/dist/src/@types/DownloadResponse.d.ts +4 -0
- package/dist/{node/src/interfaces/Erc20Interface.d.ts → src/@types/Erc20.d.ts} +0 -0
- package/dist/src/@types/Erc721.d.ts +12 -0
- package/dist/src/@types/FileMetadata.d.ts +38 -0
- package/dist/{node/src/interfaces/FixedRateInterface.d.ts → src/@types/FixedPrice.d.ts} +1 -1
- package/dist/{node/src/interfaces/PoolInterface.d.ts → src/@types/Pool.d.ts} +4 -4
- package/dist/{node/src → src}/@types/Provider.d.ts +3 -2
- package/dist/src/@types/Router.d.ts +59 -0
- package/dist/{node/src → src}/@types/index.d.ts +6 -0
- package/dist/src/aquarius/Aquarius.d.ts +32 -0
- package/dist/{node/src → src}/aquarius/index.d.ts +0 -0
- package/dist/src/factories/NFTFactory.d.ts +273 -0
- package/dist/{node/src → src}/factories/index.d.ts +0 -0
- package/dist/{node/src → src}/index.d.ts +0 -1
- package/dist/src/models/Config.d.ts +166 -0
- package/dist/{node/src → src}/models/index.d.ts +0 -0
- package/dist/src/pools/Router.d.ts +229 -0
- package/dist/src/pools/balancer/Pool.d.ts +365 -0
- package/dist/{node/src → src}/pools/balancer/index.d.ts +0 -0
- package/dist/src/pools/dispenser/Dispenser.d.ts +146 -0
- package/dist/{node/src → src}/pools/dispenser/index.d.ts +0 -0
- package/dist/src/pools/fixedRate/FixedRateExchange.d.ts +375 -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/src/pools/ssContracts/SideStaking.d.ts +132 -0
- package/dist/{node/src → src}/pools/ssContracts/index.d.ts +0 -0
- package/dist/src/provider/Provider.d.ts +147 -0
- package/dist/{node/src → src}/provider/index.d.ts +0 -0
- package/dist/src/tokens/Datatoken.d.ts +362 -0
- package/dist/src/tokens/NFT.d.ts +355 -0
- package/dist/{node/src → src}/tokens/index.d.ts +0 -0
- package/dist/{node/src → src}/utils/ConfigHelper.d.ts +1 -1
- package/dist/{node/src → src}/utils/Constants.d.ts +1 -0
- package/dist/src/utils/ContractUtils.d.ts +11 -0
- package/dist/{node/src → src}/utils/ConversionTypeHelper.d.ts +0 -0
- package/dist/src/utils/DatatokenName.d.ts +11 -0
- package/dist/{node/src → src}/utils/DdoHelpers.d.ts +0 -0
- package/dist/{node/src → src}/utils/FetchHelper.d.ts +3 -2
- package/dist/src/utils/General.d.ts +4 -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/src/utils/TokenUtils.d.ts +39 -0
- package/dist/{node/src → src}/utils/index.d.ts +3 -2
- package/dist/src/utils/minAbi.d.ts +2 -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 +4 -4
- package/docs/overview.md +100 -9
- package/docs/quickstart_marketplace.md +34 -33
- package/docs/quickstart_simple.md +18 -16
- package/package.json +29 -25
- 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
- package/dist/node/src/@types/Asset.d.ts +0 -36
- package/dist/node/src/@types/DDO/DDO.d.ts +0 -15
- package/dist/node/src/@types/DDO/Event.d.ts +0 -7
- package/dist/node/src/@types/DDO/Metadata.d.ts +0 -38
- package/dist/node/src/@types/DDO/Service.d.ts +0 -28
- package/dist/node/src/@types/FileMetadata.d.ts +0 -8
- package/dist/node/src/aquarius/Aquarius.d.ts +0 -10
- package/dist/node/src/factories/NFTFactory.d.ts +0 -70
- package/dist/node/src/interfaces/RouterInterface.d.ts +0 -12
- package/dist/node/src/interfaces/index.d.ts +0 -5
- package/dist/node/src/models/Config.d.ts +0 -34
- package/dist/node/src/pools/Router.d.ts +0 -46
- package/dist/node/src/pools/balancer/Pool.d.ts +0 -73
- package/dist/node/src/pools/dispenser/Dispenser.d.ts +0 -37
- package/dist/node/src/pools/fixedRate/FixedRateExchange.d.ts +0 -95
- package/dist/node/src/pools/ssContracts/SideStaking.d.ts +0 -28
- package/dist/node/src/provider/Provider.d.ts +0 -31
- package/dist/node/src/tokens/Datatoken.d.ts +0 -77
- package/dist/node/src/tokens/NFT.d.ts +0 -57
- package/dist/node/src/utils/ContractParams.d.ts +0 -4
- package/dist/node/src/utils/DatatokenName.d.ts +0 -7
- package/dist/node/src/utils/GasUtils.d.ts +0 -2
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { DDO } from './DDO/DDO';
|
|
2
|
-
export interface AssetNft {
|
|
3
|
-
address: string;
|
|
4
|
-
name: string;
|
|
5
|
-
symbol: string;
|
|
6
|
-
owner: string;
|
|
7
|
-
state: 0 | 1 | 2 | 3 | 4;
|
|
8
|
-
created: string;
|
|
9
|
-
tokenURI: string;
|
|
10
|
-
}
|
|
11
|
-
export interface Purgatory {
|
|
12
|
-
state: boolean;
|
|
13
|
-
reason: string;
|
|
14
|
-
}
|
|
15
|
-
export interface AssetDatatoken {
|
|
16
|
-
address: string;
|
|
17
|
-
name: string;
|
|
18
|
-
symbol: string;
|
|
19
|
-
serviceId: string;
|
|
20
|
-
}
|
|
21
|
-
export interface AssetLastEvent {
|
|
22
|
-
tx: string;
|
|
23
|
-
block: number;
|
|
24
|
-
from: string;
|
|
25
|
-
contract: string;
|
|
26
|
-
datetime: string;
|
|
27
|
-
}
|
|
28
|
-
export interface Asset extends DDO {
|
|
29
|
-
nft: AssetNft;
|
|
30
|
-
datatokens: AssetDatatoken[];
|
|
31
|
-
event: AssetLastEvent;
|
|
32
|
-
stats: {
|
|
33
|
-
consume: number;
|
|
34
|
-
};
|
|
35
|
-
purgatory: Purgatory;
|
|
36
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Service } from './Service';
|
|
2
|
-
import { Metadata } from './Metadata';
|
|
3
|
-
import { Credentials } from './Credentials';
|
|
4
|
-
import { Event } from './Event';
|
|
5
|
-
export interface DDO {
|
|
6
|
-
'@context': string[];
|
|
7
|
-
id: string;
|
|
8
|
-
version: string;
|
|
9
|
-
nftAddress: string;
|
|
10
|
-
chainId: number;
|
|
11
|
-
metadata: Metadata;
|
|
12
|
-
services: Service[];
|
|
13
|
-
credentials?: Credentials;
|
|
14
|
-
event?: Event;
|
|
15
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export interface MetadataAlgorithm {
|
|
2
|
-
language?: string;
|
|
3
|
-
version?: string;
|
|
4
|
-
rawcode?: string;
|
|
5
|
-
container: {
|
|
6
|
-
entrypoint: string;
|
|
7
|
-
image: string;
|
|
8
|
-
tag: string;
|
|
9
|
-
checksum: string;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
export interface Metadata {
|
|
13
|
-
created: string;
|
|
14
|
-
updated: string;
|
|
15
|
-
name: string;
|
|
16
|
-
description: string;
|
|
17
|
-
type: 'dataset' | 'algorithm';
|
|
18
|
-
author: string;
|
|
19
|
-
license: string;
|
|
20
|
-
links?: string[];
|
|
21
|
-
tags?: string[];
|
|
22
|
-
copyrightHolder?: string;
|
|
23
|
-
contentLanguage?: string;
|
|
24
|
-
algorithm?: MetadataAlgorithm;
|
|
25
|
-
additionalInformation?: any;
|
|
26
|
-
}
|
|
27
|
-
export interface MetadataProof {
|
|
28
|
-
validatorAddress?: string;
|
|
29
|
-
r?: string;
|
|
30
|
-
s?: string;
|
|
31
|
-
v?: number;
|
|
32
|
-
}
|
|
33
|
-
export interface ValidateMetadata {
|
|
34
|
-
valid: Boolean;
|
|
35
|
-
errors?: Object;
|
|
36
|
-
hash?: string;
|
|
37
|
-
proof?: MetadataProof;
|
|
38
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export interface PublisherTrustedAlgorithm {
|
|
2
|
-
did: string;
|
|
3
|
-
filesChecksum: string;
|
|
4
|
-
containerSectionChecksum: string;
|
|
5
|
-
}
|
|
6
|
-
export interface ServiceComputeOptions {
|
|
7
|
-
namespace: string;
|
|
8
|
-
cpu?: number;
|
|
9
|
-
gpu?: number;
|
|
10
|
-
gpuType?: string;
|
|
11
|
-
memory?: string;
|
|
12
|
-
volumeSize?: string;
|
|
13
|
-
allowRawAlgorithm: boolean;
|
|
14
|
-
allowNetworkAccess: boolean;
|
|
15
|
-
publisherTrustedAlgorithmPublishers: string[];
|
|
16
|
-
publisherTrustedAlgorithms: PublisherTrustedAlgorithm[];
|
|
17
|
-
}
|
|
18
|
-
export interface Service {
|
|
19
|
-
id: string;
|
|
20
|
-
type: 'access' | 'compute' | string;
|
|
21
|
-
files: string;
|
|
22
|
-
datatokenAddress: string;
|
|
23
|
-
serviceEndpoint: string;
|
|
24
|
-
timeout: number;
|
|
25
|
-
name?: string;
|
|
26
|
-
description?: string;
|
|
27
|
-
compute?: ServiceComputeOptions;
|
|
28
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Asset, DDO, ValidateMetadata } from '../@types/';
|
|
2
|
-
export declare class Aquarius {
|
|
3
|
-
aquariusURL: any;
|
|
4
|
-
constructor(aquariusURL: string);
|
|
5
|
-
resolve(did: string, fetchMethod: any): Promise<DDO>;
|
|
6
|
-
sleep(ms: number): Promise<unknown>;
|
|
7
|
-
waitForAqua(fetchMethod: any, did: string, txid?: string): Promise<Asset>;
|
|
8
|
-
validate(fetchMethod: any, ddo: DDO): Promise<ValidateMetadata>;
|
|
9
|
-
}
|
|
10
|
-
export default Aquarius;
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { Contract } from 'web3-eth-contract';
|
|
2
|
-
import Web3 from 'web3';
|
|
3
|
-
import { TransactionReceipt } from 'web3-core';
|
|
4
|
-
import { AbiItem } from 'web3-utils';
|
|
5
|
-
import { FreCreationParams, Erc20CreateParams, PoolCreationParams, DispenserCreationParams } from '../interfaces';
|
|
6
|
-
interface Template {
|
|
7
|
-
templateAddress: string;
|
|
8
|
-
isActive: boolean;
|
|
9
|
-
}
|
|
10
|
-
export interface TokenOrder {
|
|
11
|
-
tokenAddress: string;
|
|
12
|
-
consumer: string;
|
|
13
|
-
serviceIndex: number;
|
|
14
|
-
providerFeeAddress: string;
|
|
15
|
-
providerFeeToken: string;
|
|
16
|
-
providerFeeAmount: string;
|
|
17
|
-
v: string;
|
|
18
|
-
r: string;
|
|
19
|
-
s: string;
|
|
20
|
-
providerData: string;
|
|
21
|
-
}
|
|
22
|
-
export interface NftCreateData {
|
|
23
|
-
name: string;
|
|
24
|
-
symbol: string;
|
|
25
|
-
templateIndex: number;
|
|
26
|
-
tokenURI: string;
|
|
27
|
-
}
|
|
28
|
-
export declare class NftFactory {
|
|
29
|
-
GASLIMIT_DEFAULT: number;
|
|
30
|
-
factory721Address: string;
|
|
31
|
-
factory721Abi: AbiItem | AbiItem[];
|
|
32
|
-
web3: Web3;
|
|
33
|
-
startBlock: number;
|
|
34
|
-
factory721: Contract;
|
|
35
|
-
constructor(factory721Address: string, web3: Web3, factory721Abi?: AbiItem | AbiItem[], startBlock?: number);
|
|
36
|
-
estGasCreateNFT(address: string, nftData: NftCreateData): Promise<string>;
|
|
37
|
-
createNFT(address: string, nftData: NftCreateData): Promise<string>;
|
|
38
|
-
getCurrentNFTCount(): Promise<number>;
|
|
39
|
-
getCurrentTokenCount(): Promise<number>;
|
|
40
|
-
getOwner(): Promise<string>;
|
|
41
|
-
getCurrentNFTTemplateCount(): Promise<number>;
|
|
42
|
-
getCurrentTokenTemplateCount(): Promise<number>;
|
|
43
|
-
getNFTTemplate(index: number): Promise<Template>;
|
|
44
|
-
getTokenTemplate(index: number): Promise<Template>;
|
|
45
|
-
checkDatatoken(datatoken: string): Promise<Boolean>;
|
|
46
|
-
checkNFT(nftAddress: string): Promise<String>;
|
|
47
|
-
estGasAddNFTTemplate(address: string, templateAddress: string): Promise<any>;
|
|
48
|
-
addNFTTemplate(address: string, templateAddress: string): Promise<TransactionReceipt>;
|
|
49
|
-
estGasDisableNFTTemplate(address: string, templateIndex: number): Promise<any>;
|
|
50
|
-
disableNFTTemplate(address: string, templateIndex: number): Promise<TransactionReceipt>;
|
|
51
|
-
estGasReactivateNFTTemplate(address: string, templateIndex: number): Promise<any>;
|
|
52
|
-
reactivateNFTTemplate(address: string, templateIndex: number): Promise<TransactionReceipt>;
|
|
53
|
-
estGasAddTokenTemplate(address: string, templateAddress: string): Promise<any>;
|
|
54
|
-
addTokenTemplate(address: string, templateAddress: string): Promise<TransactionReceipt>;
|
|
55
|
-
estGasDisableTokenTemplate(address: string, templateIndex: number): Promise<any>;
|
|
56
|
-
disableTokenTemplate(address: string, templateIndex: number): Promise<TransactionReceipt>;
|
|
57
|
-
estGasReactivateTokenTemplate(address: string, templateIndex: number): Promise<any>;
|
|
58
|
-
reactivateTokenTemplate(address: string, templateIndex: number): Promise<TransactionReceipt>;
|
|
59
|
-
estGasStartMultipleTokenOrder(address: string, orders: TokenOrder[]): Promise<any>;
|
|
60
|
-
startMultipleTokenOrder(address: string, orders: TokenOrder[]): Promise<TransactionReceipt>;
|
|
61
|
-
estGasCreateNftWithErc(address: string, nftCreateData: NftCreateData, ercParams: Erc20CreateParams): Promise<any>;
|
|
62
|
-
createNftWithErc(address: string, nftCreateData: NftCreateData, ercParams: Erc20CreateParams): Promise<TransactionReceipt>;
|
|
63
|
-
estGasCreateNftErcWithPool(address: string, nftCreateData: NftCreateData, ercParams: Erc20CreateParams, poolParams: PoolCreationParams): Promise<any>;
|
|
64
|
-
createNftErcWithPool(address: string, nftCreateData: NftCreateData, ercParams: Erc20CreateParams, poolParams: PoolCreationParams): Promise<TransactionReceipt>;
|
|
65
|
-
estGasCreateNftErcWithFixedRate(address: string, nftCreateData: NftCreateData, ercParams: Erc20CreateParams, freParams: FreCreationParams): Promise<any>;
|
|
66
|
-
createNftErcWithFixedRate(address: string, nftCreateData: NftCreateData, ercParams: Erc20CreateParams, freParams: FreCreationParams): Promise<TransactionReceipt>;
|
|
67
|
-
estGasCreateNftErcWithDispenser(address: string, nftCreateData: NftCreateData, ercParams: Erc20CreateParams, dispenserParams: DispenserCreationParams): Promise<any>;
|
|
68
|
-
createNftErcWithDispenser(address: string, nftCreateData: NftCreateData, ercParams: Erc20CreateParams, dispenserParams: DispenserCreationParams): Promise<TransactionReceipt>;
|
|
69
|
-
}
|
|
70
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export interface Operation {
|
|
2
|
-
exchangeIds: string;
|
|
3
|
-
source: string;
|
|
4
|
-
operation: number;
|
|
5
|
-
tokenIn: string;
|
|
6
|
-
amountsIn: string | number;
|
|
7
|
-
tokenOut: string;
|
|
8
|
-
amountsOut: string | number;
|
|
9
|
-
maxPrice: string | number;
|
|
10
|
-
swapMarketFee: string;
|
|
11
|
-
marketFeeAddress: string;
|
|
12
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { LogLevel } from '../utils/Logger';
|
|
2
|
-
import { AbiItem } from 'web3-utils/types';
|
|
3
|
-
export declare class Config {
|
|
4
|
-
nodeUri?: string;
|
|
5
|
-
providerAddress?: string;
|
|
6
|
-
metadataCacheUri?: string;
|
|
7
|
-
providerUri?: string;
|
|
8
|
-
web3Provider?: any;
|
|
9
|
-
oceanTokenAddress?: string;
|
|
10
|
-
erc721FactoryAddress?: string;
|
|
11
|
-
erc721FFactoryABI?: AbiItem | AbiItem[];
|
|
12
|
-
datatokensABI?: AbiItem | AbiItem[];
|
|
13
|
-
poolTemplateAddress?: string;
|
|
14
|
-
poolFactoryABI?: AbiItem | AbiItem[];
|
|
15
|
-
poolABI?: AbiItem | AbiItem[];
|
|
16
|
-
fixedRateExchangeAddress?: string;
|
|
17
|
-
fixedRateExchangeAddressABI?: AbiItem | AbiItem[];
|
|
18
|
-
dispenserAddress?: string;
|
|
19
|
-
dispenserABI?: AbiItem | AbiItem[];
|
|
20
|
-
opfCommunityFeeCollector?: string;
|
|
21
|
-
sideStakingAddress?: string;
|
|
22
|
-
startBlock?: number;
|
|
23
|
-
verbose?: boolean | LogLevel;
|
|
24
|
-
authMessage?: string;
|
|
25
|
-
authTokenExpiration?: number;
|
|
26
|
-
parityUri?: string;
|
|
27
|
-
threshold?: number;
|
|
28
|
-
chainId: number;
|
|
29
|
-
network: string;
|
|
30
|
-
subgraphUri: string;
|
|
31
|
-
explorerUri: string;
|
|
32
|
-
oceanTokenSymbol: string;
|
|
33
|
-
}
|
|
34
|
-
export default Config;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { Contract } from 'web3-eth-contract';
|
|
2
|
-
import Web3 from 'web3';
|
|
3
|
-
import { TransactionReceipt } from 'web3-core';
|
|
4
|
-
import { AbiItem } from 'web3-utils';
|
|
5
|
-
import { Operation } from '../interfaces/RouterInterface';
|
|
6
|
-
export declare class Router {
|
|
7
|
-
GASLIMIT_DEFAULT: number;
|
|
8
|
-
routerAddress: string;
|
|
9
|
-
RouterAbi: AbiItem | AbiItem[];
|
|
10
|
-
web3: Web3;
|
|
11
|
-
startBlock: number;
|
|
12
|
-
router: Contract;
|
|
13
|
-
constructor(routerAddress: string, web3: Web3, RouterAbi?: AbiItem | AbiItem[], startBlock?: number);
|
|
14
|
-
estGasBuyDTBatch(address: string, operations: Operation[]): Promise<any>;
|
|
15
|
-
buyDTBatch(address: string, operations: Operation[]): Promise<TransactionReceipt>;
|
|
16
|
-
isOceanTokens(address: string): Promise<boolean>;
|
|
17
|
-
isSideStaking(address: string): Promise<boolean>;
|
|
18
|
-
isFixedPrice(address: string): Promise<boolean>;
|
|
19
|
-
getOwner(): Promise<string>;
|
|
20
|
-
getNFTFactory(): Promise<string>;
|
|
21
|
-
isPoolTemplate(address: string): Promise<boolean>;
|
|
22
|
-
estGasAddOceanToken(address: string, tokenAddress: string, contractInstance?: Contract): Promise<any>;
|
|
23
|
-
addOceanToken(address: string, tokenAddress: string): Promise<TransactionReceipt>;
|
|
24
|
-
estGasRemoveOceanToken(address: string, tokenAddress: string, contractInstance?: Contract): Promise<any>;
|
|
25
|
-
removeOceanToken(address: string, tokenAddress: string): Promise<TransactionReceipt>;
|
|
26
|
-
estGasAddSSContract(address: string, tokenAddress: string): Promise<any>;
|
|
27
|
-
addSSContract(address: string, tokenAddress: string): Promise<TransactionReceipt>;
|
|
28
|
-
estGasRemoveSSContract(address: string, tokenAddress: string): Promise<any>;
|
|
29
|
-
removeSSContract(address: string, tokenAddress: string): Promise<TransactionReceipt>;
|
|
30
|
-
estGasAddFixedRateContract(address: string, tokenAddress: string): Promise<any>;
|
|
31
|
-
addFixedRateContract(address: string, tokenAddress: string): Promise<TransactionReceipt>;
|
|
32
|
-
estGasRemoveFixedRateContract(address: string, tokenAddress: string): Promise<any>;
|
|
33
|
-
removeFixedRateContract(address: string, tokenAddress: string): Promise<TransactionReceipt>;
|
|
34
|
-
estGasAddDispenserContract(address: string, tokenAddress: string): Promise<any>;
|
|
35
|
-
addDispenserContract(address: string, tokenAddress: string): Promise<TransactionReceipt>;
|
|
36
|
-
estGasRemoveDispenserContract(address: string, tokenAddress: string): Promise<any>;
|
|
37
|
-
removeDispenserContract(address: string, tokenAddress: string): Promise<TransactionReceipt>;
|
|
38
|
-
getOPFFee(baseToken: string): Promise<number>;
|
|
39
|
-
getCurrentOPFFee(): Promise<number>;
|
|
40
|
-
estGasUpdateOPFFee(address: string, newFee: number): Promise<any>;
|
|
41
|
-
updateOPFFee(address: string, newFee: number): Promise<TransactionReceipt>;
|
|
42
|
-
estGasAddPoolTemplate(address: string, templateAddress: string): Promise<any>;
|
|
43
|
-
addPoolTemplate(address: string, templateAddress: string): Promise<TransactionReceipt>;
|
|
44
|
-
estGasRemovePoolTemplate(address: string, templateAddress: string): Promise<any>;
|
|
45
|
-
removePoolTemplate(address: string, templateAddress: string): Promise<TransactionReceipt>;
|
|
46
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import Web3 from 'web3';
|
|
2
|
-
import { AbiItem } from 'web3-utils/types';
|
|
3
|
-
import { TransactionReceipt } from 'web3-core';
|
|
4
|
-
import { Contract } from 'web3-eth-contract';
|
|
5
|
-
import { Logger } from '../../utils';
|
|
6
|
-
import { CurrentFees, TokenInOutMarket, AmountsInMaxFee, AmountsOutMaxFee } from '../../interfaces';
|
|
7
|
-
export declare class Pool {
|
|
8
|
-
poolAbi: AbiItem | AbiItem[];
|
|
9
|
-
web3: Web3;
|
|
10
|
-
GASLIMIT_DEFAULT: number;
|
|
11
|
-
private logger;
|
|
12
|
-
constructor(web3: Web3, logger: Logger, poolAbi?: AbiItem | AbiItem[]);
|
|
13
|
-
estApprove(account: string, tokenAddress: string, spender: string, amount: string, contractInstance?: Contract): Promise<number>;
|
|
14
|
-
allowance(tokenAddress: string, owner: string, spender: string): Promise<string>;
|
|
15
|
-
approve(account: string, tokenAddress: string, spender: string, amount: string, force?: boolean): Promise<TransactionReceipt | string>;
|
|
16
|
-
sharesBalance(account: string, poolAddress: string): Promise<string>;
|
|
17
|
-
estSetSwapFee(account: string, poolAddress: string, fee: string, contractInstance?: Contract): Promise<number>;
|
|
18
|
-
setSwapFee(account: string, poolAddress: string, fee: string): Promise<TransactionReceipt>;
|
|
19
|
-
getNumTokens(poolAddress: string): Promise<string>;
|
|
20
|
-
getPoolSharesTotalSupply(poolAddress: string): Promise<string>;
|
|
21
|
-
getCurrentTokens(poolAddress: string): Promise<string[]>;
|
|
22
|
-
getFinalTokens(poolAddress: string): Promise<string[]>;
|
|
23
|
-
getController(poolAddress: string): Promise<string>;
|
|
24
|
-
getBasetoken(poolAddress: string): Promise<string>;
|
|
25
|
-
getDatatoken(poolAddress: string): Promise<string>;
|
|
26
|
-
getMarketFeeCollector(poolAddress: string): Promise<string>;
|
|
27
|
-
getOPFCollector(poolAddress: string): Promise<string>;
|
|
28
|
-
isBound(poolAddress: string, token: string): Promise<boolean>;
|
|
29
|
-
getReserve(poolAddress: string, token: string): Promise<string>;
|
|
30
|
-
isFinalized(poolAddress: string): Promise<boolean>;
|
|
31
|
-
getSwapFee(poolAddress: string): Promise<string>;
|
|
32
|
-
getNormalizedWeight(poolAddress: string, token: string): Promise<string>;
|
|
33
|
-
getDenormalizedWeight(poolAddress: string, token: string): Promise<string>;
|
|
34
|
-
getTotalDenormalizedWeight(poolAddress: string): Promise<string>;
|
|
35
|
-
getMarketFees(poolAddress: string, token: string): Promise<string>;
|
|
36
|
-
getCurrentMarketFees(poolAddress: string): Promise<CurrentFees>;
|
|
37
|
-
getCurrentOPFFees(poolAddress: string): Promise<CurrentFees>;
|
|
38
|
-
getCommunityFees(poolAddress: string, token: string): Promise<string>;
|
|
39
|
-
estCollectOPF(address: string, poolAddress: string, contractInstance?: Contract): Promise<number>;
|
|
40
|
-
collectOPF(address: string, poolAddress: string): Promise<TransactionReceipt>;
|
|
41
|
-
estCollectMarketFee(address: string, poolAddress: string, contractInstance?: Contract): Promise<number>;
|
|
42
|
-
collectMarketFee(address: string, poolAddress: string): Promise<TransactionReceipt>;
|
|
43
|
-
estUpdateMarketFeeCollector(address: string, poolAddress: string, newCollector: string, contractInstance?: Contract): Promise<number>;
|
|
44
|
-
updateMarketFeeCollector(address: string, poolAddress: string, newCollector: string): Promise<TransactionReceipt>;
|
|
45
|
-
amountToUnits(token: string, amount: string): Promise<string>;
|
|
46
|
-
unitsToAmount(token: string, amount: string): Promise<string>;
|
|
47
|
-
estSwapExactAmountIn(address: string, poolAddress: string, tokenInOutMarket: TokenInOutMarket, amountsInOutMaxFee: AmountsInMaxFee, contractInstance?: Contract): Promise<number>;
|
|
48
|
-
swapExactAmountIn(address: string, poolAddress: string, tokenInOutMarket: TokenInOutMarket, amountsInOutMaxFee: AmountsInMaxFee): Promise<TransactionReceipt>;
|
|
49
|
-
estSwapExactAmountOut(address: string, poolAddress: string, tokenInOutMarket: TokenInOutMarket, amountsInOutMaxFee: AmountsOutMaxFee, contractInstance?: Contract): Promise<number>;
|
|
50
|
-
swapExactAmountOut(account: string, poolAddress: string, tokenInOutMarket: TokenInOutMarket, amountsInOutMaxFee: AmountsOutMaxFee): Promise<TransactionReceipt>;
|
|
51
|
-
estJoinPool(address: string, poolAddress: string, poolAmountOut: string, maxAmountsIn: string[], contractInstance?: Contract): Promise<number>;
|
|
52
|
-
joinPool(address: string, poolAddress: string, poolAmountOut: string, maxAmountsIn: string[]): Promise<TransactionReceipt>;
|
|
53
|
-
estExitPool(address: string, poolAddress: string, poolAmountIn: string, minAmountsOut: string[], contractInstance?: Contract): Promise<number>;
|
|
54
|
-
exitPool(account: string, poolAddress: string, poolAmountIn: string, minAmountsOut: string[]): Promise<TransactionReceipt>;
|
|
55
|
-
estJoinswapExternAmountIn(address: string, poolAddress: string, tokenIn: string, tokenAmountIn: string, minPoolAmountOut: string, contractInstance?: Contract): Promise<number>;
|
|
56
|
-
joinswapExternAmountIn(account: string, poolAddress: string, tokenIn: string, tokenAmountIn: string, minPoolAmountOut: string): Promise<TransactionReceipt>;
|
|
57
|
-
estJoinswapPoolAmountOut(address: string, poolAddress: string, tokenIn: string, poolAmountOut: string, maxAmountIn: string, contractInstance?: Contract): Promise<number>;
|
|
58
|
-
joinswapPoolAmountOut(account: string, poolAddress: string, tokenIn: string, poolAmountOut: string, maxAmountIn: string): Promise<TransactionReceipt>;
|
|
59
|
-
estExitswapPoolAmountIn(address: string, poolAddress: string, tokenOut: string, poolAmountIn: string, minTokenAmountOut: string, contractInstance?: Contract): Promise<number>;
|
|
60
|
-
exitswapPoolAmountIn(account: string, poolAddress: string, tokenOut: string, poolAmountIn: string, minTokenAmountOut: string): Promise<TransactionReceipt>;
|
|
61
|
-
estExitswapExternAmountOut(address: string, poolAddress: string, tokenOut: string, tokenAmountOut: string, maxPoolAmountIn: string, contractInstance?: Contract): Promise<number>;
|
|
62
|
-
exitswapExternAmountOut(account: string, poolAddress: string, tokenOut: string, tokenAmountOut: string, maxPoolAmountIn: string): Promise<TransactionReceipt>;
|
|
63
|
-
getSpotPrice(poolAddress: string, tokenIn: string, tokenOut: string, swapMarketFee: string): Promise<string>;
|
|
64
|
-
getAmountInExactOut(poolAddress: string, tokenIn: string, tokenOut: string, tokenAmountOut: string, swapMarketFee: string): Promise<string>;
|
|
65
|
-
getAmountOutExactIn(poolAddress: string, tokenIn: string, tokenOut: string, tokenAmountIn: string, swapMarketFee: string): Promise<string>;
|
|
66
|
-
calcPoolOutGivenSingleIn(poolAddress: string, tokenIn: string, tokenAmountIn: string): Promise<string>;
|
|
67
|
-
calcSingleInGivenPoolOut(poolAddress: string, tokenIn: string, poolAmountOut: string): Promise<string>;
|
|
68
|
-
calcSingleOutGivenPoolIn(poolAddress: string, tokenOut: string, poolAmountIn: string): Promise<string>;
|
|
69
|
-
calcPoolInGivenSingleOut(poolAddress: string, tokenOut: string, tokenAmountOut: string): Promise<string>;
|
|
70
|
-
getSwapEventSignature(): string;
|
|
71
|
-
getJoinEventSignature(): string;
|
|
72
|
-
getExitEventSignature(): string;
|
|
73
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import Web3 from 'web3';
|
|
2
|
-
import { AbiItem } from 'web3-utils';
|
|
3
|
-
import { Contract } from 'web3-eth-contract';
|
|
4
|
-
import { TransactionReceipt } from 'web3-eth';
|
|
5
|
-
import { Datatoken } from '../../tokens';
|
|
6
|
-
export interface DispenserToken {
|
|
7
|
-
active: boolean;
|
|
8
|
-
owner: string;
|
|
9
|
-
maxTokens: string;
|
|
10
|
-
maxBalance: string;
|
|
11
|
-
balance: string;
|
|
12
|
-
isMinter: boolean;
|
|
13
|
-
allowedSwapper: string;
|
|
14
|
-
}
|
|
15
|
-
export declare class Dispenser {
|
|
16
|
-
GASLIMIT_DEFAULT: number;
|
|
17
|
-
web3: Web3;
|
|
18
|
-
dispenserAddress: string;
|
|
19
|
-
startBlock: number;
|
|
20
|
-
dispenserAbi: AbiItem | AbiItem[];
|
|
21
|
-
dispenserContract: Contract;
|
|
22
|
-
constructor(web3: Web3, dispenserAddress?: string, dispenserAbi?: AbiItem | AbiItem[], startBlock?: number);
|
|
23
|
-
status(dtAdress: string): Promise<DispenserToken>;
|
|
24
|
-
estGasCreate(dtAddress: string, address: string, maxTokens: string, maxBalance: string, allowedSwapper: string): Promise<any>;
|
|
25
|
-
create(dtAddress: string, address: string, maxTokens: string, maxBalance: string, allowedSwapper: string): Promise<TransactionReceipt>;
|
|
26
|
-
estGasActivate(dtAddress: string, maxTokens: string, maxBalance: string, address: string): Promise<any>;
|
|
27
|
-
activate(dtAddress: string, maxTokens: string, maxBalance: string, address: string): Promise<TransactionReceipt>;
|
|
28
|
-
estGasDeactivate(dtAddress: string, address: string): Promise<any>;
|
|
29
|
-
deactivate(dtAddress: string, address: string): Promise<TransactionReceipt>;
|
|
30
|
-
estGasSetAllowedSwapper(dtAddress: string, address: string, newAllowedSwapper: string): Promise<any>;
|
|
31
|
-
setAllowedSwapper(dtAddress: string, address: string, newAllowedSwapper: string): Promise<TransactionReceipt>;
|
|
32
|
-
estGasDispense(dtAddress: string, address: string, amount: string, destination: string): Promise<any>;
|
|
33
|
-
dispense(dtAddress: string, address: string, amount: string, destination: string): Promise<TransactionReceipt>;
|
|
34
|
-
estGasOwnerWithdraw(dtAddress: string, address: string): Promise<any>;
|
|
35
|
-
ownerWithdraw(dtAddress: string, address: string): Promise<TransactionReceipt>;
|
|
36
|
-
isDispensable(dtAddress: string, dataToken: Datatoken, address: string, amount?: string): Promise<Boolean>;
|
|
37
|
-
}
|
|
@@ -1,95 +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
|
-
export interface FixedPriceExchange {
|
|
6
|
-
active: boolean;
|
|
7
|
-
exchangeOwner: string;
|
|
8
|
-
dataToken: string;
|
|
9
|
-
baseToken: string;
|
|
10
|
-
fixedRate: string;
|
|
11
|
-
dtDecimals: string;
|
|
12
|
-
btDecimals: string;
|
|
13
|
-
dtBalance: string;
|
|
14
|
-
btBalance: string;
|
|
15
|
-
dtSupply: string;
|
|
16
|
-
btSupply: string;
|
|
17
|
-
withMint: boolean;
|
|
18
|
-
allowedSwapper: string;
|
|
19
|
-
exchangeId?: string;
|
|
20
|
-
}
|
|
21
|
-
export interface FeesInfo {
|
|
22
|
-
opfFee: string;
|
|
23
|
-
marketFee: string;
|
|
24
|
-
marketFeeCollector: string;
|
|
25
|
-
marketFeeAvailable: string;
|
|
26
|
-
oceanFeeAvailable: string;
|
|
27
|
-
exchangeId: string;
|
|
28
|
-
}
|
|
29
|
-
export interface FixedPriceSwap {
|
|
30
|
-
exchangeId: string;
|
|
31
|
-
caller: string;
|
|
32
|
-
baseTokenAmount: string;
|
|
33
|
-
dataTokenAmount: string;
|
|
34
|
-
}
|
|
35
|
-
export declare enum FixedRateCreateProgressStep {
|
|
36
|
-
CreatingExchange = 0,
|
|
37
|
-
ApprovingDatatoken = 1
|
|
38
|
-
}
|
|
39
|
-
export declare class FixedRateExchange {
|
|
40
|
-
GASLIMIT_DEFAULT: number;
|
|
41
|
-
oceanAddress: string;
|
|
42
|
-
fixedRateAddress: string;
|
|
43
|
-
fixedRateExchangeAbi: AbiItem | AbiItem[];
|
|
44
|
-
fixedRateContract: Contract;
|
|
45
|
-
web3: Web3;
|
|
46
|
-
contract: Contract;
|
|
47
|
-
startBlock: number;
|
|
48
|
-
ssAbi: AbiItem | AbiItem[];
|
|
49
|
-
constructor(web3: Web3, fixedRateAddress: string, fixedRateExchangeAbi?: AbiItem | AbiItem[], oceanAddress?: string, startBlock?: number);
|
|
50
|
-
amountToUnits(token: string, amount: string): Promise<string>;
|
|
51
|
-
unitsToAmount(token: string, amount: string): Promise<string>;
|
|
52
|
-
generateExchangeId(basetoken: string, dataToken: string, owner: string): Promise<string>;
|
|
53
|
-
estBuyDT(account: string, datatokenAddress: string, dtAmount: string, maxBasetokenAmount: string, contractInstance?: Contract): Promise<number>;
|
|
54
|
-
buyDT(address: string, exchangeId: string, datatokenAmount: string, maxBasetokenAmount: string): Promise<TransactionReceipt>;
|
|
55
|
-
estSellDT(account: string, datatokenAddress: string, dtAmount: string, maxBasetokenAmount: string, contractInstance?: Contract): Promise<number>;
|
|
56
|
-
sellDT(address: string, exchangeId: string, datatokenAmount: string, minBasetokenAmount: string): Promise<TransactionReceipt>;
|
|
57
|
-
getNumberOfExchanges(): Promise<number>;
|
|
58
|
-
estSetRate(account: string, exchangeId: string, newRate: string, contractInstance?: Contract): Promise<number>;
|
|
59
|
-
setRate(address: string, exchangeId: string, newRate: string): Promise<TransactionReceipt>;
|
|
60
|
-
estSetAllowedSwapper(account: string, exchangeId: string, newAllowedSwapper: string, contractInstance?: Contract): Promise<number>;
|
|
61
|
-
setAllowedSwapper(address: string, exchangeId: string, newAllowedSwapper: string): Promise<TransactionReceipt>;
|
|
62
|
-
estActivate(account: string, exchangeId: string, contractInstance?: Contract): Promise<number>;
|
|
63
|
-
activate(address: string, exchangeId: string): Promise<TransactionReceipt>;
|
|
64
|
-
estDeactivate(account: string, exchangeId: string, contractInstance?: Contract): Promise<number>;
|
|
65
|
-
deactivate(address: string, exchangeId: string): Promise<TransactionReceipt>;
|
|
66
|
-
getRate(exchangeId: string): Promise<string>;
|
|
67
|
-
getDTSupply(exchangeId: string): Promise<string>;
|
|
68
|
-
getBTSupply(exchangeId: string): Promise<string>;
|
|
69
|
-
getAllowedSwapper(exchangeId: string): Promise<string>;
|
|
70
|
-
getAmountBTIn(exchangeId: string, dataTokenAmount: string): Promise<string>;
|
|
71
|
-
getAmountBTOut(exchangeId: string, dataTokenAmount: string): Promise<string>;
|
|
72
|
-
getExchange(exchangeId: string): Promise<FixedPriceExchange>;
|
|
73
|
-
getFeesInfo(exchangeId: string): Promise<FeesInfo>;
|
|
74
|
-
getExchanges(): Promise<string[]>;
|
|
75
|
-
isActive(exchangeId: string): Promise<boolean>;
|
|
76
|
-
estActivateMint(account: string, exchangeId: string, contractInstance?: Contract): Promise<number>;
|
|
77
|
-
activateMint(address: string, exchangeId: string): Promise<TransactionReceipt>;
|
|
78
|
-
estDeactivateMint(account: string, exchangeId: string, contractInstance?: Contract): Promise<number>;
|
|
79
|
-
deactivateMint(address: string, exchangeId: string): Promise<TransactionReceipt>;
|
|
80
|
-
estCollectBT(account: string, exchangeId: string, contractInstance?: Contract): Promise<number>;
|
|
81
|
-
collectBT(address: string, exchangeId: string): Promise<TransactionReceipt>;
|
|
82
|
-
estCollectDT(account: string, exchangeId: string, contractInstance?: Contract): Promise<number>;
|
|
83
|
-
collectDT(address: string, exchangeId: string): Promise<TransactionReceipt>;
|
|
84
|
-
estCollectMarketFee(account: string, exchangeId: string, contractInstance?: Contract): Promise<number>;
|
|
85
|
-
collectMarketFee(address: string, exchangeId: string): Promise<TransactionReceipt>;
|
|
86
|
-
estCollectOceanFee(account: string, exchangeId: string, contractInstance?: Contract): Promise<number>;
|
|
87
|
-
collectOceanFee(address: string, exchangeId: string): Promise<TransactionReceipt>;
|
|
88
|
-
getOPFCollector(): Promise<string>;
|
|
89
|
-
getRouter(): Promise<string>;
|
|
90
|
-
getExchangeOwner(exchangeId: string): Promise<string>;
|
|
91
|
-
estUpdateMarketFee(account: string, exchangeId: string, newMarketFee: string, contractInstance?: Contract): Promise<number>;
|
|
92
|
-
updateMarketFee(address: string, exchangeId: string, newMarketFee: string): Promise<TransactionReceipt>;
|
|
93
|
-
estUpdateMarketFeeCollector(account: string, exchangeId: string, newMarketFeeCollector: string, contractInstance?: Contract): Promise<number>;
|
|
94
|
-
updateMarketFeeCollector(address: string, exchangeId: string, newMarketFeeCollector: string): Promise<TransactionReceipt>;
|
|
95
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import Web3 from 'web3';
|
|
2
|
-
import { AbiItem } from 'web3-utils/types';
|
|
3
|
-
import { TransactionReceipt } from 'web3-core';
|
|
4
|
-
import { Contract } from 'web3-eth-contract';
|
|
5
|
-
export declare class SideStaking {
|
|
6
|
-
ssAbi: AbiItem | AbiItem[];
|
|
7
|
-
web3: Web3;
|
|
8
|
-
GASLIMIT_DEFAULT: number;
|
|
9
|
-
constructor(web3: Web3, ssAbi?: AbiItem | AbiItem[]);
|
|
10
|
-
amountToUnits(token: string, amount: string): Promise<string>;
|
|
11
|
-
unitsToAmount(token: string, amount: string): Promise<string>;
|
|
12
|
-
getDataTokenCirculatingSupply(ssAddress: string, datatokenAddress: string): Promise<string>;
|
|
13
|
-
getDataTokenCurrentCirculatingSupply(ssAddress: string, datatokenAddress: string): Promise<string>;
|
|
14
|
-
getPublisherAddress(ssAddress: string, datatokenAddress: string): Promise<string>;
|
|
15
|
-
getBasetoken(ssAddress: string, datatokenAddress: string): Promise<string>;
|
|
16
|
-
getPoolAddress(ssAddress: string, datatokenAddress: string): Promise<string>;
|
|
17
|
-
getBasetokenBalance(ssAddress: string, datatokenAddress: string): Promise<string>;
|
|
18
|
-
getDatatokenBalance(ssAddress: string, datatokenAddress: string): Promise<string>;
|
|
19
|
-
getvestingEndBlock(ssAddress: string, datatokenAddress: string): Promise<string>;
|
|
20
|
-
getvestingAmount(ssAddress: string, datatokenAddress: string): Promise<string>;
|
|
21
|
-
getvestingLastBlock(ssAddress: string, datatokenAddress: string): Promise<string>;
|
|
22
|
-
getvestingAmountSoFar(ssAddress: string, datatokenAddress: string): Promise<string>;
|
|
23
|
-
estGetVesting(account: string, ssAddress: string, datatokenAddress: string, contractInstance?: Contract): Promise<number>;
|
|
24
|
-
getVesting(account: string, ssAddress: string, datatokenAddress: string): Promise<TransactionReceipt>;
|
|
25
|
-
estSetPoolSwapFee(account: string, ssAddress: string, datatokenAddress: string, poolAddress: string, swapFee: number, contractInstance?: Contract): Promise<number>;
|
|
26
|
-
setPoolSwapFee(account: string, ssAddress: string, datatokenAddress: string, poolAddress: string, swapFee: number): Promise<TransactionReceipt>;
|
|
27
|
-
getRouter(ssAddress: string): Promise<string>;
|
|
28
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import Web3 from 'web3';
|
|
2
|
-
import { FileMetadata, ComputeJob, ComputeOutput, ComputeAlgorithm, ComputeAsset, ProviderInitialize } from '../@types/';
|
|
3
|
-
export interface ServiceEndpoint {
|
|
4
|
-
serviceName: string;
|
|
5
|
-
method: string;
|
|
6
|
-
urlPath: string;
|
|
7
|
-
}
|
|
8
|
-
export interface UserCustomParameters {
|
|
9
|
-
[key: string]: any;
|
|
10
|
-
}
|
|
11
|
-
export declare class Provider {
|
|
12
|
-
getEndpoints(providerUri: string): Promise<any>;
|
|
13
|
-
getEndpointURL(servicesEndpoints: ServiceEndpoint[], serviceName: string): ServiceEndpoint;
|
|
14
|
-
getServiceEndpoints(providerEndpoint: string, endpoints: any): Promise<ServiceEndpoint[]>;
|
|
15
|
-
getNonce(providerUri: string, consumerAddress: string, fetchMethod: any, providerEndpoints?: any, serviceEndpoints?: ServiceEndpoint[]): Promise<string>;
|
|
16
|
-
createSignature(web3: Web3, accountId: string, agreementId: string): Promise<string>;
|
|
17
|
-
createHashSignature(web3: Web3, accountId: string, message: string): Promise<string>;
|
|
18
|
-
encrypt(data: any, providerUri: string, postMethod: any): Promise<any>;
|
|
19
|
-
checkDidFiles(did: string, serviceId: number, providerUri: string, fetchMethod: any): Promise<FileMetadata[]>;
|
|
20
|
-
checkFileUrl(url: string, providerUri: string, fetchMethod: any): Promise<FileMetadata[]>;
|
|
21
|
-
initialize(did: string, serviceId: string, fileIndex: number, consumerAddress: string, providerUri: string, getMethod: any, userCustomParameters?: UserCustomParameters, computeEnv?: string): Promise<ProviderInitialize>;
|
|
22
|
-
getDownloadUrl(did: string, accountId: string, serviceId: string, fileIndex: number, transferTxId: string, providerUri: string, web3: Web3, userCustomParameters?: UserCustomParameters): Promise<any>;
|
|
23
|
-
computeStart(providerUri: string, web3: Web3, fetchMethod: any, consumerAddress: string, computeEnv: string, dataset: ComputeAsset, algorithm: ComputeAlgorithm, additionalDatasets?: ComputeAsset[], output?: ComputeOutput): Promise<ComputeJob | ComputeJob[]>;
|
|
24
|
-
computeStop(did: string, consumerAddress: string, jobId: string, providerUri: string, web3: Web3, fetchMethod: any): Promise<ComputeJob | ComputeJob[]>;
|
|
25
|
-
computeStatus(providerUri: string, fetchMethod: any, jobId?: string, did?: string, consumerAddress?: string): Promise<ComputeJob | ComputeJob[]>;
|
|
26
|
-
computeResult(jobId: string, index: number, destination: string, accountId: string, providerUri: string, web3: Web3, fetchMethod: any): Promise<any>;
|
|
27
|
-
computeDelete(did: string, consumerAddress: string, jobId: string, providerUri: string, web3: Web3, fetchMethod: any): Promise<ComputeJob | ComputeJob[]>;
|
|
28
|
-
isValidProvider(url: string, fetchMethod: any): Promise<boolean>;
|
|
29
|
-
}
|
|
30
|
-
export declare const ProviderInstance: Provider;
|
|
31
|
-
export default ProviderInstance;
|