Atomic transfer project

Hi guys,

I am working on a POC.With following requirments

-Two accounts will get created and funded from Javascript code in the Algorand public network.
-Party A and B will have these accounts.
-An Asset will get created through Javascript and that will be assign to Party A account
-Party B will show interest to purchase the Asset.
-Party A will transfer the asset to Party B and the algorand will transfer from Party B to Party A account.

I want to use smart contract and Atomic transfer of Algorand.

If anyone has any similar kind of project could you please share the github link for the same.
Thank you!

There are a number of ways to do this but one way might be to use a smart sig to create an escrow account where A xfers the asset prior to the sale or delegate signature signed by party A with the appropriate logic to check the txn. Party B can sign the atomic txn using the logic for for the escrow or delegate sig and their private key and submit the atomic transaction to pay A and xfer asset to themselves

I’ll try that.
Do you have any git link or any use case similar to it that I can refer?

provided in discord for same asker/question :+1:

Yeah that worked thanks!