Skip to content

removeProduct

removeProduct(client, options): Promise<`0x${string}`>

Defined in: packages/synapse-core/src/sp-registry/remove-product.ts:67

Remove a product from the service provider

Removes a product (e.g., PDP) from the calling provider’s offerings. Only the provider themselves can remove their own products.

ParameterTypeDescription
clientClient<Transport, Chain, Account>The viem client with account to use for the transaction.
optionsOptionsTyperemoveProduct.OptionsType

Promise<`0x${string}`>

The transaction hash removeProduct.OutputType

Errors removeProduct.ErrorType

import { removeProduct } from '@filoz/synapse-core/sp-registry'
import { createWalletClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { calibration } from '@filoz/synapse-core/chains'
const account = privateKeyToAccount('0x...')
const client = createWalletClient({
account,
chain: calibration,
transport: http(),
})
const hash = await removeProduct(client, {
productType: 0,
})
console.log(hash)