Socket
Socket
Sign inDemoInstall

@cyph/burner-sdk

Package Overview
Dependencies
6
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @cyph/burner-sdk

Client side of Cyph API


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

@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)
)

Keywords

FAQs

Last updated on 03 Apr 2020

Did you know?

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc