npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@mintlayer/sdk

v1.0.30

Published

A lightweight JavaScript/TypeScript SDK to connect your dApp to the [Mintlayer](https://www.mintlayer.org/) blockchain. It allows you to build and request to sign transactions using a compatible wallet like Mojito.

Readme

Mintlayer Connect SDK

A lightweight JavaScript/TypeScript SDK to connect your dApp to the Mintlayer blockchain. It allows you to build and request to sign transactions using a compatible wallet like Mojito.


Features

  • 🔐 Secure connection to Mintlayer wallets
  • 📦 Transaction builder for all major transaction types
  • 🧮 Type-safe interfaces (TypeScript support)
  • 🔄 UTXO-based transaction handling
  • 🪙 Token minting, burning, and NFT issuance

Installation

npm install @mintlayer/sdk

or with yarn:

yarn add @mintlayer/sdk

Usage

1. Connect to wallet

import { Client } from '@mintlayer/sdk';

const client = new Client();
await client.connect(); // Opens wallet connection prompt

2. Send Transfer

await client.transfer({
  to: 'tmt1qxyz...',            // recipient address
  amount: 10,                   // in human-readable units
  token_id: 'tmltk1...',        // optional, omit for base coin
});

3. Build transaction manually

const tx = await client.buildTransaction({
  type: 'BurnToken',
  params: {
    amount: 10,
    token_id: 'tmltk1...',
    token_details: {
      authority: 'tmt1q...',
      number_of_decimals: 8,
      // ... other metadata
    },
  },
});

4. Sign transaction

Since version 1.0.17 the SDK supports signing transactions using class Signer:

import { Signer } from '@mintlayer/sdk';
 
const private_keys = {
    'tmt1qxyz...': new Uint8Array([0,0,0,...]) // Replace with actual private key bytes
};

const signer = new Signer(private_keys);

const transaction = await client.buildTransaction({
  type: 'Transfer',
  params: {
    to: 'tmt1qxyz...', // recipient address
    amount: 10,        // in human-readable units
  },
});

const signed_transaction = await signer.signTransaction(transaction);

To use helper methods, you have to implement AccountProvider interface that will handle connection and signing requests. By default, SDK communicates to Mojito Account Provider. Here's an example implementation:

class MyAccountProvider implements AccountProvider {
  async connect() {
    return addresses; // Replace with actual addresses
  }

  async restore() {
    return addresses;
  }

  async disconnect() {
    return Promise.resolve()
  }

  async request(method, params) {
    if( method === 'signTransaction') {
      const signer = new Signer(private_keys);
      const transaction_signed = signer.sign(params.txData);

      return Promise.resolve(transaction_signed);
    }
    throw new Error(`Method ${method} not implemented`);
  }
}

const client = await Client.create({
  network: 'testnet',
  autoRestore: false,
  accountProvider: new MyAccountProvider()
});

await client.connect();

const signed_transaction = await client.transfer({
  to: 'tmt1q9mfg7d6ul2nt5yhmm7l7r6wwyqkd822rymr83uc',
  amount: 10,
});

Supported transaction types

  • Transfer
  • BurnToken
  • IssueFungibleToken
  • IssueNft
  • MintToken
  • UnmintToken
  • LockTokenSupply
  • ChangeMetadataUri
  • ChangeTokenAuthority
  • FreezeToken
  • UnfreezeToken
  • DataDeposit
  • CreateDelegationId
  • DelegationStake
  • DelegationWithdraw
  • CreateOrder
  • ConcludeOrder
  • FillOrder

Development & Testing

  • Clone the repo and run npm install
  • More tests coming soon (Jest + mocks)
  • Contributions welcome!

Security

All sensitive actions (signing, wallet access) require user approval via the wallet. Private keys are never exposed.


License

MIT


Need help?

Join the community or open an issue on GitHub.