New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

opensea-js

Package Overview
Dependencies
Maintainers
4
Versions
302
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opensea-js - npm Package Compare versions

Comparing version 7.0.7 to 7.0.8

12

lib/sdk.d.ts

@@ -90,2 +90,3 @@ import { Seaport } from "@opensea/seaport-js";

* @param options.paymentTokenAddress ERC20 address for the payment token in the order. If unspecified, defaults to WETH
* @param options.excludeOptionalCreatorFees If true, optional creator fees will be excluded from the offer. Default: false.
* @returns The {@link OrderV2} that was created.

@@ -98,3 +99,3 @@ *

*/
createOffer({ asset, accountAddress, startAmount, quantity, domain, salt, expirationTime, paymentTokenAddress, }: {
createOffer({ asset, accountAddress, startAmount, quantity, domain, salt, expirationTime, paymentTokenAddress, excludeOptionalCreatorFees, }: {
asset: AssetWithTokenId;

@@ -108,2 +109,3 @@ accountAddress: string;

paymentTokenAddress?: string;
excludeOptionalCreatorFees?: boolean;
}): Promise<OrderV2>;

@@ -125,2 +127,3 @@ /**

* @param options.englishAuction If true, the order will be listed as an English auction.
* @param options.excludeOptionalCreatorFees If true, optional creator fees will be excluded from the listing. Default: false.
* @returns The {@link OrderV2} that was created.

@@ -133,3 +136,3 @@ *

*/
createListing({ asset, accountAddress, startAmount, endAmount, quantity, domain, salt, listingTime, expirationTime, paymentTokenAddress, buyerAddress, englishAuction, }: {
createListing({ asset, accountAddress, startAmount, endAmount, quantity, domain, salt, listingTime, expirationTime, paymentTokenAddress, buyerAddress, englishAuction, excludeOptionalCreatorFees, }: {
asset: AssetWithTokenId;

@@ -147,2 +150,3 @@ accountAddress: string;

englishAuction?: boolean;
excludeOptionalCreatorFees?: boolean;
}): Promise<OrderV2>;

@@ -160,5 +164,6 @@ /**

* @param options.paymentTokenAddress ERC20 address for the payment token in the order. If unspecified, defaults to WETH.
* @param options.excludeOptionalCreatorFees If true, optional creator fees will be excluded from the offer. Default: false.
* @returns The {@link CollectionOffer} that was created.
*/
createCollectionOffer({ collectionSlug, accountAddress, amount, quantity, domain, salt, expirationTime, paymentTokenAddress, }: {
createCollectionOffer({ collectionSlug, accountAddress, amount, quantity, domain, salt, expirationTime, paymentTokenAddress, excludeOptionalCreatorFees, }: {
collectionSlug: string;

@@ -172,2 +177,3 @@ accountAddress: string;

paymentTokenAddress: string;
excludeOptionalCreatorFees?: boolean;
}): Promise<CollectionOffer | null>;

@@ -174,0 +180,0 @@ /**

@@ -137,4 +137,7 @@ "use strict";

}
async getFees({ collection, seller, paymentTokenAddress, startAmount, endAmount, }) {
const collectionFees = collection.fees;
async getFees({ collection, seller, paymentTokenAddress, startAmount, endAmount, excludeOptionalCreatorFees, }) {
let collectionFees = collection.fees;
if (excludeOptionalCreatorFees) {
collectionFees = collectionFees.filter((fee) => fee.required);
}
const collectionFeesBasisPoints = (0, utils_2.totalBasisPointsForFees)(collectionFees);

@@ -178,2 +181,3 @@ const sellerBasisPoints = constants_2.INVERSE_BASIS_POINT - collectionFeesBasisPoints;

* @param options.paymentTokenAddress ERC20 address for the payment token in the order. If unspecified, defaults to WETH
* @param options.excludeOptionalCreatorFees If true, optional creator fees will be excluded from the offer. Default: false.
* @returns The {@link OrderV2} that was created.

@@ -186,3 +190,3 @@ *

*/
async createOffer({ asset, accountAddress, startAmount, quantity = 1, domain, salt, expirationTime, paymentTokenAddress = (0, utils_2.getWETHAddress)(this.chain), }) {
async createOffer({ asset, accountAddress, startAmount, quantity = 1, domain, salt, expirationTime, paymentTokenAddress = (0, utils_2.getWETHAddress)(this.chain), excludeOptionalCreatorFees = false, }) {
await this._requireAccountIsAvailable(accountAddress);

@@ -197,2 +201,3 @@ const { nft } = await this.api.getNFT(asset.tokenAddress, asset.tokenId);

startAmount: basePrice,
excludeOptionalCreatorFees,
});

@@ -238,2 +243,3 @@ const { executeAllActions } = await this.seaport_v1_5.createOrder({

* @param options.englishAuction If true, the order will be listed as an English auction.
* @param options.excludeOptionalCreatorFees If true, optional creator fees will be excluded from the listing. Default: false.
* @returns The {@link OrderV2} that was created.

@@ -246,3 +252,3 @@ *

*/
async createListing({ asset, accountAddress, startAmount, endAmount, quantity = 1, domain, salt, listingTime, expirationTime, paymentTokenAddress = ethers_1.ethers.ZeroAddress, buyerAddress, englishAuction, }) {
async createListing({ asset, accountAddress, startAmount, endAmount, quantity = 1, domain, salt, listingTime, expirationTime, paymentTokenAddress = ethers_1.ethers.ZeroAddress, buyerAddress, englishAuction, excludeOptionalCreatorFees = false, }) {
await this._requireAccountIsAvailable(accountAddress);

@@ -262,2 +268,3 @@ const { nft } = await this.api.getNFT(asset.tokenAddress, asset.tokenId);

endAmount: endPrice,
excludeOptionalCreatorFees,
});

@@ -301,5 +308,6 @@ if (buyerAddress) {

* @param options.paymentTokenAddress ERC20 address for the payment token in the order. If unspecified, defaults to WETH.
* @param options.excludeOptionalCreatorFees If true, optional creator fees will be excluded from the offer. Default: false.
* @returns The {@link CollectionOffer} that was created.
*/
async createCollectionOffer({ collectionSlug, accountAddress, amount, quantity, domain, salt, expirationTime, paymentTokenAddress, }) {
async createCollectionOffer({ collectionSlug, accountAddress, amount, quantity, domain, salt, expirationTime, paymentTokenAddress = (0, utils_2.getWETHAddress)(this.chain), excludeOptionalCreatorFees = false, }) {
await this._requireAccountIsAvailable(accountAddress);

@@ -321,2 +329,3 @@ const collection = await this.api.getCollection(collectionSlug);

endAmount: basePrice,
excludeOptionalCreatorFees,
});

@@ -323,0 +332,0 @@ const considerationItems = [

{
"name": "opensea-js",
"version": "7.0.7",
"version": "7.0.8",
"description": "TypeScript SDK for the OpenSea marketplace helps developers build new experiences using NFTs and our marketplace data",

@@ -52,3 +52,3 @@ "license": "MIT",

"@typescript-eslint/parser": "^6.0.0",
"chai": "4.3.10",
"chai": "^4.4.1",
"chai-as-promised": "^7.1.1",

@@ -69,3 +69,3 @@ "concurrently": "^8.2.0",

"prettier-package-json": "^2.8.0",
"ts-node": "10.9.2",
"ts-node": "^10.9.2",
"typechain": "^8.0.0",

@@ -81,10 +81,10 @@ "typedoc": "^0.25.0",

"javascript",
"typescript",
"marketplace",
"nft",
"node",
"non-fungible-tokens",
"project-opensea",
"non-fungible tokens",
"opensea",
"sdk",
"smart-contracts"
"smart contracts",
"typescript"
],

@@ -91,0 +91,0 @@ "engines": {

@@ -259,2 +259,3 @@ import EventEmitter = require("events");

endAmount,
excludeOptionalCreatorFees,
}: {

@@ -266,4 +267,8 @@ collection: OpenSeaCollection;

endAmount?: bigint;
excludeOptionalCreatorFees?: boolean;
}): Promise<ConsiderationInputItem[]> {
const collectionFees = collection.fees;
let collectionFees = collection.fees;
if (excludeOptionalCreatorFees) {
collectionFees = collectionFees.filter((fee) => fee.required);
}
const collectionFeesBasisPoints = totalBasisPointsForFees(collectionFees);

@@ -325,2 +330,3 @@ const sellerBasisPoints = INVERSE_BASIS_POINT - collectionFeesBasisPoints;

* @param options.paymentTokenAddress ERC20 address for the payment token in the order. If unspecified, defaults to WETH
* @param options.excludeOptionalCreatorFees If true, optional creator fees will be excluded from the offer. Default: false.
* @returns The {@link OrderV2} that was created.

@@ -342,2 +348,3 @@ *

paymentTokenAddress = getWETHAddress(this.chain),
excludeOptionalCreatorFees = false,
}: {

@@ -352,2 +359,3 @@ asset: AssetWithTokenId;

paymentTokenAddress?: string;
excludeOptionalCreatorFees?: boolean;
}): Promise<OrderV2> {

@@ -375,2 +383,3 @@ await this._requireAccountIsAvailable(accountAddress);

startAmount: basePrice,
excludeOptionalCreatorFees,
});

@@ -423,2 +432,3 @@

* @param options.englishAuction If true, the order will be listed as an English auction.
* @param options.excludeOptionalCreatorFees If true, optional creator fees will be excluded from the listing. Default: false.
* @returns The {@link OrderV2} that was created.

@@ -444,2 +454,3 @@ *

englishAuction,
excludeOptionalCreatorFees = false,
}: {

@@ -458,2 +469,3 @@ asset: AssetWithTokenId;

englishAuction?: boolean;
excludeOptionalCreatorFees?: boolean;
}): Promise<OrderV2> {

@@ -487,2 +499,3 @@ await this._requireAccountIsAvailable(accountAddress);

endAmount: endPrice,
excludeOptionalCreatorFees,
});

@@ -536,2 +549,3 @@

* @param options.paymentTokenAddress ERC20 address for the payment token in the order. If unspecified, defaults to WETH.
* @param options.excludeOptionalCreatorFees If true, optional creator fees will be excluded from the offer. Default: false.
* @returns The {@link CollectionOffer} that was created.

@@ -547,3 +561,4 @@ */

expirationTime,
paymentTokenAddress,
paymentTokenAddress = getWETHAddress(this.chain),
excludeOptionalCreatorFees = false,
}: {

@@ -558,2 +573,3 @@ collectionSlug: string;

paymentTokenAddress: string;
excludeOptionalCreatorFees?: boolean;
}): Promise<CollectionOffer | null> {

@@ -587,2 +603,3 @@ await this._requireAccountIsAvailable(accountAddress);

endAmount: basePrice,
excludeOptionalCreatorFees,
});

@@ -589,0 +606,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc