diff --git a/cli/Cargo.lock b/cli/Cargo.lock index a84ad0e9d..f35a6ceda 100644 --- a/cli/Cargo.lock +++ b/cli/Cargo.lock @@ -1820,7 +1820,7 @@ dependencies = [ [[package]] name = "secp256k1-zkp" version = "0.10.0" -source = "git+https://github.com/BlockstreamResearch/rust-secp256k1-zkp.git?rev=60e631c24588a0c9e271badd61959294848c665d#60e631c24588a0c9e271badd61959294848c665d" +source = "git+https://github.com/BlockstreamResearch/rust-secp256k1-zkp.git?rev=60e631c24#60e631c24588a0c9e271badd61959294848c665d" dependencies = [ "bitcoin-private", "rand", @@ -1832,7 +1832,7 @@ dependencies = [ [[package]] name = "secp256k1-zkp-sys" version = "0.9.1" -source = "git+https://github.com/BlockstreamResearch/rust-secp256k1-zkp.git?rev=60e631c24588a0c9e271badd61959294848c665d#60e631c24588a0c9e271badd61959294848c665d" +source = "git+https://github.com/BlockstreamResearch/rust-secp256k1-zkp.git?rev=60e631c24#60e631c24588a0c9e271badd61959294848c665d" dependencies = [ "cc", "secp256k1-sys 0.9.2", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index ec0581392..ad2eeaaf0 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -18,4 +18,5 @@ serde = { version = "1.0.197", features = ["derive"] } serde_json = "1.0.115" [patch.crates-io] -secp256k1-zkp = {git = "https://github.com/BlockstreamResearch/rust-secp256k1-zkp.git", rev = "60e631c24588a0c9e271badd61959294848c665d"} +# https://github.com/BlockstreamResearch/rust-secp256k1-zkp/pull/48/commits +secp256k1-zkp = {git = "https://github.com/BlockstreamResearch/rust-secp256k1-zkp.git", rev = "60e631c24"} diff --git a/cli/src/main.rs b/cli/src/main.rs index 08ecbb805..5e14b506d 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -71,7 +71,7 @@ fn main() -> Result<()> { } let mnemonic = persistence.get_or_create_mnemonic()?; - let wallet = Wallet::init( + let wallet = Wallet::connect( &mnemonic.to_string(), Some(data_dir_str), Network::LiquidTestnet, diff --git a/lib/Cargo.lock b/lib/Cargo.lock index 8c14fd268..f8194a998 100644 --- a/lib/Cargo.lock +++ b/lib/Cargo.lock @@ -2143,7 +2143,7 @@ dependencies = [ [[package]] name = "secp256k1-zkp" version = "0.10.0" -source = "git+https://github.com/BlockstreamResearch/rust-secp256k1-zkp.git?rev=60e631c24588a0c9e271badd61959294848c665d#60e631c24588a0c9e271badd61959294848c665d" +source = "git+https://github.com/BlockstreamResearch/rust-secp256k1-zkp.git?rev=60e631c24#60e631c24588a0c9e271badd61959294848c665d" dependencies = [ "bitcoin-private", "rand 0.8.5", @@ -2155,7 +2155,7 @@ dependencies = [ [[package]] name = "secp256k1-zkp-sys" version = "0.9.1" -source = "git+https://github.com/BlockstreamResearch/rust-secp256k1-zkp.git?rev=60e631c24588a0c9e271badd61959294848c665d#60e631c24588a0c9e271badd61959294848c665d" +source = "git+https://github.com/BlockstreamResearch/rust-secp256k1-zkp.git?rev=60e631c24#60e631c24588a0c9e271badd61959294848c665d" dependencies = [ "cc", "secp256k1-sys 0.9.2", diff --git a/lib/Cargo.toml b/lib/Cargo.toml index 4e56c82e0..2cdc99129 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -23,4 +23,5 @@ uniffi = "0.27.1" uniffi_macros = "0.27.1" [patch.crates-io] -secp256k1-zkp = {git = "https://github.com/BlockstreamResearch/rust-secp256k1-zkp.git", rev = "60e631c24588a0c9e271badd61959294848c665d"} +# https://github.com/BlockstreamResearch/rust-secp256k1-zkp/pull/48/commits +secp256k1-zkp = {git = "https://github.com/BlockstreamResearch/rust-secp256k1-zkp.git", rev = "60e631c24"} diff --git a/lib/ls-sdk-bindings/bindings-react-native/src/gen_kotlin/mod.rs b/lib/ls-sdk-bindings/bindings-react-native/src/gen_kotlin/mod.rs index 570c40c19..a63d87092 100644 --- a/lib/ls-sdk-bindings/bindings-react-native/src/gen_kotlin/mod.rs +++ b/lib/ls-sdk-bindings/bindings-react-native/src/gen_kotlin/mod.rs @@ -10,7 +10,7 @@ pub use uniffi_bindgen::bindings::kotlin::gen_kotlin::*; use crate::generator::RNConfig; static IGNORED_FUNCTIONS: Lazy> = Lazy::new(|| { - let list: Vec<&str> = vec!["init"]; + let list: Vec<&str> = vec!["connect"]; HashSet::from_iter(list.into_iter().map(|s| s.to_string())) }); diff --git a/lib/ls-sdk-bindings/bindings-react-native/src/gen_kotlin/templates/module.kt b/lib/ls-sdk-bindings/bindings-react-native/src/gen_kotlin/templates/module.kt index ce6aa541d..66cc8ef0f 100644 --- a/lib/ls-sdk-bindings/bindings-react-native/src/gen_kotlin/templates/module.kt +++ b/lib/ls-sdk-bindings/bindings-react-native/src/gen_kotlin/templates/module.kt @@ -50,7 +50,7 @@ class LiquidSwapSDKModule(reactContext: ReactApplicationContext) : ReactContextB {%- endfor %} @ReactMethod - fun initBindingWallet(mnemonic: String, dataDir: String, network: String, promise: Promise) { + fun connect(mnemonic: String, dataDir: String, network: String, promise: Promise) { if (bindingWallet != null) { promise.reject("Generic", "Already initialized") return @@ -60,7 +60,7 @@ class LiquidSwapSDKModule(reactContext: ReactApplicationContext) : ReactContextB try { val dataDirTmp = dataDir.takeUnless { it.isEmpty() } ?: run { reactApplicationContext.filesDir.toString() + "/lsSdk" } val networkTmp = asNetwork(network) - bindingWallet = init(mnemonic, dataDirTmp, networkTmp) + bindingWallet = connect(mnemonic, dataDirTmp, networkTmp) promise.resolve(readableMapOf("status" to "ok")) } catch (e: Exception) { promise.reject(e.javaClass.simpleName.replace("Exception", "Error"), e.message, e) diff --git a/lib/ls-sdk-bindings/bindings-react-native/src/gen_swift/mod.rs b/lib/ls-sdk-bindings/bindings-react-native/src/gen_swift/mod.rs index c15100365..be1e17c55 100644 --- a/lib/ls-sdk-bindings/bindings-react-native/src/gen_swift/mod.rs +++ b/lib/ls-sdk-bindings/bindings-react-native/src/gen_swift/mod.rs @@ -9,7 +9,7 @@ use crate::generator::RNConfig; pub use uniffi_bindgen::bindings::swift::gen_swift::*; static IGNORED_FUNCTIONS: Lazy> = Lazy::new(|| { - let list: Vec<&str> = vec!["init"]; + let list: Vec<&str> = vec!["connect"]; HashSet::from_iter(list.into_iter().map(|s| s.to_string())) }); diff --git a/lib/ls-sdk-bindings/bindings-react-native/src/gen_swift/templates/extern.m b/lib/ls-sdk-bindings/bindings-react-native/src/gen_swift/templates/extern.m index 27d286369..4d84ddeb6 100644 --- a/lib/ls-sdk-bindings/bindings-react-native/src/gen_swift/templates/extern.m +++ b/lib/ls-sdk-bindings/bindings-react-native/src/gen_swift/templates/extern.m @@ -8,7 +8,7 @@ @interface RCT_EXTERN_MODULE(RNLiquidSwapSDK, RCTEventEmitter) {% endif %} {%- endfor %} RCT_EXTERN_METHOD( - initBindingWallet: (NSString*)mnemonic + connect: (NSString*)mnemonic dataDir: (NSString*)dataDir network: (NSString*)network resolve: (RCTPromiseResolveBlock)resolve diff --git a/lib/ls-sdk-bindings/bindings-react-native/src/gen_swift/templates/module.swift b/lib/ls-sdk-bindings/bindings-react-native/src/gen_swift/templates/module.swift index e05c5c88c..246248169 100644 --- a/lib/ls-sdk-bindings/bindings-react-native/src/gen_swift/templates/module.swift +++ b/lib/ls-sdk-bindings/bindings-react-native/src/gen_swift/templates/module.swift @@ -57,8 +57,8 @@ class RNLiquidSwapSDK: RCTEventEmitter { {% include "TopLevelFunctionTemplate.swift" %} {% endif -%} {%- endfor %} - @objc(initBindingWallet:dataDir:network:resolve:reject:) - func initBindingWallet(_ mnemonic: String, dataDir: String, network: String, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) -> Void { + @objc(connect:dataDir:network:resolve:reject:) + func connect(_ mnemonic: String, dataDir: String, network: String, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) -> Void { if bindingWallet != nil { reject("Generic", "Already initialized", nil) return @@ -67,7 +67,7 @@ class RNLiquidSwapSDK: RCTEventEmitter { do { let dataDirTmp = dataDir.isEmpty ? RNLiquidSwapSDK.defaultDataDir.path : dataDir let networkTmp = try LiquidSwapSDKMapper.asNetwork(network: network) - bindingWallet = try LiquidSwapSDK.`init`(mnemonic: mnemonic, dataDir: dataDirTmp, network: networkTmp) + bindingWallet = try LiquidSwapSDK.connect(mnemonic: mnemonic, dataDir: dataDirTmp, network: networkTmp) resolve(["status": "ok"]) } catch let err { rejectErr(err: err, reject: reject) diff --git a/lib/ls-sdk-bindings/bindings-react-native/src/gen_typescript/mod.rs b/lib/ls-sdk-bindings/bindings-react-native/src/gen_typescript/mod.rs index 6ec045de8..a98e5f98a 100644 --- a/lib/ls-sdk-bindings/bindings-react-native/src/gen_typescript/mod.rs +++ b/lib/ls-sdk-bindings/bindings-react-native/src/gen_typescript/mod.rs @@ -26,7 +26,7 @@ static KEYWORDS: Lazy> = Lazy::new(|| { }); static IGNORED_FUNCTIONS: Lazy> = Lazy::new(|| { - let list: Vec<&str> = vec!["init"]; + let list: Vec<&str> = vec![]; HashSet::from_iter(list.into_iter().map(|s| s.to_string())) }); diff --git a/lib/ls-sdk-bindings/bindings-react-native/src/gen_typescript/templates/Helpers.ts b/lib/ls-sdk-bindings/bindings-react-native/src/gen_typescript/templates/Helpers.ts index 6944725c8..e69de29bb 100644 --- a/lib/ls-sdk-bindings/bindings-react-native/src/gen_typescript/templates/Helpers.ts +++ b/lib/ls-sdk-bindings/bindings-react-native/src/gen_typescript/templates/Helpers.ts @@ -1,5 +0,0 @@ - -export const init = async (mnemonic: string, dataDir: string = "", network: Network): Promise => { - const response = await LiquidSwapSDK.initBindingWallet(mnemonic, dataDir, network) - return response -} \ No newline at end of file diff --git a/lib/ls-sdk-bindings/src/lib.rs b/lib/ls-sdk-bindings/src/lib.rs index a519f4439..45f24290c 100644 --- a/lib/ls-sdk-bindings/src/lib.rs +++ b/lib/ls-sdk-bindings/src/lib.rs @@ -19,12 +19,12 @@ impl From for LsSdkError { } } -pub fn init( +pub fn connect( mnemonic: String, data_dir: Option, network: Network, ) -> Result, LsSdkError> { - let ln_sdk = Wallet::init(&mnemonic, data_dir, network)?; + let ln_sdk = Wallet::connect(&mnemonic, data_dir, network)?; Ok(Arc::from(BindingWallet { ln_sdk })) } diff --git a/lib/ls-sdk-bindings/src/ls_sdk.udl b/lib/ls-sdk-bindings/src/ls_sdk.udl index 034cc01da..0f0f7e763 100644 --- a/lib/ls-sdk-bindings/src/ls_sdk.udl +++ b/lib/ls-sdk-bindings/src/ls_sdk.udl @@ -58,7 +58,7 @@ dictionary ReceivePaymentResponse { namespace ls_sdk { [Throws=LsSdkError] - BindingWallet init(string mnemonic, string? data_dir, Network network); + BindingWallet connect(string mnemonic, string? data_dir, Network network); }; interface BindingWallet { diff --git a/lib/ls-sdk-bindings/tests/bindings/test_ls_sdk.kts b/lib/ls-sdk-bindings/tests/bindings/test_ls_sdk.kts index 296ecdcb6..9a1f19ec1 100644 --- a/lib/ls-sdk-bindings/tests/bindings/test_ls_sdk.kts +++ b/lib/ls-sdk-bindings/tests/bindings/test_ls_sdk.kts @@ -1,6 +1,6 @@ try { var mnemonic = "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about" - var sdk = ls_sdk.init(mnemonic, null, ls_sdk.Network.LIQUID_TESTNET) + var sdk = ls_sdk.connect(mnemonic, null, ls_sdk.Network.LIQUID_TESTNET) var nodeInfo = sdk.getInfo(false) println("$nodeInfo") assert(nodeInfo.pubkey.equals("03d902f35f560e0470c63313c7369168d9d7df2d49bf295fd9fb7cb109ccee0494")) diff --git a/lib/ls-sdk-bindings/tests/bindings/test_ls_sdk.py b/lib/ls-sdk-bindings/tests/bindings/test_ls_sdk.py index df486b32e..3ac2f72d8 100644 --- a/lib/ls-sdk-bindings/tests/bindings/test_ls_sdk.py +++ b/lib/ls-sdk-bindings/tests/bindings/test_ls_sdk.py @@ -2,7 +2,7 @@ def test(): mnemonic = "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about" - sdk = ls_sdk.init(mnemonic, None, ls_sdk.Network.LIQUID_TESTNET) + sdk = ls_sdk.connect(mnemonic, None, ls_sdk.Network.LIQUID_TESTNET) node_info = sdk.get_info(False) print(node_info) assert node_info.pubkey == "03d902f35f560e0470c63313c7369168d9d7df2d49bf295fd9fb7cb109ccee0494" diff --git a/lib/ls-sdk-bindings/tests/bindings/test_ls_sdk.swift b/lib/ls-sdk-bindings/tests/bindings/test_ls_sdk.swift index 8493d5d16..cf75c3910 100644 --- a/lib/ls-sdk-bindings/tests/bindings/test_ls_sdk.swift +++ b/lib/ls-sdk-bindings/tests/bindings/test_ls_sdk.swift @@ -1,7 +1,7 @@ import ls_sdk let mnemonic = "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about"; -let sdk = try ls_sdk.`init`(mnemonic: mnemonic, dataDir: nil, network: .liquidTestnet); +let sdk = try ls_sdk.connect(mnemonic: mnemonic, dataDir: nil, network: .liquidTestnet); let nodeInfo = try sdk.getInfo(withScan: false); print(nodeInfo); assert(nodeInfo.pubkey == "03d902f35f560e0470c63313c7369168d9d7df2d49bf295fd9fb7cb109ccee0494", "nodeInfo.pubkey"); \ No newline at end of file diff --git a/lib/ls-sdk-core/README.md b/lib/ls-sdk-core/README.md index fa752c225..dcc621772 100644 --- a/lib/ls-sdk-core/README.md +++ b/lib/ls-sdk-core/README.md @@ -16,7 +16,7 @@ The wallet provides the ability to `backup` and `restore` ongoing swaps via the let mnemonic = "..."; let data_dir = None; let network = Network::Liquid; -let breez_wallet = Wallet::init(mnemonic, data_dir, network)?; +let breez_wallet = Wallet::connect(mnemonic, data_dir, network)?; breez_wallet.backup()?; // Backs up the pending swaps under `{data_dir}/backup{-testnet}.sql`. Overwrites previous versions. let backup_path = None; // Can also be Some(String), a path pointing to the database. Default is `{data_dir}/backup{-testnet}.sql` diff --git a/lib/ls-sdk-core/src/lib.rs b/lib/ls-sdk-core/src/lib.rs index 3c10286c4..207d83928 100644 --- a/lib/ls-sdk-core/src/lib.rs +++ b/lib/ls-sdk-core/src/lib.rs @@ -66,7 +66,8 @@ mod tests { #[test] fn normal_submarine_swap() -> Result<()> { let (_data_dir, data_dir_str) = create_temp_dir()?; - let breez_wallet = Wallet::init(TEST_MNEMONIC, Some(data_dir_str), Network::LiquidTestnet)?; + let breez_wallet = + Wallet::connect(TEST_MNEMONIC, Some(data_dir_str), Network::LiquidTestnet)?; let invoice = "lntb10u1pnqwkjrpp5j8ucv9mgww0ajk95yfpvuq0gg5825s207clrzl5thvtuzfn68h0sdqqcqzzsxqr23srzjqv8clnrfs9keq3zlg589jvzpw87cqh6rjks0f9g2t9tvuvcqgcl45f6pqqqqqfcqqyqqqqlgqqqqqqgq2qsp5jnuprlxrargr6hgnnahl28nvutj3gkmxmmssu8ztfhmmey3gq2ss9qyyssq9ejvcp6frwklf73xvskzdcuhnnw8dmxag6v44pffwqrxznsly4nqedem3p3zhn6u4ln7k79vk6zv55jjljhnac4gnvr677fyhfgn07qp4x6wrq"; breez_wallet.prepare_send_payment(&invoice)?; @@ -78,7 +79,8 @@ mod tests { #[test] fn reverse_submarine_swap() -> Result<()> { let (_data_dir, data_dir_str) = create_temp_dir()?; - let breez_wallet = Wallet::init(TEST_MNEMONIC, Some(data_dir_str), Network::LiquidTestnet)?; + let breez_wallet = + Wallet::connect(TEST_MNEMONIC, Some(data_dir_str), Network::LiquidTestnet)?; let prepare_response = breez_wallet.prepare_receive_payment(&PrepareReceiveRequest { receiver_amount_sat: Some(1000), diff --git a/lib/ls-sdk-core/src/wallet.rs b/lib/ls-sdk-core/src/wallet.rs index 174ce53f7..6615be9e5 100644 --- a/lib/ls-sdk-core/src/wallet.rs +++ b/lib/ls-sdk-core/src/wallet.rs @@ -47,7 +47,11 @@ pub struct Wallet { } impl Wallet { - pub fn init(mnemonic: &str, data_dir: Option, network: Network) -> Result> { + pub fn connect( + mnemonic: &str, + data_dir: Option, + network: Network, + ) -> Result> { let is_mainnet = network == Network::Liquid; let signer = SwSigner::new(mnemonic, is_mainnet)?; let descriptor = Wallet::get_descriptor(&signer, network)?; diff --git a/lib/ls-sdk-react-native/android/src/main/java/com/lssdk/LiquidSwapSDKModule.kt b/lib/ls-sdk-react-native/android/src/main/java/com/lssdk/LiquidSwapSDKModule.kt index e275d7b83..1de4986ba 100644 --- a/lib/ls-sdk-react-native/android/src/main/java/com/lssdk/LiquidSwapSDKModule.kt +++ b/lib/ls-sdk-react-native/android/src/main/java/com/lssdk/LiquidSwapSDKModule.kt @@ -40,7 +40,7 @@ class LiquidSwapSDKModule(reactContext: ReactApplicationContext) : ReactContextB fun removeListeners(count: Int) {} @ReactMethod - fun initBindingWallet( + fun connect( mnemonic: String, dataDir: String, network: String, @@ -55,7 +55,7 @@ class LiquidSwapSDKModule(reactContext: ReactApplicationContext) : ReactContextB try { val dataDirTmp = dataDir.takeUnless { it.isEmpty() } ?: run { reactApplicationContext.filesDir.toString() + "/lsSdk" } val networkTmp = asNetwork(network) - bindingWallet = init(mnemonic, dataDirTmp, networkTmp) + bindingWallet = connect(mnemonic, dataDirTmp, networkTmp) promise.resolve(readableMapOf("status" to "ok")) } catch (e: Exception) { promise.reject(e.javaClass.simpleName.replace("Exception", "Error"), e.message, e) diff --git a/lib/ls-sdk-react-native/example/App.js b/lib/ls-sdk-react-native/example/App.js index 3fa4c97af..707e7d1f6 100644 --- a/lib/ls-sdk-react-native/example/App.js +++ b/lib/ls-sdk-react-native/example/App.js @@ -8,7 +8,7 @@ import React, { useState } from "react" import { SafeAreaView, ScrollView, StatusBar, Text, TouchableOpacity, View } from "react-native" -import { Network, getInfo, init } from "@breeztech/react-native-liquid-swap-sdk" +import { Network, getInfo, connect } from "@breeztech/react-native-liquid-swap-sdk" import { generateMnemonic } from "@dreson4/react-native-quick-bip39" import { getSecureItem, setSecureItem } from "./utils/storage" @@ -43,8 +43,8 @@ const App = () => { setSecureItem(MNEMONIC_STORE, mnemonic) } - await init(mnemonic, undefined, Network.LIQUID) - addLine("init", null) + await connect(mnemonic, undefined, Network.LIQUID) + addLine("connect", null) let walletInfo = await getInfo(false) addLine("getInfo", JSON.stringify(walletInfo)) diff --git a/lib/ls-sdk-react-native/ios/RNLiquidSwapSDK.m b/lib/ls-sdk-react-native/ios/RNLiquidSwapSDK.m index c0c0e9c1e..773582ca9 100644 --- a/lib/ls-sdk-react-native/ios/RNLiquidSwapSDK.m +++ b/lib/ls-sdk-react-native/ios/RNLiquidSwapSDK.m @@ -4,7 +4,7 @@ @interface RCT_EXTERN_MODULE(RNLiquidSwapSDK, RCTEventEmitter) RCT_EXTERN_METHOD( - initBindingWallet: (NSString*)mnemonic + connect: (NSString*)mnemonic dataDir: (NSString*)dataDir network: (NSString*)network resolve: (RCTPromiseResolveBlock)resolve diff --git a/lib/ls-sdk-react-native/ios/RNLiquidSwapSDK.swift b/lib/ls-sdk-react-native/ios/RNLiquidSwapSDK.swift index e9c28dc55..a5b7b923d 100644 --- a/lib/ls-sdk-react-native/ios/RNLiquidSwapSDK.swift +++ b/lib/ls-sdk-react-native/ios/RNLiquidSwapSDK.swift @@ -51,8 +51,8 @@ class RNLiquidSwapSDK: RCTEventEmitter { throw LsSdkError.Generic(message: "Not initialized") } - @objc(initBindingWallet:dataDir:network:resolve:reject:) - func initBindingWallet(_ mnemonic: String, dataDir: String, network: String, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { + @objc(connect:dataDir:network:resolve:reject:) + func connect(_ mnemonic: String, dataDir: String, network: String, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { if bindingWallet != nil { reject("Generic", "Already initialized", nil) return @@ -61,7 +61,7 @@ class RNLiquidSwapSDK: RCTEventEmitter { do { let dataDirTmp = dataDir.isEmpty ? RNLiquidSwapSDK.defaultDataDir.path : dataDir let networkTmp = try LiquidSwapSDKMapper.asNetwork(network: network) - bindingWallet = try LiquidSwapSDK.`init`(mnemonic: mnemonic, dataDir: dataDirTmp, network: networkTmp) + bindingWallet = try LiquidSwapSDK.connect(mnemonic: mnemonic, dataDir: dataDirTmp, network: networkTmp) resolve(["status": "ok"]) } catch let err { rejectErr(err: err, reject: reject) diff --git a/lib/ls-sdk-react-native/src/index.ts b/lib/ls-sdk-react-native/src/index.ts index d5181275c..3fde7a9bc 100644 --- a/lib/ls-sdk-react-native/src/index.ts +++ b/lib/ls-sdk-react-native/src/index.ts @@ -56,11 +56,12 @@ export enum Network { LIQUID_TESTNET = "liquidTestnet" } -export const init = async (mnemonic: string, dataDir: string = "", network: Network): Promise => { - const response = await LiquidSwapSDK.initBindingWallet(mnemonic, dataDir, network) +export const connect = async (mnemonic: string, dataDir: string = "", network: Network): Promise => { + const response = await LiquidSwapSDK.connect(mnemonic, dataDir, network) return response } + export const getInfo = async (withScan: boolean): Promise => { const response = await LiquidSwapSDK.getInfo(withScan) return response