
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@bandada/utils
Advanced tools
General Bandada utility functions.
This package provides simple utility functions that can be used by Bandada itself or externals. |
---|
Install the @bandada/utils
package with npm:
npm i @bandada/utils
or yarn:
yarn add @bandada/utils
# request(url: string, config?: AxiosRequestConfig): Promise<any>
Makes a request using Axios.
import { request } from "@bandada/utils"
const url = "https://api.bandada.pse.dev/groups"
const config = {
headers: {
"Content-Type": "application/json"
},
baseURL: "https://api.bandada.pse.dev"
}
const group = await request(url, config)
# shortenAddress(address: string, chars: number): string
Returns a shorter address.
import { shortenAddress } from "@bandada/utils"
const address = shortenAddress("0x1234567890123456789012345678901234567890")
# getProvider(network: Network, apiKey?: string): JsonRpcProvider
Returns the provider to communicate with the blockchain.
import { getProvider } from "@bandada/utils"
const provider = getProvider("localhost")
# getContract(contractName: ContractName, network: Network, privateKeyOrSigner?: string | Signer, apiKey?: string): Contract
Returns an Ethers contract.
import { getContract } from "@bandada/utils"
const contractName = "Semaphore"
const network = "localhost"
const contract = getContract(contractName, network)
# getSemaphoreContract(network: Network, privateKeyOrSigner?: string | Signer, apiKey?: string): SemaphoreContract
Returns a new instance of the SemaphoreContract class.
import { getSemaphoreContract } from "@bandada/utils"
const semaphore = getSemaphoreContract("localhost")
# getBandadaContract(network: Network, privateKeyOrSigner?: string | Signer, apiKey?: string): BandadaContract
Returns a new instance of the BandadaContract class.
import { getBandadaContract } from "@bandada/utils"
const bandada = getBandadaContract("localhost")
# getWallet(privateKey: string, network?: Network, apiKey?: string): JsonRpcProvider
Returns an Ethers wallet.
import { getWallet } from "@bandada/utils"
const privateKey =
"0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
const wallet = getWallet(privateKey)
# getContractAddresses(networkName: Network): { Bandada: string, Semaphore: string, BandadaSemaphore: string }
Returns the contract addresses for the Bandada, Semaphore and BandadaSemaphore smart contracts.
import { getContractAddresses } from "@bandada/utils"
const addresses = getContractAddresses("sepolia")
# blockchainCredentialSupportedNetworks
Returns the list of supported blockchain networks.
import { blockchainCredentialSupportedNetworks } from "@bandada/utils"
const networks = blockchainCredentialSupportedNetworks
const id = blockchainCredentialSupportedNetworks.find("sepolia")
const name = blockchainCredentialSupportedNetworks.find("Sepolia")
# easCredentialSupportedNetworks
Returns the list of supported EAS attestations networks. List of supported networks can be found here.
import { easCredentialSupportedNetworks } from "@bandada/utils"
const networks = easCredentialSupportedNetworks
const id = easCredentialSupportedNetworks.find("sepolia")
const name = easCredentialSupportedNetworks.find("Ethereum (Sepolia)")
FAQs
General Bandada utility functions.
The npm package @bandada/utils receives a total of 18 weekly downloads. As such, @bandada/utils popularity was classified as not popular.
We found that @bandada/utils demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.