docs/api: minor rephrasings

This commit is contained in:
Brian Warner 2018-05-28 23:42:04 -07:00
parent 355cc01aee
commit 6f42433c57

View File

@ -141,10 +141,10 @@ optional arguments:
## Code Management
Each wormhole connection is defined by a shared secret "wormhole code". These
codes can be generated offline (by picking a unique number and some secret
words), but are more commonly generated by whoever creates the first
wormhole. In the "bin/wormhole" file-transfer tool, the default behavior is
for the sender to create the code, and for the receiver to type it in.
codes can be created by humans offline (by picking a unique number and some
secret words), but are more commonly generated by asking the library to make
one. In the "bin/wormhole" file-transfer tool, the default behavior is for
the sender's program to create the code, and for the receiver to type it in.
The code is a (unicode) string in the form `NNN-code-words`. The numeric
"NNN" prefix is the "channel id" or "nameplate", and is a short integer
@ -161,7 +161,7 @@ The Wormhole object has three APIs for generating or accepting a code:
* `w.allocate_code(length=2)`: this contacts the Rendezvous Server, allocates
a short numeric nameplate, chooses a configurable number of random words,
then assembles them into the code
* `w.set_code(code)`: this accepts the code as an argument
* `w.set_code(code)`: this accepts the complete code as an argument
* `helper = w.input_code()`: this facilitates interactive entry of the code,
with tab-completion. The helper object has methods to return a list of
viable completions for whatever portion of the code has been entered so