TypeError: BigInt value can't be serialized in JSON #73
Unanswered
sir-stevie
asked this question in
Q&A
Replies: 1 comment 6 replies
-
|
Try using tx.hex as the data field when making the request to blockstream |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have created and signed a transaction using btc-signer library but when I try to broadcast it to blockstream test network I get the error, "TypeError: BigInt value can't be serialized in JSON" and I have no idea what to do at this point. I tried incorporating some custom method to convert the transaction object to a json object before broadcasting it but that didn't work, I got an error that said "sendrawtransaction RPC error: {"code":-22,"message":"TX decode failed. Make sure the tx has at least one input."}". The following is the relevant part of the code am using,
"
// get inputs
async getInputs(network, fromAddress, privateKey) {
try {
const newPrivateKey = base58.decode(privateKey).slice(1, 33);
Beta Was this translation helpful? Give feedback.
All reactions