@txnlab/use-wallet 2.3.1 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/README.md +50 -6
  2. package/dist/cjs/index.js +543 -57
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/src/clients/index.d.ts +4 -2
  5. package/dist/cjs/src/clients/kibisis/client.d.ts +73 -0
  6. package/dist/cjs/src/clients/kibisis/constants.d.ts +37 -0
  7. package/dist/cjs/src/clients/kibisis/index.d.ts +2 -0
  8. package/dist/cjs/src/clients/kibisis/types.d.ts +86 -0
  9. package/dist/cjs/src/clients/lute/client.d.ts +34 -0
  10. package/dist/cjs/src/clients/lute/constants.d.ts +1 -0
  11. package/dist/cjs/src/clients/lute/index.d.ts +2 -0
  12. package/dist/cjs/src/clients/lute/types.d.ts +15 -0
  13. package/dist/cjs/src/constants/constants.d.ts +2 -0
  14. package/dist/cjs/src/store/state/walletStore.d.ts +2 -2
  15. package/dist/cjs/src/testUtils/mockClients.d.ts +6 -0
  16. package/dist/cjs/src/types/providers.d.ts +16 -2
  17. package/dist/esm/index.js +542 -58
  18. package/dist/esm/src/clients/index.d.ts +4 -2
  19. package/dist/esm/src/clients/kibisis/client.d.ts +73 -0
  20. package/dist/esm/src/clients/kibisis/constants.d.ts +37 -0
  21. package/dist/esm/src/clients/kibisis/index.d.ts +2 -0
  22. package/dist/esm/src/clients/kibisis/types.d.ts +86 -0
  23. package/dist/esm/src/clients/lute/client.d.ts +34 -0
  24. package/dist/esm/src/clients/lute/constants.d.ts +1 -0
  25. package/dist/esm/src/clients/lute/index.d.ts +2 -0
  26. package/dist/esm/src/clients/lute/types.d.ts +15 -0
  27. package/dist/esm/src/constants/constants.d.ts +2 -0
  28. package/dist/esm/src/store/state/walletStore.d.ts +2 -2
  29. package/dist/esm/src/testUtils/mockClients.d.ts +6 -0
  30. package/dist/esm/src/types/providers.d.ts +16 -2
  31. package/dist/index.d.ts +149 -4
  32. package/package.json +31 -37
package/README.md CHANGED
@@ -23,6 +23,10 @@ UseWallet supports most Algorand wallet providers, including Defly, Pera, Daffi,
23
23
 
24
24
  Version 2.x introduces [WalletConnect 2.0 support](#walletconnect-20-support).
25
25
 
26
+ ## Disclaimer
27
+
28
+ TxnLab provides `@txnlab/use-wallet` as a wallet integration tool and does not endorse or assume responsibility for any external wallet providers' functionality or security.
29
+
26
30
  ## Table of Contents
27
31
 
28
32
  - [Live Examples](#live-examples)
@@ -58,7 +62,7 @@ Version 2.x introduces [WalletConnect 2.0 support](#walletconnect-20-support).
58
62
 
59
63
  ## Live Examples
60
64
 
61
- **Storybook demo** - https://txnlab.github.io/use-wallet
65
+ <!-- **Storybook demo** - https://txnlab.github.io/use-wallet -->
62
66
 
63
67
  **Next.js example**
64
68
 
@@ -97,7 +101,7 @@ npm install @blockshake/defly-connect @perawallet/connect @daffiwallet/connect
97
101
 
98
102
  In the root of your app, initialize the `WalletProvider` with the `useInitializeProviders` hook.
99
103
 
100
- This example initializes Defly, Pera, Daffi and Exodus wallet providers. The default node configuration (mainnet via [AlgoNode](https://algonode.io/api/)) is used. See [Provider Configuration](#provider-configuration) for more options.
104
+ This example initializes Defly, Pera, Daffi, Exodus, Lute and Kibisis wallet providers. The default node configuration (mainnet via [AlgoNode](https://algonode.io/api/)) is used. See [Provider Configuration](#provider-configuration) for more options.
101
105
 
102
106
  You can initialize your providers in two ways:
103
107
 
@@ -117,6 +121,7 @@ import { WalletProvider, useInitializeProviders, PROVIDER_ID } from '@txnlab/use
117
121
  import { DeflyWalletConnect } from '@blockshake/defly-connect'
118
122
  import { PeraWalletConnect } from '@perawallet/connect'
119
123
  import { DaffiWalletConnect } from '@daffiwallet/connect'
124
+ import LuteConnect from 'lute-connect'
120
125
 
121
126
  export default function App() {
122
127
  const providers = useInitializeProviders({
@@ -124,7 +129,13 @@ export default function App() {
124
129
  { id: PROVIDER_ID.DEFLY, clientStatic: DeflyWalletConnect },
125
130
  { id: PROVIDER_ID.PERA, clientStatic: PeraWalletConnect },
126
131
  { id: PROVIDER_ID.DAFFI, clientStatic: DaffiWalletConnect },
127
- { id: PROVIDER_ID.EXODUS }
132
+ { id: PROVIDER_ID.EXODUS },
133
+ {
134
+ id: PROVIDER_ID.LUTE,
135
+ clientStatic: LuteConnect,
136
+ clientOptions: { siteName: 'YourSiteName' }
137
+ },
138
+ { id: PROVIDER_ID.KIBISIS }
128
139
  ]
129
140
  })
130
141
 
@@ -157,13 +168,24 @@ const getDynamicDaffiWalletConnect = async () => {
157
168
  return DaffiWalletConnect
158
169
  }
159
170
 
171
+ const getDynamicLuteConnect = async () => {
172
+ const LuteConnect = (await import('lute-connect')).default
173
+ return LuteConnect
174
+ }
175
+
160
176
  export default function App() {
161
177
  const providers = useInitializeProviders({
162
178
  providers: [
163
179
  { id: PROVIDER_ID.DEFLY, getDynamicClient: getDynamicDeflyWalletConnect },
164
180
  { id: PROVIDER_ID.PERA, getDynamicClient: getDynamicPeraWalletConnect },
165
181
  { id: PROVIDER_ID.DAFFI, getDynamicClient: getDynamicDaffiWalletConnect },
166
- { id: PROVIDER_ID.EXODUS }
182
+ { id: PROVIDER_ID.EXODUS },
183
+ {
184
+ id: PROVIDER_ID.LUTE,
185
+ getDynamicClient: getDynamicLuteConnect,
186
+ clientOptions: { siteName: 'YourSiteName' }
187
+ },
188
+ { id: PROVIDER_ID.KIBISIS }
167
189
  ]
168
190
  })
169
191
 
@@ -477,6 +499,20 @@ useEffect(() => {
477
499
  - Website - https://www.exodus.com/
478
500
  - Download - https://www.exodus.com/download/
479
501
 
502
+ ### Lute Wallet
503
+
504
+ - Website - https://lute.app/
505
+ - Install dependency - `npm install lute-connect`
506
+
507
+
508
+ ### Kibisis Wallet
509
+
510
+ ***NOTE:** Kibisis is in active development and currently only supports betanet and testnet.*
511
+
512
+ - Website - https://kibis.is
513
+ - Download - https://kibis.is/#download
514
+ - Support/Issues - https://discord.com/channels/1055863853633785857/1181252381816655952
515
+
480
516
  ### KMD (Algorand Key Management Daemon)
481
517
 
482
518
  - Documentation - https://developer.algorand.org/docs/rest-apis/kmd
@@ -494,8 +530,9 @@ Support for these wallets will be removed in a future release.
494
530
  - GitHub - https://github.com/PureStake/algosigner
495
531
  - EOL Press Release - https://www.algorand.foundation/news/algosigner-support-ending
496
532
 
497
- ### MyAlgo
533
+ ### MyAlgo (deprecation pending: January 30, 2024)
498
534
 
535
+ - **DEPRECATION NOTICE** - https://wallet.myalgo.com/access
499
536
  - Website - https://wallet.myalgo.com/home
500
537
  - FAQ - https://wallet.myalgo.com/home#faq
501
538
  - Install dependency - `npm install @randlabs/myalgo-connect`
@@ -617,6 +654,7 @@ import { DeflyWalletConnect } from '@blockshake/defly-connect'
617
654
  import { PeraWalletConnect } from '@perawallet/connect'
618
655
  import { DaffiWalletConnect } from '@daffiwallet/connect'
619
656
  import { WalletConnectModalSign } from '@walletconnect/modal-sign-html'
657
+ import LuteConnect from 'lute-connect'
620
658
 
621
659
  export default function App() {
622
660
  const providers = useInitializeProviders({
@@ -640,7 +678,13 @@ export default function App() {
640
678
  }
641
679
  }
642
680
  },
643
- { id: PROVIDER_ID.EXODUS }
681
+ { id: PROVIDER_ID.EXODUS },
682
+ {
683
+ id: PROVIDER_ID.LUTE,
684
+ clientStatic: LuteConnect,
685
+ clientOptions: { siteName: 'YourSiteName' }
686
+ },
687
+ { id: PROVIDER_ID.KIBISIS }
644
688
  ],
645
689
  nodeConfig: {
646
690
  network: 'mainnet',