@tradeport/sui-trading-sdk 0.4.49 → 0.4.50
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 +62 -53
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -4
- 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/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
|
|
@@ -5051,8 +5058,8 @@ async function cancelMultiBid({ multiBidId }) {
|
|
|
5051
5058
|
var import_transactions14 = require("@mysten/sui/transactions");
|
|
5052
5059
|
|
|
5053
5060
|
// src/graphql/queries/fetchAccountKiosks.ts
|
|
5054
|
-
var
|
|
5055
|
-
var fetchAccountKiosks =
|
|
5061
|
+
var import_graphql_request16 = require("graphql-request");
|
|
5062
|
+
var fetchAccountKiosks = import_graphql_request16.gql`
|
|
5056
5063
|
query fetchAccountKiosks($accountAddress: String!) {
|
|
5057
5064
|
kiosks: kiosks_by_owner_address(owner_address: $accountAddress) {
|
|
5058
5065
|
id
|
|
@@ -5525,8 +5532,8 @@ var claimNfts = async ({ nftIds, walletAddress, tx: existingTx }, context, useOl
|
|
|
5525
5532
|
var import_transactions16 = require("@mysten/sui/transactions");
|
|
5526
5533
|
|
|
5527
5534
|
// src/graphql/queries/fetchActiveLockStateByNftId.ts
|
|
5528
|
-
var
|
|
5529
|
-
var fetchActiveLockStateByNftId =
|
|
5535
|
+
var import_graphql_request17 = require("graphql-request");
|
|
5536
|
+
var fetchActiveLockStateByNftId = import_graphql_request17.gql`
|
|
5530
5537
|
query fetchActiveLockStateByNftId($nftId: uuid!) {
|
|
5531
5538
|
locks(
|
|
5532
5539
|
where: {
|
|
@@ -6313,8 +6320,8 @@ var listNfts = async ({ nfts, walletAddress }, context) => {
|
|
|
6313
6320
|
var import_transactions20 = require("@mysten/sui/transactions");
|
|
6314
6321
|
|
|
6315
6322
|
// src/graphql/queries/fetchNftsByKioskId.ts
|
|
6316
|
-
var
|
|
6317
|
-
var fetchNftsByKioskId =
|
|
6323
|
+
var import_graphql_request18 = require("graphql-request");
|
|
6324
|
+
var fetchNftsByKioskId = import_graphql_request18.gql`
|
|
6318
6325
|
query fetchNftsByKioskId($jsonFilter: jsonb) {
|
|
6319
6326
|
nfts(where: { chain_state: { _contains: $jsonFilter } }) {
|
|
6320
6327
|
id
|
|
@@ -6335,7 +6342,7 @@ var fetchNftsByKioskId = import_graphql_request19.gql`
|
|
|
6335
6342
|
}
|
|
6336
6343
|
}
|
|
6337
6344
|
`;
|
|
6338
|
-
var fetchBulkNftsByKioskId =
|
|
6345
|
+
var fetchBulkNftsByKioskId = import_graphql_request18.gql`
|
|
6339
6346
|
query fetchNftsByKioskId($where: nfts_bool_exp) {
|
|
6340
6347
|
nfts(where: $where) {
|
|
6341
6348
|
id
|
|
@@ -6668,8 +6675,8 @@ async function migrateNftsFromUnsharedToSharedKiosks({ walletAddress, max = 50 }
|
|
|
6668
6675
|
var import_transactions21 = require("@mysten/sui/transactions");
|
|
6669
6676
|
|
|
6670
6677
|
// src/graphql/queries/fetchCollectionsById.ts
|
|
6671
|
-
var
|
|
6672
|
-
var fetchCollectionsById =
|
|
6678
|
+
var import_graphql_request19 = require("graphql-request");
|
|
6679
|
+
var fetchCollectionsById = import_graphql_request19.gql`
|
|
6673
6680
|
query fetchCollectionsById($collectionIds: [uuid!]) {
|
|
6674
6681
|
collections(where: { id: { _in: $collectionIds } }) {
|
|
6675
6682
|
id
|
|
@@ -6679,7 +6686,7 @@ var fetchCollectionsById = import_graphql_request20.gql`
|
|
|
6679
6686
|
}
|
|
6680
6687
|
}
|
|
6681
6688
|
`;
|
|
6682
|
-
var fetchCollectionsByIdWithOneNft =
|
|
6689
|
+
var fetchCollectionsByIdWithOneNft = import_graphql_request19.gql`
|
|
6683
6690
|
query fetchCollectionsByIdWithOneNft($collectionIds: [uuid!]) {
|
|
6684
6691
|
collections(where: { id: { _in: $collectionIds } }) {
|
|
6685
6692
|
id
|
|
@@ -6697,7 +6704,7 @@ var fetchCollectionsByIdWithOneNft = import_graphql_request20.gql`
|
|
|
6697
6704
|
}
|
|
6698
6705
|
}
|
|
6699
6706
|
`;
|
|
6700
|
-
var fetchCollectionsBySlug =
|
|
6707
|
+
var fetchCollectionsBySlug = import_graphql_request19.gql`
|
|
6701
6708
|
query fetchCollectionsBySlug($slug: String!) {
|
|
6702
6709
|
collections(where: { slug: { _eq: $slug } }) {
|
|
6703
6710
|
id
|
|
@@ -6819,8 +6826,8 @@ function isDynamicCollection(collectionId) {
|
|
|
6819
6826
|
}
|
|
6820
6827
|
|
|
6821
6828
|
// src/graphql/queries/fetchCollectionFloorListings.ts
|
|
6822
|
-
var
|
|
6823
|
-
var fetchCollectionFloorListings =
|
|
6829
|
+
var import_graphql_request20 = require("graphql-request");
|
|
6830
|
+
var fetchCollectionFloorListings = import_graphql_request20.gql`
|
|
6824
6831
|
query fetchCollectionFloorListings($collectionId: uuid!) {
|
|
6825
6832
|
listings(
|
|
6826
6833
|
where: { collection_id: { _eq: $collectionId }, listed: { _eq: true }, nft: {} }
|
|
@@ -7501,8 +7508,8 @@ async function withdrawProfitsFromKiosks({ walletAddress }, context) {
|
|
|
7501
7508
|
var import_transactions28 = require("@mysten/sui/transactions");
|
|
7502
7509
|
|
|
7503
7510
|
// src/graphql/queries/fetchNftCollectionChainState.ts
|
|
7504
|
-
var
|
|
7505
|
-
var fetchNftCollectionChainState =
|
|
7511
|
+
var import_graphql_request21 = require("graphql-request");
|
|
7512
|
+
var fetchNftCollectionChainState = import_graphql_request21.gql`
|
|
7506
7513
|
query fetchNftCollectionChainState($nftTokenId: String!) {
|
|
7507
7514
|
nfts(where: { token_id: { _eq: $nftTokenId } }) {
|
|
7508
7515
|
collection {
|
|
@@ -7547,7 +7554,7 @@ var sponsorNftListing = async ({ nftTokenId, walletAddress, options }, context)
|
|
|
7547
7554
|
|
|
7548
7555
|
// src/SuiTradingClient.ts
|
|
7549
7556
|
var SuiTradingClient = class {
|
|
7550
|
-
constructor({ apiUser, apiKey, suiNodeUrl, graphQLClient }) {
|
|
7557
|
+
constructor({ apiUser, apiKey, apiUrl, suiNodeUrl, graphQLClient }) {
|
|
7551
7558
|
this.allowedApiUsersForUnsharedKiosksMigration = ["tradeport.xyz", "mercato.xyz"];
|
|
7552
7559
|
this.apiUser = apiUser;
|
|
7553
7560
|
this.apiKey = apiKey;
|
|
@@ -7555,6 +7562,8 @@ var SuiTradingClient = class {
|
|
|
7555
7562
|
this.kioskClient = createKioskClient_default(this.suiClient);
|
|
7556
7563
|
if (graphQLClient) {
|
|
7557
7564
|
setGraphqlClient(graphQLClient);
|
|
7565
|
+
} else {
|
|
7566
|
+
setGraphqlClient(new import_graphql_request22.GraphQLClient(apiUrl));
|
|
7558
7567
|
}
|
|
7559
7568
|
getGraphqlClient().setHeaders({
|
|
7560
7569
|
"x-api-user": apiUser,
|