Tools for work with BitShares in command line
You can download binary file or build on your system.
$ git clone git@github.com:scientistnik/btscli.git
$ cd btscli
$ yarn
$ yarn build
$ yarn pkg
Start console mode with autoconnect to mainnet BitShares:
$ btscli
>|
If you want to connect on testnet, try this:
$ btscli --testnet
>|
or use --node
key:
$ btscli --node wss://api.bts.blckchnd.com
>|
It is nodejs REPL with several variables:
BitShares
, main classBitShares
packagelogin
, function to create object of classBitShares
generateKeys
, to generateKeys from login and passwordaccounts
, is analogBitShares.accounts
assets
, is analogBitShares.assets
db
, is analogBitShares.db
history
, is analogBitShares.hostory
network
, is analogBitShares.network
fees
, is analogBitShares.fees
$ btscli
> assets["bts"].then(console.log)
If need call only one request, you may use --account
, --asset
, --block
, --object
, --history
or --transfer
keys in command-line:
$ btscli --account <'name' or 'id' or 'last number in id'>
{
"id": "1.2.5992",
"membership_expiration_date": "1970-01-01T00:00:00",
"registrar": "1.2.37",
"referrer": "1.2.21",
...
}
$ btscli --asset <'symbol' or 'id' or 'last number in id'>
{
"id": "1.3.0",
"symbol": "BTS",
"precision": 5,
...
}
$ btscli --block [<number>]
block_num: 4636380
{
"previous": "0046bedba1317d146dd6afbccff94412d76bf094",
"timestamp": "2018-10-01T13:09:40",
"witness": "1.6.41",
...
}
$ btscli --object 1.2.3
{
"id": "1.2.3",
"membership_expiration_date": "1969-12-31T23:59:59",
"registrar": "1.2.3",
"referrer": "1.2.3",
...
}
$ btscli --history <account> [<limit>] [<start>] [<stop>]
[
{
"id": "1.11.98179",
"op": [
0,
...
}]
$ btscli --transfer <from> <to> <amount> <asset> [--key]
Transfered <amount> <asset> from '<from>' to '<to>' with memo '<memo>'
Bug reports and pull requests are welcome on GitHub. For communication, you can use the Telegram-channel btdex.
The package is available as open source under the terms of the MIT License.