Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lute-connect 1.5.1 #356

Merged
merged 6 commits into from
Apr 1, 2025
Merged
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
7 changes: 1 addition & 6 deletions docs/getting-started/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const manager = new WalletManager({
WalletId.PERA,
WalletId.EXODUS,
WalletId.KIBISIS,
WalletId.LUTE,

// Example of a wallet with optional customizations
{
Expand All @@ -89,12 +90,6 @@ const manager = new WalletManager({
apiKey: '<MAGIC_API_KEY>' // Required
}
},
{
id: WalletId.LUTE,
options: {
siteName: '<YOUR_SITE_NAME>' // Required
}
},
{
id: WalletId.BIATEC,
options: {
Expand Down
7 changes: 5 additions & 2 deletions docs/getting-started/supported-wallets.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,14 @@ Web and browser extension wallet with Ledger hardware support. [Installation ins
```typescript
import { WalletId } from '@txnlab/use-wallet'

// Configuration required
// Basic usage (no options required)
WalletId.LUTE

// With optional configuration
{
id: WalletId.LUTE,
options: {
siteName: string // Required: Your site name
siteName?: string // Defaults to document title
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion examples/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@walletconnect/modal": "^2.7.0",
"@walletconnect/sign-client": "^2.17.3",
"algosdk": "3.2.0",
"lute-connect": "^1.4.1",
"lute-connect": "^1.5.1",
"next": "14.2.26",
"react": "18.3.1",
"react-dom": "18.3.1"
Expand Down
5 changes: 1 addition & 4 deletions examples/nextjs/src/app/providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ const walletManager = new WalletManager({
},
WalletId.KMD,
WalletId.KIBISIS,
{
id: WalletId.LUTE,
options: { siteName: 'Example Site' }
},
WalletId.LUTE,
{
id: WalletId.MAGIC,
options: { apiKey: 'pk_live_D17FD8D89621B5F3' }
Expand Down
2 changes: 1 addition & 1 deletion examples/nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@walletconnect/modal": "^2.7.0",
"@walletconnect/sign-client": "^2.17.3",
"algosdk": "3.2.0",
"lute-connect": "^1.4.1",
"lute-connect": "^1.5.1",
"nuxt": "3.16.1",
"vue": "3.5.13",
"vue-router": "4.5.0"
Expand Down
5 changes: 1 addition & 4 deletions examples/nuxt/plugins/walletManager.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ export default defineNuxtPlugin((nuxtApp) => {
},
WalletId.KMD,
WalletId.KIBISIS,
{
id: WalletId.LUTE,
options: { siteName: 'Example Site' }
},
WalletId.LUTE,
{
id: WalletId.MAGIC,
options: { apiKey: 'pk_live_D17FD8D89621B5F3' }
Expand Down
2 changes: 1 addition & 1 deletion examples/react-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@walletconnect/modal": "^2.7.0",
"@walletconnect/sign-client": "^2.17.3",
"algosdk": "3.2.0",
"lute-connect": "^1.4.1",
"lute-connect": "^1.5.1",
"react": "18.3.1",
"react-dom": "18.3.1"
},
Expand Down
5 changes: 1 addition & 4 deletions examples/react-ts/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ const walletManager = new WalletManager({
},
WalletId.KMD,
WalletId.KIBISIS,
{
id: WalletId.LUTE,
options: { siteName: 'Example Site' }
},
WalletId.LUTE,
{
id: WalletId.MAGIC,
options: { apiKey: 'pk_live_D17FD8D89621B5F3' }
Expand Down
2 changes: 1 addition & 1 deletion examples/solid-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@walletconnect/modal": "^2.7.0",
"@walletconnect/sign-client": "^2.17.3",
"algosdk": "3.2.0",
"lute-connect": "^1.4.1",
"lute-connect": "^1.5.1",
"solid-js": "1.9.5"
},
"devDependencies": {
Expand Down
5 changes: 1 addition & 4 deletions examples/solid-ts/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ const walletManager = new WalletManager({
},
WalletId.KMD,
WalletId.KIBISIS,
{
id: WalletId.LUTE,
options: { siteName: 'Example Site' }
},
WalletId.LUTE,
{
id: WalletId.MAGIC,
options: { apiKey: 'pk_live_D17FD8D89621B5F3' }
Expand Down
2 changes: 1 addition & 1 deletion examples/vanilla-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
"@walletconnect/modal": "^2.7.0",
"@walletconnect/sign-client": "^2.17.3",
"algosdk": "3.2.0",
"lute-connect": "^1.4.1"
"lute-connect": "^1.5.1"
}
}
5 changes: 1 addition & 4 deletions examples/vanilla-ts/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ const walletManager = new WalletManager({
},
WalletId.KMD,
WalletId.KIBISIS,
{
id: WalletId.LUTE,
options: { siteName: 'Example Site' }
},
WalletId.LUTE,
{
id: WalletId.MAGIC,
options: { apiKey: 'pk_live_D17FD8D89621B5F3' }
Expand Down
2 changes: 1 addition & 1 deletion examples/vue-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@walletconnect/modal": "^2.7.0",
"@walletconnect/sign-client": "^2.17.3",
"algosdk": "3.2.0",
"lute-connect": "^1.4.1",
"lute-connect": "^1.5.1",
"vue": "3.5.13"
},
"devDependencies": {
Expand Down
5 changes: 1 addition & 4 deletions examples/vue-ts/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ app.use(WalletManagerPlugin, {
},
WalletId.KMD,
WalletId.KIBISIS,
{
id: WalletId.LUTE,
options: { siteName: 'Example Site' }
},
WalletId.LUTE,
{
id: WalletId.MAGIC,
options: { apiKey: 'pk_live_D17FD8D89621B5F3' }
Expand Down
2 changes: 1 addition & 1 deletion packages/use-wallet-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"@perawallet/connect": "^1.4.1",
"@walletconnect/sign-client": "^2.17.3",
"algosdk": "^3.0.0",
"lute-connect": "^1.4.1",
"lute-connect": "^1.5.1",
"magic-sdk": "^28.21.0",
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/use-wallet-solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"@walletconnect/modal": "^2.7.0",
"@walletconnect/sign-client": "^2.17.3",
"algosdk": "^3.0.0",
"lute-connect": "^1.4.1",
"lute-connect": "^1.5.1",
"magic-sdk": "^28.21.0"
},
"peerDependenciesMeta": {
Expand Down
2 changes: 1 addition & 1 deletion packages/use-wallet-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@walletconnect/modal": "^2.7.0",
"@walletconnect/sign-client": "^2.17.3",
"algosdk": "^3.0.0",
"lute-connect": "^1.4.1",
"lute-connect": "^1.5.1",
"magic-sdk": "^28.21.0",
"vue": "^3.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/use-wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"@walletconnect/sign-client": "2.17.3",
"@walletconnect/types": "2.17.3",
"algosdk": "3.2.0",
"lute-connect": "1.4.1",
"lute-connect": "1.5.1",
"magic-sdk": "28.21.0",
"tsup": "8.4.0",
"typescript": "5.8.2"
Expand All @@ -63,7 +63,7 @@
"@walletconnect/modal": "^2.7.0",
"@walletconnect/sign-client": "^2.17.3",
"algosdk": "^3.0.0",
"lute-connect": "^1.4.1"
"lute-connect": "^1.5.1"
},
"peerDependenciesMeta": {
"@agoralabs-sh/avm-web-provider": {
Expand Down
8 changes: 2 additions & 6 deletions packages/use-wallet/src/wallets/lute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,10 @@ export class LuteWallet extends BaseWallet {
store,
subscribe,
getAlgodClient,
options,
options = {},
metadata = {}
}: WalletConstructor<WalletId.LUTE>) {
super({ id, metadata, getAlgodClient, store, subscribe })
if (!options?.siteName) {
this.logger.error('Missing required option: siteName')
throw new Error('Missing required option: siteName')
}
this.options = options
this.store = store
}
Expand All @@ -59,7 +55,7 @@ export class LuteWallet extends BaseWallet {
const module = await import('lute-connect')
const LuteConnect = module.default

const client = new LuteConnect(this.options.siteName as string)
const client = new LuteConnect(this.options?.siteName)
this.client = client
this.logger.info('Client initialized')
return client
Expand Down
46 changes: 23 additions & 23 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.