1.0.2 • Published 8 months ago

@pizzaton/pizzabox v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

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)

1.0.2

8 months ago

1.0.1

9 months ago

1.0.0

9 months ago