open-index/open-npm huggingface dataset:
npm package: @nekoplanet/aiscript-languageserver
Description: このリポジトリでは、AiScript の言語サーバーの実装をしています。
Latest version: 0.1.6

# aiscript-languageserver (Experimental)

このリポジトリでは、AiScript の言語サーバーの実装をしています。

拡張機能については、[こちら](https://github.com/aiscript-dev/aiscript-vscode)をご覧ください。

## リンク集
- [貢献者向けメモ](./memo.md)
- [VSCode 拡張機能](https://github.com/aiscript-dev/aiscript-vscode)

# インストール方法

```sh
pnpm i -g
```

# 使い方

## 標準入力でLSPを動かす場合

```sh
aiscript-languageserver --stdio
```
npm package: @nekoproject/swap
Description: Cross-chain Swap Token
Author: @minhdocs
Latest version: 1.2.25

# @nekoproject/swap

A complete crypto wallet base support for cross-chain

Table of contents
=================
<!--ts-->
  * [Re-Build](#build)
  * [Install](#install)
  * [Documents](#documents)
    * [Create SwapOrder](#create-swaporder)
    * [Swap Token](#swap-token)
  * [Notice](#notice)
<!--te-->

Build
========
Re-build project from scratch
  - Clean project
    ```bash
      npm run clean
    ```
  - Build
    ```bash
      npm run build
    ```
  - Unit test
    ```bash
      npm run test:cover
    ```
Install
=======
  Install `@nekoproject/swap` with `npm`
  ```bash
    npm i @nekoproject/swap
  ```
  Import
  ```ts
    import {SPLSwap, SwapConfig, SwapOrder, SwapResponse} from '@nekoproject/swap'
  ```
Documents
=========
Init and config SPLSwap instance
```ts
  // address own fee
  const fee = 'ykkvsfEtAhc7faxK3uJTYMPBmtrisGkU9Kv4SnuxzB7'
  const setFee = {
    feeOwner: fee,
    fee: 2
  }

  const swapConfig: SwapConfig = {
    cluster: 'mainnet-beta',
    fee: setFee,
    slippage: 1
  }
  const swap = new SPLSwap(SPLNetworkInstance, swapConfig)
  const wallet = SPLWallet.generateWallet()
```
### SPLSwap methods
 #### Create SwapOrder
   - Config order
       ```ts
         const order = {
           inputToken: /Token/,
           outputToken: /Token/,
           amount: /amount number/,
           slippage: /% slippage/,
         }
       ```
   - Example config order
       ```ts
        const usdcInfo: TokenInfo = {
          decimals: 6,
          mintAddress: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
        }
        const usdtInfo: TokenInfo = {
          decimals: 6,
          mintAddress: 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB',
        }
        const usdcToken = new SPLToken(SPLNetworkInstance, usdcInfo)
        const usdtToken = new SPLToken(SPLNetworkInstance, usdtInfo)
        // order
        const order = {
          inputToken: usdcToken,
          outputToken: usdtToken,
          amount: 1,
          slippage: 1,
         }
       ```
   - Execute create SwapOrder
       ```ts
         const swapRequest = await swap.createSwapOrder(order, wallet)
       ```
 #### Swap Token 
   - Swap Token
       ```ts
          const response: SwapResponse = await swap.swapToken(swapRequest)
          // example
          const response = {
             tx: '5Pz8C8YHBKkGTgSsDYJqzndS62ufTNsApHY3qzc1g14QfpXwGDJoAFLx8RJ2njVgD6pwYgtzHXgwz2AVcdYxtKhp',
             inputAddress: '9xL3QEaqqPR4H67oUhzGLwQzokvMuxeDFuQeAf52GN8A',
             outputAddress: '6T496kvjdFKXG1EgXTa4VKhsNfDeJLi5JBYpySUpEvkf',
             inputAmount: 1000000,
             outputAmount: 995903
          }
          // await transaction confirm 
          const confirmed = await SPLNetworkInstance.provider.confirmTransaction(response.tx)
          console.log(confirmed)
          // output example: { context: { slot: 126425365 }, value: { err: null } }
          console.log(`https://solscan.io/tx/${output.tx}`)
       ```
       

Notice
========
# Ref
npm package: @nekoproject/utils
Description: Cross-chain Utils
Author: @minhdocs
Latest version: 1.0.14

# @nekoproject/token

A complete crypto token base support for cross-chain


# Commands
  - Clean project
    ```bash
      npm run clean
    ```
  - build
    ```bash
      npm run build
    ```
  - publish npm (temporaral)
    ```bash
      npm run publish:token
    ```
# Ref
npm package: @nekoproject/wallets
Description: Cross-chain Wallet
Author: @minhdocs
Latest version: 1.2.12

# @nekoproject/wallets

A complete crypto wallet base support for cross-chain

Table of contents
=================
<!--ts-->
  * [Re-Build](#build)
  * [Install](#install)
  * [Documents](#documents)
    * [Load or create wallet](#load-or-create-wallet)
    * [Getter](#getter)
  * [Notice](#notice)
<!--te-->

Build
========
Re-build project from scratch
  - Clean project
    ```bash
      npm run clean
    ```
  - Build
    ```bash
      npm run build
    ```
  - Unit test
    ```bash
      npm run test:cover
    ```
Install
=======
  Install `@nekoproject/wallets` with `npm`
  ```bash
    npm i @nekoproject/wallets
  ```
  Import
  ```ts
    import { Wallet, SPLWallet } from '@nekoproject/wallets'
  ```
Documents
=========
Solana Keypair defined in `@nekoproject/wallets`
```ts
 interface SolanaKeypair {
   publicKey: web3.PublicKey;
   secretKey: Uint8Array;
 }
```
### Wallet methods
 #### Load or Create wallet
   - Generate new wallet
       ```ts
         let wallet: Wallet;
         // generate new solana wallet
         wallet = SPLWallet.generateWallet()
       ```
   - Load wallet from seed pharse
       ```ts
         let wallet: Wallet;
         // load solana wallet
         const mnemonic = 'seeds pharse'
         wallet = SPLWallet.fromMnemonic(mnemonic)
       ```
   - Load wallet from secret Key
       ```ts
         import fs from 'mz/fs';
         const filePath = path/to/json/secretKey/file
         const secretKeyString = await fs.readFile(filePath, { encoding: 'utf8' });
         const secretKey = Uint8Array.from(JSON.parse(secretKeyString));
         let wallet: Wallet;
         // load solana wallet
         wallet = SPLWallet.fromSecretKey(secretKey)
       ```
   - Load wallet from string secret Key
       ```ts
         const secretStringKey = '2PU5z5WF9oteEcMfrKswairtm4H69XakqPFNRVBoadw4uTFEPDtUWzp6YirXtVSuybJ2kYVchCPxKisbdTRurcMM'
         let wallet: Wallet;
         // load solana wallet
         wallet = SPLWallet.fromStringSecretKey(secretStringKey)
       ```
 #### Getter 
   - Signer
       ```ts
           const signer: SolanaKeypair = wallet.signer
       ```
   - Address
       ```ts
          const publicKey = wallet.address
       ```

Notice
========
# Ref
npm package: @nekoshinshi/atproto-lexicon
Description: Lexicon is the semantic schemas & contracts system for ATP. This library provides definitions and APIs for ATP software.
Latest version: 0.0.1
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# Lexicon

Lexicon is the semantic schemas & contracts system for ATP. This library provides definitions and APIs for ATP software.

```
npm install @atproto/lexicon
```

## Usage

```typescript
import { Lexicons } from '@atproto/lexicon'

// create your lexicons collection
const lex = new Lexicons()

// add lexicon documents
lex.add({
  lex: 1,
  id: 'com.example.post',
  defs: {
    // ...
  }
})

// validate
lex.assertValidRecord('com.example.record', {$type: 'com.example.record', ...})
lex.assertValidXrpcParams('com.example.query', {...})
lex.assertValidXrpcInput('com.example.procedure', {...})
lex.assertValidXrpcOutput('com.example.query', {...})
```
npm package: @nekoshinshi/atproto-xrpc
Description: ## Usage
Latest version: 0.0.1
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# XRPC API

## Usage

```typescript
import xrpc from '@atproto/xrpc'

xrpc.addLexicon({
  lexicon: 1,
  id: 'io.example.ping',
  defs: {
    main: {
      type: 'query',
      description: 'Ping the server',
      parameters: {
        type: 'params',
        properties: {message: { type: 'string' }}
      },
      output: {
        encoding: 'application/json',
        schema: {
          type: 'object',
          required: ['message'],
          properties: {message: { type: 'string' }},
        },
      }
    },
  },
})

const res1 = await xrpc.call('https://example.com', 'io.example.ping', {message: 'hello world'})
res1.encoding // => 'application/json'
res1.body // => {message: 'hello world'}
const res2 = await xrpc.service('https://example.com').call('io.example.ping', {message: 'hello world'})
res2.encoding // => 'application/json'
res2.body // => {message: 'hello world'}

xrpc.addLexicon({
  lexicon: 1,
  id: 'io.example.writeJsonFile',
  defs: {
    main: {
      type: 'procedure',
      description: 'Write a JSON file',
      parameters: {
        type: 'params',
        properties: {fileName: { type: 'string' }},
      },
      input: {
        encoding: 'application/json'
      },
    },
  },
})

const res3 = await xrpc
  .service('https://example.com')
  .call('io.example.writeJsonFile',
    {fileName: 'foo.json'}, // query parameters
    {hello: 'world', thisIs: 'the file to write'} // input body
  )
```

## License

MIT