@xoxno/sdk-js 0.1.124-alpha → 0.1.126-alpha
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.
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Interaction } from '@multiversx/sdk-core/out/smartcontracts/interaction';
|
|
2
1
|
import { GlobalOffer } from '../types/collection';
|
|
3
2
|
import { NftData } from '..';
|
|
4
3
|
import { AcceptGlobalOffer, Auction, ChangeListing, NewListingArgs, Payment, SendCustomOffer, SendGlobalOffer, WithSenderAndNonce } from '../types/interactions';
|
|
@@ -94,28 +93,28 @@ export declare class SCInteraction {
|
|
|
94
93
|
* Withdraw auctions from the smart contract.
|
|
95
94
|
*
|
|
96
95
|
* @param auctionIDs The IDs of the auctions to withdraw from
|
|
97
|
-
* @returns {
|
|
96
|
+
* @returns {IPlainTransactionObject} The interaction object of the smart contract
|
|
98
97
|
*/
|
|
99
98
|
withdrawAuctions({ auctionIDs, sender, market, signature, }: {
|
|
100
99
|
auctionIDs: number[];
|
|
101
100
|
sender: WithSenderAndNonce;
|
|
102
101
|
signature?: string;
|
|
103
102
|
market?: string;
|
|
104
|
-
}):
|
|
103
|
+
}): IPlainTransactionObject;
|
|
105
104
|
/**
|
|
106
105
|
* Withdraw global offer from the smart contract.
|
|
107
106
|
*
|
|
108
107
|
* @param auctionIDs The IDs of the global offer to withdraw
|
|
109
|
-
* @returns {
|
|
108
|
+
* @returns {IPlainTransactionObject} The interaction object of the smart contract
|
|
110
109
|
*/
|
|
111
|
-
withdrawGlobalOffer(offerID: number, senderNonce: WithSenderAndNonce):
|
|
110
|
+
withdrawGlobalOffer(offerID: number, senderNonce: WithSenderAndNonce): IPlainTransactionObject;
|
|
112
111
|
/**
|
|
113
112
|
* Accept a global offer
|
|
114
113
|
*
|
|
115
114
|
* @param offerID The offer ID
|
|
116
|
-
* @returns {
|
|
115
|
+
* @returns {IPlainTransactionObject} The interaction object of the smart contract
|
|
117
116
|
*/
|
|
118
|
-
acceptGlobalOffer({ signature, offer_id, auction_id_opt, nft, address, nonce, }: AcceptGlobalOffer & WithSenderAndNonce):
|
|
117
|
+
acceptGlobalOffer({ signature, offer_id, auction_id_opt, nft, address, nonce, }: AcceptGlobalOffer & WithSenderAndNonce): IPlainTransactionObject;
|
|
119
118
|
/**
|
|
120
119
|
* Send a global offer
|
|
121
120
|
* @param payment_token The token used for payment
|
|
@@ -124,9 +123,9 @@ export declare class SCInteraction {
|
|
|
124
123
|
* @param collection The collection of the NFT
|
|
125
124
|
* @param attributes The attributes of the NFT
|
|
126
125
|
* @param depositAmount The deposit amount
|
|
127
|
-
* @returns {
|
|
126
|
+
* @returns {IPlainTransactionObject} The interaction object of the smart contract
|
|
128
127
|
* */
|
|
129
|
-
sendGlobalOffer({ payment_token, payment_nonce, price, collection, attributes, depositAmount, address, nonce, }: SendGlobalOffer & WithSenderAndNonce):
|
|
128
|
+
sendGlobalOffer({ payment_token, payment_nonce, price, collection, attributes, depositAmount, address, nonce, }: SendGlobalOffer & WithSenderAndNonce): IPlainTransactionObject;
|
|
130
129
|
/**
|
|
131
130
|
* Send a custom offer
|
|
132
131
|
* @param payment_token The token used for payment
|
|
@@ -135,35 +134,35 @@ export declare class SCInteraction {
|
|
|
135
134
|
* @param deadline The deadline of the offer
|
|
136
135
|
* @param nft The NFT to be sold
|
|
137
136
|
* @param depositAmount The deposit amount
|
|
138
|
-
* @returns {
|
|
137
|
+
* @returns {IPlainTransactionObject} The interaction object of the smart contract
|
|
139
138
|
* */
|
|
140
|
-
sendCustomOffer({ payment_token, payment_nonce, price, deadline, nft, depositAmount, address, nonce, }: SendCustomOffer & WithSenderAndNonce):
|
|
139
|
+
sendCustomOffer({ payment_token, payment_nonce, price, deadline, nft, depositAmount, address, nonce, }: SendCustomOffer & WithSenderAndNonce): IPlainTransactionObject;
|
|
141
140
|
/**
|
|
142
141
|
* Withdraws a custom offer
|
|
143
142
|
*
|
|
144
143
|
* @param offerID The offer ID
|
|
145
|
-
* @returns {
|
|
144
|
+
* @returns {IPlainTransactionObject} The interaction object of the smart contract
|
|
146
145
|
*/
|
|
147
|
-
withdrawCustomOffer(offerID: number, senderNonce: WithSenderAndNonce):
|
|
146
|
+
withdrawCustomOffer(offerID: number, senderNonce: WithSenderAndNonce): IPlainTransactionObject;
|
|
148
147
|
/**
|
|
149
148
|
* Decline a custom offer
|
|
150
149
|
*
|
|
151
150
|
* @param offerID The offer ID
|
|
152
|
-
* @returns {
|
|
151
|
+
* @returns {IPlainTransactionObject} The interaction object of the smart contract
|
|
153
152
|
*/
|
|
154
|
-
declineCustomOffer(offerID: number, sender: WithSenderAndNonce, nft: NftData):
|
|
153
|
+
declineCustomOffer(offerID: number, sender: WithSenderAndNonce, nft: NftData): IPlainTransactionObject;
|
|
155
154
|
/**
|
|
156
155
|
* Accept a custom offer
|
|
157
156
|
*
|
|
158
157
|
* @param offerID The offer ID
|
|
159
|
-
* @returns {
|
|
158
|
+
* @returns {IPlainTransactionObject} The interaction object of the smart contract
|
|
160
159
|
*/
|
|
161
|
-
acceptCustomOffer(offerID: number, sender: WithSenderAndNonce, nft: NftData):
|
|
160
|
+
acceptCustomOffer(offerID: number, sender: WithSenderAndNonce, nft: NftData): IPlainTransactionObject;
|
|
162
161
|
/**
|
|
163
162
|
* @public
|
|
164
163
|
* @function endAuction
|
|
165
164
|
* @param {number} auctionID - The unique identifier of the auction.
|
|
166
|
-
* @returns {
|
|
165
|
+
* @returns {IPlainTransactionObject} The resulting interaction with the specified chainID and gas limit.
|
|
167
166
|
*
|
|
168
167
|
* This function allows ending an auction by its auctionID. It takes the following parameter:
|
|
169
168
|
* - auctionID (number): The unique identifier of the auction.
|
|
@@ -171,7 +170,7 @@ export declare class SCInteraction {
|
|
|
171
170
|
* The function calls the `endAuction` method on the smart contract with the provided auctionID.
|
|
172
171
|
* Finally, it returns the resulting interaction with the specified chainID and gas limit.
|
|
173
172
|
*/
|
|
174
|
-
endAuction(auctionID: number, sender: WithSenderAndNonce, market?: string):
|
|
173
|
+
endAuction(auctionID: number, sender: WithSenderAndNonce, market?: string): IPlainTransactionObject;
|
|
175
174
|
/**
|
|
176
175
|
* Bid on an auction
|
|
177
176
|
*
|
|
@@ -179,7 +178,7 @@ export declare class SCInteraction {
|
|
|
179
178
|
* @param collection The NFT Collection
|
|
180
179
|
* @param nonce The NFT nonce
|
|
181
180
|
* @param payment The payment object
|
|
182
|
-
* @returns {
|
|
181
|
+
* @returns {IPlainTransactionObject} The interaction object of the smart contract
|
|
183
182
|
*/
|
|
184
183
|
bidOnAuctionId(auctionID: number, collection: string, nonce: number, payment: Payment, sender: WithSenderAndNonce): IPlainTransactionObject;
|
|
185
184
|
/**
|
|
@@ -187,9 +186,9 @@ export declare class SCInteraction {
|
|
|
187
186
|
*
|
|
188
187
|
* @param auctionIDs The auction IDs
|
|
189
188
|
* @param payment The payment object
|
|
190
|
-
* @returns {
|
|
189
|
+
* @returns {IPlainTransactionObject} The interaction object of the smart contract
|
|
191
190
|
*/
|
|
192
|
-
bulkBuy(auctionIDs: number[], payment: Payment, sender: WithSenderAndNonce):
|
|
191
|
+
bulkBuy(auctionIDs: number[], payment: Payment, sender: WithSenderAndNonce): IPlainTransactionObject;
|
|
193
192
|
/**
|
|
194
193
|
* @public
|
|
195
194
|
* @async
|
|
@@ -203,7 +202,7 @@ export declare class SCInteraction {
|
|
|
203
202
|
* @param {number} [options.paymentAmount] - The payment amount for the auction (optional).
|
|
204
203
|
* @param {boolean} [options.withCheck=true] - Whether to check the auction information (default is true).
|
|
205
204
|
* @param {boolean} [options.isBigUintPayment=false] - Whether the payment amount is a big integer (default is false).
|
|
206
|
-
* @returns {Promise<
|
|
205
|
+
* @returns {Promise<IPlainTransactionObject>} The resulting interaction with the specified chainID and gas limit.
|
|
207
206
|
*
|
|
208
207
|
* This function allows a user to buy an auction by its auctionID. It takes an object with the following properties:
|
|
209
208
|
* - auctionID (number): The unique identifier of the auction.
|
|
@@ -232,14 +231,14 @@ export declare class SCInteraction {
|
|
|
232
231
|
market?: string;
|
|
233
232
|
decimals?: number;
|
|
234
233
|
sender: WithSenderAndNonce;
|
|
235
|
-
}): Promise<
|
|
234
|
+
}): Promise<IPlainTransactionObject>;
|
|
236
235
|
/**
|
|
237
236
|
* @docutype
|
|
238
237
|
* @public
|
|
239
238
|
* @async
|
|
240
239
|
* @function changeListing
|
|
241
240
|
* @param {ChangeListing[]} listings - An array of objects containing the information needed to change a listing.
|
|
242
|
-
* @returns {
|
|
241
|
+
* @returns {IPlainTransactionObject} The resulting interaction with the specified chainID and gas limit.
|
|
243
242
|
*
|
|
244
243
|
* This function takes an array of `ChangeListing` objects and constructs `Struct` instances using the provided
|
|
245
244
|
* information. Each `ChangeListing` object should have the following properties:
|
|
@@ -251,7 +250,7 @@ export declare class SCInteraction {
|
|
|
251
250
|
* The function then calls the `changeListing` method on the smart contract and returns the resulting interaction
|
|
252
251
|
* with the specified chainID and gas limit.
|
|
253
252
|
*/
|
|
254
|
-
changeListing(listings: ChangeListing[], sender: WithSenderAndNonce, marketplace: string): Promise<
|
|
255
|
-
listNFTs(listings: NewListingArgs[], sender: WithSenderAndNonce): Promise<
|
|
253
|
+
changeListing(listings: ChangeListing[], sender: WithSenderAndNonce, marketplace: string): Promise<IPlainTransactionObject>;
|
|
254
|
+
listNFTs(listings: NewListingArgs[], sender: WithSenderAndNonce): Promise<IPlainTransactionObject>;
|
|
256
255
|
}
|
|
257
256
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interactions/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interactions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAe,MAAM,IAAI,CAAC;AAW1C,OAAO,EACL,iBAAiB,EACjB,OA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