2.6.2 • Published 9 months ago

airmoney-sdk v2.6.2

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

air-money-dev-sdk

Installation

yarn add air-money-dev-sdk

Global

Load SDK wrappers

import { AirMoneySDK, AdminWrapper } from "air-money-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 airMoneySDK = AirMoneySDK.load({ provider });
const adminWrapper = new AdminWrapper(airMoneySDK, wallet.publickKey.toString()); // wallet.publickKey should be String

Get global states - admin wrapper

  let info = await adminWrapper.getGlobalInfo();

Bot

import { AirMoneySDK, BotWrapper } from "air-money-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 airMoneySDK = AirMoneySDK.load({ provider });
const botWrapper = new BotWrapper(airMoneySDK, wallet.publickKey.toString()); // wallet.publickKey should be String

User

import { AirMoneySDK, UserWrapper } from "air-money-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 airMoneySDK = AirMoneySDK.load({ provider });
const userWrapper = new UserWrapper(airMoneySDK, wallet.publickKey.toString()); // wallet.publickKey should be String
2.6.1

9 months ago

2.6.2

9 months ago

2.5.0

9 months ago

2.4.0

9 months ago

2.3.0

10 months ago

2.2.0

10 months ago

2.1.1

10 months ago

2.1.0

10 months ago

2.0.0

10 months ago

1.0.2

10 months ago

1.1.0

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago