@tradeport/sui-trading-sdk 0.1.4 → 0.1.8

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,30 @@
1
1
  # @tradeport/sui-trading-sdk
2
2
 
3
+ ## 0.1.8
4
+
5
+ ### Patch Changes
6
+
7
+ - ef1e578: Attempt to fix tracking
8
+
9
+ ## 0.1.7
10
+
11
+ ### Patch Changes
12
+
13
+ - 7367aa7: Attempt to fix the tracking
14
+
15
+ ## 0.1.6
16
+
17
+ ### Patch Changes
18
+
19
+ - 76cc78e: Added segment tracking for api usage
20
+
21
+ ## 0.1.5
22
+
23
+ ### Patch Changes
24
+
25
+ - 81447dc: Added tracking data
26
+ - d08af66: Added segment tracking in github actions
27
+
3
28
  ## 0.1.4
4
29
 
5
30
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -20,12 +20,48 @@ type BuyListings = {
20
20
  kioskTx?: KioskTransaction;
21
21
  };
22
22
 
23
+ type BuyLock = {
24
+ lockId: string;
25
+ tx?: Transaction;
26
+ };
27
+
28
+ type CancelLock = {
29
+ lockId: string;
30
+ walletAddress: string;
31
+ };
32
+
23
33
  type ClaimNfts = {
24
34
  nftIds: string[];
25
35
  walletAddress: string;
26
36
  tx?: Transaction;
27
37
  };
28
38
 
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;
48
+ walletAddress: string;
49
+ };
50
+ type CreateShortLock = CreateLockCommon & {
51
+ type: 'short';
52
+ nftType: string;
53
+ };
54
+ type CreateLock = CreateLongLock | CreateShortLock;
55
+
56
+ type ExerciseLock = {
57
+ lockId: string;
58
+ walletAddress: string;
59
+ bidId?: string;
60
+ listingId?: string;
61
+ nftId?: string;
62
+ tx?: Transaction;
63
+ };
64
+
29
65
  type ListNfts = {
30
66
  nfts: Array<{
31
67
  id: string;
@@ -68,52 +104,13 @@ type UnlistListings = {
68
104
  walletAddress: string;
69
105
  };
70
106
 
71
- type WithdrawKioskProfits = {
72
- amount?: number;
73
- walletAddress: string;
74
- };
75
-
76
- type CreateLockCommon = {
77
- type: string;
78
- nftType?: string;
79
- collectionId?: string;
80
- price: bigint;
81
- };
82
- type CreateLongLock = CreateLockCommon & {
83
- type: 'long';
84
- nftId: string;
85
- walletAddress: string;
86
- };
87
- type CreateShortLock = CreateLockCommon & {
88
- type: 'short';
89
- nftType: string;
90
- };
91
- type CreateLock = CreateLongLock | CreateShortLock;
92
-
93
- type CancelLock = {
94
- lockId: string;
95
- walletAddress: string;
96
- };
97
-
98
- type BuyLock = {
99
- lockId: string;
100
- tx?: Transaction;
101
- };
102
-
103
- type ExerciseLock = {
104
- lockId: string;
105
- walletAddress: string;
106
- bidId?: string;
107
- listingId?: string;
108
- nftId?: string;
109
- tx?: Transaction;
110
- };
111
-
112
107
  type ApiConfig = {
113
108
  apiUser: string;
114
109
  apiKey: string;
115
110
  };
116
111
  declare class SuiTradingClient {
112
+ private readonly apiUser;
113
+ private readonly apiKey;
117
114
  constructor({ apiUser, apiKey }: ApiConfig);
118
115
  buyListings({ listingIds, walletAddress }: BuyListings): Promise<Transaction>;
119
116
  listNfts({ nfts, walletAddress }: ListNfts): Promise<Transaction>;
@@ -126,7 +123,6 @@ declare class SuiTradingClient {
126
123
  removeCollectionBid({ bidId }: RemoveCollectionBid): Promise<Transaction>;
127
124
  transferNfts({ nftIds, recipientAddress, walletAddress }: TransferNfts): Promise<Transaction>;
128
125
  claimNfts({ nftIds, walletAddress }: ClaimNfts): Promise<Transaction>;
129
- withdrawKioskProfits({ amount, walletAddress }: WithdrawKioskProfits): Promise<Transaction>;
130
126
  createLock(args: CreateLock): Promise<Transaction>;
131
127
  cancelLock(args: CancelLock): Promise<Transaction>;
132
128
  buyLock(args: BuyLock): Promise<Transaction>;
package/dist/index.d.ts CHANGED
@@ -20,12 +20,48 @@ type BuyListings = {
20
20
  kioskTx?: KioskTransaction;
21
21
  };
22
22
 
23
+ type BuyLock = {
24
+ lockId: string;
25
+ tx?: Transaction;
26
+ };
27
+
28
+ type CancelLock = {
29
+ lockId: string;
30
+ walletAddress: string;
31
+ };
32
+
23
33
  type ClaimNfts = {
24
34
  nftIds: string[];
25
35
  walletAddress: string;
26
36
  tx?: Transaction;
27
37
  };
28
38
 
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;
48
+ walletAddress: string;
49
+ };
50
+ type CreateShortLock = CreateLockCommon & {
51
+ type: 'short';
52
+ nftType: string;
53
+ };
54
+ type CreateLock = CreateLongLock | CreateShortLock;
55
+
56
+ type ExerciseLock = {
57
+ lockId: string;
58
+ walletAddress: string;
59
+ bidId?: string;
60
+ listingId?: string;
61
+ nftId?: string;
62
+ tx?: Transaction;
63
+ };
64
+
29
65
  type ListNfts = {
30
66
  nfts: Array<{
31
67
  id: string;
@@ -68,52 +104,13 @@ type UnlistListings = {
68
104
  walletAddress: string;
69
105
  };
70
106
 
71
- type WithdrawKioskProfits = {
72
- amount?: number;
73
- walletAddress: string;
74
- };
75
-
76
- type CreateLockCommon = {
77
- type: string;
78
- nftType?: string;
79
- collectionId?: string;
80
- price: bigint;
81
- };
82
- type CreateLongLock = CreateLockCommon & {
83
- type: 'long';
84
- nftId: string;
85
- walletAddress: string;
86
- };
87
- type CreateShortLock = CreateLockCommon & {
88
- type: 'short';
89
- nftType: string;
90
- };
91
- type CreateLock = CreateLongLock | CreateShortLock;
92
-
93
- type CancelLock = {
94
- lockId: string;
95
- walletAddress: string;
96
- };
97
-
98
- type BuyLock = {
99
- lockId: string;
100
- tx?: Transaction;
101
- };
102
-
103
- type ExerciseLock = {
104
- lockId: string;
105
- walletAddress: string;
106
- bidId?: string;
107
- listingId?: string;
108
- nftId?: string;
109
- tx?: Transaction;
110
- };
111
-
112
107
  type ApiConfig = {
113
108
  apiUser: string;
114
109
  apiKey: string;
115
110
  };
116
111
  declare class SuiTradingClient {
112
+ private readonly apiUser;
113
+ private readonly apiKey;
117
114
  constructor({ apiUser, apiKey }: ApiConfig);
118
115
  buyListings({ listingIds, walletAddress }: BuyListings): Promise<Transaction>;
119
116
  listNfts({ nfts, walletAddress }: ListNfts): Promise<Transaction>;
@@ -126,7 +123,6 @@ declare class SuiTradingClient {
126
123
  removeCollectionBid({ bidId }: RemoveCollectionBid): Promise<Transaction>;
127
124
  transferNfts({ nftIds, recipientAddress, walletAddress }: TransferNfts): Promise<Transaction>;
128
125
  claimNfts({ nftIds, walletAddress }: ClaimNfts): Promise<Transaction>;
129
- withdrawKioskProfits({ amount, walletAddress }: WithdrawKioskProfits): Promise<Transaction>;
130
126
  createLock(args: CreateLock): Promise<Transaction>;
131
127
  cancelLock(args: CancelLock): Promise<Transaction>;
132
128
  buyLock(args: BuyLock): Promise<Transaction>;