TypeScript client library for IXO blockchain operations, specifically designed for oracle builders and blockchain workflows.
npm install @ixo/oracles-chain-clientTypeScript client library for IXO blockchain operations, specifically designed for oracle builders and blockchain workflows.
Provides high-level abstractions for IXO blockchain interactions:
- Client: Wallet management, transaction signing, automatic gas estimation
- Authz: Oracle permission management and delegated operations
- Claims: Claim submission workflows and payment intents
- Entities: Entity creation, querying, and configuration management
- Payments: Oracle payment workflows with escrow functionality
- Crypto: ECIES encryption/decryption utilities for secure data handling
- React: React-specific utilities and hooks for frontend integration
- Smart Fee Calculation: Automatic gas estimation with intelligent fallbacks
- Authorization Management: Complete oracle permission workflows
- Payment Workflows: Escrow-based payment system for oracle services
- Type Safety: Full TypeScript support with comprehensive type definitions
- React Ready: Built-in React hooks and components
- Production Tested: Battle-tested in production oracle environments
``bash`
npm install @ixo/oracles-chain-clientor
pnpm add @ixo/oracles-chain-client
Create a .env file with the required configuration:
`env`
RPC_URL=https://devnet.ixo.earth/rpc/
SECP_MNEMONIC=your-wallet-mnemonic-phrase-here
`typescript
import {
walletClient,
claimsClient,
gqlClient,
} from '@ixo/oracles-chain-client';
// Initialize wallet client
await walletClient.checkInitiated();
// Submit a claim
await claimsClient.submitClaim({
granteeAddress: 'ixo1oracle...',
claimId: 'claim-123',
collectionId: 'collection-456',
});
// Query blockchain data
const entities = await gqlClient.GetEntitiesByOwnerAddress({
ownerAddress: 'ixo1...',
});
`
- Client: Wallet management and transaction signing
- Authz: Oracle authorization and permission management
- Claims: Claim submission and intent workflows
- Entities: Entity creation and management
- Payments: Oracle payment and escrow workflows
- Crypto: ECIES encryption/decryption utilities
`typescript
import { Payments, Authz } from '@ixo/oracles-chain-client/react';
// Use in React components with full TypeScript support
const MyOracleComponent = () => {
const handlePayment = async () => {
const payments = new Payments();
await payments.payClaim(params);
};
return ;
};
`
Complete documentation for all modules:
- Client - Wallet client and transaction management
- Authz - Authorization and permissions
- Claims - Claim operations and intents
- Entities - Entity management and queries
- Payments - Payment workflows and pricing
- Crypto - ECIES encryption and secure data handling
`bashBuild package
pnpm build
Contributions welcome! Ensure tests pass and follow existing patterns.
Licensed under terms in package.json.