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 🙏

© 2026 – Pkg Stats / Ryan Hefner

halo-cordova-plugin

v2.0.4

Published

Cordova plugin for Halo SDK

Readme

HaloPlugin

Please note this plugin overwrites the Android native MainActivity.js file

Steps to install and use HaloPlugin:

  1. Install node package 'xml2js' in your core cordova project using: npm i xml2js (The plugin needs this package to work correctly). If you add the plugin without this package: Remove the plugin, add the package, then re-add the plugin.
  2. Provide the following keys in your core project gradle local.properties file (these will be provided to you by synthesis): aws.accesskey= aws.secretkey=
  3. The SDK requires a minSdkVersion of 26, you can specify this in your config.xml file as such: You can also set the targetSdkVersion required of your cordova project as such:
  4. Install HaloPlugin using: 'cordova plugin add {path to HaloPlugin}' (e.g. 'cordova plugin add ../HaloPlugin/' assuming they are in the same root folder).
  5. Perform a gradle sync in Android Studio
  6. You should now have access to the 'za.co.synthesis.halo.sdk' namespace
  7. Be sure that your application has camera, microphone and location permissions before using the plugin.
  8. To ensure that the Pin Screen works, add the following tag to the Application Layer/Tag of your AndroidManifest.xml file: android:theme="@style/Theme.AppCompat.Light.NoActionBar.FullScreen"

To reference the plugin from your own main project:

The plugin has four main functions, namely: 'registerCallbacks', 'initialize', 'startTransaction', and 'requestTransactionCancellation'

These can be referenced as such:

registerCallbacks

async function onDeviceReady() { await window.plugins.haloPlugin.registerCallbacks( onRequestJWT, onHaloUIMessage, onInitializationResult, onHaloTransactionResult, onAttestationError, onSecurityError ); }

The register callbacks is for all callbacks sent by the SDK.

These can be implemented as such:

async function onRequestJWT(callback) {
    console.log("getting jwt")
    const jwt = await getJWT();     //function to get new JWT to send through to the SDK
    console.log("got jwt")
    callback(jwt)
}

function onHaloUIMessage(haloUIMessage) {
    alert(JSON.stringify(haloUIMessage, null, 2))
}

function onInitializationResult(haloInitialisationResult) {
    console.log(`onInitialisationResult:`)
    alert(`${JSON.stringify(haloInitialisationResult)}`)
}

function onHaloTransactionResult(haloTransactionResult) {
    console.log(`onHaloTransactionResult:`)
    console.log(`${JSON.stringify(haloTransactionResult)}`)
}

function onAttestationError(haloAttestationHealthResult) {
    console.log(`onAttestationError:`)
    console.log(`${JSON.stringify(haloAttestationHealthResult)}`)
}

function onSecurityError(haloErrorCode) {
    console.log(`onSecurityError:`)
    console.log(`${JSON.stringify(haloErrorCode)}`)
}

initialize

window.plugins.haloPlugin.initialize( function(result) {}, //successcallback function() {}, //errorcallback { cardTapTimeout, // applicationName, // initialisation parameters required as an object (each parameter itself in this object must be of type string) applicationVersion // } );

startTransaction

window.plugins.haloPlugin.startTransaction( function(result) {}, //successcallback function() {}, //errorcallback { transactionValue, //transactionvalue (transaction amount in rands) to be passed in as a parameter merchantReference //merchantReference to be passed in as a parameter currency //currency (zar, nad, usd) to be passed in as a parameter } );

requestTransactionCancellation

window.plugins.haloPlugin.requestTransactionCancellation( function(result) {}, //successcallback function(result) {} //errorcallback );

Please note that all callbacks will now be sent through the functions in the registerCallbacks method.