mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-22 21:59:44 +03:00
Add governanceChainsInfoSchema
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@orionprotocol/sdk",
|
"name": "@orionprotocol/sdk",
|
||||||
"version": "0.19.12",
|
"version": "0.19.13",
|
||||||
"description": "Orion Protocol SDK",
|
"description": "Orion Protocol SDK",
|
||||||
"main": "./lib/index.cjs",
|
"main": "./lib/index.cjs",
|
||||||
"module": "./lib/index.js",
|
"module": "./lib/index.js",
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import {
|
|||||||
governanceContractsSchema,
|
governanceContractsSchema,
|
||||||
governancePoolsSchema,
|
governancePoolsSchema,
|
||||||
governancePoolSchema,
|
governancePoolSchema,
|
||||||
|
governanceChainsInfoSchema,
|
||||||
} from './schemas/index.js';
|
} from './schemas/index.js';
|
||||||
import type redeemOrderSchema from '../Aggregator/schemas/redeemOrderSchema.js';
|
import type redeemOrderSchema from '../Aggregator/schemas/redeemOrderSchema.js';
|
||||||
import { sourceAtomicHistorySchema, targetAtomicHistorySchema } from './schemas/atomicHistorySchema.js';
|
import { sourceAtomicHistorySchema, targetAtomicHistorySchema } from './schemas/atomicHistorySchema.js';
|
||||||
@@ -110,6 +111,7 @@ class BlockchainService {
|
|||||||
this.getGovernanceContracts = this.getGovernanceContracts.bind(this);
|
this.getGovernanceContracts = this.getGovernanceContracts.bind(this);
|
||||||
this.getGovernancePools = this.getGovernancePools.bind(this);
|
this.getGovernancePools = this.getGovernancePools.bind(this);
|
||||||
this.getGovernancePool = this.getGovernancePool.bind(this);
|
this.getGovernancePool = this.getGovernancePool.bind(this);
|
||||||
|
this.getGovernanceChainsInfo = this.getGovernanceChainsInfo.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
get blockchainServiceWsUrl() {
|
get blockchainServiceWsUrl() {
|
||||||
@@ -443,6 +445,11 @@ class BlockchainService {
|
|||||||
`${this.apiUrl}/api/governance/pools/${address}`,
|
`${this.apiUrl}/api/governance/pools/${address}`,
|
||||||
governancePoolSchema,
|
governancePoolSchema,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
getGovernanceChainsInfo = () => fetchWithValidation(
|
||||||
|
`${this.apiUrl}/api/governance/chains-info`,
|
||||||
|
governanceChainsInfoSchema,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export * as schemas from './schemas/index.js';
|
export * as schemas from './schemas/index.js';
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import { z } from 'zod';
|
||||||
|
|
||||||
|
const governanceChainsInfoSchema = z.object({
|
||||||
|
isChainSupported: z.boolean(),
|
||||||
|
});
|
||||||
|
|
||||||
|
export default governanceChainsInfoSchema;
|
||||||
@@ -17,3 +17,4 @@ export { default as cfdHistorySchema } from './cfdHistorySchema.js';
|
|||||||
export { default as governanceContractsSchema } from './governanceContractsSchema.js';
|
export { default as governanceContractsSchema } from './governanceContractsSchema.js';
|
||||||
export { default as governancePoolsSchema } from './governancePoolsSchema.js';
|
export { default as governancePoolsSchema } from './governancePoolsSchema.js';
|
||||||
export { default as governancePoolSchema } from './governancePoolSchema.js';
|
export { default as governancePoolSchema } from './governancePoolSchema.js';
|
||||||
|
export { default as governanceChainsInfoSchema } from './governanceChainsInfoSchema.js';
|
||||||
|
|||||||
Reference in New Issue
Block a user