{"_id":"@aetherio/opensea-js","_rev":"1-4c7313392dcd05b6f232ab17b128ca4b","name":"@aetherio/opensea-js","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@aetherio/opensea-js","version":"1.0.0","description":"JavaScript SDK for the OpenSea marketplace. Let users buy or sell crypto collectibles and other cryptogoods, all on your own site!","license":"MIT","author":{"name":"OpenSea Developers"},"homepage":"https://docs.opensea.io/v1.0/reference","repository":{"type":"git","url":"git+https://github.com/ProjectOpenSea/opensea-js.git"},"bugs":{"url":"https://github.com/ProjectOpenSea/opensea-js/issues"},"main":"lib/index.js","scripts":{"abi-type-gen":"yarn run typechain --target=web3-v1 src/abi/*.json --out-dir=src/typechain/contracts","build":"yarn abi-type-gen && tsc","check-types":"tsc --noEmit --project tsconfig.json","coverage-report":"nyc report --reporter=text-lcov | coveralls","docs-build":"typedoc --out docs src/index.ts","eslint:check":"eslint . --max-warnings 0 --ext .js,.ts","lint:check":"concurrently \"yarn check-types\" \"yarn prettier:check\" \"yarn eslint:check\"","test":"TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' TS_NODE_TRANSPILE_ONLY=true nyc mocha -r ts-node/register src/__tests__/**/*.ts --timeout 15000","prettier:check":"prettier --check .","prettier:check:package.json":"yarn prettier-package-json --list-different","prettier:fix":"prettier --write ."},"types":"lib/index.d.ts","dependencies":{"bignumber.js":"9.0.1","ethereumjs-abi":"git+https://github.com/ProjectWyvern/ethereumjs-abi.git","ethereumjs-util":"^5.2.0","fbemitter":"2.1.1","isomorphic-unfetch":"^2.1.1","lodash":"^4.17.21","query-string":"^6.11.1","web3":"1.7.0","wyvern-js":"git+https://github.com/ProjectOpenSea/wyvern-js.git#7823dfdf5a272ebbc6a46e66d23563a9d6cc1be2","wyvern-schemas":"git+https://github.com/ProjectOpenSea/wyvern-schemas.git#0a8d569931ddb6faa6e96f5a60fa2f83f0a8750e"},"devDependencies":{"@typechain/web3-v1":"^5.0.0","@types/chai":"4.3.0","@types/fbemitter":"^2.0.32","@types/lodash":"^4.14.178","@types/mocha":"^9.0.0","@types/node":"^9.3.0","@types/query-string":"^6.1.0","@typescript-eslint/eslint-plugin":"^5.7.0","@typescript-eslint/parser":"^5.7.0","chai":"4.3.4","concurrently":"6.5.1","confusing-browser-globals":"^1.0.11","coveralls":"^3.1.1","eslint":"^8.4.1","eslint-config-prettier":"^8.3.0","eslint-import-resolver-typescript":"^2.5.0","eslint-plugin-import":"^2.25.3","eslint-plugin-jest":"^25.3.0","eslint-plugin-prettier":"^4.0.0","ethereum-types":"^3.6.0","husky":"7.0.4","lint-staged":"12.1.2","mocha":"^9.1.3","nyc":"^15.1.0","prettier":"2.5.1","prettier-package-json":"2.6.0","ts-node":"10.4.0","typechain":"^7.0.0","typedoc":"0.22.10","types-bn":"^0.0.1","types-ethereumjs-util":"0.0.8","typescript":"4.5.4"},"keywords":["collectibles","crypto","ethereum","javascript","marketplace","nft","node","non-fungible-tokens","project-opensea","sdk","smart-contracts"],"lint-staged":{"package.json":["prettier-package-json --write"],"**/*.{ts,tsx,js,jsx,html,md,mdx,yml,json}":["prettier --write"],"**/*.{ts,tsx,js,jsx}":["eslint --cache --fix"]},"gitHead":"21110140896bc9170811578444ea91a93c2ce394","_id":"@aetherio/opensea-js@1.0.0","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-5jdYb1QU09Pam+dV+8GUzfS4e43BwpyiSW09Sl/Z/bYr3CBZ3J9kEGKC7RN9vzmsI556a/t6g8j9Y2B8w2NaEA==","shasum":"6b046b2d3974227d8b6d8cd39b04d812acc62294","tarball":"https://registry.npmjs.org/@aetherio/opensea-js/-/opensea-js-1.0.0.tgz","fileCount":3,"unpackedSize":36881,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG4fC/ZPTli0rGKm3lW03Mw2M9QDFDxoZ2y0K25UNppbAiEAvjKWmPUJf/I70VdqEKVSso15FvMPGQip3xWinyUvT+c="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiVRdpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpf9g//YOzI2gbfUi9yHHLLmlBC6MjVQRSaOmegObKMZDNt0zhBLwqZ\r\nO+BqJhPD2Ohm690lBYOktM9rIndewq+1IwUq/3KgqZkz/7lzBoFzOCRqEQkn\r\nX4sguVkZdLdDeB79JxAoGDr49fGdD1qqapTWPS8vGWRuEmTk7FFstbngqws1\r\nmu6fH/v+1gUr3g15I89Zr5ow53J1n6ynxI6cRGAvLQZjHJ/eUJkKVdJO150T\r\nGM+YUCrWcyecIIr/4DHJoGy2BV3otPJ8gHZgcNJpT4dEHeRNEvtDI5LyOgIg\r\nsysOEgmlxlU08iDWlX4eohqvOWXDzOOTKcg7n357Glfbtjf16i2YhmuxwuEP\r\nNHgZb7hTqgylT596Zv3xH802fbyGVy7SPY4WO5d4T/fkz8lDaHq40oG/5ndo\r\nGaKbQm/FT7DYYYdFM0/+00fj1k0lSRUDLPbLm2OrZrtE00R/k0YksR5St9iD\r\n+i5qxNrWbyv4T6LjHrHPnrNGP1Gvg1eoFxdvrTbYvz7xS+gOz9RcNR7WrvoG\r\naEwuQll+56JhrIeYT17ihbMqwiAvOvIaEsrxos7vfU2up1W5JN676DejhkzY\r\nYRi4T51gzFyQno/03RcMBYJsUPUFqX03fWxalczx2gwASp1GPLyy/c7jft+N\r\n9sVMBiYrqltvTBlnuYqaVciSAdu+6X9aYsM=\r\n=/Dmo\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aetherio","email":"admin@aetherindustries.io"},"directories":{},"maintainers":[{"name":"aetherio","email":"admin@aetherindustries.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opensea-js_1.0.0_1649743720875_0.1849819700461992"},"_hasShrinkwrap":false},"1.0.1":{"name":"@aetherio/opensea-js","version":"1.0.1","description":"JavaScript SDK for the OpenSea marketplace. Let users buy or sell crypto collectibles and other cryptogoods, all on your own site!","license":"MIT","author":{"name":"OpenSea Developers"},"homepage":"https://docs.opensea.io/v1.0/reference","repository":{"type":"git","url":"git+https://github.com/ProjectOpenSea/opensea-js.git"},"bugs":{"url":"https://github.com/ProjectOpenSea/opensea-js/issues"},"main":"lib/index.js","scripts":{"abi-type-gen":"yarn run typechain --target=web3-v1 src/abi/*.json --out-dir=src/typechain/contracts","build":"yarn abi-type-gen && tsc","check-types":"tsc --noEmit --project tsconfig.json","coverage-report":"nyc report --reporter=text-lcov | coveralls","docs-build":"typedoc --out docs src/index.ts","eslint:check":"eslint . --max-warnings 0 --ext .js,.ts","lint:check":"concurrently \"yarn check-types\" \"yarn prettier:check\" \"yarn eslint:check\"","prepare":"husky install && npm run build","test":"TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' TS_NODE_TRANSPILE_ONLY=true nyc mocha -r ts-node/register src/__tests__/**/*.ts --timeout 15000","prettier:check":"prettier --check .","prettier:check:package.json":"yarn prettier-package-json --list-different","prettier:fix":"prettier --write ."},"types":"lib/index.d.ts","dependencies":{"bignumber.js":"9.0.1","ethereumjs-abi":"git+https://github.com/ProjectWyvern/ethereumjs-abi.git","ethereumjs-util":"^5.2.0","fbemitter":"2.1.1","isomorphic-unfetch":"^2.1.1","lodash":"^4.17.21","query-string":"^6.11.1","web3":"1.7.0","wyvern-js":"git+https://github.com/ProjectOpenSea/wyvern-js.git#7823dfdf5a272ebbc6a46e66d23563a9d6cc1be2","wyvern-schemas":"git+https://github.com/ProjectOpenSea/wyvern-schemas.git#0a8d569931ddb6faa6e96f5a60fa2f83f0a8750e"},"devDependencies":{"@typechain/web3-v1":"^5.0.0","@types/chai":"4.3.0","@types/fbemitter":"^2.0.32","@types/lodash":"^4.14.178","@types/mocha":"^9.0.0","@types/node":"^9.3.0","@types/query-string":"^6.1.0","@typescript-eslint/eslint-plugin":"^5.7.0","@typescript-eslint/parser":"^5.7.0","chai":"4.3.4","concurrently":"6.5.1","confusing-browser-globals":"^1.0.11","coveralls":"^3.1.1","eslint":"^8.4.1","eslint-config-prettier":"^8.3.0","eslint-import-resolver-typescript":"^2.5.0","eslint-plugin-import":"^2.25.3","eslint-plugin-jest":"^25.3.0","eslint-plugin-prettier":"^4.0.0","ethereum-types":"^3.6.0","husky":"7.0.4","lint-staged":"12.1.2","mocha":"^9.1.3","nyc":"^15.1.0","prettier":"2.5.1","prettier-package-json":"2.6.0","ts-node":"10.4.0","typechain":"^7.0.0","typedoc":"0.22.10","types-bn":"^0.0.1","types-ethereumjs-util":"0.0.8","typescript":"4.5.4"},"keywords":["collectibles","crypto","ethereum","javascript","marketplace","nft","node","non-fungible-tokens","project-opensea","sdk","smart-contracts"],"lint-staged":{"package.json":["prettier-package-json --write"],"**/*.{ts,tsx,js,jsx,html,md,mdx,yml,json}":["prettier --write"],"**/*.{ts,tsx,js,jsx}":["eslint --cache --fix"]},"gitHead":"21110140896bc9170811578444ea91a93c2ce394","_id":"@aetherio/opensea-js@1.0.1","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-7GzdH5+AW6i6XN9H+IlI8zsZrl5iPZ7Jlnq9Urndw7mcb5/Ht9lDkx5uTmwNS7PNQ7fCj+sDJyIYj//Twcbv+w==","shasum":"9137a5ec6081b4c925206cfb1ff4c20d8a33e0e7","tarball":"https://registry.npmjs.org/@aetherio/opensea-js/-/opensea-js-1.0.1.tgz","fileCount":141,"unpackedSize":1225218,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAeTQNd1nb8iO6HY/jmVw2aRlRJZosGMCqbQ0gAvf7AAAiEA6+BOHIUCLb6JTvughBOkwnntCbVITpcXEmBuht53/OA="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiVbxwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrWpA/+Mamt9m+GbkW5EZo8yuZhWXxBHtlCYd6WhBCULNwoTTiE1VGt\r\nS6n1lWprR5LPrQ6N/Mhp4QHO+72qlYci3H9wRin1QRcZQAYEWwVBe9Azhgu/\r\n9GscfCRpjAQoSGkcyt505Ew6kOqkzptw0/uWlyPCvF9mu47G8O2de/RgBAOI\r\nD1yoB2op1iSdiMm9L/Y1PWMJ1/QrQfrlAfPCgwcJp8wSvIrsHlileseUaybd\r\nCTmeyTtNLxPhqoNaRlfNBe4AYJA1Zb1SAbrshf8UPNoVqrFFcKFc3h/bUBqp\r\n/Kq2wsmr991X8Czr99hoWK3oFXP9HZDCN3SiTBnApFvYYLDxeNtprj2bkjkX\r\nL6sZ6/Wl9QQvYq9YtDsXhFkRAj1JW2bE5M41zgkaUTQaEaUuSmTBTe0i8Rr5\r\nBUV2ZlrNHoPlxhCH4yn5JpnDOIckF35SJFLB9XukgPOVIgY4HGO+slCtIoPg\r\nBGYnj57DcIQ7rJgforJ8Z1jPcJ5koahO3C09B2Pt7LZEWbfn1it90hrMEVBp\r\nTUvAF9EH8Nb5ZMQBVQNwTqVn5Vdzu0nXLbMSyVXCYm5bWJIM2ejA3dsh1IDe\r\nTtNIYyHdQjcnVH0iQ4tyIBVuncmAAom7alyy5hT3fZFRfR7NYwmBGDXhW745\r\nsY5FO85JI6zpzVsUPrQsNhSZu8DkuRaehsU=\r\n=LjXX\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aetherio","email":"admin@aetherindustries.io"},"directories":{},"maintainers":[{"name":"aetherio","email":"admin@aetherindustries.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opensea-js_1.0.1_1649785968494_0.8610027293877702"},"_hasShrinkwrap":false}},"time":{"created":"2022-04-12T06:08:40.791Z","1.0.0":"2022-04-12T06:08:40.993Z","modified":"2022-04-12T17:52:48.840Z","1.0.1":"2022-04-12T17:52:48.667Z"},"maintainers":[{"name":"aetherio","email":"admin@aetherindustries.io"}],"description":"JavaScript SDK for the OpenSea marketplace. Let users buy or sell crypto collectibles and other cryptogoods, all on your own site!","homepage":"https://docs.opensea.io/v1.0/reference","keywords":["collectibles","crypto","ethereum","javascript","marketplace","nft","node","non-fungible-tokens","project-opensea","sdk","smart-contracts"],"repository":{"type":"git","url":"git+https://github.com/ProjectOpenSea/opensea-js.git"},"author":{"name":"OpenSea Developers"},"bugs":{"url":"https://github.com/ProjectOpenSea/opensea-js/issues"},"license":"MIT","readme":"<p align=\"center\">\r\n  <img src=\"https://storage.googleapis.com/opensea-static/opensea-js-logo-updated.png\" />\r\n</p>\r\n\r\n# OpenSea.js <!-- omit in toc -->\r\n\r\n[![https://badges.frapsoft.com/os/mit/mit.svg?v=102](https://badges.frapsoft.com/os/mit/mit.svg?v=102)](https://opensource.org/licenses/MIT)\r\n[![Coverage Status](https://coveralls.io/repos/github/ProjectOpenSea/opensea-js/badge.svg?branch=master)](https://coveralls.io/github/ProjectOpenSea/opensea-js?branch=master)\r\n[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\r\n\r\n<!-- [![npm](https://img.shields.io/npm/v/wyvern-js.svg)](https://www.npmjs.com/package/wyvern-js) [![npm](https://img.shields.io/npm/dt/wyvern-js.svg)](https://www.npmjs.com/package/wyvern-js) -->\r\n\r\nA JavaScript library for crypto-native ecommerce: buying, selling, and bidding on any cryptogood. With OpenSea.js, you can easily build your own native marketplace for your non-fungible tokens, or NFTs. These can be ERC-721 or ERC-1155 (semi-fungible) items. You don't have to deploy your own smart contracts or backend orderbooks.\r\n\r\nPublished on [GitHub](https://github.com/ProjectOpenSea/opensea-js) and [npm](https://www.npmjs.com/package/opensea-js)\r\n\r\n- [Synopsis](#synopsis)\r\n- [Installation](#installation)\r\n- [Getting Started](#getting-started)\r\n  - [Fetching Assets](#fetching-assets)\r\n    - [Checking Balances and Ownerships](#checking-balances-and-ownerships)\r\n  - [Making Offers](#making-offers)\r\n    - [Bidding on Multiple Assets](#bidding-on-multiple-assets)\r\n    - [Bidding on ENS Short Name Auctions](#bidding-on-ens-short-name-auctions)\r\n    - [Offer Limits](#offer-limits)\r\n  - [Making Listings / Selling Items](#making-listings--selling-items)\r\n    - [Creating English Auctions](#creating-english-auctions)\r\n  - [Running Crowdsales](#running-crowdsales)\r\n  - [Fetching Orders](#fetching-orders)\r\n  - [Buying Items](#buying-items)\r\n  - [Accepting Offers](#accepting-offers)\r\n  - [Transferring Items or Coins (Gifting)](#transferring-items-or-coins-gifting)\r\n- [Advanced](#advanced)\r\n  - [Scheduling Future Listings](#scheduling-future-listings)\r\n  - [Purchasing Items for Other Users](#purchasing-items-for-other-users)\r\n  - [Bulk Transfers](#bulk-transfers)\r\n  - [Creating Bundles](#creating-bundles)\r\n  - [Using ERC-20 Tokens Instead of Ether](#using-erc-20-tokens-instead-of-ether)\r\n  - [Private Auctions](#private-auctions)\r\n  - [Sharing Sale Fees with OpenSea](#sharing-sale-fees-with-opensea)\r\n  - [Listening to Events](#listening-to-events)\r\n- [Learning More](#learning-more)\r\n  - [Example Code](#example-code)\r\n- [Migrating to version 1.0](#migrating-to-version-10)\r\n- [Development Information](#development-information)\r\n- [Diagnosing Common Issues](#diagnosing-common-issues)\r\n- [Testing your branch locally](#testing-your-branch-locally)\r\n\r\n## Synopsis\r\n\r\nThis is the JavaScript SDK for [OpenSea](https://opensea.io), the largest marketplace for NFTs.\r\n\r\nIt allows developers to access the official orderbook, filter it, create buy orders (**offers**), create sell orders (**auctions**), create collections of assets to sell at once (**bundles**), and complete trades programmatically.\r\n\r\nYou get started by [requesting an API key](https://docs.opensea.io/reference) and instantiating your own seaport. Then you can create orders off-chain or fulfill orders on-chain, and listen to events (like `ApproveAllAssets` or `WrapEth`) in the process.\r\n\r\nHappy seafaring! ⛵️\r\n\r\n## Installation\r\n\r\nWe recommend switching to Node.js version 16 to make sure common crypto dependencies work. Execute `nvm use`, if you have Node Version Manager.\r\n\r\nThen, in your project, run:\r\n\r\n```bash\r\nnpm install --save opensea-js\r\n```\r\n\r\nInstall [web3](https://github.com/ethereum/web3.js) too if you haven't already.\r\n\r\nIf you run into an error while building the dependencies and you're on a Mac, run this:\r\n\r\n```bash\r\nxcode-select --install # Install Command Line Tools if you haven't already.\r\nsudo xcode-select --switch /Library/Developer/CommandLineTools # Enable command line tools\r\nsudo npm explore npm -g -- npm install node-gyp@latest # (Optional) update node-gyp\r\n```\r\n\r\n## Getting Started\r\n\r\nTo get started, first request an API key [here](https://docs.opensea.io/reference). Note the terms of use for using API data.\r\n\r\nThen, create a new OpenSeaJS client, called an OpenSeaPort 🚢, using your Web3 provider:\r\n\r\n```JavaScript\r\nimport * as Web3 from 'web3'\r\nimport { OpenSeaPort, Network } from 'opensea-js'\r\n\r\n// This example provider won't let you make transactions, only read-only calls:\r\nconst provider = new Web3.providers.HttpProvider('https://mainnet.infura.io')\r\n\r\nconst seaport = new OpenSeaPort(provider, {\r\n  networkName: Network.Main,\r\n  apiKey: YOUR_API_KEY\r\n})\r\n```\r\n\r\n**NOTE:** Using the sample Infura provider above won't let you authorize transactions, which are needed when approving and trading assets and currency. To make transactions, you need a provider with a private key or mnemonic set.\r\n\r\nIn a browser with web3 or an extension like [MetaMask](https://metamask.io/) or [Dapper](http://www.meetdapper.com/), you can use `window.ethereum` (or `window.web3.currentProvider` for legacy mobile web3 browsers) to access the native provider. In a Node.js script, you can follow [this example](https://github.com/ProjectOpenSea/opensea-creatures/blob/master/scripts/sell.js) to use a custom mnemonic.\r\n\r\n### Fetching Assets\r\n\r\nAssets are items on OpenSea. They can be non-fungible (conforming to standards like ERC721), semi-fungible (like ERC1155 assets), and even fungible (ERC20).\r\n\r\nAssets are represented by the `Asset` type, defined in TypeScript:\r\n\r\n```TypeScript\r\n/**\r\n * Simple, unannotated non-fungible asset spec\r\n */\r\nexport interface Asset {\r\n  // The asset's token ID, or null if ERC-20\r\n  tokenId: string | null,\r\n  // The asset's contract address\r\n  tokenAddress: string,\r\n  // The Wyvern schema name (defaults to \"ERC721\") for this asset\r\n  schemaName?: WyvernSchemaName,\r\n  // Optional for ENS names\r\n  name?: string,\r\n  // Optional for fungible items\r\n  decimals?: number\r\n}\r\n```\r\n\r\nThe `Asset` type is the minimal type you need for most marketplace actions. `WyvernSchemaName` is optional. If omitted, most actions will assume you're referring to a non-fungible, ERC721 asset. Other options include 'ERC20' and 'ERC1155'. You can import `import { WyvernSchemaName } from \"opensea-js/lib/types\"` to get the full range of schemas supported.\r\n\r\nYou can fetch an asset using the `OpenSeaAPI`, which will return an `OpenSeaAsset` for you (`OpenSeaAsset` extends `Asset`):\r\n\r\n```TypeScript\r\nconst asset: OpenSeaAsset = await seaport.api.getAsset({\r\n  tokenAddress, // string\r\n  tokenId, // string | number | null\r\n})\r\n```\r\n\r\nNote that fungible ERC20 assets have `null` as their token id.\r\n\r\n#### Checking Balances and Ownerships\r\n\r\nThe nice thing about the `Asset` type is that it unifies logic between fungibles, non-fungibles, and semi-fungibles.\r\n\r\nOnce you have an `Asset`, you can see how many any account owns, regardless of whether it's an ERC-20 token or a non-fungible good:\r\n\r\n```JavaScript\r\n\r\nconst asset = {\r\n  tokenAddress: \"0x06012c8cf97bead5deae237070f9587f8e7a266d\", // CryptoKitties\r\n  tokenId: \"1\", // Token ID\r\n}\r\n\r\nconst balance = await seaport.getAssetBalance({\r\n  accountAddress, // string\r\n  asset, // Asset\r\n})\r\n\r\nconst ownsKitty = balance.greaterThan(0)\r\n```\r\n\r\nYou can use this same method for fungible ERC-20 tokens like wrapped ETH (WETH). As a convenience, you can use this fungible wrapper for checking fungible balances:\r\n\r\n```JavaScript\r\nconst balanceOfWETH = await seaport.getTokenBalance({\r\n  accountAddress, // string\r\n  tokenAddress: \"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2\"\r\n})\r\n```\r\n\r\n### Making Offers\r\n\r\nOnce you have your asset, you can do this to make an offer on it:\r\n\r\n```JavaScript\r\n// Token ID and smart contract address for a non-fungible token:\r\nconst { tokenId, tokenAddress } = YOUR_ASSET\r\n// The offerer's wallet address:\r\nconst accountAddress = \"0x1234...\"\r\n\r\nconst offer = await seaport.createBuyOrder({\r\n  asset: {\r\n    tokenId,\r\n    tokenAddress,\r\n    schemaName // WyvernSchemaName. If omitted, defaults to 'ERC721'. Other options include 'ERC20' and 'ERC1155'\r\n  },\r\n  accountAddress,\r\n  // Value of the offer, in units of the payment token (or wrapped ETH if none is specified):\r\n  startAmount: 1.2,\r\n})\r\n```\r\n\r\nWhen you make an offer on an item owned by an OpenSea user, **that user will automatically get an email notifying them with the offer amount**, if it's above their desired threshold.\r\n\r\n#### Bidding on Multiple Assets\r\n\r\nYou can also make an offer on a bundle of assets. This could also be used for creating a bounty for whoever can acquire a list of items. Here's how you do it:\r\n\r\n```JavaScript\r\nconst assets = YOUR_ASSETS\r\nconst offer = await seaport.createBundleBuyOrder({\r\n  assets,\r\n  accountAddress,\r\n  startAmount: 2.4,\r\n  // Optional expiration time for the order, in Unix time (seconds):\r\n  expirationTime: Math.round(Date.now() / 1000 + 60 * 60 * 24) // One day from now\r\n})\r\n```\r\n\r\nWhen you bid on multiple assets, an email will be sent to the owner if a bundle exists on OpenSea that contains the assets. In the future, OpenSea will send emails to multiple owners if the assets aren't all owned by the same wallet.\r\n\r\n#### Bidding on ENS Short Name Auctions\r\n\r\nThe Ethereum Name Service (ENS) is auctioning short (3-6 character) names that can be used for labeling wallet addresses and more. Learn more on the [ENS FAQ](https://opensea.io/ens).\r\n\r\nTo bid, you must use the ENS Short Name schema:\r\n\r\n```JavaScript\r\nconst {\r\n  tokenId,\r\n  // Token address should be `0xfac7bea255a6990f749363002136af6556b31e04` on mainnet\r\n  tokenAddress,\r\n  // Name must have `.eth` at the end and correspond with the tokenId\r\n  name\r\n} = ENS_ASSET // You can get an ENS asset from `seaport.api.getAsset(...)`\r\n\r\nconst offer = await seaport.createBuyOrder({\r\n  asset: {\r\n    tokenId,\r\n    tokenAddress,\r\n    name,\r\n    // Only needed for the short-name auction, not ENS names\r\n    // that have been sold once already:\r\n    schemaName: \"ENSShortNameAuction\"\r\n  },\r\n  // Your wallet address (the bidder's address):\r\n  accountAddress: \"0x1234...\"\r\n  // Value of the offer, in wrapped ETH:\r\n  startAmount: 1.2,\r\n})\r\n```\r\n\r\n#### Offer Limits\r\n\r\nNote: The total value of buy orders must not exceed 1000 x wallet balance.\r\n\r\n### Making Listings / Selling Items\r\n\r\nTo sell an asset, call `createSellOrder`. You can do a fixed-price listing, where `startAmount` is equal to `endAmount`, or a declining [Dutch auction](https://en.wikipedia.org/wiki/Dutch_auction), where `endAmount` is lower and the price declines until `expirationTime` is hit:\r\n\r\n```JavaScript\r\n// Expire this auction one day from now.\r\n// Note that we convert from the JavaScript timestamp (milliseconds):\r\nconst expirationTime = Math.round(Date.now() / 1000 + 60 * 60 * 24)\r\n\r\nconst listing = await seaport.createSellOrder({\r\n  asset: {\r\n    tokenId,\r\n    tokenAddress,\r\n  },\r\n  accountAddress,\r\n  startAmount: 3,\r\n  // If `endAmount` is specified, the order will decline in value to that amount until `expirationTime`. Otherwise, it's a fixed-price order:\r\n  endAmount: 0.1,\r\n  expirationTime\r\n})\r\n```\r\n\r\nThe units for `startAmount` and `endAmount` are Ether, ETH. If you want to specify another ERC-20 token to use, see [Using ERC-20 Tokens Instead of Ether](#using-erc-20-tokens-instead-of-ether).\r\n\r\nSee [Listening to Events](#listening-to-events) to respond to the setup transactions that occur the first time a user sells an item.\r\n\r\n#### Creating English Auctions\r\n\r\nEnglish Auctions are auctions that start at a small amount (we recommend even doing 0!) and increase with every bid. At expiration time, the item sells to the highest bidder.\r\n\r\nTo create an English Auction, create a listing that waits for the highest bid by setting `waitForHighestBid` to `true`:\r\n\r\n```JavaScript\r\n\r\n// Create an auction to receive Wrapped Ether (WETH). See note below.\r\nconst paymentTokenAddress = \"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2\"\r\n\r\nconst startAmount = 0 // The minimum amount to sell for, in normal units (e.g. ETH)\r\n\r\nconst auction = await seaport.createSellOrder({\r\n  asset: {\r\n    tokenId,\r\n    tokenAddress,\r\n  },\r\n  accountAddress,\r\n  startAmount,\r\n  expirationTime,\r\n  paymentTokenAddress,\r\n  waitForHighestBid: true\r\n})\r\n```\r\n\r\nNote that auctions aren't supported with Ether directly due to limitations in Ethereum, so you have to use an ERC20 token, like Wrapped Ether (WETH), a stablecoin like DAI, etc. See [Using ERC-20 Tokens Instead of Ether](#using-erc-20-tokens-instead-of-ether) for more info.\r\n\r\n### Running Crowdsales\r\n\r\nYou can now sell items to users **without having to pay gas to mint them**!\r\n\r\nTo create a presale or crowdsale and create batches of sell orders for a single asset factory, first follow the [tutorial](https://docs.opensea.io/docs/opensea-initial-item-sale-tutorial) for creating your crowdsale contract.\r\n\r\nThen call `createFactorySellOrders` with your factory contract address and asset option identifier, and set `numberOfOrders` to the number of assets you'd like to let users buy and mint:\r\n\r\n```JavaScript\r\n// Expire these auctions one day from now\r\nconst expirationTime = Math.round(Date.now() / 1000 + 60 * 60 * 24)\r\n\r\nconst sellOrders = await seaport.createFactorySellOrders({\r\n  assetId: ASSET_OPTION_ID,\r\n  factoryAddress: FACTORY_CONTRACT_ADDRESS,\r\n  accountAddress,\r\n  startAmount,\r\n  endAmount,\r\n  expirationTime,\r\n  // Will create 100 sell orders in parallel batches of 10, to speed things up:\r\n  numberOfOrders: 100\r\n})\r\n```\r\n\r\nHere's an [example script](https://github.com/ProjectOpenSea/opensea-creatures/blob/master/scripts/sell.js) you can use to mint items.\r\n\r\n**NOTE:** If `numberOfOrders` is greater than 5, we will automatically batch them in groups of 5 so you can post orders in parallel. Requires an `apiKey` to be set during seaport initialization in order to not be throttled by the API.\r\n\r\nGames using this method include [Coins & Steel](https://opensea.io/assets/coins&steelfounderssale) and a couple in stealth :) If you have questions or want support, contact us at contact@opensea.io (or in [Discord](https://discord.gg/ga8EJbv)).\r\n\r\n### Fetching Orders\r\n\r\nTo retrieve a list of offers and auction on an asset, you can use an instance of the `OpenSeaAPI` exposed on the client. Parameters passed into API filter objects are underscored instead of camel-cased, similar to the main [OpenSea API parameters](https://docs.opensea.io/v1.0/reference):\r\n\r\n```JavaScript\r\nimport { OrderSide } from 'opensea-js/lib/types'\r\n\r\n// Get offers (bids), a.k.a. orders where `side == 0`\r\nconst { orders, count } = await seaport.api.getOrders({\r\n  asset_contract_address: tokenAddress,\r\n  token_id: token_id,\r\n  side: OrderSide.Buy\r\n})\r\n\r\n// Get page 2 of all auctions, a.k.a. orders where `side == 1`\r\nconst { orders, count } = await seaport.api.getOrders({\r\n  asset_contract_address: tokenAddress,\r\n  token_id: token_id,\r\n  side: OrderSide.Sell\r\n}, 2)\r\n```\r\n\r\nNote that the listing price of an asset is equal to the `currentPrice` of the **lowest valid sell order** on the asset. Users can lower their listing price without invalidating previous sell orders, so all get shipped down until they're canceled, or one is fulfilled.\r\n\r\nTo learn more about signatures, makers, takers, listingTime vs createdTime and other kinds of order terminology, please read the [**Terminology Section**](https://docs.opensea.io/reference#terminology) of the API Docs.\r\n\r\nThe available API filters for the orders endpoint is documented in the `OrderJSON` interface below, but see the main [API Docs](https://docs.opensea.io/reference#reference-getting-started) for a playground, along with more up-to-date and detailed explanantions.\r\n\r\n```TypeScript\r\n/**\r\n   * Attrs used by orderbook to make queries easier\r\n   * More to come soon!\r\n   */\r\n  maker?: string, // Address of the order's creator\r\n  taker?: string, // The null address if anyone is allowed to take the order\r\n  side?: OrderSide, // 0 for offers, 1 for auctions\r\n  owner?: string, // Address of owner of the order's asset\r\n  sale_kind?: SaleKind, // 0 for fixed-price, 1 for Dutch auctions\r\n  asset_contract_address?: string, // Contract address for order's asset\r\n  token_id?: number | string,\r\n  token_ids?: Array<number | string>,\r\n  listed_after?: number | string, // This means listing_time > value in seconds\r\n  listed_before?: number | string, // This means listing_time <= value in seconds\r\n\r\n  // For pagination\r\n  limit?: number,\r\n  offset?: number,\r\n```\r\n\r\n### Buying Items\r\n\r\nTo buy an item , you need to **fulfill a sell order**. To do that, it's just one call:\r\n\r\n```JavaScript\r\nconst order = await seaport.api.getOrder({ side: OrderSide.Sell, ... })\r\nconst accountAddress = \"0x...\" // The buyer's wallet address, also the taker\r\nconst transactionHash = await this.props.seaport.fulfillOrder({ order, accountAddress })\r\n```\r\n\r\nNote that the `fulfillOrder` promise resolves when the transaction has been confirmed and mined to the blockchain. To get the transaction hash before this happens, add an event listener (see [Listening to Events](#listening-to-events)) for the `TransactionCreated` event.\r\n\r\nIf the order is a sell order (`order.side === OrderSide.Sell`), the taker is the _buyer_ and this will prompt the buyer to pay for the item(s).\r\n\r\n### Accepting Offers\r\n\r\nSimilar to fulfilling sell orders above, you need to fulfill a buy order on an item you own to receive the tokens in the offer.\r\n\r\n```JavaScript\r\nconst order = await seaport.api.getOrder({ side: OrderSide.Buy, ... })\r\nconst accountAddress = \"0x...\" // The owner's wallet address, also the taker\r\nawait this.props.seaport.fulfillOrder({ order, accountAddress })\r\n```\r\n\r\nIf the order is a buy order (`order.side === OrderSide.Buy`), then the taker is the _owner_ and this will prompt the owner to exchange their item(s) for whatever is being offered in return. See [Listening to Events](#listening-to-events) below to respond to the setup transactions that occur the first time a user accepts a bid.\r\n\r\n### Transferring Items or Coins (Gifting)\r\n\r\nA handy feature in OpenSea.js is the ability to transfer any supported asset (fungible or non-fungible tokens) in one line of JavaScript.\r\n\r\nTo transfer an ERC-721 asset or an ERC-1155 asset, it's just one call:\r\n\r\n```JavaScript\r\n\r\nconst transactionHash = await seaport.transfer({\r\n  asset: { tokenId, tokenAddress },\r\n  fromAddress, // Must own the asset\r\n  toAddress\r\n})\r\n```\r\n\r\nFor fungible ERC-1155 assets, you can set `schemaName` to \"ERC1155\" and pass a `quantity` in to transfer multiple at once:\r\n\r\n```JavaScript\r\n\r\nconst transactionHash = await seaport.transfer({\r\n  asset: {\r\n    tokenId,\r\n    tokenAddress,\r\n    schemaName: \"ERC1155\"\r\n  },\r\n  fromAddress, // Must own the asset\r\n  toAddress,\r\n  quantity: 2,\r\n})\r\n```\r\n\r\nTo transfer fungible assets without token IDs, like ERC20 tokens, you can pass in an `OpenSeaFungibleToken` as the `asset`, set `schemaName` to \"ERC20\", and include `quantity` in base units (e.g. wei) to indicate how many.\r\n\r\nExample for transfering 2 DAI ($2) to another address:\r\n\r\n```JavaScript\r\nconst paymentToken = (await seaport.api.getPaymentTokens({ symbol: 'DAI'})).tokens[0]\r\nconst quantity = new BigNumber(Math.pow(10, paymentToken.decimals)).times(2)\r\nconst transactionHash = await seaport.transfer({\r\n  asset: {\r\n    tokenId: null,\r\n    tokenAddress: paymentToken.address,\r\n    schemaName: \"ERC20\"\r\n  },\r\n  fromAddress, // Must own the tokens\r\n  toAddress,\r\n  quantity\r\n})\r\n```\r\n\r\nFor more information, check out the documentation for WyvernSchemas on https://projectopensea.github.io/opensea-js/.\r\n\r\n## Advanced\r\n\r\nInterested in purchasing for users server-side or with a bot, making bundling items together, scheduling future orders, or making bids in different ERC-20 tokens? OpenSea.js can help with that.\r\n\r\n### Scheduling Future Listings\r\n\r\nYou can create sell orders that aren't fulfillable until a future date. Just pass in a `listingTime` (a UTC timestamp in seconds) to your seaport instance:\r\n\r\n```JavaScript\r\nconst auction = await seaport.createSellOrder({\r\n  tokenAddress,\r\n  tokenId,\r\n  accountAddress,\r\n  startAmount: 1,\r\n  listingTime: Math.round(Date.now() / 1000 + 60 * 60 * 24) // One day from now\r\n})\r\n```\r\n\r\n### Purchasing Items for Other Users\r\n\r\nYou can buy and transfer an item to someone else in one step! Just pass the `recipientAddress` parameter:\r\n\r\n```JavaScript\r\nconst order = await seaport.api.getOrder({ side: OrderSide.Sell, ... })\r\nawait this.props.seaport.fulfillOrder({\r\n  order,\r\n  accountAddress, // The address of your wallet, which will sign the transaction\r\n  recipientAddress // The address of the recipient, i.e. the wallet you're purchasing on behalf of\r\n})\r\n```\r\n\r\nIf the order is a sell order (`order.side === OrderSide.Sell`), the taker is the _buyer_ and this will prompt the buyer to pay for the item(s) but send them to the `recipientAddress`. If the order is a buy order ( `OrderSide.Buy`), the taker is the _seller_ but the bid amount be sent to the `recipientAddress`.\r\n\r\n### Bulk Transfers\r\n\r\nA handy feature in OpenSea.js is the ability to transfer multiple items at once in a single transaction. This works by grouping together as many `transferFrom` calls as the Ethereum gas limit allows, which is usually under 30 items, for most item contracts.\r\n\r\nTo make a bulk transfer, it's just one call:\r\n\r\n```JavaScript\r\nconst assets: Array<{tokenId: string; tokenAddress: string}> = [...]\r\n\r\nconst transactionHash = await seaport.transferAll({\r\n  assets,\r\n  fromAddress, // Must own all the assets\r\n  toAddress\r\n})\r\n```\r\n\r\nThis will automatically approve the assets for trading and confirm the transaction for sending them.\r\n\r\n### Creating Bundles\r\n\r\nYou can also create bundles of assets to sell at the same time! If the owner has approved all the assets in the bundle already, only a signature is needed to create it.\r\n\r\nTo make a bundle, it's just one call:\r\n\r\n```JavaScript\r\nconst assets: Array<{tokenId: string; tokenAddress: string}> = [...]\r\n\r\nconst bundle = await seaport.createBundleSellOrder({\r\n  bundleName, bundleDescription, bundleExternalLink,\r\n  assets, accountAddress, startAmount, endAmount,\r\n  expirationTime, paymentTokenAddress\r\n})\r\n```\r\n\r\nThe parameters `bundleDescription`, `bundleExternalLink`, and `expirationTime` are optional, and `endAmount` can equal `startAmount`, similar to the normal `createSellOrder` functionality.\r\n\r\nThe parameter `paymentTokenAddress` is the address of the ERC-20 token to accept in return. If it's `undefined` or `null`, the amount is assumed to be in Ether.\r\n\r\nWait what, you can use other currencies than ETH?\r\n\r\n### Using ERC-20 Tokens Instead of Ether\r\n\r\nHere's an example of listing the Genesis CryptoKitty for $100! No more needing to worry about the exchange rate:\r\n\r\n```JavaScript\r\n// Token address for the DAI stablecoin, which is pegged to $1 USD\r\nconst paymentTokenAddress = \"0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359\"\r\n\r\n// The units for `startAmount` and `endAmount` are now in DAI, so $100 USD\r\nconst auction = await seaport.createSellOrder({\r\n  tokenAddress: \"0x06012c8cf97bead5deae237070f9587f8e7a266d\", // CryptoKitties\r\n  tokenId: \"1\", // Token ID\r\n  accountAddress: OWNERS_WALLET_ADDRESS,\r\n  startAmount: 100,\r\n  paymentTokenAddress\r\n})\r\n```\r\n\r\nYou can use `getPaymentTokens` to search for tokens by symbol name. And you can even list all orders for a specific ERC-20 token by querying the API:\r\n\r\n```JavaScript\r\nconst token = (await seaport.api.getPaymentTokens({ symbol: 'MANA'})).tokens[0]\r\n\r\nconst order = await seaport.api.getOrders({\r\n  side: OrderSide.Sell,\r\n  payment_token_address: token.address\r\n})\r\n```\r\n\r\n**Fun note:** soon, all ERC-20 tokens will be allowed! This will mean you can create crazy offers on crypto collectibles **using your own ERC-20 token**. However, opensea.io will only display offers and auctions in ERC-20 tokens that it knows about, optimizing the user experience of order takers. Orders made with the following tokens will be shown on OpenSea:\r\n\r\n- MANA, Decentraland's currency: https://etherscan.io/token/0x0f5d2fb29fb7d3cfee444a200298f468908cc942\r\n- DAI, Maker's stablecoin, pegged to $1 USD: https://etherscan.io/token/0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359\r\n- And tons more! See the \"Currencies\" list in the sidebar on https://opensea.io/assets for a full list, or contact us to add yours: [Discord](https://discord.gg/ga8EJbv)\r\n\r\n### Private Auctions\r\n\r\nNow you can make auctions and listings that can only be fulfilled by an address or email of your choosing. This allows you to negotiate a price in some channel and sell for your chosen price on OpenSea, **without having to trust that the counterparty will abide by your terms!**\r\n\r\nHere's an example of listing a Decentraland parcel for 10 ETH with a specific buyer address allowed to take it. No more needing to worry about whether they'll give you enough back!\r\n\r\n```JavaScript\r\n// Address allowed to buy from you\r\nconst buyerAddress = \"0x123...\"\r\n\r\nconst listing = await seaport.createSellOrder({\r\n  tokenAddress: \"0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d\", // Decentraland\r\n  tokenId: \"115792089237316195423570985008687907832853042650384256231655107562007036952461\", // Token ID\r\n  accountAddress: OWNERS_WALLET_ADDRESS,\r\n  startAmount: 10,\r\n  buyerAddress\r\n})\r\n```\r\n\r\n### Sharing Sale Fees with OpenSea\r\n\r\nWe share fees for successful sales with game developers, relayers, and affiliates using the OpenSea orderbook. Developers can customize the fee amount to apply to buyers and/or sellers.\r\n\r\nSee [Affiliate Program](#affiliate-program) above for how to register referrers for sales.\r\n\r\nMore information will appear here when our redesigned affiliate program is ready. In the meantime, contact us at contact@opensea.io (or in [Discord](https://discord.gg/ga8EJbv)), or use our legacy affiliate program at https://opensea.io/account#referrals.\r\n\r\n### Listening to Events\r\n\r\nEvents are fired whenever transactions or orders are being created, and when transactions return receipts from recently mined blocks on the Ethereum blockchain.\r\n\r\nOur recommendation is that you \"forward\" OpenSea events to your own store or state management system. Here's an example of doing that with a Redux action:\r\n\r\n```JavaScript\r\nimport { EventType } from 'opensea-js'\r\nimport * as ActionTypes from './index'\r\nimport { openSeaPort } from '../globalSingletons'\r\n\r\n// ...\r\n\r\nhandleSeaportEvents() {\r\n  return async function(dispatch, getState) {\r\n    openSeaPort.addListener(EventType.TransactionCreated, ({ transactionHash, event }) => {\r\n      console.info({ transactionHash, event })\r\n      dispatch({ type: ActionTypes.SET_PENDING_TRANSACTION_HASH, hash: transactionHash })\r\n    })\r\n    openSeaPort.addListener(EventType.TransactionConfirmed, ({ transactionHash, event }) => {\r\n      console.info({ transactionHash, event })\r\n      // Only reset your exchange UI if we're finishing an order fulfillment or cancellation\r\n      if (event == EventType.MatchOrders || event == EventType.CancelOrder) {\r\n        dispatch({ type: ActionTypes.RESET_EXCHANGE })\r\n      }\r\n    })\r\n    openSeaPort.addListener(EventType.TransactionDenied, ({ transactionHash, event }) => {\r\n      console.info({ transactionHash, event })\r\n      dispatch({ type: ActionTypes.RESET_EXCHANGE })\r\n    })\r\n    openSeaPort.addListener(EventType.TransactionFailed, ({ transactionHash, event }) => {\r\n      console.info({ transactionHash, event })\r\n      dispatch({ type: ActionTypes.RESET_EXCHANGE })\r\n    })\r\n    openSeaPort.addListener(EventType.InitializeAccount, ({ accountAddress }) => {\r\n      console.info({ accountAddress })\r\n      dispatch({ type: ActionTypes.INITIALIZE_PROXY })\r\n    })\r\n    openSeaPort.addListener(EventType.WrapEth, ({ accountAddress, amount }) => {\r\n      console.info({ accountAddress, amount })\r\n      dispatch({ type: ActionTypes.WRAP_ETH })\r\n    })\r\n    openSeaPort.addListener(EventType.UnwrapWeth, ({ accountAddress, amount }) => {\r\n      console.info({ accountAddress, amount })\r\n      dispatch({ type: ActionTypes.UNWRAP_WETH })\r\n    })\r\n    openSeaPort.addListener(EventType.ApproveCurrency, ({ accountAddress, tokenAddress }) => {\r\n      console.info({ accountAddress, tokenAddress })\r\n      dispatch({ type: ActionTypes.APPROVE_WETH })\r\n    })\r\n    openSeaPort.addListener(EventType.ApproveAllAssets, ({ accountAddress, proxyAddress, tokenAddress }) => {\r\n      console.info({ accountAddress, proxyAddress, tokenAddress })\r\n      dispatch({ type: ActionTypes.APPROVE_ALL_ASSETS })\r\n    })\r\n    openSeaPort.addListener(EventType.ApproveAsset, ({ accountAddress, proxyAddress, tokenAddress, tokenId }) => {\r\n      console.info({ accountAddress, proxyAddress, tokenAddress, tokenId })\r\n      dispatch({ type: ActionTypes.APPROVE_ASSET })\r\n    })\r\n    openSeaPort.addListener(EventType.CreateOrder, ({ order, accountAddress }) => {\r\n      console.info({ order, accountAddress })\r\n      dispatch({ type: ActionTypes.CREATE_ORDER })\r\n    })\r\n    openSeaPort.addListener(EventType.OrderDenied, ({ order, accountAddress }) => {\r\n      console.info({ order, accountAddress })\r\n      dispatch({ type: ActionTypes.RESET_EXCHANGE })\r\n    })\r\n    openSeaPort.addListener(EventType.MatchOrders, ({ buy, sell, accountAddress }) => {\r\n      console.info({ buy, sell, accountAddress })\r\n      dispatch({ type: ActionTypes.FULFILL_ORDER })\r\n    })\r\n    openSeaPort.addListener(EventType.CancelOrder, ({ order, accountAddress }) => {\r\n      console.info({ order, accountAddress })\r\n      dispatch({ type: ActionTypes.CANCEL_ORDER })\r\n    })\r\n  }\r\n}\r\n```\r\n\r\nTo remove all listeners and start over, just call `seaport.removeAllListeners()`.\r\n\r\n## Learning More\r\n\r\nAuto-generated documentation for each export is available [here](https://projectopensea.github.io/opensea-js/).\r\n\r\nIf you need extra help, support is free! Contact the OpenSea devs. They're available every day on [Discord](https://discord.gg/XjwWYgU) in the `#developers` channel.\r\n\r\n### Example Code\r\n\r\nCheck out the [Ship's Log](https://github.com/ProjectOpenSea/ships-log), built with the SDK, which shows the recent orders in the OpenSea orderbook.\r\n\r\nYou can view a live demo [here](https://ships-log.herokuapp.com/)! Also check out the [Mythereum marketplace](https://mythereum.io/marketplace), which is entirely powered by OpenSea.js.\r\n\r\n## Migrating to version 1.0\r\n\r\nSee the [Changelog](CHANGELOG.md).\r\n\r\n## Development Information\r\n\r\n**Setup**\r\n\r\nBefore any development, install the required NPM dependencies:\r\n\r\n```bash\r\nnpm install\r\n```\r\n\r\nAnd install TypeScript if you haven't already:\r\n\r\n```bash\r\nnpm install -g tslint typescript\r\n```\r\n\r\n**Build**\r\n\r\nThen, lint and build the library into the `lib` directory:\r\n\r\n```bash\r\nnpm run build\r\n```\r\n\r\nOr run the tests:\r\n\r\n```bash\r\nnpm test\r\n```\r\n\r\nNote that the tests require access to both Infura and the OpenSea API. The timeout is adjustable via the `test` script in `package.json`.\r\n\r\n**Generate Documentation**\r\n\r\nGenerate html docs, also available for browsing [here](https://projectopensea.github.io/opensea-js/):\r\n\r\n```bash\r\nyarn docs-build\r\n```\r\n\r\n**Contributing**\r\n\r\nContributions welcome! Please use GitHub issues for suggestions/concerns - if you prefer to express your intentions in code, feel free to submit a pull request.\r\n\r\n## Diagnosing Common Issues\r\n\r\n- Is the `expirationTime` in the future? If not, change it to a time in the future.\r\n\r\n- Are the input addresses all strings? If not, convert them to strings.\r\n\r\n- Is your computer's internal clock accurate? If not, try enabling automatic clock adjustment locally or following [this tutorial](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/set-time.html) to update an Amazon EC2 instance.\r\n\r\n- Are you attempting to purchase a token that's unpurchasable on [OpenSea](https://opensea.io/)? If so, contact us [Discord](https://discord.gg/XjwWYgU) in the `#developers` channel and we'll help diagnose the issue.\r\n\r\n## Testing your branch locally\r\n\r\n```sh\r\nyarn link # in opensea-js repo\r\nyarn link opensea-js # in repo you're working on\r\n```\r\n","readmeFilename":"README.md"}