Socket
Book a DemoInstallSign in
Socket

glasseater

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glasseater

Tools that [eat glass](https://www.theblockcrypto.com/post/123515/solana-labs-ceo-part-of-our-culture-is-to-eat-glass) so you don't have to.

latest
Source
npmnpm
Version
0.2.8
Version published
Maintainers
1
Created
Source

GlassEater

Tools that eat glass so you don't have to.

glass eating

Docs coming soon...

Features

  • generates the most precise and optimal getProgramAccounts queries possible
  • automatically batches queries
  • autocompletes and type checks everything it possibly can
  • enables advanced local filtering
  • accepts custom borsh deserializers and fetch functions
  • zero dependencies (for the time being)

Installation

(npm|pnpm|yarn) add glasseater @solana/web3.js

Usage

import { AccountsQuery } from "glasseater";

const proposalsQuery = new AccountsQuery(SCHEMA, Proposal);

proposalsQuery
  .for(programId)
  .select(["config"])
  .where({
    accountType,
    realm: new PublicKey(realmId),
  });

const proposals = await proposalsQuery.fetch();

Wishlist

  • tests
  • anchor IDL support
  • joins
  • simpler interface
  • caching and deduplication*

* like swr, but this and batching might be better handled with a service worker

FAQs

Package last updated on 19 Jan 2022

Did you know?

Socket

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.

Install

Related posts