SDK Setup

The SDK helps you interact with the messaging layer across chains. It handles functionality such as, fee estimation, message hashing, and network activity checks. The SDK is compatible whether you're working with EVM or Solana. It gives you the tools to simulate and prepare cross-chain messages with minimal setup. This guide will walk you through the setup process for the SDK.

The SDK provides fees functionalities that's used to calculate fees, check network activity, and calculate message hashes from source network transaction receipts. Below we go over examples and usage

Reach out to us via our contact page for suggestions or requests.

Installation

Begin by installing the SDK in your project first. We'll be using NPM in this guide. Run the installation command below to get started.

npm install @entangle-labs/uip-sdk

API

There are two main methods for estimation as shown below.

public async estimateExecutionWithGas({
  srcChainId: bigint,
  destChainId: bigint,
  gasLimit: bigint
})

Mode

By default, the SDK is configured for Mainnet usage. However, you can configure it to work for testnet like so.

Network Configuration

SDK use public RPC providers by default. If you want to use your own personal config, redefine config with.

Where config is an array of Chain objects:

Usage

Last updated

Was this helpful?