mirror of
https://git.wownero.com/lza_menace/wownero-python.git
synced 2024-08-15 03:25:25 +00:00
Update .new_address() method to return subaddress index
This commit is contained in:
parent
6bf97ddca2
commit
c2af7acc31
8 changed files with 75 additions and 6 deletions
|
@ -6,6 +6,12 @@ Release Notes
|
|||
|
||||
With version 0.6 the package name on PyPi has changed from `monero-python` to just `monero`.
|
||||
|
||||
Backward-incompatible changes:
|
||||
|
||||
1. The ``.new_address()`` method of both ``Wallet`` and ``Account`` returns a 2-element tuple of
|
||||
(`subaddress`, `index`) where the additional element is the index of the subaddress within
|
||||
current account.
|
||||
|
||||
0.5
|
||||
---
|
||||
|
||||
|
|
|
@ -50,12 +50,13 @@ Creating accounts and addresses
|
|||
|
||||
Every wallet can have separate accounts and each account can have numerous
|
||||
addresses. The ``Wallet.new_account()`` and ``Account.new_address()`` will
|
||||
create new instances.
|
||||
create new instances, then return a tuple consisting of the subaddress itself,
|
||||
and the subaddress index within the account.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
In [9]: w.new_address()
|
||||
Out[9]: BenuGf8eyVhjZwdcxEJY1MHrUfqHjPvE3d7Pi4XY5vQz53VnVpB38bCBsf8AS5rJuZhuYrqdG9URc2eFoCNPwLXtLENT4R7
|
||||
Out[9]: (BenuGf8eyVhjZwdcxEJY1MHrUfqHjPvE3d7Pi4XY5vQz53VnVpB38bCBsf8AS5rJuZhuYrqdG9URc2eFoCNPwLXtLENT4R7, 1)
|
||||
|
||||
In [10]: w.get_addresses()
|
||||
Out[10]:
|
||||
|
@ -72,7 +73,7 @@ create new instances.
|
|||
Out[13]: Bhd3PRVCnq5T5jjNey2hDSM8DxUgFpNjLUrKAa2iYVhYX71RuCGTekDKZKXoJPAGL763kEXaDSAsvDYb8bV77YT7Jo19GKY
|
||||
|
||||
In [14]: w.accounts[1].new_address()
|
||||
Out[14]: Bbz5uCtnn3Gaj1YAizaHw1FPeJ6T7kk7uQoeY48SWjezEAyrWScozLxYbqGxsV5L6VJkvw5VwECAuLVJKQtHpA3GFXJNPYu
|
||||
Out[14]: (Bbz5uCtnn3Gaj1YAizaHw1FPeJ6T7kk7uQoeY48SWjezEAyrWScozLxYbqGxsV5L6VJkvw5VwECAuLVJKQtHpA3GFXJNPYu, 1)
|
||||
|
||||
In [15]: w.accounts[1].get_addresses()
|
||||
Out[15]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue