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