Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return function broadcastBundle(
tailTransactionHash: Hash,
callback?: Callback>
): Promise> {
return Promise.resolve(validate(transactionHashValidator(tailTransactionHash)))
.then(() => getBundle(tailTransactionHash))
.then(asFinalTransactionTrytes)
.then(broadcastTransactions)
.asCallback(callback)
}
}
return function replayBundle(
tail: Hash,
depth: number,
minWeightMagnitude: number,
reference?: Hash,
callback?: Callback
): Promise {
return Promise.resolve(
validate(
transactionHashValidator(tail),
depthValidator(depth),
minWeightMagnitudeValidator(minWeightMagnitude)
)
)
.then(() => getBundle(tail))
.then(bundle => asFinalTransactionTrytes(bundle))
.then(trytes => sendTrytes(trytes, depth, minWeightMagnitude, reference))
.asCallback(typeof arguments[3] === 'function' ? arguments[3] : callback)
}
}