@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.
- package/CHANGELOG.md +28 -16
- package/CodeExamples.md +28 -315
- package/README.md +4 -7
- 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 +4 -4
- package/dist/src/@types/Compute.d.ts +1 -1
- package/dist/src/@types/DDO/DDO.d.ts +2 -5
- package/dist/src/@types/{Erc20.d.ts → Datatoken.d.ts} +18 -1
- package/dist/src/@types/Dispenser.d.ts +9 -0
- package/dist/src/@types/FixedPrice.d.ts +24 -0
- package/dist/src/@types/{Erc721.d.ts → NFT.d.ts} +6 -0
- package/dist/src/@types/NFTFactory.d.ts +20 -0
- package/dist/src/@types/Provider.d.ts +8 -0
- package/dist/src/@types/ReturnTypes.d.ts +2 -0
- package/dist/src/@types/Router.d.ts +1 -1
- package/dist/src/@types/index.d.ts +11 -8
- package/dist/src/{models → config}/Config.d.ts +2 -23
- package/dist/src/{utils → config}/ConfigHelper.d.ts +1 -1
- package/dist/src/config/index.d.ts +2 -0
- package/dist/src/contracts/Datatoken.d.ts +232 -0
- package/dist/src/contracts/Dispenser.d.ts +73 -0
- package/dist/src/contracts/FixedRateExchange.d.ts +212 -0
- package/dist/src/contracts/NFT.d.ts +197 -0
- package/dist/src/contracts/NFTFactory.d.ts +144 -0
- package/dist/src/contracts/Router.d.ts +92 -0
- package/dist/src/contracts/SmartContract.d.ts +22 -0
- package/dist/src/contracts/SmartContractWithAddress.d.ts +18 -0
- package/dist/src/contracts/index.d.ts +8 -0
- package/dist/src/index.d.ts +4 -7
- package/dist/src/{aquarius → services}/Aquarius.d.ts +2 -3
- package/dist/src/{provider → services}/Provider.d.ts +5 -13
- package/dist/src/services/index.d.ts +2 -0
- package/dist/src/utils/Constants.d.ts +2 -0
- package/dist/src/utils/ContractUtils.d.ts +14 -8
- package/dist/src/utils/DdoHelpers.d.ts +1 -1
- package/dist/src/utils/FetchHelper.d.ts +1 -4
- package/dist/src/utils/Logger.d.ts +0 -1
- package/dist/src/utils/TokenUtils.d.ts +17 -39
- package/dist/src/utils/index.d.ts +6 -7
- package/dist/test/TestContractHandler.d.ts +4 -4
- package/dist/test/config.d.ts +1 -1
- package/dist/test/unit/{tokens/Datatoken.test.d.ts → Datatoken.test.d.ts} +0 -0
- package/dist/test/unit/{pools/dispenser/Dispenser.test.d.ts → Dispenser.test.d.ts} +0 -0
- package/dist/test/unit/{pools/fixedRate/FixedRateExchange.test.d.ts → FixedRateExchange.test.d.ts} +0 -0
- package/dist/test/unit/{tokens/Nft.test.d.ts → Nft.test.d.ts} +0 -0
- package/dist/test/unit/{factories/NftFactory.test.d.ts → NftFactory.test.d.ts} +0 -0
- package/dist/test/unit/{pools/Router.test.d.ts → Router.test.d.ts} +0 -0
- package/package.json +5 -18
- package/dist/src/@types/Pool.d.ts +0 -45
- package/dist/src/aquarius/index.d.ts +0 -1
- package/dist/src/factories/NFTFactory.d.ts +0 -275
- package/dist/src/factories/index.d.ts +0 -1
- package/dist/src/models/index.d.ts +0 -1
- package/dist/src/pools/Router.d.ts +0 -228
- package/dist/src/pools/balancer/Pool.d.ts +0 -395
- package/dist/src/pools/balancer/index.d.ts +0 -1
- package/dist/src/pools/dispenser/Dispenser.d.ts +0 -145
- package/dist/src/pools/dispenser/index.d.ts +0 -1
- package/dist/src/pools/fixedRate/FixedRateExchange.d.ts +0 -388
- package/dist/src/pools/fixedRate/index.d.ts +0 -1
- package/dist/src/pools/index.d.ts +0 -5
- package/dist/src/pools/ssContracts/SideStaking.d.ts +0 -133
- package/dist/src/pools/ssContracts/index.d.ts +0 -1
- package/dist/src/provider/index.d.ts +0 -1
- package/dist/src/tokens/Datatoken.d.ts +0 -413
- package/dist/src/tokens/NFT.d.ts +0 -364
- package/dist/src/tokens/index.d.ts +0 -2
- package/dist/src/utils/ConversionTypeHelper.d.ts +0 -3
- package/dist/src/utils/PoolHelpers.d.ts +0 -8
- package/dist/test/unit/pools/balancer/Pool.test.d.ts +0 -1
- package/dist/test/unit/pools/ssContracts/SideStaking.test.d.ts +0 -1
|
@@ -1,413 +0,0 @@
|
|
|
1
|
-
import Web3 from 'web3';
|
|
2
|
-
import { AbiItem } from 'web3-utils';
|
|
3
|
-
import { TransactionReceipt } from 'web3-eth';
|
|
4
|
-
import { Contract } from 'web3-eth-contract';
|
|
5
|
-
import { ConsumeMarketFee, FreOrderParams, FreCreationParams, ProviderFees, PublishingMarketFee } from '../@types';
|
|
6
|
-
import { Nft } from './NFT';
|
|
7
|
-
import { Config } from '../models/index.js';
|
|
8
|
-
/**
|
|
9
|
-
* ERC20 ROLES
|
|
10
|
-
*/
|
|
11
|
-
interface Roles {
|
|
12
|
-
minter: boolean;
|
|
13
|
-
paymentManager: boolean;
|
|
14
|
-
}
|
|
15
|
-
export interface OrderParams {
|
|
16
|
-
consumer: string;
|
|
17
|
-
serviceIndex: number;
|
|
18
|
-
_providerFee: ProviderFees;
|
|
19
|
-
_consumeMarketFee: ConsumeMarketFee;
|
|
20
|
-
}
|
|
21
|
-
export interface DispenserParams {
|
|
22
|
-
maxTokens: string;
|
|
23
|
-
maxBalance: string;
|
|
24
|
-
withMint?: boolean;
|
|
25
|
-
allowedSwapper?: string;
|
|
26
|
-
}
|
|
27
|
-
export declare class Datatoken {
|
|
28
|
-
factoryAddress: string;
|
|
29
|
-
factoryABI: AbiItem | AbiItem[];
|
|
30
|
-
datatokensAbi: AbiItem | AbiItem[];
|
|
31
|
-
datatokensEnterpriseAbi: AbiItem | AbiItem[];
|
|
32
|
-
web3: Web3;
|
|
33
|
-
config: Config;
|
|
34
|
-
nft: Nft;
|
|
35
|
-
/**
|
|
36
|
-
* Instantiate ERC20 Datatokens
|
|
37
|
-
* @param {AbiItem | AbiItem[]} datatokensAbi
|
|
38
|
-
* @param {Web3} web3
|
|
39
|
-
*/
|
|
40
|
-
constructor(web3: Web3, network?: string | number, datatokensAbi?: AbiItem | AbiItem[], datatokensEnterpriseAbi?: AbiItem | AbiItem[], config?: Config);
|
|
41
|
-
/**
|
|
42
|
-
* Estimate gas cost for mint method
|
|
43
|
-
* @param {String} dtAddress Datatoken address
|
|
44
|
-
* @param {String} spender Spender address
|
|
45
|
-
* @param {string} amount Number of datatokens, as number. Will be converted to wei
|
|
46
|
-
* @param {String} address User adress
|
|
47
|
-
* @param {Contract} contractInstance optional contract instance
|
|
48
|
-
* @return {Promise<any>}
|
|
49
|
-
*/
|
|
50
|
-
estGasApprove(dtAddress: string, spender: string, amount: string, address: string, contractInstance?: Contract): Promise<any>;
|
|
51
|
-
/**
|
|
52
|
-
* Approve
|
|
53
|
-
* @param {String} dtAddress Datatoken address
|
|
54
|
-
* @param {String} spender Spender address
|
|
55
|
-
* @param {string} amount Number of datatokens, as number. Will be converted to wei
|
|
56
|
-
* @param {String} address User adress
|
|
57
|
-
* @return {Promise<TransactionReceipt>} trxReceipt
|
|
58
|
-
*/
|
|
59
|
-
approve(dtAddress: string, spender: string, amount: string, address: string): Promise<TransactionReceipt>;
|
|
60
|
-
/**
|
|
61
|
-
* Estimate gas cost for mint method
|
|
62
|
-
* @param {String} dtAddress Datatoken address
|
|
63
|
-
* @param {String} address Minter address
|
|
64
|
-
* @param {String} amount Number of datatokens, as number. Will be converted to wei
|
|
65
|
-
* @param {String} toAddress only if toAddress is different from the minter
|
|
66
|
-
* @param {Contract} contractInstance optional contract instance
|
|
67
|
-
* @return {Promise<any>}
|
|
68
|
-
*/
|
|
69
|
-
estGasMint(dtAddress: string, address: string, amount: string, toAddress?: string, contractInstance?: Contract): Promise<any>;
|
|
70
|
-
/**
|
|
71
|
-
* Estimate gas cost for createFixedRate method
|
|
72
|
-
* @param {String} dtAddress Datatoken address
|
|
73
|
-
* @param {String} address Caller address
|
|
74
|
-
* @param {String} fixedPriceAddress
|
|
75
|
-
* @param {FixedRateParams} fixedRateParams
|
|
76
|
-
* @param {Contract} contractInstance optional contract instance
|
|
77
|
-
* @return {Promise<any>}
|
|
78
|
-
*/
|
|
79
|
-
estGasCreateFixedRate(dtAddress: string, address: string, fixedRateParams: FreCreationParams, contractInstance?: Contract): Promise<any>;
|
|
80
|
-
/**
|
|
81
|
-
* Creates a new FixedRateExchange setup.
|
|
82
|
-
* @param {String} dtAddress Datatoken address
|
|
83
|
-
* @param {String} address Caller address
|
|
84
|
-
* @param {String} fixedPriceAddress
|
|
85
|
-
* @param {FixedRateParams} fixedRateParams
|
|
86
|
-
* @return {Promise<TransactionReceipt>} transactionId
|
|
87
|
-
*/
|
|
88
|
-
createFixedRate(dtAddress: string, address: string, fixedRateParams: FreCreationParams): Promise<TransactionReceipt>;
|
|
89
|
-
/**
|
|
90
|
-
* Estimate gas cost for createDispenser method
|
|
91
|
-
* @param {String} dtAddress Datatoken address
|
|
92
|
-
* @param {String} address Caller address
|
|
93
|
-
* @param {String} dispenserAddress ispenser contract address
|
|
94
|
-
* @param {String} dispenserParams
|
|
95
|
-
* @param {Contract} contractInstance optional contract instance
|
|
96
|
-
* @return {Promise<any>}
|
|
97
|
-
*/
|
|
98
|
-
estGasCreateDispenser(dtAddress: string, address: string, dispenserAddress: string, dispenserParams: DispenserParams, contractInstance?: Contract): Promise<any>;
|
|
99
|
-
/**
|
|
100
|
-
* Creates a new Dispenser
|
|
101
|
-
* @param {String} dtAddress Datatoken address
|
|
102
|
-
* @param {String} address Caller address
|
|
103
|
-
* @param {String} dispenserAddress ispenser contract address
|
|
104
|
-
* @param {String} dispenserParams
|
|
105
|
-
* @return {Promise<TransactionReceipt>} transactionId
|
|
106
|
-
*/
|
|
107
|
-
createDispenser(dtAddress: string, address: string, dispenserAddress: string, dispenserParams: DispenserParams): Promise<TransactionReceipt>;
|
|
108
|
-
/**
|
|
109
|
-
* Mint
|
|
110
|
-
* @param {String} dtAddress Datatoken address
|
|
111
|
-
* @param {String} address Minter address
|
|
112
|
-
* @param {String} amount Number of datatokens, as number. Will be converted to wei
|
|
113
|
-
* @param {String} toAddress only if toAddress is different from the minter
|
|
114
|
-
* @return {Promise<TransactionReceipt>} transactionId
|
|
115
|
-
*/
|
|
116
|
-
mint(dtAddress: string, address: string, amount: string, toAddress?: string): Promise<TransactionReceipt>;
|
|
117
|
-
/**
|
|
118
|
-
* Estimate gas cost for addMinter method
|
|
119
|
-
* @param {String} dtAddress Datatoken address
|
|
120
|
-
* @param {String} address User address
|
|
121
|
-
* @param {String} minter User which is going to be a Minter
|
|
122
|
-
* @param {Contract} contractInstance optional contract instance
|
|
123
|
-
* @return {Promise<any>}
|
|
124
|
-
*/
|
|
125
|
-
estGasAddMinter(dtAddress: string, address: string, minter: string, contractInstance?: Contract): Promise<any>;
|
|
126
|
-
/**
|
|
127
|
-
* Add Minter for an ERC20 datatoken
|
|
128
|
-
* only ERC20Deployer can succeed
|
|
129
|
-
* @param {String} dtAddress Datatoken address
|
|
130
|
-
* @param {String} address User address
|
|
131
|
-
* @param {String} minter User which is going to be a Minter
|
|
132
|
-
* @return {Promise<TransactionReceipt>} transactionId
|
|
133
|
-
*/
|
|
134
|
-
addMinter(dtAddress: string, address: string, minter: string): Promise<TransactionReceipt>;
|
|
135
|
-
/**
|
|
136
|
-
* Estimate gas for removeMinter method
|
|
137
|
-
* @param {String} dtAddress Datatoken address
|
|
138
|
-
* @param {String} address User address
|
|
139
|
-
* @param {String} minter User which will be removed from Minter permission
|
|
140
|
-
* @param {Contract} contractInstance optional contract instance
|
|
141
|
-
* @return {Promise<any>}
|
|
142
|
-
*/
|
|
143
|
-
estGasRemoveMinter(dtAddress: string, address: string, minter: string, contractInstance?: Contract): Promise<any>;
|
|
144
|
-
/**
|
|
145
|
-
* Revoke Minter permission for an ERC20 datatoken
|
|
146
|
-
* only ERC20Deployer can succeed
|
|
147
|
-
* @param {String} dtAddress Datatoken address
|
|
148
|
-
* @param {String} address User address
|
|
149
|
-
* @param {String} minter User which will be removed from Minter permission
|
|
150
|
-
* @param {Contract} contractInstance optional contract instance
|
|
151
|
-
* @return {Promise<any>}
|
|
152
|
-
*/
|
|
153
|
-
removeMinter(dtAddress: string, address: string, minter: string): Promise<TransactionReceipt>;
|
|
154
|
-
/**
|
|
155
|
-
* Estimate gas for addPaymentManager method
|
|
156
|
-
* @param {String} dtAddress Datatoken address
|
|
157
|
-
* @param {String} address User address
|
|
158
|
-
* @param {String} paymentManager User which is going to be a Minter
|
|
159
|
-
* @param {Contract} contractInstance optional contract instance
|
|
160
|
-
* @return {Promise<any>}
|
|
161
|
-
*/
|
|
162
|
-
estGasAddPaymentManager(dtAddress: string, address: string, paymentManager: string, contractInstance?: Contract): Promise<any>;
|
|
163
|
-
/**
|
|
164
|
-
* Add addPaymentManager (can set who's going to collect fee when consuming orders)
|
|
165
|
-
* only ERC20Deployer can succeed
|
|
166
|
-
* @param {String} dtAddress Datatoken address
|
|
167
|
-
* @param {String} address User address
|
|
168
|
-
* @param {String} paymentManager User which is going to be a Minter
|
|
169
|
-
* @return {Promise<TransactionReceipt>} transactionId
|
|
170
|
-
*/
|
|
171
|
-
addPaymentManager(dtAddress: string, address: string, paymentManager: string): Promise<TransactionReceipt>;
|
|
172
|
-
/**
|
|
173
|
-
* Estimate gas for removePaymentManager method
|
|
174
|
-
* @param {String} dtAddress Datatoken address
|
|
175
|
-
* @param {String} address User address
|
|
176
|
-
* @param {String} paymentManager User which will be removed from paymentManager permission
|
|
177
|
-
* @param {Contract} contractInstance optional contract instance
|
|
178
|
-
* @return {Promise<any>}
|
|
179
|
-
*/
|
|
180
|
-
estGasRemovePaymentManager(dtAddress: string, address: string, paymentManager: string, contractInstance?: Contract): Promise<any>;
|
|
181
|
-
/**
|
|
182
|
-
* Revoke paymentManager permission for an ERC20 datatoken
|
|
183
|
-
* only ERC20Deployer can succeed
|
|
184
|
-
* @param {String} dtAddress Datatoken address
|
|
185
|
-
* @param {String} address User address
|
|
186
|
-
* @param {String} paymentManager User which will be removed from paymentManager permission
|
|
187
|
-
* @return {Promise<TransactionReceipt>} trxReceipt
|
|
188
|
-
*/
|
|
189
|
-
removePaymentManager(dtAddress: string, address: string, paymentManager: string): Promise<TransactionReceipt>;
|
|
190
|
-
/**
|
|
191
|
-
* Estimate gas for setPaymentCollector method
|
|
192
|
-
* @param dtAddress datatoken address
|
|
193
|
-
* @param address Caller address
|
|
194
|
-
* @param paymentCollector User to be set as new payment collector
|
|
195
|
-
* @param {Contract} contractInstance optional contract instance
|
|
196
|
-
* @return {Promise<any>}
|
|
197
|
-
*/
|
|
198
|
-
estGasSetPaymentCollector(dtAddress: string, address: string, paymentCollector: string, contractInstance?: Contract): Promise<any>;
|
|
199
|
-
/**
|
|
200
|
-
* This function allows to set a new PaymentCollector (receives DT when consuming)
|
|
201
|
-
* If not set the paymentCollector is the NFT Owner
|
|
202
|
-
* only NFT owner can call
|
|
203
|
-
* @param dtAddress datatoken address
|
|
204
|
-
* @param address Caller address
|
|
205
|
-
* @param paymentCollector User to be set as new payment collector
|
|
206
|
-
* @return {Promise<TransactionReceipt>} trxReceipt
|
|
207
|
-
*/
|
|
208
|
-
setPaymentCollector(dtAddress: string, address: string, paymentCollector: string): Promise<TransactionReceipt>;
|
|
209
|
-
/** getPaymentCollector - It returns the current paymentCollector
|
|
210
|
-
* @param dtAddress datatoken address
|
|
211
|
-
* @return {Promise<string>}
|
|
212
|
-
*/
|
|
213
|
-
getPaymentCollector(dtAddress: string): Promise<string>;
|
|
214
|
-
/**
|
|
215
|
-
* Transfer as number from address to toAddress
|
|
216
|
-
* @param {String} dtAddress Datatoken address
|
|
217
|
-
* @param {String} toAddress Receiver address
|
|
218
|
-
* @param {String} amount Number of datatokens, as number. To be converted to wei.
|
|
219
|
-
* @param {String} address User adress
|
|
220
|
-
* @return {Promise<TransactionReceipt>} transactionId
|
|
221
|
-
*/
|
|
222
|
-
transfer(dtAddress: string, toAddress: string, amount: string, address: string): Promise<TransactionReceipt>;
|
|
223
|
-
/**
|
|
224
|
-
* Estimate gas for transfer method
|
|
225
|
-
* @param {String} dtAddress Datatoken address
|
|
226
|
-
* @param {String} toAddress Receiver address
|
|
227
|
-
* @param {String} amount Number of datatokens, as number. Expressed as wei
|
|
228
|
-
* @param {String} address User adress
|
|
229
|
-
* @param {Contract} contractInstance optional contract instance
|
|
230
|
-
* @return {Promise<any>}
|
|
231
|
-
*/
|
|
232
|
-
estGasTransfer(dtAddress: string, toAddress: string, amount: string, address: string, contractInstance?: Contract): Promise<any>;
|
|
233
|
-
/**
|
|
234
|
-
* Transfer in wei from address to toAddress
|
|
235
|
-
* @param {String} dtAddress Datatoken address
|
|
236
|
-
* @param {String} toAddress Receiver address
|
|
237
|
-
* @param {String} amount Number of datatokens, as number. Expressed as wei
|
|
238
|
-
* @param {String} address User adress
|
|
239
|
-
* @return {Promise<TransactionReceipt>} transactionId
|
|
240
|
-
*/
|
|
241
|
-
transferWei(dtAddress: string, toAddress: string, amount: string, address: string): Promise<TransactionReceipt>;
|
|
242
|
-
/** Estimate gas cost for startOrder method
|
|
243
|
-
* @param {String} dtAddress Datatoken address
|
|
244
|
-
* @param {String} address User address which calls
|
|
245
|
-
* @param {String} consumer Consumer Address
|
|
246
|
-
* @param {Number} serviceIndex Service index in the metadata
|
|
247
|
-
* @param {providerFees} providerFees provider fees
|
|
248
|
-
* @param {consumeMarketFee} ConsumeMarketFee consume market fees
|
|
249
|
-
* @param {Contract} contractInstance optional contract instance
|
|
250
|
-
* @return {Promise<any>}
|
|
251
|
-
*/
|
|
252
|
-
estGasStartOrder(dtAddress: string, address: string, consumer: string, serviceIndex: number, providerFees: ProviderFees, consumeMarketFee?: ConsumeMarketFee, contractInstance?: Contract): Promise<any>;
|
|
253
|
-
/** Start Order: called by payer or consumer prior ordering a service consume on a marketplace.
|
|
254
|
-
* @param {String} dtAddress Datatoken address
|
|
255
|
-
* @param {String} address User address which calls
|
|
256
|
-
* @param {String} consumer Consumer Address
|
|
257
|
-
* @param {Number} serviceIndex Service index in the metadata
|
|
258
|
-
* @param {providerFees} providerFees provider fees
|
|
259
|
-
* @param {consumeMarketFee} ConsumeMarketFee consume market fees
|
|
260
|
-
* @return {Promise<TransactionReceipt>} string
|
|
261
|
-
*/
|
|
262
|
-
startOrder(dtAddress: string, address: string, consumer: string, serviceIndex: number, providerFees: ProviderFees, consumeMarketFee?: ConsumeMarketFee): Promise<TransactionReceipt>;
|
|
263
|
-
/** Estimate gas cost for reuseOrder method
|
|
264
|
-
* @param {String} dtAddress Datatoken address
|
|
265
|
-
* @param {String} address User address which calls
|
|
266
|
-
* @param {String} orderTxId previous valid order
|
|
267
|
-
* @param {providerFees} providerFees provider fees
|
|
268
|
-
* @param {Contract} contractInstance optional contract instance
|
|
269
|
-
* @return {Promise<any>}
|
|
270
|
-
*/
|
|
271
|
-
estGasReuseOrder(dtAddress: string, address: string, orderTxId: string, providerFees: ProviderFees, contractInstance?: Contract): Promise<any>;
|
|
272
|
-
/** Reuse Order: called by payer or consumer having a valid order, but with expired provider access.
|
|
273
|
-
* Pays the provider fee again, but it will not require a new datatoken payment
|
|
274
|
-
* Requires previous approval of provider fee.
|
|
275
|
-
* @param {String} dtAddress Datatoken address
|
|
276
|
-
* @param {String} address User address which calls
|
|
277
|
-
* @param {String} orderTxId previous valid order
|
|
278
|
-
* @param {providerFees} providerFees provider fees
|
|
279
|
-
* @return {Promise<TransactionReceipt>} string
|
|
280
|
-
*/
|
|
281
|
-
reuseOrder(dtAddress: string, address: string, orderTxId: string, providerFees: ProviderFees): Promise<TransactionReceipt>;
|
|
282
|
-
/** Estimate gas cost for buyFromFreAndOrder method
|
|
283
|
-
* @param {String} dtAddress Datatoken address
|
|
284
|
-
* @param {String} address User address which calls
|
|
285
|
-
* @param {OrderParams} orderParams Consumer Address
|
|
286
|
-
* @param {FreParams} freParams Amount of tokens that is going to be transfered
|
|
287
|
-
* @param {Contract} contractInstance optional contract instance
|
|
288
|
-
* @return {Promise<any>}
|
|
289
|
-
*/
|
|
290
|
-
estGasBuyFromFreAndOrder(dtAddress: string, address: string, orderParams: OrderParams, freParams: FreOrderParams, contractInstance?: Contract): Promise<any>;
|
|
291
|
-
/** Buys 1 DT from the FRE and then startsOrder, while burning that DT
|
|
292
|
-
* @param {String} dtAddress Datatoken address
|
|
293
|
-
* @param {String} address User address which calls
|
|
294
|
-
* @param {OrderParams} orderParams Consumer Address
|
|
295
|
-
* @param {FreParams} freParams Amount of tokens that is going to be transfered
|
|
296
|
-
* @return {Promise<TransactionReceipt>}
|
|
297
|
-
*/
|
|
298
|
-
buyFromFreAndOrder(dtAddress: string, address: string, orderParams: OrderParams, freParams: FreOrderParams): Promise<TransactionReceipt>;
|
|
299
|
-
/** Estimate gas cost for buyFromFreAndOrder method
|
|
300
|
-
* @param {String} dtAddress Datatoken address
|
|
301
|
-
* @param {String} address User address which calls
|
|
302
|
-
* @param {OrderParams} orderParams
|
|
303
|
-
* @param {String} dispenserContract
|
|
304
|
-
* @param {Contract} contractInstance optional contract instance
|
|
305
|
-
* @return {Promise<any>}
|
|
306
|
-
*/
|
|
307
|
-
estGasBuyFromDispenserAndOrder(dtAddress: string, address: string, orderParams: OrderParams, dispenserContract: string, contractInstance?: Contract): Promise<any>;
|
|
308
|
-
/** Gets DT from dispenser and then startsOrder, while burning that DT
|
|
309
|
-
* @param {String} dtAddress Datatoken address
|
|
310
|
-
* @param {String} address User address which calls
|
|
311
|
-
* @param {OrderParams} orderParams
|
|
312
|
-
* @param {String} dispenserContract
|
|
313
|
-
* @return {Promise<TransactionReceipt>}
|
|
314
|
-
*/
|
|
315
|
-
buyFromDispenserAndOrder(dtAddress: string, address: string, orderParams: OrderParams, dispenserContract: string): Promise<TransactionReceipt>;
|
|
316
|
-
/** Estimate gas for setData method
|
|
317
|
-
* @param {String} dtAddress Datatoken address
|
|
318
|
-
* @param {String} address User address
|
|
319
|
-
* @param {String} value Data to be stored into 725Y standard
|
|
320
|
-
* @param {Contract} contractInstance optional contract instance
|
|
321
|
-
* @return {Promise<any>}
|
|
322
|
-
*/
|
|
323
|
-
estGasSetData(dtAddress: string, address: string, value: string, contractInstance?: Contract): Promise<any>;
|
|
324
|
-
/** setData
|
|
325
|
-
* This function allows to store data with a preset key (keccak256(ERC20Address)) into NFT 725 Store
|
|
326
|
-
* only ERC20Deployer can succeed
|
|
327
|
-
* @param {String} dtAddress Datatoken address
|
|
328
|
-
* @param {String} address User address
|
|
329
|
-
* @param {String} value Data to be stored into 725Y standard
|
|
330
|
-
* @return {Promise<TransactionReceipt>} transactionId
|
|
331
|
-
*/
|
|
332
|
-
setData(dtAddress: string, address: string, value: string): Promise<TransactionReceipt>;
|
|
333
|
-
/** Estimate gas for cleanPermissions method
|
|
334
|
-
* @param dtAddress Datatoken address where we want to clean permissions
|
|
335
|
-
* @param address User adress
|
|
336
|
-
* @param {Contract} contractInstance optional contract instance
|
|
337
|
-
* @return {Promise<any>}
|
|
338
|
-
*/
|
|
339
|
-
estGasCleanPermissions(dtAddress: string, address: string, contractInstance?: Contract): Promise<any>;
|
|
340
|
-
/**
|
|
341
|
-
* Clean erc20level Permissions (minters, paymentManager and reset the paymentCollector) for an ERC20 datatoken
|
|
342
|
-
* Only NFT Owner (at 721 level) can call it.
|
|
343
|
-
* @param dtAddress Datatoken address where we want to clean permissions
|
|
344
|
-
* @param address User adress
|
|
345
|
-
* @return {Promise<TransactionReceipt>} transactionId
|
|
346
|
-
*/
|
|
347
|
-
cleanPermissions(dtAddress: string, address: string): Promise<TransactionReceipt>;
|
|
348
|
-
/** Returns ERC20 user's permissions for a datatoken
|
|
349
|
-
* @param {String} dtAddress Datatoken adress
|
|
350
|
-
* @param {String} address user adress
|
|
351
|
-
* @return {Promise<Roles>}
|
|
352
|
-
*/
|
|
353
|
-
getDTPermissions(dtAddress: string, address: string): Promise<Roles>;
|
|
354
|
-
/** Returns the Datatoken capital
|
|
355
|
-
* @param {String} dtAddress Datatoken adress
|
|
356
|
-
* @return {Promise<string>}
|
|
357
|
-
*/
|
|
358
|
-
getCap(dtAddress: string): Promise<string>;
|
|
359
|
-
/** It returns the token decimals, how many supported decimal points
|
|
360
|
-
* @param {String} dtAddress Datatoken adress
|
|
361
|
-
* @return {Promise<number>}
|
|
362
|
-
*/
|
|
363
|
-
getDecimals(dtAddress: string): Promise<string>;
|
|
364
|
-
/** It returns the token decimals, how many supported decimal points
|
|
365
|
-
* @param {String} dtAddress Datatoken adress
|
|
366
|
-
* @return {Promise<number>}
|
|
367
|
-
*/
|
|
368
|
-
getNFTAddress(dtAddress: string): Promise<string>;
|
|
369
|
-
/** Returns true if address has deployERC20 role
|
|
370
|
-
* @param {String} dtAddress Datatoken adress
|
|
371
|
-
* @param {String} dtAddress Datatoken adress
|
|
372
|
-
* @return {Promise<boolean>}
|
|
373
|
-
*/
|
|
374
|
-
isERC20Deployer(dtAddress: string, address: string): Promise<boolean>;
|
|
375
|
-
/**
|
|
376
|
-
* Get Address Balance for datatoken
|
|
377
|
-
* @param {String} dtAddress Datatoken adress
|
|
378
|
-
* @param {String} address user adress
|
|
379
|
-
* @return {Promise<String>} balance Number of datatokens. Will be converted from wei
|
|
380
|
-
*/
|
|
381
|
-
balance(datatokenAddress: string, address: string): Promise<string>;
|
|
382
|
-
/**
|
|
383
|
-
* @dev estGasSetPublishingMarketFee
|
|
384
|
-
* Estimating gas for publishMarketFeeAddress method
|
|
385
|
-
* @param {string} datatokenAddress Datatoken adress
|
|
386
|
-
* @param {string} publishMarketFeeAddress new publish Market Fee Address
|
|
387
|
-
* @param {string} publishMarketFeeToken new publish Market Fee Token
|
|
388
|
-
* @param {string} publishMarketFeeAmount new fee amount
|
|
389
|
-
* @param {String} address user adress
|
|
390
|
-
*/
|
|
391
|
-
estGasSetPublishingMarketFee(datatokenAddress: string, publishMarketFeeAddress: string, publishMarketFeeToken: string, publishMarketFeeAmount: string, address: string): Promise<number>;
|
|
392
|
-
/**
|
|
393
|
-
* @dev setPublishingMarketFee
|
|
394
|
-
* Only publishMarketFeeAddress can call it
|
|
395
|
-
* This function allows to set the fee required by the publisherMarket
|
|
396
|
-
* @param {string} datatokenAddress Datatoken adress
|
|
397
|
-
* @param {string} publishMarketFeeAddress new publish Market Fee Address
|
|
398
|
-
* @param {string} publishMarketFeeToken new publish Market Fee Token
|
|
399
|
-
* @param {string} publishMarketFeeAmount new fee amount
|
|
400
|
-
* @param {String} address user adress
|
|
401
|
-
*/
|
|
402
|
-
setPublishingMarketFee(datatokenAddress: string, publishMarketFeeAddress: string, publishMarketFeeToken: string, publishMarketFeeAmount: string, address: string): Promise<void>;
|
|
403
|
-
/**
|
|
404
|
-
* @dev getPublishingMarketFee
|
|
405
|
-
* Get publishingMarket Fee
|
|
406
|
-
* This function allows to get the current fee set by the publishing market
|
|
407
|
-
* @param {String} datatokenAddress Datatoken adress
|
|
408
|
-
* @param {String} address user adress
|
|
409
|
-
* @return {Promise<PublishingMarketFee>} Current fee set by the publishing market
|
|
410
|
-
*/
|
|
411
|
-
getPublishingMarketFee(datatokenAddress: string, address: string): Promise<PublishingMarketFee>;
|
|
412
|
-
}
|
|
413
|
-
export {};
|