Function AnchorProvider

  • On-chain context provider for Anchor programs.

    Example

    You need to wrap the entrypoint to your frontend application. For React Applications go to src/App.tsx. For NextJS Applications go to pages/_app.tsx

    import { AnchorProvider } from '@honey-finance/sdk';
    const wallet = useConnectedWallet();
    const connection = useConnection();
    const network = 'devnet';

    return (
    <AnchorProvider
    wallet={wallet}
    connection={connection}
    network={network}
    honeyProgram={HONEY_PROGRAM_ID}>

    <Component {...pageProps} /> # entrypoint to your application

    </AnchorProvider>
    )

    Parameters

    Returns ReactElement<any, any>

Generated using TypeDoc