nft-swap-sdk icon indicating copy to clipboard operation
nft-swap-sdk copied to clipboard

add react hooks and swap sdk provider

Open ErnestMironov opened this issue 3 years ago • 2 comments

List of React hooks:

  1. useCancelOrder return a method that takes as input: nonce orderType

  2. useCreateBasedOrder - creates an order of any NFT from a certain collection that the user has.

  3. useCreateOrder creates an order to buy an NFT, return a method that takes as input: collection address tokenId ERC20 address ERC20 amount

  4. useFullfillOrder - makes another user buy an NFT, with an order already created, takes as input: signedOrderObject

  5. useOrders - finds orders that match the passed parameters. Returns all orders or one specific order

  6. useQuickSwap - finds a corresponding order and executes a transaction

  7. useWallet - connects wallet, returns address and balance.

ErnestMironov avatar Aug 23 '22 15:08 ErnestMironov

Hey! I'm working on switching up the repo to support the react hooks

Definitely intend on landing this PR.

johnrjj avatar Sep 11 '22 06:09 johnrjj

Hey, I recommend create maybe a new repo only for the hooks, there are users that already have their custom hooks using same functionality. Only to keep bundle size minimal and easier to mantain.

JoaoCampos89 avatar Sep 28 '22 14:09 JoaoCampos89