Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

uport-transports

Package Overview
Dependencies
Maintainers
2
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uport-transports

[![Join the chat at](https://img.shields.io/badge/Riot-Join%20chat-green.svg)](https://chat.uport.me/#/login) [![npm](https://img.shields.io/npm/dt/uport-transports.svg)](https://www.npmjs.com/package/uport-transports) [![npm](https://img.shields.io/npm/v

  • 0.0.56
  • npm
  • Socket score

Version published
Weekly downloads
20
increased by100%
Maintainers
2
Weekly downloads
 
Created
Source

uPort Transports

Join the chat at npm npm Twitter Follow

Introduction | Quick Start | Modules | Development Guide

:bangbang: :warning: Transport modules rely on a spec change that is yet to be released in the uPort mobile app. Until the new mobile app is released, integrating the transport modules is not fully supported. Once it is fully supported, we will remove this message.

Introduction

For more information about uPort visit both uport.me and the developer docs site for more information on our platform and other libraries.

uport-transports is a loosely coupled collection of functions and modules to use for building on and interacting with the uPort platform. If you are looking for quick start integration you will likely be better served by using both uport-connect and uport-credentials. But if you are looking for a deeper understanding or integration, customizing functionality for the other libraries or building your own libraries on the uPort platform, then you may want to use what is provided here.

For any questions or library support reach out to the uPort team on Riot or create a Github issue.

Quick Start

Install through npm:

npm install uport-transports

Import specific modules:

import { transport, message, crypto } from 'uport-transports'

Modules

Transport

Transports deal with sending messages to and from uPort clients, and generally setting up communication channels. Most often this involves sending messages to and from the uPort mobile app. At this time there are three primary transports:

  • QR Codes: Messages are sent in a QR code to the mobile app client. You can use our default modal and flow here or configure your own QR codes. You can use our messaging server Chasqui to receive responses our have response returned to your own server.

  • URL Passing: Messages are sent in a QR code to the mobile app client. You can use our default modal and flow here or configure your own QR codes. You can use our messaging server Chasqui to receive responses our have response returned to your own server.

  • Push Notifications: Messages are sent in a QR code to the mobile app client. You can use our default modal and flow here or configure your own QR codes. You can use our messaging server Chasqui to receive responses our have response returned to your own server.

Beside the primary transports provided there is a number of smaller composable functions available to build your own transports for different needs. As we (and the community) build more transports for differing communication channels and differing uPort clients we will add them here.

Message

Only contains util functions at this time that help with adding params to request URIs. May contain other functions related to creating and parsing messages on our platform.

Crypto

Only contains encryptMessage() at this time, which is used for push notifications. May include a collection of other commonly used crypto functions in the future.

Module Outline

Transport
  • QR
    • uport.transport.qr.send()
    • uport.transport.qr.chasquiSend()
    • uport.transport.qr.open()
    • uport.transport.qr.close()
    • uport.transport.qr.getImageDataURI()
    • uport.transport.qr.modalTemplate()
  • URL
    • uport.transport.url.send()
    • uport.transport.url.getResponse()
    • uport.transport.url.listenResponse()
    • uport.transport.url.onResponse()
  • Push Notifications
    • uport.transport.push.send()
  • Chasqui / Message server
    • uport.transport.messageServer.URIHandlerSend()
    • uport.transport.messageServer.poll()
    • uport.transport.messageServer.clearResponse()
  • Poll
    • uport.transport.poll()
Message
  • Util
    • uport.message.util.paramsToUrlFragment()
    • uport.messasge.util.paramsToQueryString()
Crypto
  • uport.crypto.encryptMessage()
  • uport.crypto.randomString()
Provider
  • uport.provider()
Network
  • Config
    • uport.network.config.network()
    • uport.network.config.networkSet()
    • uport.network.config.networkToNetworkSet()
  • Defaults
    • uport.network.default.networks
    • uport.network.default.NETWORK

Development Guide

Run Locally

Download this repo or your fork, then run npm install.

Builds

All builds are created from files in /src

To transpile to ES5. All files are output to /lib. The entry of our npm package is /lib/index.js

$ npm run build:es5

To generate a bundle/distributable. We use webpack for our builds. The output dist is /dist/uport-transports.js and source map /dist/uport-transports.map.js

$ npm run build:dist
Tests

We write our tests using mocha, chai and sinon.

To run our tests:

$ npm run test

FAQs

Package last updated on 15 Aug 2018

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

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc