mirror of
https://github.com/pezkuwichain/pezkuwi-wallet-android.git
synced 2026-06-15 20:51:10 +00:00
Initial commit: Pezkuwi Wallet Android
Complete rebrand of Nova Wallet for Pezkuwichain ecosystem. ## Features - Full Pezkuwichain support (HEZ & PEZ tokens) - Polkadot ecosystem compatibility - Staking, Governance, DeFi, NFTs - XCM cross-chain transfers - Hardware wallet support (Ledger, Polkadot Vault) - WalletConnect v2 - Push notifications ## Languages - English, Turkish, Kurmanci (Kurdish), Spanish, French, German, Russian, Japanese, Chinese, Korean, Portuguese, Vietnamese Based on Nova Wallet by Novasama Technologies GmbH © Dijital Kurdistan Tech Institute 2026
This commit is contained in:
@@ -0,0 +1 @@
|
||||
/build
|
||||
@@ -0,0 +1,30 @@
|
||||
apply plugin: 'kotlin-parcelize'
|
||||
|
||||
android {
|
||||
namespace 'io.novafoundation.nova.feature_buy_api'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation coroutinesDep
|
||||
implementation project(':runtime')
|
||||
implementation project(":feature-account-api")
|
||||
implementation project(":feature-wallet-api")
|
||||
implementation project(":common")
|
||||
implementation project(':feature-deep-linking')
|
||||
|
||||
implementation materialDep
|
||||
|
||||
implementation daggerDep
|
||||
ksp daggerCompiler
|
||||
|
||||
implementation substrateSdkDep
|
||||
|
||||
implementation androidDep
|
||||
implementation constraintDep
|
||||
|
||||
implementation lifeCycleKtxDep
|
||||
|
||||
api project(':core-api')
|
||||
|
||||
testImplementation project(':test-shared')
|
||||
}
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
</manifest>
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package io.novafoundation.nova.feature_buy_api.di
|
||||
|
||||
import io.novafoundation.nova.feature_buy_api.di.deeplinks.BuyDeepLinks
|
||||
import io.novafoundation.nova.feature_buy_api.presentation.trade.TradeTokenRegistry
|
||||
import io.novafoundation.nova.feature_buy_api.presentation.mixin.TradeMixin
|
||||
import io.novafoundation.nova.feature_buy_api.presentation.trade.interceptors.mercuryo.MercuryoBuyRequestInterceptorFactory
|
||||
import io.novafoundation.nova.feature_buy_api.presentation.trade.interceptors.mercuryo.MercuryoSellRequestInterceptorFactory
|
||||
|
||||
interface BuyFeatureApi {
|
||||
|
||||
val buyTokenRegistry: TradeTokenRegistry
|
||||
|
||||
val tradeMixinFactory: TradeMixin.Factory
|
||||
|
||||
val mercuryoBuyRequestInterceptorFactory: MercuryoBuyRequestInterceptorFactory
|
||||
|
||||
val mercuryoSellRequestInterceptorFactory: MercuryoSellRequestInterceptorFactory
|
||||
|
||||
val buyDeepLinks: BuyDeepLinks
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package io.novafoundation.nova.feature_buy_api.di.deeplinks
|
||||
|
||||
import io.novafoundation.nova.feature_deep_linking.presentation.handling.DeepLinkHandler
|
||||
|
||||
class BuyDeepLinks(val deepLinkHandlers: List<DeepLinkHandler>)
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package io.novafoundation.nova.feature_buy_api.presentation.mixin
|
||||
|
||||
import io.novafoundation.nova.common.mixin.MixinFactory
|
||||
import io.novafoundation.nova.feature_buy_api.presentation.trade.TradeProvider
|
||||
import io.novafoundation.nova.feature_buy_api.presentation.trade.TradeTokenRegistry
|
||||
import io.novafoundation.nova.runtime.multiNetwork.chain.model.Chain
|
||||
|
||||
interface TradeMixin {
|
||||
|
||||
fun providersFor(chainAsset: Chain.Asset, tradeType: TradeTokenRegistry.TradeType): List<TradeProvider>
|
||||
|
||||
fun <T> providerFor(chainAsset: Chain.Asset, tradeFlow: TradeTokenRegistry.TradeType, providerId: String): T
|
||||
|
||||
interface Presentation : TradeMixin
|
||||
|
||||
interface Factory : MixinFactory<TradeMixin>
|
||||
}
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
package io.novafoundation.nova.feature_buy_api.presentation.trade
|
||||
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.annotation.StringRes
|
||||
import io.novafoundation.nova.feature_buy_api.presentation.trade.common.OnTradeOperationFinishedListener
|
||||
import io.novafoundation.nova.feature_buy_api.presentation.trade.common.OnSellOrderCreatedListener
|
||||
import io.novafoundation.nova.runtime.multiNetwork.chain.model.Chain
|
||||
|
||||
typealias TradeProvider = TradeTokenRegistry.Provider<*>
|
||||
|
||||
interface TradeTokenRegistry {
|
||||
|
||||
fun hasProvider(chainAsset: Chain.Asset): Boolean
|
||||
|
||||
fun hasProvider(chainAsset: Chain.Asset, tradeType: TradeType): Boolean
|
||||
|
||||
fun availableProvidersFor(chainAsset: Chain.Asset, tradeType: TradeType): List<TradeProvider>
|
||||
|
||||
interface Provider<I : Integrator<*>> {
|
||||
val id: String
|
||||
|
||||
val name: String
|
||||
|
||||
val officialUrl: String
|
||||
|
||||
@get:DrawableRes
|
||||
val logoRes: Int
|
||||
|
||||
fun getPaymentMethods(tradeType: TradeType): List<PaymentMethod>
|
||||
|
||||
@StringRes
|
||||
fun getDescriptionRes(tradeType: TradeType): Int
|
||||
|
||||
fun createIntegrator(
|
||||
chainAsset: Chain.Asset,
|
||||
address: String,
|
||||
tradeFlow: TradeType,
|
||||
onCloseListener: OnTradeOperationFinishedListener,
|
||||
onSellOrderCreatedListener: OnSellOrderCreatedListener
|
||||
): I
|
||||
}
|
||||
|
||||
interface Integrator<T> {
|
||||
|
||||
suspend fun run(using: T)
|
||||
}
|
||||
|
||||
enum class TradeType {
|
||||
BUY, SELL
|
||||
}
|
||||
|
||||
sealed interface PaymentMethod {
|
||||
object Visa : PaymentMethod
|
||||
object MasterCard : PaymentMethod
|
||||
object ApplePay : PaymentMethod
|
||||
object GooglePay : PaymentMethod
|
||||
object Sepa : PaymentMethod
|
||||
object BankTransfer : PaymentMethod
|
||||
|
||||
class Other(val quantity: Int) : PaymentMethod
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package io.novafoundation.nova.feature_buy_api.presentation.trade.common
|
||||
|
||||
import java.math.BigDecimal
|
||||
|
||||
interface OnSellOrderCreatedListener {
|
||||
fun onSellOrderCreated(orderId: String, address: String, amount: BigDecimal)
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package io.novafoundation.nova.feature_buy_api.presentation.trade.common
|
||||
|
||||
interface OnTradeOperationFinishedListener {
|
||||
fun onTradeOperationFinished(success: Boolean)
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package io.novafoundation.nova.feature_buy_api.presentation.trade.interceptors.mercuryo
|
||||
|
||||
import io.novafoundation.nova.common.utils.webView.WebViewRequestInterceptor
|
||||
import io.novafoundation.nova.feature_buy_api.presentation.trade.common.OnTradeOperationFinishedListener
|
||||
|
||||
interface MercuryoBuyRequestInterceptorFactory {
|
||||
fun create(onTradeOperationFinishedListener: OnTradeOperationFinishedListener): MercuryoBuyRequestInterceptor
|
||||
}
|
||||
|
||||
interface MercuryoBuyRequestInterceptor : WebViewRequestInterceptor
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package io.novafoundation.nova.feature_buy_api.presentation.trade.interceptors.mercuryo
|
||||
|
||||
import io.novafoundation.nova.common.utils.webView.WebViewRequestInterceptor
|
||||
import io.novafoundation.nova.feature_buy_api.presentation.trade.common.OnSellOrderCreatedListener
|
||||
import io.novafoundation.nova.feature_buy_api.presentation.trade.common.OnTradeOperationFinishedListener
|
||||
|
||||
interface MercuryoSellRequestInterceptorFactory {
|
||||
fun create(
|
||||
tradeSellCallback: OnSellOrderCreatedListener,
|
||||
onTradeOperationFinishedListener: OnTradeOperationFinishedListener
|
||||
): MercuryoSellRequestInterceptor
|
||||
}
|
||||
|
||||
interface MercuryoSellRequestInterceptor : WebViewRequestInterceptor
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package io.novafoundation.nova.feature_buy_api.presentation.trade.providers
|
||||
|
||||
object ProviderUtils {
|
||||
const val REDIRECT_URL_BASE = "https://www.google.com/"
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package io.novafoundation.nova.feature_buy_api.presentation.trade.providers
|
||||
|
||||
import android.webkit.WebView
|
||||
import io.novafoundation.nova.feature_buy_api.presentation.trade.TradeTokenRegistry
|
||||
|
||||
interface WebViewIntegrationProvider : TradeTokenRegistry.Provider<WebViewIntegrationProvider.Integrator> {
|
||||
|
||||
interface Integrator : TradeTokenRegistry.Integrator<WebView>
|
||||
}
|
||||
Reference in New Issue
Block a user