Skip to content

🚧 Work in progress: JavaScript SDK for interacting with Cardano, providing various key management options, soon to be including support for popular hardware wallets

License

Notifications You must be signed in to change notification settings

solaunch/cardano-js-sdk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cardano JS SDK

CI


Overview

A suite of TypeScript packages suitable for both Node.js and browser-based development.

Cardano Provider Implementations

ℹ️ Looking to use a Cardano service not listed here? Let us know!

Webpack

You may use the following config when bundling this SDK with Webpack:

const { IgnorePlugin, ProvidePlugin } = require('webpack');
{
  plugins: [
    // see https://www.npmjs.com/package/bip39 README
    new IgnorePlugin(/^\.\/wordlists\/(?!english)/, /bip39\/src$/),
  ],
  experiments: {
    // Requires code splitting to work.
    // Must dynamically `import()` a chunk that imports '@cardano-sdk/*'.
    syncWebAssembly: true
  }
}

Additionally, for browser builds:

const { NormalModuleReplacementPlugin } = require('webpack');
{
  resolve: {
    fallback: {
      // Node.js polyfills. May want to install as explicit dependencies.
      stream: require.resolve('readable-stream'),
      buffer: require.resolve('buffer'),
    }
  },
  plugins: [
    new NormalModuleReplacementPlugin(
      /@emurgo\/cardano-serialization-lib-nodejs/,
      '@emurgo/cardano-serialization-lib-browser'
    )
  ]
}

Testing

Development

A Yarn Workspace maintaining a single version across all packages.

System Requirements

  • Docker 17.12.0+
  • Docker Compose

Install and Build

yarn install && \
yarn build

Run Tests

yarn testnet:up

In another terminal

yarn test

or

yarn test:debug

Lint

yarn lint

Cleanup

yarn cleanup

Distribute

Pack

./scripts/pack.sh

Publish to npm.org

./scripts/publish.sh

Generate Docs

yarn docs

Maintenance

Bump Version

yarn bump-version

Then update the sibling dependencies manually.

New package checklist

  1. Extend packageMap in .versionrc.js
  2. Extend pack.sh
  3. Extend publish.sh

📖 Documentation

About

🚧 Work in progress: JavaScript SDK for interacting with Cardano, providing various key management options, soon to be including support for popular hardware wallets

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 97.3%
  • JavaScript 2.2%
  • Shell 0.5%