Buy

Allows you to buy an item from the marketplace. Address is optional if you already have an address associated with your account.

Fee

The fee is a percentage of the total price of the item. The fee is set by the person implementing the buy. The maximum fee is 10%.
import { mkt } from './config'

mkt.buy(
  {
    id: '<ITEM_MARKETPLACE_ID>',
    amount: 1n,
    mailingAddress: {
      name: "John Doe",
      phone: "+12024564545", // US or Canada phone number
      street1: "123 Main St",
      city: "Anytown",
      state: "CA",
      country: "USA",
      zip: "12345"
    },
    email: "[email protected]"
    fee: 300, // 3%
    feeRecipient: "0x123...",
  }
)