From f2993ae00b658e350a944be5f8496b5647c130ec Mon Sep 17 00:00:00 2001 From: Alex Risch Date: Tue, 18 Jun 2024 06:56:19 -0700 Subject: [PATCH 1/2] chore: Update ReadMe Updated readme --- packages/broadcast/README.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/packages/broadcast/README.md b/packages/broadcast/README.md index dec858a..8964f2e 100644 --- a/packages/broadcast/README.md +++ b/packages/broadcast/README.md @@ -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 @@ -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, From 02325acd16347981043712e2b5bda9c14828e93d Mon Sep 17 00:00:00 2001 From: Alex Risch Date: Tue, 18 Jun 2024 07:00:21 -0700 Subject: [PATCH 2/2] docs(changeset): Updated Readme --- .changeset/angry-sheep-guess.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/angry-sheep-guess.md diff --git a/.changeset/angry-sheep-guess.md b/.changeset/angry-sheep-guess.md new file mode 100644 index 0000000..a9a5206 --- /dev/null +++ b/.changeset/angry-sheep-guess.md @@ -0,0 +1,5 @@ +--- +"@xmtp/broadcast-sdk": patch +--- + +Updated Readme