To purchase a listed item, call the buyOrder method:

// Get valid orders for an NFT id (Multiple orders may exist for an ERC-1155 NFT)
const orders = await getSellOrders(
  network,
  '', // maker
  tokenAddress,
  tokenId
)
await buyOrder({
  network,
  signer: buyer, // Signer of the buyer
  order: orders[0], // Pass in the order you choose to buy from above.
})