@oceanprotocol/lib 1.0.0-next.7 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +405 -1
- package/CodeExamples.md +918 -0
- package/README.md +12 -80
- package/dist/lib.js +1 -1
- package/dist/lib.js.map +1 -1
- package/dist/lib.modern.js +1 -1
- package/dist/lib.modern.js.map +1 -1
- package/dist/lib.module.js +1 -1
- package/dist/lib.module.js.map +1 -1
- package/dist/lib.umd.js +1 -1
- package/dist/lib.umd.js.map +1 -1
- package/dist/src/@types/Asset.d.ts +83 -0
- package/dist/src/@types/Compute.d.ts +18 -1
- package/dist/src/@types/DDO/DDO.d.ts +43 -0
- package/dist/src/@types/DDO/Event.d.ts +20 -0
- package/dist/src/@types/DDO/Metadata.d.ts +92 -0
- package/dist/src/@types/DDO/Service.d.ts +72 -6
- package/dist/src/{interfaces/DispenserInterface.d.ts → @types/Dispenser.d.ts} +0 -0
- package/dist/src/@types/DownloadResponse.d.ts +4 -0
- package/dist/src/@types/Erc20.d.ts +21 -0
- package/dist/src/@types/Erc721.d.ts +12 -0
- package/dist/src/@types/FileMetadata.d.ts +29 -0
- package/dist/src/{interfaces/FixedRateInterface.d.ts → @types/FixedPrice.d.ts} +7 -1
- package/dist/src/{interfaces/PoolInterface.d.ts → @types/Pool.d.ts} +11 -2
- package/dist/src/@types/Provider.d.ts +9 -0
- package/dist/src/@types/Router.d.ts +59 -0
- package/dist/src/@types/index.d.ts +6 -0
- package/dist/src/aquarius/Aquarius.d.ts +26 -4
- package/dist/src/factories/NFTFactory.d.ts +222 -13
- package/dist/src/index.d.ts +1 -1
- package/dist/src/models/Config.d.ts +128 -0
- package/dist/src/pools/Router.d.ts +193 -12
- package/dist/src/pools/balancer/Pool.d.ts +357 -37
- package/dist/src/pools/dispenser/Dispenser.d.ts +109 -2
- package/dist/src/pools/fixedRate/FixedRateExchange.d.ts +311 -19
- package/dist/src/pools/index.d.ts +2 -0
- package/dist/src/pools/ssContracts/SideStaking.d.ts +110 -7
- package/dist/src/provider/Provider.d.ts +137 -14
- package/dist/src/tokens/Datatoken.d.ts +347 -7
- package/dist/src/tokens/NFT.d.ts +301 -6
- package/dist/src/utils/ConfigHelper.d.ts +1 -1
- package/dist/src/utils/Constants.d.ts +1 -0
- package/dist/src/utils/ContractUtils.d.ts +13 -2
- package/dist/src/utils/DatatokenName.d.ts +4 -0
- package/dist/src/utils/FetchHelper.d.ts +3 -2
- package/dist/src/utils/General.d.ts +4 -0
- package/dist/src/utils/PoolHelpers.d.ts +8 -0
- package/dist/src/utils/SignatureUtils.d.ts +0 -2
- package/dist/src/utils/TokenUtils.d.ts +69 -0
- package/dist/src/utils/index.d.ts +3 -0
- package/dist/src/utils/minAbi.d.ts +2 -0
- package/dist/test/TestContractHandler.d.ts +8 -36
- package/dist/test/config.d.ts +5 -0
- package/dist/test/{unit/NftFactory.test.d.ts → integration/CodeExamples.test.d.ts} +0 -0
- package/dist/test/unit/factories/NftFactory.test.d.ts +1 -0
- package/package.json +38 -34
- package/dist/src/interfaces/Erc20Interface.d.ts +0 -11
- package/dist/src/interfaces/RouterInterface.d.ts +0 -12
- package/dist/src/interfaces/index.d.ts +0 -5
- package/dist/test/integration/config.d.ts +0 -3
- package/dist/test/unit/config.d.ts +0 -3
- package/docs/beginners_guide.md +0 -338
- package/docs/get-test-OCEAN.md +0 -24
- package/docs/overview.md +0 -394
- package/docs/quickstart_marketplace.md +0 -423
- package/docs/quickstart_simple.md +0 -272
- package/docs/services.md +0 -94
- package/docs/wallets.md +0 -98
|
@@ -1,10 +1,32 @@
|
|
|
1
1
|
import { Asset, DDO, ValidateMetadata } from '../@types/';
|
|
2
2
|
export declare class Aquarius {
|
|
3
3
|
aquariusURL: any;
|
|
4
|
+
/**
|
|
5
|
+
* Instantiate Aquarius
|
|
6
|
+
* @param {String} aquariusURL
|
|
7
|
+
*/
|
|
4
8
|
constructor(aquariusURL: string);
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
/** Resolves a DID
|
|
10
|
+
* @param {string} did
|
|
11
|
+
* @param {AbortSignal} signal abort signal
|
|
12
|
+
* @return {Promise<Asset>} Asset
|
|
13
|
+
*/
|
|
14
|
+
resolve(did: string, signal?: AbortSignal): Promise<Asset>;
|
|
15
|
+
/**
|
|
16
|
+
* Blocks until Aqua will cache the did (or the update for that did) or timeouts
|
|
17
|
+
|
|
18
|
+
* @param {string} did DID of the asset.
|
|
19
|
+
* @param {string} txid used when the did exists and we expect an update with that txid.
|
|
20
|
+
* @param {AbortSignal} signal abort signal
|
|
21
|
+
* @return {Promise<DDO>} DDO of the asset.
|
|
22
|
+
*/
|
|
23
|
+
waitForAqua(did: string, txid?: string, signal?: AbortSignal): Promise<Asset>;
|
|
24
|
+
/**
|
|
25
|
+
* Validate DDO content
|
|
26
|
+
* @param {DDO} ddo DID Descriptor Object content.
|
|
27
|
+
* @param {AbortSignal} signal abort signal
|
|
28
|
+
* @return {Promise<ValidateMetadata>}.
|
|
29
|
+
*/
|
|
30
|
+
validate(ddo: DDO, signal?: AbortSignal): Promise<ValidateMetadata>;
|
|
9
31
|
}
|
|
10
32
|
export default Aquarius;
|
|
@@ -2,9 +2,8 @@ import { Contract } from 'web3-eth-contract';
|
|
|
2
2
|
import Web3 from 'web3';
|
|
3
3
|
import { TransactionReceipt } from 'web3-core';
|
|
4
4
|
import { AbiItem } from 'web3-utils';
|
|
5
|
-
import { FreCreationParams, Erc20CreateParams, PoolCreationParams, DispenserCreationParams } from '../interfaces';
|
|
6
5
|
import { Config } from '../models/index.js';
|
|
7
|
-
import { ProviderFees } from '../@types/index.js';
|
|
6
|
+
import { ProviderFees, FreCreationParams, Erc20CreateParams, PoolCreationParams, DispenserCreationParams, ConsumeMarketFee } from '../@types/index.js';
|
|
8
7
|
interface Template {
|
|
9
8
|
templateAddress: string;
|
|
10
9
|
isActive: boolean;
|
|
@@ -13,54 +12,264 @@ export interface TokenOrder {
|
|
|
13
12
|
tokenAddress: string;
|
|
14
13
|
consumer: string;
|
|
15
14
|
serviceIndex: number;
|
|
16
|
-
|
|
15
|
+
_providerFee: ProviderFees;
|
|
16
|
+
_consumeMarketFee: ConsumeMarketFee;
|
|
17
17
|
}
|
|
18
18
|
export interface NftCreateData {
|
|
19
19
|
name: string;
|
|
20
20
|
symbol: string;
|
|
21
21
|
templateIndex: number;
|
|
22
22
|
tokenURI: string;
|
|
23
|
+
transferable: boolean;
|
|
24
|
+
owner: string;
|
|
23
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Provides an interface for NFT Factory contract
|
|
28
|
+
*/
|
|
24
29
|
export declare class NftFactory {
|
|
25
|
-
GASLIMIT_DEFAULT: number;
|
|
26
30
|
factory721Address: string;
|
|
27
31
|
factory721Abi: AbiItem | AbiItem[];
|
|
28
32
|
web3: Web3;
|
|
29
33
|
config: Config;
|
|
30
34
|
factory721: Contract;
|
|
31
|
-
|
|
35
|
+
/**
|
|
36
|
+
* Instantiate Datatokens.
|
|
37
|
+
* @param {String} factory721Address
|
|
38
|
+
* @param {AbiItem | AbiItem[]} factory721ABI
|
|
39
|
+
* @param {Web3} web3
|
|
40
|
+
*/
|
|
41
|
+
constructor(factory721Address: string, web3: Web3, network?: string | number, factory721Abi?: AbiItem | AbiItem[], config?: Config);
|
|
42
|
+
/**
|
|
43
|
+
* Get estimated gas cost for deployERC721Contract value
|
|
44
|
+
* @param {String} address
|
|
45
|
+
* @param {String} nftData
|
|
46
|
+
* @return {Promise<string>} NFT datatoken address
|
|
47
|
+
*/
|
|
32
48
|
estGasCreateNFT(address: string, nftData: NftCreateData): Promise<string>;
|
|
49
|
+
/**
|
|
50
|
+
* Create new NFT
|
|
51
|
+
* @param {String} address
|
|
52
|
+
* @param {NFTCreateData} nftData
|
|
53
|
+
* @return {Promise<string>} NFT datatoken address
|
|
54
|
+
*/
|
|
33
55
|
createNFT(address: string, nftData: NftCreateData): Promise<string>;
|
|
56
|
+
/** Get Current NFT Count (NFT created)
|
|
57
|
+
* @return {Promise<number>} Number of NFT created from this factory
|
|
58
|
+
*/
|
|
34
59
|
getCurrentNFTCount(): Promise<number>;
|
|
60
|
+
/** Get Current Datatoken Count
|
|
61
|
+
* @return {Promise<number>} Number of DTs created from this factory
|
|
62
|
+
*/
|
|
35
63
|
getCurrentTokenCount(): Promise<number>;
|
|
64
|
+
/** Get Factory Owner
|
|
65
|
+
* @return {Promise<string>} Factory Owner address
|
|
66
|
+
*/
|
|
36
67
|
getOwner(): Promise<string>;
|
|
68
|
+
/** Get Current NFT Template Count
|
|
69
|
+
* @return {Promise<number>} Number of NFT Template added to this factory
|
|
70
|
+
*/
|
|
37
71
|
getCurrentNFTTemplateCount(): Promise<number>;
|
|
72
|
+
/** Get Current Template Datatoken (ERC20) Count
|
|
73
|
+
* @return {Promise<number>} Number of ERC20 Template added to this factory
|
|
74
|
+
*/
|
|
38
75
|
getCurrentTokenTemplateCount(): Promise<number>;
|
|
76
|
+
/** Get NFT Template
|
|
77
|
+
* @param {Number} index Template index
|
|
78
|
+
* @return {Promise<Template>} Number of Template added to this factory
|
|
79
|
+
*/
|
|
39
80
|
getNFTTemplate(index: number): Promise<Template>;
|
|
81
|
+
/** Get Datatoken(erc20) Template
|
|
82
|
+
* @param {Number} index Template index
|
|
83
|
+
* @return {Promise<Template>} DT Template info
|
|
84
|
+
*/
|
|
40
85
|
getTokenTemplate(index: number): Promise<Template>;
|
|
86
|
+
/** Check if ERC20 is deployed from the factory
|
|
87
|
+
* @param {String} datatoken Datatoken address we want to check
|
|
88
|
+
* @return {Promise<Boolean>} return true if deployed from this factory
|
|
89
|
+
*/
|
|
41
90
|
checkDatatoken(datatoken: string): Promise<Boolean>;
|
|
91
|
+
/** Check if NFT is deployed from the factory
|
|
92
|
+
* @param {String} nftAddress nftAddress address we want to check
|
|
93
|
+
* @return {Promise<String>} return address(0) if it's not, or the nftAddress if true
|
|
94
|
+
*/
|
|
42
95
|
checkNFT(nftAddress: string): Promise<String>;
|
|
96
|
+
/**
|
|
97
|
+
* Estimate gas cost for add721TokenTemplate method
|
|
98
|
+
* @param {String} address
|
|
99
|
+
* @param {String} templateAddress template address to add
|
|
100
|
+
* @return {Promise<TransactionReceipt>}
|
|
101
|
+
*/
|
|
43
102
|
estGasAddNFTTemplate(address: string, templateAddress: string): Promise<any>;
|
|
103
|
+
/**
|
|
104
|
+
* Add a new erc721 token template - only factory Owner
|
|
105
|
+
* @param {String} address
|
|
106
|
+
* @param {String} templateAddress template address to add
|
|
107
|
+
* @return {Promise<TransactionReceipt>}
|
|
108
|
+
*/
|
|
44
109
|
addNFTTemplate(address: string, templateAddress: string): Promise<TransactionReceipt>;
|
|
110
|
+
/**
|
|
111
|
+
* Estimate gas cost for disable721TokenTemplate method
|
|
112
|
+
* @param {String} address
|
|
113
|
+
* @param {Number} templateIndex index of the template we want to disable
|
|
114
|
+
* @return {Promise<TransactionReceipt>} current token template count
|
|
115
|
+
*/
|
|
45
116
|
estGasDisableNFTTemplate(address: string, templateIndex: number): Promise<any>;
|
|
117
|
+
/**
|
|
118
|
+
* Disable token template - only factory Owner
|
|
119
|
+
* @param {String} address
|
|
120
|
+
* @param {Number} templateIndex index of the template we want to disable
|
|
121
|
+
* @return {Promise<TransactionReceipt>} current token template count
|
|
122
|
+
*/
|
|
46
123
|
disableNFTTemplate(address: string, templateIndex: number): Promise<TransactionReceipt>;
|
|
124
|
+
/**
|
|
125
|
+
* Reactivate a previously disabled token template - only factory Owner
|
|
126
|
+
* @param {String} address
|
|
127
|
+
* @param {Number} templateIndex index of the template we want to reactivate
|
|
128
|
+
* @return {Promise<TransactionReceipt>} current token template count
|
|
129
|
+
*/
|
|
47
130
|
estGasReactivateNFTTemplate(address: string, templateIndex: number): Promise<any>;
|
|
131
|
+
/**
|
|
132
|
+
* Reactivate a previously disabled token template - only factory Owner
|
|
133
|
+
* @param {String} address
|
|
134
|
+
* @param {Number} templateIndex index of the template we want to reactivate
|
|
135
|
+
* @return {Promise<TransactionReceipt>} current token template count
|
|
136
|
+
*/
|
|
48
137
|
reactivateNFTTemplate(address: string, templateIndex: number): Promise<TransactionReceipt>;
|
|
138
|
+
/**
|
|
139
|
+
* Estimate gas cost for addTokenTemplate method
|
|
140
|
+
* @param {String} address
|
|
141
|
+
* @param {String} templateAddress template address to add
|
|
142
|
+
* @return {Promise<TransactionReceipt>}
|
|
143
|
+
*/
|
|
49
144
|
estGasAddTokenTemplate(address: string, templateAddress: string): Promise<any>;
|
|
145
|
+
/**
|
|
146
|
+
* Add a new erc721 token template - only factory Owner
|
|
147
|
+
* @param {String} address
|
|
148
|
+
* @param {String} templateAddress template address to add
|
|
149
|
+
* @return {Promise<TransactionReceipt>}
|
|
150
|
+
*/
|
|
50
151
|
addTokenTemplate(address: string, templateAddress: string): Promise<TransactionReceipt>;
|
|
152
|
+
/**
|
|
153
|
+
* Estimate gas cost for disableTokenTemplate method
|
|
154
|
+
* @param {String} address
|
|
155
|
+
* @param {Number} templateIndex index of the template we want to disable
|
|
156
|
+
* @return {Promise<TransactionReceipt>} current token template count
|
|
157
|
+
*/
|
|
51
158
|
estGasDisableTokenTemplate(address: string, templateIndex: number): Promise<any>;
|
|
159
|
+
/**
|
|
160
|
+
* Disable token template - only factory Owner
|
|
161
|
+
* @param {String} address
|
|
162
|
+
* @param {Number} templateIndex index of the template we want to disable
|
|
163
|
+
* @return {Promise<TransactionReceipt>} current token template count
|
|
164
|
+
*/
|
|
52
165
|
disableTokenTemplate(address: string, templateIndex: number): Promise<TransactionReceipt>;
|
|
166
|
+
/**
|
|
167
|
+
* Estimate gas cost for reactivateTokenTemplate method
|
|
168
|
+
* @param {String} address
|
|
169
|
+
* @param {Number} templateIndex index of the template we want to reactivate
|
|
170
|
+
* @return {Promise<TransactionReceipt>} current token template count
|
|
171
|
+
*/
|
|
53
172
|
estGasReactivateTokenTemplate(address: string, templateIndex: number): Promise<any>;
|
|
173
|
+
/**
|
|
174
|
+
* Reactivate a previously disabled token template - only factory Owner
|
|
175
|
+
* @param {String} address
|
|
176
|
+
* @param {Number} templateIndex index of the template we want to reactivate
|
|
177
|
+
* @return {Promise<TransactionReceipt>} current token template count
|
|
178
|
+
*/
|
|
54
179
|
reactivateTokenTemplate(address: string, templateIndex: number): Promise<TransactionReceipt>;
|
|
180
|
+
/** Estimate gas cost for startMultipleTokenOrder method
|
|
181
|
+
* @param address Caller address
|
|
182
|
+
* @param orders an array of struct tokenOrder
|
|
183
|
+
* @return {Promise<TransactionReceipt>} transaction receipt
|
|
184
|
+
*/
|
|
55
185
|
estGasStartMultipleTokenOrder(address: string, orders: TokenOrder[]): Promise<any>;
|
|
186
|
+
/**
|
|
187
|
+
* @dev startMultipleTokenOrder
|
|
188
|
+
* Used as a proxy to order multiple services
|
|
189
|
+
* Users can have inifinite approvals for fees for factory instead of having one approval/ erc20 contract
|
|
190
|
+
* Requires previous approval of all :
|
|
191
|
+
* - consumeFeeTokens
|
|
192
|
+
* - publishMarketFeeTokens
|
|
193
|
+
* - erc20 datatokens
|
|
194
|
+
* @param address Caller address
|
|
195
|
+
* @param orders an array of struct tokenOrder
|
|
196
|
+
* @return {Promise<TransactionReceipt>} transaction receipt
|
|
197
|
+
*/
|
|
56
198
|
startMultipleTokenOrder(address: string, orders: TokenOrder[]): Promise<TransactionReceipt>;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
199
|
+
/**
|
|
200
|
+
* Estimate gas cost for createNftWithErc20 method
|
|
201
|
+
* @param address Caller address
|
|
202
|
+
* @param _NftCreateData input data for nft creation
|
|
203
|
+
* @param _ErcCreateData input data for erc20 creation
|
|
204
|
+
* @return {Promise<TransactionReceipt>} transaction receipt
|
|
205
|
+
*/
|
|
206
|
+
estGasCreateNftWithErc20(address: string, nftCreateData: NftCreateData, ercParams: Erc20CreateParams): Promise<any>;
|
|
207
|
+
/**
|
|
208
|
+
* @dev createNftWithErc20
|
|
209
|
+
* Creates a new NFT, then a ERC20,all in one call
|
|
210
|
+
* @param address Caller address
|
|
211
|
+
* @param _NftCreateData input data for nft creation
|
|
212
|
+
* @param _ErcCreateData input data for erc20 creation
|
|
213
|
+
* @return {Promise<TransactionReceipt>} transaction receipt
|
|
214
|
+
*/
|
|
215
|
+
createNftWithErc20(address: string, nftCreateData: NftCreateData, ercParams: Erc20CreateParams): Promise<TransactionReceipt>;
|
|
216
|
+
/**
|
|
217
|
+
* Estimate gas cost for createNftErc20WithPool method
|
|
218
|
+
* @param address Caller address
|
|
219
|
+
* @param nftCreateData input data for NFT Creation
|
|
220
|
+
* @param ercParams input data for ERC20 Creation
|
|
221
|
+
* @param poolParams input data for Pool Creation
|
|
222
|
+
* @return {Promise<TransactionReceipt>} transaction receipt
|
|
223
|
+
*/
|
|
224
|
+
estGasCreateNftErc20WithPool(address: string, nftCreateData: NftCreateData, ercParams: Erc20CreateParams, poolParams: PoolCreationParams): Promise<any>;
|
|
225
|
+
/**
|
|
226
|
+
* @dev createNftErc20WithPool
|
|
227
|
+
* Creates a new NFT, then a ERC20, then a Pool, all in one call
|
|
228
|
+
* Use this carefully, because if Pool creation fails, you are still going to pay a lot of gas
|
|
229
|
+
* @param address Caller address
|
|
230
|
+
* @param nftCreateData input data for NFT Creation
|
|
231
|
+
* @param ercParams input data for ERC20 Creation
|
|
232
|
+
* @param poolParams input data for Pool Creation
|
|
233
|
+
* @return {Promise<TransactionReceipt>} transaction receipt
|
|
234
|
+
*/
|
|
235
|
+
createNftErc20WithPool(address: string, nftCreateData: NftCreateData, ercParams: Erc20CreateParams, poolParams: PoolCreationParams): Promise<TransactionReceipt>;
|
|
236
|
+
/** Estimate gas cost for createNftErc20WithFixedRate method
|
|
237
|
+
* @param address Caller address
|
|
238
|
+
* @param nftCreateData input data for NFT Creation
|
|
239
|
+
* @param ercParams input data for ERC20 Creation
|
|
240
|
+
* @param freParams input data for FixedRate Creation
|
|
241
|
+
* @return {Promise<TransactionReceipt>} transaction receipt
|
|
242
|
+
*/
|
|
243
|
+
estGasCreateNftErc20WithFixedRate(address: string, nftCreateData: NftCreateData, ercParams: Erc20CreateParams, freParams: FreCreationParams): Promise<any>;
|
|
244
|
+
/**
|
|
245
|
+
* @dev createNftErc20WithFixedRate
|
|
246
|
+
* Creates a new NFT, then a ERC20, then a FixedRateExchange, all in one call
|
|
247
|
+
* Use this carefully, because if Fixed Rate creation fails, you are still going to pay a lot of gas
|
|
248
|
+
* @param address Caller address
|
|
249
|
+
* @param nftCreateData input data for NFT Creation
|
|
250
|
+
* @param ercParams input data for ERC20 Creation
|
|
251
|
+
* @param freParams input data for FixedRate Creation
|
|
252
|
+
* @return {Promise<TransactionReceipt>} transaction receipt
|
|
253
|
+
*/
|
|
254
|
+
createNftErc20WithFixedRate(address: string, nftCreateData: NftCreateData, ercParams: Erc20CreateParams, freParams: FreCreationParams): Promise<TransactionReceipt>;
|
|
255
|
+
/** Estimate gas cost for createNftErc20WithFixedRate method
|
|
256
|
+
* @param address Caller address
|
|
257
|
+
* @param nftCreateData input data for NFT Creation
|
|
258
|
+
* @param ercParams input data for ERC20 Creation
|
|
259
|
+
* @param dispenserParams input data for Dispenser Creation
|
|
260
|
+
* @return {Promise<TransactionReceipt>} transaction receipt
|
|
261
|
+
*/
|
|
262
|
+
estGasCreateNftErc20WithDispenser(address: string, nftCreateData: NftCreateData, ercParams: Erc20CreateParams, dispenserParams: DispenserCreationParams): Promise<any>;
|
|
263
|
+
/**
|
|
264
|
+
* @dev createNftErc20WithDispenser
|
|
265
|
+
* Creates a new NFT, then a ERC20, then a Dispenser, all in one call
|
|
266
|
+
* Use this carefully, because if Dispenser creation fails, you are still going to pay a lot of gas
|
|
267
|
+
* @param address Caller address
|
|
268
|
+
* @param nftCreateData input data for NFT Creation
|
|
269
|
+
* @param ercParams input data for ERC20 Creation
|
|
270
|
+
* @param dispenserParams input data for Dispenser Creation
|
|
271
|
+
* @return {Promise<TransactionReceipt>} transaction receipt
|
|
272
|
+
*/
|
|
273
|
+
createNftErc20WithDispenser(address: string, nftCreateData: NftCreateData, ercParams: Erc20CreateParams, dispenserParams: DispenserCreationParams): Promise<TransactionReceipt>;
|
|
65
274
|
}
|
|
66
275
|
export {};
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './aquarius';
|
|
1
2
|
export * from './pools';
|
|
2
3
|
export * from './tokens';
|
|
3
4
|
export * from './factories';
|
|
@@ -5,4 +6,3 @@ export * from './models';
|
|
|
5
6
|
export * from './utils';
|
|
6
7
|
export * from './@types';
|
|
7
8
|
export * from './provider';
|
|
8
|
-
export * from './interfaces';
|
|
@@ -1,38 +1,166 @@
|
|
|
1
1
|
import { LogLevel } from '../utils/Logger';
|
|
2
2
|
import { AbiItem } from 'web3-utils/types';
|
|
3
3
|
export declare class Config {
|
|
4
|
+
/**
|
|
5
|
+
* Ethereum node URL.
|
|
6
|
+
* @type {string}
|
|
7
|
+
*/
|
|
4
8
|
nodeUri?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Address of Provider.
|
|
11
|
+
* @type {string}
|
|
12
|
+
*/
|
|
5
13
|
providerAddress?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Metadata Store URL.
|
|
16
|
+
* @type {string}
|
|
17
|
+
*/
|
|
6
18
|
metadataCacheUri?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Provider URL.
|
|
21
|
+
* @type {string}
|
|
22
|
+
*/
|
|
7
23
|
providerUri?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Web3 Provider.
|
|
26
|
+
* @type {any}
|
|
27
|
+
*/
|
|
8
28
|
web3Provider?: any;
|
|
29
|
+
/**
|
|
30
|
+
* Ocean Token address
|
|
31
|
+
* @type {string}
|
|
32
|
+
*/
|
|
9
33
|
oceanTokenAddress?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Factory address
|
|
36
|
+
* @type {string}
|
|
37
|
+
*/
|
|
10
38
|
erc721FactoryAddress?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Factory ABI
|
|
41
|
+
* @type {string}
|
|
42
|
+
*/
|
|
11
43
|
erc721FFactoryABI?: AbiItem | AbiItem[];
|
|
44
|
+
/**
|
|
45
|
+
* datatokens ABI
|
|
46
|
+
* @type {string}
|
|
47
|
+
*/
|
|
12
48
|
datatokensABI?: AbiItem | AbiItem[];
|
|
49
|
+
/**
|
|
50
|
+
* Pool Template address
|
|
51
|
+
* @type {string}
|
|
52
|
+
*/
|
|
13
53
|
poolTemplateAddress?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Pool Factory ABI
|
|
56
|
+
* @type {string}
|
|
57
|
+
*/
|
|
14
58
|
poolFactoryABI?: AbiItem | AbiItem[];
|
|
59
|
+
/**
|
|
60
|
+
* Pool ABI
|
|
61
|
+
* @type {string}
|
|
62
|
+
*/
|
|
15
63
|
poolABI?: AbiItem | AbiItem[];
|
|
64
|
+
/**
|
|
65
|
+
* FixedRateExchangeAddress
|
|
66
|
+
* @type {string}
|
|
67
|
+
*/
|
|
16
68
|
fixedRateExchangeAddress?: string;
|
|
69
|
+
/**
|
|
70
|
+
* FixedRateExchangeAddressABI
|
|
71
|
+
* @type {any}
|
|
72
|
+
*/
|
|
17
73
|
fixedRateExchangeAddressABI?: AbiItem | AbiItem[];
|
|
74
|
+
/**
|
|
75
|
+
* DispenserAddress
|
|
76
|
+
* @type {string}
|
|
77
|
+
*/
|
|
18
78
|
dispenserAddress?: string;
|
|
79
|
+
/**
|
|
80
|
+
* DispenserABI
|
|
81
|
+
* @type {any}
|
|
82
|
+
*/
|
|
19
83
|
dispenserABI?: AbiItem | AbiItem[];
|
|
84
|
+
/**
|
|
85
|
+
* OPFCommunityFeeCollector
|
|
86
|
+
* @type {string}
|
|
87
|
+
*/
|
|
20
88
|
opfCommunityFeeCollector?: string;
|
|
89
|
+
/**
|
|
90
|
+
* SideStaking address
|
|
91
|
+
* @type {string}
|
|
92
|
+
*/
|
|
21
93
|
sideStakingAddress?: string;
|
|
94
|
+
/**
|
|
95
|
+
* block number of the deployment
|
|
96
|
+
* @type {number}
|
|
97
|
+
*/
|
|
22
98
|
startBlock?: number;
|
|
99
|
+
/**
|
|
100
|
+
* Log level.
|
|
101
|
+
* @type {boolean | LogLevel}
|
|
102
|
+
*/
|
|
23
103
|
verbose?: boolean | LogLevel;
|
|
104
|
+
/**
|
|
105
|
+
* Message shown when the user creates its own token.
|
|
106
|
+
* @type {string}
|
|
107
|
+
*/
|
|
24
108
|
authMessage?: string;
|
|
109
|
+
/**
|
|
110
|
+
* Token expiration time in ms.
|
|
111
|
+
* @type {number}
|
|
112
|
+
*/
|
|
25
113
|
authTokenExpiration?: number;
|
|
114
|
+
/**
|
|
115
|
+
* Parity config
|
|
116
|
+
* @type {string}
|
|
117
|
+
*/
|
|
26
118
|
parityUri?: string;
|
|
27
119
|
threshold?: number;
|
|
120
|
+
/**
|
|
121
|
+
* Chain ID
|
|
122
|
+
* @type {number}
|
|
123
|
+
*/
|
|
28
124
|
chainId: number;
|
|
125
|
+
/**
|
|
126
|
+
* Network name ex: mainnet, rinkeby, polygon
|
|
127
|
+
* @type {string}
|
|
128
|
+
*/
|
|
29
129
|
network: string;
|
|
130
|
+
/**
|
|
131
|
+
* Url of the relevant subgraph instance ex: https://subgraph.mainnet.oceanprotocol.com
|
|
132
|
+
* @type {string}
|
|
133
|
+
*/
|
|
30
134
|
subgraphUri: string;
|
|
135
|
+
/**
|
|
136
|
+
* Url of the blockchain exporer ex: https://etherscan.io
|
|
137
|
+
* @type {string}
|
|
138
|
+
*/
|
|
31
139
|
explorerUri: string;
|
|
140
|
+
/**
|
|
141
|
+
* Ocean toke symbol on the chain, it's used just for convenience to reduce number of calls
|
|
142
|
+
* @type {string}
|
|
143
|
+
*/
|
|
32
144
|
oceanTokenSymbol: string;
|
|
145
|
+
/**
|
|
146
|
+
* Specify the transaction Block Timeout
|
|
147
|
+
* @type {number}
|
|
148
|
+
*/
|
|
33
149
|
transactionBlockTimeout: number;
|
|
150
|
+
/**
|
|
151
|
+
* Specify the transaction Confirmation Blocks
|
|
152
|
+
* @type {number}
|
|
153
|
+
*/
|
|
34
154
|
transactionConfirmationBlocks: number;
|
|
155
|
+
/**
|
|
156
|
+
* Specify the transaction Polling Blocks Timeout
|
|
157
|
+
* @type {number}
|
|
158
|
+
*/
|
|
35
159
|
transactionPollingTimeout: number;
|
|
160
|
+
/**
|
|
161
|
+
* Specify the multiplier for the gas fee
|
|
162
|
+
* @type {number}
|
|
163
|
+
*/
|
|
36
164
|
gasFeeMultiplier: number;
|
|
37
165
|
}
|
|
38
166
|
export default Config;
|