@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/dist/nft/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/nft/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/nft/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAEA,uDAAuC;AACvC,sDAAmD;AACnD,8CAAgE;AAChE,0CAA+E;AAE/E;;;;;;GAMG;AAEH,MAAqB,SAAS;IAE5B;QAIA;;;;WAIG;QACI,uBAAkB,GAAG,CAAO,UAAkB,EAAoB,EAAE;YACzE,IAAI,CAAC,IAAA,4BAAoB,EAAC,UAAU,CAAC,EAAE;gBACrC,MAAM,IAAI,KAAK,CAAC,sBAAsB,GAAG,UAAU,CAAC,CAAC;aACtD;YACD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAC9C,SAAS,UAAU,EAAE,CACtB,CAAC;YACF,OAAO,QAAQ,CAAC;QAClB,CAAC,CAAA,CAAC;QAEF;;;;;;WAMG;QACI,+BAA0B,GAAG,CAClC,UAAkB,EAClB,KAAa,EACK,EAAE;YACpB,IAAI,CAAC,IAAA,+BAAuB,EAAC,UAAU,CAAC,EAAE;gBACxC,MAAM,IAAI,KAAK,CAAC,6BAA6B,GAAG,UAAU,CAAC,CAAC;aAC7D;YAED,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAC9C,SAAS,IAAA,sCAA4B,EAAC,UAAU,EAAE,KAAK,CAAC,EAAE,CAC3D,CAAC;YACF,OAAO,QAAQ,CAAC;QAClB,CAAC,CAAA,CAAC;QAEF;;;;;;WAMG;QAEI,kCAA6B,GAAG,CACrC,UAAkB,EAClB,QAAgB,EACE,EAAE;YACpB,iCAAiC;YACjC,IAAI,CAAC,IAAA,+BAAuB,EAAC,UAAU,CAAC,EAAE;gBACxC,MAAM,IAAI,KAAK,CAAC,6BAA6B,GAAG,UAAU,CAAC,CAAC;aAC7D;YACD,6BAA6B;YAC7B,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE;gBAC7B,QAAQ,GAAG,GAAG,GAAG,QAAQ,CAAC;aAC3B;YACD,qBAAqB;YACrB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAC9C,SAAS,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAC5C,CAAC;YACF,OAAO,QAAQ,CAAC;QAClB,CAAC,CAAA,CAAC;QAEF;;;;;;WAMG;QACI,uBAAkB,GAAG,CAC1B,IAAyB,EACS,EAAE;YACpC,OAAO,MAAM,IAAA,yBAAW,EAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QAC3C,CAAC,CAAA,CAAC;QA7EA,IAAI,CAAC,GAAG,GAAG,aAAW,CAAC,IAAI,EAAE,CAAC;IAChC,CAAC;CA6EF;AAjFD,4BAiFC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { StakingPool } from '../types/staking';
|
|
2
|
+
import { Nfts } from '../types/user';
|
|
3
|
+
export default class StakingModule {
|
|
4
|
+
private api;
|
|
5
|
+
constructor();
|
|
6
|
+
/**
|
|
7
|
+
* Returns all staking pools
|
|
8
|
+
*
|
|
9
|
+
* @returns {StakingPool[]}
|
|
10
|
+
*/
|
|
11
|
+
getAllStakingPools: () => Promise<StakingPool[]>;
|
|
12
|
+
/**
|
|
13
|
+
* Returns the staking pool by id
|
|
14
|
+
*
|
|
15
|
+
* @returns {StakingPool}
|
|
16
|
+
*/
|
|
17
|
+
getStakingPoolInfo: (poolId: number) => Promise<StakingPool>;
|
|
18
|
+
/**
|
|
19
|
+
* Returns the staking pool by id
|
|
20
|
+
* @param poolId - The pool id
|
|
21
|
+
* @param address - The user's address
|
|
22
|
+
* @param tickers - The collection tickers
|
|
23
|
+
* @returns {Nfts} - A list of token ids and the price
|
|
24
|
+
* @example
|
|
25
|
+
* const nfts = await new StakingModule().getStakableNFTsByWallet(1, 'erd111', ['EGIRL-absd123']);
|
|
26
|
+
* @throws an error if the pool id is not a number
|
|
27
|
+
* @throws an error if the address is not valid
|
|
28
|
+
* @throws an error if the tickers are not valid
|
|
29
|
+
**/
|
|
30
|
+
getStakableNFTsByWallet: (poolId: number, address: string, tickers: string[]) => Promise<Nfts>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const api_1 = __importDefault(require("../utils/api"));
|
|
16
|
+
const helpers_1 = require("../utils/helpers");
|
|
17
|
+
class StakingModule {
|
|
18
|
+
constructor() {
|
|
19
|
+
/**
|
|
20
|
+
* Returns all staking pools
|
|
21
|
+
*
|
|
22
|
+
* @returns {StakingPool[]}
|
|
23
|
+
*/
|
|
24
|
+
this.getAllStakingPools = () => __awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
const response = yield this.api.fetchWithTimeout('/getStakingPools');
|
|
26
|
+
return response;
|
|
27
|
+
});
|
|
28
|
+
/**
|
|
29
|
+
* Returns the staking pool by id
|
|
30
|
+
*
|
|
31
|
+
* @returns {StakingPool}
|
|
32
|
+
*/
|
|
33
|
+
this.getStakingPoolInfo = (poolId) => __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
if (typeof poolId !== 'number')
|
|
35
|
+
throw new Error('Invalid pool id');
|
|
36
|
+
const response = yield this.api.fetchWithTimeout(`/getPoolDetails/${poolId}`);
|
|
37
|
+
return response;
|
|
38
|
+
});
|
|
39
|
+
/**
|
|
40
|
+
* Returns the staking pool by id
|
|
41
|
+
* @param poolId - The pool id
|
|
42
|
+
* @param address - The user's address
|
|
43
|
+
* @param tickers - The collection tickers
|
|
44
|
+
* @returns {Nfts} - A list of token ids and the price
|
|
45
|
+
* @example
|
|
46
|
+
* const nfts = await new StakingModule().getStakableNFTsByWallet(1, 'erd111', ['EGIRL-absd123']);
|
|
47
|
+
* @throws an error if the pool id is not a number
|
|
48
|
+
* @throws an error if the address is not valid
|
|
49
|
+
* @throws an error if the tickers are not valid
|
|
50
|
+
**/
|
|
51
|
+
this.getStakableNFTsByWallet = (poolId, address, tickers) => __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
if (typeof poolId !== 'number')
|
|
53
|
+
throw new Error('Invalid pool id');
|
|
54
|
+
if (!(0, helpers_1.isAddressValid)(address))
|
|
55
|
+
throw new Error('Invalid address');
|
|
56
|
+
const response = yield this.api.fetchWithTimeout('/getNftsForStake', {
|
|
57
|
+
method: 'POST',
|
|
58
|
+
body: JSON.stringify({
|
|
59
|
+
poolId,
|
|
60
|
+
address,
|
|
61
|
+
tickers,
|
|
62
|
+
}),
|
|
63
|
+
});
|
|
64
|
+
return response;
|
|
65
|
+
});
|
|
66
|
+
this.api = api_1.default.init();
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.default = StakingModule;
|
|
70
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index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wDF;AA5DD,gCA4DC"}
|
|
@@ -14,3 +14,44 @@ export type Offer = {
|
|
|
14
14
|
new_version: boolean;
|
|
15
15
|
price_long: string;
|
|
16
16
|
};
|
|
17
|
+
export declare enum AuctionType {
|
|
18
|
+
NftBid = 0,
|
|
19
|
+
Nft = 1,
|
|
20
|
+
SftAll = 2,
|
|
21
|
+
SftOnePerPayment = 3
|
|
22
|
+
}
|
|
23
|
+
export interface Auction {
|
|
24
|
+
auctioned_token_type: string;
|
|
25
|
+
auctioned_token_nonce: number;
|
|
26
|
+
nr_auctioned_tokens: number;
|
|
27
|
+
auction_type: AuctionType;
|
|
28
|
+
payment_token_type: string;
|
|
29
|
+
payment_token_nonce: number;
|
|
30
|
+
min_bid: string;
|
|
31
|
+
max_bid: string;
|
|
32
|
+
start_time: number;
|
|
33
|
+
deadline: number;
|
|
34
|
+
original_owner: string;
|
|
35
|
+
current_bid: string;
|
|
36
|
+
current_winner: string;
|
|
37
|
+
marketplace_cut_percentage: string;
|
|
38
|
+
creator_royalties_percentage: string;
|
|
39
|
+
}
|
|
40
|
+
export interface ChangeListing {
|
|
41
|
+
paymentToken: string;
|
|
42
|
+
price: string;
|
|
43
|
+
auctionID: number;
|
|
44
|
+
deadline: number;
|
|
45
|
+
}
|
|
46
|
+
export interface NewListingArgs {
|
|
47
|
+
min_bid: string;
|
|
48
|
+
max_bid?: string;
|
|
49
|
+
deadline?: number;
|
|
50
|
+
accepted_payment_token: string;
|
|
51
|
+
bid: boolean;
|
|
52
|
+
opt_sft_max_one_per_payment?: boolean;
|
|
53
|
+
opt_start_time?: number;
|
|
54
|
+
collection: string;
|
|
55
|
+
nonce: number;
|
|
56
|
+
nft_amount: number;
|
|
57
|
+
}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuctionType = void 0;
|
|
4
|
+
var AuctionType;
|
|
5
|
+
(function (AuctionType) {
|
|
6
|
+
AuctionType[AuctionType["NftBid"] = 0] = "NftBid";
|
|
7
|
+
AuctionType[AuctionType["Nft"] = 1] = "Nft";
|
|
8
|
+
AuctionType[AuctionType["SftAll"] = 2] = "SftAll";
|
|
9
|
+
AuctionType[AuctionType["SftOnePerPayment"] = 3] = "SftOnePerPayment";
|
|
10
|
+
})(AuctionType = exports.AuctionType || (exports.AuctionType = {}));
|
|
3
11
|
//# sourceMappingURL=interactions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactions.js","sourceRoot":"","sources":["../../src/types/interactions.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"interactions.js","sourceRoot":"","sources":["../../src/types/interactions.ts"],"names":[],"mappings":";;;AAiBA,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,iDAAM,CAAA;IACN,2CAAG,CAAA;IACH,iDAAM,CAAA;IACN,qEAAgB,CAAA;AAClB,CAAC,EALW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAKtB"}
|
package/dist/types/nft.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
value: string;
|
|
1
|
+
import { MetadataAttribute } from './collection';
|
|
2
|
+
export interface NFTAttribute extends MetadataAttribute {
|
|
4
3
|
occurance: number;
|
|
5
4
|
rarity: number;
|
|
6
5
|
frequency: number;
|
|
@@ -9,8 +8,8 @@ export interface NFTAttribute {
|
|
|
9
8
|
}
|
|
10
9
|
export interface NFTMetadata {
|
|
11
10
|
description?: string;
|
|
12
|
-
attributes
|
|
13
|
-
rarity
|
|
11
|
+
attributes?: NFTAttribute[];
|
|
12
|
+
rarity?: {
|
|
14
13
|
rank: number;
|
|
15
14
|
};
|
|
16
15
|
}
|
|
@@ -90,4 +89,9 @@ export interface NftData {
|
|
|
90
89
|
isVerified: boolean;
|
|
91
90
|
isVisible: boolean;
|
|
92
91
|
nftValue?: NftValue;
|
|
92
|
+
pool_id?: number;
|
|
93
|
+
isStaked?: boolean;
|
|
94
|
+
currentEpoch?: number;
|
|
95
|
+
hasUboundPeriod?: boolean;
|
|
96
|
+
balance?: number;
|
|
93
97
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { TickerElement } from './user';
|
|
2
|
+
export type StakingPool = {
|
|
3
|
+
name: string;
|
|
4
|
+
collections: TickerElement[];
|
|
5
|
+
pool_type: PoolType;
|
|
6
|
+
issuing_type: IssuingType;
|
|
7
|
+
pool_id: number;
|
|
8
|
+
pool_total_staked?: number;
|
|
9
|
+
whitelist_pool: boolean;
|
|
10
|
+
is_active: boolean;
|
|
11
|
+
is_stake_enabled: boolean;
|
|
12
|
+
expiration_in_days: number;
|
|
13
|
+
profile: string;
|
|
14
|
+
unbound_period: number;
|
|
15
|
+
reward_per_epoch: Reward[];
|
|
16
|
+
reward_balance: Reward[];
|
|
17
|
+
start_issuing: number;
|
|
18
|
+
start_issuing_timestamp: number;
|
|
19
|
+
deadline_issuing: number;
|
|
20
|
+
deadline_issuing_timestamp: number;
|
|
21
|
+
cut_fees: number;
|
|
22
|
+
max_stake_per_pool: number;
|
|
23
|
+
reward_tokens: string[];
|
|
24
|
+
reward_per_epoch_per_nft: Reward[];
|
|
25
|
+
max_stake_per_wallet: number;
|
|
26
|
+
is_verified: boolean;
|
|
27
|
+
percent_filled: number | null;
|
|
28
|
+
currentEpoch: number;
|
|
29
|
+
owner: string;
|
|
30
|
+
};
|
|
31
|
+
export declare enum IssuingType {
|
|
32
|
+
Dynamic = "Dynamic",
|
|
33
|
+
Fixed = "Fixed"
|
|
34
|
+
}
|
|
35
|
+
export declare enum PoolType {
|
|
36
|
+
Duo = "Duo",
|
|
37
|
+
Single = "Single"
|
|
38
|
+
}
|
|
39
|
+
export type Reward = {
|
|
40
|
+
value: number;
|
|
41
|
+
ticker: string;
|
|
42
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PoolType = exports.IssuingType = void 0;
|
|
4
|
+
var IssuingType;
|
|
5
|
+
(function (IssuingType) {
|
|
6
|
+
IssuingType["Dynamic"] = "Dynamic";
|
|
7
|
+
IssuingType["Fixed"] = "Fixed";
|
|
8
|
+
})(IssuingType = exports.IssuingType || (exports.IssuingType = {}));
|
|
9
|
+
var PoolType;
|
|
10
|
+
(function (PoolType) {
|
|
11
|
+
PoolType["Duo"] = "Duo";
|
|
12
|
+
PoolType["Single"] = "Single";
|
|
13
|
+
})(PoolType = exports.PoolType || (exports.PoolType = {}));
|
|
14
|
+
//# sourceMappingURL=staking.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"staking.js","sourceRoot":"","sources":["../../src/types/staking.ts"],"names":[],"mappings":";;;AAgCA,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,8BAAe,CAAA;AACjB,CAAC,EAHW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAGtB;AAED,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,uBAAW,CAAA;IACX,6BAAiB,CAAA;AACnB,CAAC,EAHW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAGnB"}
|
package/dist/types/trading.d.ts
CHANGED
|
@@ -31,8 +31,8 @@ export interface TradincActivityArgs {
|
|
|
31
31
|
collections?: string[];
|
|
32
32
|
/** The identifier of the NFTs to fetch the trading activity from */
|
|
33
33
|
identifiers?: string[];
|
|
34
|
-
/** The
|
|
35
|
-
|
|
34
|
+
/** The wallets for which to fetch the trading activity */
|
|
35
|
+
wallets?: string[];
|
|
36
36
|
/** The marketplaces to fetch the trading activity from */
|
|
37
37
|
marketplaces?: Marketplace[];
|
|
38
38
|
/** The tokens to fetch the trading activity from */
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { MetadataAttribute } from './collection';
|
|
2
|
+
import { NftData } from './nft';
|
|
3
|
+
export interface IUserProfile {
|
|
4
|
+
dataType: 'userProfile';
|
|
5
|
+
hasKYC?: boolean;
|
|
6
|
+
address: string;
|
|
7
|
+
isBanned: boolean;
|
|
8
|
+
isVerified: boolean;
|
|
9
|
+
socials: ISocials;
|
|
10
|
+
favorites: string[];
|
|
11
|
+
joinedDate: number;
|
|
12
|
+
id: string;
|
|
13
|
+
profile: string;
|
|
14
|
+
banner: string;
|
|
15
|
+
description: string;
|
|
16
|
+
herotag: string;
|
|
17
|
+
isCreator: boolean;
|
|
18
|
+
creatorInfo: {
|
|
19
|
+
contractAddress?: string;
|
|
20
|
+
name?: string;
|
|
21
|
+
};
|
|
22
|
+
isPoolOwner: boolean;
|
|
23
|
+
followedCollections: string[];
|
|
24
|
+
userDeposit: UserDeposit[];
|
|
25
|
+
_ts: number;
|
|
26
|
+
shard: number;
|
|
27
|
+
}
|
|
28
|
+
export interface UserDeposit {
|
|
29
|
+
balanceShort: number;
|
|
30
|
+
balance: string;
|
|
31
|
+
paymentToken: string;
|
|
32
|
+
paymentTokenNonce: number;
|
|
33
|
+
}
|
|
34
|
+
export interface ISocials {
|
|
35
|
+
twitter?: string;
|
|
36
|
+
instagram?: string;
|
|
37
|
+
website?: string;
|
|
38
|
+
telegram?: string;
|
|
39
|
+
discord?: string;
|
|
40
|
+
facebook?: string;
|
|
41
|
+
youtube?: string;
|
|
42
|
+
}
|
|
43
|
+
export interface UserInventory {
|
|
44
|
+
nftsWorth: number;
|
|
45
|
+
groupedByCollection: GroupedByCollection[];
|
|
46
|
+
}
|
|
47
|
+
export interface GroupedByCollection {
|
|
48
|
+
name: string;
|
|
49
|
+
type: string;
|
|
50
|
+
image: string;
|
|
51
|
+
ticker: string;
|
|
52
|
+
isVerified: boolean;
|
|
53
|
+
isVisible: boolean;
|
|
54
|
+
nftsCount: number;
|
|
55
|
+
nfts: NftData[];
|
|
56
|
+
bids: NftData[];
|
|
57
|
+
floorWorth: number;
|
|
58
|
+
maxWorth: number;
|
|
59
|
+
floorPrice: number;
|
|
60
|
+
totalWorth: number;
|
|
61
|
+
}
|
|
62
|
+
export interface UserOffers {
|
|
63
|
+
nftsWorth: number;
|
|
64
|
+
groupedByCollection: OffersGroupedByCollection[];
|
|
65
|
+
}
|
|
66
|
+
export interface OffersGroupedByCollection {
|
|
67
|
+
name: string;
|
|
68
|
+
type: string;
|
|
69
|
+
image: string;
|
|
70
|
+
ticker: string;
|
|
71
|
+
isVerified: boolean;
|
|
72
|
+
isVisible: boolean;
|
|
73
|
+
offers: Offer[];
|
|
74
|
+
globalOffers: GlobalOffer[];
|
|
75
|
+
}
|
|
76
|
+
export interface GlobalOffer {
|
|
77
|
+
dataType: string;
|
|
78
|
+
offer_id: number;
|
|
79
|
+
collection: string;
|
|
80
|
+
quantity: number;
|
|
81
|
+
payment_token: string;
|
|
82
|
+
payment_nonce: number;
|
|
83
|
+
price: string;
|
|
84
|
+
short_price: number;
|
|
85
|
+
owner: string;
|
|
86
|
+
marketplace: string;
|
|
87
|
+
timestamp: number;
|
|
88
|
+
attributes: MetadataAttribute[];
|
|
89
|
+
id: string;
|
|
90
|
+
uniqueKey: string;
|
|
91
|
+
_ts: number;
|
|
92
|
+
isActive: boolean;
|
|
93
|
+
}
|
|
94
|
+
export declare enum OfferType {
|
|
95
|
+
Received = "Received",
|
|
96
|
+
Sent = "Sent"
|
|
97
|
+
}
|
|
98
|
+
export interface Offer {
|
|
99
|
+
offerType: OfferType;
|
|
100
|
+
identifier: string;
|
|
101
|
+
webpUrl: string;
|
|
102
|
+
avifUrl: string;
|
|
103
|
+
onSale: boolean;
|
|
104
|
+
url: string;
|
|
105
|
+
collection: string;
|
|
106
|
+
onDR: boolean;
|
|
107
|
+
onFM: boolean;
|
|
108
|
+
onKG: boolean;
|
|
109
|
+
name: string;
|
|
110
|
+
nonce: number;
|
|
111
|
+
offer_id: number;
|
|
112
|
+
payment_token: string;
|
|
113
|
+
payment_nonce: number;
|
|
114
|
+
price: string;
|
|
115
|
+
price_short: number;
|
|
116
|
+
deadline: number;
|
|
117
|
+
timestamp: number;
|
|
118
|
+
owner: string;
|
|
119
|
+
quantity: number;
|
|
120
|
+
EgldValue: number;
|
|
121
|
+
UsdValue: number;
|
|
122
|
+
isActive: boolean;
|
|
123
|
+
ownerUsername: string;
|
|
124
|
+
}
|
|
125
|
+
export type UserStakingInfo = {
|
|
126
|
+
pool_id: number;
|
|
127
|
+
pool_type: string;
|
|
128
|
+
unClaimedReward: UnClaimedReward[];
|
|
129
|
+
reward_token: string[];
|
|
130
|
+
name: string;
|
|
131
|
+
profile: string;
|
|
132
|
+
ticker: TickerElement[];
|
|
133
|
+
nfts: Nfts;
|
|
134
|
+
};
|
|
135
|
+
export type Nfts = {
|
|
136
|
+
count: number;
|
|
137
|
+
resultsCount: number;
|
|
138
|
+
results: NftData[];
|
|
139
|
+
empty: boolean;
|
|
140
|
+
};
|
|
141
|
+
export declare enum Type {
|
|
142
|
+
NonFungibleESDT = "NonFungibleESDT"
|
|
143
|
+
}
|
|
144
|
+
export type TickerElement = {
|
|
145
|
+
ticker: string;
|
|
146
|
+
name: string;
|
|
147
|
+
};
|
|
148
|
+
export type UnClaimedReward = {
|
|
149
|
+
reward_token: string;
|
|
150
|
+
reward_token_nonce: string;
|
|
151
|
+
amount: number;
|
|
152
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Type = exports.OfferType = void 0;
|
|
4
|
+
var OfferType;
|
|
5
|
+
(function (OfferType) {
|
|
6
|
+
OfferType["Received"] = "Received";
|
|
7
|
+
OfferType["Sent"] = "Sent";
|
|
8
|
+
})(OfferType = exports.OfferType || (exports.OfferType = {}));
|
|
9
|
+
var Type;
|
|
10
|
+
(function (Type) {
|
|
11
|
+
Type["NonFungibleESDT"] = "NonFungibleESDT";
|
|
12
|
+
})(Type = exports.Type || (exports.Type = {}));
|
|
13
|
+
//# sourceMappingURL=user.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.js","sourceRoot":"","sources":["../../src/types/user.ts"],"names":[],"mappings":";;;AAqGA,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,kCAAqB,CAAA;IACrB,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB;AA+CD,IAAY,IAEX;AAFD,WAAY,IAAI;IACd,2CAAmC,CAAA;AACrC,CAAC,EAFW,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAEf"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { NftData, TradincActivityArgs, TradingActivityResponse } from '../types';
|
|
2
|
+
import { IUserProfile, UserInventory, UserOffers, UserStakingInfo } from '../types/user';
|
|
3
|
+
export default class UserModule {
|
|
4
|
+
private api;
|
|
5
|
+
constructor();
|
|
6
|
+
/**
|
|
7
|
+
* Returns the user profile
|
|
8
|
+
*
|
|
9
|
+
* @param {String} address - Address of the user
|
|
10
|
+
* @returns {IUserProfile}
|
|
11
|
+
*/
|
|
12
|
+
getUserProfile: (address: string) => Promise<IUserProfile>;
|
|
13
|
+
/**
|
|
14
|
+
* Gets user's inventory
|
|
15
|
+
*
|
|
16
|
+
* @param {String} address - User's address
|
|
17
|
+
* @returns {UserInventory} User's inventory
|
|
18
|
+
*/
|
|
19
|
+
getUserInventory: (address: string) => Promise<UserInventory>;
|
|
20
|
+
/**
|
|
21
|
+
* Fetches the user's NFTs listed on the marketplaces
|
|
22
|
+
* @param address - The user's address
|
|
23
|
+
* @returns {UserInventory} - A list of token ids and the price
|
|
24
|
+
*/
|
|
25
|
+
getUserListedInventory: (address: string) => Promise<UserInventory>;
|
|
26
|
+
/**
|
|
27
|
+
* @name getUserOffers
|
|
28
|
+
* @description Fetches all offers sent or received associated with a user address
|
|
29
|
+
* @param {String} address - The user's wallet address
|
|
30
|
+
* @returns {UserOffers} - The user's listings
|
|
31
|
+
*/
|
|
32
|
+
getUserOffers: (address: string) => Promise<UserOffers>;
|
|
33
|
+
/**
|
|
34
|
+
* Gets all NFTs from a collection by a specific user address
|
|
35
|
+
*
|
|
36
|
+
* @param {String} address - Address of the user
|
|
37
|
+
* @param {String} collection - Collection ticker
|
|
38
|
+
* @returns {NftData[]} A list of NFTs
|
|
39
|
+
*/
|
|
40
|
+
getUserNFTsByCollection: (address: string, collection: string) => Promise<NftData[]>;
|
|
41
|
+
/**
|
|
42
|
+
* Retrieves trading history based on the provided arguments.
|
|
43
|
+
*
|
|
44
|
+
* @param {TradincActivityArgs} args - The arguments for filtering the trading activity.
|
|
45
|
+
* @returns {Promise<TradingActivityResponse>} A promise resolving to a TradingActivityResponse object containing the activity.
|
|
46
|
+
* @throws {Error} Throws an error if the 'top' argument is greater than 35.
|
|
47
|
+
*/
|
|
48
|
+
getTradingActivity: (args: TradincActivityArgs) => Promise<TradingActivityResponse>;
|
|
49
|
+
/** Gets user's staking info
|
|
50
|
+
* @param {String} address - User's address
|
|
51
|
+
* @returns {UserStakingInfo} User's staking info
|
|
52
|
+
* @throws {Error} Throws an error if the address is invalid
|
|
53
|
+
* @example const userStakingInfo = await new UserModule().getUserStakingInfo('erd11...');
|
|
54
|
+
* */
|
|
55
|
+
getUserStakingInfo: (address: string) => Promise<UserStakingInfo[]>;
|
|
56
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const api_1 = __importDefault(require("../utils/api"));
|
|
16
|
+
const getActivity_1 = require("../utils/getActivity");
|
|
17
|
+
const helpers_1 = require("../utils/helpers");
|
|
18
|
+
const regex_1 = require("../utils/regex");
|
|
19
|
+
class UserModule {
|
|
20
|
+
constructor() {
|
|
21
|
+
/**
|
|
22
|
+
* Returns the user profile
|
|
23
|
+
*
|
|
24
|
+
* @param {String} address - Address of the user
|
|
25
|
+
* @returns {IUserProfile}
|
|
26
|
+
*/
|
|
27
|
+
this.getUserProfile = (address) => __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
if (!(0, helpers_1.isAddressValid)(address))
|
|
29
|
+
throw new Error('Invalid address');
|
|
30
|
+
const response = yield this.api.fetchWithTimeout(`/getUserProfile/${address}`);
|
|
31
|
+
return response;
|
|
32
|
+
});
|
|
33
|
+
/**
|
|
34
|
+
* Gets user's inventory
|
|
35
|
+
*
|
|
36
|
+
* @param {String} address - User's address
|
|
37
|
+
* @returns {UserInventory} User's inventory
|
|
38
|
+
*/
|
|
39
|
+
this.getUserInventory = (address) => __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
if (!(0, helpers_1.isAddressValid)(address))
|
|
41
|
+
throw new Error('Invalid address');
|
|
42
|
+
const response = yield this.api.fetchWithTimeout(`/accounts/${address}/inventory`);
|
|
43
|
+
return response;
|
|
44
|
+
});
|
|
45
|
+
/**
|
|
46
|
+
* Fetches the user's NFTs listed on the marketplaces
|
|
47
|
+
* @param address - The user's address
|
|
48
|
+
* @returns {UserInventory} - A list of token ids and the price
|
|
49
|
+
*/
|
|
50
|
+
this.getUserListedInventory = (address) => __awaiter(this, void 0, void 0, function* () {
|
|
51
|
+
if (!(0, helpers_1.isAddressValid)(address))
|
|
52
|
+
throw new Error('Invalid address');
|
|
53
|
+
const response = yield this.api.fetchWithTimeout(`/accounts/${address}/listings`);
|
|
54
|
+
return response;
|
|
55
|
+
});
|
|
56
|
+
/**
|
|
57
|
+
* @name getUserOffers
|
|
58
|
+
* @description Fetches all offers sent or received associated with a user address
|
|
59
|
+
* @param {String} address - The user's wallet address
|
|
60
|
+
* @returns {UserOffers} - The user's listings
|
|
61
|
+
*/
|
|
62
|
+
this.getUserOffers = (address) => __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
if (!(0, helpers_1.isAddressValid)(address))
|
|
64
|
+
throw new Error('Invalid address');
|
|
65
|
+
const response = yield this.api.fetchWithTimeout(`/accounts/${address}/listings`);
|
|
66
|
+
return response;
|
|
67
|
+
});
|
|
68
|
+
/**
|
|
69
|
+
* Gets all NFTs from a collection by a specific user address
|
|
70
|
+
*
|
|
71
|
+
* @param {String} address - Address of the user
|
|
72
|
+
* @param {String} collection - Collection ticker
|
|
73
|
+
* @returns {NftData[]} A list of NFTs
|
|
74
|
+
*/
|
|
75
|
+
this.getUserNFTsByCollection = (address, collection) => __awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
if (!(0, helpers_1.isAddressValid)(address))
|
|
77
|
+
throw new Error('Invalid address');
|
|
78
|
+
if (!(0, regex_1.isValidCollectionTicker)(collection)) {
|
|
79
|
+
throw new Error('Invalid collection ticker: ' + collection);
|
|
80
|
+
}
|
|
81
|
+
const response = yield this.api.fetchWithTimeout(`/getAccountInventory/${address}/${collection}`);
|
|
82
|
+
return response;
|
|
83
|
+
});
|
|
84
|
+
/**
|
|
85
|
+
* Retrieves trading history based on the provided arguments.
|
|
86
|
+
*
|
|
87
|
+
* @param {TradincActivityArgs} args - The arguments for filtering the trading activity.
|
|
88
|
+
* @returns {Promise<TradingActivityResponse>} A promise resolving to a TradingActivityResponse object containing the activity.
|
|
89
|
+
* @throws {Error} Throws an error if the 'top' argument is greater than 35.
|
|
90
|
+
*/
|
|
91
|
+
this.getTradingActivity = (args) => __awaiter(this, void 0, void 0, function* () {
|
|
92
|
+
return yield (0, getActivity_1.getActivity)(args, this.api);
|
|
93
|
+
});
|
|
94
|
+
/** Gets user's staking info
|
|
95
|
+
* @param {String} address - User's address
|
|
96
|
+
* @returns {UserStakingInfo} User's staking info
|
|
97
|
+
* @throws {Error} Throws an error if the address is invalid
|
|
98
|
+
* @example const userStakingInfo = await new UserModule().getUserStakingInfo('erd11...');
|
|
99
|
+
* */
|
|
100
|
+
this.getUserStakingInfo = (address) => __awaiter(this, void 0, void 0, function* () {
|
|
101
|
+
if (!(0, helpers_1.isAddressValid)(address))
|
|
102
|
+
throw new Error('Invalid address');
|
|
103
|
+
const response = yield this.api.fetchWithTimeout(`/getUserStakingInfo/${address}`);
|
|
104
|
+
return response;
|
|
105
|
+
});
|
|
106
|
+
this.api = api_1.default.init();
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
exports.default = UserModule;
|
|
110
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/users/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAWA,uDAAuC;AACvC,sDAAmD;AACnD,8CAAkD;AAClD,0CAAyD;AAEzD,MAAqB,UAAU;IAE7B;QAGA;;;;;WAKG;QACI,mBAAc,GAAG,CAAO,OAAe,EAAyB,EAAE;YACvE,IAAI,CAAC,IAAA,wBAAc,EAAC,OAAO,CAAC;gBAAE,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;YACjE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAC9C,mBAAmB,OAAO,EAAE,CAC7B,CAAC;YACF,OAAO,QAAQ,CAAC;QAClB,CAAC,CAAA,CAAC;QAEF;;;;;WAKG;QAEI,qBAAgB,GAAG,CAAO,OAAe,EAA0B,EAAE;YAC1E,IAAI,CAAC,IAAA,wBAAc,EAAC,OAAO,CAAC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D,CAAC;YAEF,OAAO,QAAQ,CAAC;QAClB,CAAC,CAAA,CAAC;QAEF;;;;;;WAMG;QACI,uBAAkB,GAAG,CAC1B,IAAyB,EACS,EAAE;YACpC,OAAO,MAAM,IAAA,yBAAW,EAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QAC3C,CAAC,CAAA,CAAC;QAEF;;;;;cAKM;QACC,uBAAkB,GAAG,CAC1B,OAAe,EACa,EAAE;YAC9B,IAAI,CAAC,IAAA,wBAAc,EAAC,OAAO,CAAC;gBAAE,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;YAEjE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAC9C,uBAAuB,OAAO,EAAE,CACjC,CAAC;YACF,OAAO,QAAQ,CAAC;QAClB,CAAC,CAAA,CAAC;QA/GA,IAAI,CAAC,GAAG,GAAG,aAAW,CAAC,IAAI,EAAE,CAAC;IAChC,CAAC;CA+GF;AAnHD,6BAmHC"}
|
|
@@ -49,7 +49,7 @@ class SmartContractAbis {
|
|
|
49
49
|
static getStaking() {
|
|
50
50
|
return __awaiter(this, void 0, void 0, function* () {
|
|
51
51
|
if (!SmartContractAbis.staking) {
|
|
52
|
-
const { data } = yield (0, axios_1.default)(
|
|
52
|
+
const { data } = yield (0, axios_1.default)('https://media.xoxno.com/smartcontractabi/staking-nfts.abi.json');
|
|
53
53
|
const abiRegistry = sdk_core_1.AbiRegistry.create(data);
|
|
54
54
|
SmartContractAbis.staking = abiRegistry;
|
|
55
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SmartContractAbis.js","sourceRoot":"","sources":["../../src/utils/SmartContractAbis.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAmD;AACnD,kDAA0B;AAE1B,MAAa,iBAAiB;IAQrB,MAAM,CAAO,SAAS;;YAC3B,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE;gBAC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