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

cash-tokenizer-client

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cash-tokenizer-client - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

37

index.js

@@ -0,1 +1,2 @@

const EventSource = require('eventsource')
const rp = require('request-promise-native')

@@ -33,26 +34,16 @@ const defaultConfig = {

//async function login(username, password){
// let options = {
// method: 'POST',
// uri: config.apiServerAddress + '/auth/login',
// json: true,
// form: {
// username,
// password
// },
// headers: {
// 'Content-Type': 'application/x-www-form-urlencoded'
// }
// }
// try{
// let response = await rp(options)
// return response
// } catch(err){
// console.log('ERROR with calling /auth/login:', err)
// return {
// result: false
// }
// }
//}
function subscribeToExecutedRedemptionsPubSub(fn){
const uri = config.apiServerAddress+'/redemptions/subscribeToExecutedPubSub'
const es = new EventSource(uri)
es.addEventListener('executedRedemption', function (e) {
if(!e.close){
e.close = function (){
es._close()
}
}
fn(e)
})
}
return {

@@ -59,0 +50,0 @@ isAPIRunning,

{
"name": "cash-tokenizer-client",
"version": "0.0.1",
"version": "0.0.2",
"description": "A nodejs client for the cash-tokenizer API",

@@ -5,0 +5,0 @@ "main": "index.js",

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