Skip to content

createHttpClient

createHttpClient(params): HttpClient

Creates a remote tevm client for interacting with an http server over HTTP.

Parameters

params: HttpClientOptions

Returns

Example

import { createHttpClient } from '@tevm/client'
const client = createHttpClient({ url: 'http://localhost:8080' })
const chainId = await client.eth.getChainId()
const account = await client.eth.getAccount({
address: '0x420234...'
})

See

  • createServer - for creating a tevm server
  • httpHandler - for an http handler that can be used in Next.js or anything that supports HTTP handler api

Source

createHttpClient.js:23


Generated using typedoc-plugin-markdown and TypeDoc