Giter Site home page Giter Site logo

james-iohk / cardano-js-sdk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from input-output-hk/cardano-js-sdk

0.0 0.0 0.0 57.31 MB

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

Home Page: https://input-output-hk.github.io/cardano-js-sdk/

License: Apache License 2.0

TypeScript 98.47% JavaScript 1.28% Shell 0.26%

cardano-js-sdk's Introduction

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: [
    // install "browser" version packages of these dependencies first
    new NormalModuleReplacementPlugin(
      /@emurgo\/cardano-serialization-lib-nodejs/,
      '@emurgo/cardano-serialization-lib-browser'
    ),
    new NormalModuleReplacementPlugin(
      /@emurgo\/cardano-message-signing-nodejs/,
      '@emurgo/cardano-message-signing-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

cardano-js-sdk's People

Contributors

catch-21 avatar dependabot[bot] avatar iadmytro avatar jarkkosyrjala avatar ktorz avatar mkazlauskas avatar rhyslbw avatar sam-jeston avatar sweeetland avatar vladimirvolek avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.