solana-developers / helpers Goto Github PK
View Code? Open in Web Editor NEWJS/TS helpers for Solana
Home Page: https://www.npmjs.com/package/@solana-developers/helpers
JS/TS helpers for Solana
Home Page: https://www.npmjs.com/package/@solana-developers/helpers
@nickfrosty mentioned earlier this morning.
As part of this tutorial https://www.soldev.app/course/intro-to-writing-data there is this line
import { getKeypairFromEnvironment, airdropIfRequired } from "@solana-developers/helpers";
after adding/install with npm i @solana-developers/helpers
I still get the following error reported by vscode
Cannot find module '@solana-developers/helpers' or its corresponding type declarations
and when running the ts file
Could not resolve "@solana-developers/helpers"
Even though I can see the package in "node_modules/@solana-developers/helpers"
See https://x.com/stegaBOB/status/1769732575508242742
Q. you don't add any buffer?
A. I think right now we have it as 1.2x the usage, clamped between 25k and 100k extra. For the sake of simplicity I didn't in that example. Left a comment that one should probably be added. Maybe I should be more explicit though ๐คทโโ๏ธ
We may want to include this in code.
From @nickfrosty:
helpers idea: loadOrCreateKeypair
accepts an env var name of file path name
if file path provided, attempt to load it or generate/save a fresh one to that path
when a new keypair is generated:
optional flag to auto airdrop it
same thing for env var. if it exists, load it. if it does not generate/save it
MM: similar to https://github.com/Unboxed-Software/solana-cnft-demo/blob/starter/src/utils.ts#L24 used in the course for compressed NFTs, which would support making this.
Nick and I were talking and we both like this:
We want to avoid people bothering the faucet unnecessarily but still make sure they can get devnet SOL when needed.
We could make requestAndConfirmAirdropIfRequired() the default technique.
Eg, requestAndConfirmAirdrop() is the only function that gets airdrops, always expects a balance in the function signature. So people, without thinking about it, never actually sends a request for devnet SOL when they don't need any.
Will be a breaking change so will bump to version 2 when I do.
See #1 (comment)
See https://gist.github.com/stegaBOB/7c0cdc916db4524dd9c285f9e4309475#file-optimaltransaction-ts-L3 -
from Sammy Harris stegaBOB from magic Eden
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.