opensea-js 2.0.1-beta.1 → 2.0.2-beta.0

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.
Files changed (59) hide show
  1. package/README.md +2 -3
  2. package/lib/__tests__/api/api.js +5 -3
  3. package/lib/__tests__/api/api.js.map +1 -1
  4. package/lib/__tests__/seaport/bundles.js +218 -18
  5. package/lib/__tests__/seaport/bundles.js.map +1 -1
  6. package/lib/__tests__/seaport/fees.js +0 -1
  7. package/lib/__tests__/seaport/fees.js.map +1 -1
  8. package/lib/__tests__/seaport/orders.js +218 -26
  9. package/lib/__tests__/seaport/orders.js.map +1 -1
  10. package/lib/__tests__/seaport/staticCall.js +0 -3
  11. package/lib/__tests__/seaport/staticCall.js.map +1 -1
  12. package/lib/__tests__/utils.d.ts +1 -0
  13. package/lib/__tests__/utils.js +9 -0
  14. package/lib/__tests__/utils.js.map +1 -0
  15. package/lib/constants.d.ts +2 -1
  16. package/lib/constants.js +4 -3
  17. package/lib/constants.js.map +1 -1
  18. package/lib/seaport.d.ts +9 -9
  19. package/lib/seaport.js +73 -55
  20. package/lib/seaport.js.map +1 -1
  21. package/lib/utils/utils.d.ts +5 -0
  22. package/lib/utils/utils.js +11 -1
  23. package/lib/utils/utils.js.map +1 -1
  24. package/package.json +1 -1
  25. package/lib/abi/CheezeWizardsBasicTournamentAbi.json +0 -523
  26. package/lib/abi/DecentralandEstatesAbi.json +0 -614
  27. package/lib/abi/ERC1155Abi.json +0 -2346
  28. package/lib/abi/ERC721v3Abi.json +0 -470
  29. package/lib/abi/UniswapExchangeAbi.json +0 -451
  30. package/lib/abi/UniswapFactoryAbi.json +0 -67
  31. package/lib/abi/WrappedNFTAbi.json +0 -331
  32. package/lib/abi/WrappedNFTFactoryAbi.json +0 -250
  33. package/lib/typechain/contracts/CheezeWizardsBasicTournamentAbi.d.ts +0 -232
  34. package/lib/typechain/contracts/CheezeWizardsBasicTournamentAbi.js +0 -6
  35. package/lib/typechain/contracts/CheezeWizardsBasicTournamentAbi.js.map +0 -1
  36. package/lib/typechain/contracts/DecentralandEstatesAbi.d.ts +0 -189
  37. package/lib/typechain/contracts/DecentralandEstatesAbi.js +0 -6
  38. package/lib/typechain/contracts/DecentralandEstatesAbi.js.map +0 -1
  39. package/lib/typechain/contracts/ERC1155Abi.d.ts +0 -436
  40. package/lib/typechain/contracts/ERC1155Abi.js +0 -6
  41. package/lib/typechain/contracts/ERC1155Abi.js.map +0 -1
  42. package/lib/typechain/contracts/ERC721v3Abi.d.ts +0 -76
  43. package/lib/typechain/contracts/ERC721v3Abi.js +0 -6
  44. package/lib/typechain/contracts/ERC721v3Abi.js.map +0 -1
  45. package/lib/typechain/contracts/UniswapExchangeAbi.d.ts +0 -132
  46. package/lib/typechain/contracts/UniswapExchangeAbi.js +0 -6
  47. package/lib/typechain/contracts/UniswapExchangeAbi.js.map +0 -1
  48. package/lib/typechain/contracts/UniswapFactoryAbi.d.ts +0 -37
  49. package/lib/typechain/contracts/UniswapFactoryAbi.js +0 -6
  50. package/lib/typechain/contracts/UniswapFactoryAbi.js.map +0 -1
  51. package/lib/typechain/contracts/WrappedNFTAbi.d.ts +0 -80
  52. package/lib/typechain/contracts/WrappedNFTAbi.js +0 -6
  53. package/lib/typechain/contracts/WrappedNFTAbi.js.map +0 -1
  54. package/lib/typechain/contracts/WrappedNFTFactoryAbi.d.ts +0 -57
  55. package/lib/typechain/contracts/WrappedNFTFactoryAbi.js +0 -6
  56. package/lib/typechain/contracts/WrappedNFTFactoryAbi.js.map +0 -1
  57. package/lib/typechain/contracts/types.d.ts +0 -54
  58. package/lib/typechain/contracts/types.js +0 -3
  59. package/lib/typechain/contracts/types.js.map +0 -1
@@ -93,7 +93,6 @@ var rinkebyClient = new index_1.OpenSeaPort(rinkebyProvider, {
93
93
  startAmount: amountInToken,
94
94
  extraBountyBasisPoints: 0,
95
95
  buyerAddress: constants_1.NULL_ADDRESS,
96
- expirationTime: 0,
97
96
  quantity: 1,
98
97
  paymentTokenAddress: constants_1.NULL_ADDRESS,
99
98
  waitForHighestBid: false,
@@ -134,7 +133,6 @@ var rinkebyClient = new index_1.OpenSeaPort(rinkebyProvider, {
134
133
  startAmount: amountInToken,
135
134
  extraBountyBasisPoints: 0,
136
135
  buyerAddress: constants_1.NULL_ADDRESS,
137
- expirationTime: 0,
138
136
  quantity: 1,
139
137
  paymentTokenAddress: constants_1.NULL_ADDRESS,
140
138
  waitForHighestBid: false,
@@ -177,7 +175,6 @@ var rinkebyClient = new index_1.OpenSeaPort(rinkebyProvider, {
177
175
  startAmount: amountInToken,
178
176
  extraBountyBasisPoints: 0,
179
177
  buyerAddress: constants_1.NULL_ADDRESS,
180
- expirationTime: 0,
181
178
  quantity: 1,
182
179
  paymentTokenAddress: constants_1.NULL_ADDRESS,
183
180
  waitForHighestBid: false,
@@ -1 +1 @@
1
- {"version":3,"file":"staticCall.js","sourceRoot":"","sources":["../../../src/__tests__/seaport/staticCall.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6BAA8B;AAC9B,+BAAoC;AACpC,yCAA6B;AAC7B,6CAKyB;AACzB,6CAAiE;AACjE,qCAA0C;AAC1C,qCAAsC;AACtC,6CAAgD;AAChD,0CAOsB;AACtB,+BAA4C;AAC5C,mCAAgD;AAEhD,IAAM,QAAQ,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,gCAAoB,CAAC,CAAC;AACvE,IAAM,eAAe,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,gCAAoB,CAAC,CAAC;AAE9E,IAAM,MAAM,GAAG,IAAI,mBAAW,CAC5B,QAAQ,EACR;IACE,WAAW,EAAE,eAAO,CAAC,IAAI;IACzB,MAAM,EAAE,2BAAe;CACxB,EACD,UAAC,IAAI,IAAK,OAAA,OAAO,CAAC,IAAI,CAAC,mBAAY,IAAI,CAAE,CAAC,EAAhC,CAA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AAS,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,aAAa,CAAC,CAAC;oBAC3E,aAAM,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;oBACxC,aAAM,CAAC,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;oBACjD,IAAA,yBAAkB,EAAC,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;oBAE/C,qBAAM,aAAa,CAAC,gCAAgC,CAAC;4BACnD,KAAK,OAAA;4BACL,cAAc,gBAAA;yBACf,CAAC,EAAA;;oBAHF,SAGE,CAAC;oBACH,2BAA2B;oBAC3B,qBAAM,IAAA,6BAAoB,EAAC,KAAK,EAAE,YAAY,CAAC,EAAA;;oBAD/C,2BAA2B;oBAC3B,SAA+C,CAAC;;;;SACjD,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const areTimestampsNearlyEqual: (timestampA: number, timestampB: number, buffer?: number) => boolean;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.areTimestampsNearlyEqual = void 0;
4
+ var areTimestampsNearlyEqual = function (timestampA, timestampB, buffer) {
5
+ if (buffer === void 0) { buffer = 5; }
6
+ return Math.abs(timestampA - timestampB) <= buffer;
7
+ };
8
+ exports.areTimestampsNearlyEqual = areTimestampsNearlyEqual;
9
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/__tests__/utils.ts"],"names":[],"mappings":";;;AAAO,IAAM,wBAAwB,GAAG,UACtC,UAAkB,EAClB,UAAkB,EAClB,MAAU;IAAV,uBAAA,EAAA,UAAU;IAEV,OAAO,IAAI,CAAC,GAAG,CAAC,UAAU,GAAG,UAAU,CAAC,IAAI,MAAM,CAAC;AACrD,CAAC,CAAC;AANW,QAAA,wBAAwB,4BAMnC"}
@@ -31,7 +31,8 @@ export declare const DEFAULT_BUYER_FEE_BASIS_POINTS = 0;
31
31
  export declare const DEFAULT_SELLER_FEE_BASIS_POINTS = 250;
32
32
  export declare const OPENSEA_SELLER_BOUNTY_BASIS_POINTS = 100;
33
33
  export declare const DEFAULT_MAX_BOUNTY = 250;
34
- export declare const MIN_EXPIRATION_SECONDS = 10;
34
+ export declare const MIN_EXPIRATION_MINUTES = 15;
35
+ export declare const MAX_EXPIRATION_MONTHS = 6;
35
36
  export declare const ORDER_MATCHING_LATENCY_SECONDS: number;
36
37
  export declare const SELL_ORDER_BATCH_SIZE = 3;
37
38
  export declare const ORDERBOOK_VERSION: number;
package/lib/constants.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MERKLE_VALIDATOR_MAINNET = exports.EIP_712_WYVERN_DOMAIN_VERSION = exports.EIP_712_WYVERN_DOMAIN_NAME = exports.EIP_712_ORDER_TYPES = exports.API_PATH = exports.ORDERBOOK_PATH = exports.RINKEBY_PROVIDER_URL = exports.MAINNET_PROVIDER_URL = exports.RPC_URL_PATH = exports.SITE_HOST_RINKEBY = exports.SITE_HOST_MAINNET = exports.API_BASE_RINKEBY = exports.API_BASE_MAINNET = exports.ORDERBOOK_VERSION = exports.SELL_ORDER_BATCH_SIZE = exports.ORDER_MATCHING_LATENCY_SECONDS = exports.MIN_EXPIRATION_SECONDS = exports.DEFAULT_MAX_BOUNTY = exports.OPENSEA_SELLER_BOUNTY_BASIS_POINTS = exports.DEFAULT_SELLER_FEE_BASIS_POINTS = exports.DEFAULT_BUYER_FEE_BASIS_POINTS = exports.STATIC_CALL_DECENTRALAND_ESTATES_ADDRESS = exports.STATIC_CALL_CHEEZE_WIZARDS_RINKEBY_ADDRESS = exports.STATIC_CALL_CHEEZE_WIZARDS_ADDRESS = exports.STATIC_CALL_TX_ORIGIN_RINKEBY_ADDRESS = exports.STATIC_CALL_TX_ORIGIN_ADDRESS = exports.DECENTRALAND_ESTATE_ADDRESS = exports.CHEEZE_WIZARDS_BASIC_TOURNAMENT_RINKEBY_ADDRESS = exports.CHEEZE_WIZARDS_BASIC_TOURNAMENT_ADDRESS = exports.CHEEZE_WIZARDS_GUILD_RINKEBY_ADDRESS = exports.CHEEZE_WIZARDS_GUILD_ADDRESS = exports.DEFAULT_WRAPPED_NFT_LIQUIDATION_UNISWAP_SLIPPAGE_IN_BASIS_POINTS = exports.UNISWAP_FACTORY_ADDRESS_RINKEBY = exports.UNISWAP_FACTORY_ADDRESS_MAINNET = exports.WRAPPED_NFT_LIQUIDATION_PROXY_ADDRESS_RINKEBY = exports.WRAPPED_NFT_LIQUIDATION_PROXY_ADDRESS_MAINNET = exports.WRAPPED_NFT_FACTORY_ADDRESS_RINKEBY = exports.WRAPPED_NFT_FACTORY_ADDRESS_MAINNET = exports.CK_RINKEBY_ADDRESS = exports.CK_ADDRESS = exports.ENJIN_LEGACY_ADDRESS = exports.ENJIN_ADDRESS = exports.MANA_ADDRESS = exports.ENJIN_COIN_ADDRESS = exports.MAX_UINT_256 = exports.INVERSE_BASIS_POINT = exports.OPENSEA_FEE_RECIPIENT = exports.NULL_BLOCK_HASH = exports.NULL_ADDRESS = exports.DEFAULT_GAS_INCREASE_FACTOR = void 0;
4
- exports.MERKLE_VALIDATOR_RINKEBY = void 0;
3
+ exports.EIP_712_WYVERN_DOMAIN_VERSION = exports.EIP_712_WYVERN_DOMAIN_NAME = exports.EIP_712_ORDER_TYPES = exports.API_PATH = exports.ORDERBOOK_PATH = exports.RINKEBY_PROVIDER_URL = exports.MAINNET_PROVIDER_URL = exports.RPC_URL_PATH = exports.SITE_HOST_RINKEBY = exports.SITE_HOST_MAINNET = exports.API_BASE_RINKEBY = exports.API_BASE_MAINNET = exports.ORDERBOOK_VERSION = exports.SELL_ORDER_BATCH_SIZE = exports.ORDER_MATCHING_LATENCY_SECONDS = exports.MAX_EXPIRATION_MONTHS = exports.MIN_EXPIRATION_MINUTES = exports.DEFAULT_MAX_BOUNTY = exports.OPENSEA_SELLER_BOUNTY_BASIS_POINTS = exports.DEFAULT_SELLER_FEE_BASIS_POINTS = exports.DEFAULT_BUYER_FEE_BASIS_POINTS = exports.STATIC_CALL_DECENTRALAND_ESTATES_ADDRESS = exports.STATIC_CALL_CHEEZE_WIZARDS_RINKEBY_ADDRESS = exports.STATIC_CALL_CHEEZE_WIZARDS_ADDRESS = exports.STATIC_CALL_TX_ORIGIN_RINKEBY_ADDRESS = exports.STATIC_CALL_TX_ORIGIN_ADDRESS = exports.DECENTRALAND_ESTATE_ADDRESS = exports.CHEEZE_WIZARDS_BASIC_TOURNAMENT_RINKEBY_ADDRESS = exports.CHEEZE_WIZARDS_BASIC_TOURNAMENT_ADDRESS = exports.CHEEZE_WIZARDS_GUILD_RINKEBY_ADDRESS = exports.CHEEZE_WIZARDS_GUILD_ADDRESS = exports.DEFAULT_WRAPPED_NFT_LIQUIDATION_UNISWAP_SLIPPAGE_IN_BASIS_POINTS = exports.UNISWAP_FACTORY_ADDRESS_RINKEBY = exports.UNISWAP_FACTORY_ADDRESS_MAINNET = exports.WRAPPED_NFT_LIQUIDATION_PROXY_ADDRESS_RINKEBY = exports.WRAPPED_NFT_LIQUIDATION_PROXY_ADDRESS_MAINNET = exports.WRAPPED_NFT_FACTORY_ADDRESS_RINKEBY = exports.WRAPPED_NFT_FACTORY_ADDRESS_MAINNET = exports.CK_RINKEBY_ADDRESS = exports.CK_ADDRESS = exports.ENJIN_LEGACY_ADDRESS = exports.ENJIN_ADDRESS = exports.MANA_ADDRESS = exports.ENJIN_COIN_ADDRESS = exports.MAX_UINT_256 = exports.INVERSE_BASIS_POINT = exports.OPENSEA_FEE_RECIPIENT = exports.NULL_BLOCK_HASH = exports.NULL_ADDRESS = exports.DEFAULT_GAS_INCREASE_FACTOR = void 0;
4
+ exports.MERKLE_VALIDATOR_RINKEBY = exports.MERKLE_VALIDATOR_MAINNET = void 0;
5
5
  var wyvern_js_1 = require("wyvern-js");
6
6
  exports.DEFAULT_GAS_INCREASE_FACTOR = 1.01;
7
7
  exports.NULL_ADDRESS = wyvern_js_1.WyvernProtocol.NULL_ADDRESS;
@@ -36,7 +36,8 @@ exports.DEFAULT_BUYER_FEE_BASIS_POINTS = 0;
36
36
  exports.DEFAULT_SELLER_FEE_BASIS_POINTS = 250;
37
37
  exports.OPENSEA_SELLER_BOUNTY_BASIS_POINTS = 100;
38
38
  exports.DEFAULT_MAX_BOUNTY = exports.DEFAULT_SELLER_FEE_BASIS_POINTS;
39
- exports.MIN_EXPIRATION_SECONDS = 10;
39
+ exports.MIN_EXPIRATION_MINUTES = 15;
40
+ exports.MAX_EXPIRATION_MONTHS = 6;
40
41
  exports.ORDER_MATCHING_LATENCY_SECONDS = 60 * 60 * 24 * 7;
41
42
  exports.SELL_ORDER_BATCH_SIZE = 3;
42
43
  exports.ORDERBOOK_VERSION = 1;
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;;AAAA,uCAA2C;AAE9B,QAAA,2BAA2B,GAAG,IAAI,CAAC;AACnC,QAAA,YAAY,GAAG,0BAAc,CAAC,YAAY,CAAC;AAC3C,QAAA,eAAe,GAC1B,oEAAoE,CAAC;AAC1D,QAAA,qBAAqB,GAChC,4CAA4C,CAAC;AAClC,QAAA,mBAAmB,GAAG,KAAK,CAAC;AAC5B,QAAA,YAAY,GAAG,0BAAc,CAAC,YAAY,CAAC;AAC3C,QAAA,kBAAkB,GAAG,4CAA4C,CAAC;AAClE,QAAA,YAAY,GAAG,4CAA4C,CAAC;AAC5D,QAAA,aAAa,GAAG,4CAA4C,CAAC;AAC7D,QAAA,oBAAoB,GAC/B,4CAA4C,CAAC;AAClC,QAAA,UAAU,GAAG,4CAA4C,CAAC;AAC1D,QAAA,kBAAkB,GAAG,4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,SAAS,EAAE;QAC3C,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE;QACjC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE;KACnC;CACF,CAAC;AAEW,QAAA,0BAA0B,GAAG,0BAA0B,CAAC;AACxD,QAAA,6BAA6B,GAAG,KAAK,CAAC;AACtC,QAAA,wBAAwB,GACnC,4CAA4C,CAAC;AAClC,QAAA,wBAAwB,GACnC,4CAA4C,CAAC"}
package/lib/seaport.d.ts CHANGED
@@ -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. An expiration time of 0 means "never expire"
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. An expiration time of 0 means "never expire"
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. An expiration time of 0 means "never expire."
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. An expiration time of 0 means "never expire."
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. An expiration time of 0 means "never expire."
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.
@@ -616,7 +616,7 @@ export declare class OpenSeaPort {
616
616
  quantity: number;
617
617
  accountAddress: string;
618
618
  startAmount: number;
619
- expirationTime: number;
619
+ expirationTime?: number;
620
620
  paymentTokenAddress: string;
621
621
  extraBountyBasisPoints: number;
622
622
  sellOrder?: UnhashedOrder;
@@ -631,7 +631,7 @@ export declare class OpenSeaPort {
631
631
  waitForHighestBid: boolean;
632
632
  englishAuctionReservePrice?: number;
633
633
  listingTime?: number;
634
- expirationTime: number;
634
+ expirationTime?: number;
635
635
  paymentTokenAddress: string;
636
636
  extraBountyBasisPoints: number;
637
637
  buyerAddress: string;
@@ -651,7 +651,7 @@ export declare class OpenSeaPort {
651
651
  quantities: number[];
652
652
  accountAddress: string;
653
653
  startAmount: number;
654
- expirationTime: number;
654
+ expirationTime?: number;
655
655
  paymentTokenAddress: string;
656
656
  extraBountyBasisPoints: number;
657
657
  sellOrder?: UnhashedOrder;
@@ -670,7 +670,7 @@ export declare class OpenSeaPort {
670
670
  startAmount: number;
671
671
  endAmount?: number;
672
672
  listingTime?: number;
673
- expirationTime: number;
673
+ expirationTime?: number;
674
674
  waitForHighestBid: boolean;
675
675
  englishAuctionReservePrice?: number;
676
676
  paymentTokenAddress: string;
package/lib/seaport.js CHANGED
@@ -522,13 +522,13 @@ var OpenSeaPort = /** @class */ (function () {
522
522
  * @param quantities The quantity of each asset to sell. Defaults to 1 for each.
523
523
  * @param accountAddress Address of the maker's wallet
524
524
  * @param startAmount Value of the offer, in units of the payment token (or wrapped ETH if no payment token address specified)
525
- * @param expirationTime Expiration time for the order, in seconds. An expiration time of 0 means "never expire"
525
+ * @param expirationTime Expiration time for the order, in seconds.
526
526
  * @param paymentTokenAddress Optional address for using an ERC-20 token in the order. If unspecified, defaults to W-ETH
527
527
  * @param sellOrder Optional sell order (like an English auction) to ensure fee and schema compatibility
528
528
  * @param referrerAddress The optional address that referred the order
529
529
  */
530
530
  OpenSeaPort.prototype.createBundleBuyOrder = function (_b) {
531
- var assets = _b.assets, collection = _b.collection, quantities = _b.quantities, accountAddress = _b.accountAddress, startAmount = _b.startAmount, _c = _b.expirationTime, expirationTime = _c === void 0 ? 0 : _c, paymentTokenAddress = _b.paymentTokenAddress, sellOrder = _b.sellOrder, referrerAddress = _b.referrerAddress;
531
+ var assets = _b.assets, collection = _b.collection, quantities = _b.quantities, accountAddress = _b.accountAddress, startAmount = _b.startAmount, _c = _b.expirationTime, expirationTime = _c === void 0 ? (0, utils_1.getMaxOrderExpirationTimestamp)() : _c, paymentTokenAddress = _b.paymentTokenAddress, sellOrder = _b.sellOrder, referrerAddress = _b.referrerAddress;
532
532
  return __awaiter(this, void 0, void 0, function () {
533
533
  var order, hashedOrder, signature, error_1, orderWithSignature;
534
534
  return __generator(this, function (_d) {
@@ -593,13 +593,13 @@ var OpenSeaPort = /** @class */ (function () {
593
593
  * @param accountAddress Address of the maker's wallet
594
594
  * @param startAmount Value of the offer, in units of the payment token (or wrapped ETH if no payment token address specified)
595
595
  * @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.
596
- * @param expirationTime Expiration time for the order, in seconds. An expiration time of 0 means "never expire"
596
+ * @param expirationTime Expiration time for the order, in seconds.
597
597
  * @param paymentTokenAddress Optional address for using an ERC-20 token in the order. If unspecified, defaults to W-ETH
598
598
  * @param sellOrder Optional sell order (like an English auction) to ensure fee and schema compatibility
599
599
  * @param referrerAddress The optional address that referred the order
600
600
  */
601
601
  OpenSeaPort.prototype.createBuyOrder = function (_b) {
602
- var asset = _b.asset, accountAddress = _b.accountAddress, startAmount = _b.startAmount, _c = _b.quantity, quantity = _c === void 0 ? 1 : _c, _d = _b.expirationTime, expirationTime = _d === void 0 ? 0 : _d, paymentTokenAddress = _b.paymentTokenAddress, sellOrder = _b.sellOrder, referrerAddress = _b.referrerAddress;
602
+ var asset = _b.asset, accountAddress = _b.accountAddress, startAmount = _b.startAmount, _c = _b.quantity, quantity = _c === void 0 ? 1 : _c, _d = _b.expirationTime, expirationTime = _d === void 0 ? (0, utils_1.getMaxOrderExpirationTimestamp)() : _d, paymentTokenAddress = _b.paymentTokenAddress, sellOrder = _b.sellOrder, referrerAddress = _b.referrerAddress;
603
603
  return __awaiter(this, void 0, void 0, function () {
604
604
  var order, hashedOrder, signature, error_2, orderWithSignature;
605
605
  return __generator(this, function (_e) {
@@ -665,7 +665,7 @@ var OpenSeaPort = /** @class */ (function () {
665
665
  * @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.
666
666
  * @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.
667
667
  * @param listingTime Optional time when the order will become fulfillable, in UTC seconds. Undefined means it will start now.
668
- * @param expirationTime Expiration time for the order, in UTC seconds. An expiration time of 0 means "never expire."
668
+ * @param expirationTime Expiration time for the order, in UTC seconds.
669
669
  * @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.
670
670
  * @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.
671
671
  * @param paymentTokenAddress Address of the ERC-20 token to accept in return. If undefined or null, uses Ether.
@@ -674,7 +674,7 @@ var OpenSeaPort = /** @class */ (function () {
674
674
  * @param buyerEmail Optional email of the user that's allowed to purchase this item. If specified, a user will have to verify this email before being able to take the order.
675
675
  */
676
676
  OpenSeaPort.prototype.createSellOrder = function (_b) {
677
- var asset = _b.asset, accountAddress = _b.accountAddress, startAmount = _b.startAmount, endAmount = _b.endAmount, _c = _b.quantity, quantity = _c === void 0 ? 1 : _c, listingTime = _b.listingTime, _d = _b.expirationTime, expirationTime = _d === void 0 ? 0 : _d, _e = _b.waitForHighestBid, waitForHighestBid = _e === void 0 ? false : _e, englishAuctionReservePrice = _b.englishAuctionReservePrice, paymentTokenAddress = _b.paymentTokenAddress, _f = _b.extraBountyBasisPoints, extraBountyBasisPoints = _f === void 0 ? 0 : _f, buyerAddress = _b.buyerAddress, buyerEmail = _b.buyerEmail;
677
+ var asset = _b.asset, accountAddress = _b.accountAddress, startAmount = _b.startAmount, endAmount = _b.endAmount, _c = _b.quantity, quantity = _c === void 0 ? 1 : _c, listingTime = _b.listingTime, _d = _b.expirationTime, expirationTime = _d === void 0 ? (0, utils_1.getMaxOrderExpirationTimestamp)() : _d, _e = _b.waitForHighestBid, waitForHighestBid = _e === void 0 ? false : _e, englishAuctionReservePrice = _b.englishAuctionReservePrice, paymentTokenAddress = _b.paymentTokenAddress, _f = _b.extraBountyBasisPoints, extraBountyBasisPoints = _f === void 0 ? 0 : _f, buyerAddress = _b.buyerAddress, buyerEmail = _b.buyerEmail;
678
678
  return __awaiter(this, void 0, void 0, function () {
679
679
  var order, hashedOrder, signature, error_3, orderWithSignature;
680
680
  return __generator(this, function (_g) {
@@ -735,7 +735,7 @@ var OpenSeaPort = /** @class */ (function () {
735
735
  * @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.
736
736
  * @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.
737
737
  * @param listingTime Optional time when the order will become fulfillable, in UTC seconds. Undefined means it will start now.
738
- * @param expirationTime Expiration time for the order, in seconds. An expiration time of 0 means "never expire."
738
+ * @param expirationTime Expiration time for the order, in seconds.
739
739
  * @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.
740
740
  * @param paymentTokenAddress Address of the ERC-20 token to accept in return. If undefined or null, uses Ether.
741
741
  * @param extraBountyBasisPoints Optional basis points (1/100th of a percent) to reward someone for referring the fulfillment of each order
@@ -745,7 +745,7 @@ var OpenSeaPort = /** @class */ (function () {
745
745
  * @returns The number of orders created in total
746
746
  */
747
747
  OpenSeaPort.prototype.createFactorySellOrders = function (_b) {
748
- var assets = _b.assets, accountAddress = _b.accountAddress, startAmount = _b.startAmount, endAmount = _b.endAmount, _c = _b.quantity, quantity = _c === void 0 ? 1 : _c, listingTime = _b.listingTime, _d = _b.expirationTime, expirationTime = _d === void 0 ? 0 : _d, _e = _b.waitForHighestBid, waitForHighestBid = _e === void 0 ? false : _e, paymentTokenAddress = _b.paymentTokenAddress, _f = _b.extraBountyBasisPoints, extraBountyBasisPoints = _f === void 0 ? 0 : _f, buyerAddress = _b.buyerAddress, buyerEmail = _b.buyerEmail, _g = _b.numberOfOrders, numberOfOrders = _g === void 0 ? 1 : _g;
748
+ var assets = _b.assets, accountAddress = _b.accountAddress, startAmount = _b.startAmount, endAmount = _b.endAmount, _c = _b.quantity, quantity = _c === void 0 ? 1 : _c, listingTime = _b.listingTime, _d = _b.expirationTime, expirationTime = _d === void 0 ? (0, utils_1.getMaxOrderExpirationTimestamp)() : _d, _e = _b.waitForHighestBid, waitForHighestBid = _e === void 0 ? false : _e, paymentTokenAddress = _b.paymentTokenAddress, _f = _b.extraBountyBasisPoints, extraBountyBasisPoints = _f === void 0 ? 0 : _f, buyerAddress = _b.buyerAddress, buyerEmail = _b.buyerEmail, _g = _b.numberOfOrders, numberOfOrders = _g === void 0 ? 1 : _g;
749
749
  return __awaiter(this, void 0, void 0, function () {
750
750
  var dummyOrder, _makeAndPostOneSellOrder, range, batches, numOrdersCreated, _h, batches_1, subRange, batchOrdersCreated;
751
751
  var _this = this;
@@ -873,7 +873,7 @@ var OpenSeaPort = /** @class */ (function () {
873
873
  * @param startAmount Price of the asset at the start of the auction, or minimum acceptable bid if it's an English auction.
874
874
  * @param endAmount Optional price of the asset at the end of its expiration time. If not specified, will be set to `startAmount`.
875
875
  * @param listingTime Optional time when the order will become fulfillable, in UTC seconds. Undefined means it will start now.
876
- * @param expirationTime Expiration time for the order, in seconds. An expiration time of 0 means "never expire."
876
+ * @param expirationTime Expiration time for the order, in seconds.
877
877
  * @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.
878
878
  * @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.
879
879
  * @param paymentTokenAddress Address of the ERC-20 token to accept in return. If undefined or null, uses Ether.
@@ -881,7 +881,7 @@ var OpenSeaPort = /** @class */ (function () {
881
881
  * @param buyerAddress Optional address that's allowed to purchase this bundle. If specified, no other address will be able to take the order, unless it's the null address.
882
882
  */
883
883
  OpenSeaPort.prototype.createBundleSellOrder = function (_b) {
884
- var bundleName = _b.bundleName, bundleDescription = _b.bundleDescription, bundleExternalLink = _b.bundleExternalLink, assets = _b.assets, collection = _b.collection, quantities = _b.quantities, accountAddress = _b.accountAddress, startAmount = _b.startAmount, endAmount = _b.endAmount, _c = _b.expirationTime, expirationTime = _c === void 0 ? 0 : _c, listingTime = _b.listingTime, _d = _b.waitForHighestBid, waitForHighestBid = _d === void 0 ? false : _d, englishAuctionReservePrice = _b.englishAuctionReservePrice, paymentTokenAddress = _b.paymentTokenAddress, _e = _b.extraBountyBasisPoints, extraBountyBasisPoints = _e === void 0 ? 0 : _e, buyerAddress = _b.buyerAddress;
884
+ var bundleName = _b.bundleName, bundleDescription = _b.bundleDescription, bundleExternalLink = _b.bundleExternalLink, assets = _b.assets, collection = _b.collection, quantities = _b.quantities, accountAddress = _b.accountAddress, startAmount = _b.startAmount, endAmount = _b.endAmount, _c = _b.expirationTime, expirationTime = _c === void 0 ? (0, utils_1.getMaxOrderExpirationTimestamp)() : _c, listingTime = _b.listingTime, _d = _b.waitForHighestBid, waitForHighestBid = _d === void 0 ? false : _d, englishAuctionReservePrice = _b.englishAuctionReservePrice, paymentTokenAddress = _b.paymentTokenAddress, _e = _b.extraBountyBasisPoints, extraBountyBasisPoints = _e === void 0 ? 0 : _e, buyerAddress = _b.buyerAddress;
885
885
  return __awaiter(this, void 0, void 0, function () {
886
886
  var order, hashedOrder, signature, error_5, orderWithSignature;
887
887
  return __generator(this, function (_f) {
@@ -2189,7 +2189,7 @@ var OpenSeaPort = /** @class */ (function () {
2189
2189
  });
2190
2190
  };
2191
2191
  OpenSeaPort.prototype._makeBuyOrder = function (_b) {
2192
- var asset = _b.asset, quantity = _b.quantity, accountAddress = _b.accountAddress, startAmount = _b.startAmount, _c = _b.expirationTime, expirationTime = _c === void 0 ? 0 : _c, paymentTokenAddress = _b.paymentTokenAddress, _d = _b.extraBountyBasisPoints, extraBountyBasisPoints = _d === void 0 ? 0 : _d, sellOrder = _b.sellOrder, referrerAddress = _b.referrerAddress;
2192
+ var asset = _b.asset, quantity = _b.quantity, accountAddress = _b.accountAddress, startAmount = _b.startAmount, _c = _b.expirationTime, expirationTime = _c === void 0 ? (0, utils_1.getMaxOrderExpirationTimestamp)() : _c, paymentTokenAddress = _b.paymentTokenAddress, _d = _b.extraBountyBasisPoints, extraBountyBasisPoints = _d === void 0 ? 0 : _d, sellOrder = _b.sellOrder, referrerAddress = _b.referrerAddress;
2193
2193
  return __awaiter(this, void 0, void 0, function () {
2194
2194
  var schema, quantityBN, wyAsset, openSeaAsset, taker, _e, totalBuyerFeeBasisPoints, totalSellerFeeBasisPoints, _f, makerRelayerFee, takerRelayerFee, makerProtocolFee, takerProtocolFee, makerReferrerFee, feeRecipient, feeMethod, _g, target, calldata, replacementPattern, _h, basePrice, extra, paymentToken, times, _j, staticTarget, staticExtradata, exchange;
2195
2195
  return __generator(this, function (_k) {
@@ -2217,7 +2217,9 @@ var OpenSeaPort = /** @class */ (function () {
2217
2217
  return [4 /*yield*/, this._getPriceParameters(types_1.OrderSide.Buy, paymentTokenAddress, expirationTime, startAmount)];
2218
2218
  case 3:
2219
2219
  _h = _k.sent(), basePrice = _h.basePrice, extra = _h.extra, paymentToken = _h.paymentToken;
2220
- times = this._getTimeParameters(expirationTime);
2220
+ times = this._getTimeParameters({
2221
+ expirationTimestamp: expirationTime,
2222
+ });
2221
2223
  return [4 /*yield*/, this._getStaticCallTargetAndExtraData({
2222
2224
  asset: openSeaAsset,
2223
2225
  useTxnOriginStaticCall: false,
@@ -2268,11 +2270,11 @@ var OpenSeaPort = /** @class */ (function () {
2268
2270
  });
2269
2271
  };
2270
2272
  OpenSeaPort.prototype._makeSellOrder = function (_b) {
2271
- var asset = _b.asset, quantity = _b.quantity, accountAddress = _b.accountAddress, startAmount = _b.startAmount, endAmount = _b.endAmount, listingTime = _b.listingTime, expirationTime = _b.expirationTime, waitForHighestBid = _b.waitForHighestBid, _c = _b.englishAuctionReservePrice, englishAuctionReservePrice = _c === void 0 ? 0 : _c, paymentTokenAddress = _b.paymentTokenAddress, extraBountyBasisPoints = _b.extraBountyBasisPoints, buyerAddress = _b.buyerAddress;
2273
+ var asset = _b.asset, quantity = _b.quantity, accountAddress = _b.accountAddress, startAmount = _b.startAmount, endAmount = _b.endAmount, listingTime = _b.listingTime, _c = _b.expirationTime, expirationTime = _c === void 0 ? (0, utils_1.getMaxOrderExpirationTimestamp)() : _c, waitForHighestBid = _b.waitForHighestBid, _d = _b.englishAuctionReservePrice, englishAuctionReservePrice = _d === void 0 ? 0 : _d, paymentTokenAddress = _b.paymentTokenAddress, extraBountyBasisPoints = _b.extraBountyBasisPoints, buyerAddress = _b.buyerAddress;
2272
2274
  return __awaiter(this, void 0, void 0, function () {
2273
- var schema, quantityBN, wyAsset, openSeaAsset, _d, totalSellerFeeBasisPoints, totalBuyerFeeBasisPoints, sellerBountyBasisPoints, _e, target, calldata, replacementPattern, orderSaleKind, _f, basePrice, extra, paymentToken, reservePrice, times, _g, makerRelayerFee, takerRelayerFee, makerProtocolFee, takerProtocolFee, makerReferrerFee, feeRecipient, feeMethod, _h, staticTarget, staticExtradata, exchange;
2274
- return __generator(this, function (_j) {
2275
- switch (_j.label) {
2275
+ var schema, quantityBN, wyAsset, openSeaAsset, _e, totalSellerFeeBasisPoints, totalBuyerFeeBasisPoints, sellerBountyBasisPoints, _f, target, calldata, replacementPattern, orderSaleKind, _g, basePrice, extra, paymentToken, reservePrice, times, _h, makerRelayerFee, takerRelayerFee, makerProtocolFee, takerProtocolFee, makerReferrerFee, feeRecipient, feeMethod, _j, staticTarget, staticExtradata, exchange;
2276
+ return __generator(this, function (_k) {
2277
+ switch (_k.label) {
2276
2278
  case 0:
2277
2279
  accountAddress = (0, utils_1.validateAndFormatWalletAddress)(this.web3, accountAddress);
2278
2280
  schema = this._getSchema(asset.schemaName);
@@ -2280,34 +2282,38 @@ var OpenSeaPort = /** @class */ (function () {
2280
2282
  wyAsset = (0, utils_1.getWyvernAsset)(schema, asset, quantityBN);
2281
2283
  return [4 /*yield*/, this.api.getAsset(asset)];
2282
2284
  case 1:
2283
- openSeaAsset = _j.sent();
2285
+ openSeaAsset = _k.sent();
2284
2286
  return [4 /*yield*/, this.computeFees({
2285
2287
  asset: openSeaAsset,
2286
2288
  side: types_1.OrderSide.Sell,
2287
2289
  extraBountyBasisPoints: extraBountyBasisPoints,
2288
2290
  })];
2289
2291
  case 2:
2290
- _d = _j.sent(), totalSellerFeeBasisPoints = _d.totalSellerFeeBasisPoints, totalBuyerFeeBasisPoints = _d.totalBuyerFeeBasisPoints, sellerBountyBasisPoints = _d.sellerBountyBasisPoints;
2291
- _e = (0, schema_1.encodeSell)(schema, wyAsset, accountAddress, waitForHighestBid
2292
+ _e = _k.sent(), totalSellerFeeBasisPoints = _e.totalSellerFeeBasisPoints, totalBuyerFeeBasisPoints = _e.totalBuyerFeeBasisPoints, sellerBountyBasisPoints = _e.sellerBountyBasisPoints;
2293
+ _f = (0, schema_1.encodeSell)(schema, wyAsset, accountAddress, waitForHighestBid
2292
2294
  ? undefined
2293
- : utils_1.merkleValidatorByNetwork[this._networkName]), target = _e.target, calldata = _e.calldata, replacementPattern = _e.replacementPattern;
2295
+ : utils_1.merkleValidatorByNetwork[this._networkName]), target = _f.target, calldata = _f.calldata, replacementPattern = _f.replacementPattern;
2294
2296
  orderSaleKind = endAmount != null && endAmount !== startAmount
2295
2297
  ? types_1.SaleKind.DutchAuction
2296
2298
  : types_1.SaleKind.FixedPrice;
2297
2299
  return [4 /*yield*/, this._getPriceParameters(types_1.OrderSide.Sell, paymentTokenAddress, expirationTime, startAmount, endAmount, waitForHighestBid, englishAuctionReservePrice)];
2298
2300
  case 3:
2299
- _f = _j.sent(), basePrice = _f.basePrice, extra = _f.extra, paymentToken = _f.paymentToken, reservePrice = _f.reservePrice;
2300
- times = this._getTimeParameters(expirationTime, listingTime, waitForHighestBid);
2301
- _g = this._getSellFeeParameters(totalBuyerFeeBasisPoints, totalSellerFeeBasisPoints, waitForHighestBid, sellerBountyBasisPoints), makerRelayerFee = _g.makerRelayerFee, takerRelayerFee = _g.takerRelayerFee, makerProtocolFee = _g.makerProtocolFee, takerProtocolFee = _g.takerProtocolFee, makerReferrerFee = _g.makerReferrerFee, feeRecipient = _g.feeRecipient, feeMethod = _g.feeMethod;
2301
+ _g = _k.sent(), basePrice = _g.basePrice, extra = _g.extra, paymentToken = _g.paymentToken, reservePrice = _g.reservePrice;
2302
+ times = this._getTimeParameters({
2303
+ expirationTimestamp: expirationTime,
2304
+ listingTimestamp: listingTime,
2305
+ waitingForBestCounterOrder: waitForHighestBid,
2306
+ });
2307
+ _h = this._getSellFeeParameters(totalBuyerFeeBasisPoints, totalSellerFeeBasisPoints, waitForHighestBid, sellerBountyBasisPoints), makerRelayerFee = _h.makerRelayerFee, takerRelayerFee = _h.takerRelayerFee, makerProtocolFee = _h.makerProtocolFee, takerProtocolFee = _h.takerProtocolFee, makerReferrerFee = _h.makerReferrerFee, feeRecipient = _h.feeRecipient, feeMethod = _h.feeMethod;
2302
2308
  return [4 /*yield*/, this._getStaticCallTargetAndExtraData({
2303
2309
  asset: openSeaAsset,
2304
2310
  useTxnOriginStaticCall: waitForHighestBid,
2305
2311
  })];
2306
2312
  case 4:
2307
- _h = _j.sent(), staticTarget = _h.staticTarget, staticExtradata = _h.staticExtradata;
2313
+ _j = _k.sent(), staticTarget = _j.staticTarget, staticExtradata = _j.staticExtradata;
2308
2314
  return [4 /*yield*/, this._getOrderCreateWyvernExchangeAddress()];
2309
2315
  case 5:
2310
- exchange = _j.sent();
2316
+ exchange = _k.sent();
2311
2317
  return [2 /*return*/, {
2312
2318
  exchange: exchange ||
2313
2319
  wyvern_js_1.WyvernProtocol.getExchangeContractAddress(this._networkName),
@@ -2431,7 +2437,7 @@ var OpenSeaPort = /** @class */ (function () {
2431
2437
  });
2432
2438
  };
2433
2439
  OpenSeaPort.prototype._makeBundleBuyOrder = function (_b) {
2434
- var assets = _b.assets, collection = _b.collection, quantities = _b.quantities, accountAddress = _b.accountAddress, startAmount = _b.startAmount, _c = _b.expirationTime, expirationTime = _c === void 0 ? 0 : _c, paymentTokenAddress = _b.paymentTokenAddress, _d = _b.extraBountyBasisPoints, extraBountyBasisPoints = _d === void 0 ? 0 : _d, sellOrder = _b.sellOrder, referrerAddress = _b.referrerAddress;
2440
+ var assets = _b.assets, collection = _b.collection, quantities = _b.quantities, accountAddress = _b.accountAddress, startAmount = _b.startAmount, _c = _b.expirationTime, expirationTime = _c === void 0 ? (0, utils_1.getMaxOrderExpirationTimestamp)() : _c, paymentTokenAddress = _b.paymentTokenAddress, _d = _b.extraBountyBasisPoints, extraBountyBasisPoints = _d === void 0 ? 0 : _d, sellOrder = _b.sellOrder, referrerAddress = _b.referrerAddress;
2435
2441
  return __awaiter(this, void 0, void 0, function () {
2436
2442
  var quantityBNs, bundle, orderedSchemas, taker, asset, _e, _f, totalBuyerFeeBasisPoints, totalSellerFeeBasisPoints, _g, makerRelayerFee, takerRelayerFee, makerProtocolFee, takerProtocolFee, makerReferrerFee, feeRecipient, feeMethod, _h, calldata, replacementPattern, _j, basePrice, extra, paymentToken, times, exchange;
2437
2443
  var _this = this;
@@ -2467,7 +2473,9 @@ var OpenSeaPort = /** @class */ (function () {
2467
2473
  return [4 /*yield*/, this._getPriceParameters(types_1.OrderSide.Buy, paymentTokenAddress, expirationTime, startAmount)];
2468
2474
  case 5:
2469
2475
  _j = _k.sent(), basePrice = _j.basePrice, extra = _j.extra, paymentToken = _j.paymentToken;
2470
- times = this._getTimeParameters(expirationTime);
2476
+ times = this._getTimeParameters({
2477
+ expirationTimestamp: expirationTime,
2478
+ });
2471
2479
  return [4 /*yield*/, this._getOrderCreateWyvernExchangeAddress()];
2472
2480
  case 6:
2473
2481
  exchange = _k.sent();
@@ -2509,12 +2517,12 @@ var OpenSeaPort = /** @class */ (function () {
2509
2517
  });
2510
2518
  };
2511
2519
  OpenSeaPort.prototype._makeBundleSellOrder = function (_b) {
2512
- var bundleName = _b.bundleName, bundleDescription = _b.bundleDescription, bundleExternalLink = _b.bundleExternalLink, assets = _b.assets, collection = _b.collection, quantities = _b.quantities, accountAddress = _b.accountAddress, startAmount = _b.startAmount, endAmount = _b.endAmount, listingTime = _b.listingTime, expirationTime = _b.expirationTime, waitForHighestBid = _b.waitForHighestBid, _c = _b.englishAuctionReservePrice, englishAuctionReservePrice = _c === void 0 ? 0 : _c, paymentTokenAddress = _b.paymentTokenAddress, extraBountyBasisPoints = _b.extraBountyBasisPoints, buyerAddress = _b.buyerAddress;
2520
+ var bundleName = _b.bundleName, bundleDescription = _b.bundleDescription, bundleExternalLink = _b.bundleExternalLink, assets = _b.assets, collection = _b.collection, quantities = _b.quantities, accountAddress = _b.accountAddress, startAmount = _b.startAmount, endAmount = _b.endAmount, listingTime = _b.listingTime, _c = _b.expirationTime, expirationTime = _c === void 0 ? (0, utils_1.getMaxOrderExpirationTimestamp)() : _c, waitForHighestBid = _b.waitForHighestBid, _d = _b.englishAuctionReservePrice, englishAuctionReservePrice = _d === void 0 ? 0 : _d, paymentTokenAddress = _b.paymentTokenAddress, extraBountyBasisPoints = _b.extraBountyBasisPoints, buyerAddress = _b.buyerAddress;
2513
2521
  return __awaiter(this, void 0, void 0, function () {
2514
- var quantityBNs, bundle, orderedSchemas, asset, _d, _e, totalSellerFeeBasisPoints, totalBuyerFeeBasisPoints, sellerBountyBasisPoints, _f, calldata, replacementPattern, _g, basePrice, extra, paymentToken, reservePrice, times, orderSaleKind, _h, makerRelayerFee, takerRelayerFee, makerProtocolFee, takerProtocolFee, makerReferrerFee, feeRecipient, exchange;
2522
+ var quantityBNs, bundle, orderedSchemas, asset, _e, _f, totalSellerFeeBasisPoints, totalBuyerFeeBasisPoints, sellerBountyBasisPoints, _g, calldata, replacementPattern, _h, basePrice, extra, paymentToken, reservePrice, times, orderSaleKind, _j, makerRelayerFee, takerRelayerFee, makerProtocolFee, takerProtocolFee, makerReferrerFee, feeRecipient, exchange;
2515
2523
  var _this = this;
2516
- return __generator(this, function (_j) {
2517
- switch (_j.label) {
2524
+ return __generator(this, function (_k) {
2525
+ switch (_k.label) {
2518
2526
  case 0:
2519
2527
  accountAddress = (0, utils_1.validateAndFormatWalletAddress)(this.web3, accountAddress);
2520
2528
  quantityBNs = quantities.map(function (quantity, i) {
@@ -2528,32 +2536,36 @@ var OpenSeaPort = /** @class */ (function () {
2528
2536
  if (!collection) return [3 /*break*/, 2];
2529
2537
  return [4 /*yield*/, this.api.getAsset(assets[0])];
2530
2538
  case 1:
2531
- _d = _j.sent();
2539
+ _e = _k.sent();
2532
2540
  return [3 /*break*/, 3];
2533
2541
  case 2:
2534
- _d = undefined;
2535
- _j.label = 3;
2542
+ _e = undefined;
2543
+ _k.label = 3;
2536
2544
  case 3:
2537
- asset = _d;
2545
+ asset = _e;
2538
2546
  return [4 /*yield*/, this.computeFees({
2539
2547
  asset: asset,
2540
2548
  side: types_1.OrderSide.Sell,
2541
2549
  extraBountyBasisPoints: extraBountyBasisPoints,
2542
2550
  })];
2543
2551
  case 4:
2544
- _e = _j.sent(), totalSellerFeeBasisPoints = _e.totalSellerFeeBasisPoints, totalBuyerFeeBasisPoints = _e.totalBuyerFeeBasisPoints, sellerBountyBasisPoints = _e.sellerBountyBasisPoints;
2545
- _f = (0, schema_1.encodeAtomicizedSell)(orderedSchemas, bundle.assets, accountAddress, this._wyvernProtocol, this._networkName), calldata = _f.calldata, replacementPattern = _f.replacementPattern;
2552
+ _f = _k.sent(), totalSellerFeeBasisPoints = _f.totalSellerFeeBasisPoints, totalBuyerFeeBasisPoints = _f.totalBuyerFeeBasisPoints, sellerBountyBasisPoints = _f.sellerBountyBasisPoints;
2553
+ _g = (0, schema_1.encodeAtomicizedSell)(orderedSchemas, bundle.assets, accountAddress, this._wyvernProtocol, this._networkName), calldata = _g.calldata, replacementPattern = _g.replacementPattern;
2546
2554
  return [4 /*yield*/, this._getPriceParameters(types_1.OrderSide.Sell, paymentTokenAddress, expirationTime, startAmount, endAmount, waitForHighestBid, englishAuctionReservePrice)];
2547
2555
  case 5:
2548
- _g = _j.sent(), basePrice = _g.basePrice, extra = _g.extra, paymentToken = _g.paymentToken, reservePrice = _g.reservePrice;
2549
- times = this._getTimeParameters(expirationTime, listingTime, waitForHighestBid);
2556
+ _h = _k.sent(), basePrice = _h.basePrice, extra = _h.extra, paymentToken = _h.paymentToken, reservePrice = _h.reservePrice;
2557
+ times = this._getTimeParameters({
2558
+ expirationTimestamp: expirationTime,
2559
+ listingTimestamp: listingTime,
2560
+ waitingForBestCounterOrder: waitForHighestBid,
2561
+ });
2550
2562
  orderSaleKind = endAmount != null && endAmount !== startAmount
2551
2563
  ? types_1.SaleKind.DutchAuction
2552
2564
  : types_1.SaleKind.FixedPrice;
2553
- _h = this._getSellFeeParameters(totalBuyerFeeBasisPoints, totalSellerFeeBasisPoints, waitForHighestBid, sellerBountyBasisPoints), makerRelayerFee = _h.makerRelayerFee, takerRelayerFee = _h.takerRelayerFee, makerProtocolFee = _h.makerProtocolFee, takerProtocolFee = _h.takerProtocolFee, makerReferrerFee = _h.makerReferrerFee, feeRecipient = _h.feeRecipient;
2565
+ _j = this._getSellFeeParameters(totalBuyerFeeBasisPoints, totalSellerFeeBasisPoints, waitForHighestBid, sellerBountyBasisPoints), makerRelayerFee = _j.makerRelayerFee, takerRelayerFee = _j.takerRelayerFee, makerProtocolFee = _j.makerProtocolFee, takerProtocolFee = _j.takerProtocolFee, makerReferrerFee = _j.makerReferrerFee, feeRecipient = _j.feeRecipient;
2554
2566
  return [4 /*yield*/, this._getOrderCreateWyvernExchangeAddress()];
2555
2567
  case 6:
2556
- exchange = _j.sent();
2568
+ exchange = _k.sent();
2557
2569
  return [2 /*return*/, {
2558
2570
  exchange: exchange ||
2559
2571
  wyvern_js_1.WyvernProtocol.getExchangeContractAddress(this._networkName),
@@ -2629,7 +2641,10 @@ var OpenSeaPort = /** @class */ (function () {
2629
2641
  }
2630
2642
  };
2631
2643
  var _c = computeOrderParams(), target = _c.target, calldata = _c.calldata, replacementPattern = _c.replacementPattern;
2632
- var times = this._getTimeParameters(0);
2644
+ var times = this._getTimeParameters({
2645
+ expirationTimestamp: 0,
2646
+ isMatchingOrder: true,
2647
+ });
2633
2648
  // Compat for matching buy orders that have fee recipient still on them
2634
2649
  var feeRecipient = order.feeRecipient == constants_1.NULL_ADDRESS ? constants_1.OPENSEA_FEE_RECIPIENT : constants_1.NULL_ADDRESS;
2635
2650
  var matchingOrder = {
@@ -3212,32 +3227,30 @@ var OpenSeaPort = /** @class */ (function () {
3212
3227
  * @param listingTimestamp Timestamp to start the order (in seconds), or undefined to start it now
3213
3228
  * @param waitingForBestCounterOrder Whether this order should be hidden until the best match is found
3214
3229
  */
3215
- OpenSeaPort.prototype._getTimeParameters = function (expirationTimestamp, listingTimestamp, waitingForBestCounterOrder) {
3216
- if (waitingForBestCounterOrder === void 0) { waitingForBestCounterOrder = false; }
3217
- // Validation
3218
- var minExpirationTimestamp = Math.round(Date.now() / 1000 + constants_1.MIN_EXPIRATION_SECONDS);
3230
+ OpenSeaPort.prototype._getTimeParameters = function (_b) {
3231
+ var _c = _b.expirationTimestamp, expirationTimestamp = _c === void 0 ? (0, utils_1.getMaxOrderExpirationTimestamp)() : _c, listingTimestamp = _b.listingTimestamp, _d = _b.waitingForBestCounterOrder, waitingForBestCounterOrder = _d === void 0 ? false : _d, _e = _b.isMatchingOrder, isMatchingOrder = _e === void 0 ? false : _e;
3232
+ var maxExpirationDate = new Date();
3233
+ maxExpirationDate.setMonth(maxExpirationDate.getMonth() + constants_1.MAX_EXPIRATION_MONTHS);
3234
+ var maxExpirationTimeStamp = Math.round(maxExpirationDate.getTime() / 1000);
3219
3235
  var minListingTimestamp = Math.round(Date.now() / 1000);
3220
- if (expirationTimestamp != 0 &&
3221
- expirationTimestamp < minExpirationTimestamp) {
3222
- throw new Error("Expiration time must be at least ".concat(constants_1.MIN_EXPIRATION_SECONDS, " seconds from now, or zero (non-expiring)."));
3236
+ if (!isMatchingOrder && expirationTimestamp === 0) {
3237
+ throw new Error("Expiration time cannot be 0");
3223
3238
  }
3224
3239
  if (listingTimestamp && listingTimestamp < minListingTimestamp) {
3225
3240
  throw new Error("Listing time cannot be in the past.");
3226
3241
  }
3227
- if (listingTimestamp &&
3228
- expirationTimestamp != 0 &&
3229
- listingTimestamp >= expirationTimestamp) {
3242
+ if (listingTimestamp && listingTimestamp >= expirationTimestamp) {
3230
3243
  throw new Error("Listing time must be before the expiration time.");
3231
3244
  }
3232
- if (waitingForBestCounterOrder && expirationTimestamp == 0) {
3233
- throw new Error("English auctions must have an expiration time.");
3234
- }
3235
3245
  if (waitingForBestCounterOrder && listingTimestamp) {
3236
3246
  throw new Error("Cannot schedule an English auction for the future.");
3237
3247
  }
3238
3248
  if (parseInt(expirationTimestamp.toString()) != expirationTimestamp) {
3239
3249
  throw new Error("Expiration timestamp must be a whole number of seconds");
3240
3250
  }
3251
+ if (expirationTimestamp > maxExpirationTimeStamp) {
3252
+ throw new Error("Expiration time must not exceed six months from now");
3253
+ }
3241
3254
  if (waitingForBestCounterOrder) {
3242
3255
  listingTimestamp = expirationTimestamp;
3243
3256
  // Expire one week from now, to ensure server can match it
@@ -3249,6 +3262,11 @@ var OpenSeaPort = /** @class */ (function () {
3249
3262
  // Small offset to account for latency
3250
3263
  listingTimestamp =
3251
3264
  listingTimestamp || Math.round(Date.now() / 1000 - 100);
3265
+ // The minimum expiration time has to be at least fifteen minutes from now
3266
+ var minExpirationTimestamp = listingTimestamp + constants_1.MIN_EXPIRATION_MINUTES * 60;
3267
+ if (!isMatchingOrder && expirationTimestamp < minExpirationTimestamp) {
3268
+ throw new Error("Expiration time must be at least ".concat(constants_1.MIN_EXPIRATION_MINUTES, " minutes from the listing date"));
3269
+ }
3252
3270
  }
3253
3271
  return {
3254
3272
  listingTime: (0, utils_1.makeBigNumber)(listingTimestamp),