setProtectedDataRentingParams
Method to update a protected data renting params.
If the protected data is not yet available for renting, it will be set for renting.
Usage
ts
const setForRentingResult =
await dataProtectorSharing.setProtectedDataRentingParams({
protectedData: '0x123abc...',
price: 1, // 1 nRLC
duration: 60 * 60 * 24 * 30, // 30 days
});
Parameters
ts
import { type SetProtectedDataRentingParams } from '@iexec/dataprotector';
protectedData
AddressOrENS
Address of the protected data you'd like to set renting parameters.
ts
const setForRentingResult =
await dataProtectorSharing.setProtectedDataRentingParams({
protectedData: '0x123abc...',
price: 1, // 1 nRLC
duration: 60 * 60 * 24 * 30, // 30 days
});
price
number
The price in nano RLC (nRLC) you ask from someone who wants to rent the protected data.
ts
const setForRentingResult =
await dataProtectorSharing.setProtectedDataRentingParams({
protectedData: '0x123abc...',
price: 1, // 1 nRLC
duration: 60 * 60 * 24 * 30, // 30 days
});
duration
number
The duration of the rental in seconds.
ts
const setForRentingResult =
await dataProtectorSharing.setProtectedDataRentingParams({
protectedData: '0x123abc...',
price: 1, // 1 nRLC
duration: 60 * 60 * 24 * 30, // 30 days
});
Return value
ts
import { type SuccessWithTransactionHash } from '@iexec/dataprotector';