🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

@xchainjs/xchain-base

Package Overview
Dependencies
Maintainers
11
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xchainjs/xchain-base

Base EVM client for XChainJS

latest
Source
npmnpm
Version
1.0.12
Version published
Maintainers
11
Created
Source

Base client

NPM Version NPM Downloads


Client that allows to perform operations on the Base blockchain abstracting developers from its particularities, thus allowing developers to focus on their projects. Base is a secure, low-cost, builder-friendly Ethereum L2.

If you want to read more about Base blockchain, go to its official web site

Installation

yarn add @xchainjs/xchain-base

or

npm install @xchainjs/xchain-base

Initialization

Using the Base client you can initialize the main class of the module in consultation mode if you do not provide any parameters, this means you could retrieve information from the blockchain and prepare transactions to sign, but you will not be able to sign transactions, or generate addresses.

import { Client } from '@xchainjs/xchain-base'

const client = new Client()

// Make read operations with your client

Otherwise, if you want to sign transactions and get the addresses you own, you will need to initialize the main class of the protocol as follows

import { Client, defaultBaseParams } from '@xchainjs/xchain-base'

const client = new Client({
  phrase: 'your secret phrase',
  ...defaultBaseParams
})

// Make read or write operations with your client

Features

Thanks to the Base client you will be able to:

  • Get the Base and tokens balances that an address owns
  • Generate addresses given a secret phrase
  • Transfer Base and tokens to another address
  • Get details of a transaction
  • Get address transaction history

Examples

You can find examples using the Base package in the base examples folder.

Documentation

More information about how to use the Base client can be found on documentation

Keywords

XChain

FAQs

Package last updated on 19 Sep 2025

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