open-index/open-npm huggingface dataset:
npm package: @jwtwallet/core
Description: JWTWallet Protocol - Server-side JWKS generation and management
Author: Mehmet Emin Kartal
Latest version: 0.1.0

# jwtwallet

Server-side JWKS generation and management for the [JWTWallet Protocol](https://github.com/jwtwallet/protocol).

## Installation

```bash
npm install jwtwallet
# or
yarn add jwtwallet
```

## Usage

### Create a Wallet

```typescript
import { JWTWallet } from 'jwtwallet';

// Create with default platform (jwtwallet.com)
const wallet = await JWTWallet.create();

// Or with custom platform
const wallet = await JWTWallet.create({
  platform: 'keys.mycompany.com',
});

console.log(wallet.accountId);  // "abc123..." → use as subdomain
console.log(wallet.issuer);     // "https://abc123.jwtwallet.com"
```

### Add Signing Keys

```typescript
import * as jose from 'jose';

// Generate key pair (you keep the private key!)
const { publicKey, privateKey } = await jose.generateKeyPair('ES256');
const publicJWK = await jose.exportJWK(publicKey);

// Add only the public key to wallet
wallet.addSigningKey({
  kid: 'my-key-1',
  alg: 'ES256',
  publicKey: publicJWK,
});
```

### Export Signed JWKS

```typescript
const jwks = await wallet.signAndExportJwtWalletJWKS();
// {
//   keys: [{ kty: 'EC', ... }],
//   jwtwallet: {
//     version: 1,
//     accountPublicKey: { ... },
//     signature: "...",
//     revoked: []
//   }
// }

// Host this at: https://{accountId}.{platform}/.well-known/jwks.json
```

### Revoke Keys

```typescript
wallet.revokeKey('my-key-1');

const jwks = await wallet.signAndExportJwtWalletJWKS();
// jwks.jwtwallet.revoked = ['my-key-1']
```

### Backup & Restore

```typescript
// Export (includes account private key)
const backup = await wallet.export();
// Store backup securely!

// Import
const restored = await JWTWallet.import(backup);
```

### Validate JWKS

```typescript
import { validateJWKS } from 'jwtwallet';

const result = await validateJWKS(jwks, 'https://abc123.jwtwallet.com');
if (!result.valid) {
  console.error(result.error);
}

// Or self-validate
const result = await wallet.validate();
```

## How It Works

1. **Account Key**: Each wallet has an account key pair (ES256). The public key hash becomes your account ID (subdomain).

2. **Signing Keys**: You generate signing keys externally and register only the public keys with your wallet.

3. **JWKS Signing**: When you export, the wallet signs `canonical(keys) || canonical(accountPublicKey) || issuer` with the account private key.

4. **Verification**: Clients use [jwtwallet-jose](https://github.com/jwtwallet/jwtwallet-jose) to verify the JWKS trust chain before using keys.

## Related

- [jwtwallet-jose](https://github.com/jwtwallet/jwtwallet-jose) - Client-side JWKS verification
- [JWTWallet Protocol](https://github.com/jwtwallet/protocol) - Protocol specification

## License

MIT
npm package: @jwtwallet/jose
Description: JWTWallet Protocol client - Trustless JWKS verification
Author: Mehmet Emin Kartal
Latest version: 2.1.1

# @jwtwallet/jose

JWTWallet Protocol extension for [jose](https://github.com/panva/jose).

## Installation

```bash
npm install @jwtwallet/jose jose
```

## Usage

```typescript
import * as jose from 'jose';
import { createJwtWallet } from '@jwtwallet/jose';

const JWKS = createJwtWallet('https://abc123.jwtwallet.com');

const { payload } = await jose.jwtVerify(token, JWKS, {
  issuer: 'https://abc123.jwtwallet.com',
  audience: 'my-app'
});
```

## API

### `createJwtWallet(issuer, options?)`

Creates a JWTWallet-aware remote JWKS verifier. Drop-in compatible with `jose.jwtVerify()`.

**Parameters:**
- `issuer` - The issuer URL (e.g., `'https://abc123.jwtwallet.com'`)
- `options` - Configuration options (see below)

**Options:**
```typescript
interface JWTWalletOptions {
  timeoutDuration?: number;    // HTTP timeout in ms (default: 5000)
  cooldownDuration?: number;   // Min time between fetches in ms (default: 30000)
  cacheMaxAge?: number;        // Max cache age in ms (default: 600000)
  headers?: Record<string, string>;  // Custom HTTP headers
  [customFetch]?: FetchImplementation;  // Custom fetch function
  [jwksCache]?: JWKSCacheInput;  // External cache for serverless
}
```

**Returns:**

A key set function with additional properties:
- `.coolingDown` - Whether the cooldown period is active
- `.fresh` - Whether the cache is still fresh
- `.reloading` - Whether a fetch is in progress
- `.reload()` - Manually trigger a refresh
- `.jwks()` - Get the cached JWKS

## What it does

1. Fetches JWKS from `{issuer}/.well-known/jwks.json`
2. If `jwtwallet` extension present:
   - Verifies URL account ID matches embedded public key hash
   - Verifies JWKS signature (keys + accountPublicKey + issuer)
   - Checks key revocation list on each verification
3. Returns key set compatible with `jose.jwtVerify()`

## Custom Fetch

```typescript
import { createJwtWallet, customFetch } from '@jwtwallet/jose';

const JWKS = createJwtWallet('https://abc123.jwtwallet.com', {
  [customFetch]: (url, options) => {
    // Custom fetch logic (proxy, retry, logging, etc.)
    return fetch(url, options);
  }
});
```

## Serverless Cache

```typescript
import { createJwtWallet, jwksCache } from '@jwtwallet/jose';

// Load from KV store
const cache = await kv.get('jwks-cache') || {};

const JWKS = createJwtWallet('https://abc123.jwtwallet.com', {
  [jwksCache]: cache
});

await jose.jwtVerify(token, JWKS);

// Save updated cache
if (cache.uat) {
  await kv.set('jwks-cache', cache);
}
```

## Errors

- `JWTWalletTrustError` - JWKS trust verification failed (signature or account ID mismatch)
- `JWTWalletRevokedError` - Key has been revoked

## Protocol

See [JWTWallet Protocol Specification](https://github.com/jwtwallet/protocol).

## License

MIT
npm package: @jwwlai/oranges
Description: Oranges
Author: Julia
Latest version: 0.1.0

# React Webpack Typescript Starter
> Minimal starter with hot module replacement (HMR) for rapid development.

* **[React](https://facebook.github.io/react/)** (16.x)
* **[Webpack](https://webpack.js.org/)** (4.x)
* **[Typescript](https://www.typescriptlang.org/)** (3.x)
* **[Hot Module Replacement (HMR)](https://webpack.js.org/concepts/hot-module-replacement/)** ([React Hot Loader](https://github.com/gaearon/react-hot-loader))
* Production build script (Webpack)
* Image loading/minification ([Image Webpack Loader](https://github.com/tcoopman/image-webpack-loader))
* [SASS](http://sass-lang.com/) support
* Code linting ([ESLint](https://github.com/eslint/eslint)) and formatting ([Prettier](https://github.com/prettier/prettier))
* Test framework ([Jest](https://facebook.github.io/jest/))

## Installation
1. Clone/download repo
2. `yarn install` (or `npm install` for npm)

## Usage
**Development**

`yarn run start-dev`

* Build app continuously (HMR enabled)
* App served @ `http://localhost:8080`

**Production**

`yarn run start-prod`

* Build app once (HMR disabled) to `/dist/`
* App served @ `http://localhost:3000`

---

**All commands**

Command | Description
--- | ---
`yarn run start-dev` | Build app continuously (HMR enabled) and serve @ `http://localhost:8080`
`yarn run start-prod` | Build app once (HMR disabled) to `/dist/` and serve @ `http://localhost:3000`
`yarn run build` | Build app to `/dist/`
`yarn run test` | Run tests
`yarn run lint` | Run linter
`yarn run lint --fix` | Run linter and fix issues
`yarn run start` | (alias of `yarn run start-dev`)

**Note**: replace `yarn` with `npm` in `package.json` if you use npm.

## See also
* [React Webpack Babel Starter](https://github.com/vikpe/react-webpack-babel-starter)
* [Isomorphic Webapp Starter](https://github.com/vikpe/isomorphic-webapp-starter)
npm package: @jwwxeon/myinput
Description: 我的测试输入框
Author: fusion-team
Latest version: 0.1.0

# myinput

一个面向 PC 的业务组件库

## 调试
启动调试

```
npm run lowcode:dev             # 打开开发环境，运行所有组件
```

构建

```
npm run lowcode:build
```