Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

test-chain-opstack-kit

opstack-kit12MIT1.4.0TypeScript support: included

Bridging hooks for OP Stack Chains

ethereum, eth, blockchain, dapps, web3, Optimism, OP, Superchain, tool, op-stack, opstack, opstack-kit, sdk, npm, docs

readme

opstack-kit

Bridging hooks for OP Stack Chains

<picture> Npm Badge </picture>

Features

  • Simplifies cross L1 & L2 interactions

Installation

`bash [npm] npm i opstack-kit

or
```bash [pnpm]
pnpm i opstack-kit

or `bash [bun] bun i opstack-kit

or
```yarn
yarn add opstack-kit

Example

After configuring the network in your app, use 'opstack-kit-chains' just import the "opstack-kit" hooks to start interacting with OP Stack chains.

import { useWriteDepositETH } from 'opstack-kit'

const { writeDepositETH } = useWriteDepositETH()

return (
  <button
    onClick={() =>
      writeDepositETH({
        args: {
          to: '0x215db47f1B2ae03ec45024Cf62ce82879b137469',
          amount: 1n,
        },
        l2ChainId: 11155420,
      })}
  >
    Deposit ETH
  </button>
)

EVM [EVM] 0xB6Be617b1D6fE5DbdD21A6AcFD9e97A35ddCEfF5