diff --git a/wallet_app/android/.idea/other.xml b/wallet_app/android/.idea/other.xml
index a76f1180..94c96f63 100644
--- a/wallet_app/android/.idea/other.xml
+++ b/wallet_app/android/.idea/other.xml
@@ -25,17 +25,6 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/wallet_app/android/app/src/main/AndroidManifest.xml b/wallet_app/android/app/src/main/AndroidManifest.xml
index 086875c3..24776d9a 100644
--- a/wallet_app/android/app/src/main/AndroidManifest.xml
+++ b/wallet_app/android/app/src/main/AndroidManifest.xml
@@ -43,13 +43,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wallet_app/android/app/src/main/java/com/example/walletapp/AccountInfoActivity.kt b/wallet_app/android/app/src/main/java/com/example/walletapp/AccountInfoActivity.kt
new file mode 100644
index 00000000..3a5561a9
--- /dev/null
+++ b/wallet_app/android/app/src/main/java/com/example/walletapp/AccountInfoActivity.kt
@@ -0,0 +1,364 @@
+package com.example.walletapp.ui.activity
+
+import android.app.Activity
+import android.content.Intent
+import android.os.Bundle
+import androidx.activity.ComponentActivity
+import androidx.activity.compose.setContent
+import androidx.activity.enableEdgeToEdge
+import androidx.compose.foundation.Image
+import androidx.compose.foundation.background
+import androidx.compose.foundation.border
+import androidx.compose.foundation.layout.*
+import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.material.*
+import androidx.compose.material.icons.Icons
+import androidx.compose.material.icons.filled.ArrowBack
+import androidx.compose.material.icons.filled.ArrowForward
+import androidx.compose.material.icons.filled.Refresh
+import androidx.compose.material.icons.outlined.Info
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.remember
+import androidx.compose.runtime.setValue
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.platform.LocalContext
+import androidx.compose.ui.res.painterResource
+import androidx.compose.ui.text.TextStyle
+import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.text.style.TextAlign
+import androidx.compose.ui.unit.dp
+import androidx.compose.ui.unit.sp
+import androidx.core.graphics.toColorInt
+import com.example.walletapp.CreatePinActivity
+import com.example.walletapp.ImportExistingKeyActivity
+import com.example.walletapp.R
+import com.example.walletapp.ui.theme.WalletappTheme
+import org.bouncycastle.math.raw.Mod
+
+class AccountInfoActivity : ComponentActivity() {
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ enableEdgeToEdge()
+ setContent {
+ WalletappTheme {
+ Scaffold(
+ topBar = {
+ TopAppBar(
+ backgroundColor = Color("#0C0C4F".toColorInt()),
+ contentColor = Color.White,
+ elevation = 4.dp
+ ) {
+ Row(
+ modifier = Modifier
+ .fillMaxWidth()
+ .padding(top = 32.dp, start = 16.dp, end = 16.dp),
+
+ ) {
+ Icon(
+ imageVector = Icons.Filled.ArrowBack,
+ contentDescription = "Backward Arrow",
+ modifier = Modifier.padding(start = 8.dp),
+ tint = Color.White
+ )
+ Box(
+ modifier = Modifier.fillMaxWidth(),
+ contentAlignment = Alignment.Center,
+ ) {
+
+ Text(
+ text = "Create Account",
+ color = Color.White,
+ fontSize = 20.sp
+ )
+
+ }
+
+ }
+ }
+ }
+ ) { paddingValues ->
+ Column(
+ modifier = Modifier
+ .fillMaxSize()
+ .padding(paddingValues)
+ .background(color = Color("#0C0C4F".toColorInt()))
+ .padding(top = 50.dp, start = 16.dp, end = 16.dp )
+
+ ) {
+
+ Spacer(modifier = Modifier.height(5.dp))
+ AccountInfoView()
+
+
+ }
+ }
+ }
+
+ }
+ }
+}
+
+@Composable
+fun AccountInfoView() {
+
+ val context = (LocalContext.current as Activity)
+
+ var checked by remember { mutableStateOf(true) }
+
+
+ Column (
+ verticalArrangement = Arrangement.Center,
+ modifier = Modifier.padding(16.dp)
+
+ ) {
+
+ Text(text= "Account Information", style = TextStyle(color = Color.White, fontWeight = FontWeight.ExtraBold, fontSize = 22.sp))
+ Spacer(modifier = Modifier.height(10.dp))
+ Card (
+ backgroundColor = Color("#141462".toColorInt()),
+ shape = RoundedCornerShape(size = 8.dp),
+ modifier = Modifier.fillMaxWidth()
+ .background(color = Color("#141462".toColorInt()))
+ .padding(top = 15.dp, start = 15.dp, end = 15.dp, bottom = 15.dp)
+ ) {
+ Column {
+ Row(
+ modifier = Modifier.fillMaxWidth(),
+ horizontalArrangement = Arrangement.SpaceBetween
+ ) {
+ Box(){
+ Column {
+ Text(text= "Account name", style = TextStyle(color = Color("#8D8DBB".toColorInt()), fontWeight = FontWeight.Medium, fontSize = 15.sp))
+ Spacer(modifier = Modifier.height(4.dp))
+ Text(text= "Starknet", style = TextStyle(color = Color.White, fontWeight = FontWeight.Medium, fontSize = 15.sp))
+
+ }
+ }
+
+ Box(
+ modifier = Modifier
+ .width(30.dp)
+ .height(30.dp)
+ .background(color = Color.Transparent)
+ .border(width = 1.dp, color = Color.White, shape = RoundedCornerShape(4.dp))
+ .padding(4.dp),
+ ) {
+ Image(
+ painter = painterResource(id = R.drawable.content_copy),
+ contentDescription = "Copy",
+ modifier = Modifier.size(20.dp)
+ )
+ }
+
+
+ }
+
+ Spacer(modifier = Modifier.height(30.dp))
+
+ Row(
+ modifier = Modifier.fillMaxWidth(),
+ horizontalArrangement = Arrangement.SpaceBetween
+ ) {
+ Box(){
+ Column {
+ Text(text= "Private key", style = TextStyle(color = Color("#8D8DBB".toColorInt()), fontWeight = FontWeight.Medium, fontSize = 15.sp))
+ Spacer(modifier = Modifier.height(4.dp))
+ Text(text= "q78ggh277ibckewjtnM", style = TextStyle(color = Color.White, fontWeight = FontWeight.Medium, fontSize = 15.sp))
+
+ }
+ }
+
+
+ Box(
+ modifier = Modifier
+ .width(30.dp)
+ .height(30.dp)
+ .background(color = Color.Transparent)
+ .border(width = 1.dp, color = Color.White, shape = RoundedCornerShape(4.dp))
+ .padding(4.dp),
+ ) {
+ Image(
+ painter = painterResource(id = R.drawable.content_copy),
+ contentDescription = "Copy",
+ modifier = Modifier
+ .size(20.dp)
+ )
+ }
+
+
+
+ }
+ }
+ }
+
+ Spacer(modifier = Modifier.height(30.dp))
+ Button(
+ onClick = {},
+ colors = ButtonDefaults.buttonColors(backgroundColor = Color("#1B1B76".toColorInt()), contentColor = Color.White),
+ modifier = Modifier.fillMaxWidth()
+ .background(color = Color("#141462".toColorInt()))
+ .height(51.dp)
+ .border(width = 1.dp, color = Color("#1B1B76".toColorInt()), shape = RoundedCornerShape(8.dp))
+
+ ) {
+ Row(
+ modifier = Modifier.fillMaxWidth(),
+ verticalAlignment = Alignment.CenterVertically,
+ horizontalArrangement = Arrangement.Center
+
+
+ ){
+
+ Icon(
+ imageVector = Icons.Filled.Refresh,
+ contentDescription = "Backward Arrow",
+ modifier = Modifier.padding(start = 8.dp),
+ tint = Color.White
+ )
+
+ Spacer(modifier = Modifier.width(10.dp))
+
+ Text(text = "Generate new private key", style = TextStyle(color = Color("#A3A3C1".toColorInt()), fontSize = 16.sp, fontWeight = FontWeight.Medium))
+ }
+ }
+
+
+ Spacer(modifier = Modifier.height(8.dp))
+
+
+
+ Button(
+ onClick = { val i = Intent(context, ImportExistingKeyActivity::class.java)
+ context.startActivity(i) },
+ colors = ButtonDefaults.buttonColors(backgroundColor = Color("#1B1B76".toColorInt()), contentColor = Color.White),
+ modifier = Modifier.fillMaxWidth()
+ .background(color = Color("#1B1B76".toColorInt()))
+ .height(51.dp)
+ .border(width = 1.dp, color = Color("#CBC5C5".toColorInt()), shape = RoundedCornerShape(8.dp))
+
+
+ ) {
+ Row(
+ modifier = Modifier.fillMaxWidth(),
+ verticalAlignment = Alignment.CenterVertically,
+ horizontalArrangement = Arrangement.Center
+ ){
+
+ Icon(
+ imageVector = Icons.Outlined.Info,
+ contentDescription = "Backward Arrow",
+ modifier = Modifier.padding(start = 8.dp),
+ tint = Color.White
+ )
+
+ Spacer(modifier = Modifier.width(10.dp))
+
+ Text(text = "Use existing private key", style = TextStyle(color = Color.White, fontSize = 16.sp,
+ fontWeight = FontWeight.Medium))
+ }
+ }
+
+ Spacer(modifier = Modifier.height(13.dp))
+
+ Box(
+ modifier = Modifier
+ .background(color = Color("#221451".toColorInt(), ))
+ .height(74.dp)
+ .border(width = 1.dp, color = Color("#221451".toColorInt()), shape = RoundedCornerShape(16.dp))
+ .padding(16.dp)
+
+ ){
+ Row(){
+
+
+ Icon(
+ imageVector = Icons.Outlined.Info,
+ contentDescription = "Info",
+ tint = Color("#E45F61".toColorInt())
+ )
+
+
+ Spacer(modifier = Modifier.width(10.dp))
+
+
+
+ Text(
+ text = "Store your private key securely. In case of its lost or stolen, access to funds will be lost without the possibility of recovery",
+ style = TextStyle(color = Color("#E45F61".toColorInt()), fontSize = 14.sp)
+ )
+ }
+ }
+
+
+ Spacer(modifier = Modifier.height(20.dp))
+
+
+
+ Row(
+ verticalAlignment = Alignment.CenterVertically,
+
+ ) {
+
+ Checkbox(
+ modifier = Modifier.border(width = 1.dp, color = Color("#54DC84".toColorInt()), shape = RoundedCornerShape(30.dp))
+ .height(25.dp)
+ .width(25.dp),
+ checked = checked,
+ onCheckedChange = { checked = it },
+ colors = CheckboxDefaults.colors(checkedColor = Color.Transparent, checkmarkColor = Color("#54DC84".toColorInt())),
+
+ )
+
+
+ Spacer(modifier = Modifier.width(10.dp))
+ Text(
+ "I have read the information and saved the private key",
+ style = TextStyle(color = Color.White, fontWeight = FontWeight.Medium, fontSize = 15.sp)
+ )
+ }
+
+
+ Spacer(modifier = Modifier.weight(1f))
+
+
+ Button(
+ onClick = { val i = Intent(context, CreatePinActivity::class.java)
+ context.startActivity(i) },
+ contentPadding = ButtonDefaults.ContentPadding,
+ shape = RoundedCornerShape(8.dp),
+ colors = ButtonDefaults.buttonColors(backgroundColor = Color("#EC796B".toColorInt()), contentColor = Color.White),
+ modifier = Modifier
+ .fillMaxWidth()
+ .height(49.dp)
+ ) {
+ Row(
+ verticalAlignment = Alignment.CenterVertically
+ ) {
+ Text("Continue")
+ Icon(
+ imageVector = Icons.Filled.ArrowForward,
+ contentDescription = "Forward Arrow",
+ modifier = Modifier.padding(start = 8.dp),
+ tint = Color.White
+ )
+ }
+ }
+
+
+ Spacer(modifier = Modifier.height(20.dp))
+
+
+ }
+
+}
+
+
+
+
+
+
+
diff --git a/wallet_app/android/app/src/main/java/com/example/walletapp/CreateAccountActivity.kt b/wallet_app/android/app/src/main/java/com/example/walletapp/CreateAccountActivity.kt
new file mode 100644
index 00000000..d98b5f14
--- /dev/null
+++ b/wallet_app/android/app/src/main/java/com/example/walletapp/CreateAccountActivity.kt
@@ -0,0 +1,352 @@
+package com.example.walletapp.ui.activity
+
+import android.app.Activity
+import android.content.Intent
+import android.os.Bundle
+import androidx.activity.ComponentActivity
+import androidx.activity.compose.setContent
+import androidx.activity.enableEdgeToEdge
+import androidx.compose.foundation.Image
+import androidx.compose.foundation.background
+import androidx.compose.foundation.layout.*
+import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.material.*
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.remember
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.unit.dp
+import androidx.compose.ui.unit.sp
+import androidx.core.graphics.toColorInt
+import androidx.compose.material.OutlinedTextField
+import androidx.compose.material.icons.Icons
+import androidx.compose.material.icons.filled.ArrowBack
+import androidx.compose.material.icons.filled.ArrowForward
+import androidx.compose.material.icons.filled.Refresh
+import androidx.compose.material3.ExperimentalMaterial3Api
+import androidx.compose.material3.ModalBottomSheet
+import androidx.compose.material3.SheetState
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.rememberCoroutineScope
+import androidx.compose.material3.rememberModalBottomSheetState
+import androidx.compose.runtime.setValue
+import androidx.compose.ui.platform.LocalContext
+import androidx.compose.ui.res.painterResource
+import androidx.compose.ui.text.TextStyle
+import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.text.style.TextAlign
+import com.example.walletapp.R
+import com.example.walletapp.ui.theme.WalletappTheme
+import kotlinx.coroutines.CoroutineScope
+
+class CreateAccountActivity : ComponentActivity() {
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ enableEdgeToEdge()
+ setContent {
+ WalletappTheme {
+ var progress by remember { mutableStateOf(0.5f) }
+ Scaffold(
+ topBar = {
+ TopAppBar(
+ backgroundColor = Color("#0C0C4F".toColorInt()),
+ contentColor = Color.White,
+ elevation = 4.dp
+ ) {
+ Row(
+ modifier = Modifier
+ .fillMaxWidth()
+ .padding(top = 32.dp, start = 16.dp, end = 16.dp),
+
+ ) {
+ Icon(
+ imageVector = Icons.Filled.ArrowBack,
+ contentDescription = "Backward Arrow",
+ modifier = Modifier.padding(start = 8.dp),
+ tint = Color.White
+ )
+
+ Box(
+ modifier = Modifier.fillMaxWidth(),
+ contentAlignment = Alignment.Center,
+ ) {
+
+ Text(
+ text = "Create Account",
+ color = Color.White,
+ fontSize = 20.sp
+ )
+
+ }
+
+ }
+ }
+ }
+ ) { paddingValues ->
+ Column(
+ modifier = Modifier
+ .fillMaxSize()
+ .padding(paddingValues)
+ .background(color = Color("#0C0C4F".toColorInt()))
+ .padding(top = 30.dp, start = 16.dp, end = 16.dp )
+
+ ) {
+
+ Text(
+ text = if (progress < 1.0f) "1 of 2" else "2 of 2",
+ style = TextStyle(color = Color("#EC796B".toColorInt()), fontWeight = FontWeight.ExtraBold, fontSize = 16.sp, textAlign = TextAlign.Center )
+
+ )
+
+ Spacer(modifier = Modifier.height(5.dp))
+ LinearProgressIndicator(
+ progress = progress,
+ modifier = Modifier.fillMaxWidth(),
+ color = Color("#EC796B".toColorInt())
+
+
+ )
+
+ if (progress < 1.0f) {
+ CreateWallet(
+ modifier = Modifier.padding(top = 16.dp),
+ onNext = {
+ progress = 1.0f
+ }
+ )
+ } else {
+ GenerateKey(modifier = Modifier.padding(top = 16.dp))
+ }
+
+
+ }
+ }
+ }
+ }
+ }
+}
+
+@Composable
+fun CreateWallet(modifier: Modifier = Modifier, onNext: () -> Unit) {
+ val borderColor = Color("#1B1B76".toColorInt())
+ var accountName by remember { mutableStateOf("") }
+ Column(
+ modifier = modifier
+ .fillMaxSize()
+ .background(Color("#0C0C4F".toColorInt()))
+ .padding(16.dp)
+ ) {
+
+ Box(
+ modifier = Modifier.padding(top = 5.dp, bottom = 16.dp)
+ ) {
+ Column(
+ ) {
+
+ Text(
+ text = "Create account name",
+ style = TextStyle(
+ fontWeight = FontWeight.ExtraBold,
+ fontSize = 22.sp,
+ color = Color.White,
+ )
+ )
+ Spacer(modifier = Modifier.height(16.dp))
+
+ OutlinedTextField(
+ value = accountName,
+ onValueChange = { accountName = it },
+
+ placeholder = {
+ Text(
+ "Starknet",
+ style = TextStyle(
+ color = Color.White,
+ fontSize = 16.sp,
+ fontWeight = FontWeight.Bold
+ )
+ )
+
+ },
+ modifier = Modifier
+ .fillMaxWidth()
+ .background(Color.Transparent)
+ ,
+ shape = RoundedCornerShape(8.dp),
+ colors = TextFieldDefaults.outlinedTextFieldColors(
+ backgroundColor = Color(0xFF1B1B76),
+ focusedBorderColor = borderColor,
+ textColor = Color.White,
+ unfocusedBorderColor = borderColor
+ )
+ )
+ }
+ }
+ Spacer(modifier = Modifier.height(16.dp))
+
+ Button(
+ onClick = { onNext() },
+ contentPadding = ButtonDefaults.ContentPadding,
+ shape = RoundedCornerShape(8.dp),
+ colors = ButtonDefaults.buttonColors(backgroundColor = Color("#EC796B".toColorInt()), contentColor = Color.White),
+ modifier = Modifier
+ .fillMaxWidth()
+ .height(49.dp)
+ ) {
+ Row(
+ verticalAlignment = Alignment.CenterVertically
+ ) {
+ Text("Continue")
+ Icon(
+ imageVector = Icons.Filled.ArrowForward,
+ contentDescription = "Forward Arrow",
+ modifier = Modifier.padding(start = 8.dp),
+ tint = Color.White
+ )
+ }
+ }
+ }
+}
+
+
+@OptIn(ExperimentalMaterialApi::class, ExperimentalMaterial3Api::class)
+@Composable
+fun GenerateKey(modifier: Modifier = Modifier) {
+ val scope = rememberCoroutineScope()
+ var openBottomSheet by remember { mutableStateOf(false) }
+ val sheetState = rememberModalBottomSheetState()
+ Column(
+ modifier = modifier
+ .fillMaxSize()
+ .background(Color("#0C0C4F".toColorInt()))
+
+ ) {
+ Column(
+
+ ) {
+ }
+ Box(
+ modifier = Modifier.padding(top = 16.dp, bottom = 16.dp)
+ ) {
+ Column(
+ modifier = Modifier.padding(8.dp)
+ ) {
+ Text(
+ text = "Generate private key",
+ style = TextStyle(
+ fontWeight = FontWeight.ExtraBold,
+ fontSize = 22.sp,
+ color = Color.White,
+ )
+ )
+
+ }
+ }
+ Button(
+ onClick = { openBottomSheet = true },
+ contentPadding = ButtonDefaults.ContentPadding,
+ shape = RoundedCornerShape(8.dp),
+ colors = ButtonDefaults.buttonColors(
+ backgroundColor = Color("#EC796B".toColorInt()),
+ contentColor = Color.White
+ ),
+ modifier = Modifier
+ .fillMaxWidth()
+ .height(49.dp)
+ ) {
+ Row(
+ verticalAlignment = Alignment.CenterVertically
+ ) {
+ Icon(
+ imageVector = Icons.Filled.Refresh,
+ contentDescription = "Forward Arrow",
+ modifier = Modifier.padding(start = 8.dp),
+ tint = Color.White
+ )
+ Spacer(modifier = Modifier.width(8.dp))
+ Text("Generate new private key")
+
+ }
+ }
+ }
+
+ if (openBottomSheet) {
+ GeneratekeySheet(
+ openBottomSheet = openBottomSheet,
+ onDismissRequest = { openBottomSheet = false },
+ sheetState = sheetState,
+ scope = scope
+ )
+ }
+
+
+
+}
+
+
+
+@OptIn(ExperimentalMaterialApi::class, ExperimentalMaterial3Api::class)
+@Composable
+fun GeneratekeySheet(
+ openBottomSheet: Boolean,
+ onDismissRequest: () -> Unit,
+ sheetState: SheetState ,
+ scope: CoroutineScope
+) {
+
+ val context = (LocalContext.current as Activity)
+
+ if (openBottomSheet) {
+ ModalBottomSheet(
+ onDismissRequest = onDismissRequest,
+ sheetState = sheetState,
+ containerColor = Color("#141462".toColorInt()),
+ modifier= Modifier.height(364.dp),
+
+ ) {
+ Column(
+ horizontalAlignment = Alignment.CenterHorizontally,
+ verticalArrangement = Arrangement.Center,
+ modifier = Modifier
+ .padding(16.dp)
+ .background(color = Color("#141462".toColorInt()))
+ ) {
+
+ Text( text = "Generating private key", style = TextStyle(fontWeight = FontWeight.ExtraBold, fontSize = 25.sp, textAlign = TextAlign.Center, color = Color.White))
+ Spacer(modifier = Modifier.height(8.dp))
+ Text( text = "Private key generated successfully", style = TextStyle(fontWeight = FontWeight.Medium, fontSize = 16.sp, textAlign = TextAlign.Center, color = Color("#8D8DBB".toColorInt())))
+
+ Spacer(modifier = Modifier.height(30.dp))
+
+ Image(
+ painter = painterResource(id = R.drawable.approved),
+ contentDescription = "QR Code",
+ modifier = Modifier
+ .size(93.dp)
+
+ )
+
+ Spacer(modifier = Modifier.height(40.dp))
+
+ Button(
+ onClick = { val i = Intent(context, AccountInfoActivity::class.java)
+ context.startActivity(i) },
+ contentPadding = ButtonDefaults.ContentPadding,
+ shape = RoundedCornerShape(8.dp),
+ colors = ButtonDefaults.buttonColors(backgroundColor = Color("#EC796B".toColorInt()), contentColor = Color.White),
+ modifier = Modifier
+ .fillMaxWidth()
+ .height(49.dp)
+ ) {
+ Text(text = "Continue")
+ }
+
+ }
+ }
+ }
+
+
+}
+
diff --git a/wallet_app/android/app/src/main/java/com/example/walletapp/CreatePinActivity.kt b/wallet_app/android/app/src/main/java/com/example/walletapp/CreatePinActivity.kt
new file mode 100644
index 00000000..bf262705
--- /dev/null
+++ b/wallet_app/android/app/src/main/java/com/example/walletapp/CreatePinActivity.kt
@@ -0,0 +1,265 @@
+package com.example.walletapp
+
+import android.app.Activity
+import android.content.Intent
+import android.os.Bundle
+import androidx.activity.ComponentActivity
+import androidx.activity.compose.setContent
+import androidx.activity.enableEdgeToEdge
+import androidx.compose.foundation.BorderStroke
+import androidx.compose.foundation.Image
+import androidx.compose.foundation.background
+import androidx.compose.foundation.border
+import androidx.compose.foundation.layout.*
+import androidx.compose.foundation.shape.CircleShape
+import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.material.*
+import androidx.compose.material.icons.Icons
+import androidx.compose.material.icons.filled.ArrowForward
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.remember
+import androidx.compose.runtime.rememberCoroutineScope
+import androidx.compose.runtime.setValue
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.platform.LocalContext
+import androidx.compose.ui.res.painterResource
+import androidx.compose.ui.text.TextStyle
+import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.text.style.TextAlign
+import androidx.compose.ui.unit.dp
+import androidx.compose.ui.unit.sp
+import androidx.core.graphics.toColorInt
+import com.example.walletapp.ui.activity.AccountInfoActivity
+import com.example.walletapp.ui.theme.WalletappTheme
+import kotlinx.coroutines.launch
+import kotlinx.coroutines.delay
+
+
+class CreatePinActivity : ComponentActivity() {
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ enableEdgeToEdge()
+ setContent {
+ WalletappTheme {
+ Surface(
+ modifier = Modifier.fillMaxSize()
+ .background(Color("#0C0C4F".toColorInt()))
+ .padding(20.dp)
+
+
+ ) {
+ CreatePinView(
+ modifier = Modifier
+ )
+ }
+ }
+ }
+
+ }
+}
+
+@Composable
+fun CreatePinView(modifier: Modifier = Modifier) {
+ val context = (LocalContext.current as Activity)
+ var passcode by remember { mutableStateOf("") }
+ var hiddenPasscode by remember { mutableStateOf("") }
+ val maxDigits = 6
+ val coroutineScope = rememberCoroutineScope()
+
+ Column (
+ horizontalAlignment = Alignment.CenterHorizontally,
+ modifier = Modifier
+ .background(Color("#0C0C4F".toColorInt()))
+ .padding(top = 70.dp)
+
+ ) {
+ Row(
+ modifier = Modifier.fillMaxWidth(),
+ verticalAlignment = Alignment.CenterVertically,
+ horizontalArrangement = Arrangement.Center
+ ){
+ Image(
+ painter = painterResource(id = R.drawable.starknet_icon),
+ contentDescription = "starknet",
+ modifier = Modifier
+ .size(36.dp)
+ )
+
+ Spacer(modifier = Modifier.width(10.dp))
+
+ Text(text = "Starknet Wallet", style = TextStyle(color = Color.White, fontSize = 25.sp,
+ fontWeight = FontWeight.Medium))
+ }
+
+
+ Spacer(modifier = Modifier.height(93.dp))
+
+
+
+ Text(text = "Create PIN-code", style = TextStyle(color = Color.White, fontSize = 25.sp,
+ fontWeight = FontWeight.Medium))
+ Spacer(modifier = Modifier.height(5.dp))
+
+ Text(text = "6 characters", style = TextStyle(color = Color("#A3A3C1".toColorInt()), fontSize = 13.sp,
+ fontWeight = FontWeight.Medium))
+
+
+
+
+ Spacer(modifier = Modifier.height(31.dp))
+ PasscodeCircles(passcode, hiddenPasscode, maxDigits)
+
+ Spacer(modifier = Modifier.height(48.dp))
+
+ NumericKeypad(onDigitClick = { digit ->
+ if (passcode.length < maxDigits) {
+ passcode += digit
+ hiddenPasscode += digit
+ coroutineScope.launch {
+ delay(500L)
+ hiddenPasscode = hiddenPasscode.dropLast(1) + "*"
+ }
+ }
+ }, onDeleteClick = {
+ if (passcode.isNotEmpty()) {
+ passcode = passcode.dropLast(1)
+ hiddenPasscode = hiddenPasscode.dropLast(1)
+ }
+ })
+
+
+
+
+ Spacer(modifier = Modifier.height(102.dp))
+
+ Button(
+ onClick = { val i = Intent(context, WalletActivity::class.java)
+ context.startActivity(i) },
+ contentPadding = ButtonDefaults.ContentPadding,
+ shape = RoundedCornerShape(8.dp),
+ colors = ButtonDefaults.buttonColors(backgroundColor = Color("#EC796B".toColorInt()), contentColor = Color.White),
+ modifier = Modifier
+ .fillMaxWidth()
+ .height(49.dp)
+ ) {
+ Row(
+ verticalAlignment = Alignment.CenterVertically
+ ) {
+ Text("Continue")
+ Icon(
+ imageVector = Icons.Filled.ArrowForward,
+ contentDescription = "Forward Arrow",
+ modifier = Modifier.padding(start = 8.dp),
+ tint = Color.White
+ )
+ }
+ }
+
+ }
+
+
+
+
+
+}
+
+
+@Composable
+fun PasscodeCircles(passcode: String, hiddenPasscode: String, maxDigits: Int) {
+ Row(
+ modifier = Modifier
+ .width(160.dp),
+ horizontalArrangement = Arrangement.SpaceEvenly
+ ) {
+ for (i in 0 until maxDigits) {
+ val isFilled = i < passcode.length
+ Box(
+ modifier = Modifier
+ .size(20.dp)
+ .border(BorderStroke(2.dp, Color("#A3A3C1".toColorInt())), CircleShape)
+ .background(
+ if (isFilled) Color("#A3A3C1".toColorInt()) else Color.Transparent,
+ CircleShape
+ ),
+ contentAlignment = Alignment.Center
+ ) {
+ if (i < hiddenPasscode.length && hiddenPasscode[i] != '*') {
+ Text(
+ text = hiddenPasscode[i].toString(),
+ color = Color.White,
+ fontWeight = FontWeight.ExtraBold,
+ fontSize = 12.sp,
+ textAlign = TextAlign.Center
+ )
+ }
+ }
+ }
+ }
+}
+
+
+@Composable
+fun NumericKeypad(onDigitClick: (String) -> Unit, onDeleteClick: () -> Unit) {
+ Column {
+ for (row in listOf(listOf("1", "2", "3"), listOf("4", "5", "6"), listOf("7", "8", "9"))) {
+ Row(
+ modifier = Modifier.fillMaxWidth(),
+ horizontalArrangement = Arrangement.SpaceEvenly
+ ) {
+ for (digit in row) {
+ KeypadButton(digit) {
+ onDigitClick(digit)
+ }
+ }
+
+ }
+ Spacer(modifier = Modifier.height(16.dp))
+
+ }
+ Row(
+ modifier = Modifier.fillMaxWidth(),
+ horizontalArrangement = Arrangement.SpaceEvenly
+ ) {
+ KeypadButton(".") {
+ onDigitClick(".")
+ }
+
+ KeypadButton("0") {
+ onDigitClick("0")
+ }
+ KeypadButton("⌫") {
+ onDeleteClick()
+ }
+ }
+ }
+}
+
+
+@Composable
+fun KeypadButton(text: String, onClick: () -> Unit) {
+ Button(
+ onClick = onClick,
+ colors = ButtonDefaults.buttonColors(backgroundColor = Color("#1B1B76".toColorInt()), contentColor = Color.White),
+ shape = CircleShape,
+ modifier = Modifier
+ .size(50.dp)
+
+ ) {
+ Text(
+ text = text,
+ fontSize = 25.sp,
+ fontWeight = FontWeight.Bold
+ )
+ }
+}
+
+
+
+
+
+
+
diff --git a/wallet_app/android/app/src/main/java/com/example/walletapp/ImportExistingKeyActivity.kt b/wallet_app/android/app/src/main/java/com/example/walletapp/ImportExistingKeyActivity.kt
new file mode 100644
index 00000000..f3c05512
--- /dev/null
+++ b/wallet_app/android/app/src/main/java/com/example/walletapp/ImportExistingKeyActivity.kt
@@ -0,0 +1,380 @@
+package com.example.walletapp
+import android.app.Activity
+import android.content.Intent
+import android.os.Bundle
+import androidx.activity.ComponentActivity
+import androidx.activity.compose.setContent
+import androidx.activity.enableEdgeToEdge
+import androidx.compose.foundation.Image
+import androidx.compose.foundation.background
+import androidx.compose.foundation.layout.*
+import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.material.*
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.remember
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.unit.dp
+import androidx.compose.ui.unit.sp
+import androidx.core.graphics.toColorInt
+import androidx.compose.material.OutlinedTextField
+import androidx.compose.material.icons.Icons
+import androidx.compose.material.icons.filled.ArrowBack
+import androidx.compose.material.icons.filled.ArrowForward
+import androidx.compose.material3.ExperimentalMaterial3Api
+import androidx.compose.material3.ModalBottomSheet
+import androidx.compose.material3.SheetState
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.rememberCoroutineScope
+import androidx.compose.material3.rememberModalBottomSheetState
+import androidx.compose.runtime.setValue
+import androidx.compose.ui.platform.LocalContext
+import androidx.compose.ui.res.painterResource
+import androidx.compose.ui.text.TextStyle
+import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.text.style.TextAlign
+import com.example.walletapp.R
+import com.example.walletapp.ui.theme.WalletappTheme
+import kotlinx.coroutines.CoroutineScope
+
+class ImportExistingKeyActivity : ComponentActivity() {
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ enableEdgeToEdge()
+ setContent {
+ WalletappTheme {
+ var progress by remember { mutableStateOf(0.5f) }
+ Scaffold(
+ topBar = {
+ TopAppBar(
+ backgroundColor = Color("#0C0C4F".toColorInt()),
+ contentColor = Color.White,
+ elevation = 4.dp
+ ) {
+ Row(
+ modifier = Modifier
+ .fillMaxWidth()
+ .padding(top = 32.dp, start = 16.dp, end = 16.dp),
+
+ ) {
+ Icon(
+ imageVector = Icons.Filled.ArrowBack,
+ contentDescription = "Backward Arrow",
+ modifier = Modifier.padding(start = 8.dp),
+ tint = Color.White
+ )
+
+ Box(
+ modifier = Modifier.fillMaxWidth(),
+ contentAlignment = Alignment.Center,
+ ) {
+
+ Text(
+ text = "Import existing wallet",
+ color = Color.White,
+ fontSize = 20.sp
+ )
+
+ }
+
+ }
+ }
+ }
+ ) { paddingValues ->
+ Column(
+ modifier = Modifier
+ .fillMaxSize()
+ .padding(paddingValues)
+ .background(color = Color("#0C0C4F".toColorInt()))
+ .padding(top = 30.dp, start = 16.dp, end = 16.dp )
+
+ ) {
+
+ Text(
+ text = if (progress < 1.0f) "1 of 2" else "2 of 2",
+ style = TextStyle(color = Color("#EC796B".toColorInt()), fontWeight = FontWeight.ExtraBold, fontSize = 16.sp, textAlign = TextAlign.Center )
+
+ )
+
+ Spacer(modifier = Modifier.height(5.dp))
+ LinearProgressIndicator(
+ progress = progress,
+ modifier = Modifier.fillMaxWidth(),
+ color = Color("#EC796B".toColorInt())
+
+
+ )
+
+ if (progress < 1.0f) {
+ PrivateKeyView(
+ modifier = Modifier.padding(top = 16.dp),
+ onNext = {
+ progress = 1.0f
+ }
+ )
+ } else {
+ CreateNameView(modifier = Modifier.padding(top = 16.dp))
+ }
+
+
+ }
+ }
+ }
+ }
+ }
+}
+
+@OptIn(ExperimentalMaterialApi::class, ExperimentalMaterial3Api::class)
+
+@Composable
+fun PrivateKeyView(modifier: Modifier = Modifier, onNext: () -> Unit) {
+ val borderColor = Color("#1B1B76".toColorInt())
+ var accountName by remember { mutableStateOf("") }
+ val scope = rememberCoroutineScope()
+ var openBottomSheet by remember { mutableStateOf(false) }
+ val sheetState = rememberModalBottomSheetState()
+
+ Column(
+ modifier = modifier
+ .fillMaxSize()
+ .background(Color("#0C0C4F".toColorInt()))
+ .padding(16.dp)
+ ) {
+ Box(
+ modifier = Modifier.padding(top = 5.dp, bottom = 16.dp)
+ ) {
+ Column {
+ Text(
+ text = "Private key information",
+ style = TextStyle(
+ fontWeight = FontWeight.ExtraBold,
+ fontSize = 22.sp,
+ color = Color.White,
+ )
+ )
+ Spacer(modifier = Modifier.height(16.dp))
+
+ OutlinedTextField(
+ value = accountName,
+ onValueChange = { accountName = it },
+ placeholder = {
+ Text(
+ "Enter private key",
+ style = TextStyle(
+ color = Color.White,
+ fontSize = 16.sp,
+ fontWeight = FontWeight.Bold
+ )
+ )
+ },
+ modifier = Modifier
+ .fillMaxWidth()
+ .background(Color.Transparent),
+ shape = RoundedCornerShape(8.dp),
+ colors = TextFieldDefaults.outlinedTextFieldColors(
+ backgroundColor = Color(0xFF1B1B76),
+ focusedBorderColor = borderColor,
+ textColor = Color.White,
+ unfocusedBorderColor = borderColor
+ )
+ )
+ }
+ }
+
+ Spacer(modifier = Modifier.weight(1f))
+
+ Button(
+ onClick = { openBottomSheet = true },
+ contentPadding = ButtonDefaults.ContentPadding,
+ shape = RoundedCornerShape(8.dp),
+ colors = ButtonDefaults.buttonColors(backgroundColor = Color("#EC796B".toColorInt()), contentColor = Color.White),
+ modifier = Modifier
+ .fillMaxWidth()
+ .height(49.dp)
+ ) {
+ Row(verticalAlignment = Alignment.CenterVertically) {
+ Text("Import")
+ Icon(
+ imageVector = Icons.Filled.ArrowForward,
+ contentDescription = "Forward Arrow",
+ modifier = Modifier.padding(start = 8.dp),
+ tint = Color.White
+ )
+ }
+ }
+
+
+ Spacer(modifier = Modifier.height(20.dp))
+
+
+
+ if (openBottomSheet) {
+ ConfirmSheet(
+ onNext = onNext,
+ openBottomSheet = openBottomSheet,
+ onDismissRequest = { openBottomSheet = false },
+ sheetState = sheetState,
+ scope = scope
+ )
+ }
+ }
+}
+
+
+
+@OptIn(ExperimentalMaterialApi::class, ExperimentalMaterial3Api::class)
+@Composable
+fun CreateNameView(modifier: Modifier = Modifier) {
+ val borderColor = Color("#1B1B76".toColorInt())
+ var accountName by remember { mutableStateOf("") }
+ val context = (LocalContext.current as Activity)
+
+ Column(
+ modifier = modifier
+ .fillMaxSize()
+ .background(Color("#0C0C4F".toColorInt()))
+
+ ) {
+ Column {
+ Text(
+ text = "Create account name",
+ style = TextStyle(
+ fontWeight = FontWeight.ExtraBold,
+ fontSize = 22.sp,
+ color = Color.White,
+ )
+ )
+ Spacer(modifier = Modifier.height(16.dp))
+
+ OutlinedTextField(
+ value = accountName,
+ onValueChange = { accountName = it },
+ placeholder = {
+ Text(
+ "Enter account name",
+ style = TextStyle(
+ color = Color.White,
+ fontSize = 16.sp,
+ fontWeight = FontWeight.Bold
+ )
+ )
+ },
+ modifier = Modifier
+ .fillMaxWidth()
+ .background(Color.Transparent),
+ shape = RoundedCornerShape(8.dp),
+ colors = TextFieldDefaults.outlinedTextFieldColors(
+ backgroundColor = Color(0xFF1B1B76),
+ textColor = Color.White,
+ focusedBorderColor = borderColor,
+ unfocusedBorderColor = borderColor
+ )
+ )
+ }
+
+
+
+
+
+ Spacer(modifier = Modifier.weight(1f))
+
+ Button(
+ onClick = { val i = Intent(context, CreatePinActivity::class.java)
+ context.startActivity(i) },
+ contentPadding = ButtonDefaults.ContentPadding,
+ shape = RoundedCornerShape(8.dp),
+ colors = ButtonDefaults.buttonColors(
+ backgroundColor = Color("#EC796B".toColorInt()),
+ contentColor = Color.White
+ ),
+ modifier = Modifier
+ .fillMaxWidth()
+ .height(49.dp)
+ ) {
+ Row(
+ verticalAlignment = Alignment.CenterVertically
+ ) {
+ Spacer(modifier = Modifier.width(8.dp))
+ Text("Continue")
+
+ Icon(
+ imageVector = Icons.Filled.ArrowForward,
+ contentDescription = "Forward Arrow",
+ modifier = Modifier.padding(start = 8.dp),
+ tint = Color.White
+ )
+
+
+ }
+ }
+
+ Spacer(modifier = Modifier.height(20.dp))
+
+ }
+
+}
+
+
+@OptIn(ExperimentalMaterialApi::class, ExperimentalMaterial3Api::class)
+@Composable
+fun ConfirmSheet(
+ onNext: () -> Unit,
+ openBottomSheet: Boolean,
+ onDismissRequest: () -> Unit,
+ sheetState: SheetState ,
+ scope: CoroutineScope
+) {
+
+ if (openBottomSheet) {
+ ModalBottomSheet(
+ onDismissRequest = onDismissRequest,
+ sheetState = sheetState,
+ containerColor = Color("#141462".toColorInt()),
+ modifier= Modifier.height(364.dp),
+
+ ) {
+ Column(
+ horizontalAlignment = Alignment.CenterHorizontally,
+ verticalArrangement = Arrangement.Center,
+ modifier = Modifier
+ .padding(16.dp)
+ .background(color = Color("#141462".toColorInt()))
+ ) {
+
+ Text( text = "Generating private key", style = TextStyle(fontWeight = FontWeight.ExtraBold, fontSize = 25.sp, textAlign = TextAlign.Center, color = Color.White))
+ Spacer(modifier = Modifier.height(8.dp))
+ Text( text = "Private key generated successfully", style = TextStyle(fontWeight = FontWeight.Medium, fontSize = 16.sp, textAlign = TextAlign.Center, color = Color("#8D8DBB".toColorInt())))
+
+ Spacer(modifier = Modifier.height(30.dp))
+
+ Image(
+ painter = painterResource(id = R.drawable.approved),
+ contentDescription = "QR Code",
+ modifier = Modifier
+ .size(93.dp)
+
+ )
+
+ Spacer(modifier = Modifier.height(40.dp))
+
+ Button(
+ onClick = { onNext() },
+ contentPadding = ButtonDefaults.ContentPadding,
+ shape = RoundedCornerShape(8.dp),
+ colors = ButtonDefaults.buttonColors(backgroundColor = Color("#EC796B".toColorInt()), contentColor = Color.White),
+ modifier = Modifier
+ .fillMaxWidth()
+ .height(49.dp)
+ ) {
+ Text(text = "Continue")
+ }
+
+ }
+ }
+ }
+
+
+}
+
diff --git a/wallet_app/android/app/src/main/java/com/example/walletapp/MainActivity.kt b/wallet_app/android/app/src/main/java/com/example/walletapp/MainActivity.kt
index b52dd6dd..077151a9 100644
--- a/wallet_app/android/app/src/main/java/com/example/walletapp/MainActivity.kt
+++ b/wallet_app/android/app/src/main/java/com/example/walletapp/MainActivity.kt
@@ -35,8 +35,8 @@ import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.core.graphics.toColorInt
import androidx.core.view.WindowCompat
+import com.example.walletapp.ui.activity.CreateAccountActivity
import com.example.walletapp.ui.theme.WalletappTheme
-
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
@@ -97,7 +97,7 @@ fun CreateAccount( modifier: Modifier) {
verticalArrangement = Arrangement.spacedBy(8.dp) // Adjust space between buttons
) {
Button(
- onClick = { val i = Intent(context, AccountPasswordActivity::class.java)
+ onClick = { val i = Intent(context, CreateAccountActivity::class.java)
context.startActivity(i) },
colors = ButtonDefaults.buttonColors(backgroundColor = Color("#1B1B76".toColorInt())),
shape = RoundedCornerShape(10.dp),
@@ -117,7 +117,7 @@ fun CreateAccount( modifier: Modifier) {
Button(
- onClick = { val i = Intent(context, RecoveryPhraseActivity::class.java)
+ onClick = { val i = Intent(context, ImportExistingKeyActivity::class.java)
context.startActivity(i) },
colors = ButtonDefaults.buttonColors(backgroundColor = Color("#EC796B".toColorInt())),
shape = RoundedCornerShape(10.dp),
diff --git a/wallet_app/android/app/src/main/res/drawable/approved.png b/wallet_app/android/app/src/main/res/drawable/approved.png
new file mode 100644
index 00000000..524703a6
Binary files /dev/null and b/wallet_app/android/app/src/main/res/drawable/approved.png differ
diff --git a/wallet_app/android/app/src/main/res/drawable/content_copy.png b/wallet_app/android/app/src/main/res/drawable/content_copy.png
new file mode 100644
index 00000000..bce14f0a
Binary files /dev/null and b/wallet_app/android/app/src/main/res/drawable/content_copy.png differ