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

@pizzaton/pizzabox

v1.0.2

Published

Typescript sdk to interact with PizzaBox (PizzaTon Jetton Locker Service on TON blockchain)

Downloads

85

Readme

PizzaBox - Jetton Locker on TON

Typescript sdk to interact with PizzaBox (PizzaTon Jetton Locker Service on TON blockchain)

PizzaBox Collection on GetGems.io PizzaBox Lock Interface

PizzaTon's innovative Smart Locking feature goes beyond simply securing your assets. It's a powerful tool that empowers you to unlock exclusive benefits, all while keeping your Jettons or LP tokens safe.

Here's how it works:

Effortless Locking: Seamlessly lock your Jettons or LP tokens for a predetermined period. Our user-friendly interface makes the process a breeze.

Security at Its Core: Rest assured, your assets are safe and sound during the lock-in period. PizzaTon leverages robust security measures to ensure your holdings are protected.

The Power of SBTs (Soulbound Tokens): This is where things get exciting! Each lock record is uniquely represented by an SBT, a special type of NFT. Unlike traditional NFTs, SBTs are non-transferrable. This creates a secure and verifiable record of your locked assets.

How to use?

Install @pizzaton/pizzabox dependency using the command below:

npm install @pizzaton/pizzabox

Import it:

import {PizzaBox} from "@pizzaton/pizzabox";

Use one of these methods based on your case:

1. Locking Jettons (Currently the locker only supports discoverable jettons v1 and v2)

To use mintless jettons you should implement claim part on your side before transferring jettons to the PizzaBox factory

Now it's time to call getLockTxParams to get transaction parameters. You can use TonConnectUI or TonWeb to send the transaction created based on these params.

Note: Do not forget to set referralAddress to your own wallet address to receive 50% referral reward from platform's commission. Currently, you will receive 0.25 TON for each successful Lock that comes from you.

2. Unlock User's Jettons (Claim Locked Jettons):

You can force unlock user's jetton from a specific lock SBT. But it is better to check if the user is able to unlock or not to avoid unnecessary transactions.

Call getUnlockTxParams with the address of lock record SBT as input. You will get TxParams (including dest, amount, payload) in return.

payload is going to be BOC buffer in all TxParams.

3. Get Lock Record Data:

To check a record's status you can call getLockDetails and you will receive all information about the record.

Important Data you will get in return:

ownerAddress: Wallet address of record's owner jettonMinterAddress: Minter address of the locked jetton lockedJettons: Total Locked Jettons jettonsLocked?: Were jettons already transferred to this smc? (bool) claimedTimes: number of unlocks withdrawn jettons (uint32) claimedJettons: total amount of withdrawn jettons (coins) firstUnlockTime: timestamp of the first unlock (uint32) firstUnlockSize: size of the first unlock in percents (uint32) cycleLength: time between unlocks in seconds (uint32) cycleNumber: number of unlocks excluding initial (uint32)