How to use the @iota/transaction.address function in @iota/transaction

To help you get started, we’ve selected a few @iota/transaction examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github iotaledger / iota.js / packages / account / src / preset.ts View on Github external
bundles.read().then(bundle =>
            Promise.resolve({ addresses: [tritsToTrytes(transactionAddress(bundle.slice(-TRANSACTION_LENGTH)))] })
                .then(findTransactions)
                .then(getTrytes)
                .then(pastAttachments =>
                    pastAttachments.filter(
                        trytes =>
                            tritsToTrytes(bundleHash(bundle)) ===
                            trytes.slice(
                                BUNDLE_OFFSET / TRYTE_WIDTH,
                                BUNDLE_OFFSET / TRYTE_WIDTH + BUNDLE_LENGTH / TRYTE_WIDTH
                            )
                    )
                )
                .then(pastAttachments =>
                    pastAttachments.map(trytes => tritsToTrytes(transactionHash(trytesToTrits(trytes))))
                )
                .then(pastAttachmentHashes =>