Documentation
Everything you need to integrate Lynk Core into your application. From first node to production scale.
Quickstart
Deploy your first signaling node in under 5 minutes.
Register
Create a free account at portal.lynkcore.dev/register. Free plan includes 1 node — no credit card required.
Get your API Key
After login, go to Dashboard → API Key. Your key starts with lk_dev_. Store it securely.
Create a Lic Token
In the Dashboard, create a Lic Token for your node. This authorizes one device to connect to the Lynk Core network.
Install the SDK
Choose your language and install the Lynk Core SDK:
# Rust
cargo add lynk-core
# Python
pip install lynk-core
# Node.js
npm install lynk-core
Connect
Initialize the client with your Lic Token and start signaling:
use lynk_core::LynkClient;
let client = LynkClient::new("lk_lic_xxxx", "your-api-key")?;
client.connect().await?;
client.on_message(|msg| {
println!("Received: {:?}", msg);
});
Installation
Rust
cargo add lynk-core
Python
pip install lynk-core
Node.js
npm install lynk-core
C
# Download from releases
wget https://releases.lynkcore.dev/lynk-core-c-latest.tar.gz
tar xzf lynk-core-c-latest.tar.gz
cd lynk-core-c && make && sudo make install
Your First Node
Complete example — creates a signaling node that broadcasts messages to all connected peers:
// Rust — full signaling node
use lynk_core::{LynkClient, Config, SignalMessage};
use std::time::Duration;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let config = Config {
lic_token: "lk_lic_xxxx".into(),
api_key: "lk_dev_xxxx".into(),
region: "ap-southeast-1".into(),
heartbeat: Duration::from_secs(10),
};
let mut client = LynkClient::with_config(config).await?;
client.on_message(|msg: SignalMessage| {
println!("Peer {}: {}", msg.peer_id, msg.payload);
});
client.on_connect(|| {
println!("Connected to Lynk Core network");
});
client.connect().await?;
// Broadcast to all peers
client.broadcast("Hello from Rust!").await?;
tokio::signal::ctrl_c().await?;
client.disconnect().await?;
Ok(())
}
Rust SDK
lynk-core
Core Rust crate. Full async/await support, built on tokio. Zero-copy message parsing, WebSocket transport with automatic reconnection.
Key types: LynkClient, Config, SignalMessage, PeerInfo
Python SDK
lynk-core
Python bindings via PyO3. Native performance with clean Pythonic API. Async support via asyncio.
Key classes: LynkClient, Config, SignalMessage
from lynk_core import LynkClient, Config
client = LynkClient(Config(
lic_token="lk_lic_xxxx",
api_key="lk_dev_xxxx"
))
@client.on_message
def handle(msg):
print(f"Peer {msg.peer_id}: {msg.payload}")
client.connect()
client.broadcast("Hello from Python!")
Node.js SDK
lynk-core
Node.js native addon via napi-rs. TypeScript-first with full type definitions. Event-driven API.
import { LynkClient } from 'lynk-core';
const client = new LynkClient({
licToken: 'lk_lic_xxxx',
apiKey: 'lk_dev_xxxx'
});
client.on('message', (msg) => {
console.log(`Peer ${msg.peerId}: ${msg.payload}`);
});
await client.connect();
await client.broadcast('Hello from Node.js!');
C SDK
liblynkcore
C bindings via uniffi. Suitable for embedded systems and FFI consumers. Header-only integration.
#include <lynkcore.h>
void on_message(lynk_message_t *msg, void *ctx) {
printf("Peer %s: %s\n", msg->peer_id, msg->payload);
}
int main() {
lynk_client_t *client = lynk_client_new(
"lk_lic_xxxx", "lk_dev_xxxx"
);
lynk_client_on_message(client, on_message, NULL);
lynk_client_connect(client);
lynk_client_broadcast(client, "Hello from C!");
return 0;
}
Signaling
Signaling is the process of exchanging session control messages between peers before establishing a direct connection. Lynk Core handles the full signaling lifecycle:
- Offer/Answer exchange (SDP)
- ICE candidate relay
- Room management (create, join, leave)
- Peer discovery and presence
Lic Tokens
Lic Tokens are per-device authorization tokens. Each token binds one device to your account. You can create, revoke, and monitor tokens from the Dashboard.
TURN / STUN
When direct peer-to-peer connections are blocked by NATs or firewalls, Lynk Core provides managed TURN/STUN servers to relay media:
- STUN:
stun.lynkcore.dev:3478 - TURN:
turn.lynkcore.dev:3478(UDP/TCP/TLS) - TURN credentials provided via signaling channel
Authentication
All API requests require an API Key passed in the Authorization header:
curl -H "Authorization: Bearer lk_dev_xxxx" \
https://api.lynkcore.dev/v1/nodes
REST API
Base URL: https://api.lynkcore.dev/v1
GET /nodes
List all active signaling nodes
GET /nodes/{id}
Get node details and health status
POST /lic-tokens
Create a new Lic Token for a device
DELETE /lic-tokens/{token}
Revoke a Lic Token
GET /stats
Account-level usage statistics