Socket
Book a DemoInstallSign in
Socket

@emurgo/cardano-serialization-lib-nodejs

Package Overview
Dependencies
Maintainers
7
Versions
166
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@emurgo/cardano-serialization-lib-nodejs

(De)serialization functions for the Cardano blockchain along with related utility functions

15.0.1
latest
Source
npmnpm
Version published
Weekly downloads
237K
25.49%
Maintainers
7
Weekly downloads
 
Created

What is @emurgo/cardano-serialization-lib-nodejs?

@emurgo/cardano-serialization-lib-nodejs is a library for Cardano blockchain developers that provides tools for serialization and deserialization of data structures used in Cardano transactions. It allows developers to create, sign, and manage Cardano transactions and addresses programmatically.

What are @emurgo/cardano-serialization-lib-nodejs's main functionalities?

Transaction Creation

This feature allows developers to create Cardano transactions by building transaction outputs and inputs. The code sample demonstrates how to create a transaction builder, add an output with a specific address and value, and build the transaction.

const { TransactionBuilder, TransactionOutput, Address, Value } = require('@emurgo/cardano-serialization-lib-nodejs');

const txBuilder = TransactionBuilder.new();
const address = Address.from_bech32('addr_test...');
const value = Value.new(BigInt(1000000));
const output = TransactionOutput.new(address, value);
txBuilder.add_output(output);
const tx = txBuilder.build();

Address Handling

This feature provides utilities for handling Cardano addresses, including conversion between different address formats. The code sample shows how to create an address from a Bech32 string and convert it back to a Bech32 string.

const { Address } = require('@emurgo/cardano-serialization-lib-nodejs');

const address = Address.from_bech32('addr_test...');
console.log(address.to_bech32());

Transaction Signing

This feature allows developers to sign transactions using private keys. The code sample demonstrates how to deserialize a transaction from bytes, sign it with a private key, and obtain a signed transaction.

const { Transaction, PrivateKey } = require('@emurgo/cardano-serialization-lib-nodejs');

const tx = Transaction.from_bytes(Buffer.from('...'));
const privateKey = PrivateKey.from_bech32('...');
const signedTx = tx.sign(privateKey);

Other packages similar to @emurgo/cardano-serialization-lib-nodejs

FAQs

Package last updated on 27 Aug 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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.