getRentals β
Method to get all rentals for:
- a specific protected data
- a specific user
Usage β
ts
const protectedDataActiveRentals = await dataProtectorSharing.getRentals({
protectedData: '0x123abc...',
});
Parameters β
ts
import { type GetRentalsParams } from '@iexec/dataprotector';
renterAddress β
Type: AddressOrENS
ts
const userActiveRentals = await dataProtectorSharing.getRentals({
renterAddress: '0x246bdf...',
});
protectedData β
Type: AddressOrENS
ts
const protectedDataActiveRentals = await dataProtectorSharing.getRentals({
protectedData: '0x123abc...',
});
includePastRentals β
Type: boolean
Default: false
ts
const userRentals = await dataProtectorSharing.getRentals({
renterAddress: '0x246bdf...',
includePastRentals: true,
});
Return Value β
ts
import { type GetRentalsResponse } from '@iexec/dataprotector';
// Child types
import type { ProtectedDataRental } from '@iexec/dataprotector';