open-index/open-npm huggingface dataset:
npm package: @scallop-dao/sui-package-kit
Description: Tookit for publish/upgrade/build SUI packages
Author: scallop-io
Latest version: 0.32.5

# SUI Package Kit
Tookit for publish/upgrade/build SUI packages

## Pre-requisites

1, Install SUI cli (optional: only needed for publishing packages)

Please refer to the official documentation: [How to install SUI cli](https://docs.sui.io/devnet/build/install)
npm package: @scallop-dao/sui-sdk
Description: Tookit for interacting with Scallop on SUI
Author: team@scallop.io
Latest version: 0.1.1

```typescript

const txBuilder = scallopSui.createTxBuilder(obl);
txBuilder.addCollateral(SUI);
const USDC =  txBuilder.borrow(1000, 'USDCType');
// ... do some arbitrage here
txBuilder.repay(USDC)
const SUI = txBuilder.withdraw('SUIType')
txBuilder.transferObjects([SUI], sender)

```
npm package: @scallop-io/scallop-swap-sdk
Description: Scallop Swap Meta Aggregator SDK for Sui Blockchain developed by Scallop Labs.
Author: team@scallop.io
Latest version: 3.0.0

### Scallop Swap Meta Aggregator SDK

A unified SDK that aggregates existing swap aggregators on Sui, including Aftermath, Cetus, 7K, and FlowX and provides a generic `SwapSdkBase` class for seamless integration and extension with future swap aggregators.

#### Adding a Custom SDK Integration

Extend `SwapSdkBase` with your own SDK-specific generic types:

```typescript
import { SwapSdkBase, SwapSdkConstructorParams } from '@scallop-io/scallop-swap-sdk';

class MyDexSwap extends SwapSdkBase<MyPoolType, MyRawRoute, MyFetchSettings, MyClient> {
  constructor(params: SwapSdkConstructorParams<MyFetchSettings>) {
    super('mydex', params);
    this.client = new MyClient(/* ... */);
  }

  // Implement abstract methods: fetchRoute, buildSwapTransaction, setFetchRouteSettings, calcSlippage
}
```

To get type-safe access via `aggregator.getAggregator('mydex')`, extend the `SdkRegistry` interface using declaration merging:

```typescript
declare module '@scallop-io/scallop-swap-sdk' {
  interface SdkRegistry {
    mydex: MyDexSwap;
  }
}

// Now fully typed:
const mydex = aggregator.getAggregator('mydex'); // MyDexSwap | undefined
mydex?.client; // MyClient | undefined
```
npm package: @scallop-io/sui-kit-plugins
Description: Plugins for SUI Kit
Author: team@scallop.io
Latest version: 0.37.1

# Sui Kit Plugins
This repo contains plugins for Sui Kit. 

## Plugin list
- Shinami sponsored transaction plugin

## Pre-requisite

**SuiKit**
`SuiKit` is required to use these plugins.
Please refer to the [Sui Kit documentation](!https://github.com/scallop-io/sui-kit) on how to install.


## Install
```bash
npm install @scallop-io/sui-kit-plugins
```

## Usage

### Shinami sponsored transaction plugin
This plugin will automatically sponsor your transaction with Shinami gas.
In order to use this plugin, you'll need to get a `Gas access key` from Shinami.
[How to get gas access key](!https://docs.shinami.com/reference/gas-station-api)

```typescript
import { SuiKit, SuiTxBlock } from '@scallop-io/sui-kit';
// import plugins, they will dynamically register themselves to SuiKit
import '@scallop-io/sui-kit-plugins';
import * as process from "process";

let suiKit = new SuiKit({secretKey: process.env.SECRET_KEY});
// init Shinami gas sponsor before using it
suiKit.initShinamiGasSponsor(process.env.GAS_ACCESS_KEY);

/**
 * This is an example of using sponsored transaction plugin in nodejs.
 */
async function forNodejs() {
  // Create a transaction
  const tx = new SuiTxBlock();
  tx.transferObjects(['<obj_id>'], '<sender_address>');

  const gasBudget = 10 ** 9;
  // Sponsor the transaction, and send it
  const res = await suikit.signAndSendShinamiSponsoredTxn(tx, gasBudget);
  return res;
}

/**
 * This is an example of using sponsored transaction plugin in browser.
 */
async function forBrowser() {
  // Create a transaction
  const tx = new SuiTxBlock();
  tx.transferObjects(['<obj_id>'], '<sender_address>');

  const gasBudget = 10 ** 9;
  // Sponsor the transaction
  const sender =  '<sender_address>';
  const sponsoredTx = await suikit.requestShinamiSponsorship(tx, gasBudget, sender);
  // Get the user's signature from wallet
  const txBytes = sponsoredTx.txBytes;
  // Implement your own function to get user's signature from wallet
  const userSignature = await getUserSignatureFromWallet(txBytes);
  // Send the signed sponsored transaction
  const res = await suikit.sendShinamiSponsoredTxn(sponsoredTx, userSignature);
  
  return res;
}
```
npm package: @scallop-io/sui-package-kit
Description: Toolkit for publish/upgrade/build SUI packages
Author: team@scallop.io
Latest version: 1.21.3

# SUI Package Kit
Tookit for publish/upgrade/build SUI packages

## Pre-requisites

1. Install SUI cli (optional: only needed for publishing packages)

Please refer to the official documentation: [How to install SUI cli](https://docs.sui.io/devnet/build/install)