Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/getting-started/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ const manager = new WalletManager({
options: {
projectId: '<REOWN_PROJECT_ID>' // Required
}
},
{
id: WalletId.VOIWALLET,
options: {
projectId: '<REOWN_PROJECT_ID>' // Required
}
}
]
})
Expand Down
14 changes: 14 additions & 0 deletions docs/getting-started/supported-wallets.md
Original file line number Diff line number Diff line change
Expand Up @@ -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" %}
Expand Down
4 changes: 4 additions & 0 deletions examples/nextjs/src/app/providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions examples/nuxt/plugins/walletManager.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions examples/react-ts/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions examples/solid-ts/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions examples/svelte-ts/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
id: WalletId.BIATEC,
options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' }
},
{
id: WalletId.VOIWALLET,
options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' }
},
WalletId.KMD,
WalletId.KIBISIS,
WalletId.LUTE,
Expand Down
4 changes: 4 additions & 0 deletions examples/vanilla-ts/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions examples/vue-ts/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions packages/use-wallet/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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
}
Expand Down
5 changes: 3 additions & 2 deletions packages/use-wallet/src/wallets/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export * from './base'
export * from './biatec'
export * from './custom'
export * from './defly'
export * from './defly-web'
Expand All @@ -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'
4 changes: 4 additions & 0 deletions packages/use-wallet/src/wallets/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -27,6 +28,7 @@ export enum WalletId {
MAGIC = 'magic',
MNEMONIC = 'mnemonic',
PERA = 'pera',
VOIWALLET = 'voiwallet',
WALLETCONNECT = 'walletconnect',
W3_WALLET = 'w3-wallet'
}
Expand All @@ -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
}
Expand All @@ -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<string, never>
}
Expand Down
38 changes: 38 additions & 0 deletions packages/use-wallet/src/wallets/voiwallet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { WalletConnect } from './walletconnect'

const ICON = `data:image/svg+xml;base64,${btoa(`
<svg xmlns="http://www.w3.org/2000/svg" width="322" height="322">
<path fill="#32B1E8" d="M131 19a42 42 0 0 1 15 8c18 12 36 26 50 43l2 3c26 29 41 64 47 102v2l1 20h-49v10l-42 4a70897 70897 0 0 0-78 7h-3l-18 1a804 804 0 0 0 55-186c16 8 29 33 39 48l-2-16-1-3c-3-14-9-27-15-40l-1-3Z"/>
<path fill="#1F3AB7" d="M111 33c13 6 23 25 32 37l1 2 4 6 1 2c6 8 4 20 4 30v3c0 32-11 62-26 89h2c23-3 45-4 68-4v9l-42 4a70897 70897 0 0 0-78 7h-3l-18 1a804 804 0 0 0 55-186Z"/>
<path fill="#3C4856" d="M267 214a2941 2941 0 0 0-12 14l-2 1-10 10-5 4-2 2a8522 8522 0 0 1-21 20c-6 7-11 9-20 10-7 0-12-1-17-6l-8-7-5-6a120 120 0 0 1-8-7l-2-2-4-1-10 7a4157 4157 0 0 1-15 14l-1 1c-5 5-9 6-16 6h-3a397 397 0 0 1-15 0c-14 0-14 0-19-3l-4-7a322 322 0 0 0-8-12l-2-3-8-15 65-7 15-1a47903 47903 0 0 1 122-11l2-1h13Z"/>
<path fill="#1B87DF" d="M152 86v2l1 2 3 1 3 5 2 4 2 3 2 4c11 21 11 21 14 30l2 4v2l3 7 6 18 5 19 2 9h44v1h-3l-64 2h-3a526 526 0 0 0-44 3l4-9a190 190 0 0 0 21-94V86Z"/>
<path fill="#1A279D" d="M139 71c5 1 5 1 7 4l2 3 2 3c5 9 3 20 3 29v3c0 32-11 62-26 89h2c23-3 45-4 68-4v9a798 798 0 0 1-92 7l2-2 1-5 5-9c8-16 14-32 19-49l2-8 2-14 1-1c3-18 2-37 2-55Z"/>
<path fill="#3D4856" d="M151 261c4 1 6 3 8 5l3 3 3 5-4 1-1 19h-18v-20h-7l5-5 2-2 3-2 2-3 4-1Z"/>
<path fill="#2EB4EB" d="m254 65 4 6c4 6 8 9 14 12v2l-2 1c-7 4-11 9-15 16l-5-7c-3-6-9-8-15-10l7-5c6-4 9-9 12-15Z"/>
<path fill="#2021AB" d="M162 206h4c10 0 10 0 15 2v1a11602 11602 0 0 1-44 4h-4l-23 1v-1h9l1-3 8-1 3-1h9l2-1 5-1h15Z"/>
<path fill="#31B8EF" d="M280 50c3 1 3 1 5 4s4 5 8 7l-5 5-6 7-5-5-7-6 6-5 4-7Z"/>
<path fill="#2DC1F2" d="m255 35 8 9-6 7c-5-1-6-3-9-6l7-10Z"/>
<path fill="#2F3A48" d="M157 266c3 1 6 3 8 6v2l-4 1-1 19h-18v-18h1v7l1 4 1 4h7l7 1v-12l-1-3v-7l-1-4Z"/>
<path fill="#233143" d="M157 266c3 1 6 3 8 6v2l-4 1-1 19h-1v-13l-1-4v-6l-1-5Z"/>
<path fill="#2A2DB3" d="m179 207 2 2-9 1h-7l-4-2c4-4 13-2 18-1Z"/>
<path fill="#3864CC" d="m104 69 2 6-1 2v3l-1 2-1 2-1 6-2 1 4-22Z"/>
<path fill="#1F2DAB" d="m77 166 3 1-1 8-5 1c1-4 1-7 3-10Z"/>
<path fill="#2651C8" d="M98 95c3 3 3 3 3 6v2l-3 1v2h-2l2-11Z"/>
<path fill="#383F59" d="m267 214-3 5-1-3-9 1 1-2 12-1Z"/>
<path fill="#184FCF" d="m111 33 4 2-1 2c-2 3-3 5-3 9l-2-1 2-12Z"/>
<path fill="#1D25A8" d="M71 182h1v8l-4 2c1-7 1-7 3-10Z"/>
<path fill="#31BBF6" d="m254 65 4 8-3-1-1-2-1 2h-2l3-7Z"/>
<path fill="#1E78DC" d="m142 168 2 3-2 5-1 2-3 3 1-5 1-3 2-5Z"/>
<path fill="#42CDF8" d="m255 35 4 4h-2l-7 3 5-7Z"/>
<path fill="#25B4EC" d="M148 59h4l-2 8c-2-2-2-2-2-5v-3Z"/>
<path fill="#2024AA" d="m63 200 2 2-1 4-3 2 2-8Z"/>
<path fill="#32BEFA" d="m280 50 3 1-1 4-3 1 1-6Z"/>
</svg>
`)}`

export class VoiWallet extends WalletConnect {
static defaultMetadata = {
name: 'Voi Wallet',
icon: ICON
}
}