trader-xyz / nft-swap-sdk

Ethereum's missing p2p NFT and token swap library for web3 developers. Written in TypeScript. Powered by 0x.
https://swapsdk.xyz
MIT License
219 stars 83 forks source link

Question about flow of swapping #29

Closed jjohnson5253 closed 2 years ago

jjohnson5253 commented 2 years ago

So in the nft<>nft swap, signedOrder is used in part A and at the end of part B. Do we have to store signedOrder externally from part A's app and then have part B's app pull signedOrder? Is there no way to get the signed order through the SDK?

I would ask in Discord, but the link in the readme is broken I believe.

johnrjj commented 2 years ago

Hey! I think I answered your question over in Discord (here's the link for anyone who arrives on this issue.

For posterity: SignedOrders are stored off-chain, so they require some database peristance (whether that is local storage, postgres, a text file, some p2p database, or even on-chain if you really want.

For SwapSDK V4 we currently offer a hosted orderbook that solves the persistance problem. We hope to also support V3 soon too.