@opcat-labs/openapi
v1.0.3
Published
NestJS API Gateway with OpenAPI v3 support
Readme
@opcat-labs/openapi
A TypeScript SDK for interacting with the OpCat Labs OpenAPI, providing type-safe access to blockchain data including blocks, transactions, addresses, UTXOs, and tokens.
Installation
npm install @opcat-labs/openapior
yarn add @opcat-labs/openapiQuick Start
import { healthCheck, getBlockByHash, getTransactionById } from '@opcat-labs/openapi';
// Check service health
const health = await healthCheck();
// Get block by hash
const block = await getBlockByHash({
params: { hash: 'your-block-hash-here' }
});
// Get transaction by ID
const transaction = await getTransactionById({
params: { txid: 'your-transaction-id-here' }
});API Reference
All api reference here: https://testnet-openapi.opcatlabs.io/
