@tradeport/sui-trading-sdk 0.3.9 → 0.4.0
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/CHANGELOG.md +6 -0
- package/dist/index.d.mts +38 -2
- package/dist/index.d.ts +38 -2
- package/dist/index.js +405 -346
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +405 -346
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/SuiTradingClient.ts +23 -2
- package/src/constants.ts +11 -0
- package/src/graphql/queries/fetchBidsById.ts +1 -0
- package/src/graphql/queries/fetchCollectionBidById.ts +1 -0
- package/src/graphql/queries/fetchCollectionBidsAtSamePrice.ts +1 -0
- package/src/graphql/queries/fetchMultibidById.ts +10 -0
- package/src/helpers/isSIngleBid.ts +13 -0
- package/src/helpers/kiosk/getKioskTransferPolicies.ts +7 -0
- package/src/helpers/kiosk/kioskTxWrapper.ts +4 -0
- package/src/methods/acceptCollectionBid/acceptCollectionBid.ts +2 -0
- package/src/methods/acceptCollectionBid/addAcceptCollectionBIdTxs.ts +10 -1
- package/src/methods/acceptNftBids/acceptNftBids.ts +3 -0
- package/src/methods/acceptNftBids/addAcceptNftBidTxs.ts +94 -1
- package/src/methods/cancelMultiBid/cancelMultiBid.ts +35 -0
- package/src/methods/createMultiBid/createMultiBid.ts +35 -0
- package/src/methods/placeCollectionBids/placeCollectionBids.ts +26 -11
- package/src/methods/placeNftBids/addPlaceNftBidTxs.ts +100 -230
- package/src/methods/placeNftBids/placeNftBids.ts +21 -14
- package/src/methods/removeCollectionBids/addRemoveCollectionBidsTxs.ts +10 -1
- package/src/methods/removeNftBids/addRemoveNftBidTxs.ts +30 -0
- package/src/methods/removeNftBids/removeNftBids.ts +2 -0
- package/src/methods/updateMultiBid/updateMultiBid.ts +59 -0
- package/src/tests/SuiWallet.ts +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -118,6 +118,10 @@ type PlaceCollectionBid = {
|
|
|
118
118
|
bidAmountInMist: number;
|
|
119
119
|
numOfBids: number;
|
|
120
120
|
walletAddress: string;
|
|
121
|
+
multiBidId?: string;
|
|
122
|
+
multiBidChainId?: any;
|
|
123
|
+
expireAt?: Date;
|
|
124
|
+
tx?: Transaction;
|
|
121
125
|
};
|
|
122
126
|
|
|
123
127
|
type PlaceNftBids = {
|
|
@@ -126,6 +130,10 @@ type PlaceNftBids = {
|
|
|
126
130
|
bidAmountInMist: number;
|
|
127
131
|
}>;
|
|
128
132
|
walletAddress: string;
|
|
133
|
+
multiBidId?: string;
|
|
134
|
+
multiBidChainId?: any;
|
|
135
|
+
expireAt?: Date;
|
|
136
|
+
tx?: Transaction;
|
|
129
137
|
};
|
|
130
138
|
|
|
131
139
|
type RemoveCollectionBids = {
|
|
@@ -153,6 +161,28 @@ type WithdrawProfitsFromKiosks = {
|
|
|
153
161
|
walletAddress: string;
|
|
154
162
|
};
|
|
155
163
|
|
|
164
|
+
interface CreateMultiBid {
|
|
165
|
+
walletAddress: string;
|
|
166
|
+
name?: string;
|
|
167
|
+
amount?: bigint;
|
|
168
|
+
tx?: Transaction;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
interface CancelMultiBid {
|
|
172
|
+
walletAddress: string;
|
|
173
|
+
multiBidId: string;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
interface UpdateMultiBid {
|
|
177
|
+
walletAddress: string;
|
|
178
|
+
multiBidId?: string;
|
|
179
|
+
name?: string;
|
|
180
|
+
amount?: bigint;
|
|
181
|
+
amountToWithdraw?: bigint;
|
|
182
|
+
tx?: Transaction;
|
|
183
|
+
multiBidChainId?: any;
|
|
184
|
+
}
|
|
185
|
+
|
|
156
186
|
type ApiConfig = {
|
|
157
187
|
apiUser: string;
|
|
158
188
|
apiKey: string;
|
|
@@ -169,10 +199,10 @@ declare class SuiTradingClient {
|
|
|
169
199
|
buyListings({ listingIds, walletAddress, tx }: BuyListings): Promise<Transaction>;
|
|
170
200
|
listNfts({ nfts, walletAddress }: ListNfts): Promise<Transaction>;
|
|
171
201
|
unlistListings({ listingIds, walletAddress }: UnlistListings): Promise<Transaction>;
|
|
172
|
-
placeNftBids(
|
|
202
|
+
placeNftBids(data: PlaceNftBids): Promise<Transaction>;
|
|
173
203
|
removeNftBids({ bidIds, tx }: RemoveNftBids): Promise<Transaction>;
|
|
174
204
|
acceptNftBids({ bidIds, walletAddress }: AcceptNftBids): Promise<Transaction>;
|
|
175
|
-
placeCollectionBid({ collectionId, bidAmountInMist, numOfBids, walletAddress, }: PlaceCollectionBid): Promise<Transaction>;
|
|
205
|
+
placeCollectionBid({ collectionId, bidAmountInMist, numOfBids, walletAddress, multiBidId, multiBidChainId, expireAt, }: PlaceCollectionBid): Promise<Transaction>;
|
|
176
206
|
acceptCollectionBid({ bidId, nftId, walletAddress }: AcceptCollectionBid): Promise<Transaction>;
|
|
177
207
|
removeCollectionBids({ bidIds, tx }: RemoveCollectionBids): Promise<Transaction>;
|
|
178
208
|
transferNfts({ nftIds, recipientAddress, walletAddress }: TransferNfts): Promise<Transaction>;
|
|
@@ -188,6 +218,12 @@ declare class SuiTradingClient {
|
|
|
188
218
|
buyAndExerciseShortLocks(args: BuyAndExerciseShortLocks): Promise<Transaction>;
|
|
189
219
|
withdrawProfitsFromKiosks(args: WithdrawProfitsFromKiosks): Promise<Transaction>;
|
|
190
220
|
migrateNftsFromUnsharedToSharedKiosks(args: MigrateNftsFromUnsharedToSharedKiosks): Promise<Transaction>;
|
|
221
|
+
createMultiBid(args: CreateMultiBid): Promise<{
|
|
222
|
+
multiBidChainId: any;
|
|
223
|
+
tx: Transaction;
|
|
224
|
+
}>;
|
|
225
|
+
cancelMultiBid(args: CancelMultiBid): Promise<Transaction>;
|
|
226
|
+
updateMultiBid(args: UpdateMultiBid): Promise<Transaction>;
|
|
191
227
|
}
|
|
192
228
|
|
|
193
229
|
export { SuiTradingClient };
|
package/dist/index.d.ts
CHANGED
|
@@ -118,6 +118,10 @@ type PlaceCollectionBid = {
|
|
|
118
118
|
bidAmountInMist: number;
|
|
119
119
|
numOfBids: number;
|
|
120
120
|
walletAddress: string;
|
|
121
|
+
multiBidId?: string;
|
|
122
|
+
multiBidChainId?: any;
|
|
123
|
+
expireAt?: Date;
|
|
124
|
+
tx?: Transaction;
|
|
121
125
|
};
|
|
122
126
|
|
|
123
127
|
type PlaceNftBids = {
|
|
@@ -126,6 +130,10 @@ type PlaceNftBids = {
|
|
|
126
130
|
bidAmountInMist: number;
|
|
127
131
|
}>;
|
|
128
132
|
walletAddress: string;
|
|
133
|
+
multiBidId?: string;
|
|
134
|
+
multiBidChainId?: any;
|
|
135
|
+
expireAt?: Date;
|
|
136
|
+
tx?: Transaction;
|
|
129
137
|
};
|
|
130
138
|
|
|
131
139
|
type RemoveCollectionBids = {
|
|
@@ -153,6 +161,28 @@ type WithdrawProfitsFromKiosks = {
|
|
|
153
161
|
walletAddress: string;
|
|
154
162
|
};
|
|
155
163
|
|
|
164
|
+
interface CreateMultiBid {
|
|
165
|
+
walletAddress: string;
|
|
166
|
+
name?: string;
|
|
167
|
+
amount?: bigint;
|
|
168
|
+
tx?: Transaction;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
interface CancelMultiBid {
|
|
172
|
+
walletAddress: string;
|
|
173
|
+
multiBidId: string;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
interface UpdateMultiBid {
|
|
177
|
+
walletAddress: string;
|
|
178
|
+
multiBidId?: string;
|
|
179
|
+
name?: string;
|
|
180
|
+
amount?: bigint;
|
|
181
|
+
amountToWithdraw?: bigint;
|
|
182
|
+
tx?: Transaction;
|
|
183
|
+
multiBidChainId?: any;
|
|
184
|
+
}
|
|
185
|
+
|
|
156
186
|
type ApiConfig = {
|
|
157
187
|
apiUser: string;
|
|
158
188
|
apiKey: string;
|
|
@@ -169,10 +199,10 @@ declare class SuiTradingClient {
|
|
|
169
199
|
buyListings({ listingIds, walletAddress, tx }: BuyListings): Promise<Transaction>;
|
|
170
200
|
listNfts({ nfts, walletAddress }: ListNfts): Promise<Transaction>;
|
|
171
201
|
unlistListings({ listingIds, walletAddress }: UnlistListings): Promise<Transaction>;
|
|
172
|
-
placeNftBids(
|
|
202
|
+
placeNftBids(data: PlaceNftBids): Promise<Transaction>;
|
|
173
203
|
removeNftBids({ bidIds, tx }: RemoveNftBids): Promise<Transaction>;
|
|
174
204
|
acceptNftBids({ bidIds, walletAddress }: AcceptNftBids): Promise<Transaction>;
|
|
175
|
-
placeCollectionBid({ collectionId, bidAmountInMist, numOfBids, walletAddress, }: PlaceCollectionBid): Promise<Transaction>;
|
|
205
|
+
placeCollectionBid({ collectionId, bidAmountInMist, numOfBids, walletAddress, multiBidId, multiBidChainId, expireAt, }: PlaceCollectionBid): Promise<Transaction>;
|
|
176
206
|
acceptCollectionBid({ bidId, nftId, walletAddress }: AcceptCollectionBid): Promise<Transaction>;
|
|
177
207
|
removeCollectionBids({ bidIds, tx }: RemoveCollectionBids): Promise<Transaction>;
|
|
178
208
|
transferNfts({ nftIds, recipientAddress, walletAddress }: TransferNfts): Promise<Transaction>;
|
|
@@ -188,6 +218,12 @@ declare class SuiTradingClient {
|
|
|
188
218
|
buyAndExerciseShortLocks(args: BuyAndExerciseShortLocks): Promise<Transaction>;
|
|
189
219
|
withdrawProfitsFromKiosks(args: WithdrawProfitsFromKiosks): Promise<Transaction>;
|
|
190
220
|
migrateNftsFromUnsharedToSharedKiosks(args: MigrateNftsFromUnsharedToSharedKiosks): Promise<Transaction>;
|
|
221
|
+
createMultiBid(args: CreateMultiBid): Promise<{
|
|
222
|
+
multiBidChainId: any;
|
|
223
|
+
tx: Transaction;
|
|
224
|
+
}>;
|
|
225
|
+
cancelMultiBid(args: CancelMultiBid): Promise<Transaction>;
|
|
226
|
+
updateMultiBid(args: UpdateMultiBid): Promise<Transaction>;
|
|
191
227
|
}
|
|
192
228
|
|
|
193
229
|
export { SuiTradingClient };
|