Skip to content

CardanoWeb3jsUnlock the Full Potential of Cardano

CardanoWeb3js is a versatile TypeScript library designed for seamless integration with the Cardano blockchain

CardanoWeb3js

Quickstart

ts
import { CardanoWeb3, utils } from "cardano-web3-js"
const web3 = new CardanoWeb3()

const mnemonic = utils.keys.mnemonicGenerate()
const account = web3.account.fromMnemonic(mnemonic)
const state = await account.getState()

console.log("Mnemonic:", mnemonic)
console.log("Account Address:", account.__config.paymentAddress)
console.log("Account State:", state)



CardanoWeb3js is a versatile TypeScript library designed for seamless integration with the Cardano blockchain. It supports both Node.js and browser environments, streamlining transaction creation, smart contract deployment, and data exploration. Ideal for developers, this toolkit simplifies Cardano cryptographic operations and API interactions.

This library is a set of abstractions over various opensource libraries and SDKs that are required to work with the Cardano blockchain: CML by dcSpark, MSL by Emurgo, UPLC by Aiken, Plutus Data by Spacebudz, and other.

Features of CardanoWeb3js

Developer-Friendly

  • Well-typed and documented code (with unit tests)
  • Typedoc API
  • CommonJS (CJS) & ECMAScript (ESM) builds
  • Doesn't need any polyfills
  • For beginners and professionals alike

In Development

  • HW wallets support
  • Pluggable architecture
  • Chainable TXs

Environment Support

Browser (Bundler)NodejsWeb
Outputs JS that is suitable for interoperation with a Bundler like WebpackOutputs JS that uses CommonJS modules and ESM modules to run in NodeJS environments of various versionsOutputs JS that can be natively imported as an ES module in a browser. Works with Serverless environs such as Cloudflare Workers

Development

CardanoWeb3js is under active development: architectures, methods, and approaches can change rapidly, so you can get actively involved by visiting our repository.

Released under the MIT License