opensea-js 1.2.5 → 1.2.6
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/README.md +2 -2
- package/lib/seaport.d.ts +10 -10
- package/lib/seaport.js +9 -9
- package/lib/types.d.ts +1 -0
- package/lib/types.js +1 -0
- package/lib/types.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -734,10 +734,10 @@ Contributions welcome! Please use GitHub issues for suggestions/concerns - if yo
|
|
|
734
734
|
|
|
735
735
|
## Diagnosing Common Issues
|
|
736
736
|
|
|
737
|
-
* Is the `expirationTime` in future? If not, change it to a time in the future.
|
|
737
|
+
* Is the `expirationTime` in the future? If not, change it to a time in the future.
|
|
738
738
|
|
|
739
739
|
* Are the input addresses all strings? If not, convert them to strings.
|
|
740
740
|
|
|
741
741
|
* 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.
|
|
742
742
|
|
|
743
|
-
* 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
|
|
743
|
+
* 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.
|
package/lib/seaport.d.ts
CHANGED
|
@@ -331,7 +331,7 @@ export declare class OpenSeaPort {
|
|
|
331
331
|
* Requires an account to be initialized first.
|
|
332
332
|
* Called internally, but exposed for dev flexibility.
|
|
333
333
|
* Checks to see if already approved, first. Then tries different approval methods from best to worst.
|
|
334
|
-
* @param param0
|
|
334
|
+
* @param param0 __namedParameters Object
|
|
335
335
|
* @param tokenId Token id to approve, but only used if approve-all isn't
|
|
336
336
|
* supported by the token contract
|
|
337
337
|
* @param tokenAddress The contract address of the token being approved
|
|
@@ -357,7 +357,7 @@ export declare class OpenSeaPort {
|
|
|
357
357
|
* Approve a fungible token (e.g. W-ETH) for use in trades.
|
|
358
358
|
* Called internally, but exposed for dev flexibility.
|
|
359
359
|
* Checks to see if the minimum amount is already approved, first.
|
|
360
|
-
* @param param0
|
|
360
|
+
* @param param0 __namedParameters Object
|
|
361
361
|
* @param accountAddress The user's wallet address
|
|
362
362
|
* @param tokenAddress The contract address of the token being approved
|
|
363
363
|
* @param proxyAddress The user's proxy address. If unspecified, uses the Wyvern token transfer proxy address.
|
|
@@ -375,7 +375,7 @@ export declare class OpenSeaPort {
|
|
|
375
375
|
* Called internally, but exposed for dev flexibility.
|
|
376
376
|
* Useful for old ERC20s that require a 0 approval count before
|
|
377
377
|
* changing the count
|
|
378
|
-
* @param param0
|
|
378
|
+
* @param param0 __namedParameters Object
|
|
379
379
|
* @param accountAddress The user's wallet address
|
|
380
380
|
* @param tokenAddress The contract address of the token being approved
|
|
381
381
|
* @param proxyAddress The user's proxy address. If unspecified, uses the Wyvern token transfer proxy address.
|
|
@@ -396,7 +396,7 @@ export declare class OpenSeaPort {
|
|
|
396
396
|
* An order may not be fulfillable if a target item's transfer function
|
|
397
397
|
* is locked for some reason, e.g. an item is being rented within a game
|
|
398
398
|
* or trading has been locked for an item type.
|
|
399
|
-
* @param param0
|
|
399
|
+
* @param param0 __namedParameters Object
|
|
400
400
|
* @param order Order to check
|
|
401
401
|
* @param accountAddress The account address that will be fulfilling the order
|
|
402
402
|
* @param recipientAddress The optional address to receive the order's item(s) or curriencies. If not specified, defaults to accountAddress.
|
|
@@ -413,7 +413,7 @@ export declare class OpenSeaPort {
|
|
|
413
413
|
* An asset may not be transferrable if its transfer function
|
|
414
414
|
* is locked for some reason, e.g. an item is being rented within a game
|
|
415
415
|
* or trading has been locked for an item type.
|
|
416
|
-
* @param param0
|
|
416
|
+
* @param param0 __namedParameters Object
|
|
417
417
|
* @param tokenId DEPRECATED: Token ID. Use `asset` instead.
|
|
418
418
|
* @param tokenAddress DEPRECATED: Address of the token's contract. Use `asset` instead.
|
|
419
419
|
* @param asset The asset to trade
|
|
@@ -463,7 +463,7 @@ export declare class OpenSeaPort {
|
|
|
463
463
|
}): Promise<string>;
|
|
464
464
|
/**
|
|
465
465
|
* Get known payment tokens (ERC-20) that match your filters.
|
|
466
|
-
* @param param0
|
|
466
|
+
* @param param0 __namedParameters Object
|
|
467
467
|
* @param symbol Filter by the ERC-20 symbol for the token,
|
|
468
468
|
* e.g. "DAI" for Dai stablecoin
|
|
469
469
|
* @param address Filter by the ERC-20 contract address for the token,
|
|
@@ -586,7 +586,7 @@ export declare class OpenSeaPort {
|
|
|
586
586
|
* For a fungible token to use in trades (like W-ETH), get the amount
|
|
587
587
|
* approved for use by the Wyvern transfer proxy.
|
|
588
588
|
* Internal method exposed for dev flexibility.
|
|
589
|
-
* @param param0
|
|
589
|
+
* @param param0 __namedParameters Object
|
|
590
590
|
* @param accountAddress Address for the user's wallet
|
|
591
591
|
* @param tokenAddress Address for the token's contract
|
|
592
592
|
* @param proxyAddress User's proxy address. If undefined, uses the token transfer proxy address
|
|
@@ -669,7 +669,7 @@ export declare class OpenSeaPort {
|
|
|
669
669
|
}): UnsignedOrder;
|
|
670
670
|
/**
|
|
671
671
|
* Validate against Wyvern that a buy and sell order can match
|
|
672
|
-
* @param param0
|
|
672
|
+
* @param param0 __namedParameters Object
|
|
673
673
|
* @param buy The buy order to validate
|
|
674
674
|
* @param sell The sell order to validate
|
|
675
675
|
* @param accountAddress Address for the user's wallet
|
|
@@ -705,7 +705,7 @@ export declare class OpenSeaPort {
|
|
|
705
705
|
wyAssets: WyvernAsset[];
|
|
706
706
|
accountAddress: string;
|
|
707
707
|
proxyAddress?: string;
|
|
708
|
-
}): Promise<(string | null)[]>;
|
|
708
|
+
}): Promise<(string | null | undefined)[]>;
|
|
709
709
|
_buyOrderValidationAndApprovals({ order, counterOrder, accountAddress }: {
|
|
710
710
|
order: UnhashedOrder;
|
|
711
711
|
counterOrder?: Order;
|
|
@@ -749,7 +749,7 @@ export declare class OpenSeaPort {
|
|
|
749
749
|
*/
|
|
750
750
|
private _validateFees;
|
|
751
751
|
/**
|
|
752
|
-
* Get the listing and expiration time
|
|
752
|
+
* Get the listing and expiration time parameters for a new order
|
|
753
753
|
* @param expirationTimestamp Timestamp to expire the order (in seconds), or 0 for non-expiring
|
|
754
754
|
* @param listingTimestamp Timestamp to start the order (in seconds), or undefined to start it now
|
|
755
755
|
* @param waitingForBestCounterOrder Whether this order should be hidden until the best match is found
|
package/lib/seaport.js
CHANGED
|
@@ -926,7 +926,7 @@ var OpenSeaPort = /** @class */ (function () {
|
|
|
926
926
|
* Requires an account to be initialized first.
|
|
927
927
|
* Called internally, but exposed for dev flexibility.
|
|
928
928
|
* Checks to see if already approved, first. Then tries different approval methods from best to worst.
|
|
929
|
-
* @param param0
|
|
929
|
+
* @param param0 __namedParameters Object
|
|
930
930
|
* @param tokenId Token id to approve, but only used if approve-all isn't
|
|
931
931
|
* supported by the token contract
|
|
932
932
|
* @param tokenAddress The contract address of the token being approved
|
|
@@ -1096,7 +1096,7 @@ var OpenSeaPort = /** @class */ (function () {
|
|
|
1096
1096
|
* Approve a fungible token (e.g. W-ETH) for use in trades.
|
|
1097
1097
|
* Called internally, but exposed for dev flexibility.
|
|
1098
1098
|
* Checks to see if the minimum amount is already approved, first.
|
|
1099
|
-
* @param param0
|
|
1099
|
+
* @param param0 __namedParameters Object
|
|
1100
1100
|
* @param accountAddress The user's wallet address
|
|
1101
1101
|
* @param tokenAddress The contract address of the token being approved
|
|
1102
1102
|
* @param proxyAddress The user's proxy address. If unspecified, uses the Wyvern token transfer proxy address.
|
|
@@ -1176,7 +1176,7 @@ var OpenSeaPort = /** @class */ (function () {
|
|
|
1176
1176
|
* Called internally, but exposed for dev flexibility.
|
|
1177
1177
|
* Useful for old ERC20s that require a 0 approval count before
|
|
1178
1178
|
* changing the count
|
|
1179
|
-
* @param param0
|
|
1179
|
+
* @param param0 __namedParameters Object
|
|
1180
1180
|
* @param accountAddress The user's wallet address
|
|
1181
1181
|
* @param tokenAddress The contract address of the token being approved
|
|
1182
1182
|
* @param proxyAddress The user's proxy address. If unspecified, uses the Wyvern token transfer proxy address.
|
|
@@ -1244,7 +1244,7 @@ var OpenSeaPort = /** @class */ (function () {
|
|
|
1244
1244
|
* An order may not be fulfillable if a target item's transfer function
|
|
1245
1245
|
* is locked for some reason, e.g. an item is being rented within a game
|
|
1246
1246
|
* or trading has been locked for an item type.
|
|
1247
|
-
* @param param0
|
|
1247
|
+
* @param param0 __namedParameters Object
|
|
1248
1248
|
* @param order Order to check
|
|
1249
1249
|
* @param accountAddress The account address that will be fulfilling the order
|
|
1250
1250
|
* @param recipientAddress The optional address to receive the order's item(s) or curriencies. If not specified, defaults to accountAddress.
|
|
@@ -1278,7 +1278,7 @@ var OpenSeaPort = /** @class */ (function () {
|
|
|
1278
1278
|
* An asset may not be transferrable if its transfer function
|
|
1279
1279
|
* is locked for some reason, e.g. an item is being rented within a game
|
|
1280
1280
|
* or trading has been locked for an item type.
|
|
1281
|
-
* @param param0
|
|
1281
|
+
* @param param0 __namedParameters Object
|
|
1282
1282
|
* @param tokenId DEPRECATED: Token ID. Use `asset` instead.
|
|
1283
1283
|
* @param tokenAddress DEPRECATED: Address of the token's contract. Use `asset` instead.
|
|
1284
1284
|
* @param asset The asset to trade
|
|
@@ -1444,7 +1444,7 @@ var OpenSeaPort = /** @class */ (function () {
|
|
|
1444
1444
|
};
|
|
1445
1445
|
/**
|
|
1446
1446
|
* Get known payment tokens (ERC-20) that match your filters.
|
|
1447
|
-
* @param param0
|
|
1447
|
+
* @param param0 __namedParameters Object
|
|
1448
1448
|
* @param symbol Filter by the ERC-20 symbol for the token,
|
|
1449
1449
|
* e.g. "DAI" for Dai stablecoin
|
|
1450
1450
|
* @param address Filter by the ERC-20 contract address for the token,
|
|
@@ -1888,7 +1888,7 @@ var OpenSeaPort = /** @class */ (function () {
|
|
|
1888
1888
|
* For a fungible token to use in trades (like W-ETH), get the amount
|
|
1889
1889
|
* approved for use by the Wyvern transfer proxy.
|
|
1890
1890
|
* Internal method exposed for dev flexibility.
|
|
1891
|
-
* @param param0
|
|
1891
|
+
* @param param0 __namedParameters Object
|
|
1892
1892
|
* @param accountAddress Address for the user's wallet
|
|
1893
1893
|
* @param tokenAddress Address for the token's contract
|
|
1894
1894
|
* @param proxyAddress User's proxy address. If undefined, uses the token transfer proxy address
|
|
@@ -2341,7 +2341,7 @@ var OpenSeaPort = /** @class */ (function () {
|
|
|
2341
2341
|
};
|
|
2342
2342
|
/**
|
|
2343
2343
|
* Validate against Wyvern that a buy and sell order can match
|
|
2344
|
-
* @param param0
|
|
2344
|
+
* @param param0 __namedParameters Object
|
|
2345
2345
|
* @param buy The buy order to validate
|
|
2346
2346
|
* @param sell The sell order to validate
|
|
2347
2347
|
* @param accountAddress Address for the user's wallet
|
|
@@ -2810,7 +2810,7 @@ var OpenSeaPort = /** @class */ (function () {
|
|
|
2810
2810
|
}
|
|
2811
2811
|
};
|
|
2812
2812
|
/**
|
|
2813
|
-
* Get the listing and expiration time
|
|
2813
|
+
* Get the listing and expiration time parameters for a new order
|
|
2814
2814
|
* @param expirationTimestamp Timestamp to expire the order (in seconds), or 0 for non-expiring
|
|
2815
2815
|
* @param listingTimestamp Timestamp to start the order (in seconds), or undefined to start it now
|
|
2816
2816
|
* @param waitingForBestCounterOrder Whether this order should be hidden until the best match is found
|
package/lib/types.d.ts
CHANGED
package/lib/types.js
CHANGED
|
@@ -94,6 +94,7 @@ var WyvernSchemaName;
|
|
|
94
94
|
(function (WyvernSchemaName) {
|
|
95
95
|
WyvernSchemaName["ERC20"] = "ERC20";
|
|
96
96
|
WyvernSchemaName["ERC721"] = "ERC721";
|
|
97
|
+
WyvernSchemaName["ERC721v3"] = "ERC721v3";
|
|
97
98
|
WyvernSchemaName["ERC1155"] = "ERC1155";
|
|
98
99
|
WyvernSchemaName["LegacyEnjin"] = "Enjin";
|
|
99
100
|
WyvernSchemaName["ENSShortNameAuction"] = "ENSShortNameAuction";
|
package/lib/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAEA,6CAM4B;AAK1B,wFAVA,eAAO,OAUA;AACP,0FAVA,iBAAS,OAUA;AAIX;;;;;;;;;;;;;;GAcG;AACH,IAAY,SAiCX;AAjCD,WAAY,SAAS;IACnB,sCAAsC;IACtC,sDAAyC,CAAA;IACzC,0DAA6C,CAAA;IAC7C,oDAAuC,CAAA;IACvC,oDAAuC,CAAA;IAEvC,yBAAyB;IACzB,oDAAuC,CAAA;IACvC,gCAAmB,CAAA;IACnB,sCAAyB,CAAA;IACzB,gDAAmC,CAAA;IACnC,0CAA6B,CAAA;IAC7B,kDAAqC,CAAA;IACrC,oDAAuC,CAAA;IAEvC,yEAAyE;IACzE,wCAA2B,CAAA;IAC3B,wCAA2B,CAAA;IAC3B,0CAA6B,CAAA;IAC7B,wCAA2B,CAAA;IAC3B,oDAAoD;IACpD,wCAA2B,CAAA;IAE3B,uCAAuC;IACvC,wCAA2B,CAAA;IAC3B,wCAA2B,CAAA;IAE3B,mCAAmC;IACnC,sCAAyB,CAAA;IACzB,0CAA6B,CAAA;IAC7B,gDAAmC,CAAA;IACnC,8CAAiC,CAAA;AACnC,CAAC,EAjCW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAiCpB;AAwCD;;GAEG;AACH,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,uCAAO,CAAA;IACP,yCAAQ,CAAA;AACV,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB;AAED;;;;GAIG;AACH,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,uDAAe,CAAA;IACf,iDAAY,CAAA;AACd,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB;AAED;;;;GAIG;AACH,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,mDAAc,CAAA;I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,WAAW;IACrB,8BAAe,CAAA;IACf,kCAAmB,CAAA;IACnB,qCAAsB,CAAA;AACxB,CAAC,EAJW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAItB;AAED;;GAEG;AACH,IAAY,cAYX;AAZD,WAAY,cAAc;IACxB,4CAA0B,CAAA;IAC1B,kDAAgC,CAAA;IAChC,gDAA8B,CAAA;IAC9B,gDAA8B,CAAA;IAC9B,4CAA0B,CAAA;IAC1B,8CAA4B,CAAA;IAC5B,4CAA0B,CAAA;IAC1B,0CAAwB,CAAA;IACxB,4DAA0C,CAAA;IAC1C,mCAAiB,CAAA;IACjB,mCAAiB,CAAA;AACnB,CAAC,EAZW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAYzB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opensea-js",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6",
|
|
4
4
|
"description": "JavaScript SDK for the OpenSea marketplace. Let users buy or sell crypto collectibles and other cryptogoods, all on your own site!",
|
|
5
5
|
"files": [
|
|
6
6
|
"lib",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"web3": "0.20.7",
|
|
51
51
|
"webpack": "^3.10.0",
|
|
52
52
|
"wyvern-js": "git+https://github.com/ProjectOpenSea/wyvern-js.git#v3.2.1",
|
|
53
|
-
"wyvern-schemas": "git+https://github.com/ProjectOpenSea/wyvern-schemas.git#v0.
|
|
53
|
+
"wyvern-schemas": "git+https://github.com/ProjectOpenSea/wyvern-schemas.git#v0.13.1"
|
|
54
54
|
},
|
|
55
55
|
"husky": {
|
|
56
56
|
"hooks": {
|