@xoxno/sdk-js 0.0.11-alpha → 0.0.13-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.
- package/README.md +26 -7
- package/dist/collection/index.d.ts +2 -3
- package/dist/collection/index.js +7 -6
- package/dist/collection/index.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/interactions/index.d.ts +104 -1
- package/dist/interactions/index.js +209 -4
- package/dist/interactions/index.js.map +1 -1
- package/dist/launchpad/index.d.ts +1 -1
- package/dist/launchpad/index.js +1 -2
- package/dist/launchpad/index.js.map +1 -1
- package/dist/nft/index.d.ts +2 -3
- package/dist/nft/index.js +7 -6
- package/dist/nft/index.js.map +1 -1
- package/dist/staking/index.d.ts +31 -0
- package/dist/staking/index.js +70 -0
- package/dist/staking/index.js.map +1 -0
- package/dist/types/interactions.d.ts +41 -0
- package/dist/types/interactions.js +8 -0
- package/dist/types/interactions.js.map +1 -1
- package/dist/types/nft.d.ts +9 -5
- package/dist/types/staking.d.ts +42 -0
- package/dist/types/staking.js +14 -0
- package/dist/types/staking.js.map +1 -0
- package/dist/types/trading.d.ts +2 -2
- package/dist/types/user.d.ts +152 -0
- package/dist/types/user.js +13 -0
- package/dist/types/user.js.map +1 -0
- package/dist/users/index.d.ts +56 -0
- package/dist/users/index.js +110 -0
- package/dist/users/index.js.map +1 -0
- package/dist/utils/SmartContractAbis.js +1 -1
- package/dist/utils/SmartContractAbis.js.map +1 -1
- package/dist/utils/api.d.ts +3 -3
- package/dist/utils/api.js +2 -8
- package/dist/utils/api.js.map +1 -1
- package/dist/utils/getActivity.d.ts +1 -1
- package/dist/utils/getActivity.js +1 -1
- package/dist/utils/getActivity.js.map +1 -1
- package/dist/utils/helpers.d.ts +2 -0
- package/dist/utils/helpers.js +12 -1
- package/dist/utils/helpers.js.map +1 -1
- package/dist/utils/scCalls.js +5 -2
- package/dist/utils/scCalls.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,17 +6,36 @@ XOXNO SDK is a JavaScript library that simplifies the interaction with the XOXNO
|
|
|
6
6
|
|
|
7
7
|
- [Installation](#installation)
|
|
8
8
|
- [Usage](#usage)
|
|
9
|
-
|
|
10
|
-
- [Fetching Data](#fetching-data)
|
|
11
|
-
- [Interacting with the Smart Contract](#interacting-with-the-smart-contract)
|
|
12
|
-
- [Testing](#testing)
|
|
13
|
-
- [Contributing](#contributing)
|
|
14
|
-
- [License](#license)
|
|
9
|
+
- [Documentation](#docs)
|
|
15
10
|
|
|
16
11
|
## Installation
|
|
17
12
|
|
|
18
13
|
To install the XOXNO SDK, simply run the following command in your project's root directory:
|
|
19
14
|
|
|
20
15
|
```bash
|
|
21
|
-
npm
|
|
16
|
+
npm i @xoxno/sdk-js
|
|
22
17
|
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
The SDK follows a scheleton model where the API configuration has to be initiated only once anywhere in your application
|
|
22
|
+
|
|
23
|
+
```javascript
|
|
24
|
+
import XOXNOClient from '@xoxno/sdk-js';
|
|
25
|
+
XOXNOClient.init();
|
|
26
|
+
// By default calling init() without arguments will set the entire SDK to the mainnet ENV using the public API https://api.xoxno.com
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
After the client has been created you can now import different modules anywhere in the application:
|
|
30
|
+
|
|
31
|
+
```javascript
|
|
32
|
+
import CollectionModule from '@xoxno/sdk-js';
|
|
33
|
+
const collection = new CollectionModule(); // In case the above .init() call was not set before creating any module instance will auto trigger .init() using the default parameters described above
|
|
34
|
+
const profile = await collection.getCollectionProfile('MONKEY-ac9bdf');
|
|
35
|
+
// or similar with
|
|
36
|
+
const profile = await new CollectionModule().getCollectionProfile('MONKEY-ac9bdf');
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Docs
|
|
40
|
+
|
|
41
|
+
For more modules and typescript interfaces you can check our documentation at [https://sdk.xoxno.com](https://sdk.xoxno.com)
|
|
@@ -6,10 +6,9 @@ import { TradincActivityArgs, TradingActivityResponse } from '../types/trading';
|
|
|
6
6
|
* collection attributes, and searching NFTs within a collection.
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
|
-
* const
|
|
10
|
-
* const collectionModule = xoxno.collection;
|
|
9
|
+
* const collectionModule = new CollectionModule();
|
|
11
10
|
*/
|
|
12
|
-
export
|
|
11
|
+
export default class CollectionModule {
|
|
13
12
|
private api;
|
|
14
13
|
constructor();
|
|
15
14
|
/**
|
package/dist/collection/index.js
CHANGED
|
@@ -8,9 +8,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
|
|
13
|
-
const api_1 = require("../utils/api");
|
|
15
|
+
const api_1 = __importDefault(require("../utils/api"));
|
|
14
16
|
const getActivity_1 = require("../utils/getActivity");
|
|
15
17
|
const regex_1 = require("../utils/regex");
|
|
16
18
|
/**
|
|
@@ -19,8 +21,7 @@ const regex_1 = require("../utils/regex");
|
|
|
19
21
|
* collection attributes, and searching NFTs within a collection.
|
|
20
22
|
*
|
|
21
23
|
* @example
|
|
22
|
-
* const
|
|
23
|
-
* const collectionModule = xoxno.collection;
|
|
24
|
+
* const collectionModule = new CollectionModule();
|
|
24
25
|
*/
|
|
25
26
|
class CollectionModule {
|
|
26
27
|
constructor() {
|
|
@@ -147,8 +148,8 @@ class CollectionModule {
|
|
|
147
148
|
hasMoreResults: response.length >= ((args === null || args === void 0 ? void 0 : args.top) || 25),
|
|
148
149
|
};
|
|
149
150
|
});
|
|
150
|
-
this.api = api_1.
|
|
151
|
+
this.api = api_1.default.init();
|
|
151
152
|
}
|
|
152
153
|
}
|
|
153
|
-
exports.
|
|
154
|
+
exports.default = CollectionModule;
|
|
154
155
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/collection/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/collection/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAUA,uDAAuC;AACvC,sDAAmD;AACnD,0CAAyD;AAEzD;;;;;;;GAOG;AACH,MAAqB,gBAAgB;IAEnC;QAIA;;;;;WAKG;QACI,yBAAoB,GAAG,CAC5B,UAAkB,EACW,EAAE;YAC/B,IAAI,CAAC,IAAA,+BAAuB,EAAC,UAAU,CAAC,EAAE;gBACxC,MAAM,IAAI,KAAK,CAAC,6BAA6B,GAAG,UAAU,CAAC,CAAC;aAC7D;YACD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAC9C,yBAAyB,UAAU,EAAE,CACtC,CAAC;YACF,OAAO,QAAQ,CAAC;QAClB,CAAC,CAAA,CAAC;QAEF;;;;;;WAMG;QACI,4BAAuB,GAAG,CAC/B,UAAkB,EAClB,KAAK,GAAG,MAAM,EACG,EAAE;YACnB,IAAI,CAAC,IAAA,+BAAuB,EAAC,UAAU,CAAC,EAAE;gBACxC,MAAM,IAAI,KAAK,CAAC,6BAA6B,GAAG,UAAU,CAAC,CAAC;aAC7D;YACD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAC9C,kBAAkB,UAAU,IAAI,KAAK,EAAE,CACxC,CAAC;YACF,OAAO,QAAQ,CAAC;QAClB,CAAC,CAAA,CAAC;QAEF;;;;;WAKG;QACI,4BAAuB,GAAG,CAC/B,UAAkB,EACc,EAAE;YAClC,IAAI,CAAC,IAAA,+BAAuB,EAAC,UAAU,CAAC,EAAE;gBACxC,MAAM,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CAAE,IAAI,KAAI,CAAC,CAAC,GAAG,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,GAAG,KAAI,EAAE,CAAC,GAC5C;gBACD,cAAc,EAAE,QAAQ,CAAC,MAAM,IAAI,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,GAAG,KAAI,EAAE,CAAC;aACrD,CAAC;QACJ,CAAC,CAAA,CAAC;QAhLA,IAAI,CAAC,GAAG,GAAG,aAAW,CAAC,IAAI,EAAE,CAAC;IAChC,CAAC;CAgLF;AApLD,mCAoLC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -19,5 +19,7 @@ __exportStar(require("./collection"), exports);
|
|
|
19
19
|
__exportStar(require("./launchpad"), exports);
|
|
20
20
|
__exportStar(require("./interactions"), exports);
|
|
21
21
|
__exportStar(require("./nft"), exports);
|
|
22
|
+
__exportStar(require("./users"), exports);
|
|
23
|
+
__exportStar(require("./staking"), exports);
|
|
22
24
|
__exportStar(require("./utils/api"), exports);
|
|
23
25
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,+CAA6B;AAC7B,8CAA4B;AAC5B,iDAA+B;AAC/B,wCAAsB;AACtB,8CAA4B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,+CAA6B;AAC7B,8CAA4B;AAC5B,iDAA+B;AAC/B,wCAAsB;AACtB,0CAAwB;AACxB,4CAA0B;AAC1B,8CAA4B"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import type { Interaction } from '@multiversx/sdk-core/out/smartcontracts/interaction';
|
|
1
2
|
import { GlobalOffer } from '../types/collection';
|
|
2
3
|
import type { SmartContract } from '@multiversx/sdk-core/out/smartcontracts/smartContract';
|
|
3
|
-
|
|
4
|
+
import { Auction, ChangeListing } from '../types/interactions';
|
|
5
|
+
export default class SCInteraction {
|
|
4
6
|
private xo;
|
|
5
7
|
private call;
|
|
8
|
+
private api;
|
|
6
9
|
constructor(marketAbiXOXNO: SmartContract);
|
|
7
10
|
static create(): Promise<SCInteraction>;
|
|
8
11
|
private getResult;
|
|
@@ -39,6 +42,14 @@ export declare class SCInteraction {
|
|
|
39
42
|
* @returns An object containing the global offer data for the offer with the given id. If the global offer id is invalid, the return value will be null.
|
|
40
43
|
*/
|
|
41
44
|
getGlobalOfferData: (global_offer_id: number) => Promise<GlobalOffer>;
|
|
45
|
+
/**
|
|
46
|
+
* Returns the auction struct for the given id.
|
|
47
|
+
*
|
|
48
|
+
* @param auctionID The id of the auction for which to return the data.
|
|
49
|
+
*
|
|
50
|
+
* @returns {Auction} An object containing the auction data for the given id. If the auction id is invalid, the return value will be null.
|
|
51
|
+
*/
|
|
52
|
+
getAuctionInfo: (auctionID: number) => Promise<Auction | null>;
|
|
42
53
|
/** Gets the number of listings.
|
|
43
54
|
* @returns {number} The number of listings.
|
|
44
55
|
* */
|
|
@@ -76,4 +87,96 @@ export declare class SCInteraction {
|
|
|
76
87
|
* @returns {number[]} The active unique auction IDs of collection.
|
|
77
88
|
* */
|
|
78
89
|
getAuctionIDsForCollection(collection: string): Promise<number[]>;
|
|
90
|
+
/**
|
|
91
|
+
* Withdraw auctions from the smart contract.
|
|
92
|
+
*
|
|
93
|
+
* @param auctionIDs The IDs of the auctions to withdraw from
|
|
94
|
+
* @returns {Interaction} The interaction object of the smart contract
|
|
95
|
+
*/
|
|
96
|
+
withdrawAuctions(auctionIDs: number[]): Interaction;
|
|
97
|
+
/**
|
|
98
|
+
* Withdraw global offer from the smart contract.
|
|
99
|
+
*
|
|
100
|
+
* @param auctionIDs The IDs of the global offer to withdraw
|
|
101
|
+
* @returns {Interaction} The interaction object of the smart contract
|
|
102
|
+
*/
|
|
103
|
+
withdrawGlobalOffer(offerID: number): Interaction;
|
|
104
|
+
/**
|
|
105
|
+
* Withdraws a custom offer
|
|
106
|
+
*
|
|
107
|
+
* @param offerID The offer ID
|
|
108
|
+
* @returns {Interaction} The interaction object of the smart contract
|
|
109
|
+
*/
|
|
110
|
+
withdrawCustomOffer(offerID: number): Interaction;
|
|
111
|
+
/**
|
|
112
|
+
* @public
|
|
113
|
+
* @function endAuction
|
|
114
|
+
* @param {number} auctionID - The unique identifier of the auction.
|
|
115
|
+
* @returns {Interaction} The resulting interaction with the specified chainID and gas limit.
|
|
116
|
+
*
|
|
117
|
+
* This function allows ending an auction by its auctionID. It takes the following parameter:
|
|
118
|
+
* - auctionID (number): The unique identifier of the auction.
|
|
119
|
+
*
|
|
120
|
+
* The function calls the `endAuction` method on the smart contract with the provided auctionID.
|
|
121
|
+
* Finally, it returns the resulting interaction with the specified chainID and gas limit.
|
|
122
|
+
*/
|
|
123
|
+
endAuction(auctionID: number): Interaction;
|
|
124
|
+
/**
|
|
125
|
+
* @public
|
|
126
|
+
* @async
|
|
127
|
+
* @function buyAuctionById
|
|
128
|
+
* @param {Object} options - An object containing the necessary parameters to buy an auction.
|
|
129
|
+
* @param {number} options.auctionID - The unique identifier of the auction.
|
|
130
|
+
* @param {string} [options.collection] - The collection the auctioned token belongs to (optional).
|
|
131
|
+
* @param {number} [options.nonce] - The nonce of the auctioned token (optional).
|
|
132
|
+
* @param {number} [options.quantity=1] - The quantity of tokens to buy (default is 1).
|
|
133
|
+
* @param {string} [options.token='EGLD'] - The payment token (default is 'EGLD').
|
|
134
|
+
* @param {number} [options.paymentAmount] - The payment amount for the auction (optional).
|
|
135
|
+
* @param {boolean} [options.withCheck=true] - Whether to check the auction information (default is true).
|
|
136
|
+
* @param {boolean} [options.isBigUintPayment=false] - Whether the payment amount is a big integer (default is false).
|
|
137
|
+
* @returns {Promise<Interaction>} The resulting interaction with the specified chainID and gas limit.
|
|
138
|
+
*
|
|
139
|
+
* This function allows a user to buy an auction by its auctionID. It takes an object with the following properties:
|
|
140
|
+
* - auctionID (number): The unique identifier of the auction.
|
|
141
|
+
* - collection (string, optional): The collection the auctioned token belongs to.
|
|
142
|
+
* - nonce (number, optional): The nonce of the auctioned token.
|
|
143
|
+
* - quantity (number, optional): The quantity of tokens to buy (default is 1).
|
|
144
|
+
* - token (string, optional): The payment token (default is 'EGLD').
|
|
145
|
+
* - paymentAmount (number, optional): The payment amount for the auction.
|
|
146
|
+
* - withCheck (boolean, optional): Whether to check the auction information (default is true).
|
|
147
|
+
* - isBigUintPayment (boolean, optional): Whether the payment amount is a big integer (default is false).
|
|
148
|
+
*
|
|
149
|
+
* The function first checks if the auction exists and if its type is NFT or SftOnePerPayment. If not, an error is thrown.
|
|
150
|
+
* Then, it calculates the payment amount and calls the `buy` method on the smart contract with the provided parameters.
|
|
151
|
+
* Finally, the function returns the resulting interaction with the specified chainID and gas limit.
|
|
152
|
+
*/
|
|
153
|
+
buyAuctionById({ auctionID, collection, nonce, paymentAmount, quantity, token, withCheck, isBigUintPayment, }: {
|
|
154
|
+
auctionID: number;
|
|
155
|
+
collection?: string;
|
|
156
|
+
nonce?: number;
|
|
157
|
+
quantity?: number;
|
|
158
|
+
token?: string;
|
|
159
|
+
paymentAmount?: number;
|
|
160
|
+
withCheck?: boolean;
|
|
161
|
+
isBigUintPayment?: boolean;
|
|
162
|
+
}): Promise<Interaction>;
|
|
163
|
+
/**
|
|
164
|
+
* @docutype
|
|
165
|
+
* @public
|
|
166
|
+
* @async
|
|
167
|
+
* @function changeListing
|
|
168
|
+
* @param {ChangeListing[]} listings - An array of objects containing the information needed to change a listing.
|
|
169
|
+
* @returns {Interaction} The resulting interaction with the specified chainID and gas limit.
|
|
170
|
+
*
|
|
171
|
+
* This function takes an array of `ChangeListing` objects and constructs `Struct` instances using the provided
|
|
172
|
+
* information. Each `ChangeListing` object should have the following properties:
|
|
173
|
+
* - paymentToken (string): The identifier of the payment token type.
|
|
174
|
+
* - price (BigInt): The new price for the listing.
|
|
175
|
+
* - auctionID (number): The unique identifier of the auction.
|
|
176
|
+
* - deadline (number): The deadline (in Unix time) for the listing.
|
|
177
|
+
*
|
|
178
|
+
* The function then calls the `changeListing` method on the smart contract and returns the resulting interaction
|
|
179
|
+
* with the specified chainID and gas limit.
|
|
180
|
+
*/
|
|
181
|
+
changeListing(listings: ChangeListing[]): Promise<Interaction>;
|
|
79
182
|
}
|
|
@@ -8,13 +8,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
|
|
13
|
-
const api_1 = require("../utils/api");
|
|
15
|
+
const api_1 = __importDefault(require("../utils/api"));
|
|
14
16
|
const scCalls_1 = require("../utils/scCalls");
|
|
15
17
|
const SmartContractAbis_1 = require("../utils/SmartContractAbis");
|
|
16
18
|
const SmartContractService_1 = require("../utils/SmartContractService");
|
|
17
19
|
const numerical_1 = require("@multiversx/sdk-core/out/smartcontracts/typesystem/numerical");
|
|
20
|
+
const interactions_1 = require("../types/interactions");
|
|
21
|
+
const tokenTransfer_1 = require("@multiversx/sdk-core/out/tokenTransfer");
|
|
22
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
23
|
+
const struct_1 = require("@multiversx/sdk-core/out/smartcontracts/typesystem/struct");
|
|
24
|
+
const tokenIdentifier_1 = require("@multiversx/sdk-core/out/smartcontracts/typesystem/tokenIdentifier");
|
|
25
|
+
const fields_1 = require("@multiversx/sdk-core/out/smartcontracts/typesystem/fields");
|
|
18
26
|
class SCInteraction {
|
|
19
27
|
constructor(marketAbiXOXNO) {
|
|
20
28
|
/**
|
|
@@ -80,12 +88,44 @@ class SCInteraction {
|
|
|
80
88
|
}
|
|
81
89
|
return body;
|
|
82
90
|
});
|
|
91
|
+
/**
|
|
92
|
+
* Returns the auction struct for the given id.
|
|
93
|
+
*
|
|
94
|
+
* @param auctionID The id of the auction for which to return the data.
|
|
95
|
+
*
|
|
96
|
+
* @returns {Auction} An object containing the auction data for the given id. If the auction id is invalid, the return value will be null.
|
|
97
|
+
*/
|
|
98
|
+
this.getAuctionInfo = (auctionID) => __awaiter(this, void 0, void 0, function* () {
|
|
99
|
+
var _e;
|
|
100
|
+
const interaction = this.xo.methods.getFullAuctionData([auctionID]);
|
|
101
|
+
const result = yield this.getResult(interaction);
|
|
102
|
+
const body = (_e = result.firstValue) === null || _e === void 0 ? void 0 : _e.valueOf();
|
|
103
|
+
if (!body) {
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
body.auctioned_token_nonce = parseInt(body.auctioned_token_nonce.valueOf());
|
|
107
|
+
body.nr_auctioned_tokens = parseInt(body.nr_auctioned_tokens.valueOf());
|
|
108
|
+
body.auction_type = body.auction_type.name;
|
|
109
|
+
body.payment_token_nonce = parseInt(body.payment_token_nonce.valueOf());
|
|
110
|
+
body.min_bid = body.min_bid.valueOf();
|
|
111
|
+
body.max_bid = body.max_bid.valueOf();
|
|
112
|
+
body.start_time = parseInt(body.start_time.valueOf());
|
|
113
|
+
body.deadline = parseInt(body.deadline.valueOf());
|
|
114
|
+
body.original_owner = body.original_owner.valueOf().toString();
|
|
115
|
+
body.current_winner = body.current_winner.valueOf().toString();
|
|
116
|
+
body.current_bid = body.current_bid.valueOf().toString();
|
|
117
|
+
body.marketplace_cut_percentage = body.marketplace_cut_percentage.valueOf();
|
|
118
|
+
body.creator_royalties_percentage =
|
|
119
|
+
body.creator_royalties_percentage.valueOf();
|
|
120
|
+
return body;
|
|
121
|
+
});
|
|
83
122
|
this.xo = marketAbiXOXNO;
|
|
84
123
|
this.call = new scCalls_1.ContractQueryRunner();
|
|
124
|
+
this.api = api_1.default.init();
|
|
85
125
|
}
|
|
86
126
|
static create() {
|
|
87
127
|
return __awaiter(this, void 0, void 0, function* () {
|
|
88
|
-
const config = api_1.
|
|
128
|
+
const config = api_1.default.init().config;
|
|
89
129
|
const marketAbiXOXNO = yield SmartContractAbis_1.SmartContractAbis.getMarket();
|
|
90
130
|
const xo_abi = (0, SmartContractService_1.getSmartContract)(marketAbiXOXNO, config.XO_SC);
|
|
91
131
|
return new SCInteraction(xo_abi);
|
|
@@ -204,6 +244,171 @@ class SCInteraction {
|
|
|
204
244
|
return ids;
|
|
205
245
|
});
|
|
206
246
|
}
|
|
247
|
+
/**
|
|
248
|
+
* Withdraw auctions from the smart contract.
|
|
249
|
+
*
|
|
250
|
+
* @param auctionIDs The IDs of the auctions to withdraw from
|
|
251
|
+
* @returns {Interaction} The interaction object of the smart contract
|
|
252
|
+
*/
|
|
253
|
+
withdrawAuctions(auctionIDs) {
|
|
254
|
+
const interaction = this.xo.methods.withdraw(auctionIDs);
|
|
255
|
+
return interaction
|
|
256
|
+
.withChainID(this.api.chain)
|
|
257
|
+
.withGasLimit(Math.min(600000000, 15000000 + auctionIDs.length * 5000000));
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Withdraw global offer from the smart contract.
|
|
261
|
+
*
|
|
262
|
+
* @param auctionIDs The IDs of the global offer to withdraw
|
|
263
|
+
* @returns {Interaction} The interaction object of the smart contract
|
|
264
|
+
*/
|
|
265
|
+
withdrawGlobalOffer(offerID) {
|
|
266
|
+
const interaction = this.xo.methods.withdrawGlobalOffer([offerID]);
|
|
267
|
+
return interaction.withChainID(this.api.chain).withGasLimit(15000000);
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Withdraws a custom offer
|
|
271
|
+
*
|
|
272
|
+
* @param offerID The offer ID
|
|
273
|
+
* @returns {Interaction} The interaction object of the smart contract
|
|
274
|
+
*/
|
|
275
|
+
withdrawCustomOffer(offerID) {
|
|
276
|
+
const interaction = this.xo.methods.withdrawOffer([offerID]);
|
|
277
|
+
return interaction.withChainID(this.api.chain).withGasLimit(15000000);
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* @public
|
|
281
|
+
* @function endAuction
|
|
282
|
+
* @param {number} auctionID - The unique identifier of the auction.
|
|
283
|
+
* @returns {Interaction} The resulting interaction with the specified chainID and gas limit.
|
|
284
|
+
*
|
|
285
|
+
* This function allows ending an auction by its auctionID. It takes the following parameter:
|
|
286
|
+
* - auctionID (number): The unique identifier of the auction.
|
|
287
|
+
*
|
|
288
|
+
* The function calls the `endAuction` method on the smart contract with the provided auctionID.
|
|
289
|
+
* Finally, it returns the resulting interaction with the specified chainID and gas limit.
|
|
290
|
+
*/
|
|
291
|
+
endAuction(auctionID) {
|
|
292
|
+
const interaction = this.xo.methods.endAuction([auctionID]);
|
|
293
|
+
return interaction.withChainID(this.api.chain).withGasLimit(15000000);
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* @public
|
|
297
|
+
* @async
|
|
298
|
+
* @function buyAuctionById
|
|
299
|
+
* @param {Object} options - An object containing the necessary parameters to buy an auction.
|
|
300
|
+
* @param {number} options.auctionID - The unique identifier of the auction.
|
|
301
|
+
* @param {string} [options.collection] - The collection the auctioned token belongs to (optional).
|
|
302
|
+
* @param {number} [options.nonce] - The nonce of the auctioned token (optional).
|
|
303
|
+
* @param {number} [options.quantity=1] - The quantity of tokens to buy (default is 1).
|
|
304
|
+
* @param {string} [options.token='EGLD'] - The payment token (default is 'EGLD').
|
|
305
|
+
* @param {number} [options.paymentAmount] - The payment amount for the auction (optional).
|
|
306
|
+
* @param {boolean} [options.withCheck=true] - Whether to check the auction information (default is true).
|
|
307
|
+
* @param {boolean} [options.isBigUintPayment=false] - Whether the payment amount is a big integer (default is false).
|
|
308
|
+
* @returns {Promise<Interaction>} The resulting interaction with the specified chainID and gas limit.
|
|
309
|
+
*
|
|
310
|
+
* This function allows a user to buy an auction by its auctionID. It takes an object with the following properties:
|
|
311
|
+
* - auctionID (number): The unique identifier of the auction.
|
|
312
|
+
* - collection (string, optional): The collection the auctioned token belongs to.
|
|
313
|
+
* - nonce (number, optional): The nonce of the auctioned token.
|
|
314
|
+
* - quantity (number, optional): The quantity of tokens to buy (default is 1).
|
|
315
|
+
* - token (string, optional): The payment token (default is 'EGLD').
|
|
316
|
+
* - paymentAmount (number, optional): The payment amount for the auction.
|
|
317
|
+
* - withCheck (boolean, optional): Whether to check the auction information (default is true).
|
|
318
|
+
* - isBigUintPayment (boolean, optional): Whether the payment amount is a big integer (default is false).
|
|
319
|
+
*
|
|
320
|
+
* The function first checks if the auction exists and if its type is NFT or SftOnePerPayment. If not, an error is thrown.
|
|
321
|
+
* Then, it calculates the payment amount and calls the `buy` method on the smart contract with the provided parameters.
|
|
322
|
+
* Finally, the function returns the resulting interaction with the specified chainID and gas limit.
|
|
323
|
+
*/
|
|
324
|
+
buyAuctionById({ auctionID, collection, nonce, paymentAmount, quantity = 1, token = 'EGLD', withCheck = true, isBigUintPayment = false, }) {
|
|
325
|
+
var _a, _b, _c, _d;
|
|
326
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
327
|
+
if (!auctionID) {
|
|
328
|
+
throw new Error('AuctionID not provided');
|
|
329
|
+
}
|
|
330
|
+
let auction = null;
|
|
331
|
+
if (!paymentAmount || !token || !collection || !nonce || withCheck) {
|
|
332
|
+
auction = yield this.getAuctionInfo(auctionID);
|
|
333
|
+
if (auction === null) {
|
|
334
|
+
throw new Error('Auction not found');
|
|
335
|
+
}
|
|
336
|
+
if (auction.auction_type === interactions_1.AuctionType.Nft ||
|
|
337
|
+
auction.auction_type === interactions_1.AuctionType.SftOnePerPayment) {
|
|
338
|
+
throw new Error('Auction type is not NFT or SftOnePerPayment');
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
const paymentToken = (_a = auction === null || auction === void 0 ? void 0 : auction.payment_token_type) !== null && _a !== void 0 ? _a : token;
|
|
342
|
+
const bigNumber = auction ? true : isBigUintPayment;
|
|
343
|
+
let amount = (_b = auction === null || auction === void 0 ? void 0 : auction.min_bid) !== null && _b !== void 0 ? _b : paymentAmount;
|
|
344
|
+
if (!amount) {
|
|
345
|
+
throw new Error('Payment amount not provided');
|
|
346
|
+
}
|
|
347
|
+
const interaction = this.xo.methods.buy([
|
|
348
|
+
auctionID,
|
|
349
|
+
(_c = auction === null || auction === void 0 ? void 0 : auction.auctioned_token_type) !== null && _c !== void 0 ? _c : collection,
|
|
350
|
+
(_d = auction === null || auction === void 0 ? void 0 : auction.auctioned_token_nonce) !== null && _d !== void 0 ? _d : nonce,
|
|
351
|
+
quantity !== null && quantity !== void 0 ? quantity : 1,
|
|
352
|
+
]);
|
|
353
|
+
if (token === 'EGLD') {
|
|
354
|
+
interaction.withValue(bigNumber
|
|
355
|
+
? tokenTransfer_1.TokenTransfer.egldFromBigInteger(new bignumber_js_1.default(amount).multipliedBy(quantity))
|
|
356
|
+
: tokenTransfer_1.TokenTransfer.egldFromAmount(new bignumber_js_1.default(amount).multipliedBy(quantity)));
|
|
357
|
+
}
|
|
358
|
+
else {
|
|
359
|
+
if (!bigNumber) {
|
|
360
|
+
auction = yield this.getAuctionInfo(auctionID);
|
|
361
|
+
if (auction === null) {
|
|
362
|
+
throw new Error('Auction not found');
|
|
363
|
+
}
|
|
364
|
+
amount = auction.min_bid;
|
|
365
|
+
}
|
|
366
|
+
interaction.withSingleESDTTransfer(tokenTransfer_1.TokenTransfer.fungibleFromBigInteger(paymentToken, amount));
|
|
367
|
+
}
|
|
368
|
+
return interaction.withChainID(this.api.chain).withGasLimit(15000000);
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* @docutype
|
|
373
|
+
* @public
|
|
374
|
+
* @async
|
|
375
|
+
* @function changeListing
|
|
376
|
+
* @param {ChangeListing[]} listings - An array of objects containing the information needed to change a listing.
|
|
377
|
+
* @returns {Interaction} The resulting interaction with the specified chainID and gas limit.
|
|
378
|
+
*
|
|
379
|
+
* This function takes an array of `ChangeListing` objects and constructs `Struct` instances using the provided
|
|
380
|
+
* information. Each `ChangeListing` object should have the following properties:
|
|
381
|
+
* - paymentToken (string): The identifier of the payment token type.
|
|
382
|
+
* - price (BigInt): The new price for the listing.
|
|
383
|
+
* - auctionID (number): The unique identifier of the auction.
|
|
384
|
+
* - deadline (number): The deadline (in Unix time) for the listing.
|
|
385
|
+
*
|
|
386
|
+
* The function then calls the `changeListing` method on the smart contract and returns the resulting interaction
|
|
387
|
+
* with the specified chainID and gas limit.
|
|
388
|
+
*/
|
|
389
|
+
changeListing(listings) {
|
|
390
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
391
|
+
const fooType = new struct_1.StructType('BulkUpdateListing', [
|
|
392
|
+
new fields_1.FieldDefinition('payment_token_type', '', new tokenIdentifier_1.TokenIdentifierType()),
|
|
393
|
+
new fields_1.FieldDefinition('new_price', '', new numerical_1.BigUIntType()),
|
|
394
|
+
new fields_1.FieldDefinition('auction_id', '', new numerical_1.U64Type()),
|
|
395
|
+
new fields_1.FieldDefinition('deadline', '', new numerical_1.U64Type()),
|
|
396
|
+
]);
|
|
397
|
+
const structs = [];
|
|
398
|
+
listings.forEach(({ paymentToken, price, auctionID, deadline }) => {
|
|
399
|
+
structs.push(new struct_1.Struct(fooType, [
|
|
400
|
+
new fields_1.Field(new tokenIdentifier_1.TokenIdentifierValue(paymentToken), 'payment_token_type'),
|
|
401
|
+
new fields_1.Field(new numerical_1.BigUIntValue(price), 'new_price'),
|
|
402
|
+
new fields_1.Field(new numerical_1.U64Value(auctionID), 'auction_id'),
|
|
403
|
+
new fields_1.Field(new numerical_1.U64Value(deadline), 'deadline'),
|
|
404
|
+
]));
|
|
405
|
+
});
|
|
406
|
+
const interaction = this.xo.methods.changeListing(structs);
|
|
407
|
+
return interaction
|
|
408
|
+
.withChainID(this.api.chain)
|
|
409
|
+
.withGasLimit(Math.min(600000000, 8000000 + listings.length * 2000000));
|
|
410
|
+
});
|
|
411
|
+
}
|
|
207
412
|
}
|
|
208
|
-
exports.
|
|
413
|
+
exports.default = SCInteraction;
|
|
209
414
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interactions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,sCAA2C;AAC3C,8CAAuD;AACvD,kEAA+D;AAC/D,wEAAiE;AAEjE,4FAA4F;AAE5F,MAAa,aAAa;IAGxB,YAAY,cAA6B;QAiBzC;;;;WAIG;QACI,uBAAkB,GAAG,GAA0B,EAAE;;YACtD,MAAM,WAAW,GAAG,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,2BAA2B,EAAE,CAAC;YAClE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;YACjD,OAAO,QAAQ,CAAC,MAAA,MAAM,CAAC,UAAU,0CAAE,OAAO,EAAE,CAAC,CAAC;QAChD,CAAC,CAAA,CAAC;QAEF;;;WAGG;QACI,6BAAwB,GAAG,GAA4B,EAAE;;YAC9D,MAAM,WAAW,GAAG,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,iBAAiB,EAAE,CAAC;YACxD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;YACjD,OAAO,MAAA,MAAM,CAAC,UAAU,0CAAE,OAAO,EAAE,CAAC;QACtC,CAAC,CAAA,CAAC;QAEF;;;WAGG;QAEI,sBAAiB,GAAG,GAA4B,EAAE;;YACvD,MAAM,WAAW,GAAG,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC;YACtD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;YACjD,OAAO,MAAA,MAAM,CAAC,UAAU,0CAAE,OAAO,GAAG,GAAG,CAAC,CAAC,EAAU,EAAE,EAAE,CAAC,QAAQ,C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,CAAC,GAAG,CAAC,KAAK,CAAC;iBAC3B,YAAY,CACX,IAAI,CAAC,GAAG,CAAC,SAAW,EAAE,OAAS,GAAG,QAAQ,CAAC,MAAM,GAAG,OAAS,CAAC,CAC/D,CAAC;QACN,CAAC;KAAA;CAqEF;AAjhBD,gCAihBC"}
|
|
@@ -3,7 +3,7 @@ import type { SmartContract } from '@multiversx/sdk-core/out/smartcontracts/smar
|
|
|
3
3
|
* LaunchpadModule provides methods to interact with the minter smart contract.
|
|
4
4
|
* @class
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export default class LaunchpadModule {
|
|
7
7
|
private minter;
|
|
8
8
|
private call;
|
|
9
9
|
/**
|
package/dist/launchpad/index.js
CHANGED
|
@@ -9,7 +9,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.LaunchpadModule = void 0;
|
|
13
12
|
const SmartContractAbis_1 = require("../utils/SmartContractAbis");
|
|
14
13
|
const SmartContractService_1 = require("../utils/SmartContractService");
|
|
15
14
|
const scCalls_1 = require("../utils/scCalls");
|
|
@@ -154,5 +153,5 @@ class LaunchpadModule {
|
|
|
154
153
|
});
|
|
155
154
|
}
|
|
156
155
|
}
|
|
157
|
-
exports.
|
|
156
|
+
exports.default = LaunchpadModule;
|
|
158
157
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/launchpad/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/launchpad/index.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,kEAA+D;AAC/D,wEAAiE;AACjE,8CAAuD;AAGvD;;;GAGG;AACH,MAAqB,eAAe;IAGlC;;;OAGG;IACH,YAAY,cAA6B;QA2BzC;;;;WAIG;QAC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MAAM,EAAE,WAAW,CAAC,CAAC;QAC5D,CAAC;KAAA;IAED;;;;;OAKG;IACH,MAAM,CAAO,IAAI,CAAC,QAAgB;;YAChC,MAAM,cAAc,GAAG,MAAM,qCAAiB,CAAC,SAAS,EAAE,CAAC;YAC3D,MAAM,UAAU,GAAG,IAAA,uCAAgB,EAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;YAC9D,OAAO,IAAI,eAAe,CAAC,UAAU,CAAC,CAAC;QACzC,CAAC;KAAA;CAwHF;AAxJD,kCAwJC"}
|
package/dist/nft/index.d.ts
CHANGED
|
@@ -5,10 +5,9 @@ import { TradingActivityResponse, TradincActivityArgs } from '../types/trading';
|
|
|
5
5
|
* It includes methods for getting single NFT information, and searching NFTs by collection and nonce.
|
|
6
6
|
*
|
|
7
7
|
* @example
|
|
8
|
-
* const
|
|
9
|
-
* const nftModule = xoxno.nft;
|
|
8
|
+
* const nftModule = new NFTModule();
|
|
10
9
|
*/
|
|
11
|
-
export
|
|
10
|
+
export default class NFTModule {
|
|
12
11
|
private api;
|
|
13
12
|
constructor();
|
|
14
13
|
/**
|
package/dist/nft/index.js
CHANGED
|
@@ -8,9 +8,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
|
|
13
|
-
const api_1 = require("../utils/api");
|
|
15
|
+
const api_1 = __importDefault(require("../utils/api"));
|
|
14
16
|
const getActivity_1 = require("../utils/getActivity");
|
|
15
17
|
const helpers_1 = require("../utils/helpers");
|
|
16
18
|
const regex_1 = require("../utils/regex");
|
|
@@ -19,8 +21,7 @@ const regex_1 = require("../utils/regex");
|
|
|
19
21
|
* It includes methods for getting single NFT information, and searching NFTs by collection and nonce.
|
|
20
22
|
*
|
|
21
23
|
* @example
|
|
22
|
-
* const
|
|
23
|
-
* const nftModule = xoxno.nft;
|
|
24
|
+
* const nftModule = new NFTModule();
|
|
24
25
|
*/
|
|
25
26
|
class NFTModule {
|
|
26
27
|
constructor() {
|
|
@@ -80,8 +81,8 @@ class NFTModule {
|
|
|
80
81
|
this.getTradingActivity = (args) => __awaiter(this, void 0, void 0, function* () {
|
|
81
82
|
return yield (0, getActivity_1.getActivity)(args, this.api);
|
|
82
83
|
});
|
|
83
|
-
this.api = api_1.
|
|
84
|
+
this.api = api_1.default.init();
|
|
84
85
|
}
|
|
85
86
|
}
|
|
86
|
-
exports.
|
|
87
|
+
exports.default = NFTModule;
|
|
87
88
|
//# sourceMappingURL=index.js.map
|