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

How to broadcast transaction following Daedalus transfer example? #879

Closed
mmo2112 opened this issue Aug 3, 2019 · 5 comments
Closed

How to broadcast transaction following Daedalus transfer example? #879

mmo2112 opened this issue Aug 3, 2019 · 5 comments

Comments

@mmo2112
Copy link

mmo2112 commented Aug 3, 2019

I've done with this example (daedalusTransfer.test.js), and have a json like that:
{"tx":{"inputs":[{"id":"000","index":0}],"outputs":[{"address":"AAA","value":99834159}]},"witness":[{"PkWitness":["123","456"]}]}
I have searched some few methods but not any useful, please help me to continue, thanks so much.

@SebastienGllmt
Copy link
Contributor

Look at app/api/ada/daedalusTransfer.js

To send a transaction you need access to a fullnode that will broadcast your transaction.

@SebastienGllmt
Copy link
Contributor

Note that we don't have any nice utility functions for sending Daedalus transactions in the Yoroi codebase because Yoroi doesn't support Daedalus wallets. Hopefully the above example is enough so that you understand the approach.

@mmo2112
Copy link
Author

mmo2112 commented Aug 4, 2019

Note that we don't have any nice utility functions for sending Daedalus transactions in the Yoroi codebase because Yoroi doesn't support Daedalus wallets.

I want to use function Transfer all funds from Daedalus like Yoroi front-end. I have read both your example and daedalusTransfer.js, switch to NodeJS to test. After txFinalizer.finalize(), the result is entropy/json format. I also have a full Cardano node, like other crypto (ex bitcoin, ethereum,...), it must have serialize method then broadcasting it on node, but I can't find anyway to serialize the result, same to broadcast on node (Cardano API doc doesn't have). Another repository on Git is adalite-go but seems not like your example. Thanks so much for your hard support.

@SebastienGllmt
Copy link
Contributor

@mmo2112
Copy link
Author

mmo2112 commented Aug 4, 2019

Again, thank you so much bro, I have done on broadcasting, issue is closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants