Web3 Provider to use for transactions. For example:
const provider = new Web3.providers.HttpProvider('https://mainnet.infura.io')
configuration options, including networkName
logger, optional, a function that will be called with debugging information
Compute the gas price for sending a txn, in wei Will be slightly above the mean to make it faster
Compute the gas amount for sending a txn Will be slightly above the result of estimateGas to make it more reliable
The result of estimateGas for a transaction
Estimate the gas needed to transfer assets in bulk
An array of objects with the tokenId and tokenAddress of each of the assets to transfer.
The owner's wallet address
The recipient's wallet address
For a fungible token to use in trades (like W-ETH), get the amount approved for use by the Wyvern transfer proxy. Internal method exposed for dev flexibility.
Address for the user's wallet
Address for the token's contract
Get the proxy address for a user's wallet. Internal method exposed for dev flexibility.
The user's wallet address
Optional number of retries to do
Initialize the proxy for a user's wallet. Proxies are used to make trades on behalf of the order's maker so that trades can happen when the maker isn't online. Internal method exposed for dev flexibility.
The user's wallet address
Add a listener to a marketplace event
An event to listen for
A callback that will accept an object with event data
Whether the listener should only be called once
Approve a fungible token (e.g. W-ETH) for use in trades. Called internally, but exposed for dev flexibility. Checks to see if the minimum amount is already approved, first.
The user's wallet address
The minimum amount needed to skip a transaction. Defaults to the max-integer.
The contract address of the token being approved
Transaction hash if a new transaction occurred, otherwise null
Approve a non-fungible token for use in trades. Requires an account to be initialized first. Called internally, but exposed for dev flexibility. Checks to see if already approved, first. Then tries different approval methods from best to worst.
The user's wallet address
Address of the user's proxy contract. If not provided, will attempt to fetch it from Wyvern.
an optional list of token addresses that, if a token is approve-all type, will skip approval
ABI of the token's contract. Defaults to a flexible ERC-721 contract.
The contract address of the token being approved
Token id to approve, but only used if approve-all isn't supported by the token contract
Transaction hash if a new transaction was created, otherwise null
Cancel an order on-chain, preventing it from ever being fulfilled.
The order maker's wallet address
The order to cancel
Compute the fees for an order
Optional prefetched asset contract (including fees) to use instead of assets
Array of addresses and ids that will be in the order
The basis points to add for the bounty. Will throw if it exceeds the assets' contract's OpenSea fee.
Whether the order is private or not (known taker)
The side of the order (buy or sell)
Create a sell order to auction a bundle of assets.
Will throw a 'You do not own this asset' error if the maker doesn't have one of the assets.
If the user hasn't approved access to any of the assets yet, this will emit ApproveAllAssets (or ApproveAsset if the contract doesn't support approve-all) before asking for approval for each asset.
The address of the maker of the bundle and the owner of all the assets.
An array of objects with the tokenId and tokenAddress of each of the assets to bundle together.
Optional description of the bundle. Markdown is allowed.
Optional link to a page that adds context to the bundle.
Name of the bundle
Optional address that's allowed to purchase this bundle. If specified, no other address will be able to take the order.
Optional price of the asset at the end of its expiration time
Expiration time for the order, in seconds. An expiration time of 0 means "never expire."
Optional basis points (1/100th of a percent) to reward someone for referring the fulfillment of this order
Address of the ERC-20 token to accept in return. If undefined or null, uses Ether.
Price of the asset at the start of the auction
Create a buy order to make an offer on an asset.
Will throw an 'Insufficient balance' error if the maker doesn't have enough W-ETH to make the offer.
If the user hasn't approved W-ETH access yet, this will emit ApproveCurrency before asking for approval.
Address of the maker's wallet
Expiration time for the order, in seconds. An expiration time of 0 means "never expire"
Optional basis points (1/100th of a percent) to reward someone for referring the fulfillment of this order
Optional address for using an ERC-20 token in the order. If unspecified, defaults to W-ETH
Value of the offer, in units of the payment token (or wrapped ETH if no payment token address specified)
Address of the token's contract
Token ID
Create multiple sell orders in bulk to auction assets out of an asset factory.
Will throw a 'You do not own this asset' error if the maker doesn't own the factory.
Items will mint to users' wallets only when they buy them. See https://docs.opensea.io/docs/opensea-initial-item-sale-tutorial for more info.
If the user hasn't approved access to the token yet, this will emit ApproveAllAssets (or ApproveAsset if the contract doesn't support approve-all) before asking for approval.
Address of the factory owner's wallet
Identifier for the asset factory
Optional address that's allowed to purchase each item. If specified, no other address will be able to take each order.
Optional price of the asset at the end of its expiration time. Units are in the amount of a token above the token's decimal places (integer part). For example, for ether, expected units are in ETH, not wei.
Expiration time for the orders, in seconds. An expiration time of 0 means "never expire."
Optional basis points (1/100th of a percent) to reward someone for referring the fulfillment of each order
Address of the factory contract
Number of times to repeat creating the same order. If greater than 5, creates them in batches of 5. Requires an apiKey to be set during seaport initialization in order to not be throttled by the API.
Address of the ERC-20 token to accept in return. If undefined or null, uses Ether.
Price of the asset at the start of the auction. Units are in the amount of a token above the token's decimal places (integer part). For example, for ether, expected units are in ETH, not wei.
Create a sell order to auction an asset.
Will throw a 'You do not own this asset' error if the maker doesn't have the asset.
If the user hasn't approved access to the token yet, this will emit ApproveAllAssets (or ApproveAsset if the contract doesn't support approve-all) before asking for approval.
Address of the maker's wallet
Optional address that's allowed to purchase this item. If specified, no other address will be able to take the order.
Optional price of the asset at the end of its expiration time. Units are in the amount of a token above the token's decimal places (integer part). For example, for ether, expected units are in ETH, not wei.
Expiration time for the order, in seconds. An expiration time of 0 means "never expire."
Optional basis points (1/100th of a percent) to reward someone for referring the fulfillment of this order
Address of the ERC-20 token to accept in return. If undefined or null, uses Ether.
Price of the asset at the start of the auction. Units are in the amount of a token above the token's decimal places (integer part). For example, for ether, expected units are in ETH, not wei.
Address of the token's contract
Token ID
Fullfill or "take" an order for an asset, either a buy or sell order
The taker's wallet address
The order to fulfill, a.k.a. "take"
The optional address that referred the order
Gets the price for the order using the contract
The order to calculate the price for
Get known fungible tokens (ERC-20) that match your filters.
Filter by the ERC-20 contract address for the token, e.g. "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359" for Dai
Filter by the name of the ERC-20 contract. Not guaranteed to exist or be unique for each token type. e.g. '' for Dai and 'Decentraland' for MANA FUTURE: officiallySupported: Filter for tokens that are officially supported and shown on opensea.io
Filter by the ERC-20 symbol for the token, e.g. "DAI" for Dai stablecoin
Get the balance of a fungible token.
User's account address
ABI for the token's contract. Defaults to ERC20
Optional address of the token's contract. Defaults to W-ETH
WIP Returns whether an asset is transferrable. (Currently returns true too often, even when asset is locked by contract.) An asset may not be transferrable if its transfer function is locked for some reason, e.g. an item is being rented within a game or trading has been locked for an item type.
The account address that currently owns the asset
The account address that will be acquiring the asset
ABI for the token contract. Defaults to ERC-721
Address of the token's contract
ID of the token to check
Returns whether an order is fulfillable. An order may not be fulfillable if a target item's transfer function is locked for some reason, e.g. an item is being rented within a game or trading has been locked for an item type.
The account address that will be fulfilling the order
Order to check
The optional address that referred the order
Remove all event listeners. Good idea to call this when you're unmounting a component that listens to events to make UI updates
Optional EventType to remove listeners for
Remove an event listener, included here for completeness.
Simply calls .remove() on a subscription
The event subscription returned from addListener
Transfer one or more assets to another address
An array of objects with the tokenId and tokenAddress of each of the assets to transfer.
The owner's wallet address
The recipient's wallet address
Unwrap W-ETH into ETH.
Emits the UnwrapWeth event when the transaction is prompted.
Address of the user's wallet containing the W-ETH
How much W-ETH to unwrap
Wrap ETH into W-ETH.
W-ETH is needed for placing buy orders (making offers).
Emits the WrapEth event when the transaction is prompted.
Address of the user's wallet containing the ether
How much ether to wrap
Generated using TypeDoc
Your very own seaport. Create a new instance of OpenSeaJS.