diff --git a/docs/getting-started/configuration.md b/docs/getting-started/configuration.md index 3153da0b..2d2b58c1 100644 --- a/docs/getting-started/configuration.md +++ b/docs/getting-started/configuration.md @@ -96,6 +96,12 @@ const manager = new WalletManager({ options: { projectId: '' // Required } + }, + { + id: WalletId.VOIWALLET, + options: { + projectId: '' // Required + } } ] }) diff --git a/docs/getting-started/supported-wallets.md b/docs/getting-started/supported-wallets.md index 25a84438..15dfa4fc 100644 --- a/docs/getting-started/supported-wallets.md +++ b/docs/getting-started/supported-wallets.md @@ -200,6 +200,20 @@ WalletId.BIATEC * [Biatec Website](https://wallet.biatec.io) * [Biatec GitHub Repository](https://github.com/scholtz/wallet) +#### Voi Wallet + +Cross-chain AVM Mobile wallet with WalletConnect support. [Installation instructions](installation.md#walletconnect). + +```typescript +import { WalletId } from '@txnlab/use-wallet' + +// Basic usage (no options required) +WalletId.VOIWALLET +``` + +* [Voi Wallet Website](https://getvoi.app) +* [Voi Wallet GitHub Repository](https://github.com/xarmian/voiwallet) + #### Liquid Auth (experimental) {% hint style="warning" %} diff --git a/examples/nextjs/src/app/providers.tsx b/examples/nextjs/src/app/providers.tsx index 884a8731..b5cbe70a 100644 --- a/examples/nextjs/src/app/providers.tsx +++ b/examples/nextjs/src/app/providers.tsx @@ -16,6 +16,10 @@ const walletManager = new WalletManager({ id: WalletId.BIATEC, options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' } }, + { + id: WalletId.VOIWALLET, + options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' } + }, WalletId.KMD, WalletId.KIBISIS, WalletId.LUTE, diff --git a/examples/nuxt/plugins/walletManager.client.ts b/examples/nuxt/plugins/walletManager.client.ts index 7514004a..cd01594b 100644 --- a/examples/nuxt/plugins/walletManager.client.ts +++ b/examples/nuxt/plugins/walletManager.client.ts @@ -16,6 +16,10 @@ export default defineNuxtPlugin((nuxtApp) => { id: WalletId.BIATEC, options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' } }, + { + id: WalletId.VOIWALLET, + options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' } + }, WalletId.KMD, WalletId.KIBISIS, WalletId.LUTE, diff --git a/examples/react-ts/src/App.tsx b/examples/react-ts/src/App.tsx index 461ce295..aaa39648 100644 --- a/examples/react-ts/src/App.tsx +++ b/examples/react-ts/src/App.tsx @@ -19,6 +19,10 @@ const walletManager = new WalletManager({ id: WalletId.BIATEC, options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' } }, + { + id: WalletId.VOIWALLET, + options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' } + }, WalletId.KMD, WalletId.KIBISIS, WalletId.LUTE, diff --git a/examples/solid-ts/src/App.tsx b/examples/solid-ts/src/App.tsx index 8ac229e4..bd8e7b21 100644 --- a/examples/solid-ts/src/App.tsx +++ b/examples/solid-ts/src/App.tsx @@ -19,6 +19,10 @@ const walletManager = new WalletManager({ id: WalletId.BIATEC, options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' } }, + { + id: WalletId.VOIWALLET, + options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' } + }, WalletId.KMD, WalletId.KIBISIS, WalletId.LUTE, diff --git a/examples/svelte-ts/src/routes/+layout.svelte b/examples/svelte-ts/src/routes/+layout.svelte index 19289ab0..711e4424 100644 --- a/examples/svelte-ts/src/routes/+layout.svelte +++ b/examples/svelte-ts/src/routes/+layout.svelte @@ -16,6 +16,10 @@ id: WalletId.BIATEC, options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' } }, + { + id: WalletId.VOIWALLET, + options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' } + }, WalletId.KMD, WalletId.KIBISIS, WalletId.LUTE, diff --git a/examples/vanilla-ts/src/main.ts b/examples/vanilla-ts/src/main.ts index b2704789..54125f2c 100644 --- a/examples/vanilla-ts/src/main.ts +++ b/examples/vanilla-ts/src/main.ts @@ -19,6 +19,10 @@ const walletManager = new WalletManager({ id: WalletId.BIATEC, options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' } }, + { + id: WalletId.VOIWALLET, + options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' } + }, WalletId.KMD, WalletId.KIBISIS, WalletId.LUTE, diff --git a/examples/vue-ts/src/main.ts b/examples/vue-ts/src/main.ts index 27d5552f..ec1c6113 100644 --- a/examples/vue-ts/src/main.ts +++ b/examples/vue-ts/src/main.ts @@ -19,6 +19,10 @@ app.use(WalletManagerPlugin, { id: WalletId.BIATEC, options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' } }, + { + id: WalletId.VOIWALLET, + options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' } + }, WalletId.KMD, WalletId.KIBISIS, WalletId.LUTE, diff --git a/packages/use-wallet/src/utils.ts b/packages/use-wallet/src/utils.ts index e0a5a009..c95b8a58 100644 --- a/packages/use-wallet/src/utils.ts +++ b/packages/use-wallet/src/utils.ts @@ -11,6 +11,7 @@ import { LuteWallet } from './wallets/lute' import { MagicAuth } from './wallets/magic' import { MnemonicWallet } from './wallets/mnemonic' import { PeraWallet } from './wallets/pera' +import { VoiWallet } from './wallets/voiwallet' import { WalletConnect } from './wallets/walletconnect' import { W3Wallet } from './wallets/w3wallet' @@ -27,6 +28,7 @@ export function createWalletMap(): WalletMap { [WalletId.MAGIC]: MagicAuth, [WalletId.MNEMONIC]: MnemonicWallet, [WalletId.PERA]: PeraWallet, + [WalletId.VOIWALLET]: VoiWallet, [WalletId.WALLETCONNECT]: WalletConnect, [WalletId.W3_WALLET]: W3Wallet } diff --git a/packages/use-wallet/src/wallets/index.ts b/packages/use-wallet/src/wallets/index.ts index 3bf26f8c..8bdd4971 100644 --- a/packages/use-wallet/src/wallets/index.ts +++ b/packages/use-wallet/src/wallets/index.ts @@ -1,5 +1,4 @@ export * from './base' -export * from './biatec' export * from './custom' export * from './defly' export * from './defly-web' @@ -11,5 +10,7 @@ export * from './magic' export * from './mnemonic' export * from './pera' export * from './types' -export * from './walletconnect' +export * from './biatec' +export * from './voiwallet' +export { WalletConnect } from './walletconnect' export * from './w3wallet' diff --git a/packages/use-wallet/src/wallets/types.ts b/packages/use-wallet/src/wallets/types.ts index 2dc6ce99..bd3bc020 100644 --- a/packages/use-wallet/src/wallets/types.ts +++ b/packages/use-wallet/src/wallets/types.ts @@ -10,6 +10,7 @@ import { MnemonicWallet, type MnemonicOptions } from './mnemonic' import { PeraWallet, type PeraWalletConnectOptions } from './pera' import { WalletConnect, type WalletConnectOptions } from './walletconnect' import { BiatecWallet } from './biatec' +import { VoiWallet } from './voiwallet' import type { Store } from '@tanstack/store' import type algosdk from 'algosdk' import type { State } from 'src/store' @@ -27,6 +28,7 @@ export enum WalletId { MAGIC = 'magic', MNEMONIC = 'mnemonic', PERA = 'pera', + VOIWALLET = 'voiwallet', WALLETCONNECT = 'walletconnect', W3_WALLET = 'w3-wallet' } @@ -43,6 +45,7 @@ export type WalletMap = { [WalletId.MAGIC]: typeof MagicAuth [WalletId.MNEMONIC]: typeof MnemonicWallet [WalletId.PERA]: typeof PeraWallet + [WalletId.VOIWALLET]: typeof VoiWallet [WalletId.WALLETCONNECT]: typeof WalletConnect [WalletId.W3_WALLET]: typeof W3Wallet } @@ -59,6 +62,7 @@ export type WalletOptionsMap = { [WalletId.MAGIC]: MagicAuthOptions [WalletId.MNEMONIC]: MnemonicOptions [WalletId.PERA]: PeraWalletConnectOptions + [WalletId.VOIWALLET]: WalletConnectOptions [WalletId.WALLETCONNECT]: WalletConnectOptions [WalletId.W3_WALLET]: Record } diff --git a/packages/use-wallet/src/wallets/voiwallet.ts b/packages/use-wallet/src/wallets/voiwallet.ts new file mode 100644 index 00000000..2424e300 --- /dev/null +++ b/packages/use-wallet/src/wallets/voiwallet.ts @@ -0,0 +1,38 @@ +import { WalletConnect } from './walletconnect' + +const ICON = `data:image/svg+xml;base64,${btoa(` + + + + + + + + + + + + + + + + + + + + + + + + + + + +`)}` + +export class VoiWallet extends WalletConnect { + static defaultMetadata = { + name: 'Voi Wallet', + icon: ICON + } +}