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

avm-satoshi-dice

v1.0.6

Published

The npm provides the generated client which communicates with the smart contract of AVM Satoshi Dice

Readme

AVMSatoshiDice

This project has been generated using AlgoKit. See below for default getting started instructions.

Setup

Pre-requisites

For interactive tour over the codebase, download vsls-contrib.codetour extension for VS Code, then open the .codetour.json file in code tour extension.

Initial Setup

1. Clone the Repository

Start by cloning this repository to your local machine.

2. Install Pre-requisites

Ensure the following pre-requisites are installed and properly configured:

  • Docker: Required for running a local Algorand network.
  • AlgoKit CLI: Essential for project setup and operations. Verify installation with algokit --version, expecting 2.6.0 or later.

3. Bootstrap Your Local Environment

Run the following commands within the project folder:

  • Setup Project: Execute algokit project bootstrap all to install dependencies and setup npm dependencies.
  • Configure environment: Execute algokit generate env-file -a target_network localnet to create a .env.localnet file with default configuration for localnet.
  • Start LocalNet: Use algokit localnet start to initiate a local Algorand network.

Development Workflow

Terminal

Directly manage and interact with your project using AlgoKit commands:

  1. Build Contracts: algokit project run build compiles all smart contracts. You can also specify a specific contract by passing the name of the contract folder as an extra argument. For example: algokit project run build -- hello_world will only build the hello_world contract.
  2. Deploy: Use algokit project deploy localnet to deploy contracts to the local network. You can also specify a specific contract by passing the name of the contract folder as an extra argument. For example: algokit project deploy localnet -- hello_world will only deploy the hello_world contract.

VS Code

For a seamless experience with breakpoint debugging and other features:

  1. Open Project: In VS Code, open the repository root.
  2. Install Extensions: Follow prompts to install recommended extensions.
  3. Debugging:
    • Use F5 to start debugging.

JetBrains IDEs

While primarily optimized for VS Code, JetBrains IDEs are supported:

  1. Open Project: In your JetBrains IDE, open the repository root.
  2. Automatic Setup: The IDE should configure the Node.js environment.
  3. Debugging: Use Shift+F10 or Ctrl+R to start debugging. Note: Windows users may encounter issues with pre-launch tasks due to a known bug. See JetBrains forums for workarounds.

AlgoKit Workspaces and Project Management

This project supports both standalone and monorepo setups through AlgoKit workspaces. Leverage algokit project run commands for efficient monorepo project orchestration and management across multiple projects within a workspace.

AlgoKit Generators

This template provides a set of algokit generators that allow you to further modify the project instantiated from the template to fit your needs, as well as giving you a base to build your own extensions to invoke via the algokit generate command.

Generate Smart Contract

By default the template creates a single HelloWorld contract under avm_satoshi_dice folder in the smart_contracts directory. To add a new contract:

  1. From the root of the project (../) execute algokit generate smart-contract. This will create a new starter smart contract and deployment configuration file under {your_contract_name} subfolder in the smart_contracts directory.
  2. Each contract potentially has different creation parameters and deployment steps. Hence, you need to define your deployment logic in deploy-config.ts file.
  3. Technically, you need to reference your contract deployment logic in the index.ts file. However, by default, index.ts will auto import all TypeScript deployment files under smart_contracts directory. If you want to manually import specific contracts, modify the default code provided by the template in index.ts file.

Please note, above is just a suggested convention tailored for the base configuration and structure of this template. The default code supplied by the template in the index.ts file is tailored for the suggested convention. You are free to modify the structure and naming conventions as you see fit.

Generate '.env' files

By default the template instance does not contain any env files to deploy to different networks. Using algokit project deploy against localnet | testnet | mainnet will use default values for algod and indexer unless overwritten via .env or .env.{target_network}.

To generate a new .env or .env.{target_network} file, run algokit generate env-file

Debugging Smart Contracts

This project is optimized to work with AlgoKit AVM Debugger extension. To activate it:

Refer to the commented header in the index.ts file in the smart_contracts folder.Since you have opted in to include VSCode launch configurations in your project, you can also use the Debug TEAL via AlgoKit AVM Debugger launch configuration to interactively select an available trace file and launch the debug session for your smart contract.

For information on using and setting up the AlgoKit AVM Debugger VSCode extension refer here. To install the extension from the VSCode Marketplace, use the following link: AlgoKit AVM Debugger extension.### Continuous Integration / Continuous Deployment (CI/CD)

This project uses GitHub Actions to define CI/CD workflows, which are located in the .github/workflows folder.

Please note, if you instantiated the project with --workspace flag in algokit init it will automatically attempt to move the contents of the .github folder to the root of the workspace.

AlgoKit Workspaces

To define custom algokit project run commands refer to documentation. This allows orchestration of commands spanning across multiple projects within an algokit workspace based project (monorepo).

Setting up GitHub for CI/CD workflow and TestNet deployment

  1. Every time you have a change to your smart contract, and when you first initialize the project you need to build the contract and then commit the smart_contracts/artifacts folder so the output stability tests pass
  2. Decide what values you want to use for the allowUpdate and allowDelete parameters specified in deploy-config.ts. When deploying to LocalNet these values are both set to true for convenience. But for non-LocalNet networks they are more conservative and use false These default values will allow the smart contract to be deployed initially, but will not allow the app to be updated or deleted if is changed and the build will instead fail. To help you decide it may be helpful to read the AlgoKit Utils app deployment documentation or the AlgoKit smart contract deployment architecture.
  3. Create a Github Environment named Test. Note: If you have a private repository and don't have GitHub Enterprise then Environments won't work and you'll need to convert the GitHub Action to use a different approach. Ignore this step if you picked Starter preset.
  4. Create or obtain a mnemonic for an Algorand account for use on TestNet to deploy apps, referred to as the DEPLOYER account.
  5. Store the mnemonic as a secret DEPLOYER_MNEMONIC in the Test environment created in step 3.
  6. The account used to deploy the smart contract will require enough funds to create the app, and also fund it. There are two approaches available here:
    • Either, ensure the account is funded outside of CI/CD. In Testnet, funds can be obtained by using the Algorand TestNet dispenser and we recommend provisioning 50 ALGOs.
    • Or, fund the account as part of the CI/CD process by using a DISPENSER_MNEMONIC GitHub Environment secret to point to a separate DISPENSER account that you maintain ALGOs in (similarly, you need to provision ALGOs into this account using the TestNet dispenser).

Continuous Integration

For pull requests and pushes to main branch against this repository the following checks are automatically performed by GitHub Actions:

  • NPM dependencies are audited using better-npm-audit
  • Code formatting is performed using Prettier
  • Linting is checked using ESLint
  • The base framework for testing is vitest, and the project includes two separate kinds of tests:
    • Algorand TypeScript smart contract unit tests, that are run using algorand-typescript-testing, which are executed in a Node.js intepreter emulating major AVM behaviour
    • End-to-end (e2e) AppClient tests that are run against algokit localnet and test the behaviour in a real network environment
  • Smart contract artifacts are built
  • Smart contract artifacts are checked for output stability.
  • Smart contract is deployed to a AlgoKit LocalNet instance

NOTE: By default smart contract artifacts are compiled with --debug-level set to 0, to change this, modify the compiler invocation under the build script in package.json

Continuous Deployment

For pushes to main branch, after the above checks pass, the following deployment actions are performed:

  • The smart contract(s) are deployed to TestNet using AlgoNode.

Please note deployment is also performed via algokit deploy command which can be invoked both via CI as seen on this project, or locally. For more information on how to use algokit deploy please see AlgoKit documentation.

Tools

This project makes use of Algorand TypeScript to build Algorand smart contracts. The following tools are in use:

  • Algorand - Layer 1 Blockchain; Developer portal, Why Algorand?
  • AlgoKit - One-stop shop tool for developers building on the Algorand network; docs, intro tutorial
  • Algorand TypeScript - A semantically and syntactically compatible, typed TypeScript language that works with standard TypeScript tooling and allows you to express smart contracts (apps) and smart signatures (logic signatures) for deployment on the Algorand Virtual Machine (AVM); docs, examples
  • AlgoKit Utils - A set of core Algorand utilities that make it easier to build solutions on Algorand.
  • NPM: TypeScript packaging and dependency management.
  • TypeScript: Strongly typed programming language that builds on JavaScript
  • ts-node-dev: TypeScript development execution environment- Prettier: A code formatter.- ESLint: A JavaScript / TypeScript linter.
  • vitest: Automated testing.
  • better-npm-audit: Tool for scanning JavaScript / TypeScript environments for packages with known vulnerabilities.
  • pre-commit: A framework for managing and maintaining multi-language pre-commit hooks, to enable pre-commit you need to run pre-commit install in the root of the repository. This will install the pre-commit hooks and run them against modified files when committing. If any of the hooks fail, the commit will be aborted. To run the hooks on all files, use pre-commit run --all-files.

It has also been configured to have a productive dev experience out of the box in VS Code, see the .vscode folder.

It has also been configured to have a productive dev experience out of the box in Jetbrains IDEs, see the .idea folder.