@broxus/js-core
Version:
MobX-based JavaScript Core library
70 lines (69 loc) • 3.71 kB
JavaScript
import { Endpoint } from '../core';
export var VoteEscrowBalanceColumn;
(function (VoteEscrowBalanceColumn) {
VoteEscrowBalanceColumn["CreatedAt"] = "createdAt";
})(VoteEscrowBalanceColumn || (VoteEscrowBalanceColumn = {}));
export var VoteEscrowBalancesStatsColumn;
(function (VoteEscrowBalancesStatsColumn) {
VoteEscrowBalancesStatsColumn["Day"] = "day";
})(VoteEscrowBalancesStatsColumn || (VoteEscrowBalancesStatsColumn = {}));
export var VoteEscrowDepositColumn;
(function (VoteEscrowDepositColumn) {
VoteEscrowDepositColumn["Amount"] = "amount";
VoteEscrowDepositColumn["CreatedAt"] = "createdAt";
VoteEscrowDepositColumn["LockTime"] = "lockTime";
VoteEscrowDepositColumn["VeAmount"] = "veAmount";
})(VoteEscrowDepositColumn || (VoteEscrowDepositColumn = {}));
export var VoteEscrowDepositsStatsColumn;
(function (VoteEscrowDepositsStatsColumn) {
VoteEscrowDepositsStatsColumn["Day"] = "day";
})(VoteEscrowDepositsStatsColumn || (VoteEscrowDepositsStatsColumn = {}));
export var VoteEscrowEpochColumn;
(function (VoteEscrowEpochColumn) {
VoteEscrowEpochColumn["CreatedAt"] = "createdAt";
})(VoteEscrowEpochColumn || (VoteEscrowEpochColumn = {}));
export var VoteEscrowEpochDistributionColumn;
(function (VoteEscrowEpochDistributionColumn) {
VoteEscrowEpochDistributionColumn["CreatedAt"] = "createdAt";
})(VoteEscrowEpochDistributionColumn || (VoteEscrowEpochDistributionColumn = {}));
export var VoteEscrowEpochVoteColumn;
(function (VoteEscrowEpochVoteColumn) {
VoteEscrowEpochVoteColumn["CreatedAt"] = "createdAt";
})(VoteEscrowEpochVoteColumn || (VoteEscrowEpochVoteColumn = {}));
export var VoteEscrowTransactionColumn;
(function (VoteEscrowTransactionColumn) {
VoteEscrowTransactionColumn["Amount"] = "amount";
VoteEscrowTransactionColumn["CreatedAt"] = "createdAt";
VoteEscrowTransactionColumn["VeAmount"] = "veAmount";
})(VoteEscrowTransactionColumn || (VoteEscrowTransactionColumn = {}));
export var VoteEscrowTransactionKind;
(function (VoteEscrowTransactionKind) {
VoteEscrowTransactionKind["Burn"] = "Burn";
VoteEscrowTransactionKind["Lock"] = "Lock";
VoteEscrowTransactionKind["Unlock"] = "Unlock";
})(VoteEscrowTransactionKind || (VoteEscrowTransactionKind = {}));
export var VoteEscrowWhitelistColumn;
(function (VoteEscrowWhitelistColumn) {
VoteEscrowWhitelistColumn["AverageAmount"] = "averageAmount";
VoteEscrowWhitelistColumn["AveragePercentage"] = "averagePercentage";
VoteEscrowWhitelistColumn["CreatedAt"] = "createdAt";
})(VoteEscrowWhitelistColumn || (VoteEscrowWhitelistColumn = {}));
// eslint-disable-next-line
export function useVoteEscrowApi(baseUrl = 'https://qube.flatqube.io/v1') {
return {
balance: new Endpoint('balances/:address([0][:][0-9a-f]{64})', baseUrl),
balancesSearch: new Endpoint('balances/search', baseUrl),
balancesStatsSearch: new Endpoint('balances/statistics/search', baseUrl),
depositsSearch: new Endpoint('deposits/search', baseUrl),
depositsStatsSearch: new Endpoint('deposits/statistics/search', baseUrl),
// eslint-disable-next-line @stylistic/max-len
epochsDistributionsSearch: new Endpoint('epochs/distributions/search', baseUrl),
epochsLast: new Endpoint('epochs/last', baseUrl),
epochsSearch: new Endpoint('epochs/search', baseUrl),
epochsVotesSearch: new Endpoint('epochs/votes/search', baseUrl),
epochsVotesSum: new Endpoint('epochs/:epochNum/votes/sum', baseUrl),
mainPage: new Endpoint('main_page', baseUrl),
transactionsSearch: new Endpoint('transactions/search', baseUrl),
whitelistSearch: new Endpoint('whitelist/search', baseUrl),
};
}