Skip to main content

Link Core

Welcome to the Link Core API Reference. This service is the central orchestrator for transaction processing and digital asset management across the LedgerLink ecosystem.

Base URL: https://api.ledgerlink.ai/v1

Overview

Link Core is the backbone microservice of the LedgerLink platform, responsible for managing transactions, balances, and digital assets. It orchestrates the entire transaction lifecycle from initiation through screening, approval, and settlement while maintaining accurate balance records and asset definitions.

Technology Stack:

  • NestJS backend framework with TypeScript
  • PostgreSQL database with TypeORM
  • Bull queue for job processing
  • Blockchain event monitoring
  • RESTful API with Swagger/OpenAPI documentation

Core Capabilities

  • Transaction Management: Full lifecycle management of deposits, withdrawals, and transfers
  • Transaction Screening: AML/compliance screening via webhook callback with freeze/approve workflows
  • Balance Management: Real-time balance tracking for customers and accounts
  • Asset Management: Digital asset CRUD operations and configuration
  • Ledger Operations: Double-entry bookkeeping and balance reconciliation
  • Job Processing: Background job processing with Bull queues
  • Blockchain Integration: Monitor and react to blockchain events

Architecture

Data Flow

Deposit Flow:

  1. Blockchain event detected → Transaction created (PENDING)
  2. Transaction awaits external screening (external system performs AML checks)
  3. External system calls /transactions/complete-screening webhook → Approve or freeze
  4. If frozen → Manual review → Approve/Reject via API
  5. If approved → Balance updated → Customer notified

Withdrawal Flow:

  1. Customer requests withdrawal → Transaction created (PENDING)
  2. Transaction awaits external screening (external system performs AML checks)
  3. External system calls /transactions/complete-screening webhook → Approve or freeze
  4. If frozen → Manual review → Approve/Reject via API
  5. If approved → Blockchain transaction initiated

API Endpoints

Transaction Operations

Balance Operations

Asset Operations

Health Check

Authentication

Link Core is accessed through the Link Dashboard, which handles all authentication via the Auth Server (BFF).

Architecture:

User → Link Dashboard → Auth Server/BFF (Authentication) → Link Core Service

How It Works:

  • Users authenticate with the Link Dashboard (username/password)
  • The Auth Server validates JWT tokens and session cookies
  • Authenticated requests are proxied to Link Core
  • No role-based access control (RBAC) - all authenticated users have full access
  • Link Core service itself does not implement authentication middleware
  • Internal service-to-service calls are unauthenticated (secure network)

See the Getting Started Guide for integration details.

Transaction Statuses

Link Core manages transactions through various states:

  • PENDING: Transaction created, awaiting screening
  • SCREENING: Transaction undergoing AML/compliance checks
  • FROZEN: Transaction flagged for manual review
  • APPROVED: Transaction approved and processing
  • COMPLETED: Transaction fully processed
  • REJECTED: Transaction rejected by screening or manual review
  • FAILED: Transaction processing failed

Job Processing

Link Core uses Bull queues for background processing:

  • Screening Complete Queue: Processes approved transactions after screening
  • Omnibus Balance Jobs: Manages omnibus wallet balance monitoring
  • Blockchain Event Processing: Handles blockchain event reactions

Integration Points

External Services

  • Link Quote: Real-time asset pricing for transaction valuation
  • Link Tracker: Activity logging and audit trails
  • External AML/Compliance System: Calls back to Link Core via webhook (/transactions/complete-screening)
  • Wallet Manager: Digital asset custody and transfers
  • Blockchain Listener: Blockchain event monitoring

Database

  • PostgreSQL: Primary data store for transactions, balances, and assets
  • TypeORM: Database ORM with migration support
  • Double-entry bookkeeping: Ensures balance integrity

Next Steps


Need Help? Contact helpdesk@ledgerlink.ai for assistance with your Link Core integration.