open-index/open-npm huggingface dataset:
npm package: @coin-flip/referrer-system-coinflip-tact
Description: This project is written using Blueprint Framework
Latest version: 0.0.1

# Referrer system coinflip smart contract
This project is written using Blueprint Framework

## Smart contract overview
This repository includes Referrer system coinflip smart contract, interaction scripts and tests.

## Project structure

-   `contracts` - source code of all the smart contracts of the project and their dependencies.
-   `wrappers` - wrapper classes (implementing `Contract` from ton-core) for the contracts, including any [de]serialization primitives and compilation functions.
-   `tests` - tests for the contracts.
-   `scripts` - scripts used by the project, mainly the deployment scripts.

## How to use

### Build

`npx blueprint build` or `yarn blueprint build`

### Test

`npx blueprint test` or `yarn blueprint test`

### Deploy or run another script

`npx blueprint run` or `yarn blueprint run`

### Add a new contract

`npx blueprint create ContractName` or `yarn blueprint create ContractName`
npm package: @coinbase-sample/exchange-sdk-ts
Description: Welcome to the Coinbase Exchange API TypeScript SDK. This TypeScript project was created to allow developers to easily plug into the [Coinbase Exchange API](https://docs.cdp.coinbase.com/exchange/docs/welcome).
Latest version: 0.1.0

# Coinbase Exchange API TypeScript SDK

## Overview

Welcome to the Coinbase Exchange API TypeScript SDK. This TypeScript project was created to allow developers to easily plug into the [Coinbase Exchange API](https://docs.cdp.coinbase.com/exchange/docs/welcome).

---

## Installation

```bash
npm install @coinbase-sample/exchange-sdk-ts
```

## License

The _Exchange Typescript SDK_ sample library is free and open source and released under the [Apache License, Version 2.0](LICENSE).

The application and code are only available for demonstration purposes.

## Usage

Here are a few examples requests:

**Configure Credentials**

```
const creds = JSON.parse(process.env.EXCHANGE_CREDENTIALS);

const credentials = new CoinbaseExchangeCredentials(
  creds.AccessKey,
  creds.SecretKey,
  creds.Passphrase
);

const client = new CoinbaseExchangeClient(credentials);
```

**[List Orders]https://docs.cdp.coinbase.com/exchange/reference/exchangerestapi_getorders)**

```
const service = new OrdersService(client);

service
  .listOrders()
  .then((orders) => {
    console.log(orders);
  })
  .catch(console.error);
```

**[Get Trading Pairs](https://docs.cdp.coinbase.com/exchange/reference/exchangerestapi_getproducts)**

```
const service = new ProductsService(client);

service
    .listTradingPairs({entityId: "somePortfolioId"})
    .then((result) => {
        console.log(result);
    })
    .catch((error) => {
        console.error(error.message);
    });
```

**[Create Order](https://docs.cdp.coinbase.com/exchange/reference/exchangerestapi_postorders)**

_$10 Market Buy on BTC-USD_

```
client
    .createOrder({
        portfolioId: "somePortfolioId",
        productId: "BTC-USD",
        side: OrderSide.BUY,
        type: OrderType.Market,
        baseQuantity: "0.0001"
    })
    .then((result) => {
        console.log(result);
    })
    .catch((error) => {
        console.error(error.message);
    });
```

## Development Installation

```bash
npm install
```

---

## Build and Use

To build the project, run the following command:

```bash
npm run build
```

_Note: To avoid potential issues, do not forget to build your project again after making any changes to it._

After building the project, each `.ts` file will have its `.js` counterpart generated.

To run a file, use the following command:

```
node dist/{INSERT-FILENAME}.js
```

For example, a `main.ts` file would be run like:

```bash
node dist/main.js
```

---
npm package: @coinbase/farcaster-langchain
Description: Farcaster langchain Toolkit extension of CDP Agentkit
Latest version: 0.0.1
Deprecated: Please use @coinbase/agentkit and @coinbase/agentkit-langchain instead.

# CDP Agentkit Extension - Farcaster Langchain Toolkit

This toolkit contains tools that enable an LLM agent to interact with Farcaster using Neynar's API. The toolkit provides a wrapper around the Neynar API, allowing agents to interact with Farcaster and perform actions like posting casts.

## Setup

### Prerequisites

- [Farcaster Account](https://docs.farcaster.xyz/developers/guides/accounts/create-account)
- [Neynar API Key](https://neynar.com)
- [Neynar Managed Signer ID](https://docs.neynar.com/docs/integrate-managed-signers)
- [OpenAI API Key](https://platform.openai.com/docs/quickstart#create-and-export-an-api-key)
- Node.js 18 or higher

### Installation

```bash
npm install @coinbase/farcaster-langchain
```

### Environment Setup

Set the following environment variables:

```bash
export CDP_API_KEY_NAME=<your-api-key-name>
export CDP_API_KEY_PRIVATE_KEY=$'<your-private-key>'
export AGENT_FID=<your-farcaster-fid>
export NEYNAR_API_KEY=<your-neynar-api-key>
export NEYNAR_MANAGED_SIGNER=<your-neynar-managed-signer>
export OPENAI_API_KEY=<your-openai-api-key>
export NETWORK_ID=base-sepolia  # Optional: Defaults to base-sepolia
```

## Usage

### Basic Setup

```typescript
import { FarcasterToolkit } from "@coinbase/farcaster-langchain";
import { FarcasterAgentkit } from "@coinbase/cdp-agentkit-core";

// Initialize LLM
  const llm = new ChatOpenAI({ model: "gpt-4o-mini" });

// Farcaster Agentkit
const farcasterAgentkit = new FarcasterAgentkit();

// Farcaster Toolkit
const farcasterToolkit = new FarcasterToolkit(farcasterAgentkit);

// Get available Farcaster tools
const tools = farcasterToolkit.getTools();
```

The toolkit provides the following tools:

1.  **farcaster_account_details** - Retrieve account details for the agent's Farcaster account
2.  **farcaster_post_cast**       - Post a cast to Farcaster


## Examples

Check out [farcaster-langchain/examples](./examples) for sample implementations!
- [Chatbot Typescript](./examples/chatbot-typescript/README.md): Simple example of a Node.js Chatbot that can post casts to Farcaster.
npm package: @coinmasters/e2e-swap-suite
Description: 1. **SDK Init & Portfolio Fetch** - 1.3s response, $331.01 total 2. **Auto-Balance Intelligence** - Correctly identifies highest balance → best target 3. **FAIL FAST Behavior** - NO fallbacks, exposes real errors
Latest version: 1.13.10

# E2E Swap Test Suite

## ✅ PROVEN WORKING

1. **SDK Init & Portfolio Fetch** - 1.3s response, $331.01 total
2. **Auto-Balance Intelligence** - Correctly identifies highest balance → best target
3. **FAIL FAST Behavior** - NO fallbacks, exposes real errors

## ❌ PRIORITY BUG: Router Not Finding Quotes for BTC → ETH.USDC

### Evidence

**Thorchain Integration HAS Both Assets**:
- Line 57: `'bip122:000000000019d6689c085ae165831e93/slip44:0'` (BTC) ✅
- Line 79: `'eip155:1/erc20:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'` (ETH.USDC) ✅

**Router Check Failing**: `modules/pioneer/pioneer-router/src/index.ts:339-341`

```typescript
let supportedAssets = AssetsByIntegration[integration];
let supportsBothAssets = supportedAssets.includes(quote.sellAsset) && 
                         supportedAssets.includes(quote.buyAsset);
```

### Debugging Added

Added console.log to router init (line 122-126) to show:
- Total Thorchain assets count
- Whether BTC is in array
- Whether ETH.USDC is in array

### Next Steps

1. Rebuild router: `cd modules/pioneer/pioneer-router && bun run build`
2. Restart server: `make stop && make start`
3. Make quote request (triggers router init)
4. Check console output for Thorchain asset debug info
5. Verify AssetsByIntegration is populated correctly

## Test Commands

```bash
# Auto-balance (finds best swap automatically)
bun run swap-auto

# Manual swap
bun run swap <sellAsset> <buyAsset> <amount>

# Headless test suite
bun run dev
```

## Current Portfolio

```
BTC: $196.24 (highest)
ETH: $101.32
LTC: $8.77
BCH: $7.90
```

**Priority Swap**: BTC → ETH.USDC (highest balance → primary stablecoin)

---

**Status**: Router bug - AssetsByIntegration check failing despite both assets present
**Action Required**: Debug why includes() not finding assets