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.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
client | Client<Transport, Chain, Account> | The viem client with account to use for the transaction. |
options | OptionsType | removeProduct.OptionsType |
Returns
Section titled “Returns”Promise<`0x${string}`>
The transaction hash removeProduct.OutputType
Throws
Section titled “Throws”Errors removeProduct.ErrorType
Example
Section titled “Example”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)