@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
package/dist/src/tokens/NFT.d.ts
DELETED
|
@@ -1,364 +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 { MetadataProof } from '../../src/@types';
|
|
6
|
-
import { Config } from '../models/index.js';
|
|
7
|
-
import { MetadataAndTokenURI } from '../@types';
|
|
8
|
-
/**
|
|
9
|
-
* ERC721 ROLES
|
|
10
|
-
*/
|
|
11
|
-
interface Roles {
|
|
12
|
-
manager: boolean;
|
|
13
|
-
deployERC20: boolean;
|
|
14
|
-
updateMetadata: boolean;
|
|
15
|
-
store: boolean;
|
|
16
|
-
}
|
|
17
|
-
export declare class Nft {
|
|
18
|
-
factory721Address: string;
|
|
19
|
-
factory721Abi: AbiItem | AbiItem[];
|
|
20
|
-
nftAbi: AbiItem | AbiItem[];
|
|
21
|
-
web3: Web3;
|
|
22
|
-
startBlock: number;
|
|
23
|
-
config: Config;
|
|
24
|
-
constructor(web3: Web3, network?: string | number, nftAbi?: AbiItem | AbiItem[], config?: Config);
|
|
25
|
-
/**
|
|
26
|
-
* Estimate gas cost for createERC20 token creation
|
|
27
|
-
* @param {String} nftAddress ERC721 addreess
|
|
28
|
-
* @param {String} address User address
|
|
29
|
-
* @param {String} minter User set as initial minter for the ERC20
|
|
30
|
-
* @param {String} paymentCollector initial paymentCollector for this DT
|
|
31
|
-
* @param {String} mpFeeAddress Consume marketplace fee address
|
|
32
|
-
* @param {String} feeToken address of the token marketplace wants to add fee on top
|
|
33
|
-
* @param {String} feeAmount amount of feeToken to be transferred to mpFeeAddress on top, will be converted to WEI
|
|
34
|
-
* @param {String} cap Maximum cap (Number) - will be converted to wei
|
|
35
|
-
* @param {String} name Token name
|
|
36
|
-
* @param {String} symbol Token symbol
|
|
37
|
-
* @param {Number} templateIndex NFT template index
|
|
38
|
-
* @param {Contract} nftContract optional contract instance
|
|
39
|
-
* @return {Promise<any>}
|
|
40
|
-
*/
|
|
41
|
-
estGasCreateErc20(nftAddress: string, address: string, minter: string, paymentCollector: string, mpFeeAddress: string, feeToken: string, feeAmount: string, cap: string, name?: string, symbol?: string, templateIndex?: number, contractInstance?: Contract): Promise<any>;
|
|
42
|
-
/**
|
|
43
|
-
* Create new ERC20 datatoken - only user with ERC20Deployer permission can succeed
|
|
44
|
-
* @param {String} nftAddress ERC721 addreess
|
|
45
|
-
* @param {String} address User address
|
|
46
|
-
* @param {String} minter User set as initial minter for the ERC20
|
|
47
|
-
* @param {String} paymentCollector initial paymentCollector for this DT
|
|
48
|
-
* @param {String} mpFeeAddress Consume marketplace fee address
|
|
49
|
-
* @param {String} feeToken address of the token marketplace wants to add fee on top
|
|
50
|
-
* @param {String} feeAmount amount of feeToken to be transferred to mpFeeAddress on top, will be converted to WEI
|
|
51
|
-
* @param {String} cap Maximum cap (Number) - will be converted to wei
|
|
52
|
-
* @param {String} name Token name
|
|
53
|
-
* @param {String} symbol Token symbol
|
|
54
|
-
* @param {Number} templateIndex NFT template index
|
|
55
|
-
* @return {Promise<string>} ERC20 datatoken address
|
|
56
|
-
*/
|
|
57
|
-
createErc20(nftAddress: string, address: string, minter: string, paymentCollector: string, mpFeeAddress: string, feeToken: string, feeAmount: string, cap: string, name?: string, symbol?: string, templateIndex?: number): Promise<string>;
|
|
58
|
-
/**
|
|
59
|
-
* Estimate gas cost for add manager call
|
|
60
|
-
* @param {String} nftAddress erc721 contract adress
|
|
61
|
-
* @param {String} address NFT Owner adress
|
|
62
|
-
* @param {String} manager User adress which is going to be assing manager
|
|
63
|
-
* @param {Contract} nftContract optional contract instance
|
|
64
|
-
* @return {Promise<any>}
|
|
65
|
-
*/
|
|
66
|
-
estGasAddManager(nftAddress: string, address: string, manager: string, contractInstance?: Contract): Promise<any>;
|
|
67
|
-
/**
|
|
68
|
-
* Add Manager for NFT Contract (only NFT Owner can succeed)
|
|
69
|
-
* @param {String} nftAddress erc721 contract adress
|
|
70
|
-
* @param {String} address NFT Owner adress
|
|
71
|
-
* @param {String} manager User adress which is going to be assing manager
|
|
72
|
-
* @return {Promise<TransactionReceipt>} trxReceipt
|
|
73
|
-
*/
|
|
74
|
-
addManager(nftAddress: string, address: string, manager: string): Promise<any>;
|
|
75
|
-
/**
|
|
76
|
-
* Estimate gas cost for removeManager method
|
|
77
|
-
* @param {String} nftAddress erc721 contract adress
|
|
78
|
-
* @param {String} address NFT Owner adress
|
|
79
|
-
* @param {String} manager User adress which is going to be removed as manager
|
|
80
|
-
* @param {Contract} nftContract optional contract instance
|
|
81
|
-
* @return {Promise<any>}
|
|
82
|
-
*/
|
|
83
|
-
estGasRemoveManager(nftAddress: string, address: string, manager: string, contractInstance?: Contract): Promise<any>;
|
|
84
|
-
/**
|
|
85
|
-
* Removes a specific manager for NFT Contract (only NFT Owner can succeed)
|
|
86
|
-
* @param {String} nftAddress erc721 contract adress
|
|
87
|
-
* @param {String} address NFT Owner adress
|
|
88
|
-
* @param {String} manager User adress which is going to be removed as manager
|
|
89
|
-
* @return {Promise<TransactionReceipt>} trxReceipt
|
|
90
|
-
*/
|
|
91
|
-
removeManager(nftAddress: string, address: string, manager: string): Promise<any>;
|
|
92
|
-
/**
|
|
93
|
-
* Estimate gas cost for addToCreateERC20List method
|
|
94
|
-
* @param {String} nftAddress erc721 contract adress
|
|
95
|
-
* @param {String} address NFT Manager adress
|
|
96
|
-
* @param {String} erc20Deployer User adress which is going to have erc20Deployer permission
|
|
97
|
-
* @param {Contract} nftContract optional contract instance
|
|
98
|
-
* @return {Promise<any>}
|
|
99
|
-
*/
|
|
100
|
-
estGasAddErc20Deployer(nftAddress: string, address: string, erc20Deployer: string, contractInstance?: Contract): Promise<any>;
|
|
101
|
-
/**
|
|
102
|
-
* Add ERC20Deployer permission - only Manager can succeed
|
|
103
|
-
* @param {String} nftAddress erc721 contract adress
|
|
104
|
-
* @param {String} address NFT Manager adress
|
|
105
|
-
* @param {String} erc20Deployer User adress which is going to have erc20Deployer permission
|
|
106
|
-
* @return {Promise<TransactionReceipt>} trxReceipt
|
|
107
|
-
*/
|
|
108
|
-
addErc20Deployer(nftAddress: string, address: string, erc20Deployer: string): Promise<TransactionReceipt>;
|
|
109
|
-
/**
|
|
110
|
-
* Estimate gas cost for removeFromCreateERC20List method
|
|
111
|
-
* @param {String} nftAddress erc721 contract adress
|
|
112
|
-
* @param {String} address NFT Manager adress
|
|
113
|
-
* @param {String} erc20Deployer Address of the user to be revoked ERC20Deployer Permission
|
|
114
|
-
* @param {Contract} nftContract optional contract instance
|
|
115
|
-
* @return {Promise<any>}
|
|
116
|
-
*/
|
|
117
|
-
estGasRemoveErc20Deployer(nftAddress: string, address: string, erc20Deployer: string, contractInstance?: Contract): Promise<any>;
|
|
118
|
-
/**
|
|
119
|
-
* Remove ERC20Deployer permission - only Manager can succeed
|
|
120
|
-
* @param {String} nftAddress erc721 contract adress
|
|
121
|
-
* @param {String} address NFT Manager adress
|
|
122
|
-
* @param {String} erc20Deployer Address of the user to be revoked ERC20Deployer Permission
|
|
123
|
-
* @return {Promise<TransactionReceipt>} trxReceipt
|
|
124
|
-
*/
|
|
125
|
-
removeErc20Deployer(nftAddress: string, address: string, erc20Deployer: string): Promise<TransactionReceipt>;
|
|
126
|
-
/**
|
|
127
|
-
* Estimate gas cost for addToMetadataList method
|
|
128
|
-
* @param {String} nftAddress erc721 contract adress
|
|
129
|
-
* @param {String} address NFT Manager adress
|
|
130
|
-
* @param {String} metadataUpdater User adress which is going to have Metadata Updater permission
|
|
131
|
-
* @param {Contract} nftContract optional contract instance
|
|
132
|
-
* @return {Promise<any>}
|
|
133
|
-
*/
|
|
134
|
-
estGasAddMetadataUpdater(nftAddress: string, address: string, metadataUpdater: string, contractInstance?: Contract): Promise<any>;
|
|
135
|
-
/**
|
|
136
|
-
* Add Metadata Updater permission - only Manager can succeed
|
|
137
|
-
* @param {String} nftAddress erc721 contract adress
|
|
138
|
-
* @param {String} address NFT Manager adress
|
|
139
|
-
* @param {String} metadataUpdater User adress which is going to have Metadata Updater permission
|
|
140
|
-
* @return {Promise<TransactionReceipt>} trxReceipt
|
|
141
|
-
*/
|
|
142
|
-
addMetadataUpdater(nftAddress: string, address: string, metadataUpdater: string): Promise<TransactionReceipt>;
|
|
143
|
-
/**
|
|
144
|
-
* Estimate gas cost for removeFromMetadataList method
|
|
145
|
-
* @param {String} nftAddress erc721 contract adress
|
|
146
|
-
* @param {String} address NFT Manager adress
|
|
147
|
-
* @param {String} metadataUpdater Address of the user to be revoked Metadata updater Permission
|
|
148
|
-
* @param {Contract} nftContract optional contract instance
|
|
149
|
-
* @return {Promise<any>}
|
|
150
|
-
*/
|
|
151
|
-
esGasRemoveMetadataUpdater(nftAddress: string, address: string, metadataUpdater: string, contractInstance?: Contract): Promise<any>;
|
|
152
|
-
/**
|
|
153
|
-
* Remove Metadata Updater permission - only Manager can succeed
|
|
154
|
-
* @param {String} nftAddress erc721 contract adress
|
|
155
|
-
* @param {String} address NFT Manager adress
|
|
156
|
-
* @param {String} metadataUpdater Address of the user to be revoked Metadata updater Permission
|
|
157
|
-
* @return {Promise<TransactionReceipt>} trxReceipt
|
|
158
|
-
*/
|
|
159
|
-
removeMetadataUpdater(nftAddress: string, address: string, metadataUpdater: string): Promise<TransactionReceipt>;
|
|
160
|
-
/**
|
|
161
|
-
* Estimate gas cost for addTo725StoreList method
|
|
162
|
-
* @param {String} nftAddress erc721 contract adress
|
|
163
|
-
* @param {String} address NFT Manager adress
|
|
164
|
-
* @param {String} storeUpdater User adress which is going to have Store Updater permission
|
|
165
|
-
* @param {Contract} nftContract optional contract instance
|
|
166
|
-
* @return {Promise<any>}
|
|
167
|
-
*/
|
|
168
|
-
estGasAddStoreUpdater(nftAddress: string, address: string, storeUpdater: string, contractInstance?: Contract): Promise<any>;
|
|
169
|
-
/**
|
|
170
|
-
* Add Store Updater permission - only Manager can succeed
|
|
171
|
-
* @param {String} nftAddress erc721 contract adress
|
|
172
|
-
* @param {String} address NFT Manager adress
|
|
173
|
-
* @param {String} storeUpdater User adress which is going to have Store Updater permission
|
|
174
|
-
* @return {Promise<TransactionReceipt>} trxReceipt
|
|
175
|
-
*/
|
|
176
|
-
addStoreUpdater(nftAddress: string, address: string, storeUpdater: string): Promise<TransactionReceipt>;
|
|
177
|
-
/**
|
|
178
|
-
* Estimate gas cost for removeFrom725StoreList method
|
|
179
|
-
* @param {String} nftAddress erc721 contract adress
|
|
180
|
-
* @param {String} address NFT Manager adress
|
|
181
|
-
* @param {String} storeUpdater Address of the user to be revoked Store Updater Permission
|
|
182
|
-
* @param {Contract} nftContract optional contract instance
|
|
183
|
-
* @return {Promise<any>}
|
|
184
|
-
*/
|
|
185
|
-
estGasRemoveStoreUpdater(nftAddress: string, address: string, storeUpdater: string, contractInstance?: Contract): Promise<any>;
|
|
186
|
-
/**
|
|
187
|
-
* Remove Store Updater permission - only Manager can succeed
|
|
188
|
-
* @param {String} nftAddress erc721 contract adress
|
|
189
|
-
* @param {String} address NFT Manager adress
|
|
190
|
-
* @param {String} storeUpdater Address of the user to be revoked Store Updater Permission
|
|
191
|
-
* @return {Promise<TransactionReceipt>} trxReceipt
|
|
192
|
-
*/
|
|
193
|
-
removeStoreUpdater(nftAddress: string, address: string, storeUpdater: string): Promise<TransactionReceipt>;
|
|
194
|
-
/**
|
|
195
|
-
* Estimate gas cost for cleanPermissions method
|
|
196
|
-
* @param {String} nftAddress erc721 contract adress
|
|
197
|
-
* @param {String} address NFT Owner adress
|
|
198
|
-
* @param {Contract} nftContract optional contract instance
|
|
199
|
-
* @return {Promise<any>}
|
|
200
|
-
*/
|
|
201
|
-
estGasCleanPermissions(nftAddress: string, address: string, contractInstance?: Contract): Promise<any>;
|
|
202
|
-
/**
|
|
203
|
-
* This function allows to remove all ROLES at erc721 level: Managers, ERC20Deployer, MetadataUpdater, StoreUpdater
|
|
204
|
-
* Even NFT Owner has to readd himself as Manager
|
|
205
|
-
* Permissions at erc20 level stay.
|
|
206
|
-
* Only NFT Owner can call it.
|
|
207
|
-
* @param {String} nftAddress erc721 contract adress
|
|
208
|
-
* @param {String} address NFT Owner adress
|
|
209
|
-
* @return {Promise<TransactionReceipt>} trxReceipt
|
|
210
|
-
*/
|
|
211
|
-
cleanPermissions(nftAddress: string, address: string): Promise<TransactionReceipt>;
|
|
212
|
-
/**
|
|
213
|
-
* Estimate gas cost for transfer NFT method
|
|
214
|
-
* @param {String} nftAddress erc721 contract adress
|
|
215
|
-
* @param {String} nftOwner Current NFT Owner adress
|
|
216
|
-
* @param {String} nftReceiver User which will receive the NFT, will also be set as Manager
|
|
217
|
-
* @param {Number} tokenId The id of the token to be transfered
|
|
218
|
-
* @param {Contract} nftContract optional contract instance
|
|
219
|
-
* @return {Promise<any>}
|
|
220
|
-
*/
|
|
221
|
-
estGasTransferNft(nftAddress: string, nftOwner: string, nftReceiver: string, tokenId: number, contractInstance?: Contract): Promise<any>;
|
|
222
|
-
/**
|
|
223
|
-
* Transfers the NFT
|
|
224
|
-
* will clean all permissions both on erc721 and erc20 level.
|
|
225
|
-
* @param {String} nftAddress erc721 contract adress
|
|
226
|
-
* @param {String} nftOwner Current NFT Owner adress
|
|
227
|
-
* @param {String} nftReceiver User which will receive the NFT, will also be set as Manager
|
|
228
|
-
* @param {Number} tokenId The id of the token to be transfered
|
|
229
|
-
* @return {Promise<TransactionReceipt>} trxReceipt
|
|
230
|
-
*/
|
|
231
|
-
transferNft(nftAddress: string, nftOwner: string, nftReceiver: string, tokenId?: number): Promise<TransactionReceipt>;
|
|
232
|
-
/**
|
|
233
|
-
* Estimate gas cost for safeTransfer NFT method
|
|
234
|
-
* @param {String} nftAddress erc721 contract adress
|
|
235
|
-
* @param {String} nftOwner Current NFT Owner adress
|
|
236
|
-
* @param {String} nftReceiver User which will receive the NFT, will also be set as Manager
|
|
237
|
-
* @param {Number} tokenId The id of the token to be transfered
|
|
238
|
-
* @param {Contract} nftContract optional contract instance
|
|
239
|
-
* @return {Promise<any>}
|
|
240
|
-
*/
|
|
241
|
-
estGasSafeTransferNft(nftAddress: string, nftOwner: string, nftReceiver: string, tokenId: number, contractInstance?: Contract): Promise<any>;
|
|
242
|
-
/**
|
|
243
|
-
* safeTransferNFT Used for transferring the NFT, can be used by an approved relayer
|
|
244
|
-
* will clean all permissions both on erc721 and erc20 level.
|
|
245
|
-
* @param {String} nftAddress erc721 contract adress
|
|
246
|
-
* @param {String} nftOwner Current NFT Owner adress
|
|
247
|
-
* @param {String} nftReceiver User which will receive the NFT, will also be set as Manager
|
|
248
|
-
* @param {Number} tokenId The id of the token to be transfered
|
|
249
|
-
* @return {Promise<TransactionReceipt>} trxReceipt
|
|
250
|
-
*/
|
|
251
|
-
safeTransferNft(nftAddress: string, nftOwner: string, nftReceiver: string, tokenId?: number): Promise<TransactionReceipt>;
|
|
252
|
-
/**
|
|
253
|
-
* Estimate gas cost for setMetadata method
|
|
254
|
-
* @param {String} nftAddress erc721 contract adress
|
|
255
|
-
* @param {String} metadataUpdater metadataUpdater address
|
|
256
|
-
* @param {Number} metadataState User which will receive the NFT, will also be set as Manager
|
|
257
|
-
* @param {String} metadataDecryptorUrl
|
|
258
|
-
* @param {Number} tokenId The id of the token to be transfered
|
|
259
|
-
* @param {Contract} nftContract optional contract instance
|
|
260
|
-
* @return {Promise<any>}
|
|
261
|
-
*/
|
|
262
|
-
estGasSetMetadata(nftAddress: string, metadataUpdater: string, metadataState: number, metadataDecryptorUrl: string, metadataDecryptorAddress: string, flags: string, data: string, metadataHash: string, metadataProofs?: MetadataProof[], contractInstance?: Contract): Promise<any>;
|
|
263
|
-
/**
|
|
264
|
-
* safeTransferNFT Used for transferring the NFT, can be used by an approved relayer
|
|
265
|
-
* will clean all permissions both on erc721 and erc20 level.
|
|
266
|
-
* @param {String} nftAddress erc721 contract adress
|
|
267
|
-
* @param {String} address Caller address NFT Owner adress
|
|
268
|
-
* @return {Promise<TransactionReceipt>} trxReceipt
|
|
269
|
-
*/
|
|
270
|
-
setMetadata(nftAddress: string, address: string, metadataState: number, metadataDecryptorUrl: string, metadataDecryptorAddress: string, flags: string, data: string, metadataHash: string, metadataProofs?: MetadataProof[]): Promise<TransactionReceipt>;
|
|
271
|
-
/**
|
|
272
|
-
* Estimate gas cost for setMetadata method
|
|
273
|
-
* @param {String} nftAddress erc721 contract adress
|
|
274
|
-
* @param {String} metadataUpdater metadataUpdater address
|
|
275
|
-
* @param {MetaDataAndTokenURI} metadataAndTokenURI metaDataAndTokenURI object
|
|
276
|
-
* @param {Contract} nftContract optional contract instance
|
|
277
|
-
* @return {Promise<any>}
|
|
278
|
-
*/
|
|
279
|
-
estGasSetMetadataAndTokenURI(nftAddress: string, metadataUpdater: string, metadataAndTokenURI: MetadataAndTokenURI, contractInstance?: Contract): Promise<any>;
|
|
280
|
-
/**
|
|
281
|
-
* Helper function to improve UX sets both MetaData & TokenURI in one tx
|
|
282
|
-
* @param {String} nftAddress erc721 contract adress
|
|
283
|
-
* @param {String} address Caller address
|
|
284
|
-
* @param {MetadataAndTokenURI} metadataAndTokenURI metaDataAndTokenURI object
|
|
285
|
-
* @return {Promise<TransactionReceipt>} trxReceipt
|
|
286
|
-
*/
|
|
287
|
-
setMetadataAndTokenURI(nftAddress: string, metadataUpdater: string, metadataAndTokenURI: MetadataAndTokenURI): Promise<TransactionReceipt>;
|
|
288
|
-
/**
|
|
289
|
-
* Estimate gas cost for setMetadataState method
|
|
290
|
-
* @param {String} nftAddress erc721 contract adress
|
|
291
|
-
* @param {String} nftOwner Current NFT Owner adress
|
|
292
|
-
* @param {Number} metadataState new metadata state
|
|
293
|
-
* @param {Contract} nftContract optional contract instance
|
|
294
|
-
* @return {Promise<any>}
|
|
295
|
-
*/
|
|
296
|
-
estGasSetMetadataState(nftAddress: string, metadataUpdater: string, metadataState: number, contractInstance?: Contract): Promise<any>;
|
|
297
|
-
/**
|
|
298
|
-
* setMetadataState Used for updating the metadata State
|
|
299
|
-
* @param {String} nftAddress erc721 contract adress
|
|
300
|
-
* @param {String} address Caller address => metadata updater
|
|
301
|
-
* @param {Number} metadataState new metadata state
|
|
302
|
-
* @return {Promise<TransactionReceipt>} trxReceipt
|
|
303
|
-
*/
|
|
304
|
-
setMetadataState(nftAddress: string, address: string, metadataState: number): Promise<TransactionReceipt>;
|
|
305
|
-
/** Estimate gas cost for setTokenURI method
|
|
306
|
-
* @param nftAddress erc721 contract adress
|
|
307
|
-
* @param address user adress
|
|
308
|
-
* @param data input data for TokenURI
|
|
309
|
-
* @return {Promise<TransactionReceipt>} transaction receipt
|
|
310
|
-
*/
|
|
311
|
-
estSetTokenURI(nftAddress: string, address: string, data: string): Promise<any>;
|
|
312
|
-
/** set TokenURI on an nft
|
|
313
|
-
* @param nftAddress erc721 contract adress
|
|
314
|
-
* @param address user adress
|
|
315
|
-
* @param data input data for TokenURI
|
|
316
|
-
* @return {Promise<TransactionReceipt>} transaction receipt
|
|
317
|
-
*/
|
|
318
|
-
setTokenURI(nftAddress: string, address: string, data: string): Promise<any>;
|
|
319
|
-
/** setData
|
|
320
|
-
* This function allows to store data with a preset key (keccak256(ERC20Address)) into NFT 725 Store
|
|
321
|
-
* only ERC20Deployer can succeed
|
|
322
|
-
* @param nftAddress erc721 contract adress
|
|
323
|
-
* @param address user adress
|
|
324
|
-
* @param key Key of the data to be stored into 725Y standard
|
|
325
|
-
* @param value Data to be stored into 725Y standard
|
|
326
|
-
* @return {Promise<TransactionReceipt>} transactionId
|
|
327
|
-
*/
|
|
328
|
-
setData(nftAddress: string, address: string, key: string, value: string): Promise<TransactionReceipt>;
|
|
329
|
-
/** Get Owner
|
|
330
|
-
* @param {String} nftAddress erc721 contract adress
|
|
331
|
-
* @return {Promise<string>} string
|
|
332
|
-
*/
|
|
333
|
-
getNftOwner(nftAddress: string): Promise<string>;
|
|
334
|
-
/** Get users NFT Permissions
|
|
335
|
-
* @param {String} nftAddress erc721 contract adress
|
|
336
|
-
* @param {String} address user adress
|
|
337
|
-
* @return {Promise<Roles>}
|
|
338
|
-
*/
|
|
339
|
-
getNftPermissions(nftAddress: string, address: string): Promise<Roles>;
|
|
340
|
-
/** Get users Metadata, return Metadata details
|
|
341
|
-
* @param {String} nftAddress erc721 contract adress
|
|
342
|
-
* @return {Promise<Objecta>}
|
|
343
|
-
*/
|
|
344
|
-
getMetadata(nftAddress: string): Promise<Object>;
|
|
345
|
-
/** Get users ERC20Deployer role
|
|
346
|
-
* @param {String} nftAddress erc721 contract adress
|
|
347
|
-
* @param {String} address user adress
|
|
348
|
-
* @return {Promise<Roles>}
|
|
349
|
-
*/
|
|
350
|
-
isErc20Deployer(nftAddress: string, address: string): Promise<boolean>;
|
|
351
|
-
/** Gets data at a given `key`
|
|
352
|
-
* @param {String} nftAddress erc721 contract adress
|
|
353
|
-
* @param {String} key the key which value to retrieve
|
|
354
|
-
* @return {Promise<string>} The data stored at the key
|
|
355
|
-
*/
|
|
356
|
-
getData(nftAddress: string, key: string): Promise<string>;
|
|
357
|
-
/** Gets data at a given `key`
|
|
358
|
-
* @param {String} nftAddress erc721 contract adress
|
|
359
|
-
* @param {String} id
|
|
360
|
-
* @return {Promise<string>} The data stored at the key
|
|
361
|
-
*/
|
|
362
|
-
getTokenURI(nftAddress: string, id: number): Promise<string>;
|
|
363
|
-
}
|
|
364
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import Decimal from 'decimal.js';
|
|
2
|
-
import { Pool } from '..';
|
|
3
|
-
export declare function calcMaxExactOut(balance: string): Decimal;
|
|
4
|
-
export declare function calcMaxExactIn(balance: string): Decimal;
|
|
5
|
-
export declare function getMaxSwapExactOut(poolInstance: Pool, poolAddress: string, tokenAddress: string): Promise<Decimal>;
|
|
6
|
-
export declare function getMaxSwapExactIn(poolInstance: Pool, poolAddress: string, tokenAddress: string): Promise<Decimal>;
|
|
7
|
-
export declare function getMaxAddLiquidity(poolInstance: Pool, poolAddress: string, tokenAddress: string): Promise<Decimal>;
|
|
8
|
-
export declare function getMaxRemoveLiquidity(poolInstance: Pool, poolAddress: string, tokenAddress: string): Promise<Decimal>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|