@tradeport/sui-trading-sdk 0.4.57 → 0.4.59
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/.claude/settings.json +5 -0
- package/.vscode/launch.json +23 -0
- package/dist/index.d.mts +15 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +527 -446
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +528 -450
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -2
- package/src/SuiTradingClient.ts +29 -1
- package/src/constants.ts +3 -0
- package/src/graphql/queries/fetchCollectionFloorListingForMarket.ts +28 -0
- package/src/methods/applyFtStrategy/applyFtStrategy.ts +55 -0
- package/src/methods/applyNftStrategy/applyNftStrategy.ts +90 -0
- package/src/methods/buyListings/addBuyListingTxs.ts +23 -0
- package/src/methods/listNfts/listNfts.ts +1 -0
- package/src/methods/sponsorNftListing/addSponsorNftListingTx.ts +21 -23
- package/src/methods/sponsorNftListing/sponsorNftListing.ts +1 -0
- package/src/helpers/swap.ts +0 -212
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.2.0",
|
|
3
|
+
"configurations": [
|
|
4
|
+
{
|
|
5
|
+
"type": "node",
|
|
6
|
+
"request": "launch",
|
|
7
|
+
"name": "Jest: Current File",
|
|
8
|
+
"program": "${workspaceFolder}/node_modules/jest/bin/jest.js",
|
|
9
|
+
"args": ["--runInBand", "--no-coverage", "${relativeFile}"],
|
|
10
|
+
"console": "integratedTerminal",
|
|
11
|
+
"envFile": "${workspaceFolder}/.env"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"type": "node",
|
|
15
|
+
"request": "launch",
|
|
16
|
+
"name": "Jest: swapCoins",
|
|
17
|
+
"program": "${workspaceFolder}/node_modules/jest/bin/jest.js",
|
|
18
|
+
"args": ["--runInBand", "--no-coverage", "src/tests/swapCoins.test.ts"],
|
|
19
|
+
"console": "integratedTerminal",
|
|
20
|
+
"envFile": "${workspaceFolder}/.env"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
package/dist/index.d.mts
CHANGED
|
@@ -19,6 +19,13 @@ type AcceptNftBids = {
|
|
|
19
19
|
beforeResolveKioskTransferRequest?: (coin: any, transferRequest: any) => void | Promise<void>;
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
+
type ApplyFtStrategy = {
|
|
23
|
+
collectionId: string;
|
|
24
|
+
strategyFtType?: string;
|
|
25
|
+
tx?: Transaction;
|
|
26
|
+
collectionChainState?: Record<string, unknown>;
|
|
27
|
+
};
|
|
28
|
+
|
|
22
29
|
type BuyListings = {
|
|
23
30
|
listingIds: string[];
|
|
24
31
|
walletAddress: string;
|
|
@@ -137,6 +144,12 @@ type WithdrawProfitsFromKiosks = {
|
|
|
137
144
|
walletAddress: string;
|
|
138
145
|
};
|
|
139
146
|
|
|
147
|
+
type ApplyNftStrategy = {
|
|
148
|
+
collectionId: string;
|
|
149
|
+
strategyFtType?: string;
|
|
150
|
+
tx?: Transaction;
|
|
151
|
+
};
|
|
152
|
+
|
|
140
153
|
type SwapCoins = {
|
|
141
154
|
walletAddress: string;
|
|
142
155
|
coinInType: string;
|
|
@@ -196,6 +209,8 @@ declare class SuiTradingClient {
|
|
|
196
209
|
cancelMultiBid(args: CancelMultiBid): Promise<Transaction>;
|
|
197
210
|
updateMultiBid(args: UpdateMultiBid): Promise<Transaction>;
|
|
198
211
|
sponsorNftListing(args: SponsorNftListing): Promise<Transaction>;
|
|
212
|
+
applyFtStrategy(args: ApplyFtStrategy): Promise<Transaction>;
|
|
213
|
+
applyTradeportNftStrategy(args: ApplyNftStrategy): Promise<Transaction>;
|
|
199
214
|
swapCoins(args: SwapCoins): Promise<{
|
|
200
215
|
tx: Transaction;
|
|
201
216
|
coinOut: _mysten_sui_dist_cjs_transactions.TransactionResult;
|
package/dist/index.d.ts
CHANGED
|
@@ -19,6 +19,13 @@ type AcceptNftBids = {
|
|
|
19
19
|
beforeResolveKioskTransferRequest?: (coin: any, transferRequest: any) => void | Promise<void>;
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
+
type ApplyFtStrategy = {
|
|
23
|
+
collectionId: string;
|
|
24
|
+
strategyFtType?: string;
|
|
25
|
+
tx?: Transaction;
|
|
26
|
+
collectionChainState?: Record<string, unknown>;
|
|
27
|
+
};
|
|
28
|
+
|
|
22
29
|
type BuyListings = {
|
|
23
30
|
listingIds: string[];
|
|
24
31
|
walletAddress: string;
|
|
@@ -137,6 +144,12 @@ type WithdrawProfitsFromKiosks = {
|
|
|
137
144
|
walletAddress: string;
|
|
138
145
|
};
|
|
139
146
|
|
|
147
|
+
type ApplyNftStrategy = {
|
|
148
|
+
collectionId: string;
|
|
149
|
+
strategyFtType?: string;
|
|
150
|
+
tx?: Transaction;
|
|
151
|
+
};
|
|
152
|
+
|
|
140
153
|
type SwapCoins = {
|
|
141
154
|
walletAddress: string;
|
|
142
155
|
coinInType: string;
|
|
@@ -196,6 +209,8 @@ declare class SuiTradingClient {
|
|
|
196
209
|
cancelMultiBid(args: CancelMultiBid): Promise<Transaction>;
|
|
197
210
|
updateMultiBid(args: UpdateMultiBid): Promise<Transaction>;
|
|
198
211
|
sponsorNftListing(args: SponsorNftListing): Promise<Transaction>;
|
|
212
|
+
applyFtStrategy(args: ApplyFtStrategy): Promise<Transaction>;
|
|
213
|
+
applyTradeportNftStrategy(args: ApplyNftStrategy): Promise<Transaction>;
|
|
199
214
|
swapCoins(args: SwapCoins): Promise<{
|
|
200
215
|
tx: Transaction;
|
|
201
216
|
coinOut: _mysten_sui_dist_cjs_transactions.TransactionResult;
|