open-index/open-npm huggingface dataset:
npm package: @peersyst/ws-core
Description: This is the core package for NEAR Wallet Selector.
Latest version: 8.9.18

# @peersyst/ws-core

This is the core package for NEAR Wallet Selector.

## Installation and Usage

The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v1.0.0 or above:

```bash
# Using Yarn
yarn add near-api-js

# Using NPM.
npm install near-api-js
```

```bash
# Using Yarn
yarn add @peersyst/ws-core

# Using NPM.
npm install @peersyst/ws-core
```

Then use it in your dApp:

```ts
import { setupWalletSelector } from "@peersyst/ws-core";
import { setupMyNearWallet } from "@peersyst/ws-my-near-wallet";

// The entire set of options can be found in the section below.
const selector = await setupWalletSelector({
  network: "testnet",
  modules: [setupMyNearWallet()],
});
```

## Options

- `network` (`NetworkId | Network`): Network ID or object matching that of your dApp configuration . Network ID can be either `mainnet` or `testnet`.
  - `networkId` (`string`): Custom network ID (e.g. `localnet`).
  - `nodeUrl` (`string`): Custom URL for RPC requests.
  - `helperUrl` (`string`): Custom URL for creating accounts.
  - `explorerUrl` (`string`): Custom URL for the NEAR explorer.
  - `indexerUrl` (`string`): Custom URL for the Indexer service.
- `debug` (`boolean?`): Enable internal logging for debugging purposes. Defaults to `false`.
- `optimizeWalletOrder` (`boolean?`): Enable automatic wallet order. Reorders last signed in wallet on top, then installed wallets over not installed and deprecated wallets.
- `randomizeWalletOrder` (`boolean?`): Randomize wallets order in the `More` section of the UI.
- `allowMultipleSelectors` (`boolean?`): Optionally allow creating new instances of wallet selector.
- `languageCode` (`string?`): Optionally set specific ISO 639-1 two-letter language code, disables language detection based on the browser's settings.
- `relayerUrl` (`string?`): Optionally set the URL that meta-transaction enabled wallet modules can use to submit DelegateActions to a relayer
- `storage` (`StorageService?`): Async storage implementation. Useful when [`localStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage) is unavailable. Defaults to `localStorage`.
- `modules` (`Array<WalletModuleFactory>`): List of wallets to support in your dApp.

## API Reference

You can find the entire API reference for Wallet Selector [here](./docs/api/selector.md).

## License

This repository is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
npm package: @peersyst/ws-ledger
Description: Ledger package for NEAR Wallet Selector.
Latest version: 8.9.18

# @peersyst/ws-ledger

This is the [Ledger](https://www.ledger.com/) package for NEAR Wallet Selector.

## Installation and Usage

The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v1.0.0 or above:

```bash
# Using Yarn
yarn add near-api-js

# Using NPM.
npm install near-api-js
```
```bash
# Using Yarn
yarn add @peersyst/ws-ledger

# Using NPM.
npm install @peersyst/ws-ledger
```

Then use it in your dApp:

```ts
import { setupWalletSelector } from "@peersyst/ws-core";
import { setupLedger } from "@peersyst/ws-ledger";

// Ledger for Wallet Selector can be setup without any params or it can take few optional params, see options below.
const ledger = setupLedger({
  iconUrl: "https://<Wallet Icon URL Here>" // optional
});

const selector = await setupWalletSelector({
  network: "testnet",
  modules: [ledger],
});
```

## Options

- `iconUrl`: (`string?`): Image URL for the icon shown in the modal. This can also be a relative path or base64 encoded image. Defaults to `./assets/ledger-icon.png`.
- `deprecated`: (`boolean?`): Deprecated is optional. Default is `false`.

## Assets

Assets such as icons can be found in the `/assets` directory of the package. Below is an example using Webpack:

```ts
import { setupLedger } from "@peersyst/ws-ledger";
import ledgerIconUrl from "@peersyst/ws-ledger/assets/ledger-icon.png";

const ledger = setupLedger({
  iconUrl: ledgerIconUrl
});
```

## Known issues
Existing dApps with Ledger support integrated may encounter this error `Device is already open`, it means your current integration and this package are conflicting and two ledger instances are being created. Avoid this scenario by supporting only this package.

## License

This repository is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
npm package: @peersyst/ws-modal-ui
Description: Modal UI package for NEAR wallet Selector
Latest version: 8.9.18

# @peersyst/ws-modal-ui

This is the Modal UI package for NEAR Wallet Selector.

## Installation and Usage

The easiest way to use this package is to install it from the NPM registry:

```bash
# Using Yarn
yarn add @peersyst/ws-modal-ui

# Using NPM.
npm install @peersyst/ws-modal-ui
```

Then use it in your dApp:

```ts
import { setupWalletSelector } from "@peersyst/ws-core";
import { setupModal } from "@peersyst/ws-modal-ui";
import { setupMyNearWallet } from "@peersyst/ws-my-near-wallet";

const selector = await setupWalletSelector({
  network: "testnet",
  modules: [setupMyNearWallet()],
});

const modal = setupModal(selector, {
  contractId: "test.testnet",
});

modal.show();
```

## Options

- `contractId` (`string`): Account ID of the Smart Contract used for sign in and signing transactions.
- `methodNames` (`Array<string>?`): Specify limited access to particular methods on the Smart Contract.
- `theme` (`Theme?`): Specify light/dark theme for UI. Defaults to the browser configuration when omitted or set to 'auto'. This can be either `light`, `dark` or `auto`.
- `description` (`string?`): Define a custom description in the UI.

## Styles & Customizing CSS

Import modal css styles:

### Angular

```css
/* Add import in the main css file */
@import "~@peersyst/ws-modal-ui/styles.css";
```

### React & Vue

```ts
// Add import in the main component
import "@peersyst/ws-modal-ui/styles.css";
```

These are the available css variables:

```css
--wallet-selector-backdrop-bg
--wallet-selector-heading-color
--wallet-selector-text-color
--wallet-selector-sidebar-border-color
--wallet-selector-selected-wallet-bg
--wallet-selector-selected-wallet-bg-hover
--wallet-selector-wallet-option-border-color
--wallet-selector-wallet-option-bg-hover
--wallet-selector-content-bg
--wallet-selector-change-path-bg
--wallet-selector-home-button-bg
--wallet-selector-confirm-button-bg
--confirm-button-bg-hover
--wallet-selector-error
--wallet-selector-close-button-bg-color
--wallet-selector-close-button-fill-icon-colo
--wallet-selector-spinner-color
--wallet-selector-bottom-section
--wallet-selector-mobile-text
--wallet-selector-connected-green
```

Customizing css is done simply by updating the value of a variable in the root of your css file.

```css
:root {
  --wallet-selector-backdrop-bg: #26262630;
}
```

## API Reference

You can find the entire API reference for Modal UI [here](./docs/api/modal.md).

## License

This repository is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
npm package: @peersyst/ws-modal-ui-js
Description: Modal UI package for NEAR wallet Selector
Latest version: 8.9.18

# @peersyst/ws-modal-ui-js

This is the Modal UI package for NEAR Wallet Selector.

## Installation and Usage

The easiest way to use this package is to install it from the NPM registry:

```bash
# Using Yarn
yarn add @peersyst/ws-modal-ui-js

# Using NPM.
npm install @peersyst/ws-modal-ui-js
```

Then use it in your dApp:

```ts
import { setupWalletSelector } from "@peersyst/ws-core";
import { setupModal } from "@peersyst/ws-modal-ui-js";
import { setupMyNearWallet } from "@peersyst/ws-my-near-wallet";

const selector = await setupWalletSelector({
  network: "testnet",
  modules: [setupMyNearWallet()],
});

const modal = setupModal(selector, {
  contractId: "test.testnet",
});

modal.show();
```

## Options

- `contractId` (`string`): Account ID of the Smart Contract used for sign in and signing transactions.
- `methodNames` (`Array<string>?`): Specify limited access to particular methods on the Smart Contract.
- `theme` (`Theme?`): Specify light/dark theme for UI. Defaults to the browser configuration when omitted or set to 'auto'. This can be either `light`, `dark` or `auto`.
- `description` (`string?`): Define a custom description in the UI.

## Styles & Customizing CSS

Import modal css styles:

### Angular

```css
/* Add import in the main css file */
@import "~@peersyst/ws-modal-ui-js/styles.css";
```

### React & Vue

```ts
// Add import in the main component
import "@peersyst/ws-modal-ui-js/styles.css";
```

These are the available css variables:

```css
--backdrop-bg
--heading-color
--text-color
--sidebar-border-color
--selected-wallet-bg
--selected-wallet-bg-hover
--wallet-option-border-color
--wallet-option-bg-hover
--content-bg
--change-path-bg
--home-button-bg
--confirm-button-bg
--confirm-button-bg-hover
--error
--close-button-bg-color
--close-button-fill-icon-colo
--spinner-color
--bottom-section
--mobile-text
--connected-green
```

Customizing css is done simply by updating the value of a variable in the root of your css file.

```css
:root {
  --backdrop-bg: #26262630;
}
```

## API Reference

You can find the entire API reference for Modal UI [here](./docs/api/modal.md).

## License

This repository is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
npm package: @peersyst/ws-near-mobile-wallet
Description: NEAR Mobile wallet package for NEAR Wallet Selector.
Latest version: 8.9.18

# @peersyst/ws-near-mobile-wallet

This is the [Near Mobile Wallet](https://nearmobile.app/) package for NEAR Wallet Selector.

## Installation and Usage

The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v1.0.0 or above:

```bash
# Using Yarn
yarn add near-api-js

# Using NPM.
npm install near-api-js
```

```bash
# Using Yarn
yarn add @peersyst/ws-near-mobile-wallet

# Using NPM.
npm install @peersyst/ws-near-mobile-wallet
```

Then use it in your dApp:

```ts
import { setupWalletSelector } from "@peersyst/ws-core";
import { setupNearMobileWallet } from "@peersyst/ws-near-mobile-wallet";

const selector = await setupWalletSelector({
  network: "testnet",
  modules: [setupNearMobileWallet()],
});
```

## Options

- `dAppMetadata: DAppMetadata`  (optional): An object to provide data from your dApp to be displayed on Near Mobile Wallet when signing requests. 
```ts
export interface DAppMetadata {
    name: string;
    logoUrl: string;
    url?: string;
}
```

## License

This repository is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
npm package: @peersyst/ws-wallet-utils
Description: Wallet utils package for NEAR Wallet Selector.
Latest version: 8.9.18

# @peersyst/ws-wallet-utils

This is the Wallet Utils package for NEAR Wallet Selector.

## Installation and Usage

The easiest way to use this package is to install it from the NPM registry, this package requires `near-api-js` v1.0.0 or above:

```bash
# Using Yarn
yarn add near-api-js

# Using NPM.
npm install near-api-js
```

```bash
# Using Yarn
yarn add @peersyst/ws-wallet-utils

# Using NPM.
npm install @peersyst/ws-wallet-utils
```

Then use it in your custom wallet integration:

```ts
import { createAction, signTransactions } from "@peersyst/ws-wallet-utils";

const action = createAction({
  type: "Transfer",
  params: {
    deposit: "10000000000000000000000",
  },
});

const signedTransactions = await signTransactions(
  [{ signerId, receiverId, actions }],
  signer,
  options.network
);
```

## License

This repository is distributed under the terms of both the MIT license and the Apache License (Version 2.0).