open-index/open-npm huggingface dataset:
npm package: @gudnuf/cornucopia
Description: Store and synchronize cashu proofs
Author: gudnuf
Latest version: 0.2.0

# cornucopia

Example:

```ts
import { CashuLocalStorage, BrowserLocker } from "cornucopia";
import { minAmount } from "cornucopia/selection";
import { CashuWallet, CashuMint } from "@cashu/cashu-ts";

const locker = new BrowserLocker("locks");
const storage = new CashuLocalStorage("https://mint.example.com", "sat", locker);

const wallet = new CashuWallet(new CashuMint("https://mint.example.com"), {
  unit: "sat",
});

const payInvoice = async (invoice: string, amount: number) => {
  const meltQuote = await wallet.createMeltQuote(invoice);

  return await storage.transaction(
    (selection) => selection.getAvailableProofs().then(minAmount(meltQuote.amount + meltQuote.fee_reserve)),
    async (proofs) => {
      const { change } = await wallet.meltProofs(meltQuote, proofs);

      return change;
    },
  );
};

const sendTokens = async (amount: number) => {
  return await storage.transaction(
    (selection) => selection.getAvailableProofs().then(minAmount(amount)),
    async (proofs) => {
      const { send, keep } = await wallet.send(amount, proofs);

      const res = await fetch("/rug", {
        method: "POST",
        body: JSON.stringify(send),
      });

      // rollback transaction
      if (!res.ok) throw new Error("Request failed");

      return keep;
    },
  );
};
```
npm package: @gudnuf/cornucopia-sore-better-sqlite
Description: Store proofs with better-sqlite3
Author: gudnuf
Latest version: 0.1.0

# cornucopia

Example:

```ts
import { CashuLocalStorage, BrowserLocker } from "cornucopia";
import { minAmount } from "cornucopia/selection";
import { CashuWallet, CashuMint } from "@cashu/cashu-ts";

const locker = new BrowserLocker("locks");
const storage = new CashuLocalStorage("https://mint.example.com", "sat", locker);

const wallet = new CashuWallet(new CashuMint("https://mint.example.com"), {
  unit: "sat",
});

const payInvoice = async (invoice: string, amount: number) => {
  const meltQuote = await wallet.createMeltQuote(invoice);

  return await storage.transaction(
    (selection) => selection.getAvailableProofs().then(minAmount(meltQuote.amount + meltQuote.fee_reserve)),
    async (proofs) => {
      const { change } = await wallet.meltProofs(meltQuote, proofs);

      return change;
    },
  );
};

const sendTokens = async (amount: number) => {
  return await storage.transaction(
    (selection) => selection.getAvailableProofs().then(minAmount(amount)),
    async (proofs) => {
      const { send, keep } = await wallet.send(amount, proofs);

      const res = await fetch("/rug", {
        method: "POST",
        body: JSON.stringify(send),
      });

      // rollback transaction
      if (!res.ok) throw new Error("Request failed");

      return keep;
    },
  );
};
```
npm package: @guebbit/vue-library
Description: ## Project setup ``` npm install ```
Author: Guebbit
Latest version: 1.0.4

# vue-library

## Project setup
```
npm install
```

### Compiles and hot-reloads for development
```
npm run serve
```

### Compiles and minifies for production
```
npm run build
```

### Run your unit tests
```
npm run test:unit
```

### Run your end-to-end tests
```
npm run test:e2e
```

### Lints and fixes files
```
npm run lint
```

### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).