@web3-wallet-selector/mywallets
v1.0.6
Published
This is the Mywallets package for Utility Wallet Selector.
Downloads
3
Readme
@web3-wallet-selector/mywallets
This is the Mywallets package for Utility Wallet Selector.
Installation and Usage
The easiest way to use this package is to install it from the NPM registry:
# Using Yarn
yarn add @web3-wallet-selector/mywallets
# Using NPM.
npm install @web3-wallet-selector/mywallets
Then use it in your dApp:
import { setupWalletSelector } from "@web3-wallet-selector/core";
import { setupMywallets } from "@web3-wallet-selector/mywallets";
// Mywallets for Wallet Selector can be setup without any params or it can take few optional params, see options below.
const mywallets = setupMywallets({
iconUrl: "https://<Wallet Icon URL Here>" // optional
});
const selector = await setupWalletSelector({
network: "testnet",
modules: [mywallets],
});
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/mywallets-logo.png
.deprecated
: (boolean?
): Deprecated is optional. Default isfalse
.
Assets
Assets such as icons can be found in the /assets
directory of the package. Below is an example using Webpack:
import { setupMywallets } from "@web3-wallet-selector/mywallets";
import mywalletsIconUrl from "@web3-wallet-selector/mywallets/assets/mywallets-icon.png";
const mywallets = setupMywallets({
iconUrl: mywalletsIconUrl
});
License
This repository is distributed under the terms of both the MIT license and the Apache License (Version 2.0).