Before making offers, the signer must approve WETH spending by the X2Y2: Exchange contract.

To make an offer on an item, call the offer method:

await offer({
  signer: buyer, // Signer of the buyer
  isCollection: false, // bool, set true for collection offer
  tokenAddress, // string, contract address of NFT collection
  tokenId, // string, token ID of the NFT, use empty string for collection offer
  tokenStandard, // 'erc721' | 'erc1155'
  currency: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', // string, contract address of WETH
  price, // string, eg. '1000000000000000000' for 1 WETH
  expirationTime, // number, the unix timestamp when the listing will expire, in seconds

At present X2Y2 only supports making offers in WETH.

To make a collection offer, set isCollection to true and tokenId to an empty string.