Skip to content

Commit

Permalink
chore: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Elabar committed Jan 2, 2025
1 parent f172cdc commit d7e5f73
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ NEAR Wallet Selector makes it easy for users to interact with your dApp by provi
- [Math Wallet](https://www.npmjs.com/package/@near-wallet-selector/math-wallet) - Injected wallet.
- [Metamask Snap](https://www.npmjs.com/package/@near-wallet-selector/near-snap) - Injected wallet.
- [Meteor Wallet](https://www.npmjs.com/package/@near-wallet-selector/meteor-wallet) - Injected wallet.
- [Meteor Wallet App](https://www.npmjs.com/package/@near-wallet-selector/meteor-wallet-app) - Instant link wallet.
- [Mintbase Wallet](https://www.npmjs.com/package/@near-wallet-selector/mintbase-wallet) - Browser wallet.
- [My NEAR Wallet](https://www.npmjs.com/package/@near-wallet-selector/my-near-wallet) - Browser wallet.
- [Narwallets](https://www.npmjs.com/package/@near-wallet-selector/narwallets) - Injected wallet.
Expand Down Expand Up @@ -64,6 +65,7 @@ yarn add \
@near-wallet-selector/math-wallet \
@near-wallet-selector/nightly \
@near-wallet-selector/meteor-wallet \
@near-wallet-selector/meteor-wallet-app \
@near-wallet-selector/okx-wallet \
@near-wallet-selector/narwallets \
@near-wallet-selector/welldone-wallet \
Expand Down Expand Up @@ -91,6 +93,7 @@ npm install \
@near-wallet-selector/math-wallet \
@near-wallet-selector/nightly \
@near-wallet-selector/meteor-wallet \
@near-wallet-selector/meteor-wallet-app \
@near-wallet-selector/okx-wallet \
@near-wallet-selector/narwallets \
@near-wallet-selector/welldone-wallet \
Expand Down Expand Up @@ -131,6 +134,7 @@ import { setupNearSnap } from "@near-wallet-selector/near-snap";
import { setupMathWallet } from "@near-wallet-selector/math-wallet";
import { setupNightly } from "@near-wallet-selector/nightly";
import { setupMeteorWallet } from "@near-wallet-selector/meteor-wallet";
import { setupMeteorWalletApp } from "@near-wallet-selector/meteor-wallet-app";
import { setupOkxWallet } from "@near-wallet-selector/okx-wallet";
import { setupNarwallets } from "@near-wallet-selector/narwallets";
import { setupWelldoneWallet } from "@near-wallet-selector/welldone-wallet";
Expand All @@ -156,6 +160,7 @@ const selector = await setupWalletSelector({
setupMathWallet(),
setupNightly(),
setupMeteorWallet(),
setupMeteorWalletApp({ contractId: "guest-book.testnet" }),
setupNearSnap(),
setupOkxWallet(),
setupNarwallets(),
Expand Down
23 changes: 14 additions & 9 deletions packages/meteor-wallet-app/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# @near-wallet-selector/meteor-wallet
# @near-wallet-selector/meteor-wallet-app

This is the [Meteor Wallet](https://meteorwallet.app) package for NEAR Wallet Selector.
This is the [Meteor Wallet (for in app only)](https://meteorwallet.app) package for NEAR Wallet Selector.

If you are looking for NEAR Wallet Selector for Meteor Web or extension, please check out `@near-wallet-selector/meteor-wallet` instead.

## Installation and Usage

Expand All @@ -15,21 +17,23 @@ npm install near-api-js
```
```bash
# Using Yarn
yarn add @near-wallet-selector/meteor-wallet
yarn add @near-wallet-selector/meteor-wallet-app

# Using NPM.
npm install @near-wallet-selector/meteor-wallet
npm install @near-wallet-selector/meteor-wallet-app
```

Then use it in your dApp:

```ts
import { setupWalletSelector } from "@near-wallet-selector/core";
import { setupMeteorWallet } from "@near-wallet-selector/meteor-wallet";
import { setupMeteorWalletApp } from "@near-wallet-selector/meteor-wallet-app";

// Meteor for Wallet Selector can be setup without any params or it can take few optional params, see options below.
const meteorWallet = setupMeteorWallet({
// Meteor App for Wallet Selector must setup with contractId and take few optional params, see options below.
const meteorWallet = setupMeteorWalletApp({
contractId: "guest-book.testnet", // required
iconUrl: "https://<Wallet Icon URL Here>" // optional
deprecated: false // optional
});

const selector = await setupWalletSelector({
Expand All @@ -40,7 +44,8 @@ const selector = await setupWalletSelector({

## 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/meteor-icon.png`.
- `contractId`: (`string`): The contract ID your DApp is interacting with.
- `iconUrl`: (`string?`): Image URL for the icon shown in the modal. This can also be a relative path or base64 encoded image.
- `deprecated`: (`boolean?`): Deprecated is optional. Default is `false`.

## Assets
Expand All @@ -49,7 +54,7 @@ Assets such as icons can be found in the `/assets` directory of the package. Bel

```ts
import { setupMeteorWallet } from "@near-wallet-selector/meteor-wallet";
import meteorIconUrl from "@near-wallet-selector/meteor-wallet/assets/meteor-icon.png";
import meteorIconUrl from "@near-wallet-selector/meteor-wallet-app/assets/meteor-app-icon.png";

const meteorWallet = setupMeteorWallet({
iconUrl: meteorIconUrl
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d7e5f73

Please sign in to comment.