> ## Documentation Index
> Fetch the complete documentation index at: https://docs.repstation.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# IOTA Repstation SDK

> A production-ready TypeScript SDK for decentralized reputation management on IOTA

<img src="https://mintcdn.com/bitpalm/VKFeF9FLuri7DiTs/images/hero.png?fit=max&auto=format&n=VKFeF9FLuri7DiTs&q=85&s=82ca1040f290070cede12fae9b4943d3" alt="IOTA Repstation Hero" width="1500" height="500" data-path="images/hero.png" />

## What is IOTA Repstation?

IOTA Repstation is a **deal-bound, app-scoped reputation system** built on IOTA's MoveVM that enables applications to create and manage transparent, portable reputation scores for their users.

<CardGroup cols={2}>
  <Card title="Deal-Based Reputation" icon="handshake">
    Ratings are tied to specific transactions/deals, ensuring authentic feedback from real interactions.
  </Card>

  <Card title="Cross-Platform Portability" icon="globe">
    Users' reputation follows them across all platforms using the SDK, building long-term trust.
  </Card>

  <Card title="App-Scoped Profiles" icon="shield">
    Each application maintains its own reputation namespace while contributing to global scores.
  </Card>

  <Card title="Complete Type Safety" icon="code">
    Full TypeScript support with generated types for a seamless developer experience.
  </Card>
</CardGroup>

## Quick Start

Get started with IOTA Repstation in just a few lines of code:

<CodeGroup>
  ```javascript Browser/Frontend theme={null}
  import { RepstationClient, IotaClient } from '@repstation/sdk';

  // Optional: create IOTA client for real blockchain interactions
  const iotaClient = new IotaClient({
    url: 'https://api.testnet.iota.cafe'
  });

  // Create client using factory method (recommended)
  const client = await RepstationClient.create({
    network: 'testnet',
    rpcUrl: 'https://api.testnet.iota.cafe',
    client: iotaClient // Optional
  });

  // Get a user's reputation
  const result = await client.getReputationProfile({
    walletAddress: '0xUSER_WALLET'
  });

  if (result.success) {
    console.log(`Reputation: ${result.profile?.global?.average}/100`);
  }
  ```

  ```javascript Server/Backend theme={null}
  import { RepstationClient, IotaClient } from '@repstation/sdk';

  // Create IOTA client for server operations
  const iotaClient = new IotaClient({
    url: 'https://api.testnet.iota.cafe'
  });

  // Create client using factory method
  const client = await RepstationClient.create({
    network: 'testnet',
    client: iotaClient
    // SDK automatically loads contract addresses from configuration
  });

  // Register your platform (returns Transaction for signing)
  const registerTx = client.registerApp({
    providerMetadata: {
      providerName: 'My Platform',
      publicUrl: 'https://myplatform.com',
      xHandle: '@myplatform'
    }
  });

  // Sign and execute transaction with your wallet/signer
  ```
</CodeGroup>

<Card title="Ready to integrate?" icon="rocket" href="/quickstart">
  Follow our quickstart guide to integrate reputation into your platform in minutes.
</Card>

## Key Features

<AccordionGroup>
  <Accordion icon="chart-line" title="Transparent Reputation Scoring">
    All ratings and reputation scores are stored on the IOTA blockchain, providing complete transparency and immutability. Users can verify their reputation across platforms.
  </Accordion>

  <Accordion icon="network-wired" title="Cross-Platform Integration">
    Build a network effect where users' reputation grows across all integrated platforms. A user's good behavior on one marketplace benefits them on all others.
  </Accordion>

  <Accordion icon="gear" title="Easy Integration">
    Simple SDK with comprehensive examples for common use cases like NFT marketplaces, service platforms, and DeFi protocols.
  </Accordion>

  <Accordion icon="shield-check" title="Secure and Decentralized">
    Built on IOTA's secure MoveVM with capability-based security ensuring only authorized parties can perform actions.
  </Accordion>
</AccordionGroup>

## Use Cases

IOTA Repstation is perfect for any platform where trust between parties matters:

<CardGroup cols={3}>
  <Card title="NFT Marketplaces" icon="image" href="/examples/nft-marketplace">
    Build trust between buyers and sellers with deal-based ratings after each transaction.
  </Card>

  <Card title="Service Platforms" icon="tools" href="/examples/service-platform">
    Rate service providers and clients based on completed work and payment history.
  </Card>

  <Card title="DeFi Lending Platform" icon="coins" href="/examples/lending-platform">
    Build automated credit scoring for DeFi lending using blockchain reputation data.
  </Card>
</CardGroup>

## Architecture Overview

<Steps>
  <Step title="Deal Creation">
    When users engage in a transaction, your platform creates a **Deal** that represents the agreement between parties.
  </Step>

  <Step title="Deal Execution">
    Parties accept and complete the deal through your platform's normal flow (payment, delivery, etc.).
  </Step>

  <Step title="Rating & Reputation">
    After completion, both parties can rate each other, contributing to their **global** and **app-specific** reputation scores.
  </Step>

  <Step title="Cross-Platform Benefits">
    Users' reputation follows them to other platforms using the same SDK, creating network effects.
  </Step>
</Steps>

## Ready to Build?

<CardGroup cols={2}>
  <Card title="Installation Guide" icon="download" href="/installation">
    Install the SDK and set up your first integration.
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/introduction">
    Explore the complete SDK API documentation.
  </Card>

  <Card title="Integration Examples" icon="puzzle-piece" href="/integration/marketplace-example">
    See real-world examples of platform integrations.
  </Card>

  <Card title="Core Concepts" icon="book" href="/concepts/overview">
    Understand deals, ratings, and reputation aggregation.
  </Card>
</CardGroup>

<Note>
  IOTA Repstation is currently in beta. The SDK is production-ready but the smart contract addresses may change. Join our community for updates and support.
</Note>
