@tradeport/sui-trading-sdk 0.4.50 → 0.4.52
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/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +6 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/SuiTradingClient.ts +3 -1
- package/src/methods/buyListings/addBuyListingTxs.ts +4 -10
package/dist/index.d.mts
CHANGED
|
@@ -201,6 +201,7 @@ type ApiConfig = {
|
|
|
201
201
|
apiUser: string;
|
|
202
202
|
apiKey: string;
|
|
203
203
|
apiUrl: string;
|
|
204
|
+
apiVercelId?: string;
|
|
204
205
|
suiNodeUrl?: string;
|
|
205
206
|
graphQLClient?: GraphQLClient;
|
|
206
207
|
};
|
|
@@ -210,7 +211,7 @@ declare class SuiTradingClient {
|
|
|
210
211
|
private readonly suiClient;
|
|
211
212
|
private readonly kioskClient;
|
|
212
213
|
private readonly allowedApiUsersForUnsharedKiosksMigration;
|
|
213
|
-
constructor({ apiUser, apiKey, apiUrl, suiNodeUrl, graphQLClient }: ApiConfig);
|
|
214
|
+
constructor({ apiUser, apiKey, apiVercelId, apiUrl, suiNodeUrl, graphQLClient }: ApiConfig);
|
|
214
215
|
buyListings({ listingIds, walletAddress, tx }: BuyListings): Promise<Transaction>;
|
|
215
216
|
listNfts({ nfts, walletAddress }: ListNfts): Promise<Transaction>;
|
|
216
217
|
unlistListings({ listingIds, walletAddress }: UnlistListings): Promise<Transaction>;
|
package/dist/index.d.ts
CHANGED
|
@@ -201,6 +201,7 @@ type ApiConfig = {
|
|
|
201
201
|
apiUser: string;
|
|
202
202
|
apiKey: string;
|
|
203
203
|
apiUrl: string;
|
|
204
|
+
apiVercelId?: string;
|
|
204
205
|
suiNodeUrl?: string;
|
|
205
206
|
graphQLClient?: GraphQLClient;
|
|
206
207
|
};
|
|
@@ -210,7 +211,7 @@ declare class SuiTradingClient {
|
|
|
210
211
|
private readonly suiClient;
|
|
211
212
|
private readonly kioskClient;
|
|
212
213
|
private readonly allowedApiUsersForUnsharedKiosksMigration;
|
|
213
|
-
constructor({ apiUser, apiKey, apiUrl, suiNodeUrl, graphQLClient }: ApiConfig);
|
|
214
|
+
constructor({ apiUser, apiKey, apiVercelId, apiUrl, suiNodeUrl, graphQLClient }: ApiConfig);
|
|
214
215
|
buyListings({ listingIds, walletAddress, tx }: BuyListings): Promise<Transaction>;
|
|
215
216
|
listNfts({ nfts, walletAddress }: ListNfts): Promise<Transaction>;
|
|
216
217
|
unlistListings({ listingIds, walletAddress }: UnlistListings): Promise<Transaction>;
|
package/dist/index.js
CHANGED
|
@@ -4509,15 +4509,9 @@ async function addTradePortBuyTxHandler(txData) {
|
|
|
4509
4509
|
kioskTx
|
|
4510
4510
|
});
|
|
4511
4511
|
if (txData?.collectionId === XOCIETY_FRONTIER_COLLECTION_ID) {
|
|
4512
|
-
const borrowedItem =
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
kioskTx,
|
|
4516
|
-
kioskClient: txData?.kioskClient,
|
|
4517
|
-
nftTokenId: txData?.nftTokenId,
|
|
4518
|
-
nftType: txData?.nftType,
|
|
4519
|
-
suiClient: txData?.suiClient,
|
|
4520
|
-
kioskOwner: txData?.buyer
|
|
4512
|
+
const borrowedItem = kioskTx.take({
|
|
4513
|
+
itemId: txData?.nftTokenId,
|
|
4514
|
+
itemType: txData?.nftType
|
|
4521
4515
|
});
|
|
4522
4516
|
txData?.tx.transferObjects(
|
|
4523
4517
|
[txData?.tx.object(borrowedItem)],
|
|
@@ -7554,7 +7548,7 @@ var sponsorNftListing = async ({ nftTokenId, walletAddress, options }, context)
|
|
|
7554
7548
|
|
|
7555
7549
|
// src/SuiTradingClient.ts
|
|
7556
7550
|
var SuiTradingClient = class {
|
|
7557
|
-
constructor({ apiUser, apiKey, apiUrl, suiNodeUrl, graphQLClient }) {
|
|
7551
|
+
constructor({ apiUser, apiKey, apiVercelId, apiUrl, suiNodeUrl, graphQLClient }) {
|
|
7558
7552
|
this.allowedApiUsersForUnsharedKiosksMigration = ["tradeport.xyz", "mercato.xyz"];
|
|
7559
7553
|
this.apiUser = apiUser;
|
|
7560
7554
|
this.apiKey = apiKey;
|
|
@@ -7567,7 +7561,8 @@ var SuiTradingClient = class {
|
|
|
7567
7561
|
}
|
|
7568
7562
|
getGraphqlClient().setHeaders({
|
|
7569
7563
|
"x-api-user": apiUser,
|
|
7570
|
-
"x-api-key": apiKey
|
|
7564
|
+
"x-api-key": apiKey,
|
|
7565
|
+
...apiVercelId && { "x-vercel-id": apiVercelId }
|
|
7571
7566
|
});
|
|
7572
7567
|
}
|
|
7573
7568
|
async buyListings({ listingIds, walletAddress, tx }) {
|