Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

This is a wallet selector modal that allows users to interact with NEAR dApps with a selection of available wallets.

License

NotificationsYou must be signed in to change notification settings

sweatco/wallet-selector

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NEAR Wallet Selector makes it easy for users to interact with your dApp by providing an abstraction over various wallets within the NEAR ecosystem:

Preview

React /Next.js andAngular variations of theGuest Book dApp can be found in theexamples directory. You can use these to gain a concrete understanding of how to integrate NEAR Wallet Selector into your own dApp.

Preview

Installation and Usage

The easiest way to use NEAR Wallet Selector is to install thecore package from the NPM registry, some packages may requirenear-api-js v1.0.0 or above check them atpackages

# Using Yarnyarn add near-api-js# Using NPM.npm install near-api-js
# Using Yarnyarn add @near-wallet-selector/core# Using NPM.npm install @near-wallet-selector/core

Next, you'll need to install the wallets you want to support:

# Using Yarnyarn add \  @near-wallet-selector/bitget-wallet \  @near-wallet-selector/my-near-wallet \  @near-wallet-selector/sender \  @near-wallet-selector/nearfi \  @near-wallet-selector/here-wallet \  @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 \  @near-wallet-selector/near-snap \  @near-wallet-selector/ledger \  @near-wallet-selector/wallet-connect \  @near-wallet-selector/coin98-wallet \  @near-wallet-selector/neth \  @near-wallet-selector/xdefi \  @near-wallet-selector/ramper-wallet \  @near-wallet-selector/near-mobile-wallet  \  @near-wallet-selector/bitget-wallet \  @near-wallet-selector/mintbase-wallet \  @near-wallet-selector/bitte-wallet \  @near-wallet-selector/ethereum-wallets# Using NPM.npm install \  @near-wallet-selector/bitget-wallet \  @near-wallet-selector/my-near-wallet \  @near-wallet-selector/sender \  @near-wallet-selector/nearfi \  @near-wallet-selector/here-wallet \  @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 \  @near-wallet-selector/near-snap \  @near-wallet-selector/ledger \  @near-wallet-selector/wallet-connect \  @near-wallet-selector/coin98-wallet \  @near-wallet-selector/neth \  @near-wallet-selector/xdefi \  @near-wallet-selector/ramper-wallet \  @near-wallet-selector/near-mobile-wallet \  @near-wallet-selector/bitget-wallet \  @near-wallet-selector/mintbase-wallet \  @near-wallet-selector/bitte-wallet \  @near-wallet-selector/ethereum-wallets

Optionally, you can install ourmodal-ui ormodal-ui-js package for a pre-built interface that wraps thecore API and presents the supported wallets:

# Using Yarnyarn add @near-wallet-selector/modal-ui# Using NPM.npm install @near-wallet-selector/modal-ui

Then in your dApp:

import{setupWalletSelector}from"@near-wallet-selector/core";import{setupModal}from"@near-wallet-selector/modal-ui";import{setupBitgetWallet}from"@near-wallet-selector/bitget-wallet";import{setupMyNearWallet}from"@near-wallet-selector/my-near-wallet";import{setupSender}from"@near-wallet-selector/sender";import{setupHereWallet}from"@near-wallet-selector/here-wallet";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";import{setupLedger}from"@near-wallet-selector/ledger";import{setupWalletConnect}from"@near-wallet-selector/wallet-connect";import{setupNearFi}from"@near-wallet-selector/nearfi";import{setupCoin98Wallet}from"@near-wallet-selector/coin98-wallet";import{setupNeth}from"@near-wallet-selector/neth";import{setupXDEFI}from"@near-wallet-selector/xdefi";import{setupRamperWallet}from"@near-wallet-selector/ramper-wallet";import{setupNearMobileWallet}from"@near-wallet-selector/near-mobile-wallet";import{setupMintbaseWallet}from"@near-wallet-selector/mintbase-wallet";import{setupBitteWallet}from"@near-wallet-selector/bitte-wallet";import{setupEthereumWallets}from"@near-wallet-selector/ethereum-wallets";constselector=awaitsetupWalletSelector({network:"testnet",modules:[setupBitgetWallet(),setupMyNearWallet(),setupSender(),setupHereWallet(),setupMathWallet(),setupNightly(),setupMeteorWallet(),setupMeteorWalletApp({contractId:"guest-book.testnet"}),setupNearSnap(),setupOkxWallet(),setupNarwallets(),setupWelldoneWallet(),setupLedger(),setupNearFi(),setupCoin98Wallet(),setupNeth(),setupXDEFI(),setupWalletConnect({projectId:"c4f79cc...",metadata:{name:"NEAR Wallet Selector",description:"Example dApp used by NEAR Wallet Selector",url:"https://github.com/near/wallet-selector",icons:["https://avatars.githubusercontent.com/u/37784886"],},}),setupNearMobileWallet(),setupMintbaseWallet({networkId:"mainnet",walletUrl:"https://wallet.mintbase.xyz",callbackUrl:"https://www.mywebsite.com",deprecated:false,}),setupBitteWallet({networkId:"mainnet",walletUrl:"https://wallet.bitte.ai",callbackUrl:"https://www.mywebsite.com",deprecated:false,}),setupEthereumWallets({ wagmiConfig, web3Modal}),],});constmodal=setupModal(selector,{contractId:"guest-book.testnet"});

Wallet Package Documentation

Each wallet package contains its ownREADME document, please refer inside thepackages folder for extra information.

Contributing

Contributors may find theexamples directory useful as it provides a quick and consistent way to manually test new changes and/or bug fixes.

More details around contributing to this project can be foundhere.

Editor Setup

This project usesESLint (withPrettier) to enforce a consistent coding style. It's important that you configure your editor correctly to avoid issues when you're ready to open a Pull Request.

Although this project uses Prettier, it's simply an "internal" dependency to our ESLint configuration. This is because we want Prettier to handle code styling while avoiding conflicts with ESLint which specifically focuses on potentially problematic code. As a result,it's important that you switch off Prettier in your editor and ensure only ESLint is enabled.

License

This repository is distributed under the terms of both the MIT license and the Apache License (Version 2.0). SeeLICENSE-MIT andLICENSE-APACHE for details.

About

This is a wallet selector modal that allows users to interact with NEAR dApps with a selection of available wallets.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript93.5%
  • CSS5.6%
  • Other0.9%

[8]ページ先頭

©2009-2025 Movatter.jp