@chipi-stack/nextjs
v14.17.0
Published
Chipi SDK for Next.js applications with server-side support
Readme
Chipi SDK
Chipi SDK for Next.js — gasless stablecoin wallets, USDC payments, session keys with spending policies, and x402 API monetization on StarkNet. Add self-custody wallets with passkey authentication to your Next.js app in minutes. All transactions are gasless.
Prerequisites
- React 18 or later
- Node.js >=18.17.0 or later
- A Chipi account. Create your account for free
Installation
The fastest way to get started with Chipi SDK is by following our Quickstart Guide.
npm install @chipi-stack/nextjs
# or
yarn add @chipi-stack/nextjsUsage
For detailed information, guides, and examples visit our documentation.
Bramble and other Starknet wallets
Users who already have Bramble, Braavos or Ready can sign in with it (Sign in with Starknet) and make it a co-owner or a recovery guardian of their Chipi wallet (Trusted wallets). Once Bramble is a co-owner, useExternalSignerExecute runs calls it approves with wallet_signTypedData:
import { useExternalSignerExecute } from "@chipi-stack/nextjs";
// Inside your component:
const { executeAsync } = useExternalSignerExecute();
// In a click handler (Bramble opens its panel only from a user gesture):
const bramble = (window as any).starknet_bramble;
const txHash = await executeAsync({
params: {
walletAddress: wallet.publicKey,
ownerIndex: brambleOwnerId,
calls,
signTypedData: async (typedData) =>
(await bramble.request({ type: "wallet_signTypedData", params: typedData })) as string[],
},
bearerToken: await getToken(),
});To offer Chipi as a wallet next to Bramble in your dApp, see @chipi-stack/starknet-connector.
Support
You can get in touch with us in any of the following ways:
- Join our Telegram community
- Visit our YouTube channel for tutorials
- Email us at [email protected]
Contributing
We're open to all community contributions! If you'd like to contribute in any way, please read our contribution guidelines and code of conduct.
What you can ship
- Full-stack payment apps with SSR and server actions — build complete payment experiences with Next.js
- E-commerce with crypto checkout — add USDC payments to any storefront
- SaaS with wallet-per-user — provision wallets automatically on signup
- Gaming leaderboards with on-chain rewards — distribute token rewards from server-side logic
Have an idea? Tell us what you want to build
Security
@chipi-stack/nextjs follows best practices for security, but 100% security cannot be assured.
@chipi-stack/nextjs is provided "as is" without any warranty. Use at your own risk.
For more information and to report security issues, please refer to our security documentation.
