cc-other-sdk
v2.3.1
Published
Typescript SDK to interact with Circus program.
Downloads
312
Readme
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