open-index/open-npm huggingface dataset:
npm package: @stkon-js/core
Description: stkon core package
Author: winay@chainnext.in
Latest version: 0.1.58

# @stkon-js/core

This package provides a collection of apis to interact with stkon blockchain.

## Installation

```
npm install @stkon-js/core
```

## Usage

Create a stkon instance connecting to testnet

```javascript
const { stkon } = require('@stkon-js/core');
const {
  ChainID,
  ChainType,
  hexToNumber,
  numberToHex,
  fromWei,
  Units,
  Unit,
} = require('@stkon-js/utils');

const stk = new stkon(
    'https://api.s0.b.stkon.xyz/',
    {
        chainType: ChainType.stkon,
        chainId: ChainID.StkTestnet,
    },
);
```
npm package: @stkon-js/crypto
Description: crypto libraries for stkon
Author: winay@chainnext.in
Latest version: 0.1.58

# @stkon-js/crypto

This package provides a collection of apis related to address management, kestore, encoding, and encrypt/decrypt.

## Installation

```
npm install @stkon-js/crypto
```

## Usage

```javascript
const {
  encode,
  decode,
  randomBytes,
  toBech32,
  fromBech32,
  stkonAddress,
  generatePrivateKey,
  getPubkeyFromPrivateKey,
  getAddressFromPublicKey,
  getAddressFromPrivateKey,
  encryptPhrase,
  decryptPhrase
} = require('@stkon-js/crypto');
const { isPrivateKey, isAddress, isPublicKey } = require('@stkon-js/utils');
```

Address apis
```javascript
const bytes = randomBytes(20);
const addr = new stkonAddress(bytes);

console.log(addr.checksum);
console.log(addr.bech32);

console.log(stkonAddress.isValidBech32(addr.bech32));
```

RLP apis
```javascript
const encoded = '0x89010101010101010101';
const decoded = '0x010101010101010101';
console.log(encode(decoded));
console.log(decode(encoded));
```

Keystore apis
```javascript
const prv = generatePrivateKey();
const pub = getPubkeyFromPrivateKey(prv);
const addr = getAddressFromPublicKey(pub);
const addrPrv = getAddressFromPrivateKey(prv);
console.log(isPrivateKey(prv));
console.log(isPublicKey(pub));
console.log(isAddress(addr));
console.log(isAddress(addrPrv));
```

Encrypt/decrypt apis
```javascript
const { Wallet } = require('@stkon-js/account');

const myPhrase = new Wallet().newMnemonic();
console.log(myPhrase);
const pwd = '1234';
encryptPhrase(myPhrase, pwd).then((value) => {
  console.log(value);
  decryptPhrase(JSON.parse(value), pwd).then(value => {
    console.log(value);
  });
});
```
npm package: @stkon-js/network
Description: network suites for stkon
Author: winay@chainnext.in
Latest version: 0.1.58

# @stkon-js/network

This package provides a collection of apis to create messengers (HTTP, WebSocket) to connect to blockchain networks.

## Installation

```
npm install @stkon-js/network
```

## Usage

```javascript
const { Messenger, HttpProvider, WSProvider } = require('@stkon-js/network');
const { ChainID, ChainType } = require('@stkon-js/utils');
const testnetHTTP = 'https://api.s0.b.stkon.xyz';
const testnetWS = 'wss://ws.s0.b.stkon.xyz';
const localHTTP = 'http://localhost:9500/';
const localWS = 'http://localhost:9800/';
const http = new HttpProvider(testnetHTTP); // for local use localHTTP
const ws = new WSProvider(testnetWS); // for local use testnetWS
const customHTTPMessenger = new Messenger(http, ChainType.stkon, ChainID.StkTestnet); // for local ChainID.StkLocal
const customWSMessenger = new Messenger(ws, ChainType.stkon, ChainID.StkTestnet); // for local ChainID.StkLocal
```
npm package: @stkon-js/utils
Description: utils for stkon
Author: winay@chainnext.in
Latest version: 0.1.58

# @stkon-js/utils

This package provides a collection of utility apis for unit conversions like `fromWei`, `toWei`, `hexToNumber`, `numberToHex`, `isAddress`, etc.

## Installation

```
npm install @stkon-js/utils
```

## Usage

Available units
```
const { Units } = require('@stkon-js/utils');

[Units.wei, '1'], // 1 wei
[Units.Kwei, '1000'], // 1e3 wei
[Units.Mwei, '1000000'], // 1e6 wei
[Units.Gwei, '1000000000'], // 1e9 wei
[Units.szabo, '1000000000000'], // 1e12 wei
[Units.finney, '1000000000000000'], // 1e15 wei
[Units.ether, '1000000000000000000'], // 1e18 wei
[Units.one, '1000000000000000000'], // 1e18 wei
[Units.Kether, '1000000000000000000000'], // 1e21 wei
[Units.Mether, '1000000000000000000000000'], // 1e24 wei
[Units.Gether, '1000000000000000000000000000'], // 1e27 wei
[Units.Tether, '1000000000000000000000000000000'], // 1e30 wei
```

Converting between different units
```javascript
const { Units, Unit, numberToString, add0xToString, fromWei, toWei, numToStr} = require('@stkon-js/utils');
const { BN } = require('@stkon-js/crypto');

const one = new Unit('1').asOne();
const oneToGwei = one.toGwei();
console.log(oneToGwei);

// numberToString
const num = 123;
const str = numberToString(num)
console.log(str);

// add0xToString
const str = '12345';
const expected = add0xToString(str)
console.log(expected);

// fromWei
const Wei = new BN('1000000000000000000');
const expected = fromWei(Wei, Units.one);
console.log(expected);

// toWei
const one = new BN('1');
const expected = toWei(one, stk.utils.Units.one);
const num = numToStr(expected);
console.log(num);
```
npm package: @stkuwanda/temperature-converter
Description: Convert temperatures between Fahrenheit and Celsius units.
Author: Simbarashe Tanaka Kuwanda
Latest version: 1.0.0

# Temperature Conversion Module
This is a Node.js module exposing functions to convert temperature values between Fahrenheit and Celsius units.

# Example usage
```js
const { fahrenheit, celsius } = require('@stkuwanda/temperature-converter');
const celsius = fahrenheitToCelsius(100);
console.log(`100°F is ${celsius}°C`);
const fahrenheit = celsiusToFahrenheit(37);
console.log(`37°C is ${fahrenheit}°F`);
```

# Running tests
To run tests and ensure the module is working as expected, navigate to the module's root directory and execute:
```
$ npm run test
```

# License
This project is licensed under the MIT license.
npm package: @stl1/react-native-stl-api
Description: Common API STL uses
Author: STL
Latest version: 1.3.0

# react-native-stl-api

Common API that STL uses.

## Installation

```sh
yarn add @stl1/react-native-stl-api
```
or
```sh
npm i @stl1/react-native-stl-api
```

## Usage

```js
import STL from "react-native-stl-api";

// ...

const keyHashes = await STL.common.getKeyHashes();

const nearbyDevice = await STL.register.getNearbyDevice();
```

## Contributing

See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.

## License

MIT