New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

be-api-client

Package Overview
Dependencies
Maintainers
11
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

be-api-client - npm Package Compare versions

Comparing version 0.0.41 to 0.0.42

107

index.js

@@ -60,2 +60,23 @@ const rp = require('request-promise-native')

async function doPut(route, form={}){
const options = {
method: 'PUT',
uri: config.apiServerAddress + route,
json: true,
form,
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
}
}
try{
return await rp(options)
} catch(err){
return {
result: false,
route,
err
}
}
}
async function isAPIRunning(){

@@ -218,2 +239,6 @@ return await doGet('/isAPIRunning')

async function getUser(id){
return await doGet('/users/' + id)
}
async function getUsers(){

@@ -237,9 +262,75 @@ return await doGet('/users')

}
return await doPost('/tokens/${contractId}/tokenize', form)
return await doPost(`/tokens/${contractId}/tokenize`, form)
}
async function getQuoteRate(contractId){
return await doGet('/marketMaker/'+contractId+'/quoteRate')
async function addInstruction(country, legalEntity, currency, account, amountRequestedToTokenize, requestedBy){
const form = {
country,
legalEntity,
currency,
account,
amountRequestedToTokenize,
requestedBy
}
return await doPost('/instructions', form)
}
async function getInstructions(){
return await doGet('/instructions')
}
async function addOrUpdateIssuance(_id, country, legalEntity, currency, account, accountBalance, amountRequestedToTokenize, requestedBy, dateTime, status){
const form = {
_id,
country,
legalEntity,
currency,
account,
accountBalance,
amountRequestedToTokenize,
requestedBy,
dateTime,
status
}
return await doPut('/issuances', form)
}
async function getIssuances(){
return await doGet('/issuances')
}
async function addRedemption(country, legalEntity, currency, account, amountRequestedToRedeem, requestedBy){
const form = {
country,
legalEntity,
currency,
account,
amountRequestedToRedeem,
requestedBy
}
return await doPost('/redemptions', form)
}
async function getRedemptions(){
return await doGet('/redemptions')
}
async function addPayment(receivingBank, reference, debtorDetails, creditorDetails, sendingCurrency, receivingCurrency, rate){
const form = {
receivingBank,
reference,
debtorDetails,
creditorDetails,
sendingCurrency,
receivingCurrency,
rate
}
return await doPost('/payments', form)
}
async function getPayments(){
return await doGet('/payments')
}
return {

@@ -267,2 +358,3 @@ isAPIRunning,

addUser,
getUser,
getUsers,

@@ -272,3 +364,10 @@ entityId,

tokenize,
getQuoteRate
addInstruction,
getInstructions,
addOrUpdateIssuance,
getIssuances,
addRedemption,
getRedemptions,
addPayment,
getPayments
}

@@ -275,0 +374,0 @@ }

2

package.json
{
"name": "be-api-client",
"version": "0.0.41",
"version": "0.0.42",
"description": "A node.js client for the be-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