@xoxno/sdk-js 0.1.179-alpha → 0.1.183
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/package.json +1 -1
- package/dist/collection/index.d.ts +0 -297
- package/dist/collection/index.d.ts.map +0 -1
- package/dist/collection/index.js +0 -692
- package/dist/collection/index.js.map +0 -1
- package/dist/common/index.d.ts +0 -71
- package/dist/common/index.d.ts.map +0 -1
- package/dist/common/index.js +0 -145
- package/dist/common/index.js.map +0 -1
- package/dist/email/Markdown.d.ts +0 -4
- package/dist/email/Markdown.d.ts.map +0 -1
- package/dist/email/email.d.ts +0 -31
- package/dist/email/email.d.ts.map +0 -1
- package/dist/email/email.js +0 -248
- package/dist/email/email.js.map +0 -1
- package/dist/email/event-email.d.ts +0 -20
- package/dist/email/event-email.d.ts.map +0 -1
- package/dist/email/post-email.d.ts +0 -19
- package/dist/email/post-email.d.ts.map +0 -1
- package/dist/email/types.d.ts +0 -68
- package/dist/email/types.d.ts.map +0 -1
- package/dist/email/types.js +0 -30
- package/dist/email/types.js.map +0 -1
- package/dist/email/utils.d.ts +0 -84
- package/dist/email/utils.d.ts.map +0 -1
- package/dist/email-node.cjs.js +0 -1854
- package/dist/email-node.cjs.js.LICENSE.txt +0 -102
- package/dist/email-node.esm.js +0 -1854
- package/dist/email-node.esm.js.LICENSE.txt +0 -102
- package/dist/email.cjs.js +0 -1854
- package/dist/email.cjs.js.LICENSE.txt +0 -102
- package/dist/email.d.ts +0 -15
- package/dist/email.d.ts.map +0 -1
- package/dist/email.esm.js +0 -1854
- package/dist/email.esm.js.LICENSE.txt +0 -102
- package/dist/email.js +0 -3
- package/dist/email.js.map +0 -1
- package/dist/index.cjs.js +0 -1
- package/dist/index.d.ts +0 -8
- package/dist/index.d.ts.map +0 -1
- package/dist/index.esm.js +0 -1
- package/dist/index.js +0 -8
- package/dist/index.js.map +0 -1
- package/dist/interactions/index.d.ts +0 -256
- package/dist/interactions/index.d.ts.map +0 -1
- package/dist/interactions/index.js +0 -700
- package/dist/interactions/index.js.map +0 -1
- package/dist/interactor.cjs.js +0 -2
- package/dist/interactor.cjs.js.LICENSE.txt +0 -10
- package/dist/interactor.d.ts +0 -6
- package/dist/interactor.d.ts.map +0 -1
- package/dist/interactor.esm.js +0 -2
- package/dist/interactor.esm.js.LICENSE.txt +0 -10
- package/dist/interactor.js +0 -6
- package/dist/interactor.js.map +0 -1
- package/dist/launchpad/index.d.ts +0 -79
- package/dist/launchpad/index.d.ts.map +0 -1
- package/dist/launchpad/index.js +0 -140
- package/dist/launchpad/index.js.map +0 -1
- package/dist/nft/index.d.ts +0 -69
- package/dist/nft/index.d.ts.map +0 -1
- package/dist/nft/index.js +0 -109
- package/dist/nft/index.js.map +0 -1
- package/dist/staking/index.d.ts +0 -12
- package/dist/staking/index.d.ts.map +0 -1
- package/dist/staking/index.js +0 -17
- package/dist/staking/index.js.map +0 -1
- package/dist/types/collection.d.ts +0 -851
- package/dist/types/collection.d.ts.map +0 -1
- package/dist/types/collection.js +0 -192
- package/dist/types/collection.js.map +0 -1
- package/dist/types/common.d.ts +0 -72
- package/dist/types/common.d.ts.map +0 -1
- package/dist/types/common.js +0 -2
- package/dist/types/common.js.map +0 -1
- package/dist/types/index.d.ts +0 -8
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -8
- package/dist/types/index.js.map +0 -1
- package/dist/types/interactions.d.ts +0 -97
- package/dist/types/interactions.d.ts.map +0 -1
- package/dist/types/interactions.js +0 -8
- package/dist/types/interactions.js.map +0 -1
- package/dist/types/nft.d.ts +0 -105
- package/dist/types/nft.d.ts.map +0 -1
- package/dist/types/nft.js +0 -2
- package/dist/types/nft.js.map +0 -1
- package/dist/types/staking.d.ts +0 -67
- package/dist/types/staking.d.ts.map +0 -1
- package/dist/types/staking.js +0 -18
- package/dist/types/staking.js.map +0 -1
- package/dist/types/trading.d.ts +0 -115
- package/dist/types/trading.d.ts.map +0 -1
- package/dist/types/trading.js +0 -49
- package/dist/types/trading.js.map +0 -1
- package/dist/types/user.d.ts +0 -302
- package/dist/types/user.d.ts.map +0 -1
- package/dist/types/user.js +0 -10
- package/dist/types/user.js.map +0 -1
- package/dist/users/index.d.ts +0 -202
- package/dist/users/index.d.ts.map +0 -1
- package/dist/users/index.js +0 -380
- package/dist/users/index.js.map +0 -1
- package/dist/utils/SmartContractAbis.d.ts +0 -16
- package/dist/utils/SmartContractAbis.d.ts.map +0 -1
- package/dist/utils/SmartContractAbis.js +0 -84
- package/dist/utils/SmartContractAbis.js.map +0 -1
- package/dist/utils/SmartContractService.d.ts +0 -4
- package/dist/utils/SmartContractService.d.ts.map +0 -1
- package/dist/utils/SmartContractService.js +0 -9
- package/dist/utils/SmartContractService.js.map +0 -1
- package/dist/utils/api.d.ts +0 -31
- package/dist/utils/api.d.ts.map +0 -1
- package/dist/utils/api.js +0 -93
- package/dist/utils/api.js.map +0 -1
- package/dist/utils/const.d.ts +0 -14
- package/dist/utils/const.d.ts.map +0 -1
- package/dist/utils/const.js +0 -14
- package/dist/utils/const.js.map +0 -1
- package/dist/utils/getActivity.d.ts +0 -11
- package/dist/utils/getActivity.d.ts.map +0 -1
- package/dist/utils/getActivity.js +0 -65
- package/dist/utils/getActivity.js.map +0 -1
- package/dist/utils/helpers.d.ts +0 -4
- package/dist/utils/helpers.d.ts.map +0 -1
- package/dist/utils/helpers.js +0 -19
- package/dist/utils/helpers.js.map +0 -1
- package/dist/utils/regex.d.ts +0 -3
- package/dist/utils/regex.d.ts.map +0 -1
- package/dist/utils/regex.js +0 -7
- package/dist/utils/regex.js.map +0 -1
- package/dist/utils/scCalls.d.ts +0 -10
- package/dist/utils/scCalls.d.ts.map +0 -1
- package/dist/utils/scCalls.js +0 -25
- package/dist/utils/scCalls.js.map +0 -1
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* The buffer module from node.js, for the browser.
|
|
3
|
-
*
|
|
4
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
5
|
-
* @license MIT
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
9
|
-
|
|
10
|
-
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
package/dist/interactor.js
DELETED
package/dist/interactor.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interactor.js","sourceRoot":"","sources":["../src/interactor.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC"}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import type { SmartContract } from '@multiversx/sdk-core/out/smartcontracts/smartContract';
|
|
2
|
-
/**
|
|
3
|
-
* LaunchpadModule provides methods to interact with the minter smart contract.
|
|
4
|
-
* @class
|
|
5
|
-
*/
|
|
6
|
-
export declare class LaunchpadModule {
|
|
7
|
-
private minter;
|
|
8
|
-
private call;
|
|
9
|
-
/**
|
|
10
|
-
* @constructor
|
|
11
|
-
* @param {SmartContract} minterAbiXOXNO - The minter smart contract instance.
|
|
12
|
-
*/
|
|
13
|
-
constructor(minterAbiXOXNO: SmartContract);
|
|
14
|
-
/**
|
|
15
|
-
* Executes the provided interaction and returns the result.
|
|
16
|
-
* @private
|
|
17
|
-
* @param {Interaction} interaction - The smart contract interaction.
|
|
18
|
-
* @returns {Promise<any>} The result of the interaction.
|
|
19
|
-
*/
|
|
20
|
-
private getResult;
|
|
21
|
-
/**
|
|
22
|
-
* Initializes the LaunchpadModule with a minter smart contract instance.
|
|
23
|
-
* @static
|
|
24
|
-
* @param {string} minterSC - The minter smart contract address.
|
|
25
|
-
* @returns {Promise<LaunchpadModule>} A new instance of LaunchpadModule.
|
|
26
|
-
*/
|
|
27
|
-
static init(minterSC: string): Promise<LaunchpadModule>;
|
|
28
|
-
/**
|
|
29
|
-
* Fetches all unique tags from the minter smart contract.
|
|
30
|
-
* @public
|
|
31
|
-
* @returns {Promise<string[]>} An array of unique tags.
|
|
32
|
-
*/
|
|
33
|
-
getAllUniqueTags: () => Promise<string[]>;
|
|
34
|
-
/**
|
|
35
|
-
* Fetches the global buy count for a user and tag.
|
|
36
|
-
* @public
|
|
37
|
-
* @param {string} user - The user's address.
|
|
38
|
-
* @param {string} tag - The tag.
|
|
39
|
-
* @returns {Promise<number>} The global buy count.
|
|
40
|
-
*/
|
|
41
|
-
getWalletGlobalBuyCount: (user: string, tag: string) => Promise<number>;
|
|
42
|
-
/**
|
|
43
|
-
* Fetches the stage buy count for a user, tag, and stage.
|
|
44
|
-
* @public
|
|
45
|
-
* @param {string} user - The user's address.
|
|
46
|
-
* @param {string} tag - The tag.
|
|
47
|
-
* @param {string} stage - The stage.
|
|
48
|
-
* @returns {Promise<number>} The stage buy count.
|
|
49
|
-
*/
|
|
50
|
-
getWalletStageBuyCount: (user: string, tag: string, stage: string) => Promise<number>;
|
|
51
|
-
/**
|
|
52
|
-
* Fetches the local owner's address from the minter smart contract.
|
|
53
|
-
* @public
|
|
54
|
-
* @returns {Promise<string>} The local owner's address.
|
|
55
|
-
*/
|
|
56
|
-
getLocalOwner: () => Promise<string>;
|
|
57
|
-
/**
|
|
58
|
-
* Fetches the launchpad cut fee percentage from the minter smart contract.
|
|
59
|
-
* @public
|
|
60
|
-
* @returns {Promise<number>} The launchpad cut fee percentage.
|
|
61
|
-
*/
|
|
62
|
-
getLaunchpadCutFee: () => Promise<number>;
|
|
63
|
-
/**
|
|
64
|
-
* Fetches the stage whitelist of wallets for a tag and stage.
|
|
65
|
-
* @public
|
|
66
|
-
* @param {string} tag - The tag.
|
|
67
|
-
* @param {string} stage - The stage.
|
|
68
|
-
* @returns {Promise<string[]>} An array of whitelisted wallet addresses.
|
|
69
|
-
*/
|
|
70
|
-
getStageWhitelist: (tag: string, stage: string) => Promise<string[]>;
|
|
71
|
-
/**
|
|
72
|
-
* Fetches the list of stages for a tag.
|
|
73
|
-
* @public
|
|
74
|
-
* @param {string} tag - The tag.
|
|
75
|
-
* @returns {Promise<string[]>} An array of stages.
|
|
76
|
-
*/
|
|
77
|
-
getStages: (tag: string) => Promise<string[]>;
|
|
78
|
-
}
|
|
79
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/launchpad/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uDAAuD,CAAC;AAE3F;;;GAGG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,IAAI,CAAsB;IAClC;;;OAGG;gBACS,cAAc,EAAE,aAAa;IAKzC;;;;;OAKG;YACW,SAAS;IAIvB;;;;;OAKG;WACU,IAAI,CAAC,QAAQ,EAAE,MAAM;IAMlC;;;;OAIG;IACI,gBAAgB,QAAa,OAAO,CAAC,MAAM,EAAE,CAAC,CAInD;IAEF;;;;;;OAMG;IACI,uBAAuB,SACtB,MAAM,OACP,MAAM,KACV,OAAO,CAAC,MAAM,CAAC,CAIhB;IAEF;;;;;;;OAOG;IACI,sBAAsB,SACrB,MAAM,OACP,MAAM,SACJ,MAAM,KACZ,OAAO,CAAC,MAAM,CAAC,CAQhB;IAEF;;;;OAIG;IACI,aAAa,QAAa,OAAO,CAAC,MAAM,CAAC,CAI9C;IAEF;;;;OAIG;IAEI,kBAAkB,QAAa,OAAO,CAAC,MAAM,CAAC,CAInD;IAEF;;;;;;OAMG;IACI,iBAAiB,QACjB,MAAM,SACJ,MAAM,KACZ,OAAO,CAAC,MAAM,EAAE,CAAC,CAIlB;IAEF;;;;;OAKG;IACI,SAAS,QAAe,MAAM,KAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAuBvD;CACH"}
|
package/dist/launchpad/index.js
DELETED
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import { SmartContractAbis } from '../utils/SmartContractAbis';
|
|
2
|
-
import { getSmartContract } from '../utils/SmartContractService';
|
|
3
|
-
import { ContractQueryRunner } from '../utils/scCalls';
|
|
4
|
-
/**
|
|
5
|
-
* LaunchpadModule provides methods to interact with the minter smart contract.
|
|
6
|
-
* @class
|
|
7
|
-
*/
|
|
8
|
-
export class LaunchpadModule {
|
|
9
|
-
minter;
|
|
10
|
-
call;
|
|
11
|
-
/**
|
|
12
|
-
* @constructor
|
|
13
|
-
* @param {SmartContract} minterAbiXOXNO - The minter smart contract instance.
|
|
14
|
-
*/
|
|
15
|
-
constructor(minterAbiXOXNO) {
|
|
16
|
-
this.minter = minterAbiXOXNO;
|
|
17
|
-
this.call = new ContractQueryRunner();
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Executes the provided interaction and returns the result.
|
|
21
|
-
* @private
|
|
22
|
-
* @param {Interaction} interaction - The smart contract interaction.
|
|
23
|
-
* @returns {Promise<any>} The result of the interaction.
|
|
24
|
-
*/
|
|
25
|
-
async getResult(interaction) {
|
|
26
|
-
return await this.call.runQuery(this.minter, interaction);
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Initializes the LaunchpadModule with a minter smart contract instance.
|
|
30
|
-
* @static
|
|
31
|
-
* @param {string} minterSC - The minter smart contract address.
|
|
32
|
-
* @returns {Promise<LaunchpadModule>} A new instance of LaunchpadModule.
|
|
33
|
-
*/
|
|
34
|
-
static async init(minterSC) {
|
|
35
|
-
const minterAbiXOXNO = await SmartContractAbis.getMinter();
|
|
36
|
-
const minter_abi = getSmartContract(minterAbiXOXNO, minterSC);
|
|
37
|
-
return new LaunchpadModule(minter_abi);
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Fetches all unique tags from the minter smart contract.
|
|
41
|
-
* @public
|
|
42
|
-
* @returns {Promise<string[]>} An array of unique tags.
|
|
43
|
-
*/
|
|
44
|
-
getAllUniqueTags = async () => {
|
|
45
|
-
const interaction = this.minter.methods.collections();
|
|
46
|
-
const result = await this.getResult(interaction);
|
|
47
|
-
return result.firstValue?.valueOf().map((x) => x.toString());
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* Fetches the global buy count for a user and tag.
|
|
51
|
-
* @public
|
|
52
|
-
* @param {string} user - The user's address.
|
|
53
|
-
* @param {string} tag - The tag.
|
|
54
|
-
* @returns {Promise<number>} The global buy count.
|
|
55
|
-
*/
|
|
56
|
-
getWalletGlobalBuyCount = async (user, tag) => {
|
|
57
|
-
const interaction = this.minter.methods.buysPerWallet([user, tag]);
|
|
58
|
-
const result = await this.getResult(interaction);
|
|
59
|
-
return result.firstValue?.valueOf();
|
|
60
|
-
};
|
|
61
|
-
/**
|
|
62
|
-
* Fetches the stage buy count for a user, tag, and stage.
|
|
63
|
-
* @public
|
|
64
|
-
* @param {string} user - The user's address.
|
|
65
|
-
* @param {string} tag - The tag.
|
|
66
|
-
* @param {string} stage - The stage.
|
|
67
|
-
* @returns {Promise<number>} The stage buy count.
|
|
68
|
-
*/
|
|
69
|
-
getWalletStageBuyCount = async (user, tag, stage) => {
|
|
70
|
-
const interaction = this.minter.methods.buysStagePerWallet([
|
|
71
|
-
user,
|
|
72
|
-
tag,
|
|
73
|
-
stage,
|
|
74
|
-
]);
|
|
75
|
-
const result = await this.getResult(interaction);
|
|
76
|
-
return result.firstValue?.valueOf();
|
|
77
|
-
};
|
|
78
|
-
/**
|
|
79
|
-
* Fetches the local owner's address from the minter smart contract.
|
|
80
|
-
* @public
|
|
81
|
-
* @returns {Promise<string>} The local owner's address.
|
|
82
|
-
*/
|
|
83
|
-
getLocalOwner = async () => {
|
|
84
|
-
const interaction = this.minter.methods.localOwner();
|
|
85
|
-
const result = await this.getResult(interaction);
|
|
86
|
-
return result.firstValue?.valueOf();
|
|
87
|
-
};
|
|
88
|
-
/**
|
|
89
|
-
* Fetches the launchpad cut fee percentage from the minter smart contract.
|
|
90
|
-
* @public
|
|
91
|
-
* @returns {Promise<number>} The launchpad cut fee percentage.
|
|
92
|
-
*/
|
|
93
|
-
getLaunchpadCutFee = async () => {
|
|
94
|
-
const interaction = this.minter.methods.cutPercentage();
|
|
95
|
-
const result = await this.getResult(interaction);
|
|
96
|
-
return result.firstValue?.valueOf();
|
|
97
|
-
};
|
|
98
|
-
/**
|
|
99
|
-
* Fetches the stage whitelist of wallets for a tag and stage.
|
|
100
|
-
* @public
|
|
101
|
-
* @param {string} tag - The tag.
|
|
102
|
-
* @param {string} stage - The stage.
|
|
103
|
-
* @returns {Promise<string[]>} An array of whitelisted wallet addresses.
|
|
104
|
-
*/
|
|
105
|
-
getStageWhitelist = async (tag, stage) => {
|
|
106
|
-
const interaction = this.minter.methods.getWhitelistedWallets([tag, stage]);
|
|
107
|
-
const result = await this.getResult(interaction);
|
|
108
|
-
return result.firstValue?.valueOf().map((x) => x.toString());
|
|
109
|
-
};
|
|
110
|
-
/**
|
|
111
|
-
* Fetches the list of stages for a tag.
|
|
112
|
-
* @public
|
|
113
|
-
* @param {string} tag - The tag.
|
|
114
|
-
* @returns {Promise<string[]>} An array of stages.
|
|
115
|
-
*/
|
|
116
|
-
getStages = async (tag) => {
|
|
117
|
-
const interaction = this.minter.methods.mintStage([tag]);
|
|
118
|
-
const result = await this.getResult(interaction);
|
|
119
|
-
return result.firstValue?.valueOf().map((x) => {
|
|
120
|
-
const body = x[1].valueOf();
|
|
121
|
-
body.name = body.name.toString();
|
|
122
|
-
body.tag = body.name.toString();
|
|
123
|
-
body.start_time = parseInt(body.start_time.toString());
|
|
124
|
-
body.end_time = parseInt(body.end_time.toString());
|
|
125
|
-
body.mint_limit = parseInt(body.mint_limit.toString());
|
|
126
|
-
body.mint_count = parseInt(body.mint_count.toString());
|
|
127
|
-
body.max_per_wallet = parseInt(body.max_per_wallet.toString());
|
|
128
|
-
body.prices = body.prices.map((x) => {
|
|
129
|
-
const pr = x.valueOf();
|
|
130
|
-
return {
|
|
131
|
-
...pr,
|
|
132
|
-
token_nonce: parseInt(pr.token_nonce.toString()),
|
|
133
|
-
amount: pr.amount.toString(),
|
|
134
|
-
};
|
|
135
|
-
});
|
|
136
|
-
return body;
|
|
137
|
-
});
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/launchpad/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAGvD;;;GAGG;AACH,MAAM,OAAO,eAAe;IAClB,MAAM,CAAgB;IACtB,IAAI,CAAsB;IAClC;;;OAGG;IACH,YAAY,cAA6B;QACvC,IAAI,CAAC,MAAM,GAAG,cAAc,CAAC;QAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,mBAAmB,EAAE,CAAC;IACxC,CAAC;IAED;;;;;OAKG;IACK,KAAK,CAAC,SAAS,CAAC,WAAwB;QAC9C,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAC5D,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,QAAgB;QAChC,MAAM,cAAc,GAAG,MAAM,iBAAiB,CAAC,SAAS,EAAE,CAAC;QAC3D,MAAM,UAAU,GAAG,gBAAgB,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;QAC9D,OAAO,IAAI,eAAe,CAAC,UAAU,CAAC,CAAC;IACzC,CAAC;IAED;;;;OAIG;IACI,gBAAgB,GAAG,KAAK,IAAuB,EAAE;QACtD,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;Q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U,GAAG,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC;YACvD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;YACnD,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC;YACvD,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC;YACvD,IAAI,CAAC,cAAc,GAAG,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC,CAAC;YAC/D,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE;gBACvC,MAAM,EAAE,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC;gBACvB,OAAO;oBACL,GAAG,EAAE;oBACL,WAAW,EAAE,QAAQ,CAAC,EAAE,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;oBAChD,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE;iBAC7B,CAAC;YACJ,CAAC,CAAC,CAAC;YAEH,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;CACH"}
|
package/dist/nft/index.d.ts
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { NftData } from '../types/nft';
|
|
2
|
-
import { TradingActivityResponse, TradincActivityArgs } from '../types/trading';
|
|
3
|
-
import { UserOffers } from '../types/user';
|
|
4
|
-
/**
|
|
5
|
-
* NFTModule provides a set of methods to interact with single NFTs.
|
|
6
|
-
* It includes methods for getting single NFT information, and searching NFTs by collection and nonce.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* const nftModule = new NFTModule();
|
|
10
|
-
*/
|
|
11
|
-
export declare class NFTModule {
|
|
12
|
-
private api;
|
|
13
|
-
constructor();
|
|
14
|
-
/**
|
|
15
|
-
* @public
|
|
16
|
-
* @async
|
|
17
|
-
* @function getNFTByIdentifier
|
|
18
|
-
* @param {string} identifier - The identifier of the NFT to fetch data for.
|
|
19
|
-
* @returns {Promise<NftData>} A promise that resolves to the fetched NFT data.
|
|
20
|
-
*
|
|
21
|
-
* This function fetches data for a given NFT by its identifier. It takes the following parameter:
|
|
22
|
-
* - identifier (string): The identifier of the NFT to fetch data for.
|
|
23
|
-
*
|
|
24
|
-
* The function first validates the input identifier and checks if it is a valid NFT identifier.
|
|
25
|
-
* If it is valid, the function fetches the NFT data using the API.
|
|
26
|
-
* Finally, it returns a promise that resolves to the fetched NFT data.
|
|
27
|
-
*/
|
|
28
|
-
getNFTByIdentifier: (identifier: string, extra?: RequestInit) => Promise<NftData>;
|
|
29
|
-
/**
|
|
30
|
-
* @public
|
|
31
|
-
* @async
|
|
32
|
-
* @function getNFTByIdentifier
|
|
33
|
-
* @param {string} identifier - The identifier of the NFT to fetch data for.
|
|
34
|
-
* @returns {Promise<NftData>} A promise that resolves to the fetched NFT data.
|
|
35
|
-
*
|
|
36
|
-
* This function fetches data for a given NFT by its identifier. It takes the following parameter:
|
|
37
|
-
* - identifier (string): The identifier of the NFT to fetch data for.
|
|
38
|
-
*
|
|
39
|
-
* The function first validates the input identifier and checks if it is a valid NFT identifier.
|
|
40
|
-
* If it is valid, the function fetches the NFT data using the API.
|
|
41
|
-
* Finally, it returns a promise that resolves to the fetched NFT data.
|
|
42
|
-
*/
|
|
43
|
-
getNFTsOffers: (identifier: string, skip?: number, top?: number) => Promise<UserOffers>;
|
|
44
|
-
/**
|
|
45
|
-
* Gets an NFT by collection and nonce.
|
|
46
|
-
* @param collection The collection ticker.
|
|
47
|
-
* @param nonce The nonce of the NFT.
|
|
48
|
-
* @returns {Promise<NftData>} The NFT data.
|
|
49
|
-
* @throws Throws an error when the collection ticker is invalid.
|
|
50
|
-
*/
|
|
51
|
-
getNFTByCollectionAndNonce: (collection: string, nonce: number) => Promise<NftData>;
|
|
52
|
-
/**
|
|
53
|
-
* Get NFT by collection and nonce hex
|
|
54
|
-
*
|
|
55
|
-
* @param collection - collection ticker
|
|
56
|
-
* @param nonceHex - nonce hex
|
|
57
|
-
* @return {Promise<NftData>} NFT data
|
|
58
|
-
*/
|
|
59
|
-
getNFTByCollectionAndNonceHex: (collection: string, nonceHex: string) => Promise<NftData>;
|
|
60
|
-
/**
|
|
61
|
-
* Retrieves trading history based on the provided arguments.
|
|
62
|
-
*
|
|
63
|
-
* @param {TradincActivityArgs} args - The arguments for filtering the trading activity.
|
|
64
|
-
* @returns {Promise<TradingActivityResponse>} A promise resolving to a TradingActivityResponse object containing the activity.
|
|
65
|
-
* @throws {Error} Throws an error if the 'top' argument is greater than 100.
|
|
66
|
-
*/
|
|
67
|
-
getTradingActivity: (args: TradincActivityArgs) => Promise<TradingActivityResponse>;
|
|
68
|
-
}
|
|
69
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/nft/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/nft/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK3C;;;;;;GAMG;AAEH,qBAAa,SAAS;IACpB,OAAO,CAAC,GAAG,CAAc;;IAKzB;;;;;;;;;;;;;OAaG;IACI,kBAAkB,eACX,MAAM,UACV,WAAW,KAClB,OAAO,CAAC,OAAO,CAAC,CAWjB;IAEF;;;;;;;;;;;;;OAaG;IACI,aAAa,eACN,MAAM,SACZ,MAAM,QACP,MAAM,KACV,OAAO,CAAC,UAAU,CAAC,CAcpB;IAEF;;;;;;OAMG;IACI,0BAA0B,eACnB,MAAM,SACX,MAAM,KACZ,OAAO,CAAC,OAAO,CAAC,CASjB;IAEF;;;;;;OAMG;IAEI,6BAA6B,eACtB,MAAM,YACR,MAAM,KACf,OAAO,CAAC,OAAO,CAAC,CAcjB;IAEF;;;;;;OAMG;IACI,kBAAkB,SACjB,mBAAmB,KACxB,OAAO,CAAC,uBAAuB,CAAC,CAEjC;CACH"}
|
package/dist/nft/index.js
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { XOXNOClient } from '..';
|
|
2
|
-
import { getActivity } from '../utils/getActivity';
|
|
3
|
-
import { getIdentifierFromColAndNonce } from '../utils/helpers';
|
|
4
|
-
import { isValidCollectionTicker, isValidNftIdentifier } from '../utils/regex';
|
|
5
|
-
/**
|
|
6
|
-
* NFTModule provides a set of methods to interact with single NFTs.
|
|
7
|
-
* It includes methods for getting single NFT information, and searching NFTs by collection and nonce.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* const nftModule = new NFTModule();
|
|
11
|
-
*/
|
|
12
|
-
export class NFTModule {
|
|
13
|
-
api;
|
|
14
|
-
constructor() {
|
|
15
|
-
this.api = XOXNOClient.getInstance();
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* @public
|
|
19
|
-
* @async
|
|
20
|
-
* @function getNFTByIdentifier
|
|
21
|
-
* @param {string} identifier - The identifier of the NFT to fetch data for.
|
|
22
|
-
* @returns {Promise<NftData>} A promise that resolves to the fetched NFT data.
|
|
23
|
-
*
|
|
24
|
-
* This function fetches data for a given NFT by its identifier. It takes the following parameter:
|
|
25
|
-
* - identifier (string): The identifier of the NFT to fetch data for.
|
|
26
|
-
*
|
|
27
|
-
* The function first validates the input identifier and checks if it is a valid NFT identifier.
|
|
28
|
-
* If it is valid, the function fetches the NFT data using the API.
|
|
29
|
-
* Finally, it returns a promise that resolves to the fetched NFT data.
|
|
30
|
-
*/
|
|
31
|
-
getNFTByIdentifier = async (identifier) => {
|
|
32
|
-
if (!isValidNftIdentifier(identifier)) {
|
|
33
|
-
throw new Error('Invalid identifier: ' + identifier);
|
|
34
|
-
}
|
|
35
|
-
const response = await this.api.fetchWithTimeout(`/nft/${identifier}`);
|
|
36
|
-
return response;
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* @public
|
|
40
|
-
* @async
|
|
41
|
-
* @function getNFTByIdentifier
|
|
42
|
-
* @param {string} identifier - The identifier of the NFT to fetch data for.
|
|
43
|
-
* @returns {Promise<NftData>} A promise that resolves to the fetched NFT data.
|
|
44
|
-
*
|
|
45
|
-
* This function fetches data for a given NFT by its identifier. It takes the following parameter:
|
|
46
|
-
* - identifier (string): The identifier of the NFT to fetch data for.
|
|
47
|
-
*
|
|
48
|
-
* The function first validates the input identifier and checks if it is a valid NFT identifier.
|
|
49
|
-
* If it is valid, the function fetches the NFT data using the API.
|
|
50
|
-
* Finally, it returns a promise that resolves to the fetched NFT data.
|
|
51
|
-
*/
|
|
52
|
-
getNFTsOffers = async (identifier, skip = 0, top = 25) => {
|
|
53
|
-
if (!isValidNftIdentifier(identifier)) {
|
|
54
|
-
throw new Error('Invalid identifier: ' + identifier);
|
|
55
|
-
}
|
|
56
|
-
const response = await this.api.fetchWithTimeout(`/nft/${identifier}/offers?skip=${skip}&top=${top}`, {
|
|
57
|
-
next: {
|
|
58
|
-
tags: ['getNFTsOffers'],
|
|
59
|
-
revalidate: 12,
|
|
60
|
-
},
|
|
61
|
-
});
|
|
62
|
-
return response;
|
|
63
|
-
};
|
|
64
|
-
/**
|
|
65
|
-
* Gets an NFT by collection and nonce.
|
|
66
|
-
* @param collection The collection ticker.
|
|
67
|
-
* @param nonce The nonce of the NFT.
|
|
68
|
-
* @returns {Promise<NftData>} The NFT data.
|
|
69
|
-
* @throws Throws an error when the collection ticker is invalid.
|
|
70
|
-
*/
|
|
71
|
-
getNFTByCollectionAndNonce = async (collection, nonce) => {
|
|
72
|
-
if (!isValidCollectionTicker(collection)) {
|
|
73
|
-
throw new Error('Invalid collection ticker: ' + collection);
|
|
74
|
-
}
|
|
75
|
-
const response = await this.api.fetchWithTimeout(`/${getIdentifierFromColAndNonce(collection, nonce)}`);
|
|
76
|
-
return response;
|
|
77
|
-
};
|
|
78
|
-
/**
|
|
79
|
-
* Get NFT by collection and nonce hex
|
|
80
|
-
*
|
|
81
|
-
* @param collection - collection ticker
|
|
82
|
-
* @param nonceHex - nonce hex
|
|
83
|
-
* @return {Promise<NftData>} NFT data
|
|
84
|
-
*/
|
|
85
|
-
getNFTByCollectionAndNonceHex = async (collection, nonceHex) => {
|
|
86
|
-
// check that collection is valid
|
|
87
|
-
if (!isValidCollectionTicker(collection)) {
|
|
88
|
-
throw new Error('Invalid collection ticker: ' + collection);
|
|
89
|
-
}
|
|
90
|
-
// make sure nonceHex is even
|
|
91
|
-
if (nonceHex.length % 2 !== 0) {
|
|
92
|
-
nonceHex = '0' + nonceHex;
|
|
93
|
-
}
|
|
94
|
-
// fetch the NFT data
|
|
95
|
-
const response = await this.api.fetchWithTimeout(`/${[collection, nonceHex].join('-')}`);
|
|
96
|
-
return response;
|
|
97
|
-
};
|
|
98
|
-
/**
|
|
99
|
-
* Retrieves trading history based on the provided arguments.
|
|
100
|
-
*
|
|
101
|
-
* @param {TradincActivityArgs} args - The arguments for filtering the trading activity.
|
|
102
|
-
* @returns {Promise<TradingActivityResponse>} A promise resolving to a TradingActivityResponse object containing the activity.
|
|
103
|
-
* @throws {Error} Throws an error if the 'top' argument is greater than 100.
|
|
104
|
-
*/
|
|
105
|
-
getTradingActivity = async (args) => {
|
|
106
|
-
return await getActivity(args, this.api);
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
//# sourceMappingURL=index.js.map
|
package/dist/nft/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/nft/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAIjC,OAAO,EAAE,WAAW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AI,CAAC,uBAAuB,CAAC,UAAU,CAAC,EAAE,CAAC;YACzC,MAAM,IAAI,KAAK,CAAC,6BAA6B,GAAG,UAAU,CAAC,CAAC;QAC9D,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAC9C,IAAI,4BAA4B,CAAC,UAAU,EAAE,KAAK,CAAC,EAAE,CACtD,CAAC;QACF,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAC;IAEF;;;;;;OAMG;IAEI,6BAA6B,GAAG,KAAK,EAC1C,UAAkB,EAClB,QAAgB,EACE,EAAE;QACpB,iCAAiC;QACjC,IAAI,CAAC,uBAAuB,CAAC,UAAU,CAAC,EAAE,CAAC;YACzC,MAAM,IAAI,KAAK,CAAC,6BAA6B,GAAG,UAAU,CAAC,CAAC;QAC9D,CAAC;QACD,6BAA6B;QAC7B,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;YAC9B,QAAQ,GAAG,GAAG,GAAG,QAAQ,CAAC;QAC5B,CAAC;QACD,qBAAqB;QACrB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAC9C,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CACvC,CAAC;QACF,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAC;IAEF;;;;;;OAMG;IACI,kBAAkB,GAAG,KAAK,EAC/B,IAAyB,EACS,EAAE;QACpC,OAAO,MAAM,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IAC3C,CAAC,CAAC;CACH"}
|
package/dist/staking/index.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { StakingSummaryPools } from '../types/staking';
|
|
2
|
-
export declare class StakingModule {
|
|
3
|
-
private api;
|
|
4
|
-
constructor();
|
|
5
|
-
/** Gets pool details
|
|
6
|
-
* @param {number} poolId - User's address
|
|
7
|
-
* @returns {CreatoPoolDetailsrInfo} User's creator info
|
|
8
|
-
* @throws {Error} Throws an error if the address is invalid
|
|
9
|
-
* */
|
|
10
|
-
getPoolDetails: (poolId: number) => Promise<StakingSummaryPools>;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/staking/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAGvD,qBAAa,aAAa;IACxB,OAAO,CAAC,GAAG,CAAc;;IAIzB;;;;UAIM;IACC,cAAc,WACX,MAAM,KACb,OAAO,CAAC,mBAAmB,CAAC,CAK7B;CACH"}
|
package/dist/staking/index.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { XOXNOClient } from '../utils/api';
|
|
2
|
-
export class StakingModule {
|
|
3
|
-
api;
|
|
4
|
-
constructor() {
|
|
5
|
-
this.api = XOXNOClient.getInstance();
|
|
6
|
-
}
|
|
7
|
-
/** Gets pool details
|
|
8
|
-
* @param {number} poolId - User's address
|
|
9
|
-
* @returns {CreatoPoolDetailsrInfo} User's creator info
|
|
10
|
-
* @throws {Error} Throws an error if the address is invalid
|
|
11
|
-
* */
|
|
12
|
-
getPoolDetails = async (poolId) => {
|
|
13
|
-
const response = await this.api.fetchWithTimeout(`/pool/${poolId}/profile`);
|
|
14
|
-
return response;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/staking/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,OAAO,aAAa;IAChB,GAAG,CAAc;IACzB;QACE,IAAI,CAAC,GAAG,GAAG,WAAW,CAAC,WAAW,EAAE,CAAC;IACvC,CAAC;IACD;;;;UAIM;IACC,cAAc,GAAG,KAAK,EAC3B,MAAc,EACgB,EAAE;QAChC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAC9C,SAAS,MAAM,UAAU,CAC1B,CAAC;QACF,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAC;CACH"}
|