0.24.9 • Published 4 years ago

near-shell v0.24.9

Weekly downloads
30
License
(MIT AND Apache-2...
Repository
github
Last release
4 years ago

NEAR Shell command line interface

Build Status Gitpod Ready-to-Code

NEAR Shell is a Node.js application that relies on near-api-js to generate secure keys, connect to the NEAR platform and send transactions to the network on your behalf.

note that Node.js version 10+ is required to run NEAR Shell

Installation

npm install -g near-shell

Usage

In command line, from the directory with your project:

near <command>

Commands

For account:

  near login                                       # logging in through NEAR protocol wallet
  near create-account <accountId>                  # create a developer account with --masterAccount (required), publicKey and initialBalance
  near state <accountId>                           # view account state
  near keys <accountId>                            # view account public keys
  near send <sender> <receiver> <amount>           # send tokens to given receiver
  near stake <accountId> <stakingKey> <amount>     # create staking transaction (stakingKey is base58 encoded)
  near delete <accountId> <beneficiaryId>          # delete an account and transfer funds to beneficiary account
  near delete-key [accessKey]                      # delete access key

For smart contract:

  near deploy [accountId] [wasmFile] [initFunction] [initArgs] [initGas] [initDeposit]  # deploy your smart contract
  near dev-deploy [wasmFile]                       # deploy your smart contract using temporary account (TestNet only)
  near call <contractName> <methodName> [args]     # schedule smart contract call which can modify state
  near view <contractName> <methodName> [args]     # make smart contract call which can view state
  near clean                                       # clean the smart contract build locally (remove ./out )

For transactions:

  near tx-status <hash>                            # lookup transaction status by hash

For validators:

  near validators <epoch>                          # lookup validating nodes by epoch(or "current", "next")
  near proposals                                   # lookup current proposals

REPL:

near repl

Launch interactive Node.js shell with NEAR connection available to use. The repl's initial context contains nearAPI, nearand account if an accountId cli argument is provided. To load a script into the repl use .load script.js.

Usage example:
near repl --acountId bob
> console.log(account)
> .load script.js

Misc:

  near repl                                        # launch interactive Node.js shell with NEAR connection available to use
  near generate-key <account-id>                   # generate key locally (Note: this does not create another access key automatically)

Options

OptionDescriptionTypeDefault
--helpShow helpboolean
--versionShow version numberboolean
--nodeUrlNEAR node URLstring"http://localhost:3030"
--networkIdNEAR network ID for different keys by networkstring"default"
--helperUrlNEAR contract helper URLstring
--keyPathPath to master account keystring
--accountIdUnique identifier for the accountstring
--masterAccountAccount used to create requested account.string
--publicKeyPublic key to initialize the account withstring
--initialBalanceNumber of tokens to transfer to newly accountstring

License

This repository is distributed under the terms of both the MIT license and the Apache License (Version 2.0). See LICENSE and LICENSE-APACHE for details.

0.24.9

4 years ago

0.24.8

4 years ago

0.24.7

4 years ago

0.24.6

4 years ago

0.24.5

4 years ago

0.24.4

4 years ago

0.24.3

4 years ago

0.24.2

4 years ago

0.24.1

4 years ago

0.24.0

4 years ago

0.23.2

4 years ago

0.23.1

4 years ago

0.23.0

4 years ago

0.22.0

4 years ago

0.21.0

4 years ago

0.20.9

4 years ago

0.20.8

4 years ago

0.20.7

4 years ago

0.20.6

4 years ago

0.20.5

4 years ago

0.20.4

4 years ago

0.20.3

4 years ago

0.20.2-preview

4 years ago

0.20.2

4 years ago

0.20.1

4 years ago

0.20.1-preview

4 years ago

0.20.1-preview2

4 years ago

0.20.0

4 years ago

0.19.0

4 years ago

0.19.1

4 years ago

0.18.1-preview

4 years ago

0.18.0

4 years ago

0.17.3

4 years ago

0.17.2

4 years ago

0.17.1

4 years ago

0.17.0

4 years ago

0.16.1

4 years ago

0.16.0

4 years ago

0.14.2

4 years ago

0.14.1

4 years ago

0.14.0

4 years ago

0.13.0

4 years ago

0.12.0

5 years ago

0.11.5

5 years ago

0.11.4

5 years ago

0.11.3

5 years ago

0.11.2

5 years ago

0.11.1

5 years ago

0.11.0

5 years ago

0.10.5

5 years ago

0.10.4

5 years ago

0.10.3

5 years ago

0.10.2

5 years ago

0.10.1

5 years ago

0.9.5

5 years ago

0.9.4

5 years ago

0.9.3

5 years ago

0.9.2

5 years ago

0.9.1

5 years ago

0.9.0

5 years ago

0.8.4

5 years ago

0.8.3

5 years ago

0.8.2

5 years ago

0.8.1

5 years ago

0.8.0

5 years ago

0.7.0

5 years ago

0.6.0

5 years ago

0.5.0

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.6

5 years ago

0.3.5

5 years ago

0.3.4

5 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago

0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago