opensea-js 2.0.1-beta.2 → 2.0.2-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/__tests__/api/api.js +5 -3
- package/lib/__tests__/api/api.js.map +1 -1
- package/lib/__tests__/seaport/bundles.js +218 -18
- package/lib/__tests__/seaport/bundles.js.map +1 -1
- package/lib/__tests__/seaport/fees.js +0 -1
- package/lib/__tests__/seaport/fees.js.map +1 -1
- package/lib/__tests__/seaport/orders.js +218 -26
- package/lib/__tests__/seaport/orders.js.map +1 -1
- package/lib/__tests__/seaport/staticCall.js +0 -3
- package/lib/__tests__/seaport/staticCall.js.map +1 -1
- package/lib/__tests__/utils.d.ts +1 -0
- package/lib/__tests__/utils.js +9 -0
- package/lib/__tests__/utils.js.map +1 -0
- package/lib/abi/CheezeWizardsBasicTournamentAbi.json +523 -0
- package/lib/abi/DecentralandEstatesAbi.json +614 -0
- package/lib/abi/ERC1155Abi.json +2346 -0
- package/lib/abi/ERC721v3Abi.json +470 -0
- package/lib/abi/UniswapExchangeAbi.json +451 -0
- package/lib/abi/UniswapFactoryAbi.json +67 -0
- package/lib/abi/WrappedNFTAbi.json +331 -0
- package/lib/abi/WrappedNFTFactoryAbi.json +250 -0
- package/lib/constants.d.ts +2 -1
- package/lib/constants.js +4 -3
- package/lib/constants.js.map +1 -1
- package/lib/seaport.d.ts +10 -50
- package/lib/seaport.js +126 -233
- package/lib/seaport.js.map +1 -1
- package/lib/typechain/contracts/CheezeWizardsBasicTournamentAbi.d.ts +232 -0
- package/lib/typechain/contracts/CheezeWizardsBasicTournamentAbi.js +6 -0
- package/lib/typechain/contracts/CheezeWizardsBasicTournamentAbi.js.map +1 -0
- package/lib/typechain/contracts/DecentralandEstatesAbi.d.ts +189 -0
- package/lib/typechain/contracts/DecentralandEstatesAbi.js +6 -0
- package/lib/typechain/contracts/DecentralandEstatesAbi.js.map +1 -0
- package/lib/typechain/contracts/ERC1155Abi.d.ts +436 -0
- package/lib/typechain/contracts/ERC1155Abi.js +6 -0
- package/lib/typechain/contracts/ERC1155Abi.js.map +1 -0
- package/lib/typechain/contracts/ERC721v3Abi.d.ts +76 -0
- package/lib/typechain/contracts/ERC721v3Abi.js +6 -0
- package/lib/typechain/contracts/ERC721v3Abi.js.map +1 -0
- package/lib/typechain/contracts/UniswapExchangeAbi.d.ts +132 -0
- package/lib/typechain/contracts/UniswapExchangeAbi.js +6 -0
- package/lib/typechain/contracts/UniswapExchangeAbi.js.map +1 -0
- package/lib/typechain/contracts/UniswapFactoryAbi.d.ts +37 -0
- package/lib/typechain/contracts/UniswapFactoryAbi.js +6 -0
- package/lib/typechain/contracts/UniswapFactoryAbi.js.map +1 -0
- package/lib/typechain/contracts/WrappedNFTAbi.d.ts +80 -0
- package/lib/typechain/contracts/WrappedNFTAbi.js +6 -0
- package/lib/typechain/contracts/WrappedNFTAbi.js.map +1 -0
- package/lib/typechain/contracts/WrappedNFTFactoryAbi.d.ts +57 -0
- package/lib/typechain/contracts/WrappedNFTFactoryAbi.js +6 -0
- package/lib/typechain/contracts/WrappedNFTFactoryAbi.js.map +1 -0
- package/lib/typechain/contracts/types.d.ts +54 -0
- package/lib/typechain/contracts/types.js +3 -0
- package/lib/typechain/contracts/types.js.map +1 -0
- package/lib/utils/utils.d.ts +5 -0
- package/lib/utils/utils.js +11 -1
- package/lib/utils/utils.js.map +1 -1
- package/package.json +1 -1
package/lib/seaport.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { EventSubscription } from "fbemitter";
|
|
|
3
3
|
import Web3 from "web3";
|
|
4
4
|
import { WyvernProtocol } from "wyvern-js";
|
|
5
5
|
import { OpenSeaAPI } from "./api";
|
|
6
|
-
import { Asset, ComputedFees, ECSignature, EventData, EventType, FeeMethod, OpenSeaAPIConfig, OpenSeaAsset, OpenSeaFungibleToken, Order, OrderSide, PartialReadonlyContractAbi, UnhashedOrder, UnsignedOrder, WyvernAsset,
|
|
6
|
+
import { Asset, ComputedFees, ECSignature, EventData, EventType, FeeMethod, OpenSeaAPIConfig, OpenSeaAsset, OpenSeaFungibleToken, Order, OrderSide, PartialReadonlyContractAbi, UnhashedOrder, UnsignedOrder, WyvernAsset, WyvernSchemaName } from "./types";
|
|
7
7
|
export declare class OpenSeaPort {
|
|
8
8
|
web3: Web3;
|
|
9
9
|
web3ReadOnly: Web3;
|
|
@@ -150,7 +150,7 @@ export declare class OpenSeaPort {
|
|
|
150
150
|
* @param quantities The quantity of each asset to sell. Defaults to 1 for each.
|
|
151
151
|
* @param accountAddress Address of the maker's wallet
|
|
152
152
|
* @param startAmount Value of the offer, in units of the payment token (or wrapped ETH if no payment token address specified)
|
|
153
|
-
* @param expirationTime Expiration time for the order, in seconds.
|
|
153
|
+
* @param expirationTime Expiration time for the order, in seconds.
|
|
154
154
|
* @param paymentTokenAddress Optional address for using an ERC-20 token in the order. If unspecified, defaults to W-ETH
|
|
155
155
|
* @param sellOrder Optional sell order (like an English auction) to ensure fee and schema compatibility
|
|
156
156
|
* @param referrerAddress The optional address that referred the order
|
|
@@ -177,7 +177,7 @@ export declare class OpenSeaPort {
|
|
|
177
177
|
* @param accountAddress Address of the maker's wallet
|
|
178
178
|
* @param startAmount Value of the offer, in units of the payment token (or wrapped ETH if no payment token address specified)
|
|
179
179
|
* @param quantity The number of assets to bid for (if fungible or semi-fungible). Defaults to 1. In units, not base units, e.g. not wei.
|
|
180
|
-
* @param expirationTime Expiration time for the order, in seconds.
|
|
180
|
+
* @param expirationTime Expiration time for the order, in seconds.
|
|
181
181
|
* @param paymentTokenAddress Optional address for using an ERC-20 token in the order. If unspecified, defaults to W-ETH
|
|
182
182
|
* @param sellOrder Optional sell order (like an English auction) to ensure fee and schema compatibility
|
|
183
183
|
* @param referrerAddress The optional address that referred the order
|
|
@@ -205,7 +205,7 @@ export declare class OpenSeaPort {
|
|
|
205
205
|
* @param endAmount 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.
|
|
206
206
|
* @param quantity The number of assets to sell (if fungible or semi-fungible). Defaults to 1. In units, not base units, e.g. not wei.
|
|
207
207
|
* @param listingTime Optional time when the order will become fulfillable, in UTC seconds. Undefined means it will start now.
|
|
208
|
-
* @param expirationTime Expiration time for the order, in UTC seconds.
|
|
208
|
+
* @param expirationTime Expiration time for the order, in UTC seconds.
|
|
209
209
|
* @param waitForHighestBid If set to true, this becomes an English auction that increases in price for every bid. The highest bid wins when the auction expires, as long as it's at least `startAmount`. `expirationTime` must be > 0.
|
|
210
210
|
* @param englishAuctionReservePrice Optional price level, below which orders may be placed but will not be matched. Orders below the reserve can be manually accepted but will not be automatically matched.
|
|
211
211
|
* @param paymentTokenAddress Address of the ERC-20 token to accept in return. If undefined or null, uses Ether.
|
|
@@ -240,7 +240,7 @@ export declare class OpenSeaPort {
|
|
|
240
240
|
* @param endAmount Optional price of the asset at the end of its expiration time. If not specified, will be set to `startAmount`. 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.
|
|
241
241
|
* @param quantity The number of assets to sell at one time (if fungible or semi-fungible). Defaults to 1. In units, not base units, e.g. not wei.
|
|
242
242
|
* @param listingTime Optional time when the order will become fulfillable, in UTC seconds. Undefined means it will start now.
|
|
243
|
-
* @param expirationTime Expiration time for the order, in seconds.
|
|
243
|
+
* @param expirationTime Expiration time for the order, in seconds.
|
|
244
244
|
* @param waitForHighestBid If set to true, this becomes an English auction that increases in price for every bid. The highest bid wins when the auction expires, as long as it's at least `startAmount`. `expirationTime` must be > 0.
|
|
245
245
|
* @param paymentTokenAddress Address of the ERC-20 token to accept in return. If undefined or null, uses Ether.
|
|
246
246
|
* @param extraBountyBasisPoints Optional basis points (1/100th of a percent) to reward someone for referring the fulfillment of each order
|
|
@@ -279,7 +279,7 @@ export declare class OpenSeaPort {
|
|
|
279
279
|
* @param startAmount Price of the asset at the start of the auction, or minimum acceptable bid if it's an English auction.
|
|
280
280
|
* @param endAmount Optional price of the asset at the end of its expiration time. If not specified, will be set to `startAmount`.
|
|
281
281
|
* @param listingTime Optional time when the order will become fulfillable, in UTC seconds. Undefined means it will start now.
|
|
282
|
-
* @param expirationTime Expiration time for the order, in seconds.
|
|
282
|
+
* @param expirationTime Expiration time for the order, in seconds.
|
|
283
283
|
* @param waitForHighestBid If set to true, this becomes an English auction that increases in price for every bid. The highest bid wins when the auction expires, as long as it's at least `startAmount`. `expirationTime` must be > 0.
|
|
284
284
|
* @param englishAuctionReservePrice Optional price level, below which orders may be placed but will not be matched. Orders below the reserve can be manually accepted but will not be automatically matched.
|
|
285
285
|
* @param paymentTokenAddress Address of the ERC-20 token to accept in return. If undefined or null, uses Ether.
|
|
@@ -321,43 +321,6 @@ export declare class OpenSeaPort {
|
|
|
321
321
|
recipientAddress?: string;
|
|
322
322
|
referrerAddress?: string;
|
|
323
323
|
}): Promise<string>;
|
|
324
|
-
/**
|
|
325
|
-
* Returns estimated amount of gas required for Fullfilling the order.
|
|
326
|
-
* @param param0 __namedParamaters Object
|
|
327
|
-
* @param order The order to fulfill, a.k.a. "take"
|
|
328
|
-
* @param accountAddress The taker's wallet address
|
|
329
|
-
* @param recipientAddress The optional address to receive the order's item(s) or curriencies. If not specified, defaults to accountAddress.
|
|
330
|
-
* @param referrerAddress The optional address that referred the order
|
|
331
|
-
* @returns gasEstimation
|
|
332
|
-
*/
|
|
333
|
-
getFulfillOrderGasEstimation({ order, accountAddress, recipientAddress, referrerAddress, }: {
|
|
334
|
-
order: Order;
|
|
335
|
-
accountAddress: string;
|
|
336
|
-
recipientAddress?: string;
|
|
337
|
-
referrerAddress?: string;
|
|
338
|
-
}): Promise<number>;
|
|
339
|
-
/**
|
|
340
|
-
* Returns data required to fulfill the transaction.
|
|
341
|
-
* @param param0 __namedParamaters Object
|
|
342
|
-
* @param order The order to fulfill, a.k.a. "take"
|
|
343
|
-
* @param accountAddress The taker's wallet address
|
|
344
|
-
* @param recipientAddress The optional address to receive the order's item(s) or curriencies. If not specified, defaults to accountAddress.
|
|
345
|
-
* @param referrerAddress The optional address that referred the order
|
|
346
|
-
* @returns gasEstimation
|
|
347
|
-
*/
|
|
348
|
-
getFulfillOrderArgs({ order, accountAddress, recipientAddress, referrerAddress, }: {
|
|
349
|
-
order: Order;
|
|
350
|
-
accountAddress: string;
|
|
351
|
-
recipientAddress?: string;
|
|
352
|
-
referrerAddress?: string;
|
|
353
|
-
}): Promise<{
|
|
354
|
-
args: WyvernAtomicMatchParameters;
|
|
355
|
-
txnData: {
|
|
356
|
-
from: string;
|
|
357
|
-
value?: BigNumber;
|
|
358
|
-
gas?: number;
|
|
359
|
-
};
|
|
360
|
-
}>;
|
|
361
324
|
/**
|
|
362
325
|
* Cancel an order on-chain, preventing it from ever being fulfilled.
|
|
363
326
|
* @param param0 __namedParameters Object
|
|
@@ -653,7 +616,7 @@ export declare class OpenSeaPort {
|
|
|
653
616
|
quantity: number;
|
|
654
617
|
accountAddress: string;
|
|
655
618
|
startAmount: number;
|
|
656
|
-
expirationTime
|
|
619
|
+
expirationTime?: number;
|
|
657
620
|
paymentTokenAddress: string;
|
|
658
621
|
extraBountyBasisPoints: number;
|
|
659
622
|
sellOrder?: UnhashedOrder;
|
|
@@ -668,7 +631,7 @@ export declare class OpenSeaPort {
|
|
|
668
631
|
waitForHighestBid: boolean;
|
|
669
632
|
englishAuctionReservePrice?: number;
|
|
670
633
|
listingTime?: number;
|
|
671
|
-
expirationTime
|
|
634
|
+
expirationTime?: number;
|
|
672
635
|
paymentTokenAddress: string;
|
|
673
636
|
extraBountyBasisPoints: number;
|
|
674
637
|
buyerAddress: string;
|
|
@@ -688,7 +651,7 @@ export declare class OpenSeaPort {
|
|
|
688
651
|
quantities: number[];
|
|
689
652
|
accountAddress: string;
|
|
690
653
|
startAmount: number;
|
|
691
|
-
expirationTime
|
|
654
|
+
expirationTime?: number;
|
|
692
655
|
paymentTokenAddress: string;
|
|
693
656
|
extraBountyBasisPoints: number;
|
|
694
657
|
sellOrder?: UnhashedOrder;
|
|
@@ -707,7 +670,7 @@ export declare class OpenSeaPort {
|
|
|
707
670
|
startAmount: number;
|
|
708
671
|
endAmount?: number;
|
|
709
672
|
listingTime?: number;
|
|
710
|
-
expirationTime
|
|
673
|
+
expirationTime?: number;
|
|
711
674
|
waitForHighestBid: boolean;
|
|
712
675
|
englishAuctionReservePrice?: number;
|
|
713
676
|
paymentTokenAddress: string;
|
|
@@ -819,9 +782,6 @@ export declare class OpenSeaPort {
|
|
|
819
782
|
*/
|
|
820
783
|
private _getPriceParameters;
|
|
821
784
|
private _getMetadata;
|
|
822
|
-
private _validateOrderMatch;
|
|
823
|
-
private _getAtomicMatchCallArgs;
|
|
824
|
-
private _getAtomicMatchGasEstimation;
|
|
825
785
|
private _atomicMatch;
|
|
826
786
|
private _getRequiredAmountForTakingSellOrder;
|
|
827
787
|
/**
|