Skip to content

getCollectionsByOwner

Method to get all collections for a specific user.

Usage

ts
const 
userCollections
= await
dataProtectorSharing
.
getCollectionsByOwner
({
owner
: '0xa0c15e...',
});

Parameters

ts
import { type 
GetCollectionsByOwnerParams
} from '@iexec/dataprotector';

owner Required *

Type: AddressOrENS

ts
const 
userCollections
= await
dataProtectorSharing
.
getCollectionsByOwner
({
owner
: '0xa0c15e...',
});

includeHiddenProtectedDatas Optional

Type: boolean
Default: false

ts
const 
userCollectionsWithAllProtectedData
=
await
dataProtectorSharing
.
getCollectionsByOwner
({
owner
: '0xa0c15e...',
includeHiddenProtectedDatas
: true,
});

Return value

ts
import type { 
GetCollectionsByOwnerResponse
} from '@iexec/dataprotector';
// Child types import type {
CollectionWithProtectedDatas
,
ProtectedDataInCollection
,
SubscriptionParams
,
RentingParams
,
SellingParams
,
} from '@iexec/dataprotector';

See Type ↗️