Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,6 @@ The core team will review opened PRs. The SLA is 2 weeks, generally on a first-c
## Storybook for UI components

See `storybook/README.md` for details on local Storybook and component docs.
## Additional Note

When building on Base, always ensure that you are using the correct RPC endpoint for the intended network (mainnet or testnet). Misconfiguration can lead to failed transactions or unexpected behavior.
23 changes: 23 additions & 0 deletions docs/apps/quickstart/migrate-minikit-to-apps.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: "Migrate from MiniKit to Base Apps SDK"
description: "A checklist and guide for migrating your existing apps to the new Base Apps SDK."
---

# Migrating to Base Apps SDK

Base has evolved the "Mini Apps" ecosystem into the broader **Base Apps**. This transition involves a few breaking changes in the SDK and documentation structure.

## Quick Checklist
- [ ] Rename `useMiniKit` to `useBaseApp`.
- [ ] Update imports from `@coinbase/minikit` to the latest version.
- [ ] Review Farcaster manifest requirements (now optional for standard web apps).

## Code Changes

### Hook Update
```typescript
// Old
import { useMiniKit } from "@coinbase/minikit";

// New
import { useBaseApp } from "@coinbase/minikit";
30 changes: 30 additions & 0 deletions docs/cookbook/implement-spend-permissions.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: "Implement Spend Permissions"
description: "Learn how to allow apps to spend tokens on behalf of users without repeated approval prompts using Base Account."
---

# Implement Spend Permissions

Spend Permissions allow smart wallets to grant specific allowances to a spender (your app's backend) for a set period. This enables seamless experiences like subscriptions, automatic trading, or gasless payments.

## How it works

1. **Request Permission:** The user signs a typed data structure defining the `allowance`, `period`, and `spender`.
2. **Onchain Approval:** The signature is submitted to the `SpendPermissionManager` contract.
3. **Execution:** The authorized spender calls `spend()` to transfer assets within the allowed limit.

## Implementation Steps

### 1. Build the Permission
```typescript
const permission = {
account: userAddress,
spender: "0xYourBackendAddress",
token: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", // Native ETH
allowance: parseEther("0.1"),
period: 2592000, // 30 days
start: Math.floor(Date.now() / 1000),
end: Math.floor(Date.now() / 1000) + (2592000 * 12), // 1 year
salt: BigInt(0),
extraData: "0x",
};