mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-14 06:02:36 +03:00
added test method
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.19.89-rc18",
|
||||
"version": "0.19.89-rc19",
|
||||
"description": "Orion Protocol SDK",
|
||||
"main": "./lib/index.cjs",
|
||||
"module": "./lib/index.js",
|
||||
|
||||
@@ -4,6 +4,7 @@ import {
|
||||
listAmountResponseSchema,
|
||||
listNFTOrderResponseSchema,
|
||||
listPoolResponseSchema,
|
||||
testIncrementorSchema,
|
||||
veORNInfoResponseSchema,
|
||||
votingInfoResponseSchema
|
||||
} from './schemas/index.js';
|
||||
@@ -187,6 +188,17 @@ class IntegratorService {
|
||||
});
|
||||
}
|
||||
|
||||
readonly testRetrieve = () => {
|
||||
return fetchWithValidation(this.apiUrl, testIncrementorSchema, {
|
||||
method: 'POST',
|
||||
body: this.makeRPCPayload({
|
||||
model: 'Incrementer',
|
||||
method: 'retrieve',
|
||||
params: [],
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
||||
private readonly getK = (time: number) => {
|
||||
const currentTime = time < LOCK_START_TIME ? LOCK_START_TIME : time;
|
||||
|
||||
|
||||
@@ -5,3 +5,4 @@ export { default as listPoolResponseSchema } from './list-pool-response-schema.j
|
||||
export { default as veORNInfoResponseSchema } from './veORN-info-schema.js';
|
||||
export { default as listAmountResponseSchema } from './list-amount-schema.js';
|
||||
export { default as votingInfoResponseSchema } from './voting-info-schema.js';
|
||||
export { default as testIncrementorSchema } from './test-incrementor-schema.js';
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
import { z } from 'zod';
|
||||
import infoSchema from './info-schema.js';
|
||||
|
||||
const testIncrementorSchema = z.object({
|
||||
result: z.number().int(),
|
||||
info: infoSchema,
|
||||
});
|
||||
|
||||
export default testIncrementorSchema;
|
||||
Reference in New Issue
Block a user