@mintblue/sdk
TypeScript icon, indicating that this package has built-in type declarations

9.6.0 • Public • Published

mintBlue

mintBlue is here to make your life easy. Want to use blockchain features but don't have the time or expertise to build a blockchain product from scratch? No problem!

This SDK allows you to easily integrate the mintBlue API. It also contains the tools needed to do cryptographic operations, using your non-custodial keys, allowing you to effectively and securely own your own data. Hassle-free and easy to use!

Full API and SDK documentation at docs.mintblue.com

API Reference

https://mintblue.gitlab.io/sdk/

Features

  • Create blockchain transactions
  • Encrypt and digitally sign payloads locally
  • Fetch transactions from the blockchain and decrypt payloads locally
  • Organise your transactions into projects
  • Create EventListeners to collect transactions into projects
  • Stream your project to your local machine
  • Create State Machines from blockchain transactions (see example)

Getting started

  1. Create an account at https://console.mintblue.com

  2. Create a project and copy the project ID

  3. Create an SDK token and copy the SDK token

  4. npm install @mintblue/sdk

  5. Publish your first transaction via the SDK

import { Mintblue } from '@mintblue/sdk';

(async () => {
  const token = 'YOUR SDK TOKEN';
  const project_id = 'YOUR PROJECT ID';

  const client = await Mintblue.create({ token: token });

  const outputs = [
    {
      type: 'data',
      value: 'Hello world',
      sign: true,
      encrypt: true,
    },
  ];

  const { txid, rawtx } = await client.createTransaction({ project_id, outputs });

  console.log(txid);
})();

Readme

Keywords

none

Package Sidebar

Install

npm i @mintblue/sdk

Weekly Downloads

28

Version

9.6.0

License

MIT

Unpacked Size

17.5 MB

Total Files

252

Last publish

Collaborators

  • mintblue