Skip to content

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

Parameters

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

collectionId

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

See SuccessWithTransactionHash