2.2.0 • Published 17 days ago

circuscasino-sdk v2.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
17 days ago

circus-casino-dev-sdk

Installation

yarn add circus-casino-dev-sdk

Global

Load SDK wrappers

import { CircusCasinoSDK, AdminWrapper } from "circus-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: "confirmed",
    commitment: "confirmed",
  },
});
const circusCasinoSDK = CircusCasinoSDK.load({ provider });
const adminWrapper = new AdminWrapper(circusCasinoSDK, wallet.publickKey.toString()); // wallet.publickKey should be String

Get global states - admin wrapper

  let info = await adminWrapper.getGlobalInfo();

Bot

import { CircusCasinoSDK, BotWrapper } from "circus-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: "confirmed",
    commitment: "confirmed",
  },
});
const circusCasinoSDK = CircusCasinoSDK.load({ provider });
const botWrapper = new BotWrapper(circusCasinoSDK, wallet.publickKey.toString()); // wallet.publickKey should be String

User

import { CircusCasinoSDK, UserWrapper } from "circus-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: "confirmed",
    commitment: "confirmed",
  },
});
const circusCasinoSDK = CircusCasinoSDK.load({ provider });
const userWrapper = new UserWrapper(circusCasinoSDK, wallet.publickKey.toString()); // wallet.publickKey should be String
2.2.0

17 days ago

2.1.1

21 days ago

2.1.0

21 days ago

2.0.1

27 days ago

1.0.3

1 month ago

2.0.0

1 month ago

1.0.2

2 months ago

1.0.1

2 months ago

1.0.0

4 months ago

0.2.15

4 months ago

0.2.14

4 months ago

0.1.10

5 months ago

0.1.11

5 months ago

0.1.12

5 months ago

0.2.13

4 months ago

0.2.12

4 months ago

0.2.11

4 months ago

0.2.10

5 months ago

0.2.1

5 months ago

0.2.0

5 months ago

0.2.7

5 months ago

0.2.6

5 months ago

0.2.9

5 months ago

0.2.8

5 months ago

0.2.3

5 months ago

0.2.2

5 months ago

0.2.5

5 months ago

0.2.4

5 months ago

0.1.8

5 months ago

0.1.7

5 months ago

0.1.9

5 months ago

0.1.4

6 months ago

0.1.6

6 months ago

0.1.5

6 months ago

0.1.3

6 months ago

0.1.2

6 months ago

0.1.1

6 months ago

0.1.0

6 months ago