Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve transaction notes #296

Merged
merged 3 commits into from
Oct 19, 2024
Merged
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
2 changes: 1 addition & 1 deletion src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ export const Header: ForwardRefExoticComponent<{ className?: string }> = forward
</div>
<div className="px-4 sm:px-6 flex items-center gap-6 h-12 bg-white">
<SectionTab text="Home" isActive={basePath === ''} href="/" />
<SectionTab text="World ID" isActive={basePath === 'world-id'} href="/world-id" />
<SectionTab text="Mini Apps" isActive={basePath === 'mini-apps'} href="/mini-apps" />
<SectionTab text="World ID" isActive={basePath === 'world-id'} href="/world-id" />
<SectionTab text="World Chain" isActive={basePath === 'world-chain'} href="/world-chain" />
</div>
</motion.div>
Expand Down
8 changes: 5 additions & 3 deletions src/components/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ export const worldIdNavigation = [
title: 'Incognito Actions',
links: [
{ title: 'Cloud Verification', href: '/world-id/id/cloud' },
{ title: 'Libraries', href: '/world-id/id/libraries' },
{ title: 'On-Chain Verification', href: '/world-id/id/on-chain' },
{ title: 'Common Pitfalls', href: '/world-id/id/pitfalls' },
],
Expand Down Expand Up @@ -241,6 +242,7 @@ export const miniAppsNavigation = [
{ title: 'Verify', href: '/mini-apps/commands/verify' },
{ title: 'Pay', href: '/mini-apps/commands/pay' },
{ title: 'Wallet Auth', href: '/mini-apps/commands/wallet-auth' },
{ title: 'Connect Wallet', href: '/mini-apps/commands/connect-wallet' },
{ title: 'Send Transaction', href: '/mini-apps/commands/send-transaction' },
{ title: 'Sign Message', href: '/mini-apps/commands/sign-message' },
{ title: 'Sign Typed Data', href: '/mini-apps/commands/sign-typed-data' },
Expand Down Expand Up @@ -363,10 +365,10 @@ export const Navigation: FC<{
const router = useRouter()

const getNavigationGroups = () => {
if (router.pathname.includes('world-id')) {
return worldIdNavigation
} else if (router.pathname.includes('mini-apps')) {
if (router.pathname.includes('mini-apps')) {
return miniAppsNavigation
} else if (router.pathname.includes('world-id')) {
return worldIdNavigation
} else if (router.pathname.includes('world-chain')) {
return worldChainNavigation
}
Expand Down
4 changes: 1 addition & 3 deletions src/pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ import {Card} from "@/components/Card"


<span className="grid lg:grid-flow-col gap-x-8 mt-10 sm:grid-cols-3">
<Card alt="World ID" title={"Build with World ID"} content="Simple, private, and secure proof of humanity" link="/world-id" imagePath="/images/docs/world-id-cover.png"/>

<Card alt="Mini Apps" title={"Create a Mini App"} content="Native like applications integrated in World App" link="/mini-apps" imagePath="/images/docs/mini-apps-cover.png"/>

<Card alt="World ID" title={"Build with World ID"} content="Simple, private, and secure proof of humanity" link="/world-id" imagePath="/images/docs/world-id-cover.png"/>
<Card alt="World Chain" title={"Integrate World Chain"} content="A chain for humans. More details coming soon" link="/world-chain" imagePath="/images/docs/worldchain-cover.png"/>
</span>
8 changes: 8 additions & 0 deletions src/pages/mini-apps/commands/connect-wallet.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Link } from '@/components/Link'

# Connect Wallet

Wallet auth returns a wallet address upon completion. If you don't want to use SIWE and just want the wallet address,
just use the `walletAuth` command and skip the verification of the payload.

<Link href="/mini-apps/commands/wallet-auth">Go to Wallet Auth Section</Link>
6 changes: 5 additions & 1 deletion src/pages/mini-apps/commands/send-transaction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ the index of the permit2 object in the transaction array.
Additionally if you introduce a new ERC20 token we will automatically approve the permit2 contract to spend the tokens.

If you need `setApprovalForAll` or are working with NFTs please reach out.

<Note type="info">
Tips:
1. Send transaction has a max payload size. Try to only include the abi for the function you're calling otherwise your transaction will fail.
2. Wrap all your arguments in strings to avoid overflow errors when passing to the SDK. We will auto parse your arguments to match the types in the ABI.
</Note>
``` tsx {{ title: 'app/page.tsx' }}
import { MiniKit } from '@worldcoin/minikit-js'
import DEXABI from "../../abi/DEX.json";
Expand Down
34 changes: 34 additions & 0 deletions src/pages/world-id/id/libraries.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { Link } from '@/components/Link'

# Supported Libraries
World ID is available on a variety of platforms. Below is a list of native libraries we currently support.
<table>
<thead>
<tr>
<th>Library</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td className="align-middle"><Link href="https://www.npmjs.com/package/@worldcoin/idkit">React</Link></td>
<td className="align-middle">Our most popular library. Integrate easily into any React app</td>
</tr>
<tr>
<td className="align-middle"><Link href="https://www.npmjs.com/package/@worldcoin/idkit-standalone">JS</Link></td>
<td className="align-middle">Standalone version for vanilla javascript.</td>
</tr>
<tr>
<td className="align-middle"><Link href="https://swiftpackageindex.com/worldcoin/idkit-swift">Swift</Link></td>
<td className="align-middle">Native Swift library for IOS apps.</td>
</tr>
<tr>
<td className="align-middle"><Link href="https://crates.io/crates/idkit">Rust</Link></td>
<td className="align-middle">Rust library. Use this to compile other native binaries, eg. Kotlin.</td>
</tr>
<tr>
<td className="align-middle"><Link href="https://github.com/worldcoin/idkit-kotlin/packages/2232016">Kotlin</Link></td>
<td className="align-middle">Native Kotlin library for Android apps</td>
</tr>
</tbody>
</table>
Loading