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

msfeldstein-airdrop-script

v1.0.3

Published

Implementation of a proposed protocol for airdropping stellar assets to accounts that may not have trustlines or even exist yet.

Readme

Implementation of a proposed protocol for airdropping stellar assets to accounts that may not have trustlines or even exist yet.

➜  airdrop-script git:(master) npx msfeldstein-airdrop-script
transfer.js: Exhibit transfer of non-native assets to various accounts:
  - Account with a trustline (trivial)
  - Account with funds but no trustline
  - Account with no funds and no trustline
  - User with no account

  We will create an issuer account, and exhibit sending the ABC asset to these account types
[Anchor] Creating Issuer account GCGDPZWUQ4SFQ355N7IWAELCDMVT5B2KPJPWMGK55WORVVZ62MCUNKYJ
[Wallet] Creating a funded account without a trustline to the requested asset
[Wallet] Generated account GD36QNEWKR7C4M3B7S4YRW2KISOM77D2IPGKE5A54MLF6VQ67D6MDK6U
[Wallet] Funding account
>>> Wallet Account Before Request
┌───────────┬────────┐
│  (index)  │ Values │
├───────────┼────────┤
│   asset   │ 'ABC'  │
│  amount   │   0    │
│ trustline │ false  │
└───────────┴────────┘
[Anchor] Received asset request from account GD36QNEWKR7C4M3B7S4YRW2KISOM77D2IPGKE5A54MLF6VQ67D6MDK6U
[Anchor] Generated intermediate account keys GDWSKZZRF2L23AI7DEDQU44GWYJ6S5WQFVYVQLKCHDD2WUYK4ZW35V6O
[Anchor] Sending transaction with ops:
[Anchor]   ----------
[Anchor]   Creating the intermediate account with a starting balance of 4 lumens to cover the reserve, trustline, future merge payment to the users main account, and possible account creation if the user doesn't have an account created yet
[Anchor]   createAccount
[Anchor]     destination: "GDWSKZZRF2L23AI7DEDQU44GWYJ6S5WQFVYVQLKCHDD2WUYK4ZW35V6O"
[Anchor]     startingBalance: "4"
[Anchor]   ----------
[Anchor]   Adding the trustline to the intermediate account
[Anchor]   changeTrust
[Anchor]     asset: {"code":"ABC","issuer":"GCGDPZWUQ4SFQ355N7IWAELCDMVT5B2KPJPWMGK55WORVVZ62MCUNKYJ"}
[Anchor]     amount: "100"
[Anchor]     source: "GDWSKZZRF2L23AI7DEDQU44GWYJ6S5WQFVYVQLKCHDD2WUYK4ZW35V6O"
[Anchor]   ----------
[Anchor]   Sending the assets to be transfered into the intermediate account
[Anchor]   payment
[Anchor]     destination: "GDWSKZZRF2L23AI7DEDQU44GWYJ6S5WQFVYVQLKCHDD2WUYK4ZW35V6O"
[Anchor]     asset: {"code":"ABC","issuer":"GCGDPZWUQ4SFQ355N7IWAELCDMVT5B2KPJPWMGK55WORVVZ62MCUNKYJ"}
[Anchor]     amount: "100"
[Anchor]   ----------
[Anchor]   Removing the anchors signing power over the intermediate account, and replacing that signer with the final destination account
[Anchor]   setOptions
[Anchor]     source: "GDWSKZZRF2L23AI7DEDQU44GWYJ6S5WQFVYVQLKCHDD2WUYK4ZW35V6O"
[Anchor]     masterWeight: 0
[Anchor]     signer: {"ed25519PublicKey":"GD36QNEWKR7C4M3B7S4YRW2KISOM77D2IPGKE5A54MLF6VQ67D6MDK6U","weight":1}
[Anchor]   ----------
[Anchor] Transaction succeded
[Wallet] Listening for accounts where i am a signer via Horizon's accounts-for-signer endpoint
[Wallet] Found claimable account: GDWSKZZRF2L23AI7DEDQU44GWYJ6S5WQFVYVQLKCHDD2WUYK4ZW35V6O
[Wallet] Merge the temporary account created by the anchor for me into my main account
[Wallet] The main account exists, we need to check if it needs a trustline or already has one.
[Wallet] Sending transaction with ops:
[Wallet]   ----------
[Wallet]   The main account needs a trustline. We need to ensure it has enough lumens for one offer and one trustline so we give it 0.5xlm
[Wallet]   payment
[Wallet]     asset: {"code":"XLM"}
[Wallet]     amount: "1.0"
[Wallet]     source: "GDWSKZZRF2L23AI7DEDQU44GWYJ6S5WQFVYVQLKCHDD2WUYK4ZW35V6O"
[Wallet]     destination: "GD36QNEWKR7C4M3B7S4YRW2KISOM77D2IPGKE5A54MLF6VQ67D6MDK6U"
[Wallet]   ----------
[Wallet]   Add the trustline to the main account to enable the following payment of the asset
[Wallet]   changeTrust
[Wallet]     asset: {"code":"ABC","issuer":"GCGDPZWUQ4SFQ355N7IWAELCDMVT5B2KPJPWMGK55WORVVZ62MCUNKYJ"}
[Wallet]     source: "GD36QNEWKR7C4M3B7S4YRW2KISOM77D2IPGKE5A54MLF6VQ67D6MDK6U"
[Wallet]   ----------
[Wallet]   Move the actual assets from the intermediate account into the main account
[Wallet]   payment
[Wallet]     asset: {"code":"ABC","issuer":"GCGDPZWUQ4SFQ355N7IWAELCDMVT5B2KPJPWMGK55WORVVZ62MCUNKYJ"}
[Wallet]     destination: "GD36QNEWKR7C4M3B7S4YRW2KISOM77D2IPGKE5A54MLF6VQ67D6MDK6U"
[Wallet]     amount: "100"
[Wallet]   ----------
[Wallet]   Remove the trustline of the asset from the intermediate account so it can be merged to the main account
[Wallet]   changeTrust
[Wallet]     asset: {"code":"ABC","issuer":"GCGDPZWUQ4SFQ355N7IWAELCDMVT5B2KPJPWMGK55WORVVZ62MCUNKYJ"}
[Wallet]     limit: "0"
[Wallet]   ----------
[Wallet]   Merge the intermediate account into the main account to absorb any leftover lumens
[Wallet]   accountMerge
[Wallet]     destination: "GD36QNEWKR7C4M3B7S4YRW2KISOM77D2IPGKE5A54MLF6VQ67D6MDK6U"
[Wallet]   ----------
[Wallet] Transaction succeded
>>> Wallet Account After Merge
┌───────────┬───────────────┐
│  (index)  │    Values     │
├───────────┼───────────────┤
│   asset   │     'ABC'     │
│  amount   │ '100.0000000' │
│ trustline │     true      │
└───────────┴───────────────┘
Issuer account: https://stellar.expert/explorer/testnet/account/GCGDPZWUQ4SFQ355N7IWAELCDMVT5B2KPJPWMGK55WORVVZ62MCUNKYJ
Claimed account: https://stellar.expert/explorer/testnet/account/GDWSKZZRF2L23AI7DEDQU44GWYJ6S5WQFVYVQLKCHDD2WUYK4ZW35V6O
Wallet account https://stellar.expert/explorer/testnet/account/GD36QNEWKR7C4M3B7S4YRW2KISOM77D2IPGKE5A54MLF6VQ67D6MDK6U