Skip to content

Commit

Permalink
Merge pull request #249 from xmtp/ar/broadcast-read-me-updates
Browse files Browse the repository at this point in the history
chore: Update ReadMe
  • Loading branch information
alexrisch authored Jun 18, 2024
2 parents b794667 + 02325ac commit 5ddd500
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/angry-sheep-guess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@xmtp/broadcast-sdk": patch
---

Updated Readme
18 changes: 16 additions & 2 deletions packages/broadcast/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Broadcast SDK

## Introduction

User the Broadcast SDK to broadcast to thousands of your subscribers
The Broadcast SDK attempts to take away the need to handle Rate Limiting logic while also allowing integrators information about the broadcast and current statuses

Recommended to use with GRPC client and client caching like the Redis Client

## Installation
```
yarn add @xmtp/broadcast-sdk
Expand All @@ -9,8 +16,15 @@ yarn add @xmtp/broadcast-sdk
```ts
import { Client } from "@xmtp/xmtp-js"
import { BroadcastClient } from "@xmtp/broadcast-sdk"
// It is highly recommended to use the GRPC client
const client = await Client.create(wallet)

// It is highly recommended to use the GRPC client and base a base persistence
import { GrpcApiClient } from "@xmtp/grpc-api-client";
import { RedisPersistence } from "@xmtp/redis-persistence";

const client = await Client.create(wallet, {
apiClientFactory: GrpcApiClient.fromOptions,
basePersistence: new RedisPersistence(redis, "xmtp:"),
})

const broadcastClient = new BroadcastClient({
client,
Expand Down

0 comments on commit 5ddd500

Please sign in to comment.