@tradeport/sui-trading-sdk 0.4.49 → 0.4.51
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 +65 -62
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/SuiTradingClient.ts +5 -2
- package/src/apiClients/graphqlClient.ts +11 -3
- package/src/graphql/gqlChainRequest.ts +1 -0
- package/src/methods/buyListings/addBuyListingTxs.ts +4 -10
package/dist/index.d.mts
CHANGED
|
@@ -200,6 +200,7 @@ type WithdrawProfitsFromKiosks = {
|
|
|
200
200
|
type ApiConfig = {
|
|
201
201
|
apiUser: string;
|
|
202
202
|
apiKey: string;
|
|
203
|
+
apiUrl: string;
|
|
203
204
|
suiNodeUrl?: string;
|
|
204
205
|
graphQLClient?: GraphQLClient;
|
|
205
206
|
};
|
|
@@ -209,7 +210,7 @@ declare class SuiTradingClient {
|
|
|
209
210
|
private readonly suiClient;
|
|
210
211
|
private readonly kioskClient;
|
|
211
212
|
private readonly allowedApiUsersForUnsharedKiosksMigration;
|
|
212
|
-
constructor({ apiUser, apiKey, suiNodeUrl, graphQLClient }: ApiConfig);
|
|
213
|
+
constructor({ apiUser, apiKey, apiUrl, suiNodeUrl, graphQLClient }: ApiConfig);
|
|
213
214
|
buyListings({ listingIds, walletAddress, tx }: BuyListings): Promise<Transaction>;
|
|
214
215
|
listNfts({ nfts, walletAddress }: ListNfts): Promise<Transaction>;
|
|
215
216
|
unlistListings({ listingIds, walletAddress }: UnlistListings): Promise<Transaction>;
|
package/dist/index.d.ts
CHANGED
|
@@ -200,6 +200,7 @@ type WithdrawProfitsFromKiosks = {
|
|
|
200
200
|
type ApiConfig = {
|
|
201
201
|
apiUser: string;
|
|
202
202
|
apiKey: string;
|
|
203
|
+
apiUrl: string;
|
|
203
204
|
suiNodeUrl?: string;
|
|
204
205
|
graphQLClient?: GraphQLClient;
|
|
205
206
|
};
|
|
@@ -209,7 +210,7 @@ declare class SuiTradingClient {
|
|
|
209
210
|
private readonly suiClient;
|
|
210
211
|
private readonly kioskClient;
|
|
211
212
|
private readonly allowedApiUsersForUnsharedKiosksMigration;
|
|
212
|
-
constructor({ apiUser, apiKey, suiNodeUrl, graphQLClient }: ApiConfig);
|
|
213
|
+
constructor({ apiUser, apiKey, apiUrl, suiNodeUrl, graphQLClient }: ApiConfig);
|
|
213
214
|
buyListings({ listingIds, walletAddress, tx }: BuyListings): Promise<Transaction>;
|
|
214
215
|
listNfts({ nfts, walletAddress }: ListNfts): Promise<Transaction>;
|
|
215
216
|
unlistListings({ listingIds, walletAddress }: UnlistListings): Promise<Transaction>;
|
package/dist/index.js
CHANGED
|
@@ -36,6 +36,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
36
36
|
|
|
37
37
|
// src/SuiTradingClient.ts
|
|
38
38
|
var import_client2 = require("@mysten/sui/client");
|
|
39
|
+
var import_graphql_request22 = require("graphql-request");
|
|
39
40
|
|
|
40
41
|
// src/apiClients/createKioskClient.ts
|
|
41
42
|
var import_kiosk = require("@mysten/kiosk");
|
|
@@ -52,15 +53,21 @@ var createSuiClient = (url) => new import_client.SuiClient({ url });
|
|
|
52
53
|
var createSuiClient_default = createSuiClient;
|
|
53
54
|
|
|
54
55
|
// src/apiClients/graphqlClient.ts
|
|
55
|
-
var
|
|
56
|
-
var
|
|
57
|
-
|
|
56
|
+
var graphqlClient;
|
|
57
|
+
var getGraphqlClient = () => {
|
|
58
|
+
if (!graphqlClient) {
|
|
59
|
+
throw new Error(
|
|
60
|
+
"GraphQL client not initialized. Please provide apiUrl to SuiTradingClient constructor."
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
return graphqlClient;
|
|
64
|
+
};
|
|
58
65
|
function setGraphqlClient(client) {
|
|
59
66
|
graphqlClient = client;
|
|
60
67
|
}
|
|
61
68
|
|
|
62
69
|
// src/graphql/createChainGQLQuery.ts
|
|
63
|
-
var
|
|
70
|
+
var import_graphql_request = require("graphql-request");
|
|
64
71
|
function createChainGQLQuery({ chain, query }) {
|
|
65
72
|
const regex = /query\s+(\w+)\s*\((.*?)\)\s*{([\s\S]*)}/;
|
|
66
73
|
const matches = regex.exec(query);
|
|
@@ -74,7 +81,7 @@ function createChainGQLQuery({ chain, query }) {
|
|
|
74
81
|
const wrappedBody = `${chain} {
|
|
75
82
|
${body}
|
|
76
83
|
}`;
|
|
77
|
-
return
|
|
84
|
+
return import_graphql_request.gql`query ${queryName}${args} {\n${wrappedBody}\n}`;
|
|
78
85
|
}
|
|
79
86
|
|
|
80
87
|
// src/graphql/gqlChainRequest.ts
|
|
@@ -90,8 +97,8 @@ var gqlChainRequest = async ({ chain, query, variables }) => {
|
|
|
90
97
|
};
|
|
91
98
|
|
|
92
99
|
// src/graphql/queries/fetchCollectionBidById.ts
|
|
93
|
-
var
|
|
94
|
-
var fetchCollectionBidsById =
|
|
100
|
+
var import_graphql_request2 = require("graphql-request");
|
|
101
|
+
var fetchCollectionBidsById = import_graphql_request2.gql`
|
|
95
102
|
query fetchCollectionBidsById($bidIds: [uuid!]) {
|
|
96
103
|
bids(where: { id: { _in: $bidIds } }) {
|
|
97
104
|
nonce
|
|
@@ -112,8 +119,8 @@ var fetchCollectionBidsById = import_graphql_request3.gql`
|
|
|
112
119
|
`;
|
|
113
120
|
|
|
114
121
|
// src/graphql/queries/fetchCollectionBidsAtSamePrice.ts
|
|
115
|
-
var
|
|
116
|
-
var fetchCollectionBidsAtSamePrice =
|
|
122
|
+
var import_graphql_request3 = require("graphql-request");
|
|
123
|
+
var fetchCollectionBidsAtSamePrice = import_graphql_request3.gql`
|
|
117
124
|
query fetchCollectionBidsAtSamePrice($collectionId: uuid!, $price: numeric) {
|
|
118
125
|
bids(
|
|
119
126
|
where: {
|
|
@@ -1147,8 +1154,8 @@ var DYNAMIC_COLLECTION_IDS = [
|
|
|
1147
1154
|
var XOCIETY_FRONTIER_COLLECTION_ID = "9a0fcf4f-c77c-42d8-acad-5054e025eb53";
|
|
1148
1155
|
|
|
1149
1156
|
// src/graphql/queries/fetchNftsById.ts
|
|
1150
|
-
var
|
|
1151
|
-
var fetchNftById =
|
|
1157
|
+
var import_graphql_request4 = require("graphql-request");
|
|
1158
|
+
var fetchNftById = import_graphql_request4.gql`
|
|
1152
1159
|
query fetchNftById($nftId: uuid!) {
|
|
1153
1160
|
nfts(where: { id: { _eq: $nftId } }) {
|
|
1154
1161
|
id
|
|
@@ -1173,7 +1180,7 @@ var fetchNftById = import_graphql_request5.gql`
|
|
|
1173
1180
|
}
|
|
1174
1181
|
}
|
|
1175
1182
|
`;
|
|
1176
|
-
var fetchNftsById =
|
|
1183
|
+
var fetchNftsById = import_graphql_request4.gql`
|
|
1177
1184
|
query fetchNftsById($nftIds: [uuid!]) {
|
|
1178
1185
|
nfts(where: { id: { _in: $nftIds } }) {
|
|
1179
1186
|
id
|
|
@@ -1193,7 +1200,7 @@ var fetchNftsById = import_graphql_request5.gql`
|
|
|
1193
1200
|
}
|
|
1194
1201
|
}
|
|
1195
1202
|
`;
|
|
1196
|
-
var fetchNftsWithListingsById =
|
|
1203
|
+
var fetchNftsWithListingsById = import_graphql_request4.gql`
|
|
1197
1204
|
query fetchNftsWithListingsById($nftIds: [uuid!]) {
|
|
1198
1205
|
nfts(where: { id: { _in: $nftIds } }) {
|
|
1199
1206
|
id
|
|
@@ -1238,8 +1245,8 @@ var getNftType = ({
|
|
|
1238
1245
|
};
|
|
1239
1246
|
|
|
1240
1247
|
// src/graphql/queries/fetchSharedObjectsByType.ts
|
|
1241
|
-
var
|
|
1242
|
-
var fetchSharedObjectsByType =
|
|
1248
|
+
var import_graphql_request5 = require("graphql-request");
|
|
1249
|
+
var fetchSharedObjectsByType = import_graphql_request5.gql`
|
|
1243
1250
|
query fetchSharedObjectsByType($type: String!) {
|
|
1244
1251
|
sharedObjects: shared_objects_by_type(type: $type) {
|
|
1245
1252
|
id
|
|
@@ -1369,8 +1376,8 @@ var isSingleBid = (bidType) => {
|
|
|
1369
1376
|
};
|
|
1370
1377
|
|
|
1371
1378
|
// src/graphql/queries/fetchKiosksByOwner.ts
|
|
1372
|
-
var
|
|
1373
|
-
var fetchKiosksByOwner =
|
|
1379
|
+
var import_graphql_request6 = require("graphql-request");
|
|
1380
|
+
var fetchKiosksByOwner = import_graphql_request6.gql`
|
|
1374
1381
|
query fetchKiosksByOwner($ownerAddress: String!) {
|
|
1375
1382
|
kiosks: kiosks_by_owner_address(owner_address: $ownerAddress) {
|
|
1376
1383
|
id
|
|
@@ -1484,8 +1491,8 @@ var isTradePortKioskBid = (bidType) => bidType === TRADEPORT_KIOSK_BID_NONCE_TYP
|
|
|
1484
1491
|
var import_kiosk3 = require("@mysten/kiosk");
|
|
1485
1492
|
|
|
1486
1493
|
// src/graphql/queries/fetchOwnerCapByKiosk.ts
|
|
1487
|
-
var
|
|
1488
|
-
var fetchOwnerCapByKiosk =
|
|
1494
|
+
var import_graphql_request7 = require("graphql-request");
|
|
1495
|
+
var fetchOwnerCapByKiosk = import_graphql_request7.gql`
|
|
1489
1496
|
query fetchOwnerCapByKiosk($kioskId: String!) {
|
|
1490
1497
|
ownerCap: kiosk_owner_cap_by_kiosk(kiosk_id: $kioskId) {
|
|
1491
1498
|
id
|
|
@@ -1495,8 +1502,8 @@ var fetchOwnerCapByKiosk = import_graphql_request8.gql`
|
|
|
1495
1502
|
`;
|
|
1496
1503
|
|
|
1497
1504
|
// src/graphql/queries/fetchPersonalCapByKiosk.ts
|
|
1498
|
-
var
|
|
1499
|
-
var fetchPersonalCapByKiosk =
|
|
1505
|
+
var import_graphql_request8 = require("graphql-request");
|
|
1506
|
+
var fetchPersonalCapByKiosk = import_graphql_request8.gql`
|
|
1500
1507
|
query fetchPersonalCapByKiosk($kioskId: String!) {
|
|
1501
1508
|
personalCap: personal_kiosk_cap_by_kiosk(kiosk_id: $kioskId) {
|
|
1502
1509
|
id
|
|
@@ -2086,8 +2093,8 @@ var createOBKiosk = async ({ tx, createMethod = "new" }) => {
|
|
|
2086
2093
|
};
|
|
2087
2094
|
|
|
2088
2095
|
// src/graphql/queries/fetchWalletKiosks.ts
|
|
2089
|
-
var
|
|
2090
|
-
var fetchWalletKiosks =
|
|
2096
|
+
var import_graphql_request9 = require("graphql-request");
|
|
2097
|
+
var fetchWalletKiosks = import_graphql_request9.gql`
|
|
2091
2098
|
query fetchWalletKiosks($wallet: String!) {
|
|
2092
2099
|
kiosks: kiosks_by_owner_address(owner_address: $wallet) {
|
|
2093
2100
|
id
|
|
@@ -2183,8 +2190,8 @@ var getObjectType = async ({
|
|
|
2183
2190
|
var import_utils3 = require("@mysten/sui/utils");
|
|
2184
2191
|
|
|
2185
2192
|
// src/graphql/queries/fetchMultibidById.ts
|
|
2186
|
-
var
|
|
2187
|
-
var fetchMultibidChainIdById =
|
|
2193
|
+
var import_graphql_request10 = require("graphql-request");
|
|
2194
|
+
var fetchMultibidChainIdById = import_graphql_request10.gql`
|
|
2188
2195
|
query fetchMultibidById($multiBidId: uuid!) {
|
|
2189
2196
|
multi_bids(where: { id: { _eq: $multiBidId } }) {
|
|
2190
2197
|
chain_id
|
|
@@ -2192,7 +2199,7 @@ var fetchMultibidChainIdById = import_graphql_request11.gql`
|
|
|
2192
2199
|
}
|
|
2193
2200
|
}
|
|
2194
2201
|
`;
|
|
2195
|
-
var fetchMultibidChainIdAndSingleBidsById =
|
|
2202
|
+
var fetchMultibidChainIdAndSingleBidsById = import_graphql_request10.gql`
|
|
2196
2203
|
query fetchMultibidChainIdAndSingleBidsById($multiBidId: uuid!) {
|
|
2197
2204
|
multi_bids(where: { id: { _eq: $multiBidId } }) {
|
|
2198
2205
|
chain_id
|
|
@@ -2203,7 +2210,7 @@ var fetchMultibidChainIdAndSingleBidsById = import_graphql_request11.gql`
|
|
|
2203
2210
|
}
|
|
2204
2211
|
}
|
|
2205
2212
|
`;
|
|
2206
|
-
var fetchMultibidChainIdAndExpiredSingleBidsById =
|
|
2213
|
+
var fetchMultibidChainIdAndExpiredSingleBidsById = import_graphql_request10.gql`
|
|
2207
2214
|
query fetchMultibidChainIdAndExpiredSingleBidsById($multiBidId: uuid!, $expiredBidLimit: Int!) {
|
|
2208
2215
|
multi_bids(where: { id: { _eq: $multiBidId } }) {
|
|
2209
2216
|
chain_id
|
|
@@ -3342,8 +3349,8 @@ var acceptCollectionBid = async ({
|
|
|
3342
3349
|
var import_transactions3 = require("@mysten/sui/transactions");
|
|
3343
3350
|
|
|
3344
3351
|
// src/graphql/queries/fetchBidsById.ts
|
|
3345
|
-
var
|
|
3346
|
-
var fetchBidsById =
|
|
3352
|
+
var import_graphql_request11 = require("graphql-request");
|
|
3353
|
+
var fetchBidsById = import_graphql_request11.gql`
|
|
3347
3354
|
query fetchBidsById($bidIds: [uuid!]) {
|
|
3348
3355
|
bids(where: { id: { _in: $bidIds } }) {
|
|
3349
3356
|
nonce
|
|
@@ -3509,8 +3516,8 @@ function calculateRoyaltyFee(transferPolicyRules, price) {
|
|
|
3509
3516
|
}
|
|
3510
3517
|
|
|
3511
3518
|
// src/graphql/queries/fetchLockById.ts
|
|
3512
|
-
var
|
|
3513
|
-
var fetchLockById =
|
|
3519
|
+
var import_graphql_request12 = require("graphql-request");
|
|
3520
|
+
var fetchLockById = import_graphql_request12.gql`
|
|
3514
3521
|
query fetchLockById($lockId: uuid!) {
|
|
3515
3522
|
locks(where: { id: { _eq: $lockId } }) {
|
|
3516
3523
|
id
|
|
@@ -3600,8 +3607,8 @@ var getMarketFeePrice = ({
|
|
|
3600
3607
|
};
|
|
3601
3608
|
|
|
3602
3609
|
// src/graphql/queries/fetchTransferPoliciesByType.ts
|
|
3603
|
-
var
|
|
3604
|
-
var fetchTransferPoliciesByType =
|
|
3610
|
+
var import_graphql_request13 = require("graphql-request");
|
|
3611
|
+
var fetchTransferPoliciesByType = import_graphql_request13.gql`
|
|
3605
3612
|
query fetchTransferPoliciesByType($type: String!) {
|
|
3606
3613
|
transfer_policies_by_type(type: $type) {
|
|
3607
3614
|
id
|
|
@@ -3834,8 +3841,8 @@ var import_utils7 = require("@mysten/sui.js/utils");
|
|
|
3834
3841
|
var import_transactions10 = require("@mysten/sui/transactions");
|
|
3835
3842
|
|
|
3836
3843
|
// src/graphql/queries/fetchListingsById.ts
|
|
3837
|
-
var
|
|
3838
|
-
var fetchListingsById =
|
|
3844
|
+
var import_graphql_request14 = require("graphql-request");
|
|
3845
|
+
var fetchListingsById = import_graphql_request14.gql`
|
|
3839
3846
|
query fetchListingsById($listingIds: [uuid!]) {
|
|
3840
3847
|
listings(where: { id: { _in: $listingIds } }) {
|
|
3841
3848
|
id
|
|
@@ -4005,8 +4012,8 @@ var preProcessSharedBulkBuyingData = async ({
|
|
|
4005
4012
|
var import_bcs3 = require("@mysten/sui/bcs");
|
|
4006
4013
|
|
|
4007
4014
|
// src/graphql/queries/fetchCommissionByListingId.ts
|
|
4008
|
-
var
|
|
4009
|
-
var fetchCommissionByNftContractId =
|
|
4015
|
+
var import_graphql_request15 = require("graphql-request");
|
|
4016
|
+
var fetchCommissionByNftContractId = import_graphql_request15.gql`
|
|
4010
4017
|
query fetchCommissionByNftContractId($nftContractId: uuid!) {
|
|
4011
4018
|
commissions(where: { contract_id: { _eq: $nftContractId } }) {
|
|
4012
4019
|
is_custodial
|
|
@@ -4502,15 +4509,9 @@ async function addTradePortBuyTxHandler(txData) {
|
|
|
4502
4509
|
kioskTx
|
|
4503
4510
|
});
|
|
4504
4511
|
if (txData?.collectionId === XOCIETY_FRONTIER_COLLECTION_ID) {
|
|
4505
|
-
const borrowedItem =
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
kioskTx,
|
|
4509
|
-
kioskClient: txData?.kioskClient,
|
|
4510
|
-
nftTokenId: txData?.nftTokenId,
|
|
4511
|
-
nftType: txData?.nftType,
|
|
4512
|
-
suiClient: txData?.suiClient,
|
|
4513
|
-
kioskOwner: txData?.buyer
|
|
4512
|
+
const borrowedItem = kioskTx.take({
|
|
4513
|
+
itemId: txData?.nftTokenId,
|
|
4514
|
+
itemType: txData?.nftType
|
|
4514
4515
|
});
|
|
4515
4516
|
txData?.tx.transferObjects(
|
|
4516
4517
|
[txData?.tx.object(borrowedItem)],
|
|
@@ -5051,8 +5052,8 @@ async function cancelMultiBid({ multiBidId }) {
|
|
|
5051
5052
|
var import_transactions14 = require("@mysten/sui/transactions");
|
|
5052
5053
|
|
|
5053
5054
|
// src/graphql/queries/fetchAccountKiosks.ts
|
|
5054
|
-
var
|
|
5055
|
-
var fetchAccountKiosks =
|
|
5055
|
+
var import_graphql_request16 = require("graphql-request");
|
|
5056
|
+
var fetchAccountKiosks = import_graphql_request16.gql`
|
|
5056
5057
|
query fetchAccountKiosks($accountAddress: String!) {
|
|
5057
5058
|
kiosks: kiosks_by_owner_address(owner_address: $accountAddress) {
|
|
5058
5059
|
id
|
|
@@ -5525,8 +5526,8 @@ var claimNfts = async ({ nftIds, walletAddress, tx: existingTx }, context, useOl
|
|
|
5525
5526
|
var import_transactions16 = require("@mysten/sui/transactions");
|
|
5526
5527
|
|
|
5527
5528
|
// src/graphql/queries/fetchActiveLockStateByNftId.ts
|
|
5528
|
-
var
|
|
5529
|
-
var fetchActiveLockStateByNftId =
|
|
5529
|
+
var import_graphql_request17 = require("graphql-request");
|
|
5530
|
+
var fetchActiveLockStateByNftId = import_graphql_request17.gql`
|
|
5530
5531
|
query fetchActiveLockStateByNftId($nftId: uuid!) {
|
|
5531
5532
|
locks(
|
|
5532
5533
|
where: {
|
|
@@ -6313,8 +6314,8 @@ var listNfts = async ({ nfts, walletAddress }, context) => {
|
|
|
6313
6314
|
var import_transactions20 = require("@mysten/sui/transactions");
|
|
6314
6315
|
|
|
6315
6316
|
// src/graphql/queries/fetchNftsByKioskId.ts
|
|
6316
|
-
var
|
|
6317
|
-
var fetchNftsByKioskId =
|
|
6317
|
+
var import_graphql_request18 = require("graphql-request");
|
|
6318
|
+
var fetchNftsByKioskId = import_graphql_request18.gql`
|
|
6318
6319
|
query fetchNftsByKioskId($jsonFilter: jsonb) {
|
|
6319
6320
|
nfts(where: { chain_state: { _contains: $jsonFilter } }) {
|
|
6320
6321
|
id
|
|
@@ -6335,7 +6336,7 @@ var fetchNftsByKioskId = import_graphql_request19.gql`
|
|
|
6335
6336
|
}
|
|
6336
6337
|
}
|
|
6337
6338
|
`;
|
|
6338
|
-
var fetchBulkNftsByKioskId =
|
|
6339
|
+
var fetchBulkNftsByKioskId = import_graphql_request18.gql`
|
|
6339
6340
|
query fetchNftsByKioskId($where: nfts_bool_exp) {
|
|
6340
6341
|
nfts(where: $where) {
|
|
6341
6342
|
id
|
|
@@ -6668,8 +6669,8 @@ async function migrateNftsFromUnsharedToSharedKiosks({ walletAddress, max = 50 }
|
|
|
6668
6669
|
var import_transactions21 = require("@mysten/sui/transactions");
|
|
6669
6670
|
|
|
6670
6671
|
// src/graphql/queries/fetchCollectionsById.ts
|
|
6671
|
-
var
|
|
6672
|
-
var fetchCollectionsById =
|
|
6672
|
+
var import_graphql_request19 = require("graphql-request");
|
|
6673
|
+
var fetchCollectionsById = import_graphql_request19.gql`
|
|
6673
6674
|
query fetchCollectionsById($collectionIds: [uuid!]) {
|
|
6674
6675
|
collections(where: { id: { _in: $collectionIds } }) {
|
|
6675
6676
|
id
|
|
@@ -6679,7 +6680,7 @@ var fetchCollectionsById = import_graphql_request20.gql`
|
|
|
6679
6680
|
}
|
|
6680
6681
|
}
|
|
6681
6682
|
`;
|
|
6682
|
-
var fetchCollectionsByIdWithOneNft =
|
|
6683
|
+
var fetchCollectionsByIdWithOneNft = import_graphql_request19.gql`
|
|
6683
6684
|
query fetchCollectionsByIdWithOneNft($collectionIds: [uuid!]) {
|
|
6684
6685
|
collections(where: { id: { _in: $collectionIds } }) {
|
|
6685
6686
|
id
|
|
@@ -6697,7 +6698,7 @@ var fetchCollectionsByIdWithOneNft = import_graphql_request20.gql`
|
|
|
6697
6698
|
}
|
|
6698
6699
|
}
|
|
6699
6700
|
`;
|
|
6700
|
-
var fetchCollectionsBySlug =
|
|
6701
|
+
var fetchCollectionsBySlug = import_graphql_request19.gql`
|
|
6701
6702
|
query fetchCollectionsBySlug($slug: String!) {
|
|
6702
6703
|
collections(where: { slug: { _eq: $slug } }) {
|
|
6703
6704
|
id
|
|
@@ -6819,8 +6820,8 @@ function isDynamicCollection(collectionId) {
|
|
|
6819
6820
|
}
|
|
6820
6821
|
|
|
6821
6822
|
// src/graphql/queries/fetchCollectionFloorListings.ts
|
|
6822
|
-
var
|
|
6823
|
-
var fetchCollectionFloorListings =
|
|
6823
|
+
var import_graphql_request20 = require("graphql-request");
|
|
6824
|
+
var fetchCollectionFloorListings = import_graphql_request20.gql`
|
|
6824
6825
|
query fetchCollectionFloorListings($collectionId: uuid!) {
|
|
6825
6826
|
listings(
|
|
6826
6827
|
where: { collection_id: { _eq: $collectionId }, listed: { _eq: true }, nft: {} }
|
|
@@ -7501,8 +7502,8 @@ async function withdrawProfitsFromKiosks({ walletAddress }, context) {
|
|
|
7501
7502
|
var import_transactions28 = require("@mysten/sui/transactions");
|
|
7502
7503
|
|
|
7503
7504
|
// src/graphql/queries/fetchNftCollectionChainState.ts
|
|
7504
|
-
var
|
|
7505
|
-
var fetchNftCollectionChainState =
|
|
7505
|
+
var import_graphql_request21 = require("graphql-request");
|
|
7506
|
+
var fetchNftCollectionChainState = import_graphql_request21.gql`
|
|
7506
7507
|
query fetchNftCollectionChainState($nftTokenId: String!) {
|
|
7507
7508
|
nfts(where: { token_id: { _eq: $nftTokenId } }) {
|
|
7508
7509
|
collection {
|
|
@@ -7547,7 +7548,7 @@ var sponsorNftListing = async ({ nftTokenId, walletAddress, options }, context)
|
|
|
7547
7548
|
|
|
7548
7549
|
// src/SuiTradingClient.ts
|
|
7549
7550
|
var SuiTradingClient = class {
|
|
7550
|
-
constructor({ apiUser, apiKey, suiNodeUrl, graphQLClient }) {
|
|
7551
|
+
constructor({ apiUser, apiKey, apiUrl, suiNodeUrl, graphQLClient }) {
|
|
7551
7552
|
this.allowedApiUsersForUnsharedKiosksMigration = ["tradeport.xyz", "mercato.xyz"];
|
|
7552
7553
|
this.apiUser = apiUser;
|
|
7553
7554
|
this.apiKey = apiKey;
|
|
@@ -7555,6 +7556,8 @@ var SuiTradingClient = class {
|
|
|
7555
7556
|
this.kioskClient = createKioskClient_default(this.suiClient);
|
|
7556
7557
|
if (graphQLClient) {
|
|
7557
7558
|
setGraphqlClient(graphQLClient);
|
|
7559
|
+
} else {
|
|
7560
|
+
setGraphqlClient(new import_graphql_request22.GraphQLClient(apiUrl));
|
|
7558
7561
|
}
|
|
7559
7562
|
getGraphqlClient().setHeaders({
|
|
7560
7563
|
"x-api-user": apiUser,
|