3

AFAIU, copay's server implementation is bitcore-wallet-service.

From its README, I can deduce that a multi-sig wallet will use the /v1/txproposals/ endpoint to create a new transaction proposal that the other co-signers will receive.

But, if the wallet is not multi-sig, what's the endpoint for broadcasting a transaction?

6

Multisig and singlesig wallets use the same flow. A Tx proposal need to be created in singlesig wallets also. Copay syncronize across devices, so you can have a non-signing copayers in a 1-1 wallet that submit proposals, for later approval.

The flow is:

create => publish => sign => broadcast.

You can check the official client https://github.com/bitpay/bitcore-wallet-client for details, and also the CLI client should be useful to see examples: https://github.com/bitpay/bitcore-wallet

1

I think I should leave a comment with a small correction to the flow ematiu posted after 1 day trying to figure out why I couldn't sign my transaction.

the actual flow is: create => publish => get published => sign => broadcast.

this is because, in order to sign a transaction proposal we need a proposalSignature in the txProposal object. We only get this signature by fetching from the bws

Bitcore-wallet-client "Server response could not be verified"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.