1.1.0 • Published 1 year ago

nearx-cli v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

nearx-cli

A cli for for third party clients to programatically interact with nearx using staderlabs nearx-sdk

Get Started

  1. Install nearx-cli by running npm i -g nearx-cli
  2. Run near login to import the private keys of your account to ~/.near-credentials directory. If you intend to interact with the mainnet contract then run NEAR_ENV=mainnet near login

Important Parameters

  1. accountId: All the commands which performs a state change like stake, unstake and withdraw take in an accountId parameters.
  2. network: Network can be either be mainnet or testnet. Mainnet option will perform the operations on v2-nearx.stader-labs.near contract and the testnet option will perform the operations on v2-nearx.staderlabs.testnet.

Usage

To check a user's NEARX balance on mainnet contract

nearx-cli nearx-balance --accountId=example.near --network=mainnet

To check a user's account on mainnet contract

nearx-cli user-account --accountId=example.near --network=mainnet

To get general info on NEARX like total NEAR staked, NEARX supply and NEARX price

nearx-cli nearx-info --network=mainnet

To get info related to all the NEARX validators

nearx-cli nearx-validators --network=mainnet

To stake NEAR and get NEARX

nearx-cli stake --accountId=example.near --amount=1000000000000000000000000 --network=mainnet

To unstake NEARX and get back your staked NEAR

nearx-cli unstake --accountId=example.near --amount=1000000000000000000000000 --network=mainnet

To unstake all NEARX and get back your staked NEAR

nearx-cli unstake-all --accountId=example.near --network=mainnet

To withdraw your unstaked NEAR

nearx-cli withdraw --accountId=example.near --amount=1000000000000000000000000 --network=mainnet

To withdraw all your unstaked NEAR

nearx-cli withdraw-all --accountId=example.near --network=mainnet

1.1.0

1 year ago

1.0.1

2 years ago

1.0.0

2 years ago

0.6.0

2 years ago

0.5.0

2 years ago

0.4.0

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago