@@ -32,10 +32,13 @@ cargo build --release
3232``` swift
3333import vss_rust_client_ffi
3434
35- // Initialize VSS client
36- try await vssNewClient (
35+ // Initialize VSS client with LNURL-auth
36+ try await vssNewClientWithLnurlAuth (
3737 baseUrl : " https://vss.example.com" ,
38- storeId : " my-app-store"
38+ storeId : " my-app-store" ,
39+ mnemonic : " abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about" ,
40+ passphrase : nil ,
41+ lnurlAuthServerUrl : " https://auth.example.com/lnurl"
3942)
4043
4144// Store data
@@ -70,11 +73,13 @@ vssShutdownClient()
7073``` python
7174from vss_rust_client_ffi import *
7275
73- # Initialize VSS client
74- await vss_new_client (
76+ # Initialize VSS client with LNURL-auth
77+ await vss_new_client_with_lnurl_auth (
7578 " https://vss.example.com" ,
76- " my-app-store" ,
77- None
79+ " my-app-store" ,
80+ " abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about" ,
81+ None , # passphrase
82+ " https://auth.example.com/lnurl"
7883)
7984
8085# Store data
@@ -112,10 +117,13 @@ vss_shutdown_client()
112117``` kotlin
113118import uniffi.vss_rust_client_ffi.*
114119
115- // Initialize VSS client
116- vssNewClient (
120+ // Initialize VSS client with LNURL-auth
121+ vssNewClientWithLnurlAuth (
117122 baseUrl = " https://vss.example.com" ,
118- storeId = " my-app-store"
123+ storeId = " my-app-store" ,
124+ mnemonic = " abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about" ,
125+ passphrase = null ,
126+ lnurlAuthServerUrl = " https://auth.example.com/lnurl"
119127)
120128
121129// Store data
@@ -146,11 +154,20 @@ vssShutdownClient()
146154### Client Management
147155
148156#### ` vssNewClient(baseUrl: String, storeId: String) -> Void `
149- Initialize the global VSS client connection.
157+ Initialize the global VSS client connection without authentication .
150158
151159- ` baseUrl ` : VSS server URL (e.g., "https://vss.example.com ")
152160- ` storeId ` : Unique identifier for your storage namespace
153161
162+ #### ` vssNewClientWithLnurlAuth(baseUrl: String, storeId: String, mnemonic: String, passphrase: String?, lnurlAuthServerUrl: String) -> Void `
163+ Initialize the global VSS client connection with LNURL-auth authentication. Provides automatic JWT token management and data encryption.
164+
165+ - ` baseUrl ` : VSS server URL (e.g., "https://vss.example.com ")
166+ - ` storeId ` : Unique identifier for your storage namespace
167+ - ` mnemonic ` : BIP39 mnemonic phrase (12 or 24 words)
168+ - ` passphrase ` : Optional BIP39 passphrase (pass ` null ` if none)
169+ - ` lnurlAuthServerUrl ` : LNURL-auth server URL for authentication
170+
154171#### ` vssShutdownClient() -> Void `
155172Shutdown the VSS client and clean up resources. Optional but recommended for clean application shutdown.
156173
0 commit comments