@tradeport/sui-trading-sdk 0.4.39 → 0.4.41
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 +14 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +534 -134
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +518 -125
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -2
- package/src/SuiTradingClient.ts +15 -0
- package/src/bigNumberConfig.ts +10 -0
- package/src/constants.ts +17 -1
- package/src/graphql/queries/fetchNftCollectionChainState.ts +12 -0
- package/src/helpers/calculateRoyaltyFee.ts +12 -7
- package/src/helpers/isExpiredListing.ts +9 -0
- package/src/helpers/kiosk/preProcessSharedBulkBuyingData.ts +9 -8
- package/src/helpers/swap.ts +197 -0
- package/src/helpers/validateMinFloorPrice.ts +22 -0
- package/src/methods/buyListings/addBuyListingTxs.ts +111 -5
- package/src/methods/buyLocks/buyLocks.ts +2 -2
- package/src/methods/createLongLocks/createLongLocks.ts +2 -2
- package/src/methods/createShortLocks/createShortLocks.ts +3 -3
- package/src/methods/listNfts/addListTxs.ts +17 -37
- package/src/methods/listNfts/addRelistTxs.ts +26 -17
- package/src/methods/listNfts/listNfts.ts +27 -16
- package/src/methods/placeNftBids/addPlaceNftBidTxs.ts +1 -1
- package/src/methods/relistNft/relistNft.ts +19 -28
- package/src/methods/sponsorNftListing/addSponsorNftListingTx.ts +71 -0
- package/src/methods/sponsorNftListing/sponsorNftListing.ts +62 -0
- package/src/methods/unlistListings/addUnlistListingTxs.ts +68 -5
- package/src/methods/unlistListings/unlistListings.ts +2 -6
- package/src/tests/SuiWallet.ts +4 -1
- package/src/utils/printTxBlockTxs.ts +7 -1
- package/src/utils/pureValues.ts +13 -0
package/dist/index.d.mts
CHANGED
|
@@ -112,10 +112,23 @@ type ExerciseShortLocks = {
|
|
|
112
112
|
}>;
|
|
113
113
|
};
|
|
114
114
|
|
|
115
|
+
type SponsorNftListingOptions = {
|
|
116
|
+
shouldSponsor?: boolean;
|
|
117
|
+
numOfPeriods?: number;
|
|
118
|
+
slippage?: number;
|
|
119
|
+
coinInType?: string;
|
|
120
|
+
};
|
|
121
|
+
type SponsorNftListing = {
|
|
122
|
+
nftTokenId: string;
|
|
123
|
+
walletAddress: string;
|
|
124
|
+
options: SponsorNftListingOptions;
|
|
125
|
+
};
|
|
126
|
+
|
|
115
127
|
type ListNfts = {
|
|
116
128
|
nfts: Array<{
|
|
117
129
|
id: string;
|
|
118
130
|
listPriceInMist: number;
|
|
131
|
+
sponsorOptions?: SponsorNftListingOptions;
|
|
119
132
|
}>;
|
|
120
133
|
walletAddress: string;
|
|
121
134
|
};
|
|
@@ -224,6 +237,7 @@ declare class SuiTradingClient {
|
|
|
224
237
|
}>;
|
|
225
238
|
cancelMultiBid(args: CancelMultiBid): Promise<Transaction>;
|
|
226
239
|
updateMultiBid(args: UpdateMultiBid): Promise<Transaction>;
|
|
240
|
+
sponsorNftListing(args: SponsorNftListing): Promise<Transaction>;
|
|
227
241
|
}
|
|
228
242
|
|
|
229
243
|
export { SuiTradingClient };
|
package/dist/index.d.ts
CHANGED
|
@@ -112,10 +112,23 @@ type ExerciseShortLocks = {
|
|
|
112
112
|
}>;
|
|
113
113
|
};
|
|
114
114
|
|
|
115
|
+
type SponsorNftListingOptions = {
|
|
116
|
+
shouldSponsor?: boolean;
|
|
117
|
+
numOfPeriods?: number;
|
|
118
|
+
slippage?: number;
|
|
119
|
+
coinInType?: string;
|
|
120
|
+
};
|
|
121
|
+
type SponsorNftListing = {
|
|
122
|
+
nftTokenId: string;
|
|
123
|
+
walletAddress: string;
|
|
124
|
+
options: SponsorNftListingOptions;
|
|
125
|
+
};
|
|
126
|
+
|
|
115
127
|
type ListNfts = {
|
|
116
128
|
nfts: Array<{
|
|
117
129
|
id: string;
|
|
118
130
|
listPriceInMist: number;
|
|
131
|
+
sponsorOptions?: SponsorNftListingOptions;
|
|
119
132
|
}>;
|
|
120
133
|
walletAddress: string;
|
|
121
134
|
};
|
|
@@ -224,6 +237,7 @@ declare class SuiTradingClient {
|
|
|
224
237
|
}>;
|
|
225
238
|
cancelMultiBid(args: CancelMultiBid): Promise<Transaction>;
|
|
226
239
|
updateMultiBid(args: UpdateMultiBid): Promise<Transaction>;
|
|
240
|
+
sponsorNftListing(args: SponsorNftListing): Promise<Transaction>;
|
|
227
241
|
}
|
|
228
242
|
|
|
229
243
|
export { SuiTradingClient };
|