2

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?

knocte
  • 1,764
  • 1
  • 17
  • 32

2 Answers2

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

ematiu
  • 223
  • 2
  • 7
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"

pmcoelho
  • 21
  • 2