Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

cardano-sdk

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cardano-sdk

An SDK for interacting with the Cardano blockchain

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

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.

Keywords

Cardano

FAQs

Package last updated on 10 Jul 2019

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