Skip to content

removeProvider

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

Defined in: packages/synapse-core/src/sp-registry/remove-provider.ts:63

Remove a service provider from the Service Provider Registry

Removes the calling provider from the registry. Only the provider themselves can remove their own registration.

Parameter Type Description
client Client<Transport, Chain, Account> The viem client with account to use for the transaction.
options OptionsType removeProvider.OptionsType

Promise<`0x${string}`>

The transaction hash removeProvider.OutputType

Errors removeProvider.ErrorType

import { removeProvider } 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 removeProvider(client, {})

console.log(hash)