File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 10
10
Span ,
11
11
} from ' flowbite-svelte' ;
12
12
13
+ // PROBANDO WALLET KIT
14
+ // npm i @reown/walletkit @walletconnect/utils @walletconnect/core
15
+
16
+ import { Core } from ' @walletconnect/core'
17
+ import { WalletKit } from ' @reown/walletkit'
18
+
19
+ const core = new Core ({
20
+ projectId: ' 718db8dd3bdd8a270d49ea62522c0805'
21
+ })
22
+
23
+ const metadata = {
24
+ name: ' Wallet Paxapos' ,
25
+ description: ' AppKit Example' ,
26
+ url: ' http://localhost:5173/' , // origin must match your domain & subdomain
27
+ icons: [' https://assets.reown.com/reown-profile-pic.png' ]
28
+ }
29
+
30
+ const walletKit = WalletKit .init ({
31
+ core , // <- pass the shared 'core' instance
32
+ metadata
33
+ })
34
+
35
+
36
+
37
+ async function connectWallet() {
38
+ try {
39
+ const session = await walletKit ;
40
+ console .log (' Conectado:' , session );
41
+ // Aquí puedes almacenar la dirección de la wallet o cualquier otra información necesaria
42
+ } catch (error ) {
43
+ console .error (' Error al conectar:' , error );
44
+ }
45
+ }
46
+
13
47
// cargar pubKey de stellar
14
48
let addr: string = localStorage .getItem (' addr' ) || ' ' ;
15
49
77
111
>
78
112
<Wallet address ={addr } pasword ={priv } />
79
113
</Card >
114
+ <button on:click ={connectWallet } class =" btn" >
115
+ Conectar Wallet connect
116
+ </button >
80
117
</div >
81
118
</main >
You can’t perform that action at this time.
0 commit comments