Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #183 from iotaledger/release/2.0.6
Browse files Browse the repository at this point in the history
Release/2.0.6
  • Loading branch information
todofixthis authored Jun 9, 2018
2 parents 08230b0 + 67741dc commit 3f452a6
Show file tree
Hide file tree
Showing 15 changed files with 1,043 additions and 542 deletions.
12 changes: 6 additions & 6 deletions docs/addresses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ Using the API
addresses = gna_result['addresses']
# Generate 1 address, starting with index 42:
gna_result = api.get_new_addresses(start=42)
gna_result = api.get_new_addresses(index=42)
addresses = gna_result['addresses']
# Find the first unused address, starting with index 86:
gna_result = api.get_new_addresses(start=86, count=None)
gna_result = api.get_new_addresses(index=86, count=None)
addresses = gna_result['addresses']
To generate addresses using the API, invoke its ``get_new_addresses``
method, using the following parameters:

- ``start: int``: The starting index (defaults to 0). This can be used
- ``index: int``: The starting index (defaults to 0). This can be used
to skip over addresses that have already been generated.
- ``count: Optional[int]``: The number of addresses to generate
(defaults to 1).
Expand All @@ -80,13 +80,13 @@ Using AddressGenerator
generator = AddressGenerator(b'SEED9GOES9HERE')
# Generate a list of addresses:
addresses = generator.get_addresses(start=0, count=5)
addresses = generator.get_addresses(index=0, count=5)
# Generate a list of addresses in reverse order:
addresses = generator.get_addresses(start=42, count=10, step=-1)
addresses = generator.get_addresses(index=42, count=10, step=-1)
# Create an iterator, advancing 5 indices each iteration.
iterator = generator.create_iterator(start=86, step=5)
iterator = generator.create_iterator(index=86, step=5)
for address in iterator:
...
Expand Down
2 changes: 1 addition & 1 deletion examples/send_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from iota import *

SEED1 = b"THESEEDOFTHEWALLETSENDINGGOESHERE999999999999999999999999999999999999999999999999"
ADDRESS_WITH_CHECKSUM_SECURITY_LEVEL_2 = b"RECEIVINGWALLETADDRESSGOESHERE9WITHCHECKSUMANDSECURITYLEVEL2999999999999999999999999999999"
ADDRESS_WITH_CHECKSUM_SECURITY_LEVEL_2 = b"RECEIVINGWALLETADDRESSGOESHERE9WITHCHECKSUMANDSECURITYLEVELB999999999999999999999999999999"

# Create the API instance.
api =\
Expand Down
Loading

0 comments on commit 3f452a6

Please sign in to comment.