Socket
Socket
Sign inDemoInstall

@blockfrost/blockfrost-cardano-cli

Package Overview
Dependencies
170
Maintainers
3
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.1-alfa.4 to 0.0.1-beta.1

4

lib/services/blockfrost/index.js

@@ -8,2 +8,4 @@ "use strict";

const constants_1 = require("../../constants");
// eslint-disable-next-line @typescript-eslint/no-var-requires
const packageJson = require('../../../package.json');
const createBlockfrostClient = (testnet) => {

@@ -15,7 +17,9 @@ const envVarName = testnet ? constants_1.ENV_VAR_PROJECT_ID.TESTNET : constants_1.ENV_VAR_PROJECT_ID.MAINNET;

}
const userAgent = `${packageJson.name}@${packageJson.version}`;
return new blockfrost_js_1.BlockFrostAPI({
projectId,
isTestnet: Boolean(testnet),
userAgent,
});
};
exports.createBlockfrostClient = createBlockfrostClient;

2

oclif.manifest.json

@@ -1,1 +0,1 @@

{"version":"0.0.1-alfa.4","commands":{"query:pool-params":{"id":"query:pool-params","strict":false,"pluginName":"@blockfrost/blockfrost-cardano-cli","pluginAlias":"@blockfrost/blockfrost-cardano-cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"testnet":{"name":"testnet","type":"boolean","char":"t","description":"Cardano Testnet","allowNo":false},"testnet-magic":{"name":"testnet-magic","type":"option","hidden":true,"multiple":false,"exclusive":["testnet"]},"json":{"name":"json","type":"boolean","description":"Always outputs json instead of pretty printed table","allowNo":false},"out-file":{"name":"out-file","type":"option","description":"Optional output file. Default is to write to stdout.","multiple":false},"stake-pool-id":{"name":"stake-pool-id","type":"option","description":"STAKE-POOL-ID","required":true,"multiple":false}},"args":[]},"query:protocol-parameters":{"id":"query:protocol-parameters","strict":false,"pluginName":"@blockfrost/blockfrost-cardano-cli","pluginAlias":"@blockfrost/blockfrost-cardano-cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"testnet":{"name":"testnet","type":"boolean","char":"t","description":"Cardano Testnet","allowNo":false},"testnet-magic":{"name":"testnet-magic","type":"option","hidden":true,"multiple":false,"exclusive":["testnet"]},"json":{"name":"json","type":"boolean","description":"Always outputs json instead of pretty printed table","allowNo":false},"out-file":{"name":"out-file","type":"option","description":"Optional output file. Default is to write to stdout.","multiple":false}},"args":[]},"query:stake-address-info":{"id":"query:stake-address-info","strict":false,"pluginName":"@blockfrost/blockfrost-cardano-cli","pluginAlias":"@blockfrost/blockfrost-cardano-cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"testnet":{"name":"testnet","type":"boolean","char":"t","description":"Cardano Testnet","allowNo":false},"testnet-magic":{"name":"testnet-magic","type":"option","hidden":true,"multiple":false,"exclusive":["testnet"]},"json":{"name":"json","type":"boolean","description":"Always outputs json instead of pretty printed table","allowNo":false},"out-file":{"name":"out-file","type":"option","description":"Optional output file. Default is to write to stdout.","multiple":false},"address":{"name":"address","type":"option","description":"address","required":true,"multiple":false}},"args":[]},"query:stake-distribution":{"id":"query:stake-distribution","strict":false,"pluginName":"@blockfrost/blockfrost-cardano-cli","pluginAlias":"@blockfrost/blockfrost-cardano-cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"testnet":{"name":"testnet","type":"boolean","char":"t","description":"Cardano Testnet","allowNo":false},"testnet-magic":{"name":"testnet-magic","type":"option","hidden":true,"multiple":false,"exclusive":["testnet"]},"json":{"name":"json","type":"boolean","description":"Always outputs json instead of pretty printed table","allowNo":false},"out-file":{"name":"out-file","type":"option","description":"Optional output file. Default is to write to stdout.","multiple":false}},"args":[]},"query:stake-pools":{"id":"query:stake-pools","strict":false,"pluginName":"@blockfrost/blockfrost-cardano-cli","pluginAlias":"@blockfrost/blockfrost-cardano-cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"testnet":{"name":"testnet","type":"boolean","char":"t","description":"Cardano Testnet","allowNo":false},"testnet-magic":{"name":"testnet-magic","type":"option","hidden":true,"multiple":false,"exclusive":["testnet"]},"json":{"name":"json","type":"boolean","description":"Always outputs json instead of pretty printed table","allowNo":false},"out-file":{"name":"out-file","type":"option","description":"Optional output file. Default is to write to stdout.","multiple":false}},"args":[]},"query:tip":{"id":"query:tip","strict":false,"pluginName":"@blockfrost/blockfrost-cardano-cli","pluginAlias":"@blockfrost/blockfrost-cardano-cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"testnet":{"name":"testnet","type":"boolean","char":"t","description":"Cardano Testnet","allowNo":false},"testnet-magic":{"name":"testnet-magic","type":"option","hidden":true,"multiple":false,"exclusive":["testnet"]},"json":{"name":"json","type":"boolean","description":"Always outputs json instead of pretty printed table","allowNo":false},"out-file":{"name":"out-file","type":"option","description":"Optional output file. Default is to write to stdout.","multiple":false}},"args":[]},"query:utxo":{"id":"query:utxo","strict":false,"pluginName":"@blockfrost/blockfrost-cardano-cli","pluginAlias":"@blockfrost/blockfrost-cardano-cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"testnet":{"name":"testnet","type":"boolean","char":"t","description":"Cardano Testnet","allowNo":false},"testnet-magic":{"name":"testnet-magic","type":"option","hidden":true,"multiple":false,"exclusive":["testnet"]},"json":{"name":"json","type":"boolean","description":"Always outputs json instead of pretty printed table","allowNo":false},"out-file":{"name":"out-file","type":"option","description":"Optional output file. Default is to write to stdout.","multiple":false},"address":{"name":"address","type":"option","description":"address","required":true,"multiple":false}},"args":[]},"transaction:submit":{"id":"transaction:submit","strict":false,"pluginName":"@blockfrost/blockfrost-cardano-cli","pluginAlias":"@blockfrost/blockfrost-cardano-cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"testnet":{"name":"testnet","type":"boolean","char":"t","description":"Cardano Testnet","allowNo":false},"testnet-magic":{"name":"testnet-magic","type":"option","hidden":true,"multiple":false,"exclusive":["testnet"]},"json":{"name":"json","type":"boolean","description":"Always outputs json instead of pretty printed table","allowNo":false},"out-file":{"name":"out-file","type":"option","description":"Optional output file. Default is to write to stdout.","multiple":false},"tx-file":{"name":"tx-file","type":"option","char":"f","description":"Filepath of the transaction you intend to submit.","required":true,"multiple":false}},"args":[]}}}
{"version":"0.0.1-beta.1","commands":{"query:pool-params":{"id":"query:pool-params","strict":false,"pluginName":"@blockfrost/blockfrost-cardano-cli","pluginAlias":"@blockfrost/blockfrost-cardano-cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"testnet":{"name":"testnet","type":"boolean","char":"t","description":"Cardano Testnet","allowNo":false},"testnet-magic":{"name":"testnet-magic","type":"option","hidden":true,"multiple":false,"exclusive":["testnet"]},"json":{"name":"json","type":"boolean","description":"Always outputs json instead of pretty printed table","allowNo":false},"out-file":{"name":"out-file","type":"option","description":"Optional output file. Default is to write to stdout.","multiple":false},"stake-pool-id":{"name":"stake-pool-id","type":"option","description":"STAKE-POOL-ID","required":true,"multiple":false}},"args":[]},"query:protocol-parameters":{"id":"query:protocol-parameters","strict":false,"pluginName":"@blockfrost/blockfrost-cardano-cli","pluginAlias":"@blockfrost/blockfrost-cardano-cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"testnet":{"name":"testnet","type":"boolean","char":"t","description":"Cardano Testnet","allowNo":false},"testnet-magic":{"name":"testnet-magic","type":"option","hidden":true,"multiple":false,"exclusive":["testnet"]},"json":{"name":"json","type":"boolean","description":"Always outputs json instead of pretty printed table","allowNo":false},"out-file":{"name":"out-file","type":"option","description":"Optional output file. Default is to write to stdout.","multiple":false}},"args":[]},"query:stake-address-info":{"id":"query:stake-address-info","strict":false,"pluginName":"@blockfrost/blockfrost-cardano-cli","pluginAlias":"@blockfrost/blockfrost-cardano-cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"testnet":{"name":"testnet","type":"boolean","char":"t","description":"Cardano Testnet","allowNo":false},"testnet-magic":{"name":"testnet-magic","type":"option","hidden":true,"multiple":false,"exclusive":["testnet"]},"json":{"name":"json","type":"boolean","description":"Always outputs json instead of pretty printed table","allowNo":false},"out-file":{"name":"out-file","type":"option","description":"Optional output file. Default is to write to stdout.","multiple":false},"address":{"name":"address","type":"option","description":"address","required":true,"multiple":false}},"args":[]},"query:stake-distribution":{"id":"query:stake-distribution","strict":false,"pluginName":"@blockfrost/blockfrost-cardano-cli","pluginAlias":"@blockfrost/blockfrost-cardano-cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"testnet":{"name":"testnet","type":"boolean","char":"t","description":"Cardano Testnet","allowNo":false},"testnet-magic":{"name":"testnet-magic","type":"option","hidden":true,"multiple":false,"exclusive":["testnet"]},"json":{"name":"json","type":"boolean","description":"Always outputs json instead of pretty printed table","allowNo":false},"out-file":{"name":"out-file","type":"option","description":"Optional output file. Default is to write to stdout.","multiple":false}},"args":[]},"query:stake-pools":{"id":"query:stake-pools","strict":false,"pluginName":"@blockfrost/blockfrost-cardano-cli","pluginAlias":"@blockfrost/blockfrost-cardano-cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"testnet":{"name":"testnet","type":"boolean","char":"t","description":"Cardano Testnet","allowNo":false},"testnet-magic":{"name":"testnet-magic","type":"option","hidden":true,"multiple":false,"exclusive":["testnet"]},"json":{"name":"json","type":"boolean","description":"Always outputs json instead of pretty printed table","allowNo":false},"out-file":{"name":"out-file","type":"option","description":"Optional output file. Default is to write to stdout.","multiple":false}},"args":[]},"query:tip":{"id":"query:tip","strict":false,"pluginName":"@blockfrost/blockfrost-cardano-cli","pluginAlias":"@blockfrost/blockfrost-cardano-cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"testnet":{"name":"testnet","type":"boolean","char":"t","description":"Cardano Testnet","allowNo":false},"testnet-magic":{"name":"testnet-magic","type":"option","hidden":true,"multiple":false,"exclusive":["testnet"]},"json":{"name":"json","type":"boolean","description":"Always outputs json instead of pretty printed table","allowNo":false},"out-file":{"name":"out-file","type":"option","description":"Optional output file. Default is to write to stdout.","multiple":false}},"args":[]},"query:utxo":{"id":"query:utxo","strict":false,"pluginName":"@blockfrost/blockfrost-cardano-cli","pluginAlias":"@blockfrost/blockfrost-cardano-cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"testnet":{"name":"testnet","type":"boolean","char":"t","description":"Cardano Testnet","allowNo":false},"testnet-magic":{"name":"testnet-magic","type":"option","hidden":true,"multiple":false,"exclusive":["testnet"]},"json":{"name":"json","type":"boolean","description":"Always outputs json instead of pretty printed table","allowNo":false},"out-file":{"name":"out-file","type":"option","description":"Optional output file. Default is to write to stdout.","multiple":false},"address":{"name":"address","type":"option","description":"address","required":true,"multiple":false}},"args":[]},"transaction:submit":{"id":"transaction:submit","strict":false,"pluginName":"@blockfrost/blockfrost-cardano-cli","pluginAlias":"@blockfrost/blockfrost-cardano-cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"testnet":{"name":"testnet","type":"boolean","char":"t","description":"Cardano Testnet","allowNo":false},"testnet-magic":{"name":"testnet-magic","type":"option","hidden":true,"multiple":false,"exclusive":["testnet"]},"json":{"name":"json","type":"boolean","description":"Always outputs json instead of pretty printed table","allowNo":false},"out-file":{"name":"out-file","type":"option","description":"Optional output file. Default is to write to stdout.","multiple":false},"tx-file":{"name":"tx-file","type":"option","char":"f","description":"Filepath of the transaction you intend to submit.","required":true,"multiple":false}},"args":[]}}}
{
"name": "@blockfrost/blockfrost-cardano-cli",
"description": "Drop-in(ish) replacement for cardano-cli powered by Blockfrost",
"version": "0.0.1-alfa.4",
"version": "0.0.1-beta.1",
"author": "blockfrost.io",

@@ -13,9 +13,8 @@ "bin": {

"@blockfrost/blockfrost-js": "3.0.3-beta.3",
"@oclif/core": "1.0.7",
"@oclif/core": "1.0.10",
"@oclif/plugin-help": "^5",
"bech32": "^2.0.0",
"bignumber.js": "^9.0.1",
"cli-ux": "^5.6.5",
"safe-stable-stringify": "^2.3.0",
"stdout-stderr": "^0.1.13"
"bignumber.js": "^9.0.2",
"cli-ux": "^6.0.6",
"safe-stable-stringify": "^2.3.1"
},

@@ -25,4 +24,4 @@ "devDependencies": {

"@types/node": "^14",
"@typescript-eslint/eslint-plugin": "^5.5.0",
"@typescript-eslint/parser": "^5.5.0",
"@typescript-eslint/eslint-plugin": "^5.7.0",
"@typescript-eslint/parser": "^5.7.0",
"eslint": "^7.32.0",

@@ -34,9 +33,10 @@ "eslint-config-oclif": "^4.0.0",

"eslint-plugin-unicorn": "^39.0.0",
"jest": "^27.4.3",
"jest": "^27.4.5",
"make-coverage-badge": "^1.2.0",
"nock": "^13.2.1",
"npm-run-all": "^4.1.5",
"oclif": "2.0.0-main.11",
"prettier": "^2.5.0",
"ts-jest": "^27.0.7",
"oclif": "2.0.1",
"prettier": "^2.5.1",
"stdout-stderr": "^0.1.13",
"ts-jest": "^27.1.1",
"ts-node": "^10.4.0",

@@ -43,0 +43,0 @@ "typescript": "4.4.4"

@@ -62,2 +62,58 @@ ![master build ci](https://github.com/blockfrost/blockfrost-cardano-cli/actions/workflows/build.yml/badge.svg?branch=master) [![npm version](https://badge.fury.io/js/%40blockfrost%2Fblockfrost-cardano-cli.svg)](https://badge.fury.io/js/%40blockfrost%2Fblockfrost-cardano-cli) ![downloads](https://img.shields.io/npm/dy/@blockfrost/blockfrost-cardano-cli) <img src="https://github.com/blockfrost/blockfrost-cardano-cli/blob/master/docs/badge-coverage.svg" /> <a href="https://fivebinaries.com/"><img src="https://img.shields.io/badge/made%20by-Five%20Binaries-darkviolet.svg?style=flat-square" /></a>

#### `bcc query tip`
Get the current tip
```console
$ bcc query tip --testnet
{
"epoch": 171,
"hash": "d91bbfb72158eed4949663abbc20ce70dcc1a5c4d8855b6db46f6cd9c061dce5",
"slot": 43922944,
"block": 3115492,
"era": "Alonzo",
"syncProgress": "100.00"
}
```
#### `bcc query utxo --address`
Get the current UTXO set filtered by an address.
```console
$ bcc query utxo --address addr1q9cn7sh5tgxj5xazsnj7pqfn2nrltnqzh268arnp5a273av8q0pkxxvsh4v5jc4lwz5ccdxh892g73ns65xj5vvqsa3s93g77p
TxHash TxIx Amount
──────────────────────────────────────────────────────────────── ────── ────────────────────────────────────────────────────────────────────────────────────────────────────────────
61d47e568b1502064906e977aae848c7aec9a76f97e7d11ad5d752e95c438011 0 1379280 lovelace + 1 e5a2bcc51466942a9db1da62471a1b682bde3abcebafee2c7fb1e378.415254494643544d4f4f4e32353437
ac1d8802a4e100d90ce59fb4e4573f1c7884a65197ff39810a88eb0b07de3aa6 0 30000000 lovelace
69818d49963ffafe8a287ec270d05ba89493de33ddf7b5b9bcb07e97802a0f28 1 5573009 lovelace
fba1526c49684722199b102bffd5b4a66ea1d490605532753fa24e12af925722 0 5000000 lovelace
```
#### `bcc query stake-address-info --address`
Get the current delegations and reward balance filtered by stake address.
```console
$ bcc query stake-address-info --address stake_test1uqvjsz7a3xm7ylpzgdhvg29gd9686ss9kztxeaanwp9nreqq74692 --testnet
[
{
"address": "stake_test1uqvjsz7a3xm7ylpzgdhvg29gd9686ss9kztxeaanwp9nreqq74692",
"rewardAccountBalance": 0,
"delegation": null
}
]
```
#### `bcc transaction submit --tx-file FILE`
```console
$ bcc transaction submit --tx-file /tmp/mytx --testnet
Transaction successfully submitted.
```
#### `bcc query pool-params --stake-pool-id POOLID`

@@ -150,19 +206,2 @@

#### `bcc query tip`
Get the current tip
```console
$ bcc query tip --testnet
{
"epoch": 171,
"hash": "d91bbfb72158eed4949663abbc20ce70dcc1a5c4d8855b6db46f6cd9c061dce5",
"slot": 43922944,
"block": 3115492,
"era": "Alonzo",
"syncProgress": "100.00"
}
```
#### `bcc query stake-distribution`

@@ -187,26 +226,2 @@

#### `bcc query stake-address-info --address`
Get the current delegations and reward balance filtered by stake address.
```console
$ bcc query stake-address-info --address stake_test1uqvjsz7a3xm7ylpzgdhvg29gd9686ss9kztxeaanwp9nreqq74692 --testnet
[
{
"address": "stake_test1uqvjsz7a3xm7ylpzgdhvg29gd9686ss9kztxeaanwp9nreqq74692",
"rewardAccountBalance": 0,
"delegation": null
}
]
```
#### `bcc transaction submit --tx-file FILE`
```console
$ bcc transaction submit --tx-file /tmp/mytx --testnet
Transaction successfully submitted.
```
## Cardano CLI compatibility

@@ -213,0 +228,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc