Browse Source

Close #335

Signed-off-by: Mary Anthony <mary@blockstack.com>
feat/clarity-updates
Mary Anthony 5 years ago
parent
commit
47d9bb2385
  1. 19
      README.md
  2. 8
      _data/cliRef.json

19
README.md

@ -52,6 +52,25 @@ surge
surge --domain raspy-songs.surge.sh
```
# To generate the CLI json manually
The `_data/cliRef.json` file is generated from the `blockstack-cli` subcommand `docs`. This data file is consumed by the `_includes/commandline.md` file which is used to serve up the reference.
1. Install the latest version of the cli.
```
$ npm install -g https://github.com/blockstack/cli-blockstack
```
2. Generate the json for the cli in the `docs.blockstack1 repo.
```
$ blockstack-cli docs | python -m json.tool > _data/cliRef.json
```
3. Make sure the generated docs are clean.
# Technology Reference

8
_data/cliRef.json

@ -1083,6 +1083,12 @@
"type": "string",
"value": "private_key"
},
{
"format": "^([0-9a-f]{64,66})$|^([0-9]+),([0-9a-f]{64,66},)*([0-9a-f]{64,66})$|^segwit:p2sh:([0-9]+),([0-9a-f]{64,66},)*([0-9a-f]{64,66})$|^nosign:[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{1,35}$",
"name": "bitcoin_fee_key",
"type": "string",
"value": "private_key"
},
{
"format": "^.{0,34}$",
"name": "memo",
@ -1092,7 +1098,7 @@
],
"command": "send_tokens",
"group": "Account Management",
"usage": "Send a particular type of tokens to the given ADDRESS. Right now, only supported TOKEN-TYPE is \"STACKS\". Optionally include a memo string (MEMO) up to 34 characters long.\n\nIf the command succeeds, it prints out a transaction ID. You can track the confirmations on the transaction via the get_confirmations command. Once the transaction has 7 confirmations, the Blockstack peer network will have processed it, and your payment key balance and recipient balance will be updated.\n\nAt this time, token transfers are encoded as Bitcoin transactions. As such, you will need to pay a transaction fee in Bitcoin. Your payment key should have both a Bitcoin balance and a Stacks balance (you can check with the \"balance\" command).\n\nExample:\n\n $ # check balances of sender and recipient before sending.\n $ # address of the key below is SP2SC16ASH76GX549PT7J5WQZA4GHMFBKYMBQFF9V\n $ export PAYMENT=\"bfeffdf57f29b0cc1fab9ea197bb1413da2561fe4b83e962c7f02fbbe2b1cd5401\"\n $ blockstack-cli balance SP2SC16ASH76GX549PT7J5WQZA4GHMFBKYMBQFF9V\n {\n \"BTC\": \"125500\"\n \"STACKS\": \"10000000\"\n }\n $ blockstack-cli balance SP1P10PS2T517S4SQGZT5WNX8R00G1ECTRKYCPMHY\n {\n \"BTC\": \"0\"\n \"STACKS\": \"0\"\n }\n\n $ # send tokens\n $ blockstack-cli send_tokens SP1P10PS2T517S4SQGZT5WNX8R00G1ECTRKYCPMHY STACKS 12345 \"$PAYMENT\"\n a9d387a925fb0ba7a725fb1e11f2c3f1647473699dd5a147c312e6453d233456\n\n $ # wait 7 confirmations\n $ blockstack-cli get_confirmations a9d387a925fb0ba7a725fb1e11f2c3f1647473699dd5a147c312e6453d233456\n {\n \"blockHeight\": 567890,\n \"confirmations\": 7,\n }\n\n $ # check balance again. The recipient receives some dust to encode the Stacks transfer,\n $ # and the sender pays for the transaction fee.\n $ blockstack-cli balance SP2SC16ASH76GX549PT7J5WQZA4GHMFBKYMBQFF9V\n {\n \"BTC\": \"117000\"\n \"STACKS\": \"9987655\"\n }\n $ blockstack-cli balance SP1P10PS2T517S4SQGZT5WNX8R00G1ECTRKYCPMHY\n {\n \"BTC\": \"5500\"\n \"STACKS\": \"12345\"\n }\n\n"
"usage": "Send a particular type of tokens to the given ADDRESS. Right now, only supported TOKEN-TYPE is \"STACKS\". Optionally include a memo string (MEMO) up to 34 characters long.\n\nIf the command succeeds, it prints out a transaction ID. You can track the confirmations on the transaction via the get_confirmations command. Once the transaction has 7 confirmations, the Blockstack peer network will have processed it, and your payment key balance and recipient balance will be updated.\n\nAt this time, token transfers are encoded as Bitcoin transactions. As such, you will need to pay a transaction fee in Bitcoin. Your payment key should have both a Bitcoin balance and a Stacks balance (you can check with the \"balance\" command).\n\nExample:\n\n $ # check balances of sender and recipient before sending.\n $ # address of the key below is SP2SC16ASH76GX549PT7J5WQZA4GHMFBKYMBQFF9V\n $ export PAYMENT=\"bfeffdf57f29b0cc1fab9ea197bb1413da2561fe4b83e962c7f02fbbe2b1cd5401\"\n $ export BTC_PAYMENT=\"4be95a5987ec727c033aa48a3fb1dbadb750446c1c63a02707a0b1c28e7ec17801\"\n $ blockstack-cli balance SP2SC16ASH76GX549PT7J5WQZA4GHMFBKYMBQFF9V\n {\n \"BTC\": \"125500\"\n \"STACKS\": \"10000000\"\n }\n $ blockstack-cli balance SP1P10PS2T517S4SQGZT5WNX8R00G1ECTRKYCPMHY\n {\n \"BTC\": \"0\"\n \"STACKS\": \"0\"\n }\n\n $ # send tokens\n $ blockstack-cli send_tokens SP1P10PS2T517S4SQGZT5WNX8R00G1ECTRKYCPMHY STACKS 12345 \"$PAYMENT\" \"$BTC_PAYMENT\"\n a9d387a925fb0ba7a725fb1e11f2c3f1647473699dd5a147c312e6453d233456\n\n $ # wait 7 confirmations\n $ blockstack-cli get_confirmations a9d387a925fb0ba7a725fb1e11f2c3f1647473699dd5a147c312e6453d233456\n {\n \"blockHeight\": 567890,\n \"confirmations\": 7,\n }\n\n $ # check balance again. The recipient receives some dust to encode the Stacks transfer,\n $ # and the sender pays for the transaction fee.\n $ blockstack-cli balance SP2SC16ASH76GX549PT7J5WQZA4GHMFBKYMBQFF9V\n {\n \"BTC\": \"117000\"\n \"STACKS\": \"9987655\"\n }\n $ blockstack-cli balance SP1P10PS2T517S4SQGZT5WNX8R00G1ECTRKYCPMHY\n {\n \"BTC\": \"5500\"\n \"STACKS\": \"12345\"\n }\n\n"
},
{
"args": [

Loading…
Cancel
Save