First steps with Lazor Kit
First Steps with Lazor Kit
Kickstart your project with Lazor Kit by following these steps:
1. Install Lazor Kit SDK
Install the package using npm or yarn:
2. Install Buffer (for Browser Support)
If you are building for the browser, install the buffer
package to ensure compatibility with Solana and cryptography libraries:
Polyfill Buffer (if needed)
Some bundlers (like Vite, Webpack 5) auto-polyfill Buffer. If you see errors about Buffer not being defined, add this to your entry file (e.g., main.tsx
or index.js
):
3. Polyfill process (if needed)
If you see errors about process
not being defined (common in browser builds), install the process
polyfill:
Then add this to your entry file:
4. Initialize a Solana Connection
Create a Solana connection using @solana/web3.js
:
5. Use Lazor Kit in Your App
Now you can import and use Lazor Kit hooks and components:
Tip:
Make sure your domain is whitelisted with LazorKit for production use.
Configure TypeScript and your bundler if you use path aliases.
Always check for Buffer and process polyfills if you encounter related errors.
Last updated