npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@cyph/burner-sdk

v3.2.0

Published

Client side of Cyph API

Downloads

8

Readme

@cyph/burner-sdk

Overview

The Cyph Burner SDK allows third-party services to initiate new Cyph Burner sessions.

The core functionality is to create an ephemeral encrypted text chat link that can be shared with two parties.

Additionally, the following optional features are supported:

  • disableP2P: Disables P2P networking for voice/video calls, with traffic instead routed through Twilio's low-latency network traversal infrastructure

  • modestBranding: Uses modest branding (greyscale UI with toned down Cyph branding)

  • telehealth: Goes directly into a video call in telehealth application

  • video: Goes directly into a video call

  • voice: Goes directly into a voice call

Language Support

This library is built using Haxe, which enables using one code base to target many different platforms.

Supported languages:

  • Command line shell

  • JavaScript / TypeScript (Node.js + browser)

  • PHP

The following languages have experimental support:

  • C++

  • Java

Example Uses

Command line shell:

cyph-burner-sdk $apiKey
# https://cyph.im/#2D2gzbqggQxTaanHZYbDXb8fVr


cyph-burner-sdk $apiKey voice
# https://cyph.audio/#1nckgXAumVXWjmwrYdSjXaZGW


cyph-burner-sdk \
	$apiKey \
	disableP2P \
	modestBranding \
	video \
	'{"chat": "https://starfleet.cyph.ws/#"}'
# https://starfleet.cyph.ws/#video/#!$1ro2HQ4q7wBbC7hHCF2oWggVGe

JavaScript (ES2017) / TypeScript:

import {cyph} from '@cyph/burner-sdk';

(async () => {


console.log(await cyph.initiateSession(apiKey));


console.log(await cyph.initiateSession(apiKey, [cyph.options.voice]));


console.log(
	await cyph.initiateSession(
		apiKey,
		[
			cyph.options.disableP2P,
			cyph.options.modestBranding,
			cyph.options.video
		],
		{chat: 'https://starfleet.cyph.ws/#'}
	)
);


})();

JavaScript (ES5):

var cyph = require('@cyph/burner-sdk');


cyph.initiateSession(
	apiKey,
	undefined,
	undefined,
	function (cyphLink) { console.log(cyphLink); },
	function (err) { console.error(err); }
);


cyph.initiateSession(
	apiKey,
	[cyph.options.voice],
	undefined,
	function (cyphLink) { console.log(cyphLink); },
	function (err) { console.error(err); }
);


cyph.initiateSession(
	apiKey,
	[
		cyph.options.disableP2P,
		cyph.options.modestBranding,
		cyph.options.video
	],
	{chat: 'https://starfleet.cyph.ws/#'},
	function (cyphLink) { console.log(cyphLink); },
	function (err) { console.error(err); }
);

PHP:

foreach (glob('cyph/*/*.php') as $f) include $f;
foreach (glob('cyph/*.php') as $f) include $f;


Cyph::initiateSession(
	$apiKey,
	null,
	null,
	function ($cyphLink) { echo $cyphLink; },
	function ($err) { echo $err; }
);


Cyph::initiateSession(
	$apiKey,
	[Cyph::$options->voice],
	null,
	function ($cyphLink) { echo $cyphLink; },
	function ($err) { echo $err; }
);


Cyph::initiateSession(
	$apiKey,
	[
		Cyph::$options->disableP2P,
		Cyph::$options->modestBranding,
		Cyph::$options->video
	],
	array('chat' => 'https://starfleet.cyph.ws/#'),
	function ($cyphLink) { echo $cyphLink; },
	function ($err) { echo $err; }
);

Coming Soon

Python 3 will be supported after an upcoming release of Haxe, as in the following example:

from Cyph import Cyph


Cyph.initiateSession(
	apiKey,
	onData = lambda cyphLink: print(cyphLink),
	onError = lambda err: print(err)
)


Cyph.initiateSession(
	apiKey,
	[Cyph.options.voice],
	onData = lambda cyphLink: print(cyphLink),
	onError = lambda err: print(err)
)


Cyph.initiateSession(
	apiKey,
	[
		Cyph.options.disableP2P,
		Cyph.options.modestBranding,
		Cyph.options.video
	],
	{'chat': 'https://starfleet.cyph.ws/#'},
	lambda cyphLink: print(cyphLink),
	lambda err: print(err)
)