@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 CHANGED
@@ -1,4 +1,5 @@
1
1
  GRAPHQL_API_USER=
2
2
  GRAPHQL_API_KEY=
3
3
  SUI_WALLET_SECRET_KEY=
4
- SUI_WALLET_PUBLIC_KEY=
4
+ SUI_WALLET_PUBLIC_KEY=
5
+ SUI_RPC_URL=
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @tradeport/sui-trading-sdk
2
2
 
3
+ ## 0.4.2
4
+
5
+ ### Patch Changes
6
+
7
+ - da19ac2: Updated placeNftBids and placeCollectionBids for better bulk operation API
8
+
3
9
  ## 0.4.1
4
10
 
5
11
  ### Patch Changes
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
- nfts: Array<{
129
- id: string;
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
- nfts: Array<{
129
- id: string;
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>;