-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: roles and multi sig #222
Conversation
zramsay
commented
Aug 11, 2017
- closes Add docs on multi-sig wallets (aka roles) #193
docs/guide/roles-and-multi-sig.md
Outdated
Next, we want to send coins _to_ that role. Notice that because this is the second transaction being sent by rich, we need to increase `--sequence` to `2`: | ||
|
||
``` | ||
basecli tx send --fee=90mycoin --amount=10000mycoin --to=role:"10CAFE4E" --sequence=2 --name=rich |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
role:10CAFE4E
works just as well as role:"10CAFE4E"
, do you find the second easier to read?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice document. I added two minor points if you wish to address them. I will merge soon as is or wih fixes, as you wish, as there is a push to rename, and I want to close PRs first.
docs/guide/roles-and-multi-sig.md
Outdated
basecli tx send --amount=6000mycoin --from=role:"10CAFE4E" --to=65D406E028319289A0706E294F3B764F44EBA3CF --sequence=1 --assume-role="10CAFE4E" --name=poor --multi --prepare=tx.json | ||
``` | ||
|
||
you'll be prompted for `poor`'s password and there won't be any `stdout` to the terminal. Note that the address in the `--to` flag matches the address of `poor`'s account from the beginning of the tutorial. The main output is the `tx.json` file that has just been created. In the above command, the `--assume-role` flag is used to (not clear, since we have --from), while the `--multi` flag is used in combination with `--prepare`, to specify the file that is prepared for a multi-sig transaction. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--from --to and --amount define the movement of money
you must explicitly say that you want to assume the role, rather than just signing it. imagine you are a member of a 1 or 10 account, would every tx you sign automatically have access to that other account?
the way the code works, the tx must explicitly state you are going to try to assume this role to evalate your permissions for this one transaction. does that make sense? can you explain it better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll do a bit of a re-write
docs/guide/roles-and-multi-sig.md
Outdated
} | ||
``` | ||
|
||
and voila! That's the basics for creating roles and sending multi-sig transactions. For 3 of 3, you'd repeat the last step for rich as well (recall that poor initiated the multi-sig transaction). We can check the balance of the role: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually the intermediate state would look like:
basecli tx --in=tx.json --name=igor --prepare=tx2.json
The prepare means to output it to disk rather than send it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will clarify 👍
cool. thanks for the notes to clarify. Will address within 24 hours. |
couple fixes addressed, should be good to go |