docs/api: minor rephrasings
This commit is contained in:
parent
355cc01aee
commit
6f42433c57
10
docs/api.md
10
docs/api.md
|
@ -141,10 +141,10 @@ optional arguments:
|
||||||
## Code Management
|
## Code Management
|
||||||
|
|
||||||
Each wormhole connection is defined by a shared secret "wormhole code". These
|
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
|
codes can be created by humans offline (by picking a unique number and some
|
||||||
words), but are more commonly generated by whoever creates the first
|
secret words), but are more commonly generated by asking the library to make
|
||||||
wormhole. In the "bin/wormhole" file-transfer tool, the default behavior is
|
one. In the "bin/wormhole" file-transfer tool, the default behavior is for
|
||||||
for the sender to create the code, and for the receiver to type it in.
|
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
|
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
|
"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
|
* `w.allocate_code(length=2)`: this contacts the Rendezvous Server, allocates
|
||||||
a short numeric nameplate, chooses a configurable number of random words,
|
a short numeric nameplate, chooses a configurable number of random words,
|
||||||
then assembles them into the code
|
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,
|
* `helper = w.input_code()`: this facilitates interactive entry of the code,
|
||||||
with tab-completion. The helper object has methods to return a list of
|
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
|
viable completions for whatever portion of the code has been entered so
|
||||||
|
|
Loading…
Reference in New Issue
Block a user