@tradeport/sui-trading-sdk 0.4.1 → 0.4.3
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/.env.demo +2 -1
- package/CHANGELOG.md +6 -0
- package/dist/index.d.mts +20 -20
- package/dist/index.d.ts +20 -20
- package/dist/index.js +220 -164
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +220 -164
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/SuiTradingClient.ts +6 -4
- package/src/graphql/queries/fetchNftsByKioskId.ts +22 -0
- package/src/helpers/destroyZeroCoin.ts +1 -1
- package/src/helpers/kiosk/kioskTxWrapper.ts +5 -6
- package/src/helpers/kiosk/resolveTransferPolicies.ts +1 -1
- package/src/methods/claimNfts/addClaimNftsTxs.ts +5 -3
- package/src/methods/claimNfts/claimNfts.ts +1 -0
- package/src/methods/migrateNftsFromUnsharedToSharedKiosks/migrateNftsFromUnsharedToSharedKiosks.ts +57 -18
- package/src/methods/placeCollectionBids/placeCollectionBids.ts +3 -10
- package/src/methods/placeNftBids/placeNftBids.ts +12 -9
- package/src/methods/transferNfts/addTransferNftTx.ts +4 -3
- package/src/methods/transferNfts/transferNfts.ts +1 -0
package/.env.demo
CHANGED
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -54,6 +54,11 @@ type CancelLocks = {
|
|
|
54
54
|
tx?: Transaction;
|
|
55
55
|
};
|
|
56
56
|
|
|
57
|
+
interface CancelMultiBid {
|
|
58
|
+
walletAddress: string;
|
|
59
|
+
multiBidId: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
57
62
|
type CancelNftTransfers = {
|
|
58
63
|
nftIds: string[];
|
|
59
64
|
walletAddress: string;
|
|
@@ -73,6 +78,13 @@ interface CreateLongLocks {
|
|
|
73
78
|
}>;
|
|
74
79
|
}
|
|
75
80
|
|
|
81
|
+
interface CreateMultiBid {
|
|
82
|
+
walletAddress: string;
|
|
83
|
+
name?: string;
|
|
84
|
+
amount?: bigint;
|
|
85
|
+
tx?: Transaction;
|
|
86
|
+
}
|
|
87
|
+
|
|
76
88
|
interface CreateShortLocks {
|
|
77
89
|
nfts: Array<{
|
|
78
90
|
type: string;
|
|
@@ -125,14 +137,14 @@ type PlaceCollectionBid = {
|
|
|
125
137
|
};
|
|
126
138
|
|
|
127
139
|
type PlaceNftBids = {
|
|
128
|
-
|
|
129
|
-
|
|
140
|
+
bids: Array<{
|
|
141
|
+
nftId: string;
|
|
130
142
|
bidAmountInMist: number;
|
|
143
|
+
expireAt?: Date;
|
|
131
144
|
}>;
|
|
132
145
|
walletAddress: string;
|
|
133
146
|
multiBidId?: string;
|
|
134
147
|
multiBidChainId?: any;
|
|
135
|
-
expireAt?: Date;
|
|
136
148
|
tx?: Transaction | string;
|
|
137
149
|
};
|
|
138
150
|
|
|
@@ -157,22 +169,6 @@ type UnlistListings = {
|
|
|
157
169
|
walletAddress: string;
|
|
158
170
|
};
|
|
159
171
|
|
|
160
|
-
type WithdrawProfitsFromKiosks = {
|
|
161
|
-
walletAddress: string;
|
|
162
|
-
};
|
|
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
172
|
interface UpdateMultiBid {
|
|
177
173
|
walletAddress: string;
|
|
178
174
|
multiBidId?: string;
|
|
@@ -183,6 +179,10 @@ interface UpdateMultiBid {
|
|
|
183
179
|
multiBidChainId?: any;
|
|
184
180
|
}
|
|
185
181
|
|
|
182
|
+
type WithdrawProfitsFromKiosks = {
|
|
183
|
+
walletAddress: string;
|
|
184
|
+
};
|
|
185
|
+
|
|
186
186
|
type ApiConfig = {
|
|
187
187
|
apiUser: string;
|
|
188
188
|
apiKey: string;
|
|
@@ -202,7 +202,7 @@ declare class SuiTradingClient {
|
|
|
202
202
|
placeNftBids(data: PlaceNftBids): Promise<Transaction>;
|
|
203
203
|
removeNftBids({ bidIds, tx }: RemoveNftBids): Promise<Transaction>;
|
|
204
204
|
acceptNftBids({ bidIds, walletAddress }: AcceptNftBids): Promise<Transaction>;
|
|
205
|
-
placeCollectionBid({ collectionId, bidAmountInMist, numOfBids, walletAddress, multiBidId, multiBidChainId, expireAt, }: PlaceCollectionBid): Promise<Transaction>;
|
|
205
|
+
placeCollectionBid({ collectionId, bidAmountInMist, numOfBids, walletAddress, multiBidId, multiBidChainId, expireAt, tx, }: PlaceCollectionBid): Promise<Transaction>;
|
|
206
206
|
acceptCollectionBid({ bidId, nftId, walletAddress }: AcceptCollectionBid): Promise<Transaction>;
|
|
207
207
|
removeCollectionBids({ bidIds, tx }: RemoveCollectionBids): Promise<Transaction>;
|
|
208
208
|
transferNfts({ nftIds, recipientAddress, walletAddress }: TransferNfts): Promise<Transaction>;
|
package/dist/index.d.ts
CHANGED
|
@@ -54,6 +54,11 @@ type CancelLocks = {
|
|
|
54
54
|
tx?: Transaction;
|
|
55
55
|
};
|
|
56
56
|
|
|
57
|
+
interface CancelMultiBid {
|
|
58
|
+
walletAddress: string;
|
|
59
|
+
multiBidId: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
57
62
|
type CancelNftTransfers = {
|
|
58
63
|
nftIds: string[];
|
|
59
64
|
walletAddress: string;
|
|
@@ -73,6 +78,13 @@ interface CreateLongLocks {
|
|
|
73
78
|
}>;
|
|
74
79
|
}
|
|
75
80
|
|
|
81
|
+
interface CreateMultiBid {
|
|
82
|
+
walletAddress: string;
|
|
83
|
+
name?: string;
|
|
84
|
+
amount?: bigint;
|
|
85
|
+
tx?: Transaction;
|
|
86
|
+
}
|
|
87
|
+
|
|
76
88
|
interface CreateShortLocks {
|
|
77
89
|
nfts: Array<{
|
|
78
90
|
type: string;
|
|
@@ -125,14 +137,14 @@ type PlaceCollectionBid = {
|
|
|
125
137
|
};
|
|
126
138
|
|
|
127
139
|
type PlaceNftBids = {
|
|
128
|
-
|
|
129
|
-
|
|
140
|
+
bids: Array<{
|
|
141
|
+
nftId: string;
|
|
130
142
|
bidAmountInMist: number;
|
|
143
|
+
expireAt?: Date;
|
|
131
144
|
}>;
|
|
132
145
|
walletAddress: string;
|
|
133
146
|
multiBidId?: string;
|
|
134
147
|
multiBidChainId?: any;
|
|
135
|
-
expireAt?: Date;
|
|
136
148
|
tx?: Transaction | string;
|
|
137
149
|
};
|
|
138
150
|
|
|
@@ -157,22 +169,6 @@ type UnlistListings = {
|
|
|
157
169
|
walletAddress: string;
|
|
158
170
|
};
|
|
159
171
|
|
|
160
|
-
type WithdrawProfitsFromKiosks = {
|
|
161
|
-
walletAddress: string;
|
|
162
|
-
};
|
|
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
172
|
interface UpdateMultiBid {
|
|
177
173
|
walletAddress: string;
|
|
178
174
|
multiBidId?: string;
|
|
@@ -183,6 +179,10 @@ interface UpdateMultiBid {
|
|
|
183
179
|
multiBidChainId?: any;
|
|
184
180
|
}
|
|
185
181
|
|
|
182
|
+
type WithdrawProfitsFromKiosks = {
|
|
183
|
+
walletAddress: string;
|
|
184
|
+
};
|
|
185
|
+
|
|
186
186
|
type ApiConfig = {
|
|
187
187
|
apiUser: string;
|
|
188
188
|
apiKey: string;
|
|
@@ -202,7 +202,7 @@ declare class SuiTradingClient {
|
|
|
202
202
|
placeNftBids(data: PlaceNftBids): Promise<Transaction>;
|
|
203
203
|
removeNftBids({ bidIds, tx }: RemoveNftBids): Promise<Transaction>;
|
|
204
204
|
acceptNftBids({ bidIds, walletAddress }: AcceptNftBids): Promise<Transaction>;
|
|
205
|
-
placeCollectionBid({ collectionId, bidAmountInMist, numOfBids, walletAddress, multiBidId, multiBidChainId, expireAt, }: PlaceCollectionBid): Promise<Transaction>;
|
|
205
|
+
placeCollectionBid({ collectionId, bidAmountInMist, numOfBids, walletAddress, multiBidId, multiBidChainId, expireAt, tx, }: PlaceCollectionBid): Promise<Transaction>;
|
|
206
206
|
acceptCollectionBid({ bidId, nftId, walletAddress }: AcceptCollectionBid): Promise<Transaction>;
|
|
207
207
|
removeCollectionBids({ bidIds, tx }: RemoveCollectionBids): Promise<Transaction>;
|
|
208
208
|
transferNfts({ nftIds, recipientAddress, walletAddress }: TransferNfts): Promise<Transaction>;
|