npm.io
1.0.0 • Published 4 years ago

solana-account-loader

Licence
MIT
Version
1.0.0
Deps
1
Size
8 kB
Vulns
0
Weekly
0
Stars
1

solana-account-loader

Simple package for loading solana accounts via getMultipleAccounts in a more fancy way

Usage:

const batchSize = 100; // number of accounts to pass in a single getMultipleAccounts request
const pollInterval = 10; // time in ms to store keys in queue before requests
let loader = new AccountLoader(conn, batchSize, pollInterval);

let infos = await Promise.all(
  keys.map(async key => loader.load(key))
);

Keywords