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

Method to check to see if a transaction can be reattached to the Tangle #38

Closed
todofixthis opened this issue Mar 28, 2017 · 4 comments
Closed

Comments

@todofixthis
Copy link
Contributor

todofixthis commented Mar 28, 2017

From https://github.com/iotaledger/iota.lib.js#isreattachable (with a few modifications):

isReattachable

This API function helps you to determine whether you should replay a transaction or make a completely new transaction with a different seed. What this function does, is it takes one or more input addresses (i.e. from spent transactions) as input and then checks whether any transactions with a value transferred are confirmed. If yes, it means that this input address has already been successfully used in a different transaction and as such you should no longer replay the transaction.

Input

api = Iota(...)
ir_result = api.is_reattachable(addresses)
  • addresses: Iterable[Address] input addresses from the transaction(s).

Returns

{'reattachable': List[bool]} — similar to getBalances, the result contains a list of booleans corresponding to the addresses that were provided in the request.

@todofixthis
Copy link
Contributor Author

This method is also really important for security because Winternitz signatures become exponentially less secure after each re-use.

@todofixthis todofixthis changed the title Method to check to see if an input has been spent Method to check to see if a transaction can be reattached to the Tangle Jun 30, 2017
@todofixthis
Copy link
Contributor Author

Note: In the latest version of the JS lib, this method was renamed to isReattachable and accepts multiple addresses now. I've updated the issue description.

@jinnerbichler
Copy link
Contributor

Opened a PR #108 :)

@todofixthis
Copy link
Contributor Author

Scheduled for release: 2.0.4

Thanks Johannes!!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants