Skip to main content

Prerequisites

Before installing IOTA Repstation, ensure you have:
  • Node.js version 16 or higher
  • npm, yarn, or pnpm package manager
  • TypeScript support (recommended)
  • An IOTA wallet for testnet/mainnet transactions
  • Basic understanding of IOTA addresses and transactions
  • Access to IOTA RPC endpoints
  • Code editor with TypeScript support
  • Basic familiarity with async/await patterns
  • Understanding of blockchain concepts

Installation

1

Install the Package

Install IOTA Repstation using your preferred package manager:
npm install @repstation/sdk
2

Install IOTA SDK (Optional)

For real blockchain interactions, install the official IOTA SDK:
npm install @iota/sdk
The IOTA SDK is optional. IOTA Repstation includes mock clients for development and testing.
3

TypeScript Configuration

If using TypeScript, ensure your tsconfig.json supports modern ES features:
tsconfig.json
{
  "compilerOptions": {
    "target": "ES2022",
    "module": "ESNext",
    "moduleResolution": "bundler",
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true
  }
}

Network Configurations

IOTA Repstation supports multiple networks:
const config = {
  network: 'testnet',
  rpcUrl: 'https://api.testnet.iota.cafe'
};
Best for: Development, testing, and integration

Client Configuration

Browser/Frontend Setup

For frontend applications:
import { RepstationClient } from '@repstation/sdk';

const client = new RepstationClient({
    network: 'testnet', // or 'mainnet'
    rpcUrl: 'https://api.testnet.iota.cafe',
    client: iotaClient // Optional
});

Verification

Test your installation with a simple reputation query:
async function testInstallation() {
  try {
    const result = await client.getReputationProfile({
      walletAddress: '0x86d455032e8c6af6885ff07cbf4eb1f76c532e4de1f7c6358d2ed06dc51d7554'
    });
    
    if (result.success) {
      console.log('✅ Installation successful!');
      console.log('Profile:', result.profile);
    } else {
      console.log('❌ Installation issue:', result.error);
    }
  } catch (error) {
    console.error('❌ Installation failed:', error);
  }
}

testInstallation();

Next Steps

The IOTA Repstation SDK is designed to work out of the box with sensible defaults. Most applications only need to provide a network and package ID to get started.