This commit is contained in:
Kirill Litvinov
2024-06-21 10:38:58 +03:00
parent fad890eeab
commit 6db981dc79
2 changed files with 8 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@orionprotocol/sdk",
"version": "0.22.10-rc2",
"version": "0.22.10-rc3",
"description": "Orion Protocol SDK",
"main": "./lib/index.cjs",
"module": "./lib/index.js",

View File

@@ -55,7 +55,7 @@ type VeORNInfoPayload = BasePayload & {
type GetPointsAtPayload = BasePayload & {
model: 'veORN'
method: 'pointsInfo'
params: [number, number, number]
params: [number, number]
};
type ListAmountPayload = BasePayload & {
@@ -127,13 +127,17 @@ class IndexerService {
});
};
readonly getPointsAt = (timestamp = Date.now(), page = 1, pageSize = 1000) => {
/**
* @param {number} page - current page
* @param {number} [pageSize] - amount of items on one page
*/
readonly getPointsAt = (page = 1, pageSize = 1000) => {
return fetchWithValidation(this.apiUrl, getPointsAtResponseSchema, {
method: 'POST',
body: this.makeRPCPayload({
model: 'veORN',
method: 'pointsAt',
params: [timestamp, page, pageSize],
params: [page, pageSize],
}),
});
};