2.3.1 • Published 1 month ago

circuscasino-sdk v2.3.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month 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.3.0

1 month ago

2.2.1

1 month ago

2.3.1

1 month ago

2.2.2

1 month ago

2.2.0

2 months ago

2.1.1

2 months ago

2.1.0

2 months ago

2.0.1

2 months ago

1.0.3

3 months ago

2.0.0

2 months ago

1.0.2

3 months ago

1.0.1

4 months ago

1.0.0

5 months ago

0.2.15

5 months ago

0.2.14

5 months ago

0.1.10

6 months ago

0.1.11

6 months ago

0.1.12

6 months ago

0.2.13

5 months ago

0.2.12

6 months ago

0.2.11

6 months ago

0.2.10

6 months ago

0.2.1

6 months ago

0.2.0

6 months ago

0.2.7

6 months ago

0.2.6

6 months ago

0.2.9

6 months ago

0.2.8

6 months ago

0.2.3

6 months ago

0.2.2

6 months ago

0.2.5

6 months ago

0.2.4

6 months ago

0.1.8

7 months ago

0.1.7

7 months ago

0.1.9

7 months ago

0.1.4

7 months ago

0.1.6

7 months ago

0.1.5

7 months ago

0.1.3

7 months ago

0.1.2

7 months ago

0.1.1

7 months ago

0.1.0

7 months ago