Open vladikus10 opened 5 years ago
thanks for reporting the issue. The address must be a Uint8Array in the current code. This is not very user friendly from the API...
How would you feel, instead, to try the new API I've started in #41 ? I think it will be more straight forward and feedback from users would be really welcome.
Thanks for the reply,
How can I convert the the address to Uint8Array? I tried doing via Buffer
:
const toUint8Array = address => new Uint8Array(Buffer.from(address, 'utf-8'));
//Ae2tdPwUPEZ8d5Q2MEbU7tfGL9pF73A7zDb4ippdWPmKWseDPrh7GTYBvpo => [65,101,50,116,100,80,119,85,80,69,90,56,100,53,81,50,77,69,98,85,55,116,102,71,76,57,112,70,55,51,65,55,122,68,98,52,105,112,112,100,87,80,109,75,87,115,101,68,80,114,104,55,71,84,89,66,118,112,111]
But I still get the same error.
About the new API, I'm not quite sure what is the difference except the updated rust module.
I'm trying to build a transaction with the
Tx
object and when I try to add a new output:I receive this error:
I'm using Node 8.14.0 and rust-cardano-crypto ver 0.2.0 I also tried manually building from this repository with the same result.
Input seem to work just fine, the error is thrown only when trying to add a new output.