Skip to content

updateProviderInfo

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

Defined in: packages/synapse-core/src/sp-registry/update-provider-info.ts:76

Update provider information in the Service Provider Registry

Updates the name and description for the calling provider. Only the provider themselves can update their own information.

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

Promise<`0x${string}`>

The transaction hash updateProviderInfo.OutputType

Errors updateProviderInfo.ErrorType

import { updateProviderInfo } 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 updateProviderInfo(client, {
  name: 'Updated Provider Name',
  description: 'Updated provider description',
})

console.log(hash)