Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(utxo-bin): add new command convertTx #4017

Closed
wants to merge 6 commits into from

Conversation

OttoAllmendinger
Copy link
Contributor

  • feat(blockapis): add fetchPrevTxBuffers
  • feat(utxo-bin): use strict mode
  • feat(utxo-bin): add new command convertTx

@OttoAllmendinger OttoAllmendinger requested a review from a team as a code owner October 25, 2023 16:23
@OttoAllmendinger OttoAllmendinger changed the title BTC 428.convert psbt feat(blockapis): add fetchPrevTxBuffers feat(utxo-bin): use strict mode feat(utxo-bin): add new command convertTx Oct 25, 2023
@OttoAllmendinger OttoAllmendinger changed the title feat(blockapis): add fetchPrevTxBuffers feat(utxo-bin): use strict mode feat(utxo-bin): add new command convertTx feat(utxo-bin): add new command convertTx Oct 25, 2023
modules/utxo-bin/src/commands.ts Show resolved Hide resolved
modules/utxo-bin/src/convertTransaction.ts Outdated Show resolved Hide resolved
modules/utxo-bin/src/convertTransaction.ts Outdated Show resolved Hide resolved
This is a helper function that fetches the previous transaction buffers.

We are reusing Buffer references
Invalid commands produce an error message now.

Issue: BTC-428
Currently only supports converting from legacy or network to PSBT.

Issue: BTC-428
api: UtxoApi,
_network: utxolib.Network
): Promise<Buffer[]> {
return mapInputs(toOutPoints(ins), async (txid) => Buffer.from(await api.getTransactionHex(txid), 'hex'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's unusual seeing here an async function being passed this way, but I like it!

Copy link

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the stale label Dec 15, 2023
Copy link

This PR was closed because it has been stalled for 10 days with no activity.

@github-actions github-actions bot closed this Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants