🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@ethersproject/base64

Package Overview
Dependencies
Maintainers
0
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ethersproject/base64

Base64 coder.

5.8.0
latest
Source
npm
Version published
Weekly downloads
2.3M
4.46%
Maintainers
0
Weekly downloads
 
Created

What is @ethersproject/base64?

@ethersproject/base64 is a utility package from the ethers.js library that provides functions for encoding and decoding data in Base64 format. It is particularly useful in the context of Ethereum and blockchain development, where data often needs to be encoded or decoded for various purposes such as data storage, transmission, and smart contract interactions.

What are @ethersproject/base64's main functionalities?

Base64 Encoding

This feature allows you to encode a string into Base64 format. The `encode` function takes a string as input and returns its Base64 encoded representation.

const { encode } = require('@ethersproject/base64');
const data = 'Hello, world!';
const encodedData = encode(data);
console.log(encodedData);

Base64 Decoding

This feature allows you to decode a Base64 encoded string back to its original format. The `decode` function takes a Base64 encoded string as input and returns the decoded string.

const { decode } = require('@ethersproject/base64');
const encodedData = 'SGVsbG8sIHdvcmxkIQ==';
const decodedData = decode(encodedData);
console.log(decodedData);

Other packages similar to @ethersproject/base64

Keywords

Ethereum

FAQs

Package last updated on 26 Feb 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