Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
bankly
Advanced tools
Readme
Unnofficial Javascript class to access Bankly (by Acesso) API.
This class is available at NPM.
npm i bankly
Authentication and token refreshing is handled by the class itself.
Start by importing the class and creating an instance supplying your client_id and client_secret provided by Acesso.
import Bankly from 'bankly';
// or
const Bankly = require('bankly')
let bankly = new Bankly('client_id', 'client_secret')
If you are using the sandbox environment, just do:
let bankly = new Bankly('client_id', 'client_secret', 'sandbox')
Provide the branch and account number (without hyphen) to get the balance.
bankly.getBalance('0001', '1234')
This method returns a promise that resolves to a JSON object.
Provide:
> 0
)bankly.getStatement('0001', '1234', 0, 10)
This method returns a promise that resolves to a JSON object.
Provide:
> 0
)bankly.getEvents('0001', '1234', 1, 10)
This method returns a promise that resolves to a JSON object.
Note: this method causes subtraction of real money.
In order to specify an origin and destination bank account, you must create two BankAccount objects. You'll need to import it from the library first:
import Bankly, { BankAccount } from 'bankly'
// or
const { BankAccount } = require('bankly')
// or
const BankAccount = require('bankly').BankAccount
A bank account instance must be created receiving an object with the following properties:
Then you will use the transfer()
method to perform the actual transfer, providing:
Example:
let from = new BankAccount({
branch: '0001',
account: '1234',
document: '00000000000000',
name: 'Company LTDA'
})
let to = new BankAccount({
bankCode: '123',
branch: '1234',
account: '12345',
document: '00000000000',
name: 'John Doe'
})
// transfer BRL 5 (R$ 5)
bankly.transfer(500, 'test', from, to)
This method returns a promise that resolves to an object. This object contains an "authenticationCode" property with a string, with a reference code for the transaction that you will use to check its status later.
Use the following method to retrieve a transaction's status. You will need to provide:
authenticationCode
from the transfer
method)bankly.getTransferStatus('0001', '1234', 'AuthenticationId')
This method returns a promise that resolves to a JSON object.
You can get a list of banks and payment institutions with respective codes from the Central Bank (Bacen). No authentication is needed. You can either call this getter from your instance:
let banks = await bankly.bankList
Or use the static getter directly (no class instancing needed):
let banks = await Bankly.bankList
This getter returns a JSON array. You can also perform this request using your browser by clicking here.
You can define a function that receives debug logs (as strings) from your instance of the class.
bankly.debug = console.log
You can use these functions to direct call the API without having to care about the authorization step:
bankly._get()
bankly._post()
bankly._postJSON()
All these functions receive three arguments:
_get()
, as URLEncoded body for _post()
or as JSON-encoded body for _postJSON()
.These functions return a promise that resolve to a JSON object, decoded from the API response.
FAQs
Javascript bindings for Acesso Bankly API
We found that bankly demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
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.
Research
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.