All Projects → Berry-Pool → cardanocli-js

Berry-Pool / cardanocli-js

Licence: other
Wrapping the cardano-cli inside JavaScript

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to cardanocli-js

Pi-Pool
Cardano Stakepool on Raspberry Pi
Stars: ✭ 204 (+17.92%)
Mutual labels:  stake, cardano, cardano-node, stakepool, cardano-cli
tokenomia
Tokenomia is built for the Cardashift ICO, it aims to simplify the use of Native Tokens and Smart Contracts above the Cardano Platform. Cardashift is a community-driven startup platform that raises funds, builds and accelerates startups that solve social and environmental problems.
Stars: ✭ 84 (-51.45%)
Mutual labels:  wallet, cardano, cardano-node, cardano-cli
scripts
StakePool Operator Scripts. Learn how to create and manage your StakePool with these simple scripts. Hardware-Ledger Support, Token/Asset Sending, Offline-Mode and more...
Stars: ✭ 200 (+15.61%)
Mutual labels:  cardano, cardano-node, stakepool, cardano-cli
cardano-py
Python3 lib and cli for operating a Cardano Passive Node and using the API's. (PRE-ALPHA)
Stars: ✭ 17 (-90.17%)
Mutual labels:  wallet, cardano, cardano-node
project-icarus-chrome
Icarus, a reference implementation for a lightweight wallet developed by the IOHK Engineering Team.
Stars: ✭ 32 (-81.5%)
Mutual labels:  wallet, cardano
trading-post
💸 Verto's decentralised exchange mediator
Stars: ✭ 18 (-89.6%)
Mutual labels:  wallet, stake
cashuwallet
Cashu is a cryptocurrency wallet for smartphones. Be your own bank. Accept payments or spend crypto directly from your phone.
Stars: ✭ 35 (-79.77%)
Mutual labels:  wallet, cardano
cardano wallet sdk
Targeting Flutter apps, the Cardano Wallet SDK is a high-level Dart library for managing cryptocurrency accounts & executing transactions on the blockchain.
Stars: ✭ 31 (-82.08%)
Mutual labels:  wallet, cardano
neutron
Neutron - Staking + Masternode Cryptocurrency
Stars: ✭ 31 (-82.08%)
Mutual labels:  wallet, stake
pm-idm
IDM project management repository
Stars: ✭ 59 (-65.9%)
Mutual labels:  management, wallet
ansible-role-cardano-node
Ansible role for the provisioning of Shelly Cardano binaries from source.
Stars: ✭ 20 (-88.44%)
Mutual labels:  cardano, cardano-node
alias-wallet
Official Alias source code repository
Stars: ✭ 5 (-97.11%)
Mutual labels:  wallet, stake
Mandelbrot-set-explorer
An interactive Mandelbrot set, made with Python3 and Tkinter
Stars: ✭ 31 (-82.08%)
Mutual labels:  pool
etherwallet
Cross platform mobile Wallet app for Ethereum
Stars: ✭ 29 (-83.24%)
Mutual labels:  wallet
bitlum-front
Lightning Network mainnet custodial wallet. Fast, easy, no node install and synchronisation
Stars: ✭ 16 (-90.75%)
Mutual labels:  wallet
EosProxyServer
A full-functional backend server of EOS wallet.
Stars: ✭ 36 (-79.19%)
Mutual labels:  wallet
Time-and-Attendance-Management-System
TMS is a full-stack website that maintains records of all employees with their personal information. It keeps track of hours worked by an employee on a particular project assigned to him. It maintains time sheets and generates detailed and summary reports of the employee time sheets. TMS also has an admin page, which can manage all the employees…
Stars: ✭ 46 (-73.41%)
Mutual labels:  management
Customer-Management-System-for-Coffee-Shops
𝐂𝐨𝐟𝐟𝐞𝐞 𝐒𝐡𝐨𝐩𝐬
Stars: ✭ 34 (-80.35%)
Mutual labels:  management
omit-empty
Recursively omit empty properties from an object. Omits empty objects, arrays, strings, and optionally zero. Similar results to what you would expect with `compact` for arrays.
Stars: ✭ 71 (-58.96%)
Mutual labels:  keys
albedo
Security-centric, developer-friendly, easy-to-use delegated signer and keystore for Stellar Network
Stars: ✭ 57 (-67.05%)
Mutual labels:  wallet

cardanocli-js

Overview

This is a library, which wraps the cardano-cli with JavaScript and makes it possible to interact with the cli-commands much faster and more efficient.

This library was initially brought by BerryPool and currently maintained by Shareslake. You can support the work by delegating to the Berry pool.

Donations (ADA):

  • Shareslake:
addr1q9rsrh7kjhct7llm88dug6l5mh047gq6yq3wt3gjfd6uk3ldch4wp7w7v3ac4wp6q33gz2kemwn8ap6zch0u3za6pypshaa6ry
  • Berry:
addr1q97x8rfnkw4pmdgnwjzavl8jvg77tuy6wn3wm90x9emwgj8nhh356yzp7k3qwmhe4fk0g5u6kx5ka4rz5qcq4j7mvh2sg67tj5

Prerequisites

  • cardano-node >= 1.29.0
  • node.js >= 12.19.0

Install

NPM

npm install cardanocli-js

From source

git clone https://github.com/shareslake/cardanocli-js.git
cd cardanocli-js
npm install

Getting started

const CardanocliJs = require("cardanocli-js");
const shelleyGenesisPath = "/home/ada/mainnet-shelley-genesis.json";

const cardanocliJs = new CardanocliJs({ shelleyGenesisPath });

const createWallet = (account) => {
  const payment = cardanocliJs.addressKeyGen(account);
  const stake = cardanocliJs.stakeAddressKeyGen(account);
  cardanocliJs.stakeAddressBuild(account);
  cardanocliJs.addressBuild(account, {
    paymentVkey: payment.vkey,
    stakeVkey: stake.vkey,
  });
  return cardanocliJs.wallet(account);
};

const createPool = (name) => {
  cardanocliJs.nodeKeyGenKES(name);
  cardanocliJs.nodeKeyGen(name);
  cardanocliJs.nodeIssueOpCert(name);
  cardanocliJs.nodeKeyGenVRF(name);
  return cardanocliJs.pool(name);
};

const wallet = createWallet("Ada");
const pool = createPool("Berry");

console.log(wallet.paymentAddr);
console.log(pool.vrf.vkey);

Check /examples for more use cases.

API

Structure

All files will be stored and used in the directory you choose when instantiating CardanocliJs (dir). The directory is split in two subfolders tmp and priv. In the tmp folder are stored protocol paramters, raw transactions, signed transactions and witnesses with unique identifiers. The priv folder is again divided into two subolders holding on one site the pools pool and on the other side the wallets wallet (like CNTools structure).

Example structure:

dir
    tmp
        <tx_1.raw>
        ...
    priv
        pool
            Berry
                <Berry.node.vkey>
                <Berry.node.skey>
                <Berry.vrf.vkey>
                ...
        wallet
            Lovelace
                <Lovelace.payment.vkey>
                <Lovelace.stake.skey>
                ...

Tests

Install npm dev dependencies using npm install --also=dev.

Tests are using Jest framework and can be run by using npm -s run test command.

To configure the test suite, make a copy of .env.dist and rename it .env. Then change all parameters values to fit your environment.

Caution: The TEST_WORKSPACE_DIR will be deleted at the end of the test suite. NEVER USE AN EXISTING DIRECTORY !!! You may disable this behavior by commenting the cleanup function in test/index.test.js:

afterAll(() => {
    // cleanUpTestDirectory();
});
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].