-
Notifications
You must be signed in to change notification settings - Fork 330
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
script.toBytes() returning empty bytes #1796
Comments
if this is indeed a bug and not a misuse from my part, I offer help to fix 👍 |
You said you're using a port of BDK to typescript, which project is that? |
@Psycarlo please help me explain how we are using BDK in typescript in our project |
We are using bdk-rn |
Our app is crashing trying to build a transaction. transactionBuilder.addRecipient(script, amount) // TODO: crashing here Script is being created like this: const address = await new Address().create(recipient) // recipient is the address string
const script = await address.scriptPubKey() |
Silly me When I was building the transaction, I was not awaiting. transactionBuilder.feeAbsolute(fee) instead of await transactionBuilder.feeAbsolute(fee) |
@notmandatory it's happening on SatSigner. Here's where we're getting the issue: https://github.com/satsigner/satsigner/blob/7a928cd52d777568f6ee1a746ec7eb7be60ad3d9/apps/mobile/api/bdk.ts#L220 |
Describe the bug
The
toBytes()
method ofScript
is returning empty array on Signet.I am using a port of BDK to typescript.
To Reproduce
the
inputs
is an array ofTxIn
with the fieldssequence
,previousOutput
,witness
, but thesigScript
which is of typeScript
is returning empty bytes.Expected behavior
Get the input script as bytes or hex.
Build environment
Additional context
Signet
Thanks in advance 👍
The text was updated successfully, but these errors were encountered: