Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tokamak-network/titan-sdk

Package Overview
Dependencies
Maintainers
4
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tokamak-network/titan-sdk

[Tokamak-Titan] Tools for working with Titan

  • 0.0.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
53
increased by307.69%
Maintainers
4
Weekly downloads
 
Created
Source

@tokamak-network/titan-sdk

The @tokamak-network/titan-sdk package provides a set of tools for interacting with Titan.

Installation

npm install @tokamak-network/titan-sdk

Using the SDK

BatchCrossChainMessenger

The BatchCrossChainMessenger class simplifies the process of moving assets and data between Ethereum and Titan. You can use this class to, for example, initiate a withdrawal of ERC20 tokens from Titan back to Ethereum, accurately track when the withdrawal is ready to be finalized on Ethereum, and execute the finalization transaction after the challenge period has elapsed. The BatchCrossChainMessenger can handle deposits and withdrawals of ETH and any ERC20-compatible token. The BatchCrossChainMessenger automatically connects to all relevant contracts so complex configuration is not necessary.

The Titan SDK includes various utilities for handling Titan's L2 Fee. For instance, estimateTotalGasCost will estimate the total cost (in wei) to send at transaction on Titan 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.

Other utilities

The SDK contains other useful helper functions and constants.

Keywords

FAQs

Package last updated on 23 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc