UNPKG

@coin-voyage/paykit

Version:

Seamless crypto payments. Onboard users from any chain, any coin into your app with one click.

223 lines (222 loc) 9.94 kB
import { jsx as _jsx } from "react/jsx-runtime"; import { isAndroid } from "@coin-voyage/shared/common"; import { ChainType } from "@coin-voyage/shared/types"; import Logos from "../../assets/logos"; import MobileWithLogos from "../../assets/mobile-with-logos"; // Organised in alphabetical order by key export const walletConfigs = { backpack: { name: "Backpack", shortName: "Backpack", icon: _jsx(Logos.Backpack, {}), iconShape: "squircle", getWalletDeeplink: (uri) => `https://backpack.app/ul/v1/browse/${encodeURIComponent(uri)}`, chainTypes: [ChainType.SOL, ChainType.SUI], }, "coinbaseWallet, coinbaseWalletSDK, com.coinbase.wallet": { name: "Coinbase Wallet", shortName: "Coinbase", icon: _jsx(Logos.Coinbase, { background: true }), iconShape: "circle", downloadUrls: { download: "https://connect.family.co/v0/download/coinbasewallet", website: "https://www.coinbase.com/wallet/getting-started-extension", android: "https://play.google.com/store/apps/details?id=org.toshi&source=wallet_coinbase_com", ios: "https://apps.apple.com/app/coinbase-wallet-store-crypto/id1278383455", chrome: "https://chromewebstore.google.com/detail/coinbase-wallet-extension/hnfanknocfeofbddgcijnmhnfnkdnaad", }, getWalletDeeplink: (uri) => { return `https://go.cb-w.com/wc?uri=${encodeURIComponent(uri)}`; }, chainTypes: [ChainType.EVM], }, baseAccount: { name: "Base App", shortName: "Base", icon: _jsx(Logos.Base, {}), iconShape: "squircle", downloadUrls: { download: "https://connect.family.co/v0/download/coinbasewallet", website: "https://www.coinbase.com/wallet/getting-started-extension", android: "https://play.google.com/store/apps/details?id=org.toshi", ios: "https://apps.apple.com/app/coinbase-wallet-store-crypto/id1278383455", chrome: "https://chrome.google.com/webstore/detail/coinbase-wallet-extension/hnfanknocfeofbddgcijnmhnfnkdnaad", }, getWalletDeeplink: (uri) => { return `cbwallet://dapp?url=${encodeURIComponent(uri)}`; }, chainTypes: [ChainType.SOL, ChainType.SUI], }, "co.family.wallet": { name: "Family", shortName: "Family", icon: _jsx(Logos.Family, {}), iconShape: "squircle", downloadUrls: { download: "https://connect.family.co/v0/download/family", website: "https://family.co", ios: "https://family.co/download", }, getWalletDeeplink: (uri, chainType) => { const isEVM = !chainType || chainType === ChainType.EVM; return `familywallet://${isEVM ? "wc" : "browser"}?uri=${encodeURIComponent(uri)}`; }, chainTypes: [ChainType.EVM, ChainType.SOL], }, "metaMask, metaMask-io, io.metamask, io.metamask.mobile, metaMaskSDK": { name: "MetaMask", icon: _jsx(Logos.MetaMask, {}), iconConnector: _jsx(Logos.MetaMask, {}), iconShouldShrink: true, downloadUrls: { download: "https://connect.family.co/v0/download/metamask", website: "https://metamask.io/download/", android: "https://play.google.com/store/apps/details?id=io.metamask", ios: "https://apps.apple.com/app/metamask/id1438144202", chrome: "https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn", firefox: "https://addons.mozilla.org/firefox/addon/ether-metamask/", brave: "https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn", edge: "https://microsoftedge.microsoft.com/addons/detail/metamask/ejbalbakoplchlghecdalmeeeajnimhm", }, getWalletDeeplink: (uri, chainType) => { const isEVM = !chainType || chainType === ChainType.EVM; if (isEVM) return `https://metamask.app.link/wc?uri=${encodeURIComponent(uri)}`; return `https://metamask.app.link/dapp/${uri.replace("https://", "")}`; }, chainTypes: [ChainType.EVM, ChainType.SOL], }, "phantom, app.phantom, app.phantom.bitcoin, app.phantom.sui, app.phantom.ethereum": { name: "Phantom", iconShape: "squircle", icon: _jsx(Logos.Phantom, {}), downloadUrls: { download: "https://connect.family.co/v0/download/phantom", website: "https://phantom.com/", android: "https://play.google.com/store/apps/details?id=app.phantom", ios: "https://apps.apple.com/nl/app/phantom-crypto-wallet/id1598432977", chrome: "https://chrome.google.com/webstore/detail/phantom/bfnaelmomeimhlpmgjnjophhpkkoljpa", }, getWalletDeeplink: () => { const appUrl = encodeURIComponent(window.location.href); const ref = encodeURIComponent(window.location.origin); return `https://phantom.app/ul/browse/${appUrl}?ref=${ref}`; }, chainTypes: [ChainType.EVM, ChainType.SOL, ChainType.UTXO, ChainType.SUI], }, "me.rainbow": { name: "Rainbow Wallet", shortName: "Rainbow", icon: _jsx(Logos.Rainbow, {}), iconShape: "squircle", downloadUrls: { download: "https://connect.family.co/v0/download/rainbow", website: "https://rainbow.me", android: "https://play.google.com/store/apps/details?id=me.rainbow", ios: "https://apps.apple.com/app/rainbow-ethereum-wallet/id1457119021?pt=119997837&mt=8", chrome: "https://rainbow.me/extension", edge: "https://rainbow.me/extension", brave: "https://rainbow.me/extension", }, getWalletDeeplink: (uri) => `https://rnbwapp.com/wc?uri=${encodeURIComponent(uri)}`, chainTypes: [ChainType.EVM], }, "com.trustwallet.app": { name: "Trust Wallet", shortName: "Trust", icon: _jsx(Logos.Trust, {}), iconShouldShrink: true, downloadUrls: { download: "https://connect.family.co/v0/download/trust", android: "https://play.google.com/store/apps/details?id=com.wallet.crypto.trustapp", ios: "https://apps.apple.com/app/trust-crypto-bitcoin-wallet/id1288339409", }, getWalletDeeplink(uri, chainType) { const isEVM = !chainType || chainType === ChainType.EVM; if (isEVM) return `https://link.trustwallet.com/wc?uri=${encodeURIComponent(uri)}`; return `https://link.trustwallet.com/open_url?coin_id=60&url=${encodeURIComponent(uri)}`; }, chainTypes: [ChainType.EVM, ChainType.SOL, ChainType.UTXO], }, slush: { name: "Slush", icon: _jsx(Logos.Slush, {}), getWalletDeeplink: (uri) => { const url = encodeURIComponent(uri); const ref = encodeURIComponent(window.location.origin); return `slush://browse/${url}?ref=${ref}`; }, chainTypes: [ChainType.SUI], }, solflare: { name: "Solflare", icon: _jsx(Logos.Solflare, {}), getWalletDeeplink: (uri) => { const url = encodeURIComponent(uri); const ref = encodeURIComponent(window.location.origin); return `https://solflare.com/ul/v1/browse/${url}?ref=${ref}`; }, chainTypes: [ChainType.SOL], }, ledger: { name: "Ledger Live", shortName: "Ledger", icon: _jsx(Logos.Ledger, {}), downloadUrls: { download: "https://connect.family.co/v0/download/ledger", website: "https://www.ledger.com/ledger-live/download#download-device-2", android: "https://play.google.com/store/apps/details?id=com.ledger.live", ios: "https://apps.apple.com/app/ledger-live-web3-wallet/id1361671700", }, getWalletDeeplink: (uri) => { return isAndroid() ? uri : `ledgerlive://wc?uri=${encodeURIComponent(uri)}`; }, shouldDeeplinkDesktop: true, chainTypes: [ChainType.EVM], }, zerion: { name: "Zerion", icon: _jsx(Logos.Zerion, {}), downloadUrls: { download: "https://connect.family.co/v0/download/zerion", ios: "https://apps.apple.com/app/apple-store/id1456732565", android: "https://play.google.com/store/apps/details?id=io.zerion.android", website: "https://zerion.io/", }, getWalletDeeplink: (uri, chainType) => { const isEVM = !chainType || chainType === ChainType.EVM; if (isEVM) return `https://app.zerion.io/wc?uri=${encodeURIComponent(uri)}`; return `https://app.zerion.io/dapp/${uri.replace("https://", "")}`; }, chainTypes: [ChainType.EVM, ChainType.SOL], }, mobileWallet: { name: "Mobile Wallets", shortName: "Mobile Wallets", icon: _jsx(MobileWithLogos, {}), iconShouldShrink: true, hideInMobileConnectors: true, iconShape: "squircle", chainTypes: [ChainType.SUI, ChainType.UTXO], }, walletConnect: { name: "Other Wallets", shortName: "Other", icon: _jsx(Logos.WalletConnect, { background: true }), iconConnector: _jsx(Logos.OtherWallets, {}), iconShape: "square", getWalletDeeplink: (uri) => uri, chainTypes: [ChainType.EVM], }, WalletConnect: { name: "Other Wallets", shortName: "Other", icon: _jsx(Logos.WalletConnect, { background: true }), iconConnector: _jsx(Logos.OtherWallets, {}), iconShape: "square", getWalletDeeplink: (uri) => uri, chainTypes: [ChainType.SOL], }, };