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

@xylabs/eth-address

Package Overview
Dependencies
Maintainers
5
Versions
444
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xylabs/eth-address

Base functionality used throughout XY Labs TypeScript/JavaScript libraries

latest
Source
npmnpm
Version
5.0.17
Version published
Weekly downloads
174
-87.33%
Maintainers
5
Weekly downloads
 
Created
Source

@xylabs/eth-address

logo

main-build npm-badge npm-downloads-badge jsdelivr-badge npm-license-badge codacy-badge codeclimate-badge snyk-badge socket-badge

Base functionality used throughout XY Labs TypeScript/JavaScript libraries

Reference

@xylabs/eth-address

Classes

  • EthAddress

Functions

classes

EthAddress

@xylabs/eth-address

Properties

type

readonly static type: "EthAddress" = 'EthAddress';

type

type: string = EthAddress.type;

Methods

fromString()

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

Parameters

value?

string

base?

number = 16

Returns

undefined | EthAddress

parse()

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

Parameters

value

unknown

base?

number

Returns

undefined | EthAddress

validate()

static validate(address): boolean;

Parameters

address

string

Returns

boolean

equals()

equals(address?): boolean;

Parameters

address?

null | string | EthAddress

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

ellipsize

@xylabs/eth-address

function ellipsize(value, length): string;

Parameters

value

string

length

number = 2

Returns

string

isEthAddress

@xylabs/eth-address

function isEthAddress(obj): boolean;

Parameters

obj

type

string

Returns

boolean

padHex

@xylabs/eth-address

function padHex(hex, byteCount): string;

Parameters

hex

string

byteCount

number = 0

Returns

string

Part of sdk-js

Maintainers

License

See the LICENSE file for license details

Credits

Made with 🔥 and ❄️ by XYLabs

Keywords

eth

FAQs

Package last updated on 29 Oct 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