@tevm/actions
TypeScript icon, indicating that this package has built-in type declarations

1.1.0-next.45 • Public • Published

tevm logo

@tevm/actions

Ethereumjs implementation of the @tevm/actions-types

Actions add functionality to the base client

Installation

Action handlers can be imported from tevm/actions or @tevm/actions

npm install tevm

or

npm install @tevm/actions

Usage

Action handlers take a client and return an tevm action handler function

import {createBaseClient} from 'tevm/base-client'
import {callHandler} from 'tevm/actions'

/**
 * Most action handlers wrap the base client
 */
const client = createBaseClient()

/**
 * To use the action first instanciate it with the base client
 * @type {import('tevm/actions-types').CallHandler}
 */
const call = callHandler(client)

/**
 * @type{import('tevm/actions-types').CallHandlerResult}
 */
const callResult = await call({
  to: `0x${'01'.repeat(20)}`,
  value: 1n,
})

Actions

See generated actions docs

License 📄

Package Sidebar

Install

npm i @tevm/actions

Weekly Downloads

31

Version

1.1.0-next.45

License

MIT

Unpacked Size

725 kB

Total Files

166

Last publish

Collaborators

  • fucory