NFT Trading SDK
Calling Methods

Calling Methods

Here is an example of how to call a method:

import { useWalletKit } from '@mysten/wallet-kit'
const { signAndExecuteTransaction } = useWalletKit()
const transaction = await suiTradingClient.buyListings({
  listingIds: [],
  walletAddress: '0x...'
await signAndExecuteTransaction({ transaction })

Note that the SDK method returns a Sui Transaction Block that you need to pass into the wallet signing method of whichever client library you are using. In this example, the signAndSendTransaction method is coming from the useWalletKit hook from @mysten/wallet-kit

The in the example above comes from our NFT Data API.

The walletAddress is the signer’s Sui wallet address.