Replace the JavaScript mobile app with a native Swift iOS wallet

This commit is contained in:
2026-09-19 13:33:11 +08:00
parent d80b58b704
commit 3e1a39d4d7
79 changed files with 25482 additions and 4023 deletions
+30
View File
@@ -0,0 +1,30 @@
import SwiftUI
@main
struct KoinsApp: App {
@StateObject private var model: AppModel
init() {
Secp256k1Backend.derivePrivateKey = { entropy in
KoinsSecp256k1.privateKey(fromEntropy: entropy)
}
Secp256k1Backend.publicKey = { privateKey in
KoinsSecp256k1.publicKey(fromPrivateKey: privateKey)
}
Secp256k1Backend.sign = { digest, privateKey in
KoinsSecp256k1.signDigest(digest, withPrivateKey: privateKey)
}
Secp256k1Backend.addScalar = { left, right in
KoinsSecp256k1.addScalar(left, toScalar: right)
}
_model = StateObject(wrappedValue: AppModel())
SelfTest.runIfRequested()
}
var body: some Scene {
WindowGroup {
RootView()
.environmentObject(model)
}
}
}