Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ripple-address-codec

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ripple-address-codec

encodes/decodes base58 encoded ripple identifiers

  • 2.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
130K
decreased by-7.79%
Maintainers
1
Weekly downloads
 
Created

What is ripple-address-codec?

The ripple-address-codec npm package provides utilities for encoding and decoding Ripple (XRP) addresses. It is useful for developers working with the Ripple network who need to handle address validation, encoding, and decoding.

What are ripple-address-codec's main functionalities?

Encoding a Ripple Address

This feature allows you to encode a Ripple account ID into a standard Ripple address format. The `encodeAccountID` function takes a Buffer containing the account ID and returns the encoded address.

const { encodeAccountID } = require('ripple-address-codec');
const accountID = Buffer.from('rippleAccountID', 'hex');
const encodedAddress = encodeAccountID(accountID);
console.log(encodedAddress);

Decoding a Ripple Address

This feature allows you to decode a Ripple address back into its original account ID. The `decodeAccountID` function takes a Ripple address string and returns a Buffer containing the decoded account ID.

const { decodeAccountID } = require('ripple-address-codec');
const rippleAddress = 'rippleAddressString';
const decodedAccountID = decodeAccountID(rippleAddress);
console.log(decodedAccountID.toString('hex'));

Validating a Ripple Address

This feature allows you to validate whether a given string is a valid Ripple address. The `isValidClassicAddress` function takes a Ripple address string and returns a boolean indicating its validity.

const { isValidClassicAddress } = require('ripple-address-codec');
const rippleAddress = 'rippleAddressString';
const isValid = isValidClassicAddress(rippleAddress);
console.log(isValid);

Other packages similar to ripple-address-codec

FAQs

Package last updated on 25 Sep 2015

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc