|
20 | 20 | __all__ = [ |
21 | 21 | 'ProposedBundle', |
22 | 22 | 'ProposedTransaction', |
| 23 | + 'Transfer', |
23 | 24 | ] |
24 | 25 |
|
25 | 26 |
|
@@ -80,40 +81,11 @@ def as_tryte_string(self): |
80 | 81 | return super(ProposedTransaction, self).as_tryte_string() |
81 | 82 |
|
82 | 83 |
|
83 | | -class Transfer(ProposedTransaction): |
84 | | - """ |
85 | | - Follow naming convention of other libs. |
86 | | - A transaction that has not yet been attached to the Tangle. |
87 | | -
|
88 | | - Provide to :py:meth:`iota.api.Iota.send_transfer` to attach to |
89 | | - tangle and publish/store. |
90 | | - """ |
91 | | - def __init__(self, address, value, tag=None, message=None, timestamp=None): |
92 | | - # type: (Address, int, Optional[Tag], Optional[TryteString], Optional[int]) -> None |
93 | | - if not timestamp: |
94 | | - timestamp = get_current_timestamp() |
95 | | - |
96 | | - super(ProposedTransaction, self).__init__( |
97 | | - address = address, |
98 | | - tag = Tag(b'') if tag is None else tag, |
99 | | - timestamp = timestamp, |
100 | | - value = value, |
101 | | - |
102 | | - # These values will be populated when the bundle is finalized. |
103 | | - bundle_hash = None, |
104 | | - current_index = None, |
105 | | - hash_ = None, |
106 | | - last_index = None, |
107 | | - signature_message_fragment = None, |
108 | | - |
109 | | - # These values start out empty; they will be populated when the |
110 | | - # node does PoW. |
111 | | - branch_transaction_hash = TransactionHash(b''), |
112 | | - nonce = Hash(b''), |
113 | | - trunk_transaction_hash = TransactionHash(b''), |
114 | | - ) |
115 | | - |
116 | | - self.message = TryteString(b'') if message is None else message |
| 84 | +Transfer = ProposedTransaction |
| 85 | +""" |
| 86 | +Follow naming convention of other libs. |
| 87 | +https://github.com/iotaledger/iota.lib.py/issues/72 |
| 88 | +""" |
117 | 89 |
|
118 | 90 |
|
119 | 91 | class ProposedBundle(Bundle, Sequence[ProposedTransaction]): |
|
0 commit comments