Skip to content
This repository was archived by the owner on Apr 26, 2026. It is now read-only.

twinexyz/twine-sdk-ts

Repository files navigation

Twine TypeScript SDK

This branch adds Base L1 support alongside Ethereum, Solana, and Twine L2.

Base Sepolia configuration

  • Chain ID: 84532
  • RPC: https://sepolia.base.org
  • L1 Gateway Router: 0x0a61AdEA2e0d6B8Ed0c5c37a7065d8dAa4C7db59

Base token mappings (testnet)

  • Native ETH → L2 0x63e82273536a1b65e105D79b98a38994EC5eC7fa (18 decimals)
  • EthSol 0x6F17B967A77b4c17dd79e3094F3579af8057dF6B → L2 0x109fd711a6C876E4966Fd3f020cfd0D86794B599 (18 decimals)
  • FauxCoin 0x9A373f4337E0daa17c66f37F3c7640c17C3ebB3F → L2 0xbe0E7EcA2Db5fEE146E1f326Ad2406a477B69f2C (18 decimals)

Using Base via TwineClient

import { TwineClient, EvmSigner } from '@twinexyz/twine-sdk-ts';
import { ethers } from 'ethers';

const baseProvider = new ethers.JsonRpcProvider('https://sepolia.base.org');
const baseSigner = new EvmSigner(new ethers.Wallet(process.env.BASE_PK!, baseProvider));

const client = new TwineClient('testnet').connect({
  base: baseSigner,
  twine: baseSigner, // reuse for L2 if desired
});

const receipt = await client.base.deposit({
  amount: ethers.parseEther('0.1'),
  token: ethers.ZeroAddress,
  recipient: '0xYourL2Recipient',
  fromChain: 'base',
  gasLimit: 250_000n,
});
await receipt.wait();

depositAndCall on Base continues to use the existing Twine testnet Uniswap V2 router/factory addresses.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors