Skip to content

1. Installation

WoompaLoompa edited this page Jul 23, 2026 · 1 revision

Installation

Prerequisites

  • Node.js >= 18
  • A Vendure v3.x server instance
  • npm or yarn

Install the Plugin

npm install vendure-plugin-bitcoin-lightning-via-clink

This installs the plugin and its dependencies:

  • @shocknet/clink-sdk — CLINK protocol SDK
  • nostr-tools — Nostr protocol libraries

Add to Vendure Config

// vendure-config.ts
import { ClinkPlugin } from 'vendure-plugin-bitcoin-lightning-via-clink';

export const config: VendureConfig = {
  // ... other config
  plugins: [
    ClinkPlugin.init({
      relays: ['wss://relay.shocknetwork.com'],
    }),
  ],
};

Database Entities

On first boot, the plugin automatically creates two database tables via synchronize: true:

  • clink_offer — Stores payment offers linked to orders
  • clink_channel_config — Stores per-channel Nostr keypairs and relay config

If you use migrations, generate them with:

npx vendure migrate

Verify Installation

Start your Vendure server. You should see:

[ClinkService] ClinkService initialized (server context)
[ClinkPlugin] Bitcoin Lightning (CLINK) plugin initialized. Relays: wss://relay.shocknetwork.com

Both Shop API and Admin API should include the CLINK extension fields.

Clone this wiki locally