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 🙏

© 2026 – Pkg Stats / Ryan Hefner

flow-bridge

v1.0.6

Published

``` import { FlowBridge } from 'flow-bridge';

Readme

Initialization

import { FlowBridge } from 'flow-bridge';

const bridge = new FlowBridge("https://access-mainnet-beta.onflow.org");

Flow Bridge Api

Get events for block range

bridge.getEventsForHeightRange(options: {
    bottom: number;
    top: number;
    type: string;
}): Promise<EventsResponse.AsObject>

Execute a script

bridge.executeScript<T extends Type = Void>(options: {
    script: string;
    args: Type[];
}): Promise<T> 

Ping the chain

bridge.ping(): Promise<void>

Get latest block

bridge.getLatestBlock(option: {
    isSealed: boolean;
}): Promise<BlockResponse.AsObject> 

Get block by id

bridge.getBlockById(option: { id: string }): Promise<BlockResponse.AsObject>

Get block by height

bridge.getBlockByHeight(option: {
    height: number;
}): Promise<BlockResponse.AsObject>

Get account at block height

bridge.getAccountAtLatestBlock(option: {
    address: string;
}): Promise<AccountResponse.AsObject> 

Get transaction by id

getTransactionById(option: {
    id: string;
}): Promise<TransactionResponse.AsObject> 

Create a transaction

createTransaction(
    params: CreateTransactionParams
): Promise<Transaction>

Send a transaction

sendTransaction(
    createTransactionParams: CreateTransactionParams
): Promise<string>

Transaction types

interface TransactionSignature {
  address: string;
  keyId: number;
  signature: string;
}

interface TransactionSignatureCreator {
  address: string;
  keyId: number;
  signingFn: (message: string) => Promise<string>;
}

interface ProposalKey {
  address: string;
  keyId: number;
  sequenceNumber: number;
}

interface UnresolvedProposalKey {
  address: string;
  keyId: number;
}

interface TransactionPayload {
  script: string;
  arguments: Type[];
  referenceBlock: string;
  gasLimit: number;
  proposalKey: ProposalKey;
  payer: string;
  authorizers: string[];
}

interface TransactionEnvelope extends TransactionPayload {
  payloadSignatures: TransactionSignature[];
}

interface Transaction extends TransactionEnvelope {
  envelopeSignatures: TransactionSignature[];
}

interface CreateTransactionPayloadParams {
  script: string;
  arguments: Type[];
  referenceBlock?: string;
  gasLimit?: number;
  proposalKey: ProposalKey | UnresolvedProposalKey;
  payer: string;
  authorizers: string[];
}

interface CreateTransactionEnvelopeParams
  extends CreateTransactionPayloadParams {
  payloadSignatures: (TransactionSignature | TransactionSignatureCreator)[];
}

interface CreateTransactionParams
  extends CreateTransactionEnvelopeParams {
  envelopeSignatures: (TransactionSignature | TransactionSignatureCreator)[];
}

Type

The Type are based on the json-cadence syntax. Those are the types implemented right now:

interface Void {
  type: "Void";
}

interface Optional {
  type: "Optional";
  value: Type | null;
}

interface Bool {
  type: "Bool";
  value: boolean;
}

interface CString {
  type: "String";
  value: string;
}

interface Address {
  type: "Address";
  value: `0x${string}`;
}

interface Int {
  type: "Int";
  value: string;
}

interface Int8 {
  type: "Int8";
  value: string;
}

interface Int16 {
  type: "Int16";
  value: string;
}

interface Int32 {
  type: "Int32";
  value: string;
}

interface Int64 {
  type: "Int64";
  value: string;
}

interface Int128 {
  type: "Int128";
  value: string;
}

interface Int256 {
  type: "Int256";
  value: string;
}

interface Word8 {
  type: "Word8";
  value: string;
}

interface Word16 {
  type: "Word16";
  value: string;
}

interface Word32 {
  type: "Word32";
  value: string;
}

interface Word64 {
  type: "Word64";
  value: string;
}

interface CArray {
  type: "Array";
  value: Type[];
}

interface Dictionary {
  type: "Dictionary";
  value: { key: Type; value: Type }[];
}

Misc

Command for the improbable code gen

protoc \
    -I=protos \
    --plugin="protoc-gen-ts=./node_modules/.bin/protoc-gen-ts" \
    --js_out="import_style=commonjs,binary:lib-web/out_improbable" \
    --ts_out="service=grpc-web:lib-web/out_improbable" \
    protos/FlowInteractions.proto
protoc \
    -I=protos \
    --plugin="protoc-gen-ts=./node_modules/.bin/protoc-gen-ts" \
    --plugin=protoc-gen-grpc=./node_modules/.bin/grpc_tools_node_protoc_plugin \
    --js_out="import_style=commonjs,binary:out_improbable_node" \
    --ts_out="service=grpc-node:out_improbable_node" \
    --grpc_out="grpc_js:out_improbable_node" \
    protos/FlowInteractions.proto

Run the web version

npm run roll npm run web

Run the node version

npm run transpile npm start