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

gamblix-sdk

v0.1.0

Published

Typescript SDK to interact with GambliX program.

Readme

spl-casino-dev-sdk

Installation

yarn add spl-casino-dev-sdk

Global

Load SDK wrappers

import { SplCasinoSDK, AdminWrapper } from "spl-casino-dev-sdk";
import { SolanaProvider } from "@saberhq/solana-contrib";

const wallet = useWallet();
const { connection } = useConnection();

const provider = SolanaProvider.init({
  connection,
  wallet: wallet as any,
  opts: {
    preflightCommitment: "finalized",
    commitment: "finalized",
  },
});
const splCasinoSDK = SplCasinoSDK.load({ provider });
const adminWrapper = new AdminWrapper(splCasinoSDK, wallet.publickKey.toString()); // wallet.publickKey should be String

Get global states - admin wrapper

  let info = await adminWrapper.getGlobalInfo();

Bot

import { SplCasinoSDK, BotWrapper } from "spl-casino-dev-sdk";
import { SolanaProvider } from "@saberhq/solana-contrib";

const wallet = useWallet();
const { connection } = useConnection();

const provider = SolanaProvider.init({
  connection,
  wallet: wallet as any,
  opts: {
    preflightCommitment: "finalized",
    commitment: "finalized",
  },
});
const splCasinoSDK = SplCasinoSDK.load({ provider });
const botWrapper = new BotWrapper(splCasinoSDK, wallet.publickKey.toString()); // wallet.publickKey should be String

유저, 유저칩 추가 및 칩 구매 - 봇 영력

첫 유저, 유저에 한해서 첫 칩구매 ( 유저가 직접 월렛으로 구매하는 케이스 ) Signer: 유저, 봇 Check diagram.xlsx

  const tx = await botWrapper.addUserAndCreateUserChipAndPurchase({
    depositTokenAmount,  // token amount; 예시: 3.412 USDC => 3.412
    userChipTokenMintAddressStr, 
  });

유저, 유저칩 추가 및 칩 구매 - 봇 영력

첫 유저, 유저에 한해서 첫 칩구매 ( 유저가 credit으로 칩을 구매하는 케이스 ) 먼저 유저가 이 RPC를 호출하고, 크레딧으로 구입 팝업을 띄운 후 유저입금이 완료되면 purchaseChipByCredit를 호출 해 주어야 함. Signer: 유저, 봇 Check diagram.xlsx

  const tx = await botWrapper.addUserAndCreateUserChip({
    userChipTokenMintAddressStr, 
  });

유저 추가 - 봇 영력

첫 유저, 유저에 한해서 첫 칩구매 유저가 첫 가입 시 유저를 추가해 주어야 하며 혹은 유저가 첫 칩 구매시 위의 함수를 호출 해 주어도 됨. Signer: 유저, 봇 Check diagram.xlsx

  const tx = await botWrapper.addUser({});

유저, 유저칩 추가 및 칩 구매 - 봇 영력

유저에 한해서 첫 칩구매 ( 유저가 직접 월렛으로 구매하는 케이스 ) Signer: 유저, 봇 Check diagram.xlsx

  const tx = await botWrapper.createUserChipAndPurchase({
    depositTokenAmount,  // token amount; 예시: 3.412 USDC => 3.412
    userChipTokenMintAddressStr, 
  });

유저, 유저칩 추가 및 칩 구매 - 봇 영력

유저에 한해서 첫 칩구매 ( 유저가 credit으로 칩을 구매하는 케이스 ) 먼저 유저가 이 RPC를 호출하고, 크레딧으로 구입 팝업을 띄운 후 유저입금이 완료되면 아래의 purchaseChipByCredit를 호출 해 주어야 함. Signer: 유저, 봇 Check diagram.xlsx

  const tx = await botWrapper.createUserChip({
    userChipTokenMintAddressStr, 
  });

칩 구매 - 봇 영력

유저에 한해서 첫 칩구매 ( 유저가 credit으로 칩을 구매하는 케이스 ) 유저입금이 완료되면 호출 Signer: 입금월렛, 봇 Check diagram.xlsx

  const tx = await botWrapper.purchaseChipByCredit({
    depositTokenAmount,   // token amount; 예시: 3.412 USDC => 3.412
    userWalletStr,
    userChipTokenMintAddressStr,
  });

칩 구매 - 봇 영력

이미 이 칩을 구매한 적이 있는 유저에 한해서 직접 이 함수를 호출하여 칩 구매 ( 유저가 직접 월렛으로 구매하는 케이스 ) 유저입금이 완료되면 호출 Signer: 유저, 봇 Check diagram.xlsx

  const tx = await botWrapper.purchaseChipByUser({
    depositTokenAmount,   // token amount; 예시: 3.412 USDC => 3.412
    userChipTokenMintAddressStr,
  });

유저, 유저칩 추가 및 칩 구매 - 봇 영력

유저가 게임방에 들어가기 전에 칩을 락 거는 부분 게임 진행 시에는 칩을 재구매 할 수 없음 룸을 나갔다가 다시 들어와야 함. Signer: 유저, 봇 Check diagram.xlsx

  const tx = await botWrapper.joinRoom({
    userChipTokenMintAddressStr, 
    playerChipTokenAmount, // token amount; 예시: 3.412 USDC => 3.412
  });

유저, 유저칩 추가 및 칩 구매 - 봇 영력

유저가 게임방에 들어가기 전에 칩을 락 거는 부분 게임 진행 시에는 칩을 재구매 할 수 없음 룸을 나갔다가 다시 들어와야 함. Signer: 관리자 혹은 봇 Check diagram.xlsx

  const tx = await botWrapper.setUserStatus({
    userWalletStr, 
    isUnblocked, // true: 해제 false: 차단
  });

플랫폼에서 이용중인 토큰의 리스트 - 봇 영력

Check diagram.xlsx

  const tx = await botWrapper.getPlatformChips();

플랫폼의 토큰 정보 - 봇 영력

Check diagram.xlsx

  const tx = await botWrapper.getPlatformChipInfo({
    chipTokenMintAddressStr
  });

User

import { SplCasinoSDK, UserWrapper } from "spl-casino-dev-sdk";
import { SolanaProvider } from "@saberhq/solana-contrib";

const wallet = useWallet();
const { connection } = useConnection();

const provider = SolanaProvider.init({
  connection,
  wallet: wallet as any,
  opts: {
    preflightCommitment: "finalized",
    commitment: "finalized",
  },
});
const splCasinoSDK = SplCasinoSDK.load({ provider });
const userWrapper = new UserWrapper(splCasinoSDK, wallet.publickKey.toString()); // wallet.publickKey should be String

언락 되어 있는 영력안에서 유저가 환전할 때 - 유저 영력

수수료는 플랫폼으로 회수 됨 chipTokenAmount는 수수료를 포함한 전액 - 유저에게서 차감되는 액 Signer: 유저, 봇

InsufficientChipAmount오류의 의미는 유저의 언락 된 양이 부족하다는 의미 Check diagram.xlsx [checklist] No.4

  const tx = await userWrapper.claimUserFund({
    userChipTokenMintAddressStr,
    chipTokenAmount,  // chip token amount; 예시: 3.412 USDC => 3.412
    feePercentage, // 1000 = 100%, 0 = free
  });

방에서 나올 때 호출 - 유저 영력

수수료가 있는 경우 뱅커에게 충전되고 나올 때 갖고 나오는 양(currentPlayerChipTokenAmount)은 수수료를 뺀 나머지 금액 currentPlayerChipTokenAmount 수수료를 뺀 나머지 금액 Signer: 유저, 봇

DisabledChip오류의 의미는 플랫폼이 이 칩의 거래를 임시 중단 하였다는 의미 Check diagram.xlsx [checklist] No.4

  const tx = await userWrapper.exitGame({
    gameTokenMintAddressStr,
    currentPlayerChipTokenAmount,  // chip token amount; 예시: 3.412 USDC => 3.412
  });

플랫폼내의 유저리스트 - 유저 영력

보안상 문제일 경우 이 RPC 삭제 상의

  let users = await userWrapper.getUsers();

유저 정보 - 유저 영력

보안상 문제일 경우 이 RPC 삭제 상의

  let user = await userWrapper.getUserInfo({
    userWalletStr // String
  });

유저의 보유 칩 리스트 - 유저 영력

보안상 문제일 경우 이 RPC 삭제 상의

  let users = await userWrapper.getUserChips(
    userPda
  );

유저의 보유 칩 정보 - 유저 영력

보안상 문제일 경우 이 RPC 삭제 상의

  let user = await userWrapper.getUserChipInfo({
    userPda,
    userChipTokenMintAddressStr,
  });