@oceanprotocol/lib 3.0.3 → 3.1.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 +17 -0
- 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 +148 -148
- package/dist/src/@types/Compute.d.ts +71 -71
- package/dist/src/@types/Contracts.d.ts +26 -26
- package/dist/src/@types/DDO/ConsumerParameter.d.ts +37 -37
- package/dist/src/@types/DDO/Credentials.d.ts +8 -8
- package/dist/src/@types/DDO/DDO.d.ts +55 -55
- package/dist/src/@types/DDO/Event.d.ts +27 -27
- package/dist/src/@types/DDO/Metadata.d.ts +141 -141
- package/dist/src/@types/DDO/Service.d.ts +100 -100
- package/dist/src/@types/Datatoken.d.ts +38 -38
- package/dist/src/@types/Dispenser.d.ts +16 -16
- package/dist/src/@types/DownloadResponse.d.ts +4 -4
- package/dist/src/@types/File.d.ts +89 -89
- package/dist/src/@types/FileInfo.d.ts +43 -43
- package/dist/src/@types/FixedPrice.d.ts +51 -51
- package/dist/src/@types/NFT.d.ts +18 -18
- package/dist/src/@types/NFTFactory.d.ts +20 -20
- package/dist/src/@types/Provider.d.ts +33 -33
- package/dist/src/@types/ReturnTypes.d.ts +3 -3
- package/dist/src/@types/Router.d.ts +59 -59
- package/dist/src/@types/index.d.ts +20 -20
- package/dist/src/config/Config.d.ts +153 -153
- package/dist/src/config/ConfigHelper.d.ts +12 -12
- package/dist/src/config/index.d.ts +2 -2
- package/dist/src/contracts/Datatoken.d.ts +278 -260
- package/dist/src/contracts/Dispenser.d.ts +73 -73
- package/dist/src/contracts/FixedRateExchange.d.ts +209 -209
- package/dist/src/contracts/NFT.d.ts +220 -220
- package/dist/src/contracts/NFTFactory.d.ts +165 -165
- package/dist/src/contracts/Router.d.ts +107 -107
- package/dist/src/contracts/SmartContract.d.ts +45 -45
- package/dist/src/contracts/SmartContractWithAddress.d.ts +17 -17
- package/dist/src/contracts/df/DfRewards.d.ts +31 -31
- package/dist/src/contracts/df/DfStrategyV1.d.ts +21 -21
- package/dist/src/contracts/index.d.ts +14 -14
- package/dist/src/contracts/ve/VeAllocate.d.ts +38 -38
- package/dist/src/contracts/ve/VeFeeDistributor.d.ts +29 -29
- package/dist/src/contracts/ve/VeFeeEstimate.d.ts +14 -14
- package/dist/src/contracts/ve/VeOcean.d.ts +68 -68
- package/dist/src/index.d.ts +5 -5
- package/dist/src/services/Aquarius.d.ts +53 -53
- package/dist/src/services/Provider.d.ts +197 -197
- package/dist/src/services/index.d.ts +2 -2
- package/dist/src/utils/Constants.d.ts +4 -4
- package/dist/src/utils/ContractUtils.d.ts +46 -46
- package/dist/src/utils/DatatokenName.d.ts +14 -14
- package/dist/src/utils/DdoHelpers.d.ts +13 -13
- package/dist/src/utils/FetchHelper.d.ts +14 -14
- package/dist/src/utils/General.d.ts +5 -5
- package/dist/src/utils/Logger.d.ts +19 -19
- package/dist/src/utils/OrderUtils.d.ts +17 -0
- package/dist/src/utils/ProviderErrors.d.ts +1 -1
- package/dist/src/utils/SignatureUtils.d.ts +12 -12
- package/dist/src/utils/TokenUtils.d.ts +70 -70
- package/dist/src/utils/index.d.ts +12 -11
- package/dist/src/utils/minAbi.d.ts +38 -38
- package/dist/test/config.d.ts +19 -19
- package/dist/test/integration/CodeExamples.test.d.ts +1 -1
- package/dist/test/integration/ComputeExamples.test.d.ts +1 -1
- package/dist/test/integration/ComputeFlow.test.d.ts +1 -1
- package/dist/test/integration/Provider.test.d.ts +1 -1
- package/dist/test/integration/PublishEditConsume.test.d.ts +1 -1
- package/dist/test/integration/PublishFlows.test.d.ts +1 -1
- package/dist/test/integration/helpers.d.ts +7 -7
- package/dist/test/unit/DFRewards.test.d.ts +1 -1
- package/dist/test/unit/Datatoken.test.d.ts +1 -1
- package/dist/test/unit/Dispenser.test.d.ts +1 -1
- package/dist/test/unit/FixedRateExchange.test.d.ts +1 -1
- package/dist/test/unit/Nft.test.d.ts +1 -1
- package/dist/test/unit/NftFactory.test.d.ts +1 -1
- package/dist/test/unit/Router.test.d.ts +1 -1
- package/dist/test/unit/veOcean.test.d.ts +1 -1
- package/package.json +5 -5
|
@@ -1,220 +1,220 @@
|
|
|
1
|
-
import { BigNumber } from 'ethers';
|
|
2
|
-
import { MetadataProof, MetadataAndTokenURI, NftRoles, ReceiptOrEstimate, AbiItem } from '../@types';
|
|
3
|
-
import { SmartContract } from './SmartContract';
|
|
4
|
-
export declare class Nft extends SmartContract {
|
|
5
|
-
getDefaultAbi(): AbiItem[];
|
|
6
|
-
/**
|
|
7
|
-
* Create new ERC20 Datatoken - only user with DatatokenDeployer permission can succeed
|
|
8
|
-
* @param {String} nftAddress NFT address
|
|
9
|
-
* @param {String} address User address
|
|
10
|
-
* @param {String} minter User set as initial minter for the Datatoken
|
|
11
|
-
* @param {String} paymentCollector initial paymentCollector for this DT
|
|
12
|
-
* @param {String} mpFeeAddress Consume marketplace fee address
|
|
13
|
-
* @param {String} feeToken address of the token marketplace wants to add fee on top
|
|
14
|
-
* @param {String} feeAmount amount of feeToken to be transferred to mpFeeAddress on top, will be converted to WEI
|
|
15
|
-
* @param {String} cap Maximum cap (Number) - will be converted to wei
|
|
16
|
-
* @param {String} name Token name
|
|
17
|
-
* @param {String} symbol Token symbol
|
|
18
|
-
* @param {Number} templateIndex NFT template index
|
|
19
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
20
|
-
* @return {Promise<string>} ERC20 Datatoken address
|
|
21
|
-
*/
|
|
22
|
-
createDatatoken<G extends boolean = false>(nftAddress: string, address: string, minter: string, paymentCollector: string, mpFeeAddress: string, feeToken: string, feeAmount: string, cap: string, name?: string, symbol?: string, templateIndex?: number, estimateGas?: G): Promise<G extends false ? string : BigNumber>;
|
|
23
|
-
/**
|
|
24
|
-
* Add Manager for NFT Contract (only NFT Owner can succeed)
|
|
25
|
-
* @param {String} nftAddress NFT contract address
|
|
26
|
-
* @param {String} address NFT Owner adress
|
|
27
|
-
* @param {String} manager User adress which is going to be assing manager
|
|
28
|
-
* @param {Boolean} [estimateGas] if True, return gas estimate
|
|
29
|
-
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
30
|
-
*/
|
|
31
|
-
addManager<G extends boolean = false>(nftAddress: string, address: string, manager: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
32
|
-
/**
|
|
33
|
-
* Removes a specific manager for NFT Contract (only NFT Owner can succeed)
|
|
34
|
-
* @param {String} nftAddress NFT contract address
|
|
35
|
-
* @param {String} address NFT Owner adress
|
|
36
|
-
* @param {String} manager User adress which is going to be removed as manager
|
|
37
|
-
* @param {Boolean} [estimateGas] if True, return gas estimate
|
|
38
|
-
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
39
|
-
*/
|
|
40
|
-
removeManager<G extends boolean = false>(nftAddress: string, address: string, manager: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
41
|
-
/**
|
|
42
|
-
* Add DatatokenDeployer permission - only Manager can succeed
|
|
43
|
-
* @param {String} nftAddress NFT contract address
|
|
44
|
-
* @param {String} address NFT Manager adress
|
|
45
|
-
* @param {String} datatokenDeployer User adress which is going to have DatatokenDeployer permission
|
|
46
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
47
|
-
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
48
|
-
*/
|
|
49
|
-
addDatatokenDeployer<G extends boolean = false>(nftAddress: string, address: string, datatokenDeployer: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
50
|
-
/**
|
|
51
|
-
* Remove DatatokenDeployer permission - only Manager can succeed
|
|
52
|
-
* @param {String} nftAddress NFT contract address
|
|
53
|
-
* @param {String} address NFT Manager adress
|
|
54
|
-
* @param {String} datatokenDeployer Address of the user to be revoked DatatokenDeployer Permission
|
|
55
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
56
|
-
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
57
|
-
*/
|
|
58
|
-
removeDatatokenDeployer<G extends boolean = false>(nftAddress: string, address: string, datatokenDeployer: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
59
|
-
/**
|
|
60
|
-
* Add Metadata Updater permission - only Manager can succeed
|
|
61
|
-
* @param {String} nftAddress NFT contract address
|
|
62
|
-
* @param {String} address NFT Manager adress
|
|
63
|
-
* @param {String} metadataUpdater User adress which is going to have Metadata Updater permission
|
|
64
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
65
|
-
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
66
|
-
*/
|
|
67
|
-
addMetadataUpdater<G extends boolean = false>(nftAddress: string, address: string, metadataUpdater: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
68
|
-
/**
|
|
69
|
-
* Remove Metadata Updater permission - only Manager can succeed
|
|
70
|
-
* @param {String} nftAddress NFT contract address
|
|
71
|
-
* @param {String} address NFT Manager adress
|
|
72
|
-
* @param {String} metadataUpdater Address of the user to be revoked Metadata updater Permission
|
|
73
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
74
|
-
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
75
|
-
*/
|
|
76
|
-
removeMetadataUpdater<G extends boolean = false>(nftAddress: string, address: string, metadataUpdater: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
77
|
-
/**
|
|
78
|
-
* Add Store Updater permission - only Manager can succeed
|
|
79
|
-
* @param {String} nftAddress NFT contract address
|
|
80
|
-
* @param {String} address NFT Manager adress
|
|
81
|
-
* @param {String} storeUpdater User adress which is going to have Store Updater permission
|
|
82
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
83
|
-
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
84
|
-
*/
|
|
85
|
-
addStoreUpdater<G extends boolean = false>(nftAddress: string, address: string, storeUpdater: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
86
|
-
/**
|
|
87
|
-
* Remove Store Updater permission - only Manager can succeed
|
|
88
|
-
* @param {String} nftAddress NFT contract address
|
|
89
|
-
* @param {String} address NFT Manager adress
|
|
90
|
-
* @param {String} storeUpdater Address of the user to be revoked Store Updater Permission
|
|
91
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
92
|
-
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
93
|
-
*/
|
|
94
|
-
removeStoreUpdater<G extends boolean = false>(nftAddress: string, address: string, storeUpdater: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
95
|
-
/**
|
|
96
|
-
* This function allows to remove all ROLES at NFT level: Managers, DatatokenDeployer, MetadataUpdater, StoreUpdater
|
|
97
|
-
* Even NFT Owner has to readd himself as Manager
|
|
98
|
-
* Permissions at Datatoken level stay.
|
|
99
|
-
* Only NFT Owner can call it.
|
|
100
|
-
* @param {String} nftAddress NFT contract address
|
|
101
|
-
* @param {String} address NFT Owner adress
|
|
102
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
103
|
-
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
104
|
-
*/
|
|
105
|
-
cleanPermissions<G extends boolean = false>(nftAddress: string, address: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
106
|
-
/**
|
|
107
|
-
* Transfers the NFT
|
|
108
|
-
* will clean all permissions both on NFT and Datatoken level.
|
|
109
|
-
* @param {String} nftAddress NFT contract address
|
|
110
|
-
* @param {String} nftOwner Current NFT Owner adress
|
|
111
|
-
* @param {String} nftReceiver User which will receive the NFT, will also be set as Manager
|
|
112
|
-
* @param {Number} tokenId The id of the token to be transfered
|
|
113
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
114
|
-
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
115
|
-
*/
|
|
116
|
-
transferNft<G extends boolean = false>(nftAddress: string, nftOwner: string, nftReceiver: string, tokenId?: number, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
117
|
-
/**
|
|
118
|
-
* safeTransferNFT Used for transferring the NFT, can be used by an approved relayer
|
|
119
|
-
* will clean all permissions both on NFT and Datatoken level.
|
|
120
|
-
* @param {String} nftAddress NFT contract address
|
|
121
|
-
* @param {String} nftOwner Current NFT Owner adress
|
|
122
|
-
* @param {String} nftReceiver User which will receive the NFT, will also be set as Manager
|
|
123
|
-
* @param {Number} tokenId The id of the token to be transfered
|
|
124
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
125
|
-
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
126
|
-
*/
|
|
127
|
-
safeTransferNft<G extends boolean = false>(nftAddress: string, nftOwner: string, nftReceiver: string, tokenId?: number, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
128
|
-
/**
|
|
129
|
-
* Creates or update Metadata cached by Aquarius. Also, updates the METADATA_DECRYPTOR key
|
|
130
|
-
* @param {String} nftAddress NFT contract address
|
|
131
|
-
* @param {String} address Caller address NFT Owner adress
|
|
132
|
-
* @param {Number} metadataState
|
|
133
|
-
* @param {String} metadataDecryptorUrl
|
|
134
|
-
* @param {String} metadataDecryptorAddress
|
|
135
|
-
* @param {String} flags
|
|
136
|
-
* @param {String} data
|
|
137
|
-
* @param {String} metadataHash
|
|
138
|
-
* @param {MetadataProof[]} metadataProofs
|
|
139
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
140
|
-
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
141
|
-
*/
|
|
142
|
-
setMetadata<G extends boolean = false>(nftAddress: string, address: string, metadataState: number, metadataDecryptorUrl: string, metadataDecryptorAddress: string, flags: string, data: string, metadataHash: string, metadataProofs?: MetadataProof[], estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
143
|
-
/**
|
|
144
|
-
* Helper function to improve UX sets both MetaData & TokenURI in one tx
|
|
145
|
-
* @param {String} nftAddress NFT contract address
|
|
146
|
-
* @param {String} address Caller address
|
|
147
|
-
* @param {MetadataAndTokenURI} metadataAndTokenURI metaDataAndTokenURI object
|
|
148
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
149
|
-
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
150
|
-
*/
|
|
151
|
-
setMetadataAndTokenURI<G extends boolean = false>(nftAddress: string, metadataUpdater: string, metadataAndTokenURI: MetadataAndTokenURI, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
152
|
-
/**
|
|
153
|
-
* setMetadataState Used for updating the metadata State
|
|
154
|
-
* @param {String} nftAddress NFT contract address
|
|
155
|
-
* @param {String} address Caller address => metadata updater
|
|
156
|
-
* @param {Number} metadataState new metadata state
|
|
157
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
158
|
-
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
159
|
-
*/
|
|
160
|
-
setMetadataState<G extends boolean = false>(nftAddress: string, address: string, metadataState: number, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
161
|
-
/**
|
|
162
|
-
* set TokenURI on an nft
|
|
163
|
-
* @param {String} nftAddress NFT contract address
|
|
164
|
-
* @param {String} data input data for TokenURI
|
|
165
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
166
|
-
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
167
|
-
*/
|
|
168
|
-
setTokenURI<G extends boolean = false>(nftAddress: string, data: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
169
|
-
/**
|
|
170
|
-
* Get NFT Owner
|
|
171
|
-
* @param {String} nftAddress NFT contract address
|
|
172
|
-
* @return {Promise<string>} string
|
|
173
|
-
*/
|
|
174
|
-
getNftOwner(nftAddress: string): Promise<string>;
|
|
175
|
-
/**
|
|
176
|
-
* Gets NFT Permissions for a specified user
|
|
177
|
-
* @param {String} nftAddress NFT contract address
|
|
178
|
-
* @param {String} address user adress
|
|
179
|
-
* @return {Promise<NftRoles>}
|
|
180
|
-
*/
|
|
181
|
-
getNftPermissions(nftAddress: string, address: string): Promise<NftRoles>;
|
|
182
|
-
/**
|
|
183
|
-
* Returns Metadata details for an NFT
|
|
184
|
-
* @param {String} nftAddress NFT contract address
|
|
185
|
-
* @return {Promise<Objecta>}
|
|
186
|
-
*/
|
|
187
|
-
getMetadata(nftAddress: string): Promise<Object>;
|
|
188
|
-
/**
|
|
189
|
-
* Checks if user has DatatokenDeployer role
|
|
190
|
-
* @param {String} nftAddress NFT contract address
|
|
191
|
-
* @param {String} address user adress
|
|
192
|
-
* @return {Promise<boolean>}
|
|
193
|
-
*/
|
|
194
|
-
isDatatokenDeployer(nftAddress: string, address: string): Promise<boolean>;
|
|
195
|
-
/**
|
|
196
|
-
* Allows users to store data with a preset key (keccak256(ERC20Address)) into NFT 725 Store
|
|
197
|
-
* only ERC20Deployer can succeed
|
|
198
|
-
* @param {string} nftAddress Nft datatoken adress
|
|
199
|
-
* @param {string} address User adress
|
|
200
|
-
* @param {string} key Key of the data to be stored into 725Y standard
|
|
201
|
-
* @param {string} value Data to be stored into 725Y standard
|
|
202
|
-
* @param {boolean} estimateGas if True, return gas estimate
|
|
203
|
-
* @return {Promise<ReceiptOrEstimate>} transactionId
|
|
204
|
-
*/
|
|
205
|
-
setData<G extends boolean = false>(nftAddress: string, address: string, key: string, value: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
206
|
-
/**
|
|
207
|
-
* Gets stored data at a given `key` in an NFT
|
|
208
|
-
* @param {string} nftAddress - The address of the NFT.
|
|
209
|
-
* @param {string} key - The key of the data to get.
|
|
210
|
-
* @return {Promise<string>} The data stored at the key
|
|
211
|
-
*/
|
|
212
|
-
getData(nftAddress: string, key: string): Promise<string>;
|
|
213
|
-
/**
|
|
214
|
-
* Gets the token URI of an NFT.
|
|
215
|
-
* @param {string} nftAddress - The address of the NFT.
|
|
216
|
-
* @param {number} id - The ID of the token.
|
|
217
|
-
* @returns {Promise<string>}
|
|
218
|
-
*/
|
|
219
|
-
getTokenURI(nftAddress: string, id: number): Promise<string>;
|
|
220
|
-
}
|
|
1
|
+
import { BigNumber } from 'ethers';
|
|
2
|
+
import { MetadataProof, MetadataAndTokenURI, NftRoles, ReceiptOrEstimate, AbiItem } from '../@types';
|
|
3
|
+
import { SmartContract } from './SmartContract';
|
|
4
|
+
export declare class Nft extends SmartContract {
|
|
5
|
+
getDefaultAbi(): AbiItem[];
|
|
6
|
+
/**
|
|
7
|
+
* Create new ERC20 Datatoken - only user with DatatokenDeployer permission can succeed
|
|
8
|
+
* @param {String} nftAddress NFT address
|
|
9
|
+
* @param {String} address User address
|
|
10
|
+
* @param {String} minter User set as initial minter for the Datatoken
|
|
11
|
+
* @param {String} paymentCollector initial paymentCollector for this DT
|
|
12
|
+
* @param {String} mpFeeAddress Consume marketplace fee address
|
|
13
|
+
* @param {String} feeToken address of the token marketplace wants to add fee on top
|
|
14
|
+
* @param {String} feeAmount amount of feeToken to be transferred to mpFeeAddress on top, will be converted to WEI
|
|
15
|
+
* @param {String} cap Maximum cap (Number) - will be converted to wei
|
|
16
|
+
* @param {String} name Token name
|
|
17
|
+
* @param {String} symbol Token symbol
|
|
18
|
+
* @param {Number} templateIndex NFT template index
|
|
19
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
20
|
+
* @return {Promise<string>} ERC20 Datatoken address
|
|
21
|
+
*/
|
|
22
|
+
createDatatoken<G extends boolean = false>(nftAddress: string, address: string, minter: string, paymentCollector: string, mpFeeAddress: string, feeToken: string, feeAmount: string, cap: string, name?: string, symbol?: string, templateIndex?: number, estimateGas?: G): Promise<G extends false ? string : BigNumber>;
|
|
23
|
+
/**
|
|
24
|
+
* Add Manager for NFT Contract (only NFT Owner can succeed)
|
|
25
|
+
* @param {String} nftAddress NFT contract address
|
|
26
|
+
* @param {String} address NFT Owner adress
|
|
27
|
+
* @param {String} manager User adress which is going to be assing manager
|
|
28
|
+
* @param {Boolean} [estimateGas] if True, return gas estimate
|
|
29
|
+
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
30
|
+
*/
|
|
31
|
+
addManager<G extends boolean = false>(nftAddress: string, address: string, manager: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
32
|
+
/**
|
|
33
|
+
* Removes a specific manager for NFT Contract (only NFT Owner can succeed)
|
|
34
|
+
* @param {String} nftAddress NFT contract address
|
|
35
|
+
* @param {String} address NFT Owner adress
|
|
36
|
+
* @param {String} manager User adress which is going to be removed as manager
|
|
37
|
+
* @param {Boolean} [estimateGas] if True, return gas estimate
|
|
38
|
+
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
39
|
+
*/
|
|
40
|
+
removeManager<G extends boolean = false>(nftAddress: string, address: string, manager: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
41
|
+
/**
|
|
42
|
+
* Add DatatokenDeployer permission - only Manager can succeed
|
|
43
|
+
* @param {String} nftAddress NFT contract address
|
|
44
|
+
* @param {String} address NFT Manager adress
|
|
45
|
+
* @param {String} datatokenDeployer User adress which is going to have DatatokenDeployer permission
|
|
46
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
47
|
+
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
48
|
+
*/
|
|
49
|
+
addDatatokenDeployer<G extends boolean = false>(nftAddress: string, address: string, datatokenDeployer: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
50
|
+
/**
|
|
51
|
+
* Remove DatatokenDeployer permission - only Manager can succeed
|
|
52
|
+
* @param {String} nftAddress NFT contract address
|
|
53
|
+
* @param {String} address NFT Manager adress
|
|
54
|
+
* @param {String} datatokenDeployer Address of the user to be revoked DatatokenDeployer Permission
|
|
55
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
56
|
+
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
57
|
+
*/
|
|
58
|
+
removeDatatokenDeployer<G extends boolean = false>(nftAddress: string, address: string, datatokenDeployer: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
59
|
+
/**
|
|
60
|
+
* Add Metadata Updater permission - only Manager can succeed
|
|
61
|
+
* @param {String} nftAddress NFT contract address
|
|
62
|
+
* @param {String} address NFT Manager adress
|
|
63
|
+
* @param {String} metadataUpdater User adress which is going to have Metadata Updater permission
|
|
64
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
65
|
+
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
66
|
+
*/
|
|
67
|
+
addMetadataUpdater<G extends boolean = false>(nftAddress: string, address: string, metadataUpdater: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
68
|
+
/**
|
|
69
|
+
* Remove Metadata Updater permission - only Manager can succeed
|
|
70
|
+
* @param {String} nftAddress NFT contract address
|
|
71
|
+
* @param {String} address NFT Manager adress
|
|
72
|
+
* @param {String} metadataUpdater Address of the user to be revoked Metadata updater Permission
|
|
73
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
74
|
+
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
75
|
+
*/
|
|
76
|
+
removeMetadataUpdater<G extends boolean = false>(nftAddress: string, address: string, metadataUpdater: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
77
|
+
/**
|
|
78
|
+
* Add Store Updater permission - only Manager can succeed
|
|
79
|
+
* @param {String} nftAddress NFT contract address
|
|
80
|
+
* @param {String} address NFT Manager adress
|
|
81
|
+
* @param {String} storeUpdater User adress which is going to have Store Updater permission
|
|
82
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
83
|
+
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
84
|
+
*/
|
|
85
|
+
addStoreUpdater<G extends boolean = false>(nftAddress: string, address: string, storeUpdater: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
86
|
+
/**
|
|
87
|
+
* Remove Store Updater permission - only Manager can succeed
|
|
88
|
+
* @param {String} nftAddress NFT contract address
|
|
89
|
+
* @param {String} address NFT Manager adress
|
|
90
|
+
* @param {String} storeUpdater Address of the user to be revoked Store Updater Permission
|
|
91
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
92
|
+
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
93
|
+
*/
|
|
94
|
+
removeStoreUpdater<G extends boolean = false>(nftAddress: string, address: string, storeUpdater: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
95
|
+
/**
|
|
96
|
+
* This function allows to remove all ROLES at NFT level: Managers, DatatokenDeployer, MetadataUpdater, StoreUpdater
|
|
97
|
+
* Even NFT Owner has to readd himself as Manager
|
|
98
|
+
* Permissions at Datatoken level stay.
|
|
99
|
+
* Only NFT Owner can call it.
|
|
100
|
+
* @param {String} nftAddress NFT contract address
|
|
101
|
+
* @param {String} address NFT Owner adress
|
|
102
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
103
|
+
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
104
|
+
*/
|
|
105
|
+
cleanPermissions<G extends boolean = false>(nftAddress: string, address: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
106
|
+
/**
|
|
107
|
+
* Transfers the NFT
|
|
108
|
+
* will clean all permissions both on NFT and Datatoken level.
|
|
109
|
+
* @param {String} nftAddress NFT contract address
|
|
110
|
+
* @param {String} nftOwner Current NFT Owner adress
|
|
111
|
+
* @param {String} nftReceiver User which will receive the NFT, will also be set as Manager
|
|
112
|
+
* @param {Number} tokenId The id of the token to be transfered
|
|
113
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
114
|
+
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
115
|
+
*/
|
|
116
|
+
transferNft<G extends boolean = false>(nftAddress: string, nftOwner: string, nftReceiver: string, tokenId?: number, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
117
|
+
/**
|
|
118
|
+
* safeTransferNFT Used for transferring the NFT, can be used by an approved relayer
|
|
119
|
+
* will clean all permissions both on NFT and Datatoken level.
|
|
120
|
+
* @param {String} nftAddress NFT contract address
|
|
121
|
+
* @param {String} nftOwner Current NFT Owner adress
|
|
122
|
+
* @param {String} nftReceiver User which will receive the NFT, will also be set as Manager
|
|
123
|
+
* @param {Number} tokenId The id of the token to be transfered
|
|
124
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
125
|
+
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
126
|
+
*/
|
|
127
|
+
safeTransferNft<G extends boolean = false>(nftAddress: string, nftOwner: string, nftReceiver: string, tokenId?: number, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
128
|
+
/**
|
|
129
|
+
* Creates or update Metadata cached by Aquarius. Also, updates the METADATA_DECRYPTOR key
|
|
130
|
+
* @param {String} nftAddress NFT contract address
|
|
131
|
+
* @param {String} address Caller address NFT Owner adress
|
|
132
|
+
* @param {Number} metadataState
|
|
133
|
+
* @param {String} metadataDecryptorUrl
|
|
134
|
+
* @param {String} metadataDecryptorAddress
|
|
135
|
+
* @param {String} flags
|
|
136
|
+
* @param {String} data
|
|
137
|
+
* @param {String} metadataHash
|
|
138
|
+
* @param {MetadataProof[]} metadataProofs
|
|
139
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
140
|
+
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
141
|
+
*/
|
|
142
|
+
setMetadata<G extends boolean = false>(nftAddress: string, address: string, metadataState: number, metadataDecryptorUrl: string, metadataDecryptorAddress: string, flags: string, data: string, metadataHash: string, metadataProofs?: MetadataProof[], estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
143
|
+
/**
|
|
144
|
+
* Helper function to improve UX sets both MetaData & TokenURI in one tx
|
|
145
|
+
* @param {String} nftAddress NFT contract address
|
|
146
|
+
* @param {String} address Caller address
|
|
147
|
+
* @param {MetadataAndTokenURI} metadataAndTokenURI metaDataAndTokenURI object
|
|
148
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
149
|
+
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
150
|
+
*/
|
|
151
|
+
setMetadataAndTokenURI<G extends boolean = false>(nftAddress: string, metadataUpdater: string, metadataAndTokenURI: MetadataAndTokenURI, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
152
|
+
/**
|
|
153
|
+
* setMetadataState Used for updating the metadata State
|
|
154
|
+
* @param {String} nftAddress NFT contract address
|
|
155
|
+
* @param {String} address Caller address => metadata updater
|
|
156
|
+
* @param {Number} metadataState new metadata state
|
|
157
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
158
|
+
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
159
|
+
*/
|
|
160
|
+
setMetadataState<G extends boolean = false>(nftAddress: string, address: string, metadataState: number, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
161
|
+
/**
|
|
162
|
+
* set TokenURI on an nft
|
|
163
|
+
* @param {String} nftAddress NFT contract address
|
|
164
|
+
* @param {String} data input data for TokenURI
|
|
165
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
166
|
+
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
167
|
+
*/
|
|
168
|
+
setTokenURI<G extends boolean = false>(nftAddress: string, data: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
169
|
+
/**
|
|
170
|
+
* Get NFT Owner
|
|
171
|
+
* @param {String} nftAddress NFT contract address
|
|
172
|
+
* @return {Promise<string>} string
|
|
173
|
+
*/
|
|
174
|
+
getNftOwner(nftAddress: string): Promise<string>;
|
|
175
|
+
/**
|
|
176
|
+
* Gets NFT Permissions for a specified user
|
|
177
|
+
* @param {String} nftAddress NFT contract address
|
|
178
|
+
* @param {String} address user adress
|
|
179
|
+
* @return {Promise<NftRoles>}
|
|
180
|
+
*/
|
|
181
|
+
getNftPermissions(nftAddress: string, address: string): Promise<NftRoles>;
|
|
182
|
+
/**
|
|
183
|
+
* Returns Metadata details for an NFT
|
|
184
|
+
* @param {String} nftAddress NFT contract address
|
|
185
|
+
* @return {Promise<Objecta>}
|
|
186
|
+
*/
|
|
187
|
+
getMetadata(nftAddress: string): Promise<Object>;
|
|
188
|
+
/**
|
|
189
|
+
* Checks if user has DatatokenDeployer role
|
|
190
|
+
* @param {String} nftAddress NFT contract address
|
|
191
|
+
* @param {String} address user adress
|
|
192
|
+
* @return {Promise<boolean>}
|
|
193
|
+
*/
|
|
194
|
+
isDatatokenDeployer(nftAddress: string, address: string): Promise<boolean>;
|
|
195
|
+
/**
|
|
196
|
+
* Allows users to store data with a preset key (keccak256(ERC20Address)) into NFT 725 Store
|
|
197
|
+
* only ERC20Deployer can succeed
|
|
198
|
+
* @param {string} nftAddress Nft datatoken adress
|
|
199
|
+
* @param {string} address User adress
|
|
200
|
+
* @param {string} key Key of the data to be stored into 725Y standard
|
|
201
|
+
* @param {string} value Data to be stored into 725Y standard
|
|
202
|
+
* @param {boolean} estimateGas if True, return gas estimate
|
|
203
|
+
* @return {Promise<ReceiptOrEstimate>} transactionId
|
|
204
|
+
*/
|
|
205
|
+
setData<G extends boolean = false>(nftAddress: string, address: string, key: string, value: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
206
|
+
/**
|
|
207
|
+
* Gets stored data at a given `key` in an NFT
|
|
208
|
+
* @param {string} nftAddress - The address of the NFT.
|
|
209
|
+
* @param {string} key - The key of the data to get.
|
|
210
|
+
* @return {Promise<string>} The data stored at the key
|
|
211
|
+
*/
|
|
212
|
+
getData(nftAddress: string, key: string): Promise<string>;
|
|
213
|
+
/**
|
|
214
|
+
* Gets the token URI of an NFT.
|
|
215
|
+
* @param {string} nftAddress - The address of the NFT.
|
|
216
|
+
* @param {number} id - The ID of the token.
|
|
217
|
+
* @returns {Promise<string>}
|
|
218
|
+
*/
|
|
219
|
+
getTokenURI(nftAddress: string, id: number): Promise<string>;
|
|
220
|
+
}
|