JSPM

cardano-sdk

0.1.1
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 1
    • Score
      100M100P100Q33936F
    • License MIT

    An SDK for interacting with the Cardano blockchain

    Package Exports

    • cardano-sdk

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cardano-sdk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Cardano JS SDK

    JavaScript SDK for interacting with Cardano, providing various key management options including support for popular hardware wallets. The library supports multiple Cardano APIs by establishing a Provider interface. This is beneficial for both development workflow and production scenarios, as application logic does not become coupled to any one implementation.

    There are two provider types, and it is important to understand the difference when using the SDK. We have defined the CardanoProvider and WalletProvider.

    To satisfy the CardanoProvider interface, the provider must be able to supply a complete, queryable interface into the chain state. Any address should be queryable for both historic transactions and current UTXOs. When interfacing with a CardanoProvider, we use the ClientWallet implementation to satisfy wallet behaviour.

    A WalletProvider satisfies a smaller interface than CardanoProvider. The WalletProvider maintains historic chain state only for address sets derived from known parent public keys, which are stored server side. When interfacing with a WalletProvider, we use the RemoteWallet implementation to satisfy wallet behaviour, which is in most cases a simple mapping directly to the WalletProvider.

    Project State: Alpha

    This SDK is a work in progress and should not be used in production. The initial provider and Cardano primitive implementations are in the base package at this stage, but the intention is to publish separate packages to allow for composition into a clean and minimal bundle.

    Feature progress

    • Build a transaction and estimate fees
    • Transaction input selection
    • Transaction signing
      • memory
      • Ledger Nano S
      • Trezor
    • Message signing and verification
      • memory
      • Ledger Nano S
      • Trezor
    • Cardano Providers
    • Staking and Delegation

    Examples

    The below examples are implemented as integration tests, they should be very easy to understand.

    Tests

    Run the test suite with npm test.

    Ledger Nano S Specs

    To run the ledger specs:

    • Have a Ledger device connect, unlocked and in the Cardano app
    • Run LEDGER_SPECS=true npm test

    You will need to interact with the device during the test run.