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