Waves Escrow Smart Contract - Explanation - real world use

I have just gone through the Escrow tutorial but i have some questions on how to apply this in real world use case.
In the tutorial, you need the private key of all the 3 particpants i.e Buyer, Seller and Platform.

But if you are a platform or an e-commerce site, you are not going to have access to either the buyer or the sellers private key, so how are you going to get the Escrow smart contract to work?

I think this question also applies to the multi-sig implementation.

I am puzzled

Hello,
for real world use-case, there’re different participants and each one of them has access to their own private keys which they use to sign the transaction. Maybe you just missed understood the theoretical part of the use case because in the smart contract we’re going to encode the public keys not the private keys.

for multi-sig example, we used the encoded public key of the participants in our smart contract script not the private keys(we just got the private keys from seeds in order to sign the transactions in the java implementation)

Ok, Maybe i am missing the whole point ,then.

Can a tutorial be done that shows the whole flow? showing how the different users get the transaction to sign?

So for example, When the user comes to my site to purchase the item, i present the user with a payment page,right? I sign the transaction with my own website private key, but how do i send the transaction to the buyer to sign?

How do i send the transaction to the seller to sign? how does he get it? through his wallet?

I am new to this, though, so if you can direct me to the recommended docs or tutorial, I just need a complete walkthrough without any assumptions made.

Also, how does this work with the payment API?

Hi @nazim89

Any pointers?

The main idea is to use 2 of 3 Multi-Sig. So the transaction is valid only if it was signed by two or three users.
The sending and receiving procedure is done internally on the blockchain and through Waves Web API.

Here you can find more information about Escrow in General:
(http://www.jbonneau.com/doc/GBGN17-FC-physical_escrow.pdf)
(https://en.bitcoin.it/wiki/Contracts#Example_2:_Escrow_and_dispute_mediation)

And here you can find our payment API documentation:
(https://docs.wavesplatform.com/en/development-and-api/client-api/payments-api.html)

Hi,
I have been through all your documentations both on github and on your site. I have watched the youtube video, and i still don’t get it.

The video tutorial says that the transaction has to be sent to the other users , by copying out the transaction JSOn and sending it to them to sign, that will definitely not work for a regular user and my customers will never ever use that.

You said

I can;t find what you refer to as the Web API, can you send me a link?

I will like to implement this asap on a project but i cannot find enough documents to show me how to do this in the real world.

Also, all the tutorials still assume i will have access to the users private key which i wont as a third party, its just confusing

P.S
Please where is the link to the source code for the Payment API too, maybe i can contribute to it ,if its open source, i am just interested in making this easy to use and deploy for myself and other devs

Hi, here you can find some useful links:

  1. Main repo for the client is here Including payment and web auth api (https://github.com/wavesplatform/wavesGUI)
  2. Waves API (https://github.com/wavesplatform/waves-api) (https://docs.wavesplatform.com/en/development-and-api/waves-node-rest-api.html)
  3. Web API (https://docs.wavesplatform.com/en/development-and-api/client-api/auth-api.html)
  4. Waves Transactions (https://docs.wavesplatform.com/en/development-and-api/client-libraries/waves-transactions.html)

can you please explain more in details about your project so I can get a general understanding of it and see how we can help you to implement it on Waves?