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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@warp-toad/backend

v0.0.4

Published

see: https://github.com/warptoad/warp-toad/blob/npm-package-demo/backend/test/testAztecToL1.ts

Downloads

17

Readme

how to use

see: https://github.com/warptoad/warp-toad/blob/npm-package-demo/backend/test/testAztecToL1.ts

and: https://github.com/warptoad/warp-toad/blob/npm-package-demo/backend/scripts/dev_op/bridge.ts

ex:

//TODO test this
import { GIGA_TREE_DEPTH } from "warp-toad-old-backend/constants";
import { EVM_TREE_DEPTH, gasCostPerChain } from "warp-toad-old-backend/constants";
import { hashCommitment, hashPreCommitment } from "warp-toad-old-backend/hashing";
import { calculateFeeFactor, createProof, getMerkleData, getProofInputs } from "warp-toad-old-backend/proving";
import { sendGigaRoot, bridgeAZTECLocalRootToL1, parseEventFromTx, updateGigaRoot, receiveGigaRootOnAztec, bridgeBetweenL1AndL2 } from "warp-toad-old-backend/bridging";

import { getL1Contracts, getL2Contracts, getAztecTestWallet } from 'warp-toad-old-backend/deployment';
import { getLocalRootProviders, getPayableGigaRootRecipients, bridgeBetweenL1AndL2, sleep } from 'warp-toad-old-backend/bridging';


const l1Provider = new ethers.JsonRpcProvider(args.L1Rpc);
const l1Wallet = new ethers.Wallet(args.evmPrivatekey, l1Provider);

const l1ChainId = (await l1Provider.getNetwork()).chainId


const { L1Adapter, gigaBridge, l1Warptoad } = await getL1Contracts(l1ChainId, l2ChainId as bigint, l1Wallet, isAztec)
//const { L2Adapter, L2WarpToad } = await getL2Contracts(l2Wallet,l1ChainId, l2ChainId, isAztec, PXE as PXE, AZTEC_NODE_URL)

const amount = 100n
//wrap it 
await (await l1Warptoad.wrap(amount)).wait(1)

const commitmentPreImg = {
    amount: amount,
    destination_chain_id: tempFakeChainIdAztec,
    secret: 1234n,              // Use Fr.random().toBigInt() pls
    nullifier_preimg: 4321n,    // Use Fr.random().toBigInt() pls
}
const preCommitment = hashPreCommitment(commitmentPreImg.nullifier_preimg, commitmentPreImg.secret, commitmentPreImg.destination_chain_id)
await (await l1Warptoad.burn(commitmentPreImg, commitmentPreImg.amount)).wait(1)

const feeFactor = 0                                                     // will skip relayer logic (cant be 1)
const evmRelayerAddress = "0x0000000000000000000000000000000000000001"  // circuit excepts anything but address(0x00)
const priorityFee = 1                                                   // circuit excepts anything but 0
const proofInputs = await getProofInputs(
    gigaBridge,
    l1Warptoad,
    l1Warptoad,
    amount,
    feeFactor,
    priorityFee,
    maxFee,
    evmRelayerAddress,
    await l1Wallet.getAddress(),
    commitmentPreImg.nullifier_preimg,
    commitmentPreImg.secret,
)

const mintTx = await (await L1WarpToadWithRelayer.mint(
    ethers.toBigInt(proofInputs.nullifier),
    ethers.toBigInt(proofInputs.amount),
    ethers.toBigInt(proofInputs.giga_root),
    ethers.toBigInt(proofInputs.destination_local_root),
    ethers.toBigInt(proofInputs.fee_factor),
    ethers.toBigInt(proofInputs.priority_fee),
    ethers.toBigInt(proofInputs.max_fee),
    ethers.getAddress(proofInputs.relayer_address.toString()),
    ethers.getAddress(proofInputs.recipient_address.toString()),
    ethers.hexlify(proof.proof),
    {
        maxPriorityFeePerGas: ethers.toBigInt(proofInputs.priority_fee),
        maxFeePerGas: ethers.toBigInt(proofInputs.priority_fee) * 100n //Otherwise HRE does the gas calculations wrong to make sure we don't get `max_priority_fee_per_gas` greater than `max_fee_per_gas
    }
)).wait(1)