open-index/open-npm huggingface dataset:
npm package: @perk.money/perk-swap-core
Description: This npm package contains core logic of Perk Aggregator build on top of NEAR blockchain
Author: perk.money
Latest version: 0.2.85

# Perk SDK

Contains core logic of Perk Aggregator SDK which build on top of NEAR blockhain.


# Installation
```
npm install @perk.money/perk-swap-core jsbi decimal.js near-api-js
```
```
yarn add @perk.money/perk-swap-core jsbi decimal.js near-api-js
```
# Docs

You can visit docs for detailed explanation and examples of usage: https://docs.perk.money/

# Public methods

```
Perk.load()
Perk.computeRoutes()
Perk.buildTransactions()
```
npm package: @perkjs/text-table
Description: borderless text tables with alignment
Author: Ilya Karpuk
Latest version: 1.3.0

# text-table

### This is an optimized version of [text-table](https://www.npmjs.com/package/text-table)

generate borderless text table strings suitable for printing to stdout

# Install

With [npm](https://npmjs.org) do:

```
npm install @perkjs/text-table
```

# Benchmark

```
Original text-table x 197,473 ops/sec ±2.14% (85 runs sampled)
@perkjs/text-table v1.3.0 x 367,456 ops/sec ±2.16% (86 runs sampled)
@perkjs/text-table v1.2.1 x 347,403 ops/sec ±1.69% (80 runs sampled)
@perkjs/text-table v1.2.0 x 330,972 ops/sec ±10.60% (81 runs sampled)
@perkjs/text-table v1.1.0 x 289,422 ops/sec ±1.97% (85 runs sampled)
@perkjs/text-table v1.0.0 x 209,862 ops/sec ±1.99% (81 runs sampled)
```

# Example

## default align

``` js
var table = require('text-table');
var t = table([
    [ 'master', '0123456789abcdef' ],
    [ 'staging', 'fedcba9876543210' ]
]);
console.log(t);
```

```
master   0123456789abcdef
staging  fedcba9876543210
```

## left-right align

``` js
var table = require('text-table');
var t = table([
    [ 'beep', '1024' ],
    [ 'boop', '33450' ],
    [ 'foo', '1006' ],
    [ 'bar', '45' ]
], { align: [ 'l', 'r' ] });
console.log(t);
```

```
beep   1024
boop  33450
foo    1006
bar      45
```

## dotted align

``` js
var table = require('text-table');
var t = table([
    [ 'beep', '1024' ],
    [ 'boop', '334.212' ],
    [ 'foo', '1006' ],
    [ 'bar', '45.6' ],
    [ 'baz', '123.' ]
], { align: [ 'l', '.' ] });
console.log(t);
```

```
beep  1024
boop   334.212
foo   1006
bar     45.6
baz    123.
```

## centered

``` js
var table = require('text-table');
var t = table([
    [ 'beep', '1024', 'xyz' ],
    [ 'boop', '3388450', 'tuv' ],
    [ 'foo', '10106', 'qrstuv' ],
    [ 'bar', '45', 'lmno' ]
], { align: [ 'l', 'c', 'l' ] });
console.log(t);
```

```
beep    1024   xyz
boop  3388450  tuv
foo    10106   qrstuv
bar      45    lmno
```

# methods

``` js
var table = require('text-table')
```

## var s = table(rows, opts={})

Return a formatted table string `s` from an array of `rows` and some options
`opts`.

`rows` should be an array of arrays containing strings, numbers, or other
printable values.

options can be:

* `opts.hsep` - separator to use between columns, default `'  '`
* `opts.align` - array of alignment types for each column, default `['l','l',...]`
* `opts.stringLength` - callback function to use when calculating the string length

alignment types are:

* `'l'` - left
* `'r'` - right
* `'c'` - center
* `'.'` - decimal

# Use with ANSI-colors

Since the string length of ANSI color schemes does not equal the length
JavaScript sees internally it is necessary to pass the a custom string length
calculator during the main function call.

See the `test/ansi-colors.js` file for an example.

# license

MIT
npm package: @perkleswap/uikit
Description: Set of UI components for Perkle projects
Latest version: 0.0.1

# 🥞 Pancake UIkit

[![Version](https://img.shields.io/npm/v/@pancakeswap-libs/uikit)](https://www.npmjs.com/package/@pancakeswap-libs/uikit) [![Size](https://img.shields.io/bundlephobia/min/@pancakeswap-libs/uikit)](https://www.npmjs.com/package/@pancakeswap-libs/uikit)

Pancake UIkit is a set of React components and hooks used to build pages on Pancake's apps. It also contains a theme file for dark and light mode.

## Install

`yarn add @pancakeswap-libs/uikit`

## Setup

### Theme

Before using Pancake UIkit, you need to provide the theme file to styled-component.

```
import { ThemeProvider } from 'styled-components'
import { light, dark } from '@pancakeswap-libs/uikit'
...
<ThemeProvider theme={isDark}>...</ThemeProvider>
```

### Reset

A reset CSS is available as a global styled component.

```
import { ResetCSS } from '@pancakeswap-libs/uikit'
...
<ResetCSS />
```

### Types

This project is built with Typescript and export all the relevant types.

## How to use the UIkit

If you want to use components from the UIkit, check the [Storybook documentation](https://pancakeswap.github.io/pancake-uikit/)
npm package: @perkos/ui-payment-thirdweb
Description: Thirdweb wallet adapter for @perkos/ui-payment
Author: PerkOS
Latest version: 1.0.0

# @perkos/ui-payment-thirdweb

Thirdweb wallet adapter for `@perkos/ui-payment`.

## Installation

```bash
npm install @perkos/ui-payment @perkos/ui-payment-thirdweb thirdweb
```

## Usage

```tsx
import { PaymentButton } from "@perkos/ui-payment";
import { useThirdwebWallet } from "@perkos/ui-payment-thirdweb";

function Checkout({ paymentOptions }) {
  const wallet = useThirdwebWallet();

  return (
    <PaymentButton
      wallet={wallet}
      accepts={paymentOptions}
      onPaymentSigned={(envelope) => {
        // Retry your API request with the signed payment
        fetch("/api/paid-service", {
          headers: {
            "PAYMENT-SIGNATURE": btoa(JSON.stringify(envelope)),
          },
        });
      }}
      onError={(error) => console.error(error)}
    />
  );
}
```

## Requirements

This package requires:
- `@perkos/ui-payment` >= 1.0.0
- `thirdweb` >= 5.0.0
- `react` >= 18.0.0

Your app must be wrapped in Thirdweb's `ThirdwebProvider`.

## API

### useThirdwebWallet()

Returns a `WalletAdapter` compatible with `@perkos/ui-payment`.

```tsx
const wallet = useThirdwebWallet();

// wallet.address - Connected wallet address
// wallet.chainId - Current chain ID
// wallet.isConnected - Whether wallet is connected
// wallet.signTypedData() - Sign EIP-712 data
// wallet.switchChain() - Switch to a different chain
```

### getThirdwebChain(chainId)

Get Thirdweb chain object from chain ID.

```tsx
import { getThirdwebChain } from "@perkos/ui-payment-thirdweb";

const chain = getThirdwebChain(43114); // Returns avalanche chain object
```

### isChainSupported(chainId)

Check if a chain ID is supported.

```tsx
import { isChainSupported } from "@perkos/ui-payment-thirdweb";

isChainSupported(43114); // true (Avalanche)
isChainSupported(999);   // false
```

## Supported Chains

| Chain | Chain ID |
|-------|----------|
| Ethereum | 1 |
| Avalanche | 43114 |
| Avalanche Fuji | 43113 |
| Base | 8453 |
| Base Sepolia | 84532 |
| Celo | 42220 |
| Celo Sepolia | 11142220 |

## License

MIT
npm package: @perkos/util-errors
Description: Error handling utilities and classes for vendor services
Author: PerkOS
Latest version: 1.0.0

# @perkos/util-errors

Error handling utilities and classes for vendor services with Zod integration.

## Installation

```bash
npm install @perkos/util-errors
```

## Usage

```typescript
import {
  AppError,
  ValidationError,
  PaymentError,
  formatErrorResponse,
  getErrorStatusCode,
} from "@perkos/util-errors";
import { z } from "zod";

// Throw application errors with context
throw new AppError("Something went wrong", 500, true, { userId: "123" });

// Throw validation errors
throw new ValidationError("Invalid input", [{ field: "email", message: "Required" }]);

// Create from Zod errors
try {
  schema.parse(data);
} catch (error) {
  if (error instanceof z.ZodError) {
    throw ValidationError.fromZodError(error);
  }
}

// Payment errors for x402
throw new PaymentError("Payment failed", "Insufficient funds");

// Format errors for API response
const response = formatErrorResponse(error);
const statusCode = getErrorStatusCode(error);
```

## Error Classes

### `AppError`
Base error class with HTTP status code and context.

```typescript
new AppError(message, statusCode?, isOperational?, context?)
```

### `ValidationError`
For request validation failures with Zod integration.

```typescript
new ValidationError(message?, details?)
ValidationError.fromZodError(zodError)
```

### `PaymentError`
For x402 payment-related failures.

```typescript
new PaymentError(message, reason?, transactionHash?, context?)
```

### Other Errors
- `NotFoundError` (404)
- `UnauthorizedError` (401)
- `ForbiddenError` (403)
- `RateLimitError` (429)
- `ServiceUnavailableError` (503)

## Utilities

### `formatErrorResponse(error)`
Format any error for API response.

### `getErrorStatusCode(error)`
Get HTTP status code from any error.

### `isOperationalError(error)`
Check if error is operational (expected) vs programming error.

### `createErrorHandler(options?)`
Create error handler middleware.

## License

MIT
npm package: @perkos/util-tokens
Description: ERC20 token detection utilities for reading on-chain token metadata
Author: PerkOS
Latest version: 1.0.0

# @perkos/util-tokens

ERC20 token detection utilities for reading on-chain token metadata. Essential for EIP-712 domain construction in payment signatures.

## Installation

```bash
npm install @perkos/util-tokens
```

## Usage

```typescript
import { detectTokenInfo, getChainId, getRpcUrl } from "@perkos/util-tokens";

// Detect token information from contract
const tokenInfo = await detectTokenInfo(
  "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
  "avalanche"
);

console.log(tokenInfo);
// {
//   address: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
//   name: "USD Coin",
//   symbol: "USDC",
//   decimals: 6,
//   chainId: 43114
// }

// Get chain ID for a network
const chainId = getChainId("base-sepolia"); // 84532

// Get RPC URL
const rpcUrl = getRpcUrl("avalanche");
```

## Features

- **Automatic Caching**: Token info is cached to avoid repeated RPC calls
- **Multi-Network Support**: Avalanche, Base, Celo (mainnet and testnets)
- **CAIP-2 Support**: Accepts both legacy and CAIP-2 network identifiers
- **TypeScript**: Full type definitions included

## API

### `detectTokenInfo(tokenAddress, network, config?)`

Detect token information from a contract address.

- `tokenAddress`: ERC20 token contract address
- `network`: Network name or CAIP-2 identifier
- `config`: Optional configuration with custom RPC URL

Returns `TokenInfo | null`

### `getChainId(network)`

Get chain ID for a network name.

### `getRpcUrl(network, customUrl?)`

Get RPC URL for a network.

### `clearTokenCache()`

Clear the token info cache.

## Supported Networks

- Avalanche (43114)
- Avalanche Fuji (43113)
- Base (8453)
- Base Sepolia (84532)
- Celo (42220)
- Celo Sepolia (11142220)

## License

MIT
npm package: @perlatsp/gridsome-source-devto
Description: https://Dev.to source plugin for gridsome
Author: @perlatsp
Latest version: 0.0.1

# @perlatsp/gridsome-source-devto

> Gridsome plugin to retrieve posts from http://dev.to. This package is under development and
API might change before v1 is released.

## Install
 
 ```bash
 yarn add @perlatsp/gridsome-source-devto
 ```
or 
```bash
npm install @perlatsp/gridsome-source-devto
```

## Usage
- Get an API Key from https://dev.to/settings/account
- Add the plugin config inside `gridsome.config.js` plugins array.

<details open><summary><code>gridsome.config.js</code></summary>

```js
module.exports = {
  plugins: [
    ...other gridsome plugins
   {
      use: '@perlatsp/gridsome-source-devto',
      options: {
        typeName: 'Article',
        username:'DEVTO_USERNAME', //change username
        apiKey: process.env.DEVTO_API_KEY, //get your API key from https://dev.to/settings/account
        route: '/:slug',
      }
    }
  ]
}
```
</details>


## Loop Query
Inside  `<page-query>` add the following query to get all articles from http://dev.to




<details open>
<summary> <code>./src/Pages/Index.vue </code></summary>

```html
<template>
    <Layout>
        <div v-for="{ node } in $page.allArticle.edges" :key="node.id">
            <g-link :to="node.path" class="single-post-link"> {{node.title}}</g-link>
        </div> 
    </Layout>
</template>

<page-query>
  query Home($page: Int) {
    allArticle {
      edges {
        node {
        id
        title
        published_at
        description
        tag_list
        canonical_url
        cover_image
        }
      }
    }
  }
</page-query>

<script>
  export default {
    metaInfo: {
      title: 'Welcome to my blog :)'
    }
  }
</script>
<style lang="scss" scoped>
   
</style>

```

</details>

## Single Article

Normally, you need to create a `[typeName].vue` inside `./src/templates` of your gridsome project.
and then add the query for the post details. 

 <details open>
 <summary><code>./src/templates/Article.vue</code></summary>

```vue
<template>
  <Layout>
     {{$page.article}}
  </Layout>
</template>

<page-query>
query Post($path: String!) {
    article(path: $path) {
       id
        title
        published_at
        description
        tag_list
        canonical_url
        cover_image
    }
}
</page-query>

<script>
  export default {

    data(){
      return {
        headings:NodeList
      } 
    },
    metaInfo() { 
      return {
        title: this.$page.article.title
      }
    },
  }
</script>

<style lang="scss" scoped>
  

</style>
```

 </details>


## TODO
- [x] Get posts
- [ ] Create pagination
- [ ] Refactor
- [ ] ADD NEW FEATURE HERE 


Feel free to use this plugin.
npm package: @perlboy/cfworker-jwt
Description: Tiny lib for decoding JWTs and verifying signatures, using native crypto APIs
Author: Jeremy Danyow
Latest version: 3.0.8

# cfworker/jwt

![](https://badgen.net/bundlephobia/minzip/@cfworker/jwt)
![](https://badgen.net/bundlephobia/min/@cfworker/jwt)
![](https://badgen.net/bundlephobia/dependency-count/@cfworker/jwt)
![](https://badgen.net/bundlephobia/tree-shaking/@cfworker/jwt)
![](https://badgen.net/npm/types/@cfworker/jwt?icon=typescript)

Tiny lib for decoding JWTs and verifying signatures, using native crypto APIs.

Currently supports RS256, RS384, and RS512.

```js
const jwt = request.headers.get('Authorization');
const issuer = '...'; // Auth0 origin.
const audience = '...'; // Auth0 client id.

const result = await parseJwt(jwt, issuer, audience);
if (!result.valid) {
  console.log(result.reason); // Invalid issuer/audience, expired, etc
} else {
  console.log(result.payload); // { iss, sub, aud, iat, exp, ...claims }
}
```
npm package: @perly/core
Description: Platform-agnostic core SDK
Latest version: 0.0.7

# @perly/core

Platform-agnostic core utilities for the Perly JavaScript SDK.

## When to use this package

`@perly/core` is primarily intended for framework integrations.

If you are integrating Perly into an application, you will usually want a framework-specific package instead of using `@perly/core` directly.

## Related packages

- [@perly/nestjs](https://www.npmjs.com/package/@perly/nestjs)
- `@perly/express`
- `@perly/fastify`

## Installation

```bash
yarn add @perly/core
```
npm package: @perly/nestjs
Description: NestJS SDK integration
Latest version: 0.0.11

## Installation
```bash
yarn add @perly/nestjs @nestjs/common @nestjs/core rxjs
```
## Usage
Inside `app.module.ts`
```typescript
import { Module } from '@nestjs/common';
import { PerlyModule, PerlyUserResolver } from '@perly/nestjs';
//... other imports

@Module({
  imports: [
    PerlyModule.forRoot({
      apiKey: process.env.PERLY_API_KEY, //or which other way to import your env
    }),
    // ... other imports
  ],
  controllers: [/* ...controllers*/],
  providers: [
    { provide: PerlyUserResolver, useClass: AppPerlyUserResolver }, 
    // ... other providers
  ],
})
export class AppModule {}
```
Create a new file called `perly.service.ts`
```typescript
import { Injectable } from '@nestjs/common';
import { PerlyBuilder, PerlyUser, PerlyUserResolver } from '@perly/nestjs';
import { UserService } from './user.service';

@Injectable()
export class AppPerlyUserResolver implements PerlyUserResolver {
  constructor(private readonly usersService: UserService) { //or which other services need to get the userId from request

  }

  async resolve(req: Request): Promise<PerlyUser | null> {
    if (!req.url) return null;
    const userId = await this.usersService.findById(req.headers['user-id']);
    
    const user = await new PerlyBuilder()
      .setId(userId)
      .setMetadata({ plan: user.plan, region: user.region })
      .linkStripeById(user.stripeId)
      .linkHubspotById(user.hubspotId)
      .build();
    
    return user;
  }
}

```
npm package: @perly/runtime-deno
Description: Deno support package for the Perly JavaScript SDK
Latest version: 0.0.3

# @perly/runtime-deno

Runtime adapter for Deno for the Perly JavaScript SDK.

## When to use this package

`@perly/runtime-deno` is primarily intended for framework integrations.

If you are integrating Perly into an application, you will usually want a framework-specific package instead of using `@perly/runtime-deno` directly.

## What it provides

This package provides runtime lifecycle hooks for Deno so framework integrations can flush buffered Perly events before the runtime exits.

It is used internally by framework adapters that support Deno runtimes.

## Related packages

- `@perly/express`
- [`@perly/core`](https://www.npmjs.com/package/@perly/core)

## Installation

```bash
yarn add @perly/runtime-deno
```
npm package: @perly/runtime-node
Description: Node.js and Bun support package for the Perly JavaScript SDK
Latest version: 0.0.3

# @perly/runtime-node

Runtime adapter for Node.js and Bun for the Perly JavaScript SDK.

## When to use this package

`@perly/runtime-node` is primarily intended for framework integrations.

If you are integrating Perly into an application, you will usually want a framework-specific package instead of using `@perly/runtime-node` directly.

## What it provides

This package provides runtime lifecycle hooks for Node.js and Bun so framework integrations can flush buffered Perly events before the process exits.

It is used internally by framework adapters such as `@perly/express` and `@perly/fastify`.

## Related packages

- [@perly/nestjs](https://www.npmjs.com/package/@perly/nestjs)
- `@perly/express`
- `@perly/fastify`
- [`@perly/core`](https://www.npmjs.com/package/@perly/core)

## Installation

```bash
yarn add @perly/runtime-node
```
npm package: @permadb/client
Description: Client-side encrypted database with permanent storage on Arweave
Author: PermaDB
Latest version: 0.1.3

# @permadb/client

Permanent, encrypted database powered by Arweave.

## Installation

    npm install @permadb/client

## Usage

    import { PermaDatabase } from '@permadb/client';
    
    const db = new PermaDatabase('my-database');
    
    await db.authenticate();
    
    await db.createTable('users', {
      name: 'string',
      email: 'string',
      age: 'number'
    });
    
    const txId = await db.insert('users', {
      name: 'Alice',
      email: 'alice@example.com',
      age: 28
    });
    
    const users = await db.query('users');

## Features

- Client-side encryption
- Permanent Arweave storage
- Immutable records
- Version history

## API

### Constructor

    new PermaDatabase(databaseId: string)

### Methods

**authenticate()**  
Opens browser for wallet authentication.

**createTable(name, schema)**  
Creates a new table with specified schema.

**insert(table, data)**  
Inserts encrypted data. Returns transaction ID.

**query(table, filter?)**  
Queries table data with optional filter function.

**update(table, rowId, data)**  
Updates existing row. Creates new version.

**delete(table, rowId)**  
Marks row as deleted.

## License

MIT