@nahmii/sdk
TypeScript icon, indicating that this package has built-in type declarations

3.2.3 • Public • Published

@nahmii/sdk

The @nahmii/sdk package provides a set of tools for interacting with Nahmii 3.

Installation

npm install @nahmii/sdk

Using the SDK

CrossChainMessenger

The CrossChainMessenger class simplifies the process of moving assets and data between Ethereum and Optimism. You can use this class to, for example, initiate a bridge operation of ERC20 tokens from Nahmii back to the base layer, accurately track when the bridge operation is ready to be finalized on base layer, and execute the finalization transaction after the challenge period has elapsed. The CrossChainMessenger can handle bridge operations in either direction of ETH and any ERC20 or ERC721 compatible token.

The CrossChainMessenger automatically connects to all relevant contracts so complex configuration is not necessary.

L2Provider and related utilities

The Nahmii SDK includes various utilities for handling Nahmii's transaction fee model. For instance, estimateTotalGasCost will estimate the total cost (in wei) to send at transaction on Nahmii including both the L2 execution cost and the L1 data cost. You can also use the asL2Provider function to wrap an ethers Provider object into an L2Provider which will have all of these helper functions attached.

Readme

Keywords

Package Sidebar

Install

npm i @nahmii/sdk

Weekly Downloads

3

Version

3.2.3

License

MIT

Unpacked Size

356 kB

Total Files

83

Last publish

Collaborators

  • nahmii-continuous
  • jijordre
  • hubiierik