From 255fe42a432256597052ad0efe1b55c42c2cf7d6 Mon Sep 17 00:00:00 2001 From: Bas van den Aakster Date: Sat, 22 Nov 2025 17:34:11 +0100 Subject: [PATCH] Add optional info field to offers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add info field to CreateOfferRequest and Offer types - Update README with info field examples and documentation - Public metadata field visible in all API responses 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- README.md | 6 ++++-- src/offers.ts | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ede24e8..a89dd92 100644 --- a/README.md +++ b/README.md @@ -411,7 +411,8 @@ const offers = await client.offers.create([{ sdp: 'v=0...', // Your WebRTC offer SDP topics: ['movie-xyz', 'hd-content'], ttl: 300000, // 5 minutes - secret: 'my-secret-password' // Optional: protect offer (max 128 chars) + secret: 'my-secret-password', // Optional: protect offer (max 128 chars) + info: 'Looking for peers in EU region' // Optional: public info (max 128 chars) }]); // Discover peers by topic @@ -489,7 +490,8 @@ const offers = await client.offers.create([ sdp: 'v=0...', topics: ['topic-1', 'topic-2'], ttl: 300000, // optional, default 5 minutes - secret: 'my-secret-password' // optional, max 128 chars + secret: 'my-secret-password', // optional, max 128 chars + info: 'Looking for peers in EU region' // optional, public info, max 128 chars } ]); ``` diff --git a/src/offers.ts b/src/offers.ts index 1480947..d6d24c9 100644 --- a/src/offers.ts +++ b/src/offers.ts @@ -9,6 +9,7 @@ export interface CreateOfferRequest { topics: string[]; ttl?: number; secret?: string; + info?: string; } export interface Offer { @@ -21,6 +22,7 @@ export interface Offer { lastSeen: number; secret?: string; hasSecret?: boolean; + info?: string; answererPeerId?: string; answerSdp?: string; answeredAt?: number;