@oceanprotocol/lib 8.1.0 → 8.3.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/dist/lib.cjs +4 -4
- package/dist/lib.module.mjs +4 -4
- package/dist/lib.umd.js +4 -4
- package/dist/types/@types/Assets.d.ts +1 -0
- package/dist/types/@types/NFT.d.ts +1 -1
- package/dist/types/@types/index.d.ts +1 -0
- package/dist/types/contracts/AccessList.d.ts +6 -1
- package/dist/types/contracts/AccessListFactory.d.ts +4 -1
- package/dist/types/contracts/Datatoken.d.ts +18 -1
- package/dist/types/contracts/Datatoken4.d.ts +4 -1
- package/dist/types/contracts/Dispenser.d.ts +7 -0
- package/dist/types/contracts/Escrow.d.ts +7 -1
- package/dist/types/contracts/FixedRateExchange.d.ts +15 -0
- package/dist/types/contracts/NFT.d.ts +21 -2
- package/dist/types/contracts/NFTFactory.d.ts +12 -0
- package/dist/types/contracts/Router.d.ts +9 -0
- package/dist/types/services/Aquarius.d.ts +1 -1
- package/dist/types/services/providers/BaseProvider.d.ts +1 -1
- package/dist/types/services/providers/P2pProvider.d.ts +1 -1
- package/dist/types/utils/Assets.d.ts +1 -1
- package/dist/types/utils/ContractUtils.d.ts +7 -3
- package/dist/types/utils/OrderUtils.d.ts +1 -1
- package/package.json +6 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { DDO } from '@oceanprotocol/ddo-js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Signer } from 'ethers';
|
|
1
|
+
import { Signer, TransactionRequest } from 'ethers';
|
|
2
2
|
import { AbiItem, ReceiptOrEstimate } from '../@types/index.js';
|
|
3
3
|
import { Config } from '../config/index.js';
|
|
4
4
|
import { SmartContractWithAddress } from './SmartContractWithAddress.js';
|
|
@@ -54,6 +54,7 @@ export declare class AccessListContract extends SmartContractWithAddress {
|
|
|
54
54
|
* @return {Promise<ReceiptOrEstimate>} returns the transaction receipt or the estimateGas value
|
|
55
55
|
*/
|
|
56
56
|
mint<G extends boolean = false>(user: string, tokenUri: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
57
|
+
mintTx(user: string, tokenUri: string): Promise<TransactionRequest>;
|
|
57
58
|
/**
|
|
58
59
|
* Batch add addresses to the access list
|
|
59
60
|
* @param {String} users Minter addresses
|
|
@@ -62,6 +63,7 @@ export declare class AccessListContract extends SmartContractWithAddress {
|
|
|
62
63
|
* @return {Promise<ReceiptOrEstimate>} returns the transaction receipt or the estimateGas value
|
|
63
64
|
*/
|
|
64
65
|
batchMint<G extends boolean = false>(users: Array<string>, tokenUris: Array<string>, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
66
|
+
batchMintTx(users: Array<string>, tokenUris: Array<string>): Promise<TransactionRequest>;
|
|
65
67
|
/**
|
|
66
68
|
* Delete address from access list
|
|
67
69
|
* @param {Number} tokenId token ID
|
|
@@ -69,6 +71,7 @@ export declare class AccessListContract extends SmartContractWithAddress {
|
|
|
69
71
|
* @return {Promise<ReceiptOrEstimate>} returns the transaction receipt or the estimateGas value
|
|
70
72
|
*/
|
|
71
73
|
burn<G extends boolean = false>(tokenId: number, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
74
|
+
burnTx(tokenId: number): Promise<TransactionRequest>;
|
|
72
75
|
/**
|
|
73
76
|
* Transfer Ownership of an access list, called by owner of access list
|
|
74
77
|
* @param {Number} newOwner new owner of the access list
|
|
@@ -76,10 +79,12 @@ export declare class AccessListContract extends SmartContractWithAddress {
|
|
|
76
79
|
* @return {Promise<ReceiptOrEstimate>} returns the transaction receipt or the estimateGas value
|
|
77
80
|
*/
|
|
78
81
|
transferOwnership<G extends boolean = false>(newOwner: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
82
|
+
transferOwnershipTx(newOwner: string): Promise<TransactionRequest>;
|
|
79
83
|
/**
|
|
80
84
|
* Renounce Ownership of an access list, called by owner of access list
|
|
81
85
|
* @param {Boolean} estimateGas if True, return gas estimate
|
|
82
86
|
* @return {Promise<ReceiptOrEstimate>} returns the transaction receipt or the estimateGas value
|
|
83
87
|
*/
|
|
84
88
|
renounceOwnership<G extends boolean = false>(estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
89
|
+
renounceOwnershipTx(): Promise<TransactionRequest>;
|
|
85
90
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BigNumberish, Signer } from 'ethers';
|
|
1
|
+
import { BigNumberish, Signer, TransactionRequest } from 'ethers';
|
|
2
2
|
import { Config } from '../config/index.js';
|
|
3
3
|
import { AbiItem, ReceiptOrEstimate } from '../@types/index.js';
|
|
4
4
|
import { SmartContractWithAddress } from './SmartContractWithAddress.js';
|
|
@@ -28,6 +28,7 @@ export declare class AccesslistFactory extends SmartContractWithAddress {
|
|
|
28
28
|
* @return {Promise<string|BigNumber>} Deployed contract address
|
|
29
29
|
*/
|
|
30
30
|
deployAccessListContract<G extends boolean = false>(nameAccessList: string, symbolAccessList: string, tokenURI: string[], transferable: boolean, owner: string, user: string[], estimateGas?: G): Promise<G extends false ? string : BigNumberish>;
|
|
31
|
+
deployAccessListContractTx(nameAccessList: string, symbolAccessList: string, tokenURI: string[], transferable: boolean, owner: string, user: string[]): Promise<TransactionRequest>;
|
|
31
32
|
/**
|
|
32
33
|
* Get Factory Owner
|
|
33
34
|
* @return {Promise<string>} Factory Owner address
|
|
@@ -53,4 +54,6 @@ export declare class AccesslistFactory extends SmartContractWithAddress {
|
|
|
53
54
|
* @return {Promise<ReceiptOrEstimate>} returns the transaction receipt or the estimateGas value, current token template count
|
|
54
55
|
*/
|
|
55
56
|
changeTemplateAddress<G extends boolean = false>(owner: string, templateAddress: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
57
|
+
changeTemplateAddressTx(owner: string, templateAddress: string): Promise<TransactionRequest>;
|
|
58
|
+
private normalizeDeployAccessListInput;
|
|
56
59
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Signer } from 'ethers';
|
|
1
|
+
import { TransactionRequest, Signer } from 'ethers';
|
|
2
2
|
import { AbiItem, ConsumeMarketFee, FreOrderParams, FreCreationParams, ProviderFees, PublishingMarketFee, DispenserParams, OrderParams, DatatokenRoles, ReceiptOrEstimate } from '../@types/index.js';
|
|
3
3
|
import { Nft } from './NFT.js';
|
|
4
4
|
import { Config } from '../config/index.js';
|
|
@@ -25,6 +25,7 @@ export declare class Datatoken extends SmartContract {
|
|
|
25
25
|
* @return {Promise<ReceiptOrEstimate>}
|
|
26
26
|
*/
|
|
27
27
|
approve<G extends boolean = false>(dtAddress: string, spender: string, amount: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
28
|
+
approveTx(dtAddress: string, spender: string, amount: string): Promise<TransactionRequest>;
|
|
28
29
|
/**
|
|
29
30
|
* Creates a new FixedRateExchange setup.
|
|
30
31
|
* @param {String} dtAddress Datatoken address
|
|
@@ -34,6 +35,7 @@ export declare class Datatoken extends SmartContract {
|
|
|
34
35
|
* @return {Promise<ReceiptOrEstimate>}
|
|
35
36
|
*/
|
|
36
37
|
createFixedRate<G extends boolean = false>(dtAddress: string, address: string, fixedRateParams: FreCreationParams, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
38
|
+
createFixedRateTx(dtAddress: string, address: string, fixedRateParams: FreCreationParams): Promise<TransactionRequest>;
|
|
37
39
|
/**
|
|
38
40
|
* Creates a new Dispenser
|
|
39
41
|
* @param {String} dtAddress Datatoken address
|
|
@@ -44,6 +46,7 @@ export declare class Datatoken extends SmartContract {
|
|
|
44
46
|
* @return {Promise<ReceiptOrEstimate>} transactionId
|
|
45
47
|
*/
|
|
46
48
|
createDispenser<G extends boolean = false>(dtAddress: string, address: string, dispenserAddress: string, dispenserParams: DispenserParams, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
49
|
+
createDispenserTx(dtAddress: string, address: string, dispenserAddress: string, dispenserParams: DispenserParams): Promise<TransactionRequest>;
|
|
47
50
|
/**
|
|
48
51
|
* Mints datatokens
|
|
49
52
|
* @param {String} dtAddress Datatoken address
|
|
@@ -54,6 +57,7 @@ export declare class Datatoken extends SmartContract {
|
|
|
54
57
|
* @return {Promise<ReceiptOrEstimate>} transactionId
|
|
55
58
|
*/
|
|
56
59
|
mint<G extends boolean = false>(dtAddress: string, address: string, amount: string, toAddress?: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
60
|
+
mintTx(dtAddress: string, address: string, amount: string, toAddress?: string): Promise<TransactionRequest>;
|
|
57
61
|
/**
|
|
58
62
|
* Add Minter for an ERC20 Datatoken
|
|
59
63
|
* only DatatokenDeployer can succeed
|
|
@@ -64,6 +68,7 @@ export declare class Datatoken extends SmartContract {
|
|
|
64
68
|
* @return {Promise<ReceiptOrEstimate>} transactionId
|
|
65
69
|
*/
|
|
66
70
|
addMinter<G extends boolean = false>(dtAddress: string, address: string, minter: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
71
|
+
addMinterTx(dtAddress: string, address: string, minter: string): Promise<TransactionRequest>;
|
|
67
72
|
/**
|
|
68
73
|
* Revoke Minter permission for an ERC20 Datatoken
|
|
69
74
|
* only DatatokenDeployer can succeed
|
|
@@ -74,6 +79,7 @@ export declare class Datatoken extends SmartContract {
|
|
|
74
79
|
* @return {Promise<ReceiptOrEstimate>}
|
|
75
80
|
*/
|
|
76
81
|
removeMinter<G extends boolean = false>(dtAddress: string, address: string, minter: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
82
|
+
removeMinterTx(dtAddress: string, address: string, minter: string): Promise<TransactionRequest>;
|
|
77
83
|
/**
|
|
78
84
|
* Adds a payment manager on a datatoken to a desired address.(can set who's going to collect fee when consuming orders)
|
|
79
85
|
* only DatatokenDeployer can succeed
|
|
@@ -84,6 +90,7 @@ export declare class Datatoken extends SmartContract {
|
|
|
84
90
|
* @return {Promise<ReceiptOrEstimate>} transactionId
|
|
85
91
|
*/
|
|
86
92
|
addPaymentManager<G extends boolean = false>(dtAddress: string, address: string, paymentManager: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
93
|
+
addPaymentManagerTx(dtAddress: string, address: string, paymentManager: string): Promise<TransactionRequest>;
|
|
87
94
|
/**
|
|
88
95
|
* Revoke paymentManager permission for an ERC20 Datatoken
|
|
89
96
|
* only DatatokenDeployer can succeed
|
|
@@ -94,6 +101,7 @@ export declare class Datatoken extends SmartContract {
|
|
|
94
101
|
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
95
102
|
*/
|
|
96
103
|
removePaymentManager<G extends boolean = false>(dtAddress: string, address: string, paymentManager: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
104
|
+
removePaymentManagerTx(dtAddress: string, address: string, paymentManager: string): Promise<TransactionRequest>;
|
|
97
105
|
/**
|
|
98
106
|
* This function allows to set a new PaymentCollector (receives DT when consuming)
|
|
99
107
|
* If not set the paymentCollector is the NFT Owner
|
|
@@ -105,6 +113,7 @@ export declare class Datatoken extends SmartContract {
|
|
|
105
113
|
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
106
114
|
*/
|
|
107
115
|
setPaymentCollector<G extends boolean = false>(dtAddress: string, address: string, paymentCollector: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
116
|
+
setPaymentCollectorTx(dtAddress: string, address: string, paymentCollector: string): Promise<TransactionRequest>;
|
|
108
117
|
/**
|
|
109
118
|
* getPaymentCollector - It returns the current paymentCollector
|
|
110
119
|
* @param dtAddress datatoken address
|
|
@@ -129,6 +138,7 @@ export declare class Datatoken extends SmartContract {
|
|
|
129
138
|
* @return {Promise<ReceiptOrEstimate>} transactionId
|
|
130
139
|
*/
|
|
131
140
|
transferWei<G extends boolean = false>(dtAddress: string, toAddress: string, amount: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
141
|
+
transferWeiTx(dtAddress: string, toAddress: string, amount: string): Promise<TransactionRequest>;
|
|
132
142
|
/**
|
|
133
143
|
* Start Order: called by payer or consumer prior ordering a service consume on a marketplace.
|
|
134
144
|
* @param {String} dtAddress Datatoken address
|
|
@@ -140,6 +150,7 @@ export declare class Datatoken extends SmartContract {
|
|
|
140
150
|
* @return {Promise<ReceiptOrEstimate>} string
|
|
141
151
|
*/
|
|
142
152
|
startOrder<G extends boolean = false>(dtAddress: string, consumer: string, serviceIndex: number, providerFees: ProviderFees, consumeMarketFee?: ConsumeMarketFee, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
153
|
+
startOrderTx(dtAddress: string, consumer: string, serviceIndex: number, providerFees: ProviderFees, consumeMarketFee?: ConsumeMarketFee): Promise<TransactionRequest>;
|
|
143
154
|
/**
|
|
144
155
|
* Reuse Order: called by payer or consumer having a valid order, but with expired provider access.
|
|
145
156
|
* Pays the provider fee again, but it will not require a new datatoken payment
|
|
@@ -151,6 +162,7 @@ export declare class Datatoken extends SmartContract {
|
|
|
151
162
|
* @return {Promise<ReceiptOrEstimate>} string
|
|
152
163
|
*/
|
|
153
164
|
reuseOrder<G extends boolean = false>(dtAddress: string, orderTxId: string, providerFees: ProviderFees, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
165
|
+
reuseOrderTx(dtAddress: string, orderTxId: string, providerFees: ProviderFees): Promise<TransactionRequest>;
|
|
154
166
|
/**
|
|
155
167
|
* Buys 1 DT from the FRE and then startsOrder, while burning that DT
|
|
156
168
|
* @param {String} dtAddress Datatoken address
|
|
@@ -160,6 +172,7 @@ export declare class Datatoken extends SmartContract {
|
|
|
160
172
|
* @return {Promise<ReceiptOrEstimate>}
|
|
161
173
|
*/
|
|
162
174
|
buyFromFreAndOrder<G extends boolean = false>(dtAddress: string, orderParams: OrderParams, freParams: FreOrderParams, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
175
|
+
buyFromFreAndOrderTx(dtAddress: string, orderParams: OrderParams, freParams: FreOrderParams): Promise<TransactionRequest>;
|
|
163
176
|
/**
|
|
164
177
|
* Gets 1 DT from dispenser and then startsOrder, while burning that DT
|
|
165
178
|
* @param {String} dtAddress Datatoken address
|
|
@@ -169,6 +182,7 @@ export declare class Datatoken extends SmartContract {
|
|
|
169
182
|
* @return {Promise<ReceiptOrEstimate>}
|
|
170
183
|
*/
|
|
171
184
|
buyFromDispenserAndOrder<G extends boolean = false>(dtAddress: string, orderParams: OrderParams, dispenserContract: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
185
|
+
buyFromDispenserAndOrderTx(dtAddress: string, orderParams: OrderParams, dispenserContract: string): Promise<TransactionRequest>;
|
|
172
186
|
/** setData
|
|
173
187
|
* This function allows to store data with a preset key (keccak256(dtAddress)) into NFT 725 Store
|
|
174
188
|
* only DatatokenDeployer can succeed
|
|
@@ -179,6 +193,7 @@ export declare class Datatoken extends SmartContract {
|
|
|
179
193
|
* @return {Promise<ReceiptOrEstimate>} transactionId
|
|
180
194
|
*/
|
|
181
195
|
setData<G extends boolean = false>(dtAddress: string, address: string, value: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
196
|
+
setDataTx(dtAddress: string, address: string, value: string): Promise<TransactionRequest>;
|
|
182
197
|
/**
|
|
183
198
|
* Clean Datatoken level Permissions (minters, paymentManager and reset the paymentCollector) for an ERC20 Datatoken
|
|
184
199
|
* Only NFT Owner (at 721 level) can call it.
|
|
@@ -188,6 +203,7 @@ export declare class Datatoken extends SmartContract {
|
|
|
188
203
|
* @return {Promise<ReceiptOrEstimate>} transactionId
|
|
189
204
|
*/
|
|
190
205
|
cleanPermissions<G extends boolean = false>(dtAddress: string, address: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
206
|
+
cleanPermissionsTx(dtAddress: string, address: string): Promise<TransactionRequest>;
|
|
191
207
|
/**
|
|
192
208
|
* Returns ERC20 Datatoken user's permissions for a datatoken
|
|
193
209
|
* @param {String} dtAddress Datatoken adress
|
|
@@ -277,6 +293,7 @@ export declare class Datatoken extends SmartContract {
|
|
|
277
293
|
* @param {Boolean} estimateGas if True, return gas estimate
|
|
278
294
|
*/
|
|
279
295
|
setPublishingMarketFee<G extends boolean = false>(datatokenAddress: string, publishMarketFeeAddress: string, publishMarketFeeToken: string, publishMarketFeeAmount: string, address: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
296
|
+
setPublishingMarketFeeTx(datatokenAddress: string, publishMarketFeeAddress: string, publishMarketFeeToken: string, publishMarketFeeAmount: string, address: string): Promise<TransactionRequest>;
|
|
280
297
|
/**
|
|
281
298
|
* Returns the current fee set by the publishing market
|
|
282
299
|
* @param {String} datatokenAddress Datatoken adress
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Datatoken } from './Datatoken.js';
|
|
2
|
-
import { Signer } from 'ethers';
|
|
2
|
+
import { Signer, TransactionRequest } from 'ethers';
|
|
3
3
|
import { AbiItem, ReceiptOrEstimate } from '../@types/index.js';
|
|
4
4
|
import { AccessListContract } from './AccessList.js';
|
|
5
5
|
import { Config } from '../config/index.js';
|
|
@@ -38,6 +38,7 @@ export declare class Datatoken4 extends Datatoken {
|
|
|
38
38
|
* @return {Promise<ReceiptOrEstimate>} returns the transaction receipt or the estimateGas value
|
|
39
39
|
*/
|
|
40
40
|
setAllowListContract<G extends boolean = false>(dtAddress: string, address: string, consumer: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
41
|
+
setAllowListContractTx(dtAddress: string, address: string, consumer: string): Promise<TransactionRequest>;
|
|
41
42
|
/** setDenyListContract
|
|
42
43
|
* This function allows to set another address for allowListContract, only by datatoken deployer
|
|
43
44
|
* only DatatokenDeployer can succeed
|
|
@@ -48,6 +49,7 @@ export declare class Datatoken4 extends Datatoken {
|
|
|
48
49
|
* @return {Promise<ReceiptOrEstimate>} returns the transaction receipt or the estimateGas value
|
|
49
50
|
*/
|
|
50
51
|
setDenyListContract<G extends boolean = false>(dtAddress: string, address: string, consumer: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
52
|
+
setDenyListContractTx(dtAddress: string, address: string, consumer: string): Promise<TransactionRequest>;
|
|
51
53
|
/** setFileObject
|
|
52
54
|
* This function allows to set file object in ecnrypted format, only by datatoken deployer
|
|
53
55
|
* only DatatokenDeployer can succeed
|
|
@@ -57,6 +59,7 @@ export declare class Datatoken4 extends Datatoken {
|
|
|
57
59
|
* @return {Promise<ReceiptOrEstimate>} returns the transaction receipt or the estimateGas value
|
|
58
60
|
*/
|
|
59
61
|
setFileObject<G extends boolean = false>(dtAddress: string, address: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
62
|
+
setFileObjectTx(dtAddress: string, address: string): Promise<TransactionRequest>;
|
|
60
63
|
/**
|
|
61
64
|
* getFileObject - It returns the consumer's file object encrypted format.
|
|
62
65
|
* @param {String} dtAddress datatoken address
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TransactionRequest } from 'ethers';
|
|
1
2
|
import { Datatoken } from './Datatoken.js';
|
|
2
3
|
import { SmartContractWithAddress } from './SmartContractWithAddress.js';
|
|
3
4
|
import { DispenserToken, ReceiptOrEstimate, AbiItem } from '../@types/index.js';
|
|
@@ -20,6 +21,7 @@ export declare class Dispenser extends SmartContractWithAddress {
|
|
|
20
21
|
* @return {Promise<ReceiptOrEstimate>} transactionId
|
|
21
22
|
*/
|
|
22
23
|
create<G extends boolean = false>(dtAddress: string, address: string, maxTokens: string, maxBalance: string, allowedSwapper: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
24
|
+
createTx(dtAddress: string, address: string, maxTokens: string, maxBalance: string, allowedSwapper: string): Promise<TransactionRequest>;
|
|
23
25
|
/**
|
|
24
26
|
* Activates a dispener.
|
|
25
27
|
* @param {String} dtAddress refers to datatoken address.
|
|
@@ -29,6 +31,7 @@ export declare class Dispenser extends SmartContractWithAddress {
|
|
|
29
31
|
* @return {Promise<ReceiptOrEstimate>} TransactionReceipt
|
|
30
32
|
*/
|
|
31
33
|
activate<G extends boolean = false>(dtAddress: string, maxTokens: string, maxBalance: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
34
|
+
activateTx(dtAddress: string, maxTokens: string, maxBalance: string): Promise<TransactionRequest>;
|
|
32
35
|
/**
|
|
33
36
|
* Deactivate an existing dispenser.
|
|
34
37
|
* @param {String} dtAddress refers to datatoken address.
|
|
@@ -36,6 +39,7 @@ export declare class Dispenser extends SmartContractWithAddress {
|
|
|
36
39
|
* @return {Promise<ReceiptOrEstimate>} TransactionReceipt
|
|
37
40
|
*/
|
|
38
41
|
deactivate<G extends boolean = false>(dtAddress: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
42
|
+
deactivateTx(dtAddress: string): Promise<TransactionRequest>;
|
|
39
43
|
/**
|
|
40
44
|
* Sets a new allowed swapper.
|
|
41
45
|
* @param {String} dtAddress Datatoken address.
|
|
@@ -44,6 +48,7 @@ export declare class Dispenser extends SmartContractWithAddress {
|
|
|
44
48
|
* @return {Promise<ReceiptOrEstimate>}
|
|
45
49
|
*/
|
|
46
50
|
setAllowedSwapper<G extends boolean = false>(dtAddress: string, newAllowedSwapper: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
51
|
+
setAllowedSwapperTx(dtAddress: string, newAllowedSwapper: string): Promise<TransactionRequest>;
|
|
47
52
|
/**
|
|
48
53
|
* Dispense datatokens to caller.
|
|
49
54
|
* The dispenser must be active, hold enough datatokens (or be able to mint more)
|
|
@@ -55,6 +60,7 @@ export declare class Dispenser extends SmartContractWithAddress {
|
|
|
55
60
|
* @return {Promise<ReceiptOrEstimate>}
|
|
56
61
|
*/
|
|
57
62
|
dispense<G extends boolean = false>(dtAddress: string, amount: string, destination: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
63
|
+
dispenseTx(dtAddress: string, amount: string, destination: string): Promise<TransactionRequest>;
|
|
58
64
|
/**
|
|
59
65
|
* Withdraw all tokens from the dispenser
|
|
60
66
|
* @param {String} dtAddress Datatoken address.
|
|
@@ -62,6 +68,7 @@ export declare class Dispenser extends SmartContractWithAddress {
|
|
|
62
68
|
* @return {Promise<ReceiptOrEstimate>}
|
|
63
69
|
*/
|
|
64
70
|
ownerWithdraw<G extends boolean = false>(dtAddress: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
71
|
+
ownerWithdrawTx(dtAddress: string): Promise<TransactionRequest>;
|
|
65
72
|
/**
|
|
66
73
|
* Check if tokens can be dispensed
|
|
67
74
|
* @param {String} dtAddress Datatoken address
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Signer } from 'ethers';
|
|
1
|
+
import { Signer, TransactionRequest } from 'ethers';
|
|
2
2
|
import { AbiItem, ReceiptOrEstimate, ValidationResponse } from '../@types';
|
|
3
3
|
import { Config } from '../config';
|
|
4
4
|
import { SmartContractWithAddress } from './SmartContractWithAddress';
|
|
@@ -67,6 +67,7 @@ export declare class EscrowContract extends SmartContractWithAddress {
|
|
|
67
67
|
* @return {Promise<ReceiptOrEstimate>} returns the transaction receipt or the estimateGas value
|
|
68
68
|
*/
|
|
69
69
|
deposit<G extends boolean = false>(token: string, amount: string, tokenDecimals?: number, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
70
|
+
depositTx(token: string, amount: string, tokenDecimals?: number): Promise<TransactionRequest>;
|
|
70
71
|
/**
|
|
71
72
|
* Withdraw funds
|
|
72
73
|
* @param {String[]} tokens Array of token addresses
|
|
@@ -76,6 +77,8 @@ export declare class EscrowContract extends SmartContractWithAddress {
|
|
|
76
77
|
* @return {Promise<ReceiptOrEstimate>} returns the transaction receipt or the estimateGas value
|
|
77
78
|
*/
|
|
78
79
|
withdraw<G extends boolean = false>(tokens: string[], amounts: string[], tokenDecimals?: number, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
80
|
+
withdrawTx(tokens: string[], amounts: string[], tokenDecimals?: number): Promise<TransactionRequest>;
|
|
81
|
+
private prepareWithdrawInputs;
|
|
79
82
|
/**
|
|
80
83
|
* Authorize locks
|
|
81
84
|
* @param {String} token Token address
|
|
@@ -88,6 +91,8 @@ export declare class EscrowContract extends SmartContractWithAddress {
|
|
|
88
91
|
* @return {Promise<ReceiptOrEstimate>} returns the transaction receipt or the estimateGas value
|
|
89
92
|
*/
|
|
90
93
|
authorize<G extends boolean = false>(token: string, payee: string, maxLockedAmount: string, maxLockSeconds: string, maxLockCounts: string, tokenDecimals?: number, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
94
|
+
authorizeTx(token: string, payee: string, maxLockedAmount: string, maxLockSeconds: string, maxLockCounts: string, tokenDecimals?: number): Promise<TransactionRequest | null>;
|
|
95
|
+
private prepareAuthorizeInputs;
|
|
91
96
|
/**
|
|
92
97
|
* Cancel expired locks
|
|
93
98
|
* @param {String[]} jobIds Job IDs with hash
|
|
@@ -98,4 +103,5 @@ export declare class EscrowContract extends SmartContractWithAddress {
|
|
|
98
103
|
* @return {Promise<ReceiptOrEstimate>} returns the transaction receipt or the estimateGas value
|
|
99
104
|
*/
|
|
100
105
|
cancelExpiredLocks<G extends boolean = false>(jobIds: string[], tokens: string[], payers: string[], payees: string[], estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
106
|
+
cancelExpiredLocksTx(jobIds: string[], tokens: string[], payers: string[], payees: string[]): Promise<TransactionRequest>;
|
|
101
107
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TransactionRequest } from 'ethers';
|
|
1
2
|
import { PriceAndFees, FeesInfo, FixedPriceExchange, ReceiptOrEstimate, AbiItem } from '../@types/index.js';
|
|
2
3
|
import { SmartContractWithAddress } from './SmartContractWithAddress.js';
|
|
3
4
|
export declare class FixedRateExchange extends SmartContractWithAddress {
|
|
@@ -20,6 +21,7 @@ export declare class FixedRateExchange extends SmartContractWithAddress {
|
|
|
20
21
|
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
21
22
|
*/
|
|
22
23
|
buyDatatokens<G extends boolean = false>(exchangeId: string, datatokenAmount: string, maxBaseTokenAmount: string, consumeMarketAddress?: string, consumeMarketFee?: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
24
|
+
buyDatatokensTx(exchangeId: string, datatokenAmount: string, maxBaseTokenAmount: string, consumeMarketAddress?: string, consumeMarketFee?: string): Promise<TransactionRequest>;
|
|
23
25
|
/**
|
|
24
26
|
* Sell datatokenAmount while expecting at least minBaseTokenAmount
|
|
25
27
|
* @param {String} exchangeId ExchangeId
|
|
@@ -31,6 +33,7 @@ export declare class FixedRateExchange extends SmartContractWithAddress {
|
|
|
31
33
|
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
32
34
|
*/
|
|
33
35
|
sellDatatokens<G extends boolean = false>(exchangeId: string, datatokenAmount: string, minBaseTokenAmount: string, consumeMarketAddress?: string, consumeMarketFee?: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
36
|
+
sellDatatokensTx(exchangeId: string, datatokenAmount: string, minBaseTokenAmount: string, consumeMarketAddress?: string, consumeMarketFee?: string): Promise<TransactionRequest>;
|
|
34
37
|
/**
|
|
35
38
|
* Gets total number of exchanges
|
|
36
39
|
* @return {Promise<Number>} no of available exchanges
|
|
@@ -44,6 +47,7 @@ export declare class FixedRateExchange extends SmartContractWithAddress {
|
|
|
44
47
|
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
45
48
|
*/
|
|
46
49
|
setRate<G extends boolean = false>(exchangeId: string, newRate: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
50
|
+
setRateTx(exchangeId: string, newRate: string): Promise<TransactionRequest>;
|
|
47
51
|
/**
|
|
48
52
|
* Sets a new allowedSwapper
|
|
49
53
|
* @param {String} exchangeId Exchange ID
|
|
@@ -52,6 +56,7 @@ export declare class FixedRateExchange extends SmartContractWithAddress {
|
|
|
52
56
|
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
53
57
|
*/
|
|
54
58
|
setAllowedSwapper<G extends boolean = false>(exchangeId: string, newAllowedSwapper: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
59
|
+
setAllowedSwapperTx(exchangeId: string, newAllowedSwapper: string): Promise<TransactionRequest>;
|
|
55
60
|
/**
|
|
56
61
|
* Activate an exchange
|
|
57
62
|
* @param {String} exchangeId ExchangeId
|
|
@@ -59,6 +64,7 @@ export declare class FixedRateExchange extends SmartContractWithAddress {
|
|
|
59
64
|
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
60
65
|
*/
|
|
61
66
|
activate<G extends boolean = false>(exchangeId: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
67
|
+
activateTx(exchangeId: string): Promise<TransactionRequest>;
|
|
62
68
|
/**
|
|
63
69
|
* Deactivate an exchange
|
|
64
70
|
* @param {String} exchangeId ExchangeId
|
|
@@ -66,6 +72,7 @@ export declare class FixedRateExchange extends SmartContractWithAddress {
|
|
|
66
72
|
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
67
73
|
*/
|
|
68
74
|
deactivate<G extends boolean = false>(exchangeId: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
75
|
+
deactivateTx(exchangeId: string): Promise<TransactionRequest>;
|
|
69
76
|
/**
|
|
70
77
|
* Get Exchange Rate
|
|
71
78
|
* @param {String} exchangeId Exchange ID
|
|
@@ -136,6 +143,7 @@ export declare class FixedRateExchange extends SmartContractWithAddress {
|
|
|
136
143
|
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
137
144
|
*/
|
|
138
145
|
activateMint<G extends boolean = false>(exchangeId: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
146
|
+
activateMintTx(exchangeId: string): Promise<TransactionRequest>;
|
|
139
147
|
/**
|
|
140
148
|
* Deactivate minting for fixed rate
|
|
141
149
|
* @param {String} exchangeId ExchangeId
|
|
@@ -143,6 +151,7 @@ export declare class FixedRateExchange extends SmartContractWithAddress {
|
|
|
143
151
|
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
144
152
|
*/
|
|
145
153
|
deactivateMint<G extends boolean = false>(exchangeId: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
154
|
+
deactivateMintTx(exchangeId: string): Promise<TransactionRequest>;
|
|
146
155
|
/**
|
|
147
156
|
* Collect BaseTokens in the contract (anyone can call this, funds are sent to Datatoken.paymentCollector)
|
|
148
157
|
* @param {String} exchangeId Exchange Id
|
|
@@ -151,6 +160,7 @@ export declare class FixedRateExchange extends SmartContractWithAddress {
|
|
|
151
160
|
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
152
161
|
*/
|
|
153
162
|
collectBasetokens<G extends boolean = false>(exchangeId: string, amount: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
163
|
+
collectBasetokensTx(exchangeId: string, amount: string): Promise<TransactionRequest>;
|
|
154
164
|
/**
|
|
155
165
|
* Collect datatokens in the contract (anyone can call this, funds are sent to Datatoken.paymentCollector)
|
|
156
166
|
* @param {String} exchangeId Exchange Id
|
|
@@ -159,6 +169,7 @@ export declare class FixedRateExchange extends SmartContractWithAddress {
|
|
|
159
169
|
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
160
170
|
*/
|
|
161
171
|
collectDatatokens<G extends boolean = false>(exchangeId: string, amount: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
172
|
+
collectDatatokensTx(exchangeId: string, amount: string): Promise<TransactionRequest>;
|
|
162
173
|
/**
|
|
163
174
|
* Collect market fee and send it to marketFeeCollector (anyone can call it)
|
|
164
175
|
* @param {String} exchangeId Exchange Id
|
|
@@ -166,6 +177,7 @@ export declare class FixedRateExchange extends SmartContractWithAddress {
|
|
|
166
177
|
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
167
178
|
*/
|
|
168
179
|
collectMarketFee<G extends boolean = false>(exchangeId: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
180
|
+
collectMarketFeeTx(exchangeId: string): Promise<TransactionRequest>;
|
|
169
181
|
/**
|
|
170
182
|
* Collect ocean fee and send it to OPF collector (anyone can call it)
|
|
171
183
|
* @param {String} exchangeId Exchange Id
|
|
@@ -173,6 +185,7 @@ export declare class FixedRateExchange extends SmartContractWithAddress {
|
|
|
173
185
|
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
174
186
|
*/
|
|
175
187
|
collectOceanFee<G extends boolean = false>(exchangeId: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
188
|
+
collectOceanFeeTx(exchangeId: string): Promise<TransactionRequest>;
|
|
176
189
|
/**
|
|
177
190
|
* Get OPF Collector of fixed rate contract
|
|
178
191
|
* @return {String}
|
|
@@ -197,6 +210,7 @@ export declare class FixedRateExchange extends SmartContractWithAddress {
|
|
|
197
210
|
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
198
211
|
*/
|
|
199
212
|
updateMarketFee<G extends boolean = false>(exchangeId: string, newMarketFee: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
213
|
+
updateMarketFeeTx(exchangeId: string, newMarketFee: string): Promise<TransactionRequest>;
|
|
200
214
|
/**
|
|
201
215
|
* Set new market fee collector, only market fee collector can update it
|
|
202
216
|
* @param {String} exchangeId Exchange Id
|
|
@@ -205,4 +219,5 @@ export declare class FixedRateExchange extends SmartContractWithAddress {
|
|
|
205
219
|
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
206
220
|
*/
|
|
207
221
|
updateMarketFeeCollector<G extends boolean = false>(exchangeId: string, newMarketFeeCollector: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
222
|
+
updateMarketFeeCollectorTx(exchangeId: string, newMarketFeeCollector: string): Promise<TransactionRequest>;
|
|
208
223
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { TransactionRequest } from 'ethers';
|
|
1
2
|
import { MetadataAndTokenURI, NftRoles, ReceiptOrEstimate, AbiItem } from '../@types/index.js';
|
|
2
3
|
import { SmartContract } from './SmartContract.js';
|
|
3
|
-
import { MetadataProof } from '@oceanprotocol/ddo-js';
|
|
4
|
+
import type { MetadataProof } from '@oceanprotocol/ddo-js';
|
|
4
5
|
export declare class Nft extends SmartContract {
|
|
5
6
|
getDefaultAbi(): AbiItem[];
|
|
6
7
|
/**
|
|
@@ -20,6 +21,7 @@ export declare class Nft extends SmartContract {
|
|
|
20
21
|
* @return {Promise<string>} ERC20 Datatoken address
|
|
21
22
|
*/
|
|
22
23
|
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, filesObject?: string, accessListContract?: string, allowAccessList?: string, denyAccessList?: string, estimateGas?: G): Promise<G extends false ? string : BigInt>;
|
|
24
|
+
createDatatokenTx(nftAddress: string, address: string, minter: string, paymentCollector: string, mpFeeAddress: string, feeToken: string, feeAmount: string, cap: string, name?: string, symbol?: string, templateIndex?: number, filesObject?: string, accessListContract?: string, allowAccessList?: string, denyAccessList?: string): Promise<TransactionRequest>;
|
|
23
25
|
/**
|
|
24
26
|
* Add Manager for NFT Contract (only NFT Owner can succeed)
|
|
25
27
|
* @param {String} nftAddress NFT contract address
|
|
@@ -29,6 +31,7 @@ export declare class Nft extends SmartContract {
|
|
|
29
31
|
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
30
32
|
*/
|
|
31
33
|
addManager<G extends boolean = false>(nftAddress: string, address: string, manager: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
34
|
+
addManagerTx(nftAddress: string, address: string, manager: string): Promise<TransactionRequest>;
|
|
32
35
|
/**
|
|
33
36
|
* Removes a specific manager for NFT Contract (only NFT Owner can succeed)
|
|
34
37
|
* @param {String} nftAddress NFT contract address
|
|
@@ -38,6 +41,7 @@ export declare class Nft extends SmartContract {
|
|
|
38
41
|
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
39
42
|
*/
|
|
40
43
|
removeManager<G extends boolean = false>(nftAddress: string, address: string, manager: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
44
|
+
removeManagerTx(nftAddress: string, address: string, manager: string): Promise<TransactionRequest>;
|
|
41
45
|
/**
|
|
42
46
|
* Add DatatokenDeployer permission - only Manager can succeed
|
|
43
47
|
* @param {String} nftAddress NFT contract address
|
|
@@ -47,6 +51,7 @@ export declare class Nft extends SmartContract {
|
|
|
47
51
|
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
48
52
|
*/
|
|
49
53
|
addDatatokenDeployer<G extends boolean = false>(nftAddress: string, address: string, datatokenDeployer: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
54
|
+
addDatatokenDeployerTx(nftAddress: string, address: string, datatokenDeployer: string): Promise<TransactionRequest>;
|
|
50
55
|
/**
|
|
51
56
|
* Remove DatatokenDeployer permission - only Manager can succeed
|
|
52
57
|
* @param {String} nftAddress NFT contract address
|
|
@@ -56,6 +61,7 @@ export declare class Nft extends SmartContract {
|
|
|
56
61
|
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
57
62
|
*/
|
|
58
63
|
removeDatatokenDeployer<G extends boolean = false>(nftAddress: string, address: string, datatokenDeployer: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
64
|
+
removeDatatokenDeployerTx(nftAddress: string, address: string, datatokenDeployer: string): Promise<TransactionRequest>;
|
|
59
65
|
/**
|
|
60
66
|
* Add Metadata Updater permission - only Manager can succeed
|
|
61
67
|
* @param {String} nftAddress NFT contract address
|
|
@@ -65,6 +71,7 @@ export declare class Nft extends SmartContract {
|
|
|
65
71
|
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
66
72
|
*/
|
|
67
73
|
addMetadataUpdater<G extends boolean = false>(nftAddress: string, address: string, metadataUpdater: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
74
|
+
addMetadataUpdaterTx(nftAddress: string, address: string, metadataUpdater: string): Promise<TransactionRequest>;
|
|
68
75
|
/**
|
|
69
76
|
* Remove Metadata Updater permission - only Manager can succeed
|
|
70
77
|
* @param {String} nftAddress NFT contract address
|
|
@@ -74,6 +81,7 @@ export declare class Nft extends SmartContract {
|
|
|
74
81
|
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
75
82
|
*/
|
|
76
83
|
removeMetadataUpdater<G extends boolean = false>(nftAddress: string, address: string, metadataUpdater: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
84
|
+
removeMetadataUpdaterTx(nftAddress: string, address: string, metadataUpdater: string): Promise<TransactionRequest>;
|
|
77
85
|
/**
|
|
78
86
|
* Add Store Updater permission - only Manager can succeed
|
|
79
87
|
* @param {String} nftAddress NFT contract address
|
|
@@ -83,6 +91,7 @@ export declare class Nft extends SmartContract {
|
|
|
83
91
|
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
84
92
|
*/
|
|
85
93
|
addStoreUpdater<G extends boolean = false>(nftAddress: string, address: string, storeUpdater: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
94
|
+
addStoreUpdaterTx(nftAddress: string, address: string, storeUpdater: string): Promise<TransactionRequest>;
|
|
86
95
|
/**
|
|
87
96
|
* Remove Store Updater permission - only Manager can succeed
|
|
88
97
|
* @param {String} nftAddress NFT contract address
|
|
@@ -92,6 +101,7 @@ export declare class Nft extends SmartContract {
|
|
|
92
101
|
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
93
102
|
*/
|
|
94
103
|
removeStoreUpdater<G extends boolean = false>(nftAddress: string, address: string, storeUpdater: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
104
|
+
removeStoreUpdaterTx(nftAddress: string, address: string, storeUpdater: string): Promise<TransactionRequest>;
|
|
95
105
|
/**
|
|
96
106
|
* This function allows to remove all ROLES at NFT level: Managers, DatatokenDeployer, MetadataUpdater, StoreUpdater
|
|
97
107
|
* Even NFT Owner has to readd himself as Manager
|
|
@@ -103,6 +113,7 @@ export declare class Nft extends SmartContract {
|
|
|
103
113
|
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
104
114
|
*/
|
|
105
115
|
cleanPermissions<G extends boolean = false>(nftAddress: string, address: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
116
|
+
cleanPermissionsTx(nftAddress: string, address: string): Promise<TransactionRequest>;
|
|
106
117
|
/**
|
|
107
118
|
* Transfers the NFT
|
|
108
119
|
* will clean all permissions both on NFT and Datatoken level.
|
|
@@ -114,6 +125,7 @@ export declare class Nft extends SmartContract {
|
|
|
114
125
|
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
115
126
|
*/
|
|
116
127
|
transferNft<G extends boolean = false>(nftAddress: string, nftOwner: string, nftReceiver: string, tokenId?: number, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
128
|
+
transferNftTx(nftAddress: string, nftOwner: string, nftReceiver: string, tokenId?: number): Promise<TransactionRequest>;
|
|
117
129
|
/**
|
|
118
130
|
* safeTransferNFT Used for transferring the NFT, can be used by an approved relayer
|
|
119
131
|
* will clean all permissions both on NFT and Datatoken level.
|
|
@@ -125,6 +137,7 @@ export declare class Nft extends SmartContract {
|
|
|
125
137
|
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
126
138
|
*/
|
|
127
139
|
safeTransferNft<G extends boolean = false>(nftAddress: string, nftOwner: string, nftReceiver: string, tokenId?: number, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
140
|
+
safeTransferNftTx(nftAddress: string, nftOwner: string, nftReceiver: string, tokenId?: number): Promise<TransactionRequest>;
|
|
128
141
|
/**
|
|
129
142
|
* Creates or update Metadata cached by Aquarius. Also, updates the METADATA_DECRYPTOR key
|
|
130
143
|
* @param {String} nftAddress NFT contract address
|
|
@@ -140,6 +153,7 @@ export declare class Nft extends SmartContract {
|
|
|
140
153
|
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
141
154
|
*/
|
|
142
155
|
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>>;
|
|
156
|
+
setMetadataTx(nftAddress: string, address: string, metadataState: number, metadataDecryptorUrl: string, metadataDecryptorAddress: string, flags: string, data: string, metadataHash: string, metadataProofs?: MetadataProof[]): Promise<TransactionRequest>;
|
|
143
157
|
/**
|
|
144
158
|
* Helper function to improve UX sets both MetaData & TokenURI in one tx
|
|
145
159
|
* @param {String} nftAddress NFT contract address
|
|
@@ -149,6 +163,7 @@ export declare class Nft extends SmartContract {
|
|
|
149
163
|
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
150
164
|
*/
|
|
151
165
|
setMetadataAndTokenURI<G extends boolean = false>(nftAddress: string, metadataUpdater: string, metadataAndTokenURI: MetadataAndTokenURI, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
166
|
+
setMetadataAndTokenURITx(nftAddress: string, metadataUpdater: string, metadataAndTokenURI: MetadataAndTokenURI): Promise<TransactionRequest>;
|
|
152
167
|
/**
|
|
153
168
|
* setMetadataState Used for updating the metadata State
|
|
154
169
|
* @param {String} nftAddress NFT contract address
|
|
@@ -158,6 +173,7 @@ export declare class Nft extends SmartContract {
|
|
|
158
173
|
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
159
174
|
*/
|
|
160
175
|
setMetadataState<G extends boolean = false>(nftAddress: string, address: string, metadataState: number, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
176
|
+
setMetadataStateTx(nftAddress: string, address: string, metadataState: number): Promise<TransactionRequest>;
|
|
161
177
|
/**
|
|
162
178
|
* set TokenURI on an nft
|
|
163
179
|
* @param {String} nftAddress NFT contract address
|
|
@@ -166,6 +182,7 @@ export declare class Nft extends SmartContract {
|
|
|
166
182
|
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
167
183
|
*/
|
|
168
184
|
setTokenURI<G extends boolean = false>(nftAddress: string, data: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
185
|
+
setTokenURITx(nftAddress: string, data: string): Promise<TransactionRequest>;
|
|
169
186
|
/**
|
|
170
187
|
* Get NFT Owner
|
|
171
188
|
* @param {String} nftAddress NFT contract address
|
|
@@ -203,6 +220,7 @@ export declare class Nft extends SmartContract {
|
|
|
203
220
|
* @return {Promise<ReceiptOrEstimate>} transactionId
|
|
204
221
|
*/
|
|
205
222
|
setData<G extends boolean = false>(nftAddress: string, address: string, key: string, value: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
223
|
+
setDataTx(nftAddress: string, address: string, key: string, value: string): Promise<TransactionRequest>;
|
|
206
224
|
/**
|
|
207
225
|
* Gets stored data at a given `key` in an NFT
|
|
208
226
|
* @param {string} nftAddress - The address of the NFT.
|
|
@@ -214,7 +232,8 @@ export declare class Nft extends SmartContract {
|
|
|
214
232
|
* Gets the token URI of an NFT.
|
|
215
233
|
* @param {string} nftAddress - The address of the NFT.
|
|
216
234
|
* @param {number} id - The ID of the token.
|
|
217
|
-
* @returns {Promise
|
|
235
|
+
* @returns {Promise<string>}
|
|
236
|
+
|
|
218
237
|
*/
|
|
219
238
|
getTokenURI(nftAddress: string, id: number): Promise<string>;
|
|
220
239
|
/**
|