Coder Social home page Coder Social logo

bioneisme / bnb-greenfield-cli Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 627 KB

CLI for the BNB Greenfield SDK on the Node.JS, TypeScript (Hackathon)

License: MIT License

TypeScript 57.85% JavaScript 9.73% CSS 5.68% HTML 26.74%
bnb cli greenfield nodejs npm typescript hackathon

bnb-greenfield-cli's Introduction

@bioneisme/greenfield-cli


Greenfield CLI tool, supporting commands to make requests to greenfield

Disclaimer

The software and related documentation are under active development, all subject to potential future change without notification and not ready for production use. The code and security audit have not been fully completed and not ready for any bug bounty. We advise you to be careful and experiment on the network at your own risk. Stay safe out there.

Prerequisites

  • Node.js >= 16.14.0
  • npm >= 8.1.0

Installation

NPM package

npm install -g @bioneisme/greenfield-cli
greenfield-cli -h

Local build

git clone https://github.com/Bioneisme/bnb-greenfield-cli.git
cd bnb-greenfield-cli
npm install
npm start -h

Basic Configuration

Command to configure environment variables

greenfield-cli system -h

!To use most of the commands, you need to set your account address with private key, configure the RPC URL endpoint and Chain ID!

Set account address with private key. The password is optional, if you don't set it, you will be prompted to enter it when you make a request. Public key is your account address, private key is account private key.

greenfield-cli system set-key <public> <private> <password>

Private keys are encrypted using PBKDF2/SHA256 with a password and recorded in your local keystore.

macOS: ~/Library/Preferences/.greenfield/config.json
Windows: %APPDATA%\.greenfield\config.json
Linux: ~/.config/.greenfield/config.json (or $XDG_CONFIG_HOME/.greenfield/config.json)

Change RPC URL endpoint

greenfield-cli system rpc-url <url>

Change Chain ID

greenfield-cli system chain-id <id>

Change Storage Provider address

greenfield-cli system sp-address <address>

Display information about the current configuration

greenfield-cli system info
Usage: index [options] [command]                                         

Options:                                                                 
  -v, --version   output the version number                              
  -h, --help      display help for command                               
                                                                         
Commands:                                                                
  sp              storage providers                                      
  account         account operations                                     
  system          system settings                                        
  payment         payment object                                         
  bucket          bucket operations                                      
  object          object operations                                      
  group           group operations                                       
  feegrant        feegrant operations                                    
  crosschain      crosschain operations                                  
  help [command]  display help for command 

Documentation

https://bioneisme.github.io/greenfield-cli-docs/docs/installation

bnb-greenfield-cli's People

Contributors

akzh4n avatar bioneisme avatar nurlan1407 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.