Socket
Book a DemoInstallSign in
Socket

@xmtp/broadcast-sdk

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xmtp/broadcast-sdk

Helper package for broadcasting XMTP messages to subscribers

0.2.0
latest
npmnpm
Version published
Maintainers
0
Created
Source

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

Usage

import { Client } from "@xmtp/xmtp-js"
import { BroadcastClient } from "@xmtp/broadcast-sdk"

// 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,
  addresses: ["0x1234", "0x5678"],
  cachedCanMessageAddresses: ["0x1234"],
})
broadcastClient.broadcast(['Hello!'])

FAQs

Package last updated on 01 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.