@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 +12 -0
- package/dist/index.d.mts +49 -30
- package/dist/index.d.ts +49 -30
- package/dist/index.js +429 -392
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +429 -392
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/SuiTradingClient.ts +42 -15
- package/src/methods/buyAndExerciseLongLocks/buyAndExerciseLongLocks.ts +24 -0
- package/src/methods/buyLocks/buyLocks.ts +41 -0
- package/src/methods/cancelLock/cancelLock.ts +29 -26
- package/src/methods/createLongLocks/createLongLocks.ts +70 -0
- package/src/methods/createShortLocks/createShortLocks.ts +61 -0
- package/src/methods/exerciseLongLocks/exerciseLongLocks.ts +125 -0
- package/src/methods/exerciseShortLocks/exerciseShortLocks.ts +172 -0
- package/src/methods/buyAndExerciseLock/buyAndExerciseLock.ts +0 -14
- package/src/methods/buyLock/buyLock.ts +0 -38
- package/src/methods/createLock/createLock.ts +0 -117
- package/src/methods/exerciseLock/exerciseLock.ts +0 -264
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
|
|
24
|
-
|
|
25
|
-
|
|
31
|
+
type BuyLocks = {
|
|
32
|
+
lockIds: string[];
|
|
33
|
+
transaction?: Transaction;
|
|
26
34
|
};
|
|
27
35
|
|
|
28
|
-
type
|
|
29
|
-
|
|
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
|
-
|
|
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
|
|
57
|
-
lockId: string;
|
|
72
|
+
type ExerciseShortLocks = {
|
|
58
73
|
walletAddress: string;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
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
|
|
24
|
-
|
|
25
|
-
|
|
31
|
+
type BuyLocks = {
|
|
32
|
+
lockIds: string[];
|
|
33
|
+
transaction?: Transaction;
|
|
26
34
|
};
|
|
27
35
|
|
|
28
|
-
type
|
|
29
|
-
|
|
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
|
-
|
|
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
|
|
57
|
-
lockId: string;
|
|
72
|
+
type ExerciseShortLocks = {
|
|
58
73
|
walletAddress: string;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
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 };
|