setProtectedDataForSale β
Method to set a protected data for sale.
During a successful sale, the ownership of the protected data is transferred to the buyer. The buyer will then be able to set their own pricing parameters, or simply keep the protected data for their own use.
Usage β
ts
const setForSaleResult = await dataProtectorSharing.setProtectedDataForSale({
protectedData: '0x123abc...',
price: 2, // 2 nRLC
});
Parameters β
ts
import { type SetProtectedDataForSaleParams } from '@iexec/dataprotector';
protectedData β
Type: AddressOrENS
Address of the protected data that you'd like to set for sale.
ts
const setForSaleResult = await dataProtectorSharing.setProtectedDataForSale({
protectedData: '0x123abc...',
price: 2, // 2 nRLC
});
price β
Type: number
The price in nano RLC (nRLC) you ask from someone who wants to buy the protected data.
ts
const setForSaleResult = await dataProtectorSharing.setProtectedDataForSale({
protectedData: '0x123abc...',
price: 2, // 2 nRLC
});
Return Value β
ts
import { type SuccessWithTransactionHash } from '@iexec/dataprotector';