@txnlab/use-wallet 2.3.1 → 2.4.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.
- package/README.md +31 -4
- package/dist/cjs/index.js +162 -40
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/src/clients/index.d.ts +3 -2
- package/dist/cjs/src/clients/lute/client.d.ts +34 -0
- package/dist/cjs/src/clients/lute/constants.d.ts +1 -0
- package/dist/cjs/src/clients/lute/index.d.ts +2 -0
- package/dist/cjs/src/clients/lute/types.d.ts +15 -0
- package/dist/cjs/src/constants/constants.d.ts +1 -0
- package/dist/cjs/src/testUtils/mockClients.d.ts +3 -0
- package/dist/cjs/src/types/providers.d.ts +10 -1
- package/dist/esm/index.js +162 -41
- package/dist/esm/src/clients/index.d.ts +3 -2
- package/dist/esm/src/clients/lute/client.d.ts +34 -0
- package/dist/esm/src/clients/lute/constants.d.ts +1 -0
- package/dist/esm/src/clients/lute/index.d.ts +2 -0
- package/dist/esm/src/clients/lute/types.d.ts +15 -0
- package/dist/esm/src/constants/constants.d.ts +1 -0
- package/dist/esm/src/testUtils/mockClients.d.ts +3 -0
- package/dist/esm/src/types/providers.d.ts +10 -1
- package/dist/index.d.ts +52 -2
- package/package.json +25 -31
package/README.md
CHANGED
|
@@ -97,7 +97,7 @@ npm install @blockshake/defly-connect @perawallet/connect @daffiwallet/connect
|
|
|
97
97
|
|
|
98
98
|
In the root of your app, initialize the `WalletProvider` with the `useInitializeProviders` hook.
|
|
99
99
|
|
|
100
|
-
This example initializes Defly, Pera, Daffi and
|
|
100
|
+
This example initializes Defly, Pera, Daffi, Exodus, and Lute wallet providers. The default node configuration (mainnet via [AlgoNode](https://algonode.io/api/)) is used. See [Provider Configuration](#provider-configuration) for more options.
|
|
101
101
|
|
|
102
102
|
You can initialize your providers in two ways:
|
|
103
103
|
|
|
@@ -117,6 +117,7 @@ import { WalletProvider, useInitializeProviders, PROVIDER_ID } from '@txnlab/use
|
|
|
117
117
|
import { DeflyWalletConnect } from '@blockshake/defly-connect'
|
|
118
118
|
import { PeraWalletConnect } from '@perawallet/connect'
|
|
119
119
|
import { DaffiWalletConnect } from '@daffiwallet/connect'
|
|
120
|
+
import LuteConnect from 'lute-connect'
|
|
120
121
|
|
|
121
122
|
export default function App() {
|
|
122
123
|
const providers = useInitializeProviders({
|
|
@@ -124,7 +125,12 @@ export default function App() {
|
|
|
124
125
|
{ id: PROVIDER_ID.DEFLY, clientStatic: DeflyWalletConnect },
|
|
125
126
|
{ id: PROVIDER_ID.PERA, clientStatic: PeraWalletConnect },
|
|
126
127
|
{ id: PROVIDER_ID.DAFFI, clientStatic: DaffiWalletConnect },
|
|
127
|
-
{ id: PROVIDER_ID.EXODUS }
|
|
128
|
+
{ id: PROVIDER_ID.EXODUS },
|
|
129
|
+
{
|
|
130
|
+
id: PROVIDER_ID.LUTE,
|
|
131
|
+
clientStatic: LuteConnect,
|
|
132
|
+
clientOptions: { siteName: 'YourSiteName' }
|
|
133
|
+
}
|
|
128
134
|
]
|
|
129
135
|
})
|
|
130
136
|
|
|
@@ -157,13 +163,23 @@ const getDynamicDaffiWalletConnect = async () => {
|
|
|
157
163
|
return DaffiWalletConnect
|
|
158
164
|
}
|
|
159
165
|
|
|
166
|
+
const getDynamicLuteConnect = async () => {
|
|
167
|
+
const LuteConnect = (await import('lute-connect')).default
|
|
168
|
+
return LuteConnect
|
|
169
|
+
}
|
|
170
|
+
|
|
160
171
|
export default function App() {
|
|
161
172
|
const providers = useInitializeProviders({
|
|
162
173
|
providers: [
|
|
163
174
|
{ id: PROVIDER_ID.DEFLY, getDynamicClient: getDynamicDeflyWalletConnect },
|
|
164
175
|
{ id: PROVIDER_ID.PERA, getDynamicClient: getDynamicPeraWalletConnect },
|
|
165
176
|
{ id: PROVIDER_ID.DAFFI, getDynamicClient: getDynamicDaffiWalletConnect },
|
|
166
|
-
{ id: PROVIDER_ID.EXODUS }
|
|
177
|
+
{ id: PROVIDER_ID.EXODUS },
|
|
178
|
+
{
|
|
179
|
+
id: PROVIDER_ID.LUTE,
|
|
180
|
+
getDynamicClient: getDynamicLuteConnect,
|
|
181
|
+
clientOptions: { siteName: 'YourSiteName' }
|
|
182
|
+
}
|
|
167
183
|
]
|
|
168
184
|
})
|
|
169
185
|
|
|
@@ -477,6 +493,11 @@ useEffect(() => {
|
|
|
477
493
|
- Website - https://www.exodus.com/
|
|
478
494
|
- Download - https://www.exodus.com/download/
|
|
479
495
|
|
|
496
|
+
### Lute Wallet
|
|
497
|
+
|
|
498
|
+
- Website - https://lute.app/
|
|
499
|
+
- Install dependency - `npm install lute-connect`
|
|
500
|
+
|
|
480
501
|
### KMD (Algorand Key Management Daemon)
|
|
481
502
|
|
|
482
503
|
- Documentation - https://developer.algorand.org/docs/rest-apis/kmd
|
|
@@ -617,6 +638,7 @@ import { DeflyWalletConnect } from '@blockshake/defly-connect'
|
|
|
617
638
|
import { PeraWalletConnect } from '@perawallet/connect'
|
|
618
639
|
import { DaffiWalletConnect } from '@daffiwallet/connect'
|
|
619
640
|
import { WalletConnectModalSign } from '@walletconnect/modal-sign-html'
|
|
641
|
+
import LuteConnect from 'lute-connect'
|
|
620
642
|
|
|
621
643
|
export default function App() {
|
|
622
644
|
const providers = useInitializeProviders({
|
|
@@ -640,7 +662,12 @@ export default function App() {
|
|
|
640
662
|
}
|
|
641
663
|
}
|
|
642
664
|
},
|
|
643
|
-
{ id: PROVIDER_ID.EXODUS }
|
|
665
|
+
{ id: PROVIDER_ID.EXODUS },
|
|
666
|
+
{
|
|
667
|
+
id: PROVIDER_ID.LUTE,
|
|
668
|
+
clientStatic: LuteConnect,
|
|
669
|
+
clientOptions: { siteName: 'YourSiteName' }
|
|
670
|
+
}
|
|
644
671
|
],
|
|
645
672
|
nodeConfig: {
|
|
646
673
|
network: 'mainnet',
|