1.1.0 โ€ข Published 4 months ago

aptai-jst v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

๐Ÿ”ฅ Teck Model - Advanced Aptos Blockchain AI

A comprehensive AI-powered SDK for Aptos blockchain with advanced DeFi analytics and NFT tracking capabilities.

๐Ÿš€ Features

  • Real-time Token Analytics

    • Price tracking across multiple DEXes
    • Market cap and volume analysis
    • Liquidity monitoring
    • Verified pair detection
  • NFT Analytics

    • Collection statistics
    • Floor price tracking
    • Volume analysis
    • Multi-marketplace support
  • Wallet Management

    • Create new wallets
    • Balance checking
    • Token transfers
    • Transaction history
  • Market Analysis

    • Holder distribution
    • Transaction patterns
    • Price predictions
    • Market sentiment
  • AI Integration

    • Groq LLM integration
    • Market insights
    • Trading suggestions
    • Risk analysis

๐Ÿ’ป Installation

npm install aptai

๐Ÿ“š Usage Guide

1. Basic Setup

const { AptAi } = require('aptai');

// Initialize SDK with required configuration
const ai = new AptAi({
  groqApiKey: 'your_groq_api_key', // Required
  nodeUrl: 'https://fullnode.mainnet.aptoslabs.com/v1', // Optional: Custom node URL
  maxTokens: 200, // Optional: Customize AI response length
  temperature: 0.7 // Optional: Customize AI response creativity
});

Security Note

Never hardcode or expose your private keys. Always use environment variables or secure key management systems.

2. Token Analysis

// Get token price and market data
const tokenInfo = await ai.getPrice('aptos');
console.log(tokenInfo);
/*
{
  name: 'Aptos',
  symbol: 'APT',
  price: 10.50,
  price_change_24h: 2.5,
  volume24h: 1000000,
  market_cap: 50000000,
  dex: {
    name: 'PancakeSwap',
    verified: true
  }
}
*/

// Get detailed token analysis
const analysis = await ai.analyzeTokenMetrics('token_address');
console.log(analysis);

3. Wallet Operations

// Create new wallet
const wallet = await ai.createWallet();
/*
{
  address: '0x...',
  privateKey: '0x...',
  publicKey: '0x...'
}
*/

// Check balance
const balance = await ai.getBalance('0x...');
console.log(`Balance: ${balance} APT`);

// Send tokens
const tx = await ai.sendTokens(
  'sender_private_key',
  'recipient_address',
  1.5 // amount in APT
);

4. AI Chat Features

// Get market insights
const insight = await ai.chat('Analyze APT price trend');
console.log(insight);

// Get token analysis
const tokenInsight = await ai.getAIInsights('token_address');
console.log(tokenInsight);

5. NFT Analytics

const nftData = await ai.getNFTData('collection_address');
console.log(nftData);
/*
{
  marketplaces: {
    topaz: { floor_price, volume },
    souffl3: { stats },
    bluemove: { collection }
  },
  analytics: {
    total_volume,
    floor_price,
    highest_sale
  }
}
*/

๐Ÿค– Telegram Bot Integration

const TelegramBot = require('node-telegram-bot-api');
const { AptAi } = require('aptai');

const bot = new TelegramBot('your_bot_token', { polling: true });
const ai = new AptAi({ groqApiKey: 'your_groq_key' });

// Add command handlers
bot.onText(/\/price (.+)/, async (msg, match) => {
  const price = await ai.getPrice(match[1]);
  bot.sendMessage(msg.chat.id, `Price: $${price.price}`);
});

๐Ÿงช Testing

npm test                   // Run all tests
npm run lint              // Check code style

๐Ÿ“ˆ Error Handling

The SDK implements comprehensive error handling for:

  • Network failures
  • Invalid inputs
  • API rate limits
  • Transaction errors
  • Blockchain issues

๐Ÿ”ง Deployment

  1. Fork or clone the repository
  2. Install dependencies: npm install
  3. Set up your environment variables
  4. Start the bot: npm start

๐Ÿ“„ License

MIT ยฉ Teck