Skip to content

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';

See Type ↗️