open-index/open-npm huggingface dataset:
npm package: @surge/netrc
Description: Parse netrc files
Author: Cameron Bytheway
Latest version: 0.1.5-beta.5

netrc [![Build Status](https://travis-ci.org/camshaft/netrc.png?branch=master)](https://travis-ci.org/camshaft/netrc)
=====

Parse netrc files

Usage
-----

```js
var netrc = require('netrc');

var myNetrc = netrc();

console.log(myNetrc['github.com'])
// { login: 'my-oauth-token',
//   password: 'x-oauth-basic' }

myNetrc['github.com'].login = 'my-new-oauth-token';

netrc.save(myNetrc);
```

API
---

### netrc([file])

Loads a `.netrc` file, defaulting to `~/.netrc`

### netrc.parse(string)

Parses netrc formatted string into an object:

```json
{
  "machine1.example.com": {
    "login": "my-login",
    "password": "my-password"
  },
  "machine2.example.com": {
    "login": "my-other-login",
    "password": "my-other-password"
  }
}
```

### netrc.format(object)

Formats a netrc object into a valid string

### netrc.save(object)

Persists a netrc object to `~/.netrc`

## Tests

```
$ npm test
```
npm package: @surgebuild/bitcoin-zkp-sdk
Description: Bitcoin ZKP SDK for blockchain applications
Author: SurgeBuild
Latest version: 1.0.4

# @surgebuild/bitcoin-zkp-sdk

A TypeScript library for submitting and verifying Zero-Knowledge Proofs (ZKP) on Bitcoin through the Surge network.

## Features

- Submit ZK proofs to the Surge blockchain
- Verify proof transactions
- Built-in support for file handling and binary data encoding
- Cosmos SDK compatible
- TypeScript support with full type definitions

## Installation

```bash
npm install @surgebuild/bitcoin-zkp-sdk
```

## Usage

### Initialize the Client

```typescript
import { SurgeClient } from '@surgebuild/bitcoin-zkp-sdk';

// Initialize with default options
const client = new SurgeClient();

// Initialize with private key
await client.init("your_private_key");
```

### Submit a Proof

```typescript
await client.submitProof(
    "creator_address",
    "method_id_file_path",
    "proof_file_path",
    "proof_system",
    "public_input_file_path"
);
```

### Verify a Transaction settlement on Bitcoin 

```typescript
const result = await client.verifyTransaction("transaction_hash");
```

## Configuration

Default configuration:
- RPC URL: https://alphatestnet.surge.dev/
- Chain ID: surge-alphatestnet-1
- Gas Price: 0.025usurg

## Dependencies

- @cosmjs/cosmwasm-stargate
- @cosmjs/proto-signing
- @cosmjs/stargate
- cosmjs-types
- buffer

## Development

```bash
# Build the project
npm run build

# Watch mode during development
npm run dev
```

## License

MIT
npm package: @surgecredit/earn-sdk
Description: Surge Earn SDK for listing markets and managing liquidity deposits from web wallets.
Latest version: 0.1.3

# Surge Earn SDK

TypeScript SDK for integrating Surge Earn in web wallets and frontend apps.

Important behavior:
- Users become LPs by depositing USDC into the shared liquidity pool.
- There is no direct per-market deposit function on the pool.
- Variable/fixed market targeting is controlled by `setExposure`/`setExposures` before or after deposit.

## Install

```bash
npm install @surgecredit/earn-sdk@latest viem
```

## Quick start

```ts
import { createWalletClient, custom } from "viem";
import { baseSepolia } from "viem/chains";
import {
  SURGE_BASE_SEPOLIA_CONFIG,
  SurgeEarnClient,
  createSurgeEarnPublicClient,
} from "@surgecredit/earn-sdk";

const publicClient = createSurgeEarnPublicClient("https://sepolia.base.org", baseSepolia);
const walletClient = createWalletClient({
  chain: baseSepolia,
  transport: custom(window.ethereum),
});

const earn = new SurgeEarnClient({
  publicClient,
  walletClient,
  config: SURGE_BASE_SEPOLIA_CONFIG,
});

const markets = await earn.listMarkets();
```

## Most-used methods

- Reads: `listMarkets`, `getUserPosition`, `getUserExposures`, `getWalletUsdcBalance`, `getAllowance`
- Writes: `approveMaxUsdc`, `deposit`, `depositAsLp`, `withdrawByUsdc`, `withdrawByLpTokens`, `setExposure`, `setExposures`
- Activity: `listActivity`, `getUserActivity`, `listDepositEvents`, `listWithdrawEvents`

Write compatibility notes:

- SDK write methods accept either a wallet address or a full account object.
- If your `walletClient` is created with `account` (for example `mnemonicToAccount`), write methods use that signer directly.
- If your `walletClient` is injected (for example `window.ethereum`), the SDK resolves the connected address automatically.

## Deposit example

```ts
const address = "0xYourWalletAddress";
const amountUsdc = "100";

const allowance = await earn.getAllowance(address);
if (allowance === 0n) {
  await earn.approveMaxUsdc({ account: address, waitForReceipt: true });
}

await earn.deposit({ amountUsdc, account: address, waitForReceipt: true });
```

## Fixed/variable targeting

Set exposures, then deposit as LP:

```ts
await earn.depositAsLp({
  account: "0xYourWalletAddress",
  amountUsdc: "100",
  exposureUpdates: [
    { marketId: 2, exposurePercent: 100 },
  ],
  waitForReceipt: true,
});
```

- Example above routes new LP allocation toward fixed market `2` by setting exposure first.
- For variable-first behavior, keep fixed exposures at `0` and call `deposit`.

## React hooks

```ts
import { useEarnActivity, useEarnMarkets, useEarnPortfolio } from "@surgecredit/earn-sdk/react";
```

- `useEarnMarkets(client, { includeInactive?, pollIntervalMs? })`
- `useEarnPortfolio(client, address)`
- `useEarnActivity(client, { user?, fromBlock?, toBlock?, includeTimestamps?, limit?, pollIntervalMs? })`

## Examples

- MetaMask helper snippet: `examples/snippets/metamask-write.ts`
- End-to-end wallet demo: `examples/test-wallet`

Run wallet demo:

```bash
cd examples/test-wallet
npm install
npm run dev
```