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

@blessnetwork/bless-time-contract

v0.0.4

Published

A Solana program that manages the Bless token airdrop process, vault reserves, administrator governance, and Merkle tree–based eligibility verification. Built with Anchor.

Downloads

20

Readme

bls-time-contract

A Solana program that manages the Bless token airdrop process, vault reserves, administrator governance, and Merkle tree–based eligibility verification. Built with Anchor.

Features

  • Program State Initialization

    • Create and configure the Bless Time state account.

    • Create a secure token vault controlled by the program.

  • Administrator Management

    • Secure proposal and acceptance of new admin accounts.
  • Vault Management

    • Recharge vault with additional BLESS tokens.

    • Track recharge records.

  • Merkle Tree Airdrop

    • Off-chain generated Merkle root for participant eligibility.

    • On-chain proof verification to ensure only eligible users can claim.

    • Prevent duplicate claims with per-user claim records.

Instructions

1. initialize_bless_time_state

Creates the Bless Time State and its vault account.

Context: InitBlessTimeState Parameters:

  • bump: u8 – PDA bump for bls_time_state.

  • vault_bump: u8 – PDA bump for vault_account.

Flow:

  1. Creates bls_time_state PDA.

  2. Creates token vault_account PDA with bls_time_state as authority.

  3. Sets the admin to the payer.

2. set_pending_admin_account

Proposes a new admin account.

Context: BlsTimeProposeAdmin

Notes:

  • Callable only by the current admin_account.

  • Stores pending_admin in bls_time_state.

  • Rejects if proposed admin is the same as current or already pending.

3. accept_admin

Finalizes admin transfer.

Context: BlsTimeAcceptAdmin Notes:

Callable only by the pending_admin.

Updates admin_account to pending_admin.

Clears pending_admin after acceptance.

4. set_merkle_tree_root

Sets the Merkle root for airdrop eligibility.

Context: BlessTimeSetMerkleTreeRoot Parameters:

  • root: [u8; 32] – The new Merkle root.

Notes:

  1. Only callable by admin_account.

  2. Rejects default [0u8; 32] and unchanged roots.

5. recharge_vault_account

Transfers tokens into the program’s vault.

Context: InitVaultRechargeRecord Parameters:

amount: u64 – Number of tokens to transfer.

Flow:

  1. Uses CPI to SPL Token program.

  2. Transfers from recharge_account to vault_account.

6. bless_token_claim

Claims tokens via Merkle proof.

Context: BlsTokenClaim Parameters:

  • amount: u64 – Claim amount.

  • locked_time: i64 – Unix timestamp when claim can be made.

  • proof: Vec<[u8; 32]> – Merkle proof.

  • record_bump: u8 – PDA bump for user_claim_record.

Flow:

  1. Checks claim_paused flag.

  2. Verifies Merkle proof with payer address, amount, and locked time.

  3. Ensures vault has sufficient balance.

  4. Checks that the current block time ≥ locked_time.

  5. Creates user_claim_record PDA to prevent reclaims.

  6. Transfers tokens from vault to user via CPI with PDA signing.

Security

  • All admin-sensitive actions require correct signer checks.

  • Claim verification is backed by off-chain Merkle tree generation.

  • Duplicate claims prevented via PDA-bound UserClaimRecord.

  • Vault account is owned by program state PDA to prevent unauthorized transfers.