Skip to main content

DobLink

DobLink is DobProtocol's integration layer. It provides two tools for bringing pools to external websites and applications:

  1. Embeddable Widgets -- Customizable pool cards that can be embedded on any website
  2. JavaScript SDK -- A TypeScript/JavaScript library (@dobprotocol/sdk) for full programmatic access to DobProtocol

What You Can Do​

CapabilityWidgetSDK
Display pool info on external sitesYesYes
Create pools from your own app--Yes
Track analytics (views, referrers)YesYes
Manage pool participants--Yes
Query pool metrics (APR, distributions)--Yes
Browse marketplace listings--Yes
Execute pool actions (deposit, distribute)--Yes
Create projects--Yes

Embeddable Widgets​

Pool owners can create customizable widgets to embed on external websites. Each widget:

  • Links to a specific pool
  • Has a configurable theme (light/dark), colors, and button text
  • Tracks views and referrer domains automatically
  • Can be restricted to specific domains

Widget Configuration​

OptionDescriptionDefault
themeColor themelight
primary_colorAccent color (hex)#597CE9
button_textCall-to-action textInvest Now
show_aprShow estimated APRtrue
show_membersShow participant counttrue
show_distributionsShow distribution infotrue
show_networkShow blockchain networktrue
allowed_domainsDomain whitelistAll domains

Creating a Widget​

Widgets can be created through:

JavaScript SDK​

The @dobprotocol/sdk package allows external developers to integrate DobProtocol pools directly into their applications. It handles authentication, pool creation, metrics queries, and widget management.

Install from npm:

npm install @dobprotocol/sdk
import { DobProtocolClient } from '@dobprotocol/sdk';

const dob = new DobProtocolClient({
apiKey: 'dob_sdk_...',
network: 'mainnet',
});

// Query any pool's metrics
const pool = await dob.pools.getPool('CDXYZ...');
console.log(`APR: ${pool.estimated_apr}%`);

// Create an embeddable widget for that pool
const widget = await dob.widgets.create({
pool_address: 'CDXYZ...',
theme: 'light',
primary_color: '#597CE9',
button_text: 'Invest now',
});
// Embed widget.embed_url in an iframe on your site

See the full SDK documentation:

Architecture​

External Website / App
|
├── DobLink Widget (iframe/embed)
| └── Displays pool info + tracks views
|
└── @dobprotocol/sdk (npm package)
|
├── Authentication (wallet nonce/sign)
├── Pool creation (5-step Stellar deploy)
├── Pool queries (metrics, events, schedule)
├── Pool actions (deposit, distribute, transfer)
├── Marketplace (listings, stats, history)
├── Projects (group pools)
└── Widgets (create, manage, analytics)
|
▼
DobProtocol Backend API
(home.dobprotocol.com/api/sdk/*)

How SDK Authentication Works​

External applications authenticate via SDK API keys:

  1. Pool owner creates an SDK key at home.dobprotocol.com
  2. Key includes domain whitelist and permission scopes (read, write)
  3. External app sends X-DOB-API-Key header with each request
  4. Backend validates key, checks domain, enforces rate limits (120 RPM)

For user-level operations (creating pools, signing transactions), the SDK also supports wallet-based JWT authentication.

Supported Networks​

DobLink and the SDK currently support Stellar blockchain only:

NetworkIDUse
Stellar Testnet9Development and testing
Stellar Mainnet10Production

Integration with DobProtocol​

IntegrationPurpose
Token StudioPool and share data for investment targets
DobValidatorTRUFA scores and certificate verification
MarketplaceSecondary market for pool shares
Smart ContractsStellar Splitter V2 for pool distribution