New:Socket for Asana Is Now Available.Learn more
Get Started

@ariestools/eth-address

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ariestools/eth-address

Base functionality used throughout XY Labs TypeScript/JavaScript libraries

Source
npmnpm
Version
8.0.3
Version published
Maintainers
1
Created
Source

logo

@ariestools/eth-address

npm license

Base functionality used throughout XY Labs TypeScript/JavaScript libraries

Install

Using npm:

npm install {{name}}

Using yarn:

yarn add {{name}}

Using pnpm:

pnpm add {{name}}

Using bun:

bun add {{name}}

License

See the LICENSE file for license rights and limitations (LGPL-3.0-only).

Reference

packages

eth-address

### .temp-typedoc

  ### classes

    ### <a id="EthAddressWrapper"></a>EthAddressWrapper

@xylabs/eth-address

Wrapper around an Ethereum address providing parsing, formatting, validation, and checksum support.

Constructors

Constructor

protected new EthAddressWrapper(address): EthAddressWrapper;

Parameters

address

bigint

Returns

EthAddressWrapper

Methods

fromString()

static fromString(value?, base?): EthAddressWrapper | undefined;

Parameters

value?

string

base?

number = 16

Returns

EthAddressWrapper | undefined

parse()

static parse(value, base?): EthAddressWrapper | undefined;

Parameters

value

unknown

base?

number

Returns

EthAddressWrapper | undefined

validate()

static validate(address): boolean;

Parameters

address

string

Returns

boolean

equals()

equals(address?): boolean;

Parameters

address?

string | EthAddressWrapper | null

Returns

boolean

toBigNumber()

toBigNumber(): bigint;

Returns

bigint

toHex()

toHex(): string;

Returns

string

toJSON()

toJSON(): string;

Returns

string

toLowerCaseString()

toLowerCaseString(): string;

Returns

string

toShortString()

toShortString(length?): string;

Parameters

length?

number = 2

Returns

string

toString()

toString(checksum?, chainId?): string;

Parameters

checksum?

boolean

chainId?

string

Returns

string

validate()

validate(): boolean;

Returns

boolean

  ### functions

    ### <a id="ellipsize"></a>ellipsize

@xylabs/eth-address

function ellipsize(value, length?): string;

Truncates a string to show the first and last length characters separated by an ellipsis.

Parameters

value

string

The string to ellipsize

length?

number = 2

Number of characters to keep at each end (default 2)

Returns

string

The ellipsized string

    ### <a id="isEthAddressWrapper"></a>isEthAddressWrapper

@xylabs/eth-address

function isEthAddressWrapper(obj): obj is { type: string } & EthAddressWrapper;

Type guard that checks if the given object is an instance of EthAddressWrapper.

Parameters

obj

type

string

Returns

obj is { type: string } & EthAddressWrapper

    ### <a id="padHex"></a>padHex

@xylabs/eth-address

function padHex(hex, byteCount?): string;

Parameters

hex

string

byteCount?

number = 0

Returns

string

Credits

Made with 🔥 and ❄️ by XY Labs

Keywords

ariestools

FAQs

Package last updated on 07 Jul 2026

Related posts