@tradeport/sui-trading-sdk 0.1.9 → 0.1.11

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @tradeport/sui-trading-sdk
2
2
 
3
+ ## 0.1.11
4
+
5
+ ### Patch Changes
6
+
7
+ - 4dcd7e4: Split price lock methods into separate methods for long and short and made all compatible with bulk
8
+
9
+ ## 0.1.10
10
+
11
+ ### Patch Changes
12
+
13
+ - b03eb10: Changed createLock and buyLock to createLocks and buyLocks
14
+
3
15
  ## 0.1.9
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -13,6 +13,14 @@ type AcceptNftBids = {
13
13
  kioskTx?: KioskTransaction;
14
14
  };
15
15
 
16
+ type BuyAndExerciseLongLocks = {
17
+ walletAddress: string;
18
+ locks: Array<{
19
+ id: string;
20
+ bidId?: string;
21
+ }>;
22
+ };
23
+
16
24
  type BuyListings = {
17
25
  listingIds: string[];
18
26
  walletAddress: string;
@@ -20,13 +28,13 @@ type BuyListings = {
20
28
  kioskTx?: KioskTransaction;
21
29
  };
22
30
 
23
- type BuyLock = {
24
- lockId: string;
25
- tx?: Transaction;
31
+ type BuyLocks = {
32
+ lockIds: string[];
33
+ transaction?: Transaction;
26
34
  };
27
35
 
28
- type CancelLock = {
29
- lockId: string;
36
+ type CancelLocks = {
37
+ lockIds: string[];
30
38
  walletAddress: string;
31
39
  };
32
40
 
@@ -36,30 +44,39 @@ type ClaimNfts = {
36
44
  tx?: Transaction;
37
45
  };
38
46
 
39
- type CreateLockCommon = {
40
- type: string;
41
- nftType?: string;
42
- collectionId?: string;
43
- price: bigint;
44
- };
45
- type CreateLongLock = CreateLockCommon & {
46
- type: 'long';
47
- nftId: string;
47
+ interface CreateLongLocks {
48
48
  walletAddress: string;
49
+ nfts: Array<{
50
+ id: string;
51
+ priceInMist: number;
52
+ }>;
53
+ }
54
+
55
+ interface CreateShortLocks {
56
+ nfts: Array<{
57
+ type: string;
58
+ collectionId: string;
59
+ priceInMist: number;
60
+ }>;
61
+ }
62
+
63
+ type ExerciseLongLocks = {
64
+ walletAddress: string;
65
+ transaction?: Transaction;
66
+ locks: Array<{
67
+ id: string;
68
+ bidId?: string;
69
+ }>;
49
70
  };
50
- type CreateShortLock = CreateLockCommon & {
51
- type: 'short';
52
- nftType: string;
53
- };
54
- type CreateLock = CreateLongLock | CreateShortLock;
55
71
 
56
- type ExerciseLock = {
57
- lockId: string;
72
+ type ExerciseShortLocks = {
58
73
  walletAddress: string;
59
- bidId?: string;
60
- listingId?: string;
61
- nftId?: string;
62
- tx?: Transaction;
74
+ transaction?: Transaction;
75
+ locks: Array<{
76
+ id: string;
77
+ listingId?: string;
78
+ nftId?: string;
79
+ }>;
63
80
  };
64
81
 
65
82
  type ListNfts = {
@@ -123,11 +140,13 @@ declare class SuiTradingClient {
123
140
  removeCollectionBid({ bidId }: RemoveCollectionBid): Promise<Transaction>;
124
141
  transferNfts({ nftIds, recipientAddress, walletAddress }: TransferNfts): Promise<Transaction>;
125
142
  claimNfts({ nftIds, walletAddress }: ClaimNfts): Promise<Transaction>;
126
- createLock(args: CreateLock): Promise<Transaction>;
127
- cancelLock(args: CancelLock): Promise<Transaction>;
128
- buyLock(args: BuyLock): Promise<Transaction>;
129
- exerciseLock(args: ExerciseLock): Promise<Transaction>;
130
- buyAndExerciseLock(args: BuyLock & ExerciseLock): Promise<Transaction>;
143
+ createLongLocks(args: CreateLongLocks): Promise<Transaction>;
144
+ createShortLocks(args: CreateShortLocks): Promise<Transaction>;
145
+ cancelLocks(args: CancelLocks): Promise<Transaction>;
146
+ buyLocks(args: BuyLocks): Promise<Transaction>;
147
+ exerciseLongLocks(args: ExerciseLongLocks): Promise<Transaction>;
148
+ exerciseShortLocks(args: ExerciseShortLocks): Promise<Transaction>;
149
+ buyAndExerciseLongLocks(args: BuyAndExerciseLongLocks): Promise<Transaction>;
131
150
  }
132
151
 
133
152
  export { SuiTradingClient };
package/dist/index.d.ts CHANGED
@@ -13,6 +13,14 @@ type AcceptNftBids = {
13
13
  kioskTx?: KioskTransaction;
14
14
  };
15
15
 
16
+ type BuyAndExerciseLongLocks = {
17
+ walletAddress: string;
18
+ locks: Array<{
19
+ id: string;
20
+ bidId?: string;
21
+ }>;
22
+ };
23
+
16
24
  type BuyListings = {
17
25
  listingIds: string[];
18
26
  walletAddress: string;
@@ -20,13 +28,13 @@ type BuyListings = {
20
28
  kioskTx?: KioskTransaction;
21
29
  };
22
30
 
23
- type BuyLock = {
24
- lockId: string;
25
- tx?: Transaction;
31
+ type BuyLocks = {
32
+ lockIds: string[];
33
+ transaction?: Transaction;
26
34
  };
27
35
 
28
- type CancelLock = {
29
- lockId: string;
36
+ type CancelLocks = {
37
+ lockIds: string[];
30
38
  walletAddress: string;
31
39
  };
32
40
 
@@ -36,30 +44,39 @@ type ClaimNfts = {
36
44
  tx?: Transaction;
37
45
  };
38
46
 
39
- type CreateLockCommon = {
40
- type: string;
41
- nftType?: string;
42
- collectionId?: string;
43
- price: bigint;
44
- };
45
- type CreateLongLock = CreateLockCommon & {
46
- type: 'long';
47
- nftId: string;
47
+ interface CreateLongLocks {
48
48
  walletAddress: string;
49
+ nfts: Array<{
50
+ id: string;
51
+ priceInMist: number;
52
+ }>;
53
+ }
54
+
55
+ interface CreateShortLocks {
56
+ nfts: Array<{
57
+ type: string;
58
+ collectionId: string;
59
+ priceInMist: number;
60
+ }>;
61
+ }
62
+
63
+ type ExerciseLongLocks = {
64
+ walletAddress: string;
65
+ transaction?: Transaction;
66
+ locks: Array<{
67
+ id: string;
68
+ bidId?: string;
69
+ }>;
49
70
  };
50
- type CreateShortLock = CreateLockCommon & {
51
- type: 'short';
52
- nftType: string;
53
- };
54
- type CreateLock = CreateLongLock | CreateShortLock;
55
71
 
56
- type ExerciseLock = {
57
- lockId: string;
72
+ type ExerciseShortLocks = {
58
73
  walletAddress: string;
59
- bidId?: string;
60
- listingId?: string;
61
- nftId?: string;
62
- tx?: Transaction;
74
+ transaction?: Transaction;
75
+ locks: Array<{
76
+ id: string;
77
+ listingId?: string;
78
+ nftId?: string;
79
+ }>;
63
80
  };
64
81
 
65
82
  type ListNfts = {
@@ -123,11 +140,13 @@ declare class SuiTradingClient {
123
140
  removeCollectionBid({ bidId }: RemoveCollectionBid): Promise<Transaction>;
124
141
  transferNfts({ nftIds, recipientAddress, walletAddress }: TransferNfts): Promise<Transaction>;
125
142
  claimNfts({ nftIds, walletAddress }: ClaimNfts): Promise<Transaction>;
126
- createLock(args: CreateLock): Promise<Transaction>;
127
- cancelLock(args: CancelLock): Promise<Transaction>;
128
- buyLock(args: BuyLock): Promise<Transaction>;
129
- exerciseLock(args: ExerciseLock): Promise<Transaction>;
130
- buyAndExerciseLock(args: BuyLock & ExerciseLock): Promise<Transaction>;
143
+ createLongLocks(args: CreateLongLocks): Promise<Transaction>;
144
+ createShortLocks(args: CreateShortLocks): Promise<Transaction>;
145
+ cancelLocks(args: CancelLocks): Promise<Transaction>;
146
+ buyLocks(args: BuyLocks): Promise<Transaction>;
147
+ exerciseLongLocks(args: ExerciseLongLocks): Promise<Transaction>;
148
+ exerciseShortLocks(args: ExerciseShortLocks): Promise<Transaction>;
149
+ buyAndExerciseLongLocks(args: BuyAndExerciseLongLocks): Promise<Transaction>;
131
150
  }
132
151
 
133
152
  export { SuiTradingClient };