Home
Block Height: --

API Documentation

Complete REST API — Works with any language, any platform

Base URL
https://sunlink.network
No API Key Required
Permissionless access for basic operations
Response Format
JSON (UTF-8)

Quick Start

// Sunlink.js SDK
import Sunlink from '@sunlink/sdk';

const client = new Sunlink('https://sunlink.network');

// Create wallet (free 1000 SLC)
const wallet = await client.wallet.create('My Wallet');
console.log(wallet.address); // slk_a1b2c3d4...

// Deploy smart contract
const contract = await client.contract.deploy({
  template: 'escrow',
  params: { buyer: 'Alice', seller: 'Bob', amount: 500 },
  owner: wallet.address
});

// Create your own token
const token = await client.token.create({
  name: 'MyToken',
  symbol: 'MTK',
  totalSupply: 1_000_000
});

// Transfer tokens
await client.token.transfer({
  tokenId: token.id,
  to: 'slk_recipient_address',
  amount: 100
});

Wallet API

POST/api/v1/wallet/create

Create a new wallet (free 1000 SLC)

{ "name": "My Wallet" }
GET/api/v1/wallet/:address

Get wallet info and balance

POST/api/v1/wallet/deposit

Deposit funds (any currency → SLC)

{ "amount": 100, "currency": "USD" }

Smart Contract API

POST/api/v1/contract/deploy

Deploy a smart contract

{ "template": "escrow", "params": {...}, "owner": "addr" }
POST/api/v1/contract/execute

Execute a contract function

{ "contractId": "...", "function": "fund", "args": {...} }
GET/api/v1/contract/:id

Get contract state and info

GET/api/v1/contract/templates

List available templates

Token API

POST/api/v1/token/create

Create a new token

{ "name": "MyToken", "symbol": "MTK", "totalSupply": 1000000 }
POST/api/v1/token/transfer

Transfer tokens

{ "tokenId": "...", "to": "addr", "amount": 100 }
POST/api/v1/token/mint

Mint new tokens (owner only)

{ "tokenId": "...", "amount": 500 }
POST/api/v1/token/burn

Burn tokens

{ "tokenId": "...", "amount": 100 }
GET/api/v1/token/:id

Get token info

Blockchain API

GET/api/v1/chain/info

Get chain info (length, validity)

GET/api/v1/chain/blocks

Get recent blocks

GET/api/v1/chain/block/:hash

Get block by hash

GET/api/v1/chain/verify

Verify entire chain integrity

Rate Limits

Free Tier
100 req/day
Pro Tier
10,000 req/day
Enterprise
Unlimited