mirror of
https://github.com/aljazceru/breez-sdk-liquid.git
synced 2026-01-10 09:34:21 +01:00
Merge pull request #134 from breez/savage-rename-bindings
Rename project: android, swift and react native bindings
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Liquid Swap SDK
|
||||
# Breez Liquid SDK
|
||||
|
||||
- `lib`: [lib/README.md](lib/ls-sdk-core/README.md)
|
||||
- `cli`: [cli/README.md](cli/README.md)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# breez-sdk-liquid-cli
|
||||
# breez-liquid-sdk-cli
|
||||
|
||||
## Setup
|
||||
|
||||
|
||||
@@ -45,4 +45,4 @@ gen-external-apklibs
|
||||
# End of https://www.toptal.com/developers/gitignore/api/android
|
||||
|
||||
lib/src/main/jniLibs/
|
||||
lib/src/main/kotlin/ls_sdk
|
||||
lib/src/main/kotlin/breez_liquid_sdk
|
||||
|
||||
@@ -9,15 +9,15 @@ fi
|
||||
echo "JitPack building version $VERSION."
|
||||
cd $(dirname $0)
|
||||
|
||||
curl https://mvn.breez.technology/releases/ls_sdk/bindings-android/$VERSION/bindings-android-$VERSION.aar --output bindings-android-$VERSION.aar
|
||||
curl https://mvn.breez.technology/releases/ls_sdk/bindings-android/$VERSION/bindings-android-$VERSION.module --output bindings-android-$VERSION.module
|
||||
curl https://mvn.breez.technology/releases/ls_sdk/bindings-android/$VERSION/bindings-android-$VERSION-sources.jar --output bindings-android-$VERSION-sources.jar
|
||||
curl https://mvn.breez.technology/releases/ls_sdk/bindings-android/$VERSION/bindings-android-$VERSION.pom --output bindings-android-$VERSION.pom
|
||||
curl https://mvn.breez.technology/releases/breez_liquid_sdk/bindings-android/$VERSION/bindings-android-$VERSION.aar --output bindings-android-$VERSION.aar
|
||||
curl https://mvn.breez.technology/releases/breez_liquid_sdk/bindings-android/$VERSION/bindings-android-$VERSION.module --output bindings-android-$VERSION.module
|
||||
curl https://mvn.breez.technology/releases/breez_liquid_sdk/bindings-android/$VERSION/bindings-android-$VERSION-sources.jar --output bindings-android-$VERSION-sources.jar
|
||||
curl https://mvn.breez.technology/releases/breez_liquid_sdk/bindings-android/$VERSION/bindings-android-$VERSION.pom --output bindings-android-$VERSION.pom
|
||||
|
||||
mvn org.apache.maven.plugins:maven-install-plugin:3.1.1:install-file -Dfile=bindings-android-$VERSION.aar -DpomFile=bindings-android-$VERSION.pom
|
||||
mvn org.apache.maven.plugins:maven-install-plugin:3.1.1:install-file -Dfile=bindings-android-$VERSION.module -DpomFile=bindings-android-$VERSION.pom
|
||||
mvn org.apache.maven.plugins:maven-install-plugin:3.1.1:install-file -Dfile=bindings-android-$VERSION-sources.jar -DpomFile=bindings-android-$VERSION.pom -Dclassifier=sources
|
||||
|
||||
ls /home/jitpack/.m2/repository/ls_sdk/bindings-android
|
||||
ls /home/jitpack/.m2/repository/breez_liquid_sdk/bindings-android
|
||||
echo "---"
|
||||
ls /home/jitpack/.m2/repository/ls_sdk/bindings-android/$VERSION/
|
||||
ls /home/jitpack/.m2/repository/breez_liquid_sdk/bindings-android/$VERSION/
|
||||
|
||||
@@ -54,7 +54,7 @@ publishing {
|
||||
}
|
||||
maven {
|
||||
name = "breezGitHubPackages"
|
||||
url = uri("https://maven.pkg.github.com/breez/breez-sdk-liquid")
|
||||
url = uri("https://maven.pkg.github.com/breez/breez-liquid-sdk")
|
||||
credentials {
|
||||
username = System.getenv("GITHUB_ACTOR")
|
||||
password = System.getenv("GITHUB_TOKEN")
|
||||
@@ -63,7 +63,7 @@ publishing {
|
||||
}
|
||||
publications {
|
||||
create<MavenPublication>("maven") {
|
||||
groupId = "ls_sdk"
|
||||
groupId = "breez_liquid_sdk"
|
||||
artifactId = "bindings-android"
|
||||
version = libraryVersion
|
||||
|
||||
@@ -72,19 +72,19 @@ publishing {
|
||||
}
|
||||
|
||||
pom {
|
||||
name.set("ls-sdk")
|
||||
description.set("The Liquid Swap SDK enables mobile developers to integrate Liquid swaps into their apps with a very shallow learning curve.")
|
||||
name.set("breez-liquid-sdk")
|
||||
description.set("The Breez Liquid SDK enables mobile developers to integrate Liquid swaps into their apps with a very shallow learning curve.")
|
||||
url.set("https://breez.technology")
|
||||
licenses {
|
||||
license {
|
||||
name.set("MIT")
|
||||
url.set("https://github.com/breez/breez-sdk-liquid/blob/main/LICENSE")
|
||||
url.set("https://github.com/breez/breez-liquid-sdk/blob/main/LICENSE")
|
||||
}
|
||||
}
|
||||
scm {
|
||||
connection.set("scm:git:github.com/breez/breez-sdk-liquid.git")
|
||||
developerConnection.set("scm:git:ssh://github.com/breez/breez-sdk-liquid.git")
|
||||
url.set("https://github.com/breez/breez-sdk-liquid")
|
||||
connection.set("scm:git:github.com/breez/breez-liquid-sdk.git")
|
||||
developerConnection.set("scm:git:ssh://github.com/breez/breez-liquid-sdk.git")
|
||||
url.set("https://github.com/breez/breez-liquid-sdk")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
-dontwarn java.awt.*
|
||||
-keep class com.sun.jna.** { *; }
|
||||
-keep class technology.breez.* { *; }
|
||||
-keep class ls_sdk.** { *; }
|
||||
-keep class breez_liquid_sdk.** { *; }
|
||||
-keepclassmembers class * extends technology.breez.* { public *; }
|
||||
-keepclassmembers class * extends ls_sdk.** { public *; }
|
||||
-keepclassmembers class * extends breez_liquid_sdk.** { public *; }
|
||||
-keepclassmembers class * extends com.sun.jna.** { public *; }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{%- import "macros.kt" as kt -%}
|
||||
package com.lssdk
|
||||
import ls_sdk.*
|
||||
package com.breezliquidsdk
|
||||
import breez_liquid_sdk.*
|
||||
import com.facebook.react.bridge.*
|
||||
import com.facebook.react.modules.core.DeviceEventManagerModule.RCTDeviceEventEmitter
|
||||
import java.io.File
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.lssdk
|
||||
package com.breezliquidsdk
|
||||
|
||||
import ls_sdk.*
|
||||
import breez_liquid_sdk.*
|
||||
import com.facebook.react.bridge.*
|
||||
import com.facebook.react.modules.core.DeviceEventManagerModule.RCTDeviceEventEmitter
|
||||
import java.io.File
|
||||
@@ -9,12 +9,12 @@ import java.util.concurrent.ExecutorService
|
||||
import java.util.concurrent.Executors
|
||||
{% import "macros.kt" as kt %}
|
||||
|
||||
class LiquidSwapSDKModule(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {
|
||||
class BreezLiquidSDKModule(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {
|
||||
private lateinit var executor: ExecutorService
|
||||
private var bindingWallet: BindingWallet? = null
|
||||
|
||||
companion object {
|
||||
const val TAG = "RNLiquidSwapSDK"
|
||||
const val TAG = "RNBreezLiquidSDK"
|
||||
}
|
||||
|
||||
override fun initialize() {
|
||||
@@ -58,7 +58,7 @@ class LiquidSwapSDKModule(reactContext: ReactApplicationContext) : ReactContextB
|
||||
|
||||
executor.execute {
|
||||
try {
|
||||
val dataDirTmp = dataDir.takeUnless { it.isEmpty() } ?: run { reactApplicationContext.filesDir.toString() + "/lsSdk" }
|
||||
val dataDirTmp = dataDir.takeUnless { it.isEmpty() } ?: run { reactApplicationContext.filesDir.toString() + "/breezLiquidSdk" }
|
||||
val networkTmp = asNetwork(network)
|
||||
bindingWallet = connect(mnemonic, dataDirTmp, networkTmp)
|
||||
promise.resolve(readableMapOf("status" to "ok"))
|
||||
|
||||
@@ -209,14 +209,14 @@ pub mod filters {
|
||||
}
|
||||
match t {
|
||||
Type::Enum(_) | Type::Record(_) => Ok(format!(
|
||||
"LiquidSwapSDKMapper.dictionaryOf({}: res{})",
|
||||
"BreezLiquidSDKMapper.dictionaryOf({}: res{})",
|
||||
name, optional_suffix
|
||||
)),
|
||||
Type::Sequence(inner) => {
|
||||
let unboxed = inner.as_ref();
|
||||
match unboxed {
|
||||
Type::Enum(_) | Type::Record(_) => Ok(format!(
|
||||
"LiquidSwapSDKMapper.arrayOf({}List: res{})",
|
||||
"BreezLiquidSDKMapper.arrayOf({}List: res{})",
|
||||
name, optional_suffix
|
||||
)),
|
||||
_ => Ok(format!("res{}", optional_suffix)),
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
{%- when Type::Enum(inner) %}
|
||||
{%- let e = ci.get_enum_definition(inner).unwrap() %}
|
||||
{%- if e.is_flat() %}
|
||||
let {{arg.name()|var_name|unquote|temporary}} = try LiquidSwapSDKMapper.as{{arg.type_()|type_name}}({{ arg.type_()|type_name|var_name|unquote }}: {{ arg.name()|var_name|unquote }})
|
||||
let {{arg.name()|var_name|unquote|temporary}} = try BreezLiquidSDKMapper.as{{arg.type_()|type_name}}({{ arg.type_()|type_name|var_name|unquote }}: {{ arg.name()|var_name|unquote }})
|
||||
{%- else %}
|
||||
let {{arg.name()|var_name|unquote|temporary}} = try LiquidSwapSDKMapper.as{{arg.type_()|type_name}}({{ arg.type_()|type_name|var_name|unquote }}: {{ arg.name()|var_name|unquote }})
|
||||
let {{arg.name()|var_name|unquote|temporary}} = try BreezLiquidSDKMapper.as{{arg.type_()|type_name}}({{ arg.type_()|type_name|var_name|unquote }}: {{ arg.name()|var_name|unquote }})
|
||||
{%- endif %}
|
||||
{%- when Type::Optional(_) %}
|
||||
let {{arg.name()|var_name|unquote|temporary}} = {{ arg.type_()|rn_convert_type(arg.name()|var_name|unquote) -}}
|
||||
{%- when Type::Record(_) %}
|
||||
let {{arg.type_()|type_name|var_name|unquote}} = try LiquidSwapSDKMapper.as{{arg.type_()|type_name}}({{ arg.type_()|type_name|var_name|unquote }}: {{ arg.name()|var_name|unquote }})
|
||||
let {{arg.type_()|type_name|var_name|unquote}} = try BreezLiquidSDKMapper.as{{arg.type_()|type_name}}({{ arg.type_()|type_name|var_name|unquote }}: {{ arg.name()|var_name|unquote }})
|
||||
{%- else %}
|
||||
{%- endmatch %}
|
||||
{%- endfor %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#import <React/RCTEventEmitter.h>
|
||||
|
||||
@interface RCT_EXTERN_MODULE(RNLiquidSwapSDK, RCTEventEmitter)
|
||||
@interface RCT_EXTERN_MODULE(RNBreezLiquidSDK, RCTEventEmitter)
|
||||
{% for func in ci.function_definitions() %}
|
||||
{%- if func.name()|ignored_function == false -%}
|
||||
{% include "ExternFunctionTemplate.m" %}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{%- import "macros.swift" as swift -%}
|
||||
import Foundation
|
||||
import LiquidSwapSDK
|
||||
import BreezLiquidSDK
|
||||
|
||||
enum LiquidSwapSDKMapper {
|
||||
enum BreezLiquidSDKMapper {
|
||||
|
||||
{%- include "Types.swift" %}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import Foundation
|
||||
import LiquidSwapSDK
|
||||
import BreezLiquidSDK
|
||||
|
||||
@objc(RNLiquidSwapSDK)
|
||||
class RNLiquidSwapSDK: RCTEventEmitter {
|
||||
static let TAG: String = "LiquidSwapSDK"
|
||||
@objc(RNBreezLiquidSDK)
|
||||
class RNBreezLiquidSDK: RCTEventEmitter {
|
||||
static let TAG: String = "BreezLiquidSDK"
|
||||
|
||||
public static var emitter: RCTEventEmitter!
|
||||
public static var hasListeners: Bool = false
|
||||
@@ -13,12 +13,12 @@ class RNLiquidSwapSDK: RCTEventEmitter {
|
||||
static var defaultDataDir: URL {
|
||||
let applicationDirectory = FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first!
|
||||
|
||||
return applicationDirectory.appendingPathComponent("lsSdk", isDirectory: true)
|
||||
return applicationDirectory.appendingPathComponent("breezLiquidSdk", isDirectory: true)
|
||||
}
|
||||
|
||||
override init() {
|
||||
super.init()
|
||||
RNLiquidSwapSDK.emitter = self
|
||||
RNBreezLiquidSDK.emitter = self
|
||||
}
|
||||
|
||||
@objc
|
||||
@@ -31,11 +31,11 @@ class RNLiquidSwapSDK: RCTEventEmitter {
|
||||
}
|
||||
|
||||
override func startObserving() {
|
||||
RNLiquidSwapSDK.hasListeners = true
|
||||
RNBreezLiquidSDK.hasListeners = true
|
||||
}
|
||||
|
||||
override func stopObserving() {
|
||||
RNLiquidSwapSDK.hasListeners = false
|
||||
RNBreezLiquidSDK.hasListeners = false
|
||||
}
|
||||
|
||||
@objc
|
||||
@@ -51,7 +51,7 @@ class RNLiquidSwapSDK: RCTEventEmitter {
|
||||
throw LsSdkError.Generic(message: "Not initialized")
|
||||
}
|
||||
|
||||
{% let obj_interface = "LiquidSwapSDK." -%}
|
||||
{% let obj_interface = "BreezLiquidSDK." -%}
|
||||
{% for func in ci.function_definitions() %}
|
||||
{%- if func.name()|ignored_function == false -%}
|
||||
{% include "TopLevelFunctionTemplate.swift" %}
|
||||
@@ -65,9 +65,9 @@ class RNLiquidSwapSDK: RCTEventEmitter {
|
||||
}
|
||||
|
||||
do {
|
||||
let dataDirTmp = dataDir.isEmpty ? RNLiquidSwapSDK.defaultDataDir.path : dataDir
|
||||
let networkTmp = try LiquidSwapSDKMapper.asNetwork(network: network)
|
||||
bindingWallet = try LiquidSwapSDK.connect(mnemonic: mnemonic, dataDir: dataDirTmp, network: networkTmp)
|
||||
let dataDirTmp = dataDir.isEmpty ? RNBreezLiquidSDK.defaultDataDir.path : dataDir
|
||||
let networkTmp = try BreezLiquidSDKMapper.asNetwork(network: network)
|
||||
bindingWallet = try BreezLiquidSDK.connect(mnemonic: mnemonic, dataDir: dataDirTmp, network: networkTmp)
|
||||
resolve(["status": "ok"])
|
||||
} catch let err {
|
||||
rejectErr(err: err, reject: reject)
|
||||
|
||||
@@ -26,7 +26,7 @@ static KEYWORDS: Lazy<HashSet<String>> = Lazy::new(|| {
|
||||
});
|
||||
|
||||
static IGNORED_FUNCTIONS: Lazy<HashSet<String>> = Lazy::new(|| {
|
||||
let list: Vec<&str> = vec![];
|
||||
let list: Vec<&str> = vec!["connect"];
|
||||
HashSet::from_iter(list.into_iter().map(|s| s.to_string()))
|
||||
});
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
|
||||
export const connect = async (mnemonic: string, dataDir: string = "", network: Network): Promise<void> => {
|
||||
const response = await BreezLiquidSDK.connect(mnemonic, dataDir, network)
|
||||
return response
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{%- match func.return_type() -%}
|
||||
{%- when Some with (return_type) %}
|
||||
export const {{ func.name()|fn_name }} = async ({%- call ts::arg_list_decl(func) -%}): Promise<{{ return_type|return_type_name }}> => {
|
||||
const response = await LiquidSwapSDK.{{func.name()|fn_name}}({%- call ts::arg_list(func) -%})
|
||||
const response = await BreezLiquidSDK.{{func.name()|fn_name}}({%- call ts::arg_list(func) -%})
|
||||
return response
|
||||
}
|
||||
{%- when None %}
|
||||
export const {{ func.name()|fn_name }} = async ({%- call ts::arg_list_decl(func) -%}): Promise<void> => {
|
||||
await LiquidSwapSDK.{{ func.name()|fn_name }}({%- call ts::arg_list(func) -%})
|
||||
await BreezLiquidSDK.{{ func.name()|fn_name }}({%- call ts::arg_list(func) -%})
|
||||
}
|
||||
{%- endmatch %}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { NativeModules, Platform } from "react-native"
|
||||
|
||||
const LINKING_ERROR =
|
||||
`The package 'react-native-liquid-swap-sdk' doesn't seem to be linked. Make sure: \n\n` +
|
||||
`The package 'react-native-breez-liquid-sdk' doesn't seem to be linked. Make sure: \n\n` +
|
||||
Platform.select({ ios: "- You have run 'pod install'\n", default: "" }) +
|
||||
"- You rebuilt the app after installing the package\n" +
|
||||
"- You are not using Expo managed workflow\n"
|
||||
|
||||
const LiquidSwapSDK = NativeModules.RNLiquidSwapSDK
|
||||
? NativeModules.RNLiquidSwapSDK
|
||||
const BreezLiquidSDK = NativeModules.RNBreezLiquidSDK
|
||||
? NativeModules.RNBreezLiquidSDK
|
||||
: new Proxy(
|
||||
{},
|
||||
{
|
||||
|
||||
@@ -36,7 +36,8 @@ impl RNBindingGenerator {
|
||||
base_output_path: &Utf8Path,
|
||||
) -> Result<()> {
|
||||
// Create the path
|
||||
let output_path = base_output_path.join(Utf8Path::new("android/src/main/java/com/lssdk"));
|
||||
let output_path =
|
||||
base_output_path.join(Utf8Path::new("android/src/main/java/com/breezliquidsdk"));
|
||||
// Generate and write the binding to file
|
||||
let bindings_output = self::gen_kotlin::MapperGenerator::new(config.clone(), ci)
|
||||
.render()
|
||||
@@ -45,7 +46,7 @@ impl RNBindingGenerator {
|
||||
.write_bindings(
|
||||
&bindings_output,
|
||||
&output_path,
|
||||
Utf8Path::new("LiquidSwapSDKMapper.kt"),
|
||||
Utf8Path::new("BreezLiquidSDKMapper.kt"),
|
||||
)
|
||||
.unwrap();
|
||||
// Lint binding
|
||||
@@ -60,7 +61,8 @@ impl RNBindingGenerator {
|
||||
base_output_path: &Utf8Path,
|
||||
) -> Result<()> {
|
||||
// Create the path
|
||||
let output_path = base_output_path.join(Utf8Path::new("android/src/main/java/com/lssdk"));
|
||||
let output_path =
|
||||
base_output_path.join(Utf8Path::new("android/src/main/java/com/breezliquidsdk"));
|
||||
// Generate and write the binding to file
|
||||
let bindings_output = self::gen_kotlin::ModuleGenerator::new(config.clone(), ci)
|
||||
.render()
|
||||
@@ -69,7 +71,7 @@ impl RNBindingGenerator {
|
||||
.write_bindings(
|
||||
&bindings_output,
|
||||
&output_path,
|
||||
Utf8Path::new("LiquidSwapSDKModule.kt"),
|
||||
Utf8Path::new("BreezLiquidSDKModule.kt"),
|
||||
)
|
||||
.unwrap();
|
||||
// Lint binding
|
||||
@@ -103,7 +105,7 @@ impl RNBindingGenerator {
|
||||
.write_bindings(
|
||||
&bindings_output,
|
||||
&output_path,
|
||||
Utf8Path::new("LiquidSwapSDKMapper.swift"),
|
||||
Utf8Path::new("BreezLiquidSDKMapper.swift"),
|
||||
)
|
||||
.unwrap();
|
||||
// Lint binding
|
||||
@@ -127,7 +129,7 @@ impl RNBindingGenerator {
|
||||
.write_bindings(
|
||||
&bindings_output,
|
||||
&output_path,
|
||||
Utf8Path::new("RNLiquidSwapSDK.m"),
|
||||
Utf8Path::new("RNBreezLiquidSDK.m"),
|
||||
)
|
||||
.unwrap();
|
||||
// Lint binding
|
||||
@@ -151,7 +153,7 @@ impl RNBindingGenerator {
|
||||
.write_bindings(
|
||||
&bindings_output,
|
||||
&output_path,
|
||||
Utf8Path::new("RNLiquidSwapSDK.swift"),
|
||||
Utf8Path::new("RNBreezLiquidSDK.swift"),
|
||||
)
|
||||
.unwrap();
|
||||
// Lint binding
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.build/
|
||||
*.xcodeproj
|
||||
*.podspec
|
||||
Sources/LiquidSwapSDK/LiquidSwapSDK.swift
|
||||
**/ls_sdkFFI.h
|
||||
**/ls_sdkFFI
|
||||
**/ls_sdkFFI.modulemap
|
||||
Sources/BreezLiquidSDK/BreezLiquidSDK.swift
|
||||
**/breez_liquid_sdkFFI.h
|
||||
**/breez_liquid_sdkFFI
|
||||
**/breez_liquid_sdkFFI.modulemap
|
||||
|
||||
@@ -10,10 +10,10 @@ let package = Package(
|
||||
.iOS(.v11),
|
||||
],
|
||||
products: [
|
||||
.library(name: "LiquidSwapSDK", targets: ["ls_sdkFFI", "LiquidSwapSDK"]),
|
||||
.library(name: "BreezLiquidSDK", targets: ["breez_liquid_sdkFFI", "BreezLiquidSDK"]),
|
||||
],
|
||||
targets: [
|
||||
.binaryTarget(name: "ls_sdkFFI", path: "./ls_sdkFFI.xcframework"),
|
||||
.target(name: "LiquidSwapSDK", dependencies: ["ls_sdkFFI"]),
|
||||
.binaryTarget(name: "breez_liquid_sdkFFI", path: "./breez_liquid_sdkFFI.xcframework"),
|
||||
.target(name: "BreezLiquidSDK", dependencies: ["breez_liquid_sdkFFI"]),
|
||||
]
|
||||
)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>macos-arm64_x86_64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>ls_sdkFFI.framework</string>
|
||||
<string>breez_liquid_sdkFFI.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
@@ -21,7 +21,7 @@
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>ls_sdkFFI.framework</string>
|
||||
<string>breez_liquid_sdkFFI.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
@@ -36,7 +36,7 @@
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>ls_sdkFFI.framework</string>
|
||||
<string>breez_liquid_sdkFFI.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
@@ -0,0 +1 @@
|
||||
#import "breez_liquid_sdkFFI.h"
|
||||
@@ -0,0 +1,6 @@
|
||||
framework module breez_liquid_sdkFFI {
|
||||
umbrella header "breez_liquid_sdkFFI-umbrella.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
#import "breez_liquid_sdkFFI.h"
|
||||
@@ -0,0 +1,6 @@
|
||||
framework module breez_liquid_sdkFFI {
|
||||
umbrella header "breez_liquid_sdkFFI-umbrella.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
#import "breez_liquid_sdkFFI.h"
|
||||
@@ -0,0 +1,6 @@
|
||||
framework module breez_liquid_sdkFFI {
|
||||
umbrella header "breez_liquid_sdkFFI-umbrella.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
#import "ls_sdkFFI.h"
|
||||
@@ -1,6 +0,0 @@
|
||||
framework module ls_sdkFFI {
|
||||
umbrella header "ls_sdkFFI-umbrella.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
#import "ls_sdkFFI.h"
|
||||
@@ -1,6 +0,0 @@
|
||||
framework module ls_sdkFFI {
|
||||
umbrella header "ls_sdkFFI-umbrella.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
#import "ls_sdkFFI.h"
|
||||
@@ -1,6 +0,0 @@
|
||||
framework module ls_sdkFFI {
|
||||
umbrella header "ls_sdkFFI-umbrella.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
@@ -54,7 +54,7 @@ x86_64-linux-android: $(SOURCES) ndk-home
|
||||
|
||||
bindings-android: android
|
||||
cp -r ffi/kotlin/jniLibs bindings-android/lib/src/main
|
||||
cp -r ffi/kotlin/ls_sdk bindings-android/lib/src/main/kotlin/
|
||||
cp -r ffi/kotlin/breez_liquid_sdk bindings-android/lib/src/main/kotlin/
|
||||
cd bindings-android && ./gradlew assemble
|
||||
mkdir -p ffi/android
|
||||
cp bindings-android/lib/build/outputs/aar/lib-release.aar ffi/android
|
||||
@@ -72,40 +72,40 @@ ios-universal: $(SOURCES)
|
||||
cargo build --release --target x86_64-apple-ios ;\
|
||||
cargo build --release --target aarch64-apple-ios-sim ;\
|
||||
# build universal lib for arm device and x86 sim
|
||||
lipo -create -output ../target/ios-universal/release/libls_sdk_bindings.a ../target/aarch64-apple-ios/release/libls_sdk_bindings.a ../target/x86_64-apple-ios/release/libls_sdk_bindings.a
|
||||
lipo -create -output ../target/ios-universal/release/libbreez_liquid_sdk_bindings.a ../target/aarch64-apple-ios/release/libbreez_liquid_sdk_bindings.a ../target/x86_64-apple-ios/release/libbreez_liquid_sdk_bindings.a
|
||||
# build universal lib for arm sim and x86 sim
|
||||
lipo -create -output ../target/ios-universal-sim/release/libls_sdk_bindings.a ../target/aarch64-apple-ios-sim/release/libls_sdk_bindings.a ../target/x86_64-apple-ios/release/libls_sdk_bindings.a
|
||||
lipo -create -output ../target/ios-universal-sim/release/libbreez_liquid_sdk_bindings.a ../target/aarch64-apple-ios-sim/release/libbreez_liquid_sdk_bindings.a ../target/x86_64-apple-ios/release/libbreez_liquid_sdk_bindings.a
|
||||
|
||||
darwin-universal: $(SOURCES)
|
||||
mkdir -p ../target/darwin-universal/release
|
||||
cargo lipo --release --targets aarch64-apple-darwin
|
||||
cargo lipo --release --targets x86_64-apple-darwin
|
||||
lipo -create -output ../target/darwin-universal/release/libls_sdk_bindings.dylib ../target/aarch64-apple-darwin/release/libls_sdk_bindings.dylib ../target/x86_64-apple-darwin/release/libls_sdk_bindings.dylib
|
||||
lipo -create -output ../target/darwin-universal/release/libls_sdk_bindings.a ../target/aarch64-apple-darwin/release/libls_sdk_bindings.a ../target/x86_64-apple-darwin/release/libls_sdk_bindings.a
|
||||
lipo -create -output ../target/darwin-universal/release/libbreez_liquid_sdk_bindings.dylib ../target/aarch64-apple-darwin/release/libbreez_liquid_sdk_bindings.dylib ../target/x86_64-apple-darwin/release/libbreez_liquid_sdk_bindings.dylib
|
||||
lipo -create -output ../target/darwin-universal/release/libbreez_liquid_sdk_bindings.a ../target/aarch64-apple-darwin/release/libbreez_liquid_sdk_bindings.a ../target/x86_64-apple-darwin/release/libbreez_liquid_sdk_bindings.a
|
||||
|
||||
## Swift
|
||||
swift-ios: ios-universal
|
||||
cargo run --features=uniffi/cli --bin uniffi-bindgen generate src/breez_liquid_sdk.udl -l swift -o ffi/swift-ios
|
||||
cp ../target/ios-universal/release/libls_sdk_bindings.a ffi/swift-ios
|
||||
cd ffi/swift-ios && "swiftc" "-emit-module" "-module-name" "ls_sdk_bindings" "-Xcc" "-fmodule-map-file=$(CURRENT_DIR)/ffi/swift-ios/ls_sdkFFI.modulemap" "-I" "." "-L" "." "-lls_sdk_bindings" ls_sdk.swift
|
||||
cp ../target/ios-universal/release/libbreez_liquid_sdk_bindings.a ffi/swift-ios
|
||||
cd ffi/swift-ios && "swiftc" "-emit-module" "-module-name" "breez_liquid_sdk_bindings" "-Xcc" "-fmodule-map-file=$(CURRENT_DIR)/ffi/swift-ios/breez_liquid_sdkFFI.modulemap" "-I" "." "-L" "." "-lbreez_liquid_sdk_bindings" breez_liquid_sdk.swift
|
||||
|
||||
swift-darwin: darwin-universal
|
||||
cargo run --features=uniffi/cli --bin uniffi-bindgen generate src/breez_liquid_sdk.udl -l swift -o ffi/swift-darwin
|
||||
cp ../target/darwin-universal/release/libls_sdk_bindings.dylib ffi/swift-darwin
|
||||
cd ffi/swift-darwin && "swiftc" "-emit-module" "-module-name" "ls_sdk_bindings" "-Xcc" "-fmodule-map-file=$(CURRENT_DIR)/ffi/swift-darwin/ls_sdkFFI.modulemap" "-I" "." "-L" "." "-lls_sdk_bindings" ls_sdk.swift
|
||||
cp ../target/darwin-universal/release/libbreez_liquid_sdk_bindings.dylib ffi/swift-darwin
|
||||
cd ffi/swift-darwin && "swiftc" "-emit-module" "-module-name" "breez_liquid_sdk_bindings" "-Xcc" "-fmodule-map-file=$(CURRENT_DIR)/ffi/swift-darwin/breez_liquid_sdkFFI.modulemap" "-I" "." "-L" "." "-lbreez_liquid_sdk_bindings" breez_liquid_sdk.swift
|
||||
|
||||
bindings-swift: ios-universal darwin-universal
|
||||
mkdir -p bindings-swift/Sources/LiquidSwapSDK
|
||||
cargo run --features=uniffi/cli --bin uniffi-bindgen generate src/breez_liquid_sdk.udl --no-format --language swift -o bindings-swift/Sources/LiquidSwapSDK
|
||||
mv bindings-swift/Sources/LiquidSwapSDK/ls_sdk.swift bindings-swift/Sources/LiquidSwapSDK/LiquidSwapSDK.swift
|
||||
cp bindings-swift/Sources/LiquidSwapSDK/ls_sdkFFI.h bindings-swift/ls_sdkFFI.xcframework/ios-arm64/ls_sdkFFI.framework/Headers
|
||||
cp bindings-swift/Sources/LiquidSwapSDK/ls_sdkFFI.h bindings-swift/ls_sdkFFI.xcframework/ios-arm64_x86_64-simulator/ls_sdkFFI.framework/Headers
|
||||
cp bindings-swift/Sources/LiquidSwapSDK/ls_sdkFFI.h bindings-swift/ls_sdkFFI.xcframework/macos-arm64_x86_64/ls_sdkFFI.framework/Headers
|
||||
cp ../target/aarch64-apple-ios/release/libls_sdk_bindings.a bindings-swift/ls_sdkFFI.xcframework/ios-arm64/ls_sdkFFI.framework/ls_sdkFFI
|
||||
cp ../target/ios-universal-sim/release/libls_sdk_bindings.a bindings-swift/ls_sdkFFI.xcframework/ios-arm64_x86_64-simulator/ls_sdkFFI.framework/ls_sdkFFI
|
||||
cp ../target/darwin-universal/release/libls_sdk_bindings.a bindings-swift/ls_sdkFFI.xcframework/macos-arm64_x86_64/ls_sdkFFI.framework/ls_sdkFFI
|
||||
rm bindings-swift/Sources/LiquidSwapSDK/ls_sdkFFI.h
|
||||
rm bindings-swift/Sources/LiquidSwapSDK/ls_sdkFFI.modulemap
|
||||
mkdir -p bindings-swift/Sources/BreezLiquidSDK
|
||||
cargo run --features=uniffi/cli --bin uniffi-bindgen generate src/breez_liquid_sdk.udl --no-format --language swift -o bindings-swift/Sources/BreezLiquidSDK
|
||||
mv bindings-swift/Sources/BreezLiquidSDK/breez_liquid_sdk.swift bindings-swift/Sources/BreezLiquidSDK/BreezLiquidSDK.swift
|
||||
cp bindings-swift/Sources/BreezLiquidSDK/breez_liquid_sdkFFI.h bindings-swift/breez_liquid_sdkFFI.xcframework/ios-arm64/breez_liquid_sdkFFI.framework/Headers
|
||||
cp bindings-swift/Sources/BreezLiquidSDK/breez_liquid_sdkFFI.h bindings-swift/breez_liquid_sdkFFI.xcframework/ios-arm64_x86_64-simulator/breez_liquid_sdkFFI.framework/Headers
|
||||
cp bindings-swift/Sources/BreezLiquidSDK/breez_liquid_sdkFFI.h bindings-swift/breez_liquid_sdkFFI.xcframework/macos-arm64_x86_64/breez_liquid_sdkFFI.framework/Headers
|
||||
cp ../target/aarch64-apple-ios/release/libbreez_liquid_sdk_bindings.a bindings-swift/breez_liquid_sdkFFI.xcframework/ios-arm64/breez_liquid_sdkFFI.framework/breez_liquid_sdkFFI
|
||||
cp ../target/ios-universal-sim/release/libbreez_liquid_sdk_bindings.a bindings-swift/breez_liquid_sdkFFI.xcframework/ios-arm64_x86_64-simulator/breez_liquid_sdkFFI.framework/breez_liquid_sdkFFI
|
||||
cp ../target/darwin-universal/release/libbreez_liquid_sdk_bindings.a bindings-swift/breez_liquid_sdkFFI.xcframework/macos-arm64_x86_64/breez_liquid_sdkFFI.framework/breez_liquid_sdkFFI
|
||||
rm bindings-swift/Sources/BreezLiquidSDK/breez_liquid_sdkFFI.h
|
||||
rm bindings-swift/Sources/BreezLiquidSDK/breez_liquid_sdkFFI.modulemap
|
||||
|
||||
## Python
|
||||
python: $(SOURCES)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# breez-sdk-liquid
|
||||
# breez-liquid-sdk
|
||||
|
||||
## Prerequisites
|
||||
|
||||
|
||||
2
lib/ls-sdk-react-native/.gitignore
vendored
2
lib/ls-sdk-react-native/.gitignore
vendored
@@ -68,7 +68,7 @@ android/keystores/debug.keystore
|
||||
lib/
|
||||
|
||||
# bindings (used for local development only)
|
||||
android/src/main/java/com/lssdk/ls_sdk.kt
|
||||
android/src/main/java/com/breezliquidsdk/breez_liquid_sdk.kt
|
||||
android/src/main/jniLibs
|
||||
ios/include/*
|
||||
ios/libs/*
|
||||
|
||||
@@ -3,7 +3,7 @@ require "json"
|
||||
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "LiquidSwapSDK"
|
||||
s.name = "BreezLiquidSDK"
|
||||
s.version = package["version"]
|
||||
s.summary = package["description"]
|
||||
s.homepage = package["homepage"]
|
||||
@@ -11,10 +11,10 @@ Pod::Spec.new do |s|
|
||||
s.authors = package["author"]
|
||||
|
||||
s.platforms = { :ios => "11.0" }
|
||||
s.source = { :git => "https://github.com/breez/breez-sdk-liquid.git", :tag => "#{s.version}" }
|
||||
s.source = { :git => "https://github.com/breez/breez-liquid-sdk.git", :tag => "#{s.version}" }
|
||||
|
||||
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
||||
|
||||
s.dependency "React-Core"
|
||||
s.vendored_frameworks = "ios/bindings-swift/ls_sdkFFI.xcframework"
|
||||
s.vendored_frameworks = "ios/bindings-swift/breez_liquid_sdkFFI.xcframework"
|
||||
end
|
||||
@@ -1,12 +1,12 @@
|
||||
# Setting up a development environment
|
||||
|
||||
The Liquid Swap SDK React Native plugin consumes the underlying Liquid Swap SDK from the following sources:
|
||||
The Breez Liquid SDK React Native plugin consumes the underlying Breez Liquid SDK from the following sources:
|
||||
|
||||
- For iOS: The Liquid Swap SDK Swift bindings are integrated via CocoaPods.
|
||||
- For Android: The Liquid Swap SDK Android bindings are integrated via Jitpack.
|
||||
- For iOS: The Breez Liquid SDK Swift bindings are integrated via CocoaPods.
|
||||
- For Android: The Breez Liquid SDK Android bindings are integrated via Jitpack.
|
||||
|
||||
When developing, it can be useful to work with a locally built version of the Liquid Swap SDK instead of relying on what is published already on CocoaPods / Jitpack.
|
||||
To do this, you first need to build the Liquid Swap SDK bindings locally and then point the plugin to make use of the locally built Liquid Swap SDK bindings.
|
||||
When developing, it can be useful to work with a locally built version of the Breez Liquid SDK instead of relying on what is published already on CocoaPods / Jitpack.
|
||||
To do this, you first need to build the Breez Liquid SDK bindings locally and then point the plugin to make use of the locally built Breez Liquid SDK bindings.
|
||||
|
||||
All the following commands can be run in the `lib/ls-sdk-react-native` directory.
|
||||
|
||||
@@ -38,19 +38,19 @@ make all
|
||||
This will generate the following artifacts:
|
||||
|
||||
- iOS
|
||||
- `ios/LiquidSwapSDKMapper.swift`
|
||||
- `ios/LiquidSwapSDK.m`
|
||||
- `ios/LiquidSwapSDK.swift`
|
||||
- `ios/bindings-swift/ls_sdkFFI.xcframework`
|
||||
- `ios/bindings-swift/Sources/LiquidSwapSDK/LiquidSwapSDK.swift`
|
||||
- `ios/BreezLiquidSDKMapper.swift`
|
||||
- `ios/BreezLiquidSDK.m`
|
||||
- `ios/BreezLiquidSDK.swift`
|
||||
- `ios/bindings-swift/breez_liquid_sdkFFI.xcframework`
|
||||
- `ios/bindings-swift/Sources/BreezLiquidSDK/BreezLiquidSDK.swift`
|
||||
- Android
|
||||
- `android/src/main/java/com/lssdk/ls_sdk.kt`
|
||||
- `android/src/main/java/com/lssdk/LiquidSwapSDKMapper.kt`
|
||||
- `android/src/main/java/com/lssdk/LiquidSwapSDKModule.kt`
|
||||
- `android/src/main/jniLibs/arm64-v8a/libls_sdk_bindings.so`
|
||||
- `android/src/main/jniLibs/armeabi-v7a/libls_sdk_bindings.so`
|
||||
- `android/src/main/jniLibs/x86/libls_sdk_bindings.so`
|
||||
- `android/src/main/jniLibs/x86_64/libls_sdk_bindings.so`
|
||||
- `android/src/main/java/com/breezliquidsdk/breez_liquid_sdk.kt`
|
||||
- `android/src/main/java/com/breezliquidsdk/BreezLiquidSDKMapper.kt`
|
||||
- `android/src/main/java/com/breezliquidsdk/BreezLiquidSDKModule.kt`
|
||||
- `android/src/main/jniLibs/arm64-v8a/libbreez_liquid_sdk_bindings.so`
|
||||
- `android/src/main/jniLibs/armeabi-v7a/libbreez_liquid_sdk_bindings.so`
|
||||
- `android/src/main/jniLibs/x86/libbreez_liquid_sdk_bindings.so`
|
||||
- `android/src/main/jniLibs/x86_64/libbreez_liquid_sdk_bindings.so`
|
||||
- Typescript
|
||||
- `src/index.ts`
|
||||
|
||||
@@ -71,11 +71,11 @@ To use the locally built bindings instead of integrating them remotely, make the
|
||||
|
||||
- For iOS:
|
||||
- Rename the podspec files in `lib/ls-sdk-react-native/`:
|
||||
- Rename `ls_sdk.podspec` to `ls_sdk.podspec.prod`
|
||||
- Rename `LiquidSwapSDK.podspec.dev` to `LiquidSwapSDK.podspec`
|
||||
- Rename `breez_liquid_sdk.podspec` to `breez_liquid_sdk.podspec.prod`
|
||||
- Rename `BreezLiquidSDK.podspec.dev` to `BreezLiquidSDK.podspec`
|
||||
- For Android:
|
||||
- Comment out the following line from the dependencies section in `lib/ls-sdk-react-native/android/build.gradle`:
|
||||
- `implementation("com.github.breez:breez-sdk-liquid:${getVersionFromNpmPackage()}") { exclude group:"net.java.dev.jna" }`
|
||||
- `implementation("com.github.breez:breez-liquid-sdk:${getVersionFromNpmPackage()}") { exclude group:"net.java.dev.jna" }`
|
||||
|
||||
Reinstall the dependencies in the example project and run it.
|
||||
It will now use the locally built bindings.
|
||||
@@ -85,10 +85,10 @@ It will now use the locally built bindings.
|
||||
To test locally built bindings in the example app, the npm dependencies need to be updated to use the local package.
|
||||
In `lib/ls-sdk-react-native/example/package.json` replace the current version with `file:../`:
|
||||
```json
|
||||
"@breeztech/react-native-liquid-swap-sdk": "file:../",
|
||||
"@breeztech/react-native-breez-liquid-sdk": "file:../",
|
||||
```
|
||||
|
||||
Run the npm/yarn install to download dependences for both the react-native-liquid-swap-sdk package and the example app:
|
||||
Run the npm/yarn install to download dependences for both the react-native-breez-liquid-sdk package and the example app:
|
||||
```bash
|
||||
yarn bootstrap
|
||||
```
|
||||
|
||||
@@ -18,19 +18,19 @@ make react-native
|
||||
|
||||
### Generated artifacts
|
||||
* Android
|
||||
>* android/src/main/java/com/lssdk/LiquidSwapSDKMapper.kt
|
||||
>* android/src/main/java/com/lssdk/LiquidSwapSDKModule.kt
|
||||
>* android/src/main/java/com/breezliquidsdk/BreezLiquidSDKMapper.kt
|
||||
>* android/src/main/java/com/breezliquidsdk/BreezLiquidSDKModule.kt
|
||||
* iOS
|
||||
>* ios/LiquidSwapSDKMapper.swift
|
||||
>* ios/LiquidSwapSDK.m
|
||||
>* ios/LiquidSwapSDK.swift
|
||||
>* ios/BreezLiquidSDKMapper.swift
|
||||
>* ios/BreezLiquidSDK.m
|
||||
>* ios/BreezLiquidSDK.swift
|
||||
* Typescript
|
||||
>* src/index.ts
|
||||
|
||||
### Publish
|
||||
When publishing, make sure the following are updated:
|
||||
- Update the version number in `package.json`.
|
||||
- Set the published version of `@breeztech/react-native-liquid-swap-sdk` in `example/package.json`.
|
||||
- Set the published version of `@breeztech/react-native-breez-liquid-sdk` in `example/package.json`.
|
||||
|
||||
Then login to npm:
|
||||
```
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import groovy.json.JsonSlurper
|
||||
|
||||
def getVersionFromNpmPackage() {
|
||||
def inputFile = new File("$rootDir/../node_modules/@breeztech/react-native-liquid-swap-sdk/package.json")
|
||||
def inputFile = new File("$rootDir/../node_modules/@breeztech/react-native-breez-liquid-sdk/package.json")
|
||||
def packageJson = new JsonSlurper().parseText(inputFile.text)
|
||||
|
||||
return packageJson["version"]
|
||||
@@ -70,9 +70,9 @@ dependencies {
|
||||
implementation "com.facebook.react:react-native:+" // From node_modules
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21"
|
||||
// Due to an issue with Jitpack (https://github.com/jitpack/jitpack.io/issues/5752)
|
||||
// the Android platform versions of JNA (specifically libjnadispatch.so) are missing when downloading the Liquid Swap SDK from Jitpack.
|
||||
// Therefore we ignore the version of JNA that comes with the Liquid Swap SDK from Jitpack
|
||||
// the Android platform versions of JNA (specifically libjnadispatch.so) are missing when downloading the Breez Liquid SDK from Jitpack.
|
||||
// Therefore we ignore the version of JNA that comes with the Breez Liquid SDK from Jitpack
|
||||
// and manually add one that does include the necessary Android platform binaries.
|
||||
implementation("com.github.breez:breez-sdk-liquid:${getVersionFromNpmPackage()}") { exclude group:"net.java.dev.jna" } // remove for using locally built bindings during development
|
||||
implementation("com.github.breez:breez-liquid-sdk:${getVersionFromNpmPackage()}") { exclude group:"net.java.dev.jna" } // remove for using locally built bindings during development
|
||||
implementation("net.java.dev.jna:jna:5.14.0@aar")
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.lssdk">
|
||||
package="com.breezliquidsdk">
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.lssdk
|
||||
package com.breezliquidsdk
|
||||
import breez_liquid_sdk.*
|
||||
import com.facebook.react.bridge.*
|
||||
import ls_sdk.*
|
||||
import java.util.*
|
||||
|
||||
fun asPrepareReceiveRequest(prepareReceiveRequest: ReadableMap): PrepareReceiveRequest? {
|
||||
@@ -1,17 +1,17 @@
|
||||
package com.lssdk
|
||||
package com.breezliquidsdk
|
||||
|
||||
import breez_liquid_sdk.*
|
||||
import com.facebook.react.bridge.*
|
||||
import ls_sdk.*
|
||||
import java.util.*
|
||||
import java.util.concurrent.ExecutorService
|
||||
import java.util.concurrent.Executors
|
||||
|
||||
class LiquidSwapSDKModule(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {
|
||||
class BreezLiquidSDKModule(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {
|
||||
private lateinit var executor: ExecutorService
|
||||
private var bindingWallet: BindingWallet? = null
|
||||
|
||||
companion object {
|
||||
const val TAG = "RNLiquidSwapSDK"
|
||||
const val TAG = "RNBreezLiquidSDK"
|
||||
}
|
||||
|
||||
override fun initialize() {
|
||||
@@ -53,7 +53,7 @@ class LiquidSwapSDKModule(reactContext: ReactApplicationContext) : ReactContextB
|
||||
|
||||
executor.execute {
|
||||
try {
|
||||
val dataDirTmp = dataDir.takeUnless { it.isEmpty() } ?: run { reactApplicationContext.filesDir.toString() + "/lsSdk" }
|
||||
val dataDirTmp = dataDir.takeUnless { it.isEmpty() } ?: run { reactApplicationContext.filesDir.toString() + "/breezLiquidSdk" }
|
||||
val networkTmp = asNetwork(network)
|
||||
bindingWallet = connect(mnemonic, dataDirTmp, networkTmp)
|
||||
promise.resolve(readableMapOf("status" to "ok"))
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.lssdk
|
||||
package com.breezliquidsdk
|
||||
|
||||
import android.view.View
|
||||
import com.facebook.react.ReactPackage
|
||||
@@ -7,10 +7,10 @@ import com.facebook.react.bridge.ReactApplicationContext
|
||||
import com.facebook.react.uimanager.ReactShadowNode
|
||||
import com.facebook.react.uimanager.ViewManager
|
||||
|
||||
class LiquidSwapSDKPackage : ReactPackage {
|
||||
class BreezLiquidSDKPackage : ReactPackage {
|
||||
override fun createViewManagers(reactContext: ReactApplicationContext): MutableList<ViewManager<View, ReactShadowNode<*>>> =
|
||||
mutableListOf()
|
||||
|
||||
override fun createNativeModules(reactContext: ReactApplicationContext): MutableList<NativeModule> =
|
||||
listOf(LiquidSwapSDKModule(reactContext)).toMutableList()
|
||||
listOf(BreezLiquidSDKModule(reactContext)).toMutableList()
|
||||
}
|
||||
@@ -3,7 +3,7 @@ require "json"
|
||||
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "ls_sdk"
|
||||
s.name = "breez_liquid_sdk"
|
||||
s.version = package["version"]
|
||||
s.summary = package["description"]
|
||||
s.homepage = package["homepage"]
|
||||
@@ -11,11 +11,11 @@ Pod::Spec.new do |s|
|
||||
s.authors = package["author"]
|
||||
|
||||
s.platforms = { :ios => "11.0" }
|
||||
s.source = { :git => "https://github.com/breez/breez-sdk-liquid.git", :tag => "#{s.version}" }
|
||||
s.source = { :git => "https://github.com/breez/breez-liquid-sdk.git", :tag => "#{s.version}" }
|
||||
|
||||
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
||||
s.exclude_files = "ios/bindings-swift/**/*.{h,m,mm,swift}"
|
||||
|
||||
s.dependency "React-Core"
|
||||
s.dependency "LiquidSwapSDK", package["version"]
|
||||
s.dependency "BreezLiquidSDK", package["version"]
|
||||
end
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import React, { useState } from "react"
|
||||
import { SafeAreaView, ScrollView, StatusBar, Text, TouchableOpacity, View } from "react-native"
|
||||
import { Network, getInfo, connect } from "@breeztech/react-native-liquid-swap-sdk"
|
||||
import { Network, getInfo, connect } from "@breeztech/react-native-breez-liquid-sdk"
|
||||
import { generateMnemonic } from "@dreson4/react-native-quick-bip39"
|
||||
import { getSecureItem, setSecureItem } from "./utils/storage"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Liquid Swap SDK React Native Example
|
||||
# Breez Liquid SDK React Native Example
|
||||
|
||||
## Build
|
||||
|
||||
@@ -24,7 +24,7 @@ yarn android
|
||||
* Before running `yarn android`, stop any `Metro` instances that may be running.
|
||||
* If you get the error
|
||||
```
|
||||
Failed to load dynamic library 'libls_sdk_bindings.so': dlopen failed: cannot locate symbol "__extenddftf2"
|
||||
Failed to load dynamic library 'libbreez_liquid_sdk_bindings.so': dlopen failed: cannot locate symbol "__extenddftf2"
|
||||
```
|
||||
that is likely due to a dependency issue affecting x86_64 images. Try to run the app on a physical Android device or on a x86 image.
|
||||
|
||||
@@ -37,4 +37,4 @@ yarn ios
|
||||
|
||||
## Development
|
||||
|
||||
To develop the Liquid Swap SDK alongside the React Native module and example app, please read [DEVELOPING.md](../DEVELOPING.md) for details on how to setup your development environment.
|
||||
To develop the Breez Liquid SDK alongside the React Native module and example app, please read [DEVELOPING.md](../DEVELOPING.md) for details on how to setup your development environment.
|
||||
|
||||
@@ -35,12 +35,12 @@ android_library(
|
||||
|
||||
android_build_config(
|
||||
name = "build_config",
|
||||
package = "com.example.lssdk",
|
||||
package = "com.example.breezliquidsdk",
|
||||
)
|
||||
|
||||
android_resource(
|
||||
name = "res",
|
||||
package = "com.example.lssdk",
|
||||
package = "com.example.breezliquidsdk",
|
||||
res = "src/main/res",
|
||||
)
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ android {
|
||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.example.lssdk"
|
||||
applicationId "com.example.breezliquidsdk"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 1
|
||||
@@ -157,7 +157,7 @@ android {
|
||||
cppFlags "-std=c++17"
|
||||
// Make sure this target name is the same you specify inside the
|
||||
// src/main/jni/Android.mk file for the `LOCAL_MODULE` variable.
|
||||
targets "LiquidSwapSDKExample_appmodules"
|
||||
targets "BreezLiquidSDKExample_appmodules"
|
||||
// Fix for windows limit on number of character in file paths and in command lines
|
||||
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
||||
arguments "NDK_APP_SHORT_COMMANDS=true"
|
||||
@@ -269,7 +269,7 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(':breeztech_react-native-liquid-swap-sdk')
|
||||
implementation project(':breeztech_react-native-breez-liquid-sdk')
|
||||
|
||||
implementation project(':react-native-build-config')
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
|
||||
* directory of this source tree.
|
||||
*/
|
||||
package com.example.lssdk;
|
||||
package com.example.breezliquidsdk;
|
||||
|
||||
import android.content.Context;
|
||||
import com.facebook.flipper.android.AndroidFlipperClient;
|
||||
@@ -1,5 +1,5 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.lssdk">
|
||||
package="com.example.breezliquidsdk">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.example.lssdk;
|
||||
package com.example.breezliquidsdk;
|
||||
|
||||
import com.facebook.react.ReactActivity;
|
||||
import com.facebook.react.ReactActivityDelegate;
|
||||
@@ -12,7 +12,7 @@ public class MainActivity extends ReactActivity {
|
||||
*/
|
||||
@Override
|
||||
protected String getMainComponentName() {
|
||||
return "LiquidSwapSDKExample";
|
||||
return "BreezLiquidSDKExample";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.example.lssdk;
|
||||
package com.example.breezliquidsdk;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
@@ -9,8 +9,8 @@ import com.facebook.react.ReactNativeHost;
|
||||
import com.facebook.react.ReactPackage;
|
||||
import com.facebook.react.config.ReactFeatureFlags;
|
||||
import com.facebook.soloader.SoLoader;
|
||||
import com.example.lssdk.newarchitecture.MainApplicationReactNativeHost;
|
||||
import com.lssdk.LiquidSwapSDKPackage;
|
||||
import com.example.breezliquidsdk.newarchitecture.MainApplicationReactNativeHost;
|
||||
import com.breezliquidsdk.BreezLiquidSDKPackage;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
@@ -31,7 +31,7 @@ public class MainApplication extends Application implements ReactApplication {
|
||||
// Packages that cannot be autolinked yet can be added manually here, for
|
||||
// example:
|
||||
// packages.add(new MyReactNativePackage());
|
||||
//packages.add(new LiquidSwapSDKPackage());
|
||||
//packages.add(new BreezLiquidSDKPackage());
|
||||
return packages;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ public class MainApplication extends Application implements ReactApplication {
|
||||
* We use reflection here to pick up the class that initializes Flipper,
|
||||
* since Flipper library is not available in release mode
|
||||
*/
|
||||
Class<?> aClass = Class.forName("com.example.lssdk.ReactNativeFlipper");
|
||||
Class<?> aClass = Class.forName("com.example.breezliquidsdk.ReactNativeFlipper");
|
||||
aClass
|
||||
.getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
|
||||
.invoke(null, context, reactInstanceManager);
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.example.lssdk.newarchitecture;
|
||||
package com.example.breezliquidsdk.newarchitecture;
|
||||
|
||||
import android.app.Application;
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -19,9 +19,9 @@ import com.facebook.react.fabric.CoreComponentsRegistry;
|
||||
import com.facebook.react.fabric.FabricJSIModuleProvider;
|
||||
import com.facebook.react.fabric.ReactNativeConfig;
|
||||
import com.facebook.react.uimanager.ViewManagerRegistry;
|
||||
import com.example.lssdk.BuildConfig;
|
||||
import com.example.lssdk.newarchitecture.components.MainComponentsRegistry;
|
||||
import com.example.lssdk.newarchitecture.modules.MainApplicationTurboModuleManagerDelegate;
|
||||
import com.example.breezliquidsdk.BuildConfig;
|
||||
import com.example.breezliquidsdk.newarchitecture.components.MainComponentsRegistry;
|
||||
import com.example.breezliquidsdk.newarchitecture.modules.MainApplicationTurboModuleManagerDelegate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.example.lssdk.newarchitecture.components;
|
||||
package com.example.breezliquidsdk.newarchitecture.components;
|
||||
|
||||
import com.facebook.jni.HybridData;
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.example.lssdk.newarchitecture.modules;
|
||||
package com.example.breezliquidsdk.newarchitecture.modules;
|
||||
|
||||
import com.facebook.jni.HybridData;
|
||||
import com.facebook.react.ReactPackage;
|
||||
@@ -41,7 +41,7 @@ public class MainApplicationTurboModuleManagerDelegate
|
||||
if (!sIsSoLibraryLoaded) {
|
||||
// If you change the name of your application .so file in the Android.mk file,
|
||||
// make sure you update the name here as well.
|
||||
SoLoader.loadLibrary("LiquidSwapSDKExample_appmodules");
|
||||
SoLoader.loadLibrary("BreezLiquidSDKExample_appmodules");
|
||||
sIsSoLibraryLoaded = true;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
# Define the library name here.
|
||||
project(react-native-liquid-swap-sdk-example_appmodules)
|
||||
project(react-native-breez-liquid-sdk-example_appmodules)
|
||||
|
||||
# This file includes all the necessary to let you build your application with the New Architecture.
|
||||
include(${REACT_ANDROID_DIR}/cmake-utils/ReactNative-application.cmake)
|
||||
|
||||
@@ -14,7 +14,7 @@ class MainApplicationTurboModuleManagerDelegate
|
||||
public:
|
||||
// Adapt it to the package you used for your Java class.
|
||||
static constexpr auto kJavaDescriptor =
|
||||
"Lcom/example/lssdk/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate;";
|
||||
"Lcom/example/breezliquidsdk/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate;";
|
||||
|
||||
static jni::local_ref<jhybriddata> initHybrid(jni::alias_ref<jhybridobject>);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ class MainComponentsRegistry
|
||||
public:
|
||||
// Adapt it to the package you used for your Java class.
|
||||
constexpr static auto kJavaDescriptor =
|
||||
"Lcom/example/lssdk/newarchitecture/components/MainComponentsRegistry;";
|
||||
"Lcom/example/breezliquidsdk/newarchitecture/components/MainComponentsRegistry;";
|
||||
|
||||
static void registerNatives();
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<resources>
|
||||
<string name="app_name">LiquidSwapSDKExample</string>
|
||||
<string name="app_name">BreezLiquidSDKExample</string>
|
||||
</resources>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
rootProject.name = 'LiquidSwapSDKExample'
|
||||
rootProject.name = 'BreezLiquidSDKExample'
|
||||
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
|
||||
include ':app'
|
||||
includeBuild('../node_modules/react-native-gradle-plugin')
|
||||
|
||||
include ':breeztech_react-native-liquid-swap-sdk'
|
||||
project(':breeztech_react-native-liquid-swap-sdk').projectDir = new File(rootProject.projectDir, '../node_modules/@breeztech/react-native-liquid-swap-sdk/android')
|
||||
include ':breeztech_react-native-breez-liquid-sdk'
|
||||
project(':breeztech_react-native-breez-liquid-sdk').projectDir = new File(rootProject.projectDir, '../node_modules/@breeztech/react-native-breez-liquid-sdk/android')
|
||||
|
||||
include ':react-native-build-config'
|
||||
project(':react-native-build-config').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-build-config/android')
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"name": "LiquidSwapSDKExample",
|
||||
"displayName": "LiquidSwapSDKExample"
|
||||
"name": "BreezLiquidSDKExample",
|
||||
"displayName": "BreezLiquidSDKExample"
|
||||
}
|
||||
@@ -9,24 +9,24 @@
|
||||
/* Begin PBXBuildFile section */
|
||||
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
|
||||
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
|
||||
29309CB8A7750F8A4E1808B9 /* libPods-LiquidSwapSDKExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 12FBD97DB42BAE625BC18406 /* libPods-LiquidSwapSDKExample.a */; };
|
||||
29309CB8A7750F8A4E1808B9 /* libPods-BreezLiquidSDKExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 12FBD97DB42BAE625BC18406 /* libPods-BreezLiquidSDKExample.a */; };
|
||||
7355F8D12996477D0094712A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7355F8D02996477D0094712A /* LaunchScreen.storyboard */; };
|
||||
7355F8D3299647960094712A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7355F8D2299647960094712A /* Images.xcassets */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
12FBD97DB42BAE625BC18406 /* libPods-LiquidSwapSDKExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-LiquidSwapSDKExample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
13B07F961A680F5B00A75B9A /* LiquidSwapSDKExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LiquidSwapSDKExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = LiquidSwapSDKExample/AppDelegate.h; sourceTree = "<group>"; };
|
||||
13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = LiquidSwapSDKExample/AppDelegate.mm; sourceTree = "<group>"; };
|
||||
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = LiquidSwapSDKExample/Info.plist; sourceTree = "<group>"; };
|
||||
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = LiquidSwapSDKExample/main.m; sourceTree = "<group>"; };
|
||||
581803DA52D7223BC4BD17FA /* Pods-LiquidSwapSDKExample-LiquidSwapSDKExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LiquidSwapSDKExample-LiquidSwapSDKExampleTests.release.xcconfig"; path = "Target Support Files/Pods-LiquidSwapSDKExample-LiquidSwapSDKExampleTests/Pods-LiquidSwapSDKExample-LiquidSwapSDKExampleTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
6F82CA2AA8D142F96C6306CB /* Pods-LiquidSwapSDKExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LiquidSwapSDKExample.release.xcconfig"; path = "Target Support Files/Pods-LiquidSwapSDKExample/Pods-LiquidSwapSDKExample.release.xcconfig"; sourceTree = "<group>"; };
|
||||
7355F8D02996477D0094712A /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = LiquidSwapSDKExample/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
7355F8D2299647960094712A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = LiquidSwapSDKExample/Images.xcassets; sourceTree = "<group>"; };
|
||||
BDFB208B0B2CC90B30CD3D09 /* Pods-LiquidSwapSDKExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LiquidSwapSDKExample.debug.xcconfig"; path = "Target Support Files/Pods-LiquidSwapSDKExample/Pods-LiquidSwapSDKExample.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
C0EBEFCA2DF43AFD6252F976 /* Pods-LiquidSwapSDKExample-LiquidSwapSDKExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LiquidSwapSDKExample-LiquidSwapSDKExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-LiquidSwapSDKExample-LiquidSwapSDKExampleTests/Pods-LiquidSwapSDKExample-LiquidSwapSDKExampleTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
12FBD97DB42BAE625BC18406 /* libPods-BreezLiquidSDKExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-BreezLiquidSDKExample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
13B07F961A680F5B00A75B9A /* BreezLiquidSDKExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BreezLiquidSDKExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = BreezLiquidSDKExample/AppDelegate.h; sourceTree = "<group>"; };
|
||||
13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = BreezLiquidSDKExample/AppDelegate.mm; sourceTree = "<group>"; };
|
||||
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = BreezLiquidSDKExample/Info.plist; sourceTree = "<group>"; };
|
||||
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = BreezLiquidSDKExample/main.m; sourceTree = "<group>"; };
|
||||
581803DA52D7223BC4BD17FA /* Pods-BreezLiquidSDKExample-BreezLiquidSDKExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BreezLiquidSDKExample-BreezLiquidSDKExampleTests.release.xcconfig"; path = "Target Support Files/Pods-BreezLiquidSDKExample-BreezLiquidSDKExampleTests/Pods-BreezLiquidSDKExample-BreezLiquidSDKExampleTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
6F82CA2AA8D142F96C6306CB /* Pods-BreezLiquidSDKExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BreezLiquidSDKExample.release.xcconfig"; path = "Target Support Files/Pods-BreezLiquidSDKExample/Pods-BreezLiquidSDKExample.release.xcconfig"; sourceTree = "<group>"; };
|
||||
7355F8D02996477D0094712A /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = BreezLiquidSDKExample/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
7355F8D2299647960094712A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = BreezLiquidSDKExample/Images.xcassets; sourceTree = "<group>"; };
|
||||
BDFB208B0B2CC90B30CD3D09 /* Pods-BreezLiquidSDKExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BreezLiquidSDKExample.debug.xcconfig"; path = "Target Support Files/Pods-BreezLiquidSDKExample/Pods-BreezLiquidSDKExample.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
C0EBEFCA2DF43AFD6252F976 /* Pods-BreezLiquidSDKExample-BreezLiquidSDKExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BreezLiquidSDKExample-BreezLiquidSDKExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-BreezLiquidSDKExample-BreezLiquidSDKExampleTests/Pods-BreezLiquidSDKExample-BreezLiquidSDKExampleTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
@@ -35,14 +35,14 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
29309CB8A7750F8A4E1808B9 /* libPods-LiquidSwapSDKExample.a in Frameworks */,
|
||||
29309CB8A7750F8A4E1808B9 /* libPods-BreezLiquidSDKExample.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
13B07FAE1A68108700A75B9A /* LiquidSwapSDKExample */ = {
|
||||
13B07FAE1A68108700A75B9A /* BreezLiquidSDKExample */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
13B07FAF1A68108700A75B9A /* AppDelegate.h */,
|
||||
@@ -52,14 +52,14 @@
|
||||
7355F8D2299647960094712A /* Images.xcassets */,
|
||||
7355F8D02996477D0094712A /* LaunchScreen.storyboard */,
|
||||
);
|
||||
name = LiquidSwapSDKExample;
|
||||
name = BreezLiquidSDKExample;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
|
||||
12FBD97DB42BAE625BC18406 /* libPods-LiquidSwapSDKExample.a */,
|
||||
12FBD97DB42BAE625BC18406 /* libPods-BreezLiquidSDKExample.a */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
@@ -74,7 +74,7 @@
|
||||
83CBB9F61A601CBA00E9B192 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
13B07FAE1A68108700A75B9A /* LiquidSwapSDKExample */,
|
||||
13B07FAE1A68108700A75B9A /* BreezLiquidSDKExample */,
|
||||
832341AE1AAA6A7D00B99B32 /* Libraries */,
|
||||
83CBBA001A601CBA00E9B192 /* Products */,
|
||||
2D16E6871FA4F8E400B85C8A /* Frameworks */,
|
||||
@@ -88,7 +88,7 @@
|
||||
83CBBA001A601CBA00E9B192 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
13B07F961A680F5B00A75B9A /* LiquidSwapSDKExample.app */,
|
||||
13B07F961A680F5B00A75B9A /* BreezLiquidSDKExample.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -96,10 +96,10 @@
|
||||
BBD78D7AC51CEA395F1C20DB /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BDFB208B0B2CC90B30CD3D09 /* Pods-LiquidSwapSDKExample.debug.xcconfig */,
|
||||
6F82CA2AA8D142F96C6306CB /* Pods-LiquidSwapSDKExample.release.xcconfig */,
|
||||
C0EBEFCA2DF43AFD6252F976 /* Pods-LiquidSwapSDKExample-LiquidSwapSDKExampleTests.debug.xcconfig */,
|
||||
581803DA52D7223BC4BD17FA /* Pods-LiquidSwapSDKExample-LiquidSwapSDKExampleTests.release.xcconfig */,
|
||||
BDFB208B0B2CC90B30CD3D09 /* Pods-BreezLiquidSDKExample.debug.xcconfig */,
|
||||
6F82CA2AA8D142F96C6306CB /* Pods-BreezLiquidSDKExample.release.xcconfig */,
|
||||
C0EBEFCA2DF43AFD6252F976 /* Pods-BreezLiquidSDKExample-BreezLiquidSDKExampleTests.debug.xcconfig */,
|
||||
581803DA52D7223BC4BD17FA /* Pods-BreezLiquidSDKExample-BreezLiquidSDKExampleTests.release.xcconfig */,
|
||||
);
|
||||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
@@ -107,9 +107,9 @@
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
13B07F861A680F5B00A75B9A /* LiquidSwapSDKExample */ = {
|
||||
13B07F861A680F5B00A75B9A /* BreezLiquidSDKExample */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "LiquidSwapSDKExample" */;
|
||||
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "BreezLiquidSDKExample" */;
|
||||
buildPhases = (
|
||||
C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */,
|
||||
FD10A7F022414F080027D42C /* Start Packager */,
|
||||
@@ -124,9 +124,9 @@
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = LiquidSwapSDKExample;
|
||||
name = BreezLiquidSDKExample;
|
||||
productName = RustExample;
|
||||
productReference = 13B07F961A680F5B00A75B9A /* LiquidSwapSDKExample.app */;
|
||||
productReference = 13B07F961A680F5B00A75B9A /* BreezLiquidSDKExample.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
@@ -142,7 +142,7 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "LiquidSwapSDKExample" */;
|
||||
buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "BreezLiquidSDKExample" */;
|
||||
compatibilityVersion = "Xcode 12.0";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
@@ -155,7 +155,7 @@
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
13B07F861A680F5B00A75B9A /* LiquidSwapSDKExample */,
|
||||
13B07F861A680F5B00A75B9A /* BreezLiquidSDKExample */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
@@ -195,15 +195,15 @@
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-LiquidSwapSDKExample/Pods-LiquidSwapSDKExample-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||
"${PODS_ROOT}/Target Support Files/Pods-BreezLiquidSDKExample/Pods-BreezLiquidSDKExample-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-LiquidSwapSDKExample/Pods-LiquidSwapSDKExample-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||
"${PODS_ROOT}/Target Support Files/Pods-BreezLiquidSDKExample/Pods-BreezLiquidSDKExample-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-LiquidSwapSDKExample/Pods-LiquidSwapSDKExample-frameworks.sh\"\n";
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-BreezLiquidSDKExample/Pods-BreezLiquidSDKExample-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = {
|
||||
@@ -221,7 +221,7 @@
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-LiquidSwapSDKExample-checkManifestLockResult.txt",
|
||||
"$(DERIVED_FILE_DIR)/Pods-BreezLiquidSDKExample-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
@@ -234,15 +234,15 @@
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-LiquidSwapSDKExample/Pods-LiquidSwapSDKExample-resources-${CONFIGURATION}-input-files.xcfilelist",
|
||||
"${PODS_ROOT}/Target Support Files/Pods-BreezLiquidSDKExample/Pods-BreezLiquidSDKExample-resources-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
name = "[CP] Copy Pods Resources";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-LiquidSwapSDKExample/Pods-LiquidSwapSDKExample-resources-${CONFIGURATION}-output-files.xcfilelist",
|
||||
"${PODS_ROOT}/Target Support Files/Pods-BreezLiquidSDKExample/Pods-BreezLiquidSDKExample-resources-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-LiquidSwapSDKExample/Pods-LiquidSwapSDKExample-resources.sh\"\n";
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-BreezLiquidSDKExample/Pods-BreezLiquidSDKExample-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
FD10A7F022414F080027D42C /* Start Packager */ = {
|
||||
@@ -281,7 +281,7 @@
|
||||
/* Begin XCBuildConfiguration section */
|
||||
13B07F941A680F5B00A75B9A /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = BDFB208B0B2CC90B30CD3D09 /* Pods-LiquidSwapSDKExample.debug.xcconfig */;
|
||||
baseConfigurationReference = BDFB208B0B2CC90B30CD3D09 /* Pods-BreezLiquidSDKExample.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
@@ -322,13 +322,13 @@
|
||||
"\"${PODS_ROOT}/Headers/Public/fmt\"",
|
||||
"\"${PODS_ROOT}/Headers/Public/glog\"",
|
||||
"\"${PODS_ROOT}/Headers/Public/libevent\"",
|
||||
"\"${PODS_ROOT}/Headers/Public/react-native-liquid-swap-sdk\"",
|
||||
"\"${PODS_ROOT}/Headers/Public/react-native-breez-liquid-sdk\"",
|
||||
"\"$(PODS_ROOT)/DoubleConversion\"",
|
||||
"\"$(PODS_ROOT)/boost\"",
|
||||
"\"$(PODS_ROOT)/Headers/Private/React-Core\"",
|
||||
"\"$(PODS_TARGET_SRCROOT)/include/\"",
|
||||
);
|
||||
INFOPLIST_FILE = LiquidSwapSDKExample/Info.plist;
|
||||
INFOPLIST_FILE = BreezLiquidSDKExample/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@@ -373,7 +373,7 @@
|
||||
"\"${PODS_CONFIGURATION_BUILD_DIR}/fmt\"",
|
||||
"\"${PODS_CONFIGURATION_BUILD_DIR}/glog\"",
|
||||
"\"${PODS_CONFIGURATION_BUILD_DIR}/libevent\"",
|
||||
"\"${PODS_CONFIGURATION_BUILD_DIR}/react-native-liquid-swap-sdk\"",
|
||||
"\"${PODS_CONFIGURATION_BUILD_DIR}/react-native-breez-liquid-sdk\"",
|
||||
/usr/lib/swift,
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
@@ -381,8 +381,8 @@
|
||||
"-ObjC",
|
||||
"-lc++",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.lssdk;
|
||||
PRODUCT_NAME = LiquidSwapSDKExample;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.breezliquidsdk;
|
||||
PRODUCT_NAME = BreezLiquidSDKExample;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
@@ -391,7 +391,7 @@
|
||||
};
|
||||
13B07F951A680F5B00A75B9A /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 6F82CA2AA8D142F96C6306CB /* Pods-LiquidSwapSDKExample.release.xcconfig */;
|
||||
baseConfigurationReference = 6F82CA2AA8D142F96C6306CB /* Pods-BreezLiquidSDKExample.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
@@ -431,13 +431,13 @@
|
||||
"\"${PODS_ROOT}/Headers/Public/fmt\"",
|
||||
"\"${PODS_ROOT}/Headers/Public/glog\"",
|
||||
"\"${PODS_ROOT}/Headers/Public/libevent\"",
|
||||
"\"${PODS_ROOT}/Headers/Public/react-native-liquid-swap-sdk\"",
|
||||
"\"${PODS_ROOT}/Headers/Public/react-native-breez-liquid-sdk\"",
|
||||
"\"$(PODS_ROOT)/DoubleConversion\"",
|
||||
"\"$(PODS_ROOT)/boost\"",
|
||||
"\"$(PODS_ROOT)/Headers/Private/React-Core\"",
|
||||
"\"$(PODS_TARGET_SRCROOT)/include/\"",
|
||||
);
|
||||
INFOPLIST_FILE = LiquidSwapSDKExample/Info.plist;
|
||||
INFOPLIST_FILE = BreezLiquidSDKExample/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@@ -475,7 +475,7 @@
|
||||
"\"${PODS_CONFIGURATION_BUILD_DIR}/fmt\"",
|
||||
"\"${PODS_CONFIGURATION_BUILD_DIR}/glog\"",
|
||||
"\"${PODS_CONFIGURATION_BUILD_DIR}/libevent\"",
|
||||
"\"${PODS_CONFIGURATION_BUILD_DIR}/react-native-liquid-swap-sdk\"",
|
||||
"\"${PODS_CONFIGURATION_BUILD_DIR}/react-native-breez-liquid-sdk\"",
|
||||
/usr/lib/swift,
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
@@ -483,8 +483,8 @@
|
||||
"-ObjC",
|
||||
"-lc++",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.lssdk;
|
||||
PRODUCT_NAME = LiquidSwapSDKExample;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.breezliquidsdk;
|
||||
PRODUCT_NAME = BreezLiquidSDKExample;
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
@@ -647,7 +647,7 @@
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "LiquidSwapSDKExample" */ = {
|
||||
13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "BreezLiquidSDKExample" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
13B07F941A680F5B00A75B9A /* Debug */,
|
||||
@@ -656,7 +656,7 @@
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "LiquidSwapSDKExample" */ = {
|
||||
83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "BreezLiquidSDKExample" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
83CBBA201A601CBA00E9B192 /* Debug */,
|
||||
@@ -15,9 +15,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||
BuildableName = "LiquidSwapSDKExample.app"
|
||||
BlueprintName = "LiquidSwapSDKExample"
|
||||
ReferencedContainer = "container:LiquidSwapSDKExample.xcodeproj">
|
||||
BuildableName = "BreezLiquidSDKExample.app"
|
||||
BlueprintName = "BreezLiquidSDKExample"
|
||||
ReferencedContainer = "container:BreezLiquidSDKExample.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
@@ -33,9 +33,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
|
||||
BuildableName = "LiquidSwapSDKExampleTests.xctest"
|
||||
BlueprintName = "LiquidSwapSDKExampleTests"
|
||||
ReferencedContainer = "container:LiquidSwapSDKExample.xcodeproj">
|
||||
BuildableName = "BreezLiquidSDKExampleTests.xctest"
|
||||
BlueprintName = "BreezLiquidSDKExampleTests"
|
||||
ReferencedContainer = "container:BreezLiquidSDKExample.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
@@ -55,9 +55,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||
BuildableName = "LiquidSwapSDKExample.app"
|
||||
BlueprintName = "LiquidSwapSDKExample"
|
||||
ReferencedContainer = "container:LiquidSwapSDKExample.xcodeproj">
|
||||
BuildableName = "BreezLiquidSDKExample.app"
|
||||
BlueprintName = "BreezLiquidSDKExample"
|
||||
ReferencedContainer = "container:BreezLiquidSDKExample.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
@@ -72,9 +72,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||
BuildableName = "LiquidSwapSDKExample.app"
|
||||
BlueprintName = "LiquidSwapSDKExample"
|
||||
ReferencedContainer = "container:LiquidSwapSDKExample.xcodeproj">
|
||||
BuildableName = "BreezLiquidSDKExample.app"
|
||||
BlueprintName = "BreezLiquidSDKExample"
|
||||
ReferencedContainer = "container:BreezLiquidSDKExample.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
@@ -2,7 +2,7 @@
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:LiquidSwapSDKExample.xcodeproj">
|
||||
location = "group:BreezLiquidSDKExample.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:Pods/Pods.xcodeproj">
|
||||
@@ -44,7 +44,7 @@ static NSString *const kRNConcurrentRoot = @"concurrentRoot";
|
||||
#endif
|
||||
|
||||
NSDictionary *initProps = [self prepareInitialProps];
|
||||
UIView *rootView = RCTAppSetupDefaultRootView(bridge, @"LiquidSwapSDKExample", initProps);
|
||||
UIView *rootView = RCTAppSetupDefaultRootView(bridge, @"BreezLiquidSDKExample", initProps);
|
||||
|
||||
if (@available(iOS 13.0, *)) {
|
||||
rootView.backgroundColor = [UIColor systemBackgroundColor];
|
||||
@@ -5,7 +5,7 @@
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>LiquidSwapSDKExample</string>
|
||||
<string>BreezLiquidSDKExample</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
@@ -15,7 +15,7 @@
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="LiquidSwapSDKExample" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="GJd-Yh-RWb">
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="BreezLiquidSDKExample" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="GJd-Yh-RWb">
|
||||
<rect key="frame" x="0.0" y="180" width="600" height="43"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
|
||||
<nil key="highlightedColor"/>
|
||||
@@ -4,7 +4,7 @@ require_relative '../node_modules/@react-native-community/cli-platform-ios/nativ
|
||||
platform :ios, '12.4'
|
||||
install! 'cocoapods', :deterministic_uuids => false
|
||||
|
||||
target 'LiquidSwapSDKExample' do
|
||||
target 'BreezLiquidSDKExample' do
|
||||
config = use_native_modules!
|
||||
|
||||
# Flags change depending on the env values.
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
PODS:
|
||||
- boost (1.76.0)
|
||||
- BreezLiquidSDK (0.0.1):
|
||||
- React-Core
|
||||
- CocoaAsyncSocket (7.6.5)
|
||||
- DoubleConversion (1.1.6)
|
||||
- FBLazyVector (0.70.15)
|
||||
@@ -75,8 +77,6 @@ PODS:
|
||||
- glog (0.3.5)
|
||||
- hermes-engine (0.70.15)
|
||||
- libevent (2.1.12)
|
||||
- LiquidSwapSDK (0.0.1):
|
||||
- React-Core
|
||||
- OpenSSL-Universal (1.1.1100)
|
||||
- RCT-Folly (2021.07.22.00):
|
||||
- boost
|
||||
@@ -388,6 +388,7 @@ PODS:
|
||||
|
||||
DEPENDENCIES:
|
||||
- boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`)
|
||||
- "BreezLiquidSDK (from `../node_modules/@breeztech/react-native-breez-liquid-sdk`)"
|
||||
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
|
||||
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
|
||||
- FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`)
|
||||
@@ -415,7 +416,6 @@ DEPENDENCIES:
|
||||
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
|
||||
- hermes-engine (from `../node_modules/react-native/sdks/hermes/hermes-engine.podspec`)
|
||||
- libevent (~> 2.1.12)
|
||||
- "LiquidSwapSDK (from `../node_modules/@breeztech/react-native-liquid-swap-sdk`)"
|
||||
- OpenSSL-Universal (= 1.1.1100)
|
||||
- RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
|
||||
- RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
|
||||
@@ -473,6 +473,8 @@ SPEC REPOS:
|
||||
EXTERNAL SOURCES:
|
||||
boost:
|
||||
:podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec"
|
||||
BreezLiquidSDK:
|
||||
:path: "../node_modules/@breeztech/react-native-breez-liquid-sdk"
|
||||
DoubleConversion:
|
||||
:podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
|
||||
FBLazyVector:
|
||||
@@ -483,8 +485,6 @@ EXTERNAL SOURCES:
|
||||
:podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
|
||||
hermes-engine:
|
||||
:podspec: "../node_modules/react-native/sdks/hermes/hermes-engine.podspec"
|
||||
LiquidSwapSDK:
|
||||
:path: "../node_modules/@breeztech/react-native-liquid-swap-sdk"
|
||||
RCT-Folly:
|
||||
:podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec"
|
||||
RCTRequired:
|
||||
@@ -552,6 +552,7 @@ EXTERNAL SOURCES:
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
boost: 9fa78656d705f55b1220151d997e57e2a3f2cde0
|
||||
BreezLiquidSDK: 4bca3771d7dfe9c834dbe26836ffadfe8f283c76
|
||||
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
|
||||
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
|
||||
FBLazyVector: 9cf707e46f9bd90816b7c91b2c1c8b8a2f549527
|
||||
@@ -569,7 +570,6 @@ SPEC CHECKSUMS:
|
||||
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
|
||||
hermes-engine: 2592781da1571e4375dfd897f9462638c2d0ceb9
|
||||
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
|
||||
LiquidSwapSDK: 4f88617d2e3dadf75935b8dd54762851a14cf3b0
|
||||
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
|
||||
RCT-Folly: 0080d0a6ebf2577475bda044aa59e2ca1f909cda
|
||||
RCTRequired: 2a96ea90ffddd10cc43115bd93803692e09b5d9a
|
||||
@@ -606,6 +606,6 @@ SPEC CHECKSUMS:
|
||||
Yoga: d6134eb3d6e3675afc1d6d65ccb3169b60e21980
|
||||
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
|
||||
|
||||
PODFILE CHECKSUM: ac2325ca381131d57d97db3f554ce368d61ce23e
|
||||
PODFILE CHECKSUM: 8741374df2d18c097f581557ec59033aefb561e8
|
||||
|
||||
COCOAPODS: 1.15.2
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "react-native-liquid-swap-sdk-example",
|
||||
"name": "react-native-breez-liquid-sdk-example",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
@@ -13,7 +13,7 @@
|
||||
"rebuild": "rm -rf node_modules && yarn && yarn pods"
|
||||
},
|
||||
"dependencies": {
|
||||
"@breeztech/react-native-liquid-swap-sdk": "0.0.1",
|
||||
"@breeztech/react-native-breez-liquid-sdk": "0.0.1",
|
||||
"@dreson4/react-native-quick-bip39": "^0.0.5",
|
||||
"react": "18.1.0",
|
||||
"react-native": "0.70.15",
|
||||
|
||||
@@ -964,7 +964,7 @@
|
||||
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
||||
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
||||
|
||||
"@breeztech/react-native-liquid-swap-sdk@../":
|
||||
"@breeztech/react-native-breez-liquid-sdk@../":
|
||||
version "0.0.1"
|
||||
|
||||
"@cnakazawa/watch@^1.0.3":
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
6F9258292A1636D9001A6F5C /* ls_sdkFFI.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6F9258242A1636D9001A6F5C /* ls_sdkFFI.xcframework */; };
|
||||
6F92582A2A1636D9001A6F5C /* LiquidSwapSDK.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F9258282A1636D9001A6F5C /* LiquidSwapSDK.swift */; };
|
||||
7355F8D529998CCE0094712A /* LiquidSwapSDKMapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7355F8D429998CCE0094712A /* LiquidSwapSDKMapper.swift */; };
|
||||
F4FF95D7245B92E800C19C63 /* RNLiquidSwapSDK.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4FF95D6245B92E800C19C63 /* RNLiquidSwapSDK.swift */; };
|
||||
6F9258292A1636D9001A6F5C /* breez_liquid_sdkFFI.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6F9258242A1636D9001A6F5C /* breez_liquid_sdkFFI.xcframework */; };
|
||||
6F92582A2A1636D9001A6F5C /* BreezLiquidSDK.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F9258282A1636D9001A6F5C /* BreezLiquidSDK.swift */; };
|
||||
7355F8D529998CCE0094712A /* BreezLiquidSDKMapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7355F8D429998CCE0094712A /* BreezLiquidSDKMapper.swift */; };
|
||||
F4FF95D7245B92E800C19C63 /* RNBreezLiquidSDK.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4FF95D6245B92E800C19C63 /* RNBreezLiquidSDK.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
@@ -26,14 +26,14 @@
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
6F92581A2A162080001A6F5C /* libLiquidSwapBridge.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libLiquidSwapBridge.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
6F9258242A1636D9001A6F5C /* ls_sdkFFI.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = ls_sdkFFI.xcframework; sourceTree = "<group>"; };
|
||||
6F92581A2A162080001A6F5C /* libBreezLiquidSDKBridge.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libBreezLiquidSDKBridge.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
6F9258242A1636D9001A6F5C /* breez_liquid_sdkFFI.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = breez_liquid_sdkFFI.xcframework; sourceTree = "<group>"; };
|
||||
6F9258252A1636D9001A6F5C /* .gitignore */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = .gitignore; sourceTree = "<group>"; };
|
||||
6F9258282A1636D9001A6F5C /* LiquidSwapSDK.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LiquidSwapSDK.swift; sourceTree = "<group>"; };
|
||||
7355F8D429998CCE0094712A /* LiquidSwapSDKMapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LiquidSwapSDKMapper.swift; sourceTree = "<group>"; };
|
||||
B3E7B5891CC2AC0600A0062D /* RNLiquidSwapSDK.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNLiquidSwapSDK.m; sourceTree = "<group>"; };
|
||||
F4FF95D5245B92E700C19C63 /* LiquidSwapSDK-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "LiquidSwapSDK-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
F4FF95D6245B92E800C19C63 /* RNLiquidSwapSDK.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RNLiquidSwapSDK.swift; sourceTree = "<group>"; };
|
||||
6F9258282A1636D9001A6F5C /* BreezLiquidSDK.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BreezLiquidSDK.swift; sourceTree = "<group>"; };
|
||||
7355F8D429998CCE0094712A /* BreezLiquidSDKMapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BreezLiquidSDKMapper.swift; sourceTree = "<group>"; };
|
||||
B3E7B5891CC2AC0600A0062D /* RNBreezLiquidSDK.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNBreezLiquidSDK.m; sourceTree = "<group>"; };
|
||||
F4FF95D5245B92E700C19C63 /* BreezLiquidSDK-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "BreezLiquidSDK-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
F4FF95D6245B92E800C19C63 /* RNBreezLiquidSDK.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RNBreezLiquidSDK.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -41,7 +41,7 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
6F9258292A1636D9001A6F5C /* ls_sdkFFI.xcframework in Frameworks */,
|
||||
6F9258292A1636D9001A6F5C /* breez_liquid_sdkFFI.xcframework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -53,12 +53,12 @@
|
||||
children = (
|
||||
6F9258232A1636D9001A6F5C /* bindings-swift */,
|
||||
6F92581B2A16286E001A6F5C /* Packages */,
|
||||
7355F8D429998CCE0094712A /* LiquidSwapSDKMapper.swift */,
|
||||
F4FF95D6245B92E800C19C63 /* RNLiquidSwapSDK.swift */,
|
||||
B3E7B5891CC2AC0600A0062D /* RNLiquidSwapSDK.m */,
|
||||
F4FF95D5245B92E700C19C63 /* LiquidSwapSDK-Bridging-Header.h */,
|
||||
7355F8D429998CCE0094712A /* BreezLiquidSDKMapper.swift */,
|
||||
F4FF95D6245B92E800C19C63 /* RNBreezLiquidSDK.swift */,
|
||||
B3E7B5891CC2AC0600A0062D /* RNBreezLiquidSDK.m */,
|
||||
F4FF95D5245B92E700C19C63 /* BreezLiquidSDK-Bridging-Header.h */,
|
||||
73A00D8C298D633000BC1BDA /* Frameworks */,
|
||||
6F92581A2A162080001A6F5C /* libLiquidSwapBridge.a */,
|
||||
6F92581A2A162080001A6F5C /* libBreezLiquidSDKBridge.a */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
@@ -72,7 +72,7 @@
|
||||
6F9258232A1636D9001A6F5C /* bindings-swift */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6F9258242A1636D9001A6F5C /* ls_sdkFFI.xcframework */,
|
||||
6F9258242A1636D9001A6F5C /* breez_liquid_sdkFFI.xcframework */,
|
||||
6F9258252A1636D9001A6F5C /* .gitignore */,
|
||||
6F9258262A1636D9001A6F5C /* Sources */,
|
||||
);
|
||||
@@ -82,17 +82,17 @@
|
||||
6F9258262A1636D9001A6F5C /* Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6F9258272A1636D9001A6F5C /* LiquidSwapSDK */,
|
||||
6F9258272A1636D9001A6F5C /* BreezLiquidSDK */,
|
||||
);
|
||||
path = Sources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
6F9258272A1636D9001A6F5C /* LiquidSwapSDK */ = {
|
||||
6F9258272A1636D9001A6F5C /* BreezLiquidSDK */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6F9258282A1636D9001A6F5C /* LiquidSwapSDK.swift */,
|
||||
6F9258282A1636D9001A6F5C /* BreezLiquidSDK.swift */,
|
||||
);
|
||||
path = LiquidSwapSDK;
|
||||
path = BreezLiquidSDK;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
73A00D8C298D633000BC1BDA /* Frameworks */ = {
|
||||
@@ -105,9 +105,9 @@
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
58B511DA1A9E6C8500147676 /* LiquidSwapSDK */ = {
|
||||
58B511DA1A9E6C8500147676 /* BreezLiquidSDK */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "LiquidSwapSDK" */;
|
||||
buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "BreezLiquidSDK" */;
|
||||
buildPhases = (
|
||||
58B511D71A9E6C8500147676 /* Sources */,
|
||||
58B511D81A9E6C8500147676 /* Frameworks */,
|
||||
@@ -117,11 +117,11 @@
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = LiquidSwapSDK;
|
||||
name = BreezLiquidSDK;
|
||||
packageProductDependencies = (
|
||||
);
|
||||
productName = RCTDataManager;
|
||||
productReference = 6F92581A2A162080001A6F5C /* libLiquidSwapBridge.a */;
|
||||
productReference = 6F92581A2A162080001A6F5C /* libBreezLiquidSDKBridge.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
@@ -138,7 +138,7 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "LiquidSwapSDK" */;
|
||||
buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "BreezLiquidSDK" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
@@ -153,7 +153,7 @@
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
58B511DA1A9E6C8500147676 /* LiquidSwapSDK */,
|
||||
58B511DA1A9E6C8500147676 /* BreezLiquidSDK */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
@@ -163,9 +163,9 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
6F92582A2A1636D9001A6F5C /* LiquidSwapSDK.swift in Sources */,
|
||||
F4FF95D7245B92E800C19C63 /* RNLiquidSwapSDK.swift in Sources */,
|
||||
7355F8D529998CCE0094712A /* LiquidSwapSDKMapper.swift in Sources */,
|
||||
6F92582A2A1636D9001A6F5C /* BreezLiquidSDK.swift in Sources */,
|
||||
F4FF95D7245B92E800C19C63 /* RNBreezLiquidSDK.swift in Sources */,
|
||||
7355F8D529998CCE0094712A /* BreezLiquidSDKMapper.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -300,9 +300,9 @@
|
||||
"$(PROJECT_DIR)/libs",
|
||||
);
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = LiquidSwapBridge;
|
||||
PRODUCT_NAME = BreezLiquidSDKBridge;
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "LiquidSwapBridge-Bridging-Header.h";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "BreezLiquidSDKBridge-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
@@ -323,9 +323,9 @@
|
||||
"$(PROJECT_DIR)/libs",
|
||||
);
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = LiquidSwapBridge;
|
||||
PRODUCT_NAME = BreezLiquidSDKBridge;
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "LiquidSwapBridge-Bridging-Header.h";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "BreezLiquidSDKBridge-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Release;
|
||||
@@ -333,7 +333,7 @@
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "LiquidSwapSDK" */ = {
|
||||
58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "BreezLiquidSDK" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
58B511ED1A9E6C8500147676 /* Debug */,
|
||||
@@ -342,7 +342,7 @@
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "LiquidSwapSDK" */ = {
|
||||
58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "BreezLiquidSDK" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
58B511F01A9E6C8500147676 /* Debug */,
|
||||
@@ -15,9 +15,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "58B511DA1A9E6C8500147676"
|
||||
BuildableName = "libLiquidSwapBridge.a"
|
||||
BlueprintName = "LiquidSwapSDK"
|
||||
ReferencedContainer = "container:LiquidSwapSDK.xcodeproj">
|
||||
BuildableName = "libBreezLiquidSDKBridge.a"
|
||||
BlueprintName = "BreezLiquidSDK"
|
||||
ReferencedContainer = "container:BreezLiquidSDK.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
@@ -51,9 +51,9 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "58B511DA1A9E6C8500147676"
|
||||
BuildableName = "libLiquidSwapBridge.a"
|
||||
BlueprintName = "LiquidSwapSDK"
|
||||
ReferencedContainer = "container:LiquidSwapSDK.xcodeproj">
|
||||
BuildableName = "libBreezLiquidSDKBridge.a"
|
||||
BlueprintName = "BreezLiquidSDK"
|
||||
ReferencedContainer = "container:BreezLiquidSDK.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
@@ -1,7 +1,7 @@
|
||||
import BreezLiquidSDK
|
||||
import Foundation
|
||||
import LiquidSwapSDK
|
||||
|
||||
enum LiquidSwapSDKMapper {
|
||||
enum BreezLiquidSDKMapper {
|
||||
static func asPrepareReceiveRequest(prepareReceiveRequest: [String: Any?]) throws -> PrepareReceiveRequest {
|
||||
var payerAmountSat: UInt64?
|
||||
if hasNonNilKey(data: prepareReceiveRequest, key: "payerAmountSat") {
|
||||
@@ -1,7 +1,7 @@
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#import <React/RCTEventEmitter.h>
|
||||
|
||||
@interface RCT_EXTERN_MODULE(RNLiquidSwapSDK, RCTEventEmitter)
|
||||
@interface RCT_EXTERN_MODULE(RNBreezLiquidSDK, RCTEventEmitter)
|
||||
|
||||
RCT_EXTERN_METHOD(
|
||||
connect: (NSString*)mnemonic
|
||||
@@ -1,9 +1,9 @@
|
||||
import BreezLiquidSDK
|
||||
import Foundation
|
||||
import LiquidSwapSDK
|
||||
|
||||
@objc(RNLiquidSwapSDK)
|
||||
class RNLiquidSwapSDK: RCTEventEmitter {
|
||||
static let TAG: String = "LiquidSwapSDK"
|
||||
@objc(RNBreezLiquidSDK)
|
||||
class RNBreezLiquidSDK: RCTEventEmitter {
|
||||
static let TAG: String = "BreezLiquidSDK"
|
||||
|
||||
public static var emitter: RCTEventEmitter!
|
||||
public static var hasListeners: Bool = false
|
||||
@@ -13,12 +13,12 @@ class RNLiquidSwapSDK: RCTEventEmitter {
|
||||
static var defaultDataDir: URL {
|
||||
let applicationDirectory = FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first!
|
||||
|
||||
return applicationDirectory.appendingPathComponent("lsSdk", isDirectory: true)
|
||||
return applicationDirectory.appendingPathComponent("breezLiquidSdk", isDirectory: true)
|
||||
}
|
||||
|
||||
override init() {
|
||||
super.init()
|
||||
RNLiquidSwapSDK.emitter = self
|
||||
RNBreezLiquidSDK.emitter = self
|
||||
}
|
||||
|
||||
@objc
|
||||
@@ -31,11 +31,11 @@ class RNLiquidSwapSDK: RCTEventEmitter {
|
||||
}
|
||||
|
||||
override func startObserving() {
|
||||
RNLiquidSwapSDK.hasListeners = true
|
||||
RNBreezLiquidSDK.hasListeners = true
|
||||
}
|
||||
|
||||
override func stopObserving() {
|
||||
RNLiquidSwapSDK.hasListeners = false
|
||||
RNBreezLiquidSDK.hasListeners = false
|
||||
}
|
||||
|
||||
@objc
|
||||
@@ -59,9 +59,9 @@ class RNLiquidSwapSDK: RCTEventEmitter {
|
||||
}
|
||||
|
||||
do {
|
||||
let dataDirTmp = dataDir.isEmpty ? RNLiquidSwapSDK.defaultDataDir.path : dataDir
|
||||
let networkTmp = try LiquidSwapSDKMapper.asNetwork(network: network)
|
||||
bindingWallet = try LiquidSwapSDK.connect(mnemonic: mnemonic, dataDir: dataDirTmp, network: networkTmp)
|
||||
let dataDirTmp = dataDir.isEmpty ? RNBreezLiquidSDK.defaultDataDir.path : dataDir
|
||||
let networkTmp = try BreezLiquidSDKMapper.asNetwork(network: network)
|
||||
bindingWallet = try BreezLiquidSDK.connect(mnemonic: mnemonic, dataDir: dataDirTmp, network: networkTmp)
|
||||
resolve(["status": "ok"])
|
||||
} catch let err {
|
||||
rejectErr(err: err, reject: reject)
|
||||
@@ -72,7 +72,7 @@ class RNLiquidSwapSDK: RCTEventEmitter {
|
||||
func getInfo(_ withScan: Bool, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
|
||||
do {
|
||||
var res = try getBindingWallet().getInfo(withScan: withScan)
|
||||
resolve(LiquidSwapSDKMapper.dictionaryOf(walletInfo: res))
|
||||
resolve(BreezLiquidSDKMapper.dictionaryOf(walletInfo: res))
|
||||
} catch let err {
|
||||
rejectErr(err: err, reject: reject)
|
||||
}
|
||||
@@ -82,7 +82,7 @@ class RNLiquidSwapSDK: RCTEventEmitter {
|
||||
func prepareSendPayment(_ invoice: String, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
|
||||
do {
|
||||
var res = try getBindingWallet().prepareSendPayment(invoice: invoice)
|
||||
resolve(LiquidSwapSDKMapper.dictionaryOf(prepareSendResponse: res))
|
||||
resolve(BreezLiquidSDKMapper.dictionaryOf(prepareSendResponse: res))
|
||||
} catch let err {
|
||||
rejectErr(err: err, reject: reject)
|
||||
}
|
||||
@@ -91,9 +91,9 @@ class RNLiquidSwapSDK: RCTEventEmitter {
|
||||
@objc(sendPayment:resolve:reject:)
|
||||
func sendPayment(_ req: [String: Any], resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
|
||||
do {
|
||||
let prepareSendResponse = try LiquidSwapSDKMapper.asPrepareSendResponse(prepareSendResponse: req)
|
||||
let prepareSendResponse = try BreezLiquidSDKMapper.asPrepareSendResponse(prepareSendResponse: req)
|
||||
var res = try getBindingWallet().sendPayment(req: prepareSendResponse)
|
||||
resolve(LiquidSwapSDKMapper.dictionaryOf(sendPaymentResponse: res))
|
||||
resolve(BreezLiquidSDKMapper.dictionaryOf(sendPaymentResponse: res))
|
||||
} catch let err {
|
||||
rejectErr(err: err, reject: reject)
|
||||
}
|
||||
@@ -102,9 +102,9 @@ class RNLiquidSwapSDK: RCTEventEmitter {
|
||||
@objc(prepareReceivePayment:resolve:reject:)
|
||||
func prepareReceivePayment(_ req: [String: Any], resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
|
||||
do {
|
||||
let prepareReceiveRequest = try LiquidSwapSDKMapper.asPrepareReceiveRequest(prepareReceiveRequest: req)
|
||||
let prepareReceiveRequest = try BreezLiquidSDKMapper.asPrepareReceiveRequest(prepareReceiveRequest: req)
|
||||
var res = try getBindingWallet().prepareReceivePayment(req: prepareReceiveRequest)
|
||||
resolve(LiquidSwapSDKMapper.dictionaryOf(prepareReceiveResponse: res))
|
||||
resolve(BreezLiquidSDKMapper.dictionaryOf(prepareReceiveResponse: res))
|
||||
} catch let err {
|
||||
rejectErr(err: err, reject: reject)
|
||||
}
|
||||
@@ -113,9 +113,9 @@ class RNLiquidSwapSDK: RCTEventEmitter {
|
||||
@objc(receivePayment:resolve:reject:)
|
||||
func receivePayment(_ req: [String: Any], resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
|
||||
do {
|
||||
let prepareReceiveResponse = try LiquidSwapSDKMapper.asPrepareReceiveResponse(prepareReceiveResponse: req)
|
||||
let prepareReceiveResponse = try BreezLiquidSDKMapper.asPrepareReceiveResponse(prepareReceiveResponse: req)
|
||||
var res = try getBindingWallet().receivePayment(req: prepareReceiveResponse)
|
||||
resolve(LiquidSwapSDKMapper.dictionaryOf(receivePaymentResponse: res))
|
||||
resolve(BreezLiquidSDKMapper.dictionaryOf(receivePaymentResponse: res))
|
||||
} catch let err {
|
||||
rejectErr(err: err, reject: reject)
|
||||
}
|
||||
@@ -22,11 +22,11 @@ android-copy:
|
||||
mkdir -p android/src/main/jniLibs/x86_64
|
||||
mkdir -p android/src/main/jniLibs/arm64-v8a
|
||||
mkdir -p android/src/main/jniLibs/armeabi-v7a
|
||||
cp ../ls-sdk-bindings/ffi/kotlin/ls_sdk/ls_sdk.kt android/src/main/java/com/lssdk/ls_sdk.kt
|
||||
cp ../ls-sdk-bindings/ffi/kotlin/jniLibs/x86/libls_sdk_bindings.so android/src/main/jniLibs/x86/libls_sdk_bindings.so
|
||||
cp ../ls-sdk-bindings/ffi/kotlin/jniLibs/x86_64/libls_sdk_bindings.so android/src/main/jniLibs/x86_64/libls_sdk_bindings.so
|
||||
cp ../ls-sdk-bindings/ffi/kotlin/jniLibs/arm64-v8a/libls_sdk_bindings.so android/src/main/jniLibs/arm64-v8a/libls_sdk_bindings.so
|
||||
cp ../ls-sdk-bindings/ffi/kotlin/jniLibs/armeabi-v7a/libls_sdk_bindings.so android/src/main/jniLibs/armeabi-v7a/libls_sdk_bindings.so
|
||||
cp ../ls-sdk-bindings/ffi/kotlin/breez_liquid_sdk/breez_liquid_sdk.kt android/src/main/java/com/breezliquidsdk/breez_liquid_sdk.kt
|
||||
cp ../ls-sdk-bindings/ffi/kotlin/jniLibs/x86/libbreez_liquid_sdk_bindings.so android/src/main/jniLibs/x86/libbreez_liquid_sdk_bindings.so
|
||||
cp ../ls-sdk-bindings/ffi/kotlin/jniLibs/x86_64/libbreez_liquid_sdk_bindings.so android/src/main/jniLibs/x86_64/libbreez_liquid_sdk_bindings.so
|
||||
cp ../ls-sdk-bindings/ffi/kotlin/jniLibs/arm64-v8a/libbreez_liquid_sdk_bindings.so android/src/main/jniLibs/arm64-v8a/libbreez_liquid_sdk_bindings.so
|
||||
cp ../ls-sdk-bindings/ffi/kotlin/jniLibs/armeabi-v7a/libbreez_liquid_sdk_bindings.so android/src/main/jniLibs/armeabi-v7a/libbreez_liquid_sdk_bindings.so
|
||||
|
||||
android: android-make android-copy
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
{
|
||||
"name": "@breeztech/react-native-liquid-swap-sdk",
|
||||
"name": "@breeztech/react-native-breez-liquid-sdk",
|
||||
"version": "0.0.1",
|
||||
"description": "React Native Liquid Swap SDK",
|
||||
"repository": "https://github.com/breez/breez-sdk-liquid",
|
||||
"description": "React Native Breez Liquid SDK",
|
||||
"repository": "https://github.com/breez/breez-liquid-sdk",
|
||||
"author": "Breez <contact@breez.technology> (https://github.com/breez)",
|
||||
"homepage": "https://breez.technology",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/breez/breez-sdk-liquid/issues"
|
||||
"url": "https://github.com/breez/breez-liquid-sdk/issues"
|
||||
},
|
||||
"files": [
|
||||
"src",
|
||||
"lib",
|
||||
"android",
|
||||
"ios",
|
||||
"ls_sdk.podspec",
|
||||
"breez_liquid_sdk.podspec",
|
||||
"!PUBLISHING.md",
|
||||
"!android/.gradle",
|
||||
"!android/.idea",
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { NativeModules, Platform } from "react-native"
|
||||
|
||||
const LINKING_ERROR =
|
||||
`The package 'react-native-liquid-swap-sdk' doesn't seem to be linked. Make sure: \n\n` +
|
||||
`The package 'react-native-breez-liquid-sdk' doesn't seem to be linked. Make sure: \n\n` +
|
||||
Platform.select({ ios: "- You have run 'pod install'\n", default: "" }) +
|
||||
"- You rebuilt the app after installing the package\n" +
|
||||
"- You are not using Expo managed workflow\n"
|
||||
|
||||
const LiquidSwapSDK = NativeModules.RNLiquidSwapSDK
|
||||
? NativeModules.RNLiquidSwapSDK
|
||||
const BreezLiquidSDK = NativeModules.RNBreezLiquidSDK
|
||||
? NativeModules.RNBreezLiquidSDK
|
||||
: new Proxy(
|
||||
{},
|
||||
{
|
||||
@@ -56,41 +56,40 @@ export enum Network {
|
||||
LIQUID_TESTNET = "liquidTestnet"
|
||||
}
|
||||
|
||||
export const connect = async (mnemonic: string, dataDir: string = "", network: Network): Promise<BindingWallet> => {
|
||||
const response = await LiquidSwapSDK.connect(mnemonic, dataDir, network)
|
||||
export const connect = async (mnemonic: string, dataDir: string = "", network: Network): Promise<void> => {
|
||||
const response = await BreezLiquidSDK.connect(mnemonic, dataDir, network)
|
||||
return response
|
||||
}
|
||||
|
||||
|
||||
export const getInfo = async (withScan: boolean): Promise<WalletInfo> => {
|
||||
const response = await LiquidSwapSDK.getInfo(withScan)
|
||||
const response = await BreezLiquidSDK.getInfo(withScan)
|
||||
return response
|
||||
}
|
||||
|
||||
export const prepareSendPayment = async (invoice: string): Promise<PrepareSendResponse> => {
|
||||
const response = await LiquidSwapSDK.prepareSendPayment(invoice)
|
||||
const response = await BreezLiquidSDK.prepareSendPayment(invoice)
|
||||
return response
|
||||
}
|
||||
|
||||
export const sendPayment = async (req: PrepareSendResponse): Promise<SendPaymentResponse> => {
|
||||
const response = await LiquidSwapSDK.sendPayment(req)
|
||||
const response = await BreezLiquidSDK.sendPayment(req)
|
||||
return response
|
||||
}
|
||||
|
||||
export const prepareReceivePayment = async (req: PrepareReceiveRequest): Promise<PrepareReceiveResponse> => {
|
||||
const response = await LiquidSwapSDK.prepareReceivePayment(req)
|
||||
const response = await BreezLiquidSDK.prepareReceivePayment(req)
|
||||
return response
|
||||
}
|
||||
|
||||
export const receivePayment = async (req: PrepareReceiveResponse): Promise<ReceivePaymentResponse> => {
|
||||
const response = await LiquidSwapSDK.receivePayment(req)
|
||||
const response = await BreezLiquidSDK.receivePayment(req)
|
||||
return response
|
||||
}
|
||||
|
||||
export const backup = async (): Promise<void> => {
|
||||
await LiquidSwapSDK.backup()
|
||||
await BreezLiquidSDK.backup()
|
||||
}
|
||||
|
||||
export const restore = async (backupPath: string = ""): Promise<void> => {
|
||||
await LiquidSwapSDK.restore(backupPath)
|
||||
await BreezLiquidSDK.restore(backupPath)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user