2.4.0 • Published 5 months ago

circuscasino-sdk v2.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months 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.4.0

5 months ago

2.3.0

8 months ago

2.2.1

8 months ago

2.3.1

8 months ago

2.2.2

8 months ago

2.2.0

9 months ago

2.1.1

9 months ago

2.1.0

9 months ago

2.0.1

9 months ago

1.0.3

9 months ago

2.0.0

9 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

12 months ago

0.2.15

12 months ago

0.2.14

12 months ago

0.1.10

1 year ago

0.1.11

1 year ago

0.1.12

1 year ago

0.2.13

12 months ago

0.2.12

1 year ago

0.2.11

1 year ago

0.2.10

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.2.7

1 year ago

0.2.6

1 year ago

0.2.9

1 year ago

0.2.8

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.5

1 year ago

0.2.4

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.9

1 year ago

0.1.4

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago