: NetworkBoundUseCase() {
10 | private val dataState = MutableStateFlow(null)
11 |
12 | fun set(data: R) {
13 | dataState.value = data
14 | }
15 |
16 | fun get(): Flow {
17 | return dataState
18 | }
19 |
20 | }
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/domain/src/commonMain/kotlin/com/blockstream/green/domain/base/Result.kt:
--------------------------------------------------------------------------------
1 | package com.blockstream.green.domain.base
2 |
3 | sealed interface Result {
4 | data class Loading(val data: T? = null) : Result
5 | data class Success(val data: T) : Result
6 | data class Error(val exception: Throwable) : Result
7 | }
8 |
--------------------------------------------------------------------------------
/domain/src/commonMain/kotlin/com/blockstream/green/domain/notifications/NotificationModule.kt:
--------------------------------------------------------------------------------
1 | package com.blockstream.green.domain.notifications
2 |
3 | import org.koin.dsl.module
4 |
5 | val notificationsDomainModule = module {
6 | factory { RegisterFCMToken(get()) }
7 | }
--------------------------------------------------------------------------------
/fastlane/Appfile:
--------------------------------------------------------------------------------
1 | # app_identifier("io.blockstream.green") # The bundle identifier of your app
2 |
3 | itc_team_id("118542870") # App Store Connect Team ID
4 | team_id("D9W37S9468") # Developer Portal Team ID
5 |
6 | # For more information about the Appfile, see:
7 | # https://docs.fastlane.tools/advanced/#appfile
8 |
--------------------------------------------------------------------------------
/fastlane/Matchfile:
--------------------------------------------------------------------------------
1 | gitlab_project("blockstream/green/green_android")
2 | gitlab_host("https://gl.blockstream.io")
3 |
4 | storage_mode("gitlab_secure_files")
5 |
6 | type("development") # The default type, can be: appstore, adhoc, enterprise or development
7 |
8 | # app_identifier(["tools.fastlane.app", "tools.fastlane.app2"])
9 | # username("user@fastlane.tools") # Your Apple Developer Portal username
10 |
11 | # For all available options run `fastlane match --help`
12 | # Remove the # in the beginning of the line to enable the other options
13 |
14 | # The docs are available on https://docs.fastlane.tools/actions/match
15 |
--------------------------------------------------------------------------------
/fastlane/Pluginfile:
--------------------------------------------------------------------------------
1 | # Autogenerated by fastlane
2 | #
3 | # Ensure this file is checked in to source control!
4 |
5 | gem 'fastlane-plugin-firebase_app_distribution'
6 |
--------------------------------------------------------------------------------
/gdk/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | /src/main/res/drawable/asset_*
3 | /src/main/jniLibs
--------------------------------------------------------------------------------
/gdk/consumer-rules.pro:
--------------------------------------------------------------------------------
1 |
2 | -keep class com.blockstream.green_gdk.** {*;}
3 | -keep class com.blockstream.libwally.** {*;}
--------------------------------------------------------------------------------
/gdk/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/gms/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/gms/consumer-rules.pro:
--------------------------------------------------------------------------------
1 | -keep class zendesk.** { *; }
2 | -keepnames class zendesk.** { *; }
--------------------------------------------------------------------------------
/gms/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
4 | networkTimeout=10000
5 | validateDistributionUrl=true
6 | zipStoreBase=GRADLE_USER_HOME
7 | zipStorePath=wrapper/dists
8 |
--------------------------------------------------------------------------------
/hardware/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/hardware/consumer-rules.pro:
--------------------------------------------------------------------------------
1 | # BEGIN for protobuf in trezor:
2 | -keep class com.satoshilabs.trezor.** { *; }
3 | -keepattributes InnerClasses,EnclosingMethod
4 | # END for protobuf in trezor
--------------------------------------------------------------------------------
/hardware/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/hardware/src/main/java/com/blockstream/Extensions.kt:
--------------------------------------------------------------------------------
1 | package com.blockstream
2 |
3 | import kotlinx.coroutines.flow.MutableStateFlow
4 |
5 | fun createDisconnectEvent(): MutableStateFlow {
6 | return MutableStateFlow(false)
7 | }
--------------------------------------------------------------------------------
/iosApp/Configuration/Config.xcconfig:
--------------------------------------------------------------------------------
1 | TEAM_ID=
2 | BUNDLE_ID=io.blockstream.greendev
3 | APP_NAME=Green
4 |
--------------------------------------------------------------------------------
/iosApp/Gemfile:
--------------------------------------------------------------------------------
1 | source "https://rubygems.org"
2 |
3 | gem "fastlane"
4 |
5 | plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
6 | eval_gemfile(plugins_path) if File.exist?(plugins_path)
7 |
--------------------------------------------------------------------------------
/iosApp/iosApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/iosApp/iosApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/iosApp/iosApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved:
--------------------------------------------------------------------------------
1 | {
2 | "originHash" : "6f7f935927c2b58f9c78f2db5b3773a08722ddb48fcea675ab67d99aeabc789d",
3 | "pins" : [
4 | {
5 | "identity" : "countly-sdk-ios",
6 | "kind" : "remoteSourceControl",
7 | "location" : "https://github.com/angelix/countly-sdk-ios",
8 | "state" : {
9 | "revision" : "1892410d13fceccd7cf91f803f06f110efc215b3"
10 | }
11 | }
12 | ],
13 | "version" : 3
14 | }
15 |
--------------------------------------------------------------------------------
/iosApp/iosApp/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
--------------------------------------------------------------------------------
/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "app-icon-1024.png",
5 | "idiom" : "universal",
6 | "platform" : "ios",
7 | "size" : "1024x1024"
8 | }
9 | ],
10 | "info" : {
11 | "author" : "xcode",
12 | "version" : 1
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/app-icon-1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/app-icon-1024.png
--------------------------------------------------------------------------------
/iosApp/iosApp/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/iosApp/iosApp/ContentView.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import SwiftUI
3 | import ComposeApp
4 |
5 | struct ComposeView: UIViewControllerRepresentable {
6 | func makeUIViewController(context: Context) -> UIViewController {
7 | MainViewControllerKt.MainViewController()
8 | }
9 |
10 | func updateUIViewController(_ uiViewController: UIViewController, context: Context) {}
11 | }
12 |
13 | struct ContentView: View {
14 | var body: some View {
15 | ComposeView()
16 | .ignoresSafeArea(.keyboard) // Compose has own keyboard handler
17 | }
18 | }
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/iosApp/iosApp/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
--------------------------------------------------------------------------------
/iosApp/iosApp/iOSApp.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 | //import ComposeApp
3 | //import Common
4 |
5 | @main
6 | struct iOSApp: App {
7 | var body: some Scene {
8 | WindowGroup {
9 | ContentView()
10 | .background(Color("background"))
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/jade/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/jade/consumer-rules.pro:
--------------------------------------------------------------------------------
1 | -keep class com.blockstream.jade.entities** {*;}
--------------------------------------------------------------------------------
/jade/src/androidMain/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/jade/src/androidMain/kotlin/com/blockstream/jade/JadeApi.android.kt:
--------------------------------------------------------------------------------
1 | package com.blockstream.jade
2 |
3 | import android.hardware.usb.UsbDevice
4 | import android.hardware.usb.UsbManager
5 |
6 | fun JadeAPI.Companion.fromUsb(
7 | usbDevice: UsbDevice,
8 | usbManager: UsbManager,
9 | httpRequestHandler: HttpRequestHandler
10 | ): JadeAPI {
11 | val jade = JadeInterface.fromUsb(
12 | usbDevice = usbDevice,
13 | usbManager = usbManager
14 | )
15 | return JadeAPI(jade, httpRequestHandler)
16 | }
--------------------------------------------------------------------------------
/jade/src/androidMain/kotlin/com/blockstream/jade/JadeInterface.android.kt:
--------------------------------------------------------------------------------
1 | package com.blockstream.jade
2 |
3 | import android.hardware.usb.UsbDevice
4 | import android.hardware.usb.UsbManager
5 | import com.blockstream.jade.connection.JadeUsbConnection
6 |
7 | fun JadeInterface.Companion.fromUsb(
8 | usbDevice: UsbDevice,
9 | usbManager: UsbManager
10 | ): JadeInterface {
11 | return JadeInterface(
12 | JadeUsbConnection(
13 | usbDevice = usbDevice,
14 | usbManager = usbManager
15 | )
16 | )
17 | }
--------------------------------------------------------------------------------
/jade/src/commonMain/kotlin/com/blockstream/jade/Constants.kt:
--------------------------------------------------------------------------------
1 | package com.blockstream.jade
2 |
3 |
4 | // Timeouts for autonomous calls that should return quickly, calls that require user confirmation,
5 | // and calls that need arbitrarily long (eg. entering a mnemonic) and should not timeout at all.
6 | const val TIMEOUT_AUTONOMOUS: Int = 6_000 // 6 secs
7 | const val TIMEOUT_AUTONOMOUS_LONG: Int = 10_000 // 10 secs
8 | const val TIMEOUT_USER_INTERACTION = 120_000 // 2 mins
9 | const val TIMEOUT_NONE = -1
--------------------------------------------------------------------------------
/jade/src/commonMain/kotlin/com/blockstream/jade/HttpRequestHandler.kt:
--------------------------------------------------------------------------------
1 | package com.blockstream.jade
2 |
3 | import kotlinx.serialization.json.JsonElement
4 |
5 | // HttpRequestHandler is used for network calls during pinserver handshake
6 | // useful on TOR enabled sessions
7 | interface HttpRequestHandler {
8 | suspend fun httpRequest(details: JsonElement): JsonElement
9 |
10 | suspend fun httpRequest(
11 | method: String,
12 | urls: List?,
13 | data: String?,
14 | accept: String?,
15 | certs: List?
16 | ): JsonElement
17 | }
--------------------------------------------------------------------------------
/jade/src/commonMain/kotlin/com/blockstream/jade/Loggable.kt:
--------------------------------------------------------------------------------
1 | package com.blockstream.jade
2 |
3 | import co.touchlab.kermit.Logger
4 |
5 | abstract class Loggable {
6 | protected val logger by lazy {
7 | Logger.withTag(
8 | this::class.qualifiedName?.removeSuffix(".Companion")?.splitToSequence('.')?.lastOrNull() ?: "GreenLoggable"
9 | )
10 | }
11 | }
--------------------------------------------------------------------------------
/jade/src/commonMain/kotlin/com/blockstream/jade/api/Commitment.kt:
--------------------------------------------------------------------------------
1 | package com.blockstream.jade.api
2 |
3 | import kotlinx.serialization.SerialName
4 | import kotlinx.serialization.Serializable
5 |
6 | @Serializable
7 | data class Commitment(
8 | @SerialName("asset_id")
9 | val assetId: ByteArray,
10 | val value: Long?,
11 | val abf: ByteArray?,
12 | val vbf: ByteArray?,
13 | @SerialName("blinding_key")
14 | val blindingKey: ByteArray
15 | ) : JadeSerializer() {
16 | override fun kSerializer() = serializer()
17 | override fun encodeDefaultsValues() = false
18 | }
19 |
--------------------------------------------------------------------------------
/jade/src/commonMain/kotlin/com/blockstream/jade/api/Error.kt:
--------------------------------------------------------------------------------
1 | package com.blockstream.jade.api
2 |
3 | import kotlinx.serialization.KSerializer
4 | import kotlinx.serialization.Serializable
5 |
6 | @Serializable
7 | data class Error(
8 | val code: Int,
9 | val message: String,
10 | val data: ByteArray? = null
11 | ) : JadeSerializer() {
12 | override fun kSerializer(): KSerializer = kotlinx.serialization.serializer()
13 | }
14 |
--------------------------------------------------------------------------------
/jade/src/commonMain/kotlin/com/blockstream/jade/api/Log.kt:
--------------------------------------------------------------------------------
1 | package com.blockstream.jade.api
2 |
3 | import kotlinx.serialization.KSerializer
4 | import kotlinx.serialization.Serializable
5 |
6 |
7 |
8 | @Serializable
9 | class LogResponse(val log: String) : JadeSerializer() {
10 | override fun kSerializer(): KSerializer = kotlinx.serialization.serializer()
11 | }
--------------------------------------------------------------------------------
/jade/src/commonMain/kotlin/com/blockstream/jade/api/Logout.kt:
--------------------------------------------------------------------------------
1 | package com.blockstream.jade.api
2 |
3 | import kotlinx.serialization.KSerializer
4 | import kotlinx.serialization.Serializable
5 |
6 |
7 | @Serializable
8 | data class LogoutRequest(
9 | override val id: String = jadeId(),
10 | override val method: String = "logout",
11 | override val params: Unit = Unit
12 | ) : Request() {
13 | override fun kSerializer(): KSerializer = kotlinx.serialization.serializer()
14 | }
15 |
--------------------------------------------------------------------------------
/jade/src/commonMain/kotlin/com/blockstream/jade/api/OtaData.kt:
--------------------------------------------------------------------------------
1 | package com.blockstream.jade.api
2 |
3 | import com.blockstream.jade.TIMEOUT_USER_INTERACTION
4 | import kotlinx.serialization.KSerializer
5 | import kotlinx.serialization.Serializable
6 |
7 |
8 | @Serializable
9 | data class OtaDataRequest(
10 | override val id: String = jadeId(),
11 | override val method: String = "ota_data",
12 | override val params: ByteArray
13 | ) : Request() {
14 | override fun timeout(): Int = TIMEOUT_USER_INTERACTION
15 | override fun kSerializer(): KSerializer = kotlinx.serialization.serializer()
16 | }
--------------------------------------------------------------------------------
/jade/src/commonMain/kotlin/com/blockstream/jade/api/Request.kt:
--------------------------------------------------------------------------------
1 | package com.blockstream.jade.api
2 |
3 | import com.blockstream.jade.TIMEOUT_AUTONOMOUS
4 | import kotlinx.serialization.Serializable
5 |
6 | @Serializable
7 | sealed class Request : JadeSerializer() {
8 | abstract val id: String
9 | abstract val method: String
10 | abstract val params: P?
11 |
12 | open fun timeout(): Int = TIMEOUT_AUTONOMOUS
13 | }
--------------------------------------------------------------------------------
/jade/src/commonMain/kotlin/com/blockstream/jade/data/JadeNetworks.kt:
--------------------------------------------------------------------------------
1 | package com.blockstream.jade.data
2 |
3 | enum class JadeNetworks {
4 | MAIN, TEST, ALL;
5 | }
--------------------------------------------------------------------------------
/jade/src/commonMain/kotlin/com/blockstream/jade/data/JadeState.kt:
--------------------------------------------------------------------------------
1 | package com.blockstream.jade.data
2 |
3 | enum class JadeState {
4 | LOCKED, UNSAVED, UNINIT, TEMP, READY;
5 | }
--------------------------------------------------------------------------------
/jade/src/commonMain/kotlin/com/blockstream/jade/data/SignedTransactionInputs.kt:
--------------------------------------------------------------------------------
1 | package com.blockstream.jade.data
2 |
3 | @OptIn(ExperimentalStdlibApi::class)
4 | class SignedTransactionInputs(
5 | val signatures: List,
6 | val signerCommitments: List? = null
7 | ) {
8 | companion object {
9 | fun create(
10 | signatures: List,
11 | signerCommitments: List
12 | ) = SignedTransactionInputs(
13 | signatures = signatures.map { it.toHexString() },
14 | signerCommitments = signerCommitments.map { it.toHexString() }
15 | )
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/jade/src/commonMain/kotlin/com/blockstream/jade/firmware/HardwareQATester.kt:
--------------------------------------------------------------------------------
1 | package com.blockstream.jade.firmware;
2 |
3 | interface HardwareQATester{
4 | fun getAntiExfilCorruptionForMessageSign() : Boolean
5 | fun getAntiExfilCorruptionForTxSign() : Boolean
6 | fun getFirmwareCorruption() : Boolean
7 | }
8 |
--------------------------------------------------------------------------------
/keystore.properties.template:
--------------------------------------------------------------------------------
1 | storeFile=~/.android/debug.keystore
2 | storePassword=android
3 | keyAlias=androiddebugkey
4 | keyPassword=android
--------------------------------------------------------------------------------
/metadata/en-US/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/metadata/en-US/images/icon.png
--------------------------------------------------------------------------------
/metadata/en-US/images/phoneScreenshots/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/metadata/en-US/images/phoneScreenshots/1.png
--------------------------------------------------------------------------------
/metadata/en-US/images/phoneScreenshots/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/metadata/en-US/images/phoneScreenshots/2.png
--------------------------------------------------------------------------------
/metadata/en-US/images/phoneScreenshots/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/metadata/en-US/images/phoneScreenshots/3.png
--------------------------------------------------------------------------------
/metadata/en-US/images/phoneScreenshots/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/metadata/en-US/images/phoneScreenshots/4.png
--------------------------------------------------------------------------------
/metadata/en-US/images/phoneScreenshots/5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/metadata/en-US/images/phoneScreenshots/5.png
--------------------------------------------------------------------------------
/metadata/en-US/images/phoneScreenshots/6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/metadata/en-US/images/phoneScreenshots/6.png
--------------------------------------------------------------------------------
/metadata/en-US/short_description.txt:
--------------------------------------------------------------------------------
1 | Bitcoin - secure and easy
--------------------------------------------------------------------------------
/metadata/en-US/title.txt:
--------------------------------------------------------------------------------
1 | Green: Bitcoin Wallet
--------------------------------------------------------------------------------
/network/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/network/src/androidHostTest/kotlin/com/blockstream/green/network/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.blockstream.green.network
2 |
3 | import kotlin.test.Test
4 | import kotlin.test.assertEquals
5 |
6 | /**
7 | * Example local unit test, which will execute on the development machine (host).
8 | *
9 | * See [testing documentation](http://d.android.com/tools/testing).
10 | */
11 | class ExampleUnitTest {
12 | @Test
13 | fun addition_isCorrect() {
14 | assertEquals(4, 2 + 2)
15 | }
16 | }
--------------------------------------------------------------------------------
/network/src/androidHostTest/kotlin/com/blockstream/green/utils/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.blockstream.green.utils
2 |
3 | import kotlin.test.Test
4 | import kotlin.test.assertEquals
5 |
6 | /**
7 | * Example local unit test, which will execute on the development machine (host).
8 | *
9 | * See [testing documentation](http://d.android.com/tools/testing).
10 | */
11 | class ExampleUnitTest {
12 | @Test
13 | fun addition_isCorrect() {
14 | assertEquals(4, 2 + 2)
15 | }
16 | }
--------------------------------------------------------------------------------
/network/src/androidMain/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/no-gms/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/no-gms/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.androidLibrary)
3 | alias(libs.plugins.kotlinAndroid)
4 | }
5 |
6 | android {
7 | namespace = "com.blockstream.gms"
8 | compileSdk = libs.versions.androidCompileSdk.get().toInt()
9 |
10 | defaultConfig {
11 | minSdk = libs.versions.androidMinSdk.get().toInt()
12 | }
13 | }
14 |
15 | kotlin {
16 | jvmToolchain(libs.versions.jvm.get().toInt())
17 | }
18 | dependencies {
19 | implementation(project(":base-gms"))
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/no-gms/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/no-gms/src/main/java/com/blockstream/gms/di/GmsModule.kt:
--------------------------------------------------------------------------------
1 | package com.blockstream.gms.di
2 |
3 | import com.blockstream.base.GooglePlay
4 | import com.blockstream.base.InstallReferrer
5 | import com.blockstream.common.ZendeskSdk
6 | import com.blockstream.common.fcm.Firebase
7 | import org.koin.dsl.module
8 |
9 | val gmsModule = module {
10 | single {
11 | GooglePlay()
12 | }
13 | single {
14 | ZendeskSdk()
15 | }
16 | single {
17 | Firebase()
18 | }
19 | single {
20 | InstallReferrer()
21 | }
22 | }
--------------------------------------------------------------------------------
/prepare_fdroid.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | echo "Changing Breez SDK dependency from KMP to Android"
4 | sed -i -e 's/api(libs.breez.sdk.kmp)/\/\/ api(libs.breez.sdk.kmp)/g' common/build.gradle.kts
5 | sed -i -e 's/\/\/ api(libs.breez.sdk.android/api(libs.breez.sdk.android/g' common/build.gradle.kts
6 | sed -i -e 's/\/\/ implementation("${libs.jna/implementation("${libs.jna/g' common/build.gradle.kts
7 |
--------------------------------------------------------------------------------
/ui-common/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/ui-common/src/androidMain/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/ui-common/src/commonMain/kotlin/com/blockstream/ui/components/GreenSpacer.kt:
--------------------------------------------------------------------------------
1 | package com.blockstream.ui.components
2 |
3 | import androidx.compose.foundation.layout.Spacer
4 | import androidx.compose.foundation.layout.size
5 | import androidx.compose.runtime.Composable
6 | import androidx.compose.runtime.NonRestartableComposable
7 | import androidx.compose.ui.Modifier
8 | import androidx.compose.ui.unit.dp
9 |
10 |
11 | @Composable
12 | @NonRestartableComposable
13 | fun GreenSpacer(space: Int = 16) {
14 | Spacer(
15 | modifier = Modifier
16 | .size(space.dp)
17 | )
18 | }
--------------------------------------------------------------------------------
/ui-common/src/commonMain/kotlin/com/blockstream/ui/events/Event.kt:
--------------------------------------------------------------------------------
1 | package com.blockstream.ui.events
2 |
3 | interface Event
--------------------------------------------------------------------------------
/ui-common/src/commonMain/kotlin/com/blockstream/ui/navigation/bottomsheet/ModalBottomSheetLayout.kt:
--------------------------------------------------------------------------------
1 | package com.blockstream.ui.navigation.bottomsheet
2 |
3 | import androidx.compose.runtime.Composable
4 |
5 |
6 | @Composable
7 | fun ModalBottomSheetLayout(
8 | bottomSheetNavigator: BottomSheetNavigator,
9 | ) {
10 | bottomSheetNavigator.sheetInitializer()
11 |
12 | if (bottomSheetNavigator.sheetEnabled) {
13 | bottomSheetNavigator.sheetContent()
14 | }
15 | }
--------------------------------------------------------------------------------
/ui-common/src/commonMain/kotlin/com/blockstream/ui/sideeffects/SideEffect.kt:
--------------------------------------------------------------------------------
1 | package com.blockstream.ui.sideeffects
2 |
3 | interface SideEffect
--------------------------------------------------------------------------------
/utils/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/utils/src/androidHostTest/kotlin/com/blockstream/green/utils/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.blockstream.green.utils
2 |
3 | import kotlin.test.Test
4 | import kotlin.test.assertEquals
5 |
6 | /**
7 | * Example local unit test, which will execute on the development machine (host).
8 | *
9 | * See [testing documentation](http://d.android.com/tools/testing).
10 | */
11 | class ExampleUnitTest {
12 | @Test
13 | fun addition_isCorrect() {
14 | assertEquals(4, 2 + 2)
15 | }
16 | }
--------------------------------------------------------------------------------
/utils/src/androidMain/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/utils/src/commonMain/kotlin/com/blockstream/green/utils/Loggable.kt:
--------------------------------------------------------------------------------
1 | package com.blockstream.green.utils
2 |
3 | import co.touchlab.kermit.Logger
4 |
5 | abstract class Loggable {
6 | protected val logger by lazy {
7 | Logger.withTag(
8 | this::class.qualifiedName?.removeSuffix(".Companion")?.splitToSequence('.')?.lastOrNull() ?: "Loggable"
9 | )
10 | }
11 | }
--------------------------------------------------------------------------------