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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@thebettermint/xrpl-auto-funder

v0.0.5

Published

A package to programmically fund xrpl accounts using public faucets

Downloads

4

Readme

xrpl-auto-funder

A package to programmically fund xrpl accounts using public faucets

Getting Started

To get started using this project, install the node package into your project

npm install @thebettermint/xrpl-auto-funder
yarn add @thebettermint/xrpl-auto-funder

Methods

xrplFunder

import xrplFunder from '@thebettermint/xrpl-auto-funder';

let response = await xrplFunder(params);

// Logging response
console.log(response);

Options

params = {
    publicAddress?: String, // Valid "r....." xrpl address to send funds.
    destinationTag?: Number, // Destination tag for xrpl address to send funds.
    xAddress?: String, // Valid "x....." xrpl address to send funds. If provided, publicAddress and destinationTag parameters are not required.
    amount?: String, // Amount to send from the faucet accounts. If left balance, the maximum amount will be sent from the faucet account.
    network?: String || String[], // Define a network to send the funds. If blank, funds will be send on all of the available networks
    // Format and all eligible networks => [ 'testnet', 'devnet', 'nft', 'hooks']
}

generateFundedWallet

import { generateFundedWallet } from '@thebettermint/xrpl-auto-funder';

let response = await generateFundedWallet(network);

// Logging response
console.log(response);

Options

network: String;
// Available options -> 'testnet', 'devnet', 'nft', 'hooks'

generateAllFundedWallets

import { generateAllFundedWallets } from '@thebettermint/xrpl-auto-funder';

let response = await generateAllFundedWallets();

// Logging response
console.log(response);

Examples

import xrplFunder from '@thebettermint/xrpl-auto-funder';

const main = async () => {
  let response = await xrplFunder({
    xAddress: 'T7AhgLLKhQDifNt8FceQ8P6RXFmeoQBLKjTGYaqZnUW5AC7',
    network: 'testnet',
  });
  console.log(response);
};

main();

See more examples here

Unit Testing

There are available unit test scripts. Below are the available test scripts and descripts, respectively.

  "scripts": {
    "jest": "jest",
    "jest:no-network": "jest -t 'funder no-network'",
    "jest:testnet": "jest -t 'funder no-network'",
    "jest:nft": "jest -t 'funder no-network'",
    "jest:devnet": "jest -t 'funder no-network'",
    "jest:xaddress": "jest -t 'funder no-network'",
    "jest:single": "jest -t 'generate single'",
    "jest:genAll": "jest -t 'generate all'",
  },
  "scriptsComments": {
    "jest": "Run all unit tests",
    "jest:no-network": "Runs single test with no network defined",
    "jest:testnet": "Runs single test with testnet",
    "jest:nft": "Runs single test with nft devnet",
    "jest:devnet": "Runs single test with devnet",
    "jest:xaddress": "Runs single test with xaddress",
    "jest:single": "Run single test to check the faucet endpoint",
    "jest:genAll": "Run single test to check all faucet endpoints"
  },

Contributing

Pull requests for new features, bug fixes, and suggestions are welcome! Please create an issue for discussion before working on a substantial change. CONTRIBUTING.md

License

GPL-3.0

Copyright 2022 thebettermint The GNU General Public License is a free, copyleft license for software and other kinds of works.

Copyright (C) 2007 Free Software Foundation, Inc. https://fsf.org/ Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.