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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@k-xo/blowfish-js

v1.0.7

Published

<p> <img title="Blowfish" src= "./assets/blowfishlogo.svg" width="350px"/> </p>

Downloads

11

Readme

Blowfish-js

Blowfish makes it easy to identify & stop fraud before it happens. Join the leading wallets protecting their users funds with the blowfish security engine. For more details on Blowfish, and for a full documentation reference, you can check https://blowfish.xyz/ and https://docs.blowfish.xyz/api-docs/ respectively.

Install

npm i @k-xo/blowfish-js

Setup

To setup a Blowfish instance, simply past your api key, which you can get from https://blowfish.xyz/, into the constructor, not some api keys only work for the 'free' blowfish url, the snippet below describes the differences in setup.

// If making requests to https://api.blowfish.xyz/
const blowfish = new Blowfish(API_KEY);

// If making requests to https://free.api.blowfish.xyz/
const blowfish = new Blowfish(API_KEY, 'sandbox');

Scanning a transaction

Scan transactions in order to receive recommended actions, tailored warnings and human-readable simulation results explaining what the transaction will do.

const tx_data = {
  transaction: {
    from: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045',
    to: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
    data: '0xa9059cbb000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000de0b6b3a7640000',
    value: '0',
  },
  dappUrl: 'https://scamsite.com',
  network: 'mainnet',
  chain: 'ethereum',
  userAccount: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045',
};
const response = await blowfish.scanTransaction(tx_data);

| Parameter | Type | Description | | ------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | chain | string | The chain which the transaction to be scanned is on, currently only Ethereum, Polygon and Solana are supported | | transaction | object | A transaction is an object which contains the from, to, value and data fields | | dappUrl | string | The domain of the web application requesting the transaction | | userAccount | string | The user account who is being asked to sign / execute the transaction | | network | string | The network of the chain being executed on, for Solana this can be 'mainnet, 'devnet', 'testnet, for Ethereum this can be 'mainnet' and 'goerli', for Polygon this can be 'mainnet' |

Scanning a Message

Currently in Beta, -- check here for the full API specification -- https://docs.blowfish.xyz/api-docs/reference/api-reference/scan-message/evm