logo
peer channel hero background

Peer Channel

Peer channels offer encrypted persistent messaging between any BSV users. Seamlessly integrating offline and direct communications to break down the barriers and enable the peer-to-peer interactions that Satoshi described as fundamental to the operations of the BSV network.

Overview

Peer channels are configured to transport messages and provide a mechanism by which counterparties, such as nodes and applications, can communicate with each other securely, even if one of the parties is temporarily offline.

Individual channels owners may configure channel read/write permissions for unauthenticated connections and distinct read/write permissions for those to whom they issue revocable message API keys.

Inbox user interface

Account Registration

A service identifies its customers/users via accounts. Message streams, whether one-shot or long-lived streams, are logically arranged into channels, which in turn are owned by a single account. An account holder identifies themselves to the platform via account credentials.

Customer profile user interface

Using Channels

Channels may be bidirectional or unidirectional between two channel users.

An account holder can create a channel which will return the channelid (used by other channel endpoints); a URL distributable to the other channel user; a tokenid used by the channel Message API Token endpoints; and a Message API Token for use with the Message API.

Inbox user interface

Peer Channel API

The Peer Channel API, secured by account credentials, allows account holders to create and manage channels. The following endpoints are provided:

Create Channel

Creates a new channel owned by the account holder.

Amend Channel

Updates channel metadata and permissions (read/write and locking a channel).

Delete Channel

Deletes a single channel.

Get Channel Info

Returns information about a single channel.

List Channels

Returns information about all channels.

The Messages API allows account holders and third parties to read from, or write to, or request notification from channels. Find out more.

Implementation

Messages that have a JSON Request body, should use content-type "application/json".

Create Channel

Creates a new channel owned by the account holder. An account holder can create a channel which will return the channelid (used by other channel endpoints); a URL distributable to the other channel user; a tokenid used by the channel Message API Token endpoints; and a Message API Token for use with the Message API.

POST /api/v1/account/ {accountid}/channel

code-block

Ready to add blockchain solutions to your business or government agency?

Send us a message and let us know about your needs. Please contact [email protected]

Join Our Community

Stay updated with the BSV Blockchain Association's latest news and events.
Subscribe to our weekly newsletter.