removeCollection
Method to remove one of your collections in the Data Sharing smart contract.
By removing a collection, we mean to burn the associated NFT, ie. to transfer it to the zero address.
Usage
ts
const { txHash } = await dataProtectorSharing.removeCollection({
collectionId: 15,
});
Pre-conditions
- You must be the owner of the collection.
- There should be no protected data in the collection. See
removeProtectedDataFromCollection
.
Parameters
ts
import { type RemoveCollectionParams } from '@iexec/dataprotector';
collectionId Required *
Type: number
The collection ID of the collection you want to remove.
ts
const { txHash } = await dataProtectorSharing.removeCollection({
collectionId: 15,
});
Return value
ts
import { type SuccessWithTransactionHash } from '@iexec/dataprotector';