open-index/open-npm huggingface dataset:
npm package: @linabase/js
Description: JavaScript/TypeScript client SDK for Linabase (database, storage, auth)
Latest version: 0.1.1

# @linabase/js

JavaScript/TypeScript client SDK for [Linabase](https://linabase.com), the self-hostable Supabase alternative.

## Install

```bash
npm install @linabase/js
```

## Quick Start

```typescript
import { createClient } from "@linabase/js";

const linabase = createClient({
  url: "https://your-project.linabase.com",
  anonKey: "lb_your_anon_key",
});
```

## Database

```typescript
// Select
const { data, error } = await linabase.from("posts").select("id, title, author(name)");

// Insert
await linabase.from("posts").insert({ title: "Hello", body: "World" });

// Update
await linabase.from("posts").update({ title: "Updated" }).eq("id", 1);

// Delete
await linabase.from("posts").delete().eq("id", 1);

// Filters
await linabase.from("posts")
  .select()
  .eq("status", "published")
  .gte("created_at", "2026-01-01")
  .order("created_at", { ascending: false })
  .limit(10);

// RPC (call Postgres functions)
const result = await linabase.rpc("my_function", { arg1: "value" });
```

## Storage

```typescript
const storage = linabase.storage.from("avatars");

// Upload
await storage.upload("user-1/photo.jpg", file);

// Download
const blob = await storage.download("user-1/photo.jpg");

// List files
const files = await storage.list("user-1/");

// Get public URL
const url = storage.getPublicUrl("user-1/photo.jpg");

// Signed URLs
const { signedUrl } = await storage.createSignedUrl("user-1/photo.jpg", 3600);

// Delete
await storage.remove(["user-1/photo.jpg"]);
```

## Auth

```typescript
// Sign up
const { user, session } = await linabase.auth.signUp({
  email: "user@example.com",
  password: "securepassword",
});

// Sign in
const { user, session } = await linabase.auth.signIn({
  email: "user@example.com",
  password: "securepassword",
});

// Get current session
const session = await linabase.auth.getSession();

// Sign out
await linabase.auth.signOut();

// Listen for auth changes
linabase.auth.onAuthStateChange((event, session) => {
  console.log(event, session);
});

// OAuth
await linabase.auth.signInWithOAuth({ provider: "google" });
```

## Schema Selection

```typescript
// Query a different schema (auth, storage, logs)
const users = await linabase.schema("auth").from("auth_users").select();
```

## TypeScript

```typescript
// Generate types from your database schema
const types = await linabase.generateTypes();
```

## Service Role (server-side only)

```typescript
const admin = createClient({
  url: "https://your-project.linabase.com",
  serviceRoleKey: "lb_your_service_role_key",
});

// Bypasses RLS
const { data } = await admin.from("posts").select();
```

## Links

- [Documentation](https://linabase.com/docs)
- [GitHub](https://github.com/linabase/linabase)
- [MCP Server](https://www.npmjs.com/package/@linabase/mcp-server)

## License

MIT
npm package: @linagee/lnr-ethers-react
Description: lnr-ethers for react
Author: Chriton
Latest version: 1.3.0


# Lnr Ethers React

![npm](https://img.shields.io/npm/v/@linagee/lnr-ethers-react)
![npm bundle size](https://img.shields.io/bundlephobia/min/@linagee/lnr-ethers-react)
![npm](https://img.shields.io/npm/dw/@linagee/lnr-ethers-react)

![GitHub](https://img.shields.io/github/license/Linagee-Name-Registrar/lnr-ethers-react)
![GitHub pull requests](https://img.shields.io/github/issues-pr-raw/Linagee-Name-Registrar/lnr-ethers-react)

[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)

# Requirements
- React >= 18.0.0

---

## Installation

Full documentation can be found here [docs.linagee.app](https://docs.linagee.app/docs/lnr-ethers-react/getting-started)


```bash
# with npm
npm install @linagee/lnr-ethers-react

# with yarn
yarn add @linagee/lnr-ethers-react
```

---

## Setup

#### Set LnrConfigProvider as a wrapper for your app

Example:
```typescript jsx

import { AppProps } from 'next/app';
import { ethers } from 'ethers';
import { LnrConfigProvider } from '@linagee/lnr-ethers-react';

function MyApp({ Component, pageProps }: AppProps) {
    const config = {
        provider: new ethers.providers.AlchemyProvider(1, process.env.REACT_APP_ALCHEMY_API
        ),
    };

    return (
        <LnrConfigProvider config={config}>
            <Component {...pageProps} />
        </LnrConfigProvider>
    );
}

export default MyApp;
```

You need to set REACT_APP_ALCHEMY_API in your .env file.
You can set any provider you want, but we recommend using Alchemy.

---

## Usage

Use the hooks in your components to get the data you need.

Example:

```typescript jsx
import React from "react";
import { useLnrGetAddress } from "@linagee/lnr-ethers-react";

function MyComponent() {
  const name = "0xhal.og";
  const { address, error, hasError, loading } = useLnrGetAddress(name);

  if (loading) {
    return <div>Loading...</div>;
  }

  if (hasError) {
    return <div>Error: {error}</div>;
  }

  return (
    <div>
      <h2>Name: {name}</h2>
      <p>Address: {address}</p>
    </div>
  );
}

export default MyComponent;
```