Giter Site home page Giter Site logo

helpers's People

Contributors

coachchuckff avatar druspencer avatar jim4067 avatar mikemaccana avatar nickfrosty avatar zyjliu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

helpers's Issues

Cannot find module '@solana-developers/helpers' or its corresponding type declarations

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"

Add a way to load or create a keypair as necessary

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.

Make a single airdrop functions that *always* expects a minimum balance.

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.