hollaex-node-lib 2.19.4 → 2.19.5
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 +2 -1
- package/kit.js +54 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -123,9 +123,10 @@ client
|
|
|
123
123
|
| `createWithdrawalByAdmin` | <ul><li>**user_id**: User id for the withdrawal process</li><li>**address**: Specific address for the withdrawal</li><li>**amount**: Size of the withdrawal</li><li>**currency**: Currency symbol of the withdrawal</li><li>**opts.network**: Blockchain network</li></ul> | Create withdrawal on behalf of users |
|
|
124
124
|
| `getExchangeStakesByAdmin` | <ul><li>**opts.limit**: Number of elements to return. Default: 50. Maximum: 100</li><li>**opts.page**: Page of data to retrieve</li><li>**opts.order_by**: Field to order data</li><li>**opts.order**: Direction to order (asc/desc)</li><li>**opts.start_date**: Starting date of queried data in ISO8601 format</li><li>**opts.end_date**: Ending date of queried data in ISO8601 format</li><li>**opts.format**: Specify data format (csv/all)</li></ul> | Get exchange stakes for admin |
|
|
125
125
|
| `createExchangeStakesByAdmin` | <ul><li>**name**: Name of the stake pool </li><li>**user_id**: User ID associated with the stake pool</li><li>**currency**: Currency of the stake pool</li><li>**account_id**: Account ID</li><li>**apy**: Annual Percentage Yield</li><li>**min_amount**: Minimum stake amount</li><li>**max_amount**: Maximum stake amount</li><li>**early_unstake**: Whether early unstake is allowed</li><li>**status**: Pool status (uninitialized/active/paused/terminated)</li><li>**opts.reward_currency**: Currency for rewards</li><li>**opts.duration**: Duration in days</li><li>**opts.slashing**: Whether slashing is enabled</li><li>**opts.slashing_earning_percentage**: Slashing percentage for earnings</li><li>**opts.slashing_principle_percentage**: Slashing percentage for principle</li><li>**opts.onboarding**: Whether pool is for onboarding</li><li>**opts.disclaimer**: Disclaimer text</li></ul> | Create exchange stakes for admin |
|
|
126
|
-
| `updateExchangeStakesByAdmin` | <ul><li>**id**: ID of the stake pool to update</li><li>**opts.name**: Name of the stake pool </li><li>**opts.user_id**: User ID associated with the stake pool</li><li>**opts.currency**: Currency of the stake pool</li><li>**opts.reward_currency**: Currency for rewards</li><li>**opts.account_id**: Account ID</li><li>**opts.apy**: Annual Percentage Yield</li><li>**opts.duration**: Duration in days</li><li>**opts.slashing**: Whether slashing is enabled</li><li>**opts.slashing_earning_percentage**: Slashing percentage for earnings</li><li>**opts.slashing_principle_percentage**: Slashing percentage for principle</li><li>**opts.early_unstake**: Whether early unstake is allowed</li><li>**opts.min_amount**: Minimum stake amount</li><li>**opts.max_amount**: Maximum stake amount</li><li>**opts.status**: Pool status (uninitialized/active/paused/terminated)</li><li>**opts.onboarding**: Whether pool is for onboarding</li><li>**opts.disclaimer**: Disclaimer text</li></ul> | Update exchange stakes for admin |
|
|
126
|
+
| `updateExchangeStakesByAdmin` | <ul><li>**id**: ID of the stake pool to update</li><li>**opts.name**: Name of the stake pool </li><li>**opts.category**: Category of the stake pool</li><li>**opts.user_id**: User ID associated with the stake pool</li><li>**opts.currency**: Currency of the stake pool</li><li>**opts.reward_currency**: Currency for rewards</li><li>**opts.account_id**: Account ID</li><li>**opts.apy**: Annual Percentage Yield</li><li>**opts.duration**: Duration in days</li><li>**opts.slashing**: Whether slashing is enabled</li><li>**opts.slashing_earning_percentage**: Slashing percentage for earnings</li><li>**opts.slashing_principle_percentage**: Slashing percentage for principle</li><li>**opts.early_unstake**: Whether early unstake is allowed</li><li>**opts.min_amount**: Minimum stake amount</li><li>**opts.max_amount**: Maximum stake amount</li><li>**opts.status**: Pool status (uninitialized/active/paused/terminated)</li><li>**opts.onboarding**: Whether pool is for onboarding</li><li>**opts.disclaimer**: Disclaimer text</li></ul> | Update exchange stakes for admin |
|
|
127
127
|
| `deleteExchangeStakesByAdmin` | <ul><li>**id**: ID of the stake pool to delete</li></ul> | Delete exchange stakes for admin |
|
|
128
128
|
| `getExchangeStakersByAdmin` | <ul><li>**opts.id**: Unique identifier for the staker entry</li><li>**opts.user_id**: The ID of the user who has locked funds and staked</li><li>**opts.stake_id**: The ID of the stake pool</li><li>**opts.currency**: The currency in which the user staked</li><li>**opts.reward**: The amount the user has received as rewards</li><li>**opts.slashed**: The amount slashed</li><li>**opts.limit**: Number of elements to return. Default: 50. Maximum: 100</li><li>**opts.page**: Page of data to retrieve</li><li>**opts.order_by**: Field to order data</li><li>**opts.order**: Direction to order (asc/desc)</li><li>**opts.start_date**: Starting date of queried data in ISO8601 format</li><li>**opts.end_date**: Ending date of queried data in ISO8601 format</li><li>**opts.format**: Specify data format (csv/all)</li></ul> | Get exchange stakers of users for admin |
|
|
129
|
+
| `updateExchangeStakerByAdmin` | <ul><li>**id**: ID of the staker entry to update</li><li>**opts.nav**: Net asset value</li><li>**opts.reward**: Reward amount</li><li>**opts.status**: Staker status (staking/unstaking/closed)</li></ul> | Update exchange staker values for admin |
|
|
129
130
|
| `getStakeAnalyticsByAdmin` | <ul><li>No parameters needed</li></ul> | Get staking and unstaking amounts |
|
|
130
131
|
| `disableUserWithdrawalByAdmin` | <ul><li>**user_id**: The ID of the user to disable withdrawals for</li><li>**opts.expiry_date**: ISO date‑time string when the block expires</li></ul> | Block a user’s withdrawal ability |
|
|
131
132
|
|
package/kit.js
CHANGED
|
@@ -2868,6 +2868,7 @@ class HollaExKit {
|
|
|
2868
2868
|
* @param {number} id - ID of the stake pool to update
|
|
2869
2869
|
* @param {object} opts - Optional parameters
|
|
2870
2870
|
* @param {string} opts.name - Name of the stake pool
|
|
2871
|
+
* @param {string} opts.category - Category of the stake pool
|
|
2871
2872
|
* @param {number} opts.user_id - User ID associated with the stake pool
|
|
2872
2873
|
* @param {string} opts.currency - Currency of the stake pool
|
|
2873
2874
|
* @param {string} opts.reward_currency - Currency for rewards
|
|
@@ -2889,6 +2890,7 @@ class HollaExKit {
|
|
|
2889
2890
|
id,
|
|
2890
2891
|
opts = {
|
|
2891
2892
|
name: null,
|
|
2893
|
+
category: null,
|
|
2892
2894
|
user_id: null,
|
|
2893
2895
|
currency: null,
|
|
2894
2896
|
reward_currency: null,
|
|
@@ -2915,6 +2917,10 @@ class HollaExKit {
|
|
|
2915
2917
|
data.name = opts.name;
|
|
2916
2918
|
}
|
|
2917
2919
|
|
|
2920
|
+
if (isString(opts.category)) {
|
|
2921
|
+
data.category = opts.category;
|
|
2922
|
+
}
|
|
2923
|
+
|
|
2918
2924
|
if (isNumber(opts.user_id)) {
|
|
2919
2925
|
data.user_id = opts.user_id;
|
|
2920
2926
|
}
|
|
@@ -3110,6 +3116,51 @@ class HollaExKit {
|
|
|
3110
3116
|
return createRequest(verb, `${this.apiUrl}${path}`, headers);
|
|
3111
3117
|
}
|
|
3112
3118
|
|
|
3119
|
+
/**
|
|
3120
|
+
* Update exchange staker values for admin
|
|
3121
|
+
* @param {number} id - ID of the staker entry to update
|
|
3122
|
+
* @param {object} opts - Optional parameters
|
|
3123
|
+
* @param {number} opts.nav - Net asset value
|
|
3124
|
+
* @param {number} opts.reward - Reward amount
|
|
3125
|
+
* @param {string} opts.status - Staker status (staking/unstaking/closed)
|
|
3126
|
+
* @return {object} A JSON object with the updated staker
|
|
3127
|
+
*/
|
|
3128
|
+
updateExchangeStakerByAdmin(
|
|
3129
|
+
id,
|
|
3130
|
+
opts = {
|
|
3131
|
+
nav: null,
|
|
3132
|
+
reward: null,
|
|
3133
|
+
status: null
|
|
3134
|
+
}
|
|
3135
|
+
) {
|
|
3136
|
+
const verb = 'PUT';
|
|
3137
|
+
const path = `${this.baseUrl}/admin/staker`;
|
|
3138
|
+
const data = { id };
|
|
3139
|
+
|
|
3140
|
+
// Optional parameters
|
|
3141
|
+
if (isNumber(opts.nav)) {
|
|
3142
|
+
data.nav = opts.nav;
|
|
3143
|
+
}
|
|
3144
|
+
|
|
3145
|
+
if (isNumber(opts.reward)) {
|
|
3146
|
+
data.reward = opts.reward;
|
|
3147
|
+
}
|
|
3148
|
+
|
|
3149
|
+
if (isString(opts.status)) {
|
|
3150
|
+
data.status = opts.status;
|
|
3151
|
+
}
|
|
3152
|
+
|
|
3153
|
+
const headers = generateHeaders(
|
|
3154
|
+
this.headers,
|
|
3155
|
+
this.apiSecret,
|
|
3156
|
+
verb,
|
|
3157
|
+
path,
|
|
3158
|
+
this.apiExpiresAfter,
|
|
3159
|
+
data
|
|
3160
|
+
);
|
|
3161
|
+
return createRequest(verb, `${this.apiUrl}${path}`, headers, { data });
|
|
3162
|
+
}
|
|
3163
|
+
|
|
3113
3164
|
/**
|
|
3114
3165
|
* Get staking and unstaking amounts
|
|
3115
3166
|
* @return {object} A JSON object with stake analytics data
|
|
@@ -3297,6 +3348,7 @@ class HollaExKit {
|
|
|
3297
3348
|
}
|
|
3298
3349
|
}
|
|
3299
3350
|
break;
|
|
3351
|
+
case 'price':
|
|
3300
3352
|
case 'order':
|
|
3301
3353
|
case 'usertrade':
|
|
3302
3354
|
case 'wallet':
|
|
@@ -3352,6 +3404,7 @@ class HollaExKit {
|
|
|
3352
3404
|
}
|
|
3353
3405
|
this.wsEvents = this.wsEvents.filter((e) => e !== event);
|
|
3354
3406
|
break;
|
|
3407
|
+
case 'price':
|
|
3355
3408
|
case 'order':
|
|
3356
3409
|
case 'wallet':
|
|
3357
3410
|
case 'deposit':
|
|
@@ -3376,4 +3429,4 @@ class HollaExKit {
|
|
|
3376
3429
|
}
|
|
3377
3430
|
}
|
|
3378
3431
|
|
|
3379
|
-
module.exports = HollaExKit;
|
|
3432
|
+
module.exports = HollaExKit;
|