open-index/open-npm huggingface dataset:
npm package: @securityscorecard/cli-manifest
Description: Examples and Experimental app list
Author: Cristian Leyes
Latest version: 1.2.2

# CLI Manifest

### Description

Declaration of experimental/example apps used in the CLI. Intended has a manifest to extend the cli usage.

### Declaration

Reading the manifest wiht `pacote` will recover `package.json` declaration. The intended way to declarate a new package is to extend either:

- `examples`
- `experiments`
npm package: @securityscorecard/experimental-action-app
Description: experimental action app
Author: Cristian Leyes
Latest version: 1.0.0

# Experimental 

## Action app

**IMPORTANT DISCLAIMER**: this is still in an experimental phase, please do not use this in a real SecurityScorecard app yet.

Action Action app used to demostrate the workflow of SecurityScorecard's Marketplace.

One of the ways apps can extend our platform is by registering additional actions that can be invoked in Rules.

### Getting Started

**1.- Create a [SecurityScorecard API Token](https://platform.securityscorecard.tech/#/my-settings/api). Select `Generate new API token` (copy the result)**

**2.- Configure your CLI token**

```
ssc config
```

> during the process specify wich enviroment you want to set 

**3.- Initialize your project**

```
ssc init -e experimental-action-app
```

**4.- Modify the manifest at `/public/manifest.json` with your details**

If you are not familiar with the manifest, you should also check the `experimental-bare-app` example that already explains the basics

```
{
  ...
  "actions": [
    {
      // unique identifier for this action (must be snake_case)
      "id": "notify_channel",
      // human-readable description of this action
      "name": "Notify Channel",
      // the url in your app that will be called (POST) to execute this action
      // note: as other urls, this can be relative to the manifest url
      "url": "actions/notify_channel",
      // optional, url to call (POST) for settings to show in the rule builder
      "settings_url": "actions/notify_channel/settings",
      // optional, instead of the above, when settings are fixed (independent of user)
      "settings": {
        // example field to show in the rule builder (will be shown as dropdown)
        "department": {
          "options": [{
            "key": "it",
            "value": "IT"
          }, {
            "key": "sec-ops",
            "value": "SecOps"
          }]
        }
      }
    }
  ]
}
```

**5.- Deploy your app**

- use already provided example with Vercel (`vercel.json`) or any cloud provider you like.

**6.- Install your app**

Inside your projects manifest route (ex. `/public/manifest`)

```
ssc install -e development
```

> the CLI will display the URL where your project is, but you could also find it throug SecurityScorecard > Marketplace > (filter) Installed Apps

**7.- Create a new Rule**

Navigate to [SecurityScorecard > My Settings > Rules](https://platform.securityscorecard.tech/#/my-settings/rules). Then, select `+ Create my own rule`.

The ui display three dropdowns, each one refers to a property that the rule builder will take into consideration, `event`, `for` and `action`. To use our app we need to provide a new rule setting the `action` dropdown to use our new event `Notify Channel` (ref.: `manifest.json > name`).

**8.- Execute the action**

Now all the events triggering the condition we set on our rule will call our action url (ref.: `manifest.json > url`).
npm package: @securityscorecard/experimental-signal-app
Description: experimental signal app
Author: Cristian Leyes
Latest version: 1.0.1

# Experimental 

## Signal app

**IMPORTANT DISCLAIMER**: this is still in an experimental phase, please do not use this in a real SecurityScorecard app yet.

Signal app used to demostrate the workflow of SecurityScorecard's Marketplace.

One of the ways apps can extend our platform is by registering additional actions that can be invoked in Rules.

### Getting Started

**1.- Create a [SecurityScorecard API Token](https://platform.securityscorecard.tech/#/my-settings/api). Select `Generate new API token` (copy the result)**

**2.- Configure your CLI token**

```
ssc config
```

> during the process specify wich enviroment you want to set 

**3.- Initialize your project**

```
ssc init -e experimental-signal-app
```

**4.- Modify the manifest at `/public/manifest.json` with your details**

If you are not familiar with the manifest, you should also check the `experimental-bare-app` example that already explains the basics

```
{
  ...
  "signals": [
    {
      // unique identifier for this signal (must be snake_case)
      // note this must be prefixed by your app unique namespace (separated by a dot)
      "id": "your_app.your_signal",
      // human-readable description of this signal
      "name": "Signal Name",
      // only "info" or "positive" are allowed here
      "severity": "positive",
      // one of https://api.securityscorecard.io/metadata/factors
      "factor": "patching_cadence",
      "short_description": "risk or short description of this signal",
      "long_description": "long description of this signal",
      "recommendation": "how to remediate (if negative) or obtain (if positive) this signal",
      // a username (ideally a bot) that is authorized to send these signals
      // (see below "Sending Signals")
      "sent_by": "<a username>",
      // links with more information
      "references": [
            {
                "link": "<url of an article with more information>",
                "text": "human-readable title for this link"
            }, {
                "link": "<url of another article with more information>",
                "text": "human-readable title for this link"
            }
      ]
    }
  ]
}
```

**5.- Deploy your app**

- use already provided example with Vercel (`vercel.json`) or any cloud provider you like.

**6.- Install your app**

Inside your projects manifest route (ex. `/public/manifest`)

```
ssc install -e development
```

> the CLI will display the URL where your project is, but you could also find it throug SecurityScorecard > Marketplace > (filter) Installed Apps
npm package: @securityscorecard/sdk
Description: SecurityScorecard Public SDK
Latest version: 0.8.0

# SDK

## Getting Started

```js
const { SSC } = require('@securitysorecard/sdk');

const ssc = SSC({ token: 'YOUR_API_ROKEN', host: '', timeout: ''});
```

## Installation Resources

```js
// install the app in your account
ssc.apps.install({url: 'app_manifest_url'})
    .then(appInfo => console.log('App succesfully installed', appInfo));

// update app installation data
ssc.apps.updateInstallationData('installation_code', [{'secret_1': 'value'}])
    .then(completeInstallationResponse => console.log('Installation data successfully updated', completeInstallationResponse));
```

## Validation Resources

```js
// validate the app manifest
ssc.apps.validate({url: 'app_manifest_url'})
    .then(validationResponse => {
        if (validationResponse.success === true) {
            console.log('Manifest validation success')
        } else {
            console.log('Manifest validation failed with message:', validationResponse.message);
        }
    });
```

## Signal Resources

```js
// send signals
ssc.apps.sendSignals('app_namespace.signal_type', [{...signal1}, {...signal2}])
    .then(signalsResponse => console.log('Signals emmited, check the response for failures', signalsResponse));

```

## Subscriptions Resources

```js
// send signals
ssc.subscriptions.owned().then(subscriptions => console.log('List of owned subscriptions', signalsResponse));
```

## Events Resources

```js
// send signals
ssc.events.trigger(({ 
  ruleId: 'unique_id',
  type: 'scorecard.changed',
  event: <EVENT_DETAILS>,
})).then(({ received }) => console.log('Rule trial', received));
```
npm package: @securized/plugin-cloudflare-analytics
Description: Cloudflare Analytics plugin for Gridsome
Latest version: 0.1.1

# @gridsome/plugin-cloudflare-analytics

> Cloudflare Analytics plugin for Gridsome

## Install
- `yarn add @securized/plugin-cloudflare-analytics`
- `npm install @securized/plugin-cloudflare-analytics`

## Usage

Add the below config in your `gridsome.config.js`

```js
module.exports = {
  plugins: [
    {
      use: '@securized/plugin-cloudflare-analytics',
      options: {
        token: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
      }
    }
  ]
}
```
npm package: @secusoft/colors
Description: Color palettes calculator of SECD forked from Ant Design Colors
Latest version: 0.0.1

<h1 align="center">SECD Colors</h1>

## Install

```bash
$ npm install @secusoft/colors
// or
$ yarn add @secusoft/colors
```

## Usage

```bash
$ npm install @secusoft/colors --save
```

```js
import {
  red,
  volcano,
  gold,
  yellow,
  lime,
  green,
  cyan,
  blue,
  geekblue,
  purple,
  magenta,
  grey, 
  police,
  country
} from '@secusoft/colors';

console.log(blue); // ['#E6F4FF', '#BAE0FF', '#91CAFF', '#69B1FF', '#4096FF', '#1677FF', '#0958D9', '#003EB3', '#002C8C', '#001D66']
console.log(blue.primary); // '#1677FF'
```

```js
import { generate, presetPalettes } from '@secusoft/colors';

// Generate color palettes by a given color
const colors = generate('#1890ff');
console.log(colors); // ['#E6F7FF', '#BAE7FF', '#91D5FF', ''#69C0FF', '#40A9FF', '#1890FF', '#096DD9', '#0050B3', '#003A8C', '#002766']
console.log(presetPalettes);
/*
{
  red: [...],
  volcano: [...],
  orange: [...],
  gold: [...],
  yellow: [...],
  lime: [...],
  green: [...],
  cyan: [...],
  blue: [...],
  geekblue: [...],
  purple: [...],
  magenta: [...],
  poclice: [...],
  country: [...],
}
*/
```

```js
import { generate, presetDarkPalettes } from '@secusoft/colors';

// Generate dark color palettes by a given color
const colors = generate('#1890ff', {
  theme: 'dark',
  backgroundColor: '#141414',
});
console.log(colors); // ['#111d2c', '#112a45', '#15395b', '#164c7e', '#1765ad', '#177ddc', '#3c9ae8', '#65b7f3', '#8dcff8', '#b7e3fa']
console.log(presetDarkPalettes);
/*
{
  red: [...],
  volcano: [...],
  orange: [...],
  gold: [...],
  yellow: [...],
  lime: [...],
  green: [...],
  cyan: [...],
  blue: [...],
  geekblue: [...],
  purple: [...],
  magenta: [...],
  poclice: [...],
  country: [...],
}
*/
```
npm package: @secusoft/tools
Description: tools for secusoft forked from @secusoft/secd-tools
Author: yiminghe@gmail.com
Latest version: 0.0.4

# @secusoft/tools 🔧🔧🔧

[![npm package](https://img.shields.io/npm/v/@ant-design/tools.svg?style=flat-square)](https://www.npmjs.org/package/@ant-design/tools)
[![NPM downloads](http://img.shields.io/npm/dm/@ant-design/tools.svg?style=flat-square)](http://npmjs.com/@ant-design/tools)
[![Travis](https://img.shields.io/travis/ant-design/@secusoft/secd-tools/master.svg?style=flat-square)](https://travis-ci.org/ant-design/@secusoft/secd-tools)

Tools for Ant Design of React: https://github.com/ant-design/ant-design

```bash
secd-tools run dist
secd-tools run compile
secd-tools run clean
secd-tools run pub
secd-tools run guard
secd-tools run deps-lint
secd-tools run sort-api-table
secd-tools run api-collection
```
npm package: @secux/app-bch
Description: SecuX Hardware Wallet BCH API
Author: SecuX Technology Inc.
Latest version: 3.1.0

# `@secux/app-bch`

> SecuX Hardware Wallet BCH API

## Usage

```ts
import { SecuxBCH } from "@secux/app-bch";
```

First, create instance of ITransport.
- [Web Usb](https://www.npmjs.com/package/@secux/transport-webusb)
- [Web Bluetooth](https://www.npmjs.com/package/@secux/transport-webble)
- [React Native Bluetooth](https://www.npmjs.com/package/@secux/transport-reactnative)

<br/>

## Examples
1. Get address by BIP32 path.
    - classic address
        ```ts
        const path = "m/44'/145'/0'/0/0";
        const address = await device.getAddress(path);

        /*

        // transfer data to hardware wallet by custom transport layer.
        const data = SecuxBCH.prepareAddress(path);
        const response = await device.Exchange(data);
        const address = SecuxBCH.resolveAddress(response, path);

        */
        ```
    - p2sh address
        ```ts
        const address = await device.getAddress("m/49'/145'/0'/0/0");
        ```

2. Sign transaction.
```ts
const inputs = [
    {
        hash: "b4a0e0afd8bf99b8360a22a091b1601dc5bdbdda1ab2ab2d7e74f60f97a1f4ad",
        vout: 0,
        satoshis: 77576,
        path: "m/44'/145'/0'/0/0",
        // for custom transport layer, each utxo need publickey.
        // publickey: "037baee246604b2209ba0c56eb1bf4ad8d1aad6c1e5e7ce9fe5f385659d963aba9"
    },
    {
        hash: "5b6783feca093f4051b46971a225a4ad0d85e4a7025003c33eee9228f177ae1b",
        vout: 0,
        satoshis: 117885,
        path: "m/44'/145'/1'/0/0"
    }
];

const to = {
    address: "qqj3dr364rw9eyv4ke848kpu8aheuf8llc9pwu3smu",
    satoshis: 11111
};

const utxo = {
    path: "m/44'/145'/0'/0/2",
    satoshis: 16666,
    // for custom transport layer, publickey needed with path.
    // publickey: "03f496d36bbedbfb78bc61a5c6f20c368dcde97bd0ca174cc54cc0ccff15dc60c5"
};

const { raw_tx } = await device.sign(inputs, { to, utxo });

/*

// transfer data to hardware wallet by custom transport layer.
const { commandData, rawTx } = SecuxBCH.prepareSign(inputs, { to, utxo });
const response = await device.Exchange(commandData);
const signed = SecuxBCH.resloveTransaction(response, rawTx, inputs.map(x => x.publickey));

*/
```

## API doc
Similar to [@secux/app-btc](https://www.npmjs.com/package/@secux/app-btc).
npm package: @secux/app-dash
Description: SecuX Hardware Wallet DASH API
Author: SecuX Technology Inc.
Latest version: 3.0.0

# `@secux/app-dash`

> SecuX Hardware Wallet DASH API

## Usage

```ts
import { SecuxDASH } from "@secux/app-dash";
```

First, create instance of ITransport.
- [Web Usb](https://www.npmjs.com/package/@secux/transport-webusb)
- [Web Bluetooth](https://www.npmjs.com/package/@secux/transport-webble)
- [React Native Bluetooth](https://www.npmjs.com/package/@secux/transport-reactnative)

<br/>

## Examples
1. Get address by BIP32 path.
    - native segwit address (default script: P2WPKH)
        ```ts
        const path = "m/84'/5'/0'/0/0";
        const address = await device.getAddress(path);

        /*

        // transfer data to hardware wallet by custom transport layer.
        const data = SecuxDASH.prepareAddress(path);
        const response = await device.Exchange(data);
        const address = SecuxDASH.resolveAddress(response, path);

        */
        ```
    - segwit address (default script: P2SH_P2WPKH)
        ```ts
        const address = await device.getAddress("m/49'/5'/0'/0/0");
        ```
    - legacy address (default script: P2PKH)
        ```ts
        const address = await device.getAddress("m/44'/5'/0'/0/0");
        ```

2. Sign transaction (support legacy transaction currently).
```ts
const inputs = [
    {
        hash: "d1471f2c9ab2b7d1814c80f18f270efa779a489d696ee8db2ee13360111e486d",
        vout: 0,
        satoshis: 100000,
        path: "m/44'/5'/0'/0/0",
        // for custom transport layer, each utxo need publickey.
        // publickey: "026fa9a6f213b6ba86447965f6b4821264aaadd7521f049f00db9c43a770ea7405"
    },
    {
        hash: "cfdf9cac901d2b58d94b5794f71505ad13ef54739174a46657a11b74013b63de",
        vout: 0,
        satoshis: 99504,
        path: "m/44'/5'/2'/0/0",
        // for custom transport layer, each utxo need publickey.
        // publickey: "033bf91bf2d1798e11c09c6523a92bbe9d0fbde3b62af0daea97beaa51a05b0d31"
    }
];

const to = {
    address: "XefQmd7TDrF8cMUqTBuP5FUfA1frnUc8pW",
    satoshis: 99999
};

const utxo = {
    path: "m/44'/5'/3'/0/4",
    satoshis: 88888,
    // for custom transport layer, each utxo need publickey.
    // publickey: "02df0a5e4d0a03f70452f236c83995b5e37033931dab340b2570132ee727f9427b"
};

const { raw_tx } = await device.sign(inputs, { to, utxo });

/*

// transfer data to hardware wallet by custom transport layer.
const { commandData, rawTx } = SecuxDASH.prepareSign(inputs, { to, utxo });
const response = await device.Exchange(commandData);
const signed = SecuxDASH.resloveTransaction(response, rawTx, inputs.map(x => x.publickey));

*/
```

## API doc
Similar to [@secux/app-btc](https://www.npmjs.com/package/@secux/app-btc).
npm package: @secux/app-dgb
Description: SecuX Hardware Wallet DGB API
Author: SecuX Technology Inc.
Latest version: 3.0.0

# `@secux/app-dgb`

> SecuX Hardware Wallet DGB API

## Usage

```ts
import { SecuxDGB } from "@secux/app-dgb";
```

First, create instance of ITransport.
- [Web Usb](https://www.npmjs.com/package/@secux/transport-webusb)
- [Web Bluetooth](https://www.npmjs.com/package/@secux/transport-webble)
- [React Native Bluetooth](https://www.npmjs.com/package/@secux/transport-reactnative)

<br/>

## Examples
1. Get address by BIP32 path.
    - native segwit address (default script: P2WPKH)
        ```ts
        const path = "m/84'/20'/0'/0/0";
        const address = await deivce.getAddress(path);

        /*

        // transfer data to hardware wallet by custom transport layer.
        const data = SecuxDGB.prepareAddress(path);
        const response = await device.Exchange(data);
        const address = SecuxDGB.resolveAddress(response, path);

        */
        ```
    - segwit address (default script: P2SH_P2WPKH)
        ```ts
        const address = await deivce.getAddress("m/49'/20'/0'/0/0");
        ```
    - legacy address (default script: P2PKH)
        ```ts
        const address = await deivce.getAddress("m/44'/20'/0'/0/0");
        ```

2. Sign transaction (native segwit has not supported yet).
```ts
const inputs = [
    {
        hash: "4632c6b99925ebae5b806f5956d2d730415fe0c8c7edbfa2edea22e99a8f9f56",
        vout: 0,
        satoshis: 100000000,
        path: "m/44'/20'/0'/0/0",
        // for custom transport layer, each utxo need publickey.
        // publickey: "02d07f1bcfdc3f25b23236bf46477527b26bd383fc6c03d7050105e16325c0b401"
    },
    {
        hash: "18638cd984ab631ad7dafc5a701bec3ffa9b26bed5855eee4598d53a2ecad870",
        vout: 0,
        satoshis: 50000000,
        path: "m/49'/20'/0'/0/0",
        // for custom transport layer, each utxo need publickey.
        // publickey: "03c117cf3c09cd66bd826082ecf4fb2e322b8d97ec4bfbdc380415ca9fe0c554bc"
    }
];

const to = {
    address: "D7TwNix9ziu8k16gAcqkyKWvXhXg7tkdAC",
    satoshis: 70000000
};

const utxo = {
    path: `m/44'/20'/0'/0/11`,
    satoshis: 77777777,
    // for custom transport layer, each utxo need publickey.
    // publickey: "03efc5266e1979ada343a2271c83d1f0e9c19682bb9ddaabe10f028021781a7c01"
}

const { raw_tx } = await device.sign(inputs, { to, utxo });

/*

// transfer data to hardware wallet by custom transport layer.
const { commandData, rawTx } = SecuxDGB.prepareSign(inputs, { to, utxo });
const response = await device.Exchange(commandData);
const signed = SecuxDGB.resloveTransaction(response, rawTx, inputs.map(x => x.publickey));

*/
```

## API doc
Similar to [@secux/app-btc](https://www.npmjs.com/package/@secux/app-btc).
npm package: @secux/app-doge
Description: SecuX Hardware Wallet DOGE API
Author: SecuX Technology Inc.
Latest version: 3.0.0

# `@secux/app-doge`

> SecuX Hardware Wallet DOGE API

## Usage

```ts
import { SecuxDOGE, ScriptType } from "@secux/app-doge";
```

First, create instance of ITransport.
- [Web Usb](https://www.npmjs.com/package/@secux/transport-webusb)
- [Web Bluetooth](https://www.npmjs.com/package/@secux/transport-webble)
- [React Native Bluetooth](https://www.npmjs.com/package/@secux/transport-reactnative)

<br/>

## Examples
1. Get address by purpose and script type.
    - native segwit address (default script: P2WPKH)
        ```ts
        const path = "m/84'/3'/0'/0/0";
        const address = await device.getAddress(path);

        /*

        // transfer data to hardware wallet by custom transport layer.
        const data = SecuxDOGE.prepareAddress(path);
        const response = await device.Exchange(data);
        const address = SecuxDOGE.resolveAddress(response, path);

        */
        ```
    - segwit address (default script: P2SH_P2WPKH)
        ```ts
        const address = await device.getAddress("m/49'/3'/0'/0/0");
        ```
    - legacy address (default script: P2PKH)
        ```ts
        const address = await device.getAddress("m/44'/3'/0'/0/0");
        ```

2. Sign transaction (support legacy transaction currently).
```ts
const inputs = [
    {
        hash: "d518fa4c4c0ebbfec834a2bee55687656f5e8ab87ec91b0929e34bf4f9a97c2c",
        vout: 0,
        satoshis: 500000000,
        path: "m/44'/3'/1'/0/3",
        // for custom transport layer, each utxo need publickey.
        // publickey: "035e4e31aec14a962972bdf97030586929f898927e2fb271d0174df3e4c8f81f47"
    },
    {
        hash: "a1acc8dd173fb4d2b010a60883752a60e5b27f1dc3e940ad5542781715522ca5",
        vout: 0,
        satoshis: 2052800000,
        path: "m/44'/3'/0'/0/4",
        // for custom transport layer, each utxo need publickey.
        // publickey: "03b4b21789f999f8c268d77ff0f6ed80884ec088ddd1b2d10055981d6bc393308a"
    },
    {
        hash: "8e4e5084caa1382d755ac11a8f9cdb7a5e2f903703ef51bf2910c3eea2696ea8",
        vout: 0,
        satoshis: 300000000,
        path: "m/44'/3'/0'/0/0",
        // for custom transport layer, each utxo need publickey.
        // publickey: "02cc6b0dc33aabcf3a23643e5e2919a80c50fb3dd2129ce409bbc5f0d4643d05e0"
    }
];

const to = {
    address: "DKiNgqGMrFXrPDSLmpnsxNAqJ3WUQX376f",
    satoshis: 8888888
};

const utxo = {
    path: "m/44'/3'/0'/0/0",
    satoshis: 700000000,
    // for custom transport layer, each utxo need publickey.
    // publickey: "02cc6b0dc33aabcf3a23643e5e2919a80c50fb3dd2129ce409bbc5f0d4643d05e0"
};

const { raw_tx } = await device.sign(inputs, { to, utxo });

/*

// transfer data to hardware wallet by custom transport layer.
const { commandData, rawTx } = SecuxDOGE.prepareSign(inputs, { to, utxo });
const response = await device.Exchange(commandData);
const signed = SecuxDOGE.resloveTransaction(response, rawTx, inputs.map(x => x.publickey));

*/
```

## API doc
Similar to [@secux/app-btc](https://www.npmjs.com/package/@secux/app-btc).
npm package: @secux/app-grs
Description: SecuX Hardware Wallet GRS API
Author: SecuX Technology Inc.
Latest version: 3.1.0

# `@secux/app-grs`

> SecuX Hardware Wallet GRS API

## Usage

```ts
import { SecuxGRS } from "@secux/app-grs";
```

First, create instance of ITransport.
- [Web Usb](https://www.npmjs.com/package/@secux/transport-webusb)
- [Web Bluetooth](https://www.npmjs.com/package/@secux/transport-webble)
- [React Native Bluetooth](https://www.npmjs.com/package/@secux/transport-reactnative)

<br/>

## Examples
1. Get address by BIP32 path.
    - native segwit address (default script: P2WPKH)
        ```ts
        const path = "m/84'/17'/0'/0/0";
        const address = await device.getAddress(path);

        /*

        // transfer data to hardware wallet by custom transport layer.
        const data = SecuxGRS.prepareAddress(path);
        const response = await device.Exchange(data);
        const address = SecuxGRS.resolveAddress(response, path);

        */
        ```
    - segwit address (default script: P2SH_P2WPKH)
        ```ts
        const address = await device.getAddress("m/49'/17'/0'/0/0");
        ```
    - legacy address (default script: P2PKH)
        ```ts
        const address = await device.getAddress("m/44'/17'/0'/0/0");
        ```

2. Sign transaction (native segwit has not supported yet).
```ts
const inputs = [
    {
        hash: "021fd09c855a2c742b4d25bcabf7b0a93d2f81e686875d29173d2527d3f93383",
        vout: 0,
        satoshis: 489957866,
        path: "m/44'/17'/0'/0/0",
        // for custom transport layer, each utxo need publickey.
        // publickey: "030f25e157a5ddc119bf370beb688878a3600461eb5c769a5556bdfe225d9a246e"
    },
    {
        hash: "378b0fcdb5fd9b3ac93a54318ab0c5a514de7e8ab757358610c7bbda0352c544",
        vout: 0,
        satoshis: 1000000,
        path: "m/49'/17'/0'/0/0",
        // for custom transport layer, each utxo need publickey.
        // publickey: "0212f4f7e43bae1bc53ef94dbef85f8348550975f5fd8f3693c19757223692e8dd"
    }
];

const to = {
    address: "38kpyoty76H1c6wWo7cfbPYNB88RsMV8AB",
    satoshis: 400000000
};

const utxo = {
    path: `m/44'/17'/0'/0/7`,
    satoshis: 60000000,
    // for custom transport layer, each utxo need publickey.
    // publickey: "0270806ba59d0abe13f6a0a13d2997f358fca3de938aec7f52bc78e7121d24ae23"
}

const { raw_tx } = await device.sign(inputs, { to, utxo });

/*

// transfer data to hardware wallet by custom transport layer.
const { commandData, rawTx } = SecuxGRS.prepareSign(inputs, { to, utxo });
const response = await device.Exchange(commandData);
const signed = SecuxGRS.resloveTransaction(response, rawTx, inputs.map(x => x.publickey));

*/
```

## API doc
Similar to [@secux/app-btc](https://www.npmjs.com/package/@secux/app-btc).
npm package: @secux/app-ltc
Description: SecuX Hardware Wallet LTC API
Author: SecuX Technology Inc.
Latest version: 3.0.0

# `@secux/app-ltc`

> SecuX Hardware Wallet LTC API

## Usage

```ts
import { SecuxLTC } from "@secux/app-ltc";
```

First, create instance of ITransport.
- [Web Usb](https://www.npmjs.com/package/@secux/transport-webusb)
- [Web Bluetooth](https://www.npmjs.com/package/@secux/transport-webble)
- [React Native Bluetooth](https://www.npmjs.com/package/@secux/transport-reactnative)

<br/>

## Examples
1. Get address by purpose and script type.
    - native segwit address (default script: P2WPKH)
        ```ts
        const path = "m/84'/2'/0'/0/0";
        const address = await device.getAddress(path);

        /*

        // transfer data to hardware wallet by custom transport layer.
        const data = SecuxLTC.prepareAddress(path);
        const rsp = await GetDevice().Exchange(data);
        const address = SecuxLTC.resolveAddress(rsp, path);

        */
        ```
    - segwit address (default script: P2SH_P2WPKH)
        ```ts
        const address = await device.getAddress("m/49'/2'/0'/0/0");
        ```
    - legacy address (default script: P2PKH)
        ```ts
        const address = await device.getAddress("m/44'/2'/0'/0/0");
        ```

2. Sign transaction (native segwit has not supported yet).
```ts
const inputs = [
    {
        hash: "7e874e94ae254287ec713b116b7af73067a5e15eb5c19e879d1e465ca53e7d63",
        vout: 0,
        satoshis: 301331,
        path: "m/44'/2'/0'/0/0",
        // for custom transport layer, each utxo need publickey.
        // publickey: "030fe9d8d0e15d432d1ae9b3c52f4cb6e37e3c7a41af0139783da09eab85a182dc"
    },
    {
        hash: "ebd04672981fa215f130ecdbac56f386e4e76326eaa808e081f67c2de79d949c",
        vout: 0,
        satoshis: 10000,
        path: "m/49'/2'/0'/0/0",
        // for custom transport layer, each utxo need publickey.
        // publickey: "03f7a0a5d44504ea8a2494c7e32c895ba4968d3dab66a4d790380be8b0539f36bc"
    }
];

const to = {
    address: "MFkcBAGgM664drwch3G3L4VWByPQVABQ3Q",
    satoshis: 310000
};

const utxo = {
    path: "m/44'/2'/0'/0/0",
    satoshis: 331,
    // for custom transport layer, each utxo need publickey.
    // publickey: "030fe9d8d0e15d432d1ae9b3c52f4cb6e37e3c7a41af0139783da09eab85a182dc"
};

const { raw_tx } = await device.sign(inputs, { to, utxo });

/*

// transfer data to hardware wallet by custom transport layer.
const { commandData, rawTx } = SecuxLTC.prepareSign(inputs, { to, utxo });
const response = await device.Exchange(commandData);
const signed = SecuxLTC.resloveTransaction(response, rawTx, inputs.map(x => x.publickey));

*/
```

## API doc
Similar to [@secux/app-btc](https://www.npmjs.com/package/@secux/app-btc).