nearx-cli
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i nearx-cli

Weekly Downloads

3

Version

1.1.0

License

MIT

Unpacked Size

51.8 kB

Total Files

81

Last publish

Collaborators

  • bchain