micro-stacks

micro-stacks is an all-in-one JavaScript/TypeScript SDK for building robust and sophisticated decentralized apps on Stacks. With micro-stacks you can build apps that can: interact with Clarity, the smart contract language on Stacks, apps that interact with Stacks based wallets, construct transactions, post conditions, and much more!

Overview

import { useAuth } from '@micro-stacks/react';

export const WalletConnectButton = () => {
  const { openAuthRequest, isRequestPending, signOut, isSignedIn } = useAuth();
  const label = isRequestPending ? 'Loading...' : isSignedIn ? 'Sign out' : 'Connect Stacks wallet';
  return (
    <button
      onClick={async () => {
        if (isSignedIn) await signOut();
        else await openAuthRequest();
      }}
    >
      {label}
    </button>
  );
};

In this example, we've imported the useAuth hook and created a simple WalletConnect style button. This is all you need to add web3 style Stacks authentication to your app!

Want to learn more? Get Started with micro-stacks.

Features

  • Core has only 2 dependencies (and those have 0)
  • Modular: take what you need, leave what you don't
  • ESM based, works with all modern bundlers
  • Un-opinionated core
  • Robust framework integrations
    • React
    • Svelte (coming soon)
    • Vue (coming soon)
    • React Jotai
  • Built from the ground up to work with Wallet-based authentication
  • Highly typed -- written in typescript
  • Well tested
  • Audited

Community

starsdownloadslicense

micro-stacks is created and maintained by Fungible Systems, a web3-focused design and engineering studio.

Follow @FungibleSystems on Twitter for updates and memes :~)

Last updated on July 11, 2022