mirror of
https://github.com/xtr-dev/rondevu-client.git
synced 2025-12-10 02:43:25 +00:00
Update README: Remove custom peer ID documentation
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
16
README.md
16
README.md
@@ -437,26 +437,16 @@ const newPeers = await client.offers.findByTopic('movie-xyz', {
|
|||||||
|
|
||||||
### Authentication
|
### Authentication
|
||||||
|
|
||||||
#### `client.register(customPeerId?)`
|
#### `client.register()`
|
||||||
Register a new peer and receive credentials.
|
Register a new peer and receive credentials.
|
||||||
|
|
||||||
|
Generates a cryptographically random 128-bit peer ID.
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
// Auto-generate peer ID
|
|
||||||
const creds = await client.register();
|
const creds = await client.register();
|
||||||
// { peerId: 'f17c195f067255e357232e34cf0735d9', secret: '...' }
|
// { peerId: 'f17c195f067255e357232e34cf0735d9', secret: '...' }
|
||||||
|
|
||||||
// Or use a custom peer ID (1-128 characters)
|
|
||||||
const customCreds = await client.register('my-custom-peer-id');
|
|
||||||
// { peerId: 'my-custom-peer-id', secret: '...' }
|
|
||||||
```
|
```
|
||||||
|
|
||||||
**Parameters:**
|
|
||||||
- `customPeerId` (optional): Custom peer ID (1-128 characters). If not provided, a random ID will be generated.
|
|
||||||
|
|
||||||
**Notes:**
|
|
||||||
- Returns 409 Conflict if the custom peer ID is already in use
|
|
||||||
- Custom peer IDs must be non-empty and between 1-128 characters
|
|
||||||
|
|
||||||
### Topics
|
### Topics
|
||||||
|
|
||||||
#### `client.offers.getTopics(options?)`
|
#### `client.offers.getTopics(options?)`
|
||||||
|
|||||||
Reference in New Issue
Block a user