https://github.com/chipi-pay/chipi-sdk
Chipi SDK: The Fastest Way to Ship on StarkNet Mainnet
https://github.com/chipi-pay/chipi-sdk
clerk social-login starknet starknet-ecosystem starknetjs wallets web3
Last synced: 6 months ago
JSON representation
Chipi SDK: The Fastest Way to Ship on StarkNet Mainnet
- Host: GitHub
- URL: https://github.com/chipi-pay/chipi-sdk
- Owner: chipi-pay
- Created: 2025-02-22T17:26:38.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-04-04T07:06:50.000Z (6 months ago)
- Last Synced: 2025-04-12T23:14:13.429Z (6 months ago)
- Topics: clerk, social-login, starknet, starknet-ecosystem, starknetjs, wallets, web3
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@chipi-pay/chipi-sdk
- Size: 608 KB
- Stars: 18
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
# Chipi SDK: The Fastest Way to Ship on StarkNet Mainnet
Chipi SDK combines invisible wallet creation with social login and Avnu’s paymaster to streamline dApp development on StarkNet. Users log in with familiar accounts (Google, X, Meta), and a wallet is generated behind the scenes—no manual key management needed. Focus on building features instead of dealing with blockchain complexities.
## Features
- 🔐 **Invisible Wallet Creation**: Generate wallets automatically with social login
- 💸 **Gasless Transactions**: Integration with Avnu Paymaster
- 🔄 **Simple Transfers**: Simplified API for token transfers
- ⚡ **Optimized for StarkNet**: Designed specifically for the StarkNet network## Live Demo
https://chipi-sdk-clerk-demo.vercel.app/
## Installation
```bash
npm install @chipi-pay/chipi-sdk# Add your API keys to the environment variables
NEXT_PUBLIC_AVNU_API_KEY=tu_api_key_aqui
NEXT_PUBLIC_INFURA_API_KEY=tu_infura_key_aqui
```## Getting Started
```typescript
// app/providers.tsx// Initialize SDK
import { ChipiProvider } from "@chipi-pay/chipi-sdk";const AVNU_API_KEY = process.env.NEXT_PUBLIC_AVNU_API_KEY!;
const INFURA_API_KEY = process.env.NEXT_PUBLIC_INFURA_API_KEY!;if (!AVNU_API_KEY || !INFURA_API_KEY) {
throw new Error("AVNU_API_KEY or INFURA_API_KEY is not set");
}export function Providers({ children }: { children: React.ReactNode }) {
return (
{children}
);
}
``````typescript
// app/page.tsx
import {
useApprove,
useStake,
useCreateWallet,
useTransfer,
useWithdraw,
useCallAnyContract,
} from "@chipi-pay/chipi-sdk";export default function Home() {
const { createWalletAsync, createWalletResponse } =
useCreateWallet();
const { transferAsync } = useTransfer();const handleCreateWallet = async (pin: string) => {
const response = await createWalletAsync(pin);
console.log("creation response", response);
alert("Wallet created");
};const handleTransfer = async (params: TransferParams) => {
const response = await transferAsync(params);
console.log("transfer response", response);
alert("Transferred");
};return (
Chipi SDK
Create Wallet
Transfer
);
}
```## Types
```typescript
interface ChipiSDKConfig {
apiKey: string;
rpcUrl: string;
argentClassHash?: string;
activateContractAddress?: string;
activateContractEntryPoint?: string;
network: "mainnet" | "sepolia";
}interface WalletData {
publicKey: string;
encryptedPrivateKey: string;
}interface TransferParams {
encryptKey: string;
wallet: WalletData;
contractAddress: string;
recipient: string;
amount: string | number;
decimals?: number;
}
```