A multi-purpose Bitcoin Wallet

Overview

STACKMATE

A multi-purpose Bitcoin Wallet


Table of Contents

Core

This app uses stackmate-core for it's Bitcoin specific logic.
stackmate-core is built using Rust.
This app communicates with stackmate-core's Rust binary via FFI.

Features

  • modern descriptor wallets: uses all the latest technologies from the Bitcoin ecosystem
  • address book: store and organise public descriptors
  • calculator: calculate current exchange rates with our built-in calculator
  • cross platform: built using Flutter πŸ’™ and Rust

Getting Started


Flutter Development

Make sure Flutter and Dart are installed.

flutter pub get
flutter run

Run freezed code-gen while updating cubit state classes or model classes.

flutter pub run build_runner watch --delete-conflicting-outputs

VSCode Explorer

Visibility of files and folders can be toggled from

.vscode/
    └── settings.json 

Exchange Rates API

The coincap API is currently implemented for calculating exchange rates.
Request an API Key from coincap and update the _apiKey in

lib/
└── api/
    └── rates.dart

Updating stackmate-core

Optional Advanced Usage
Make sure Rust and Android NDK are installed.

cd packages/bitcoin
sh update-core.sh


Maintainers

Morteza

Vishal

License

MIT

Comments
  • New SQLite Backend + 24 Word Seed Option

    New SQLite Backend + 24 Word Seed Option

    Added new SQLite backend from stackmate-core 0.12.2 release.

    Affects the following cubits:

    • info
    • receive
    • send

    Receive uses both Sqlite and MemoryDb. Memory Db is used to manually increment indexes while SQLite loads LastUnusedAddress.

    This update results in a significant speed improvement since network sync keeps track of last_synced_block in SQLite.

    Pending: SQLite db file encryption.

    AFAIK Android uses a permissions folder to store the sqlite db, which other apps cannot access. This raises the questions about how necessary encrypting the db file is. More research needs to be done on this.

    Please extensively test this update as SQLite implementation is still in BETA.

    enhancement 
    opened by i5hi 8
  • iOS support

    iOS support

    Hey @i5hi, I have made some changes for iOS support. Most things seem to work fine. However there are some issues which we can fix in this PR itself.

    1. '.a' files generated by stackmate-core doesn't seem to work with emulator on m1. For this, we either have to run Xcode using rosetta or generate .a file with target set to aarch64-apple-ios-sim.
    2. dummyMethodToEnforceBundling in swift file seems to have derive_hardened and days_to_blocks methods but can't find the same in stackmate-core. So, it throws an error. I've commented these for now.
    3. Tor package not working. So, we might have to disable it for iOS.
    4. There was some file size issue while pushing to Github. So, I've removed it for now. We can add it using update-core.sh.
    opened by MrUnfunny 7
  • /lib/x86_64/libtor.so: open failed: EACCES (Permission denied)

    /lib/x86_64/libtor.so: open failed: EACCES (Permission denied)

    Hi, I am trying to start to on android using UtopicTorOnionProxy.startTor() and I am getting this error. Is there anything I need to do E/TorNativeLoader(18204): /data/app/~~5LvdEY2hDiPfuUNCXqT2LA==/{my package}-D4ocGlpeQc13AFEzgJUvjw==/lib/x86_64/libtor.so: open failed: EACCES (Permission denied) D/CompatibilityChangeReporter(18204): Compat change id reported: 147798919; UID 10183; state: ENABLED W/TorInstaller(18204): Failed to setup tor. No tor executable installed W/System.err(18204): java.io.IOException: Failed to Failed to setup tor. No tor executable installed W/System.err(18204): at ru.utopicnarwhal.utopic_tor_onion_proxy.thali_sources.android.AndroidTorInstaller.setup(AndroidTorInstaller.java:90) W/System.err(18204): at ru.utopicnarwhal.utopic_tor_onion_proxy.thali_sources.OnionProxyManager.setup(OnionProxyManager.java:611) W/System.err(18204): at ru.utopicnarwhal.utopic_tor_onion_proxy.UtopicTorOnionProxyPlugin.startTor(UtopicTorOnionProxyPlugin.java:125) W/System.err(18204): at ru.utopicnarwhal.utopic_tor_onion_proxy.UtopicTorOnionProxyPlugin.onMethodCall(UtopicTorOnionProxyPlugin.java:98) W/System.err(18204): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262) W/System.err(18204): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295) W/System.err(18204): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319) W/System.err(18204): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12) W/System.err(18204): at android.os.Handler.handleCallback(Handler.java:938) W/System.err(18204): at android.os.Handler.dispatchMessage(Handler.java:99) W/System.err(18204): at android.os.Looper.loopOnce(Looper.java:201) W/System.err(18204): at android.os.Looper.loop(Looper.java:288) W/System.err(18204): at android.app.ActivityThread.main(ActivityThread.java:7842) W/System.err(18204): at java.lang.reflect.Method.invoke(Native Method) W/System.err(18204): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) W/System.err(18204): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003) I/flutter (18204): type 'String' is not a subtype of type 'StackTrace' in type cast

    Regards. AG

    question 
    opened by ag-0214 7
  • Select network fee error

    Select network fee error

    I am trying to use your wallet, I have 100000 Sats in my wallet now when I try to send 50000 sats to another wallet, when it gets to the stage of selecting network fee it gives the following error. If I click back the where I to the screen I entered amount it will display message instance of SMError . For smaller amounts like 50 sats it doesnt give an error but there ont be any fee to select so cant proceed

    [log] 'package:flutter/src/material/slider.dart': Failed assertion: line 147 pos 15: 'value >= min && value <= max': is not true. #0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61) #1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5) #2 new Slider (package:flutter/src/material/slider.dart:147:15) #3 _SelectFeeState.build (package:sats/ui/component/Send/SelectFee.dart:118:13) #4 StatefulElement.build (package:flutter/src/widgets/framework.dart:4919:27) #5 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4806:15) #6 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4977:11) #7 Element.rebuild (package:flutter/src/widgets/framework.dart:4529:5) #8 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2659:19) #9 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:891:21) #10 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:370:5) #11 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1146:15) #12 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1083:9) #13 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:997:5) #14 _rootRun (dart:async/zone.dart:1426:13) #15 _CustomZone.run (dart:async/zone.dart:1328:19) #16 _CustomZone.runGuarded (dart:async/zone.dart:1236:7) #17 _invoke (dart:ui/hooks.dart:151:10) #18 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:308:5) #19 _drawFrame (dart:ui/hooks.dart:115:31) regards AG

    bug 
    opened by ag-0214 5
  • All keys don't work for Taproot derive

    All keys don't work for Taproot derive

    Not all keys work for taproot derive.

    There is a 50-50% chance your derived taproot wallet will not work because the corresponding pubkey is not an XOnlyPubKey.

    This might also create issues for cypherpost since cypherpost also uses Schnorr XOnlyPubkeys so we need to make sure that all keys derived from the master are always XOnlyPubkeys.

    bug 
    opened by i5hi 4
  • Send Amount Bug

    Send Amount Bug

    Send amount BTC value doesn't update after 3 digits of sats value is entered. For example while typing 50,090 sats

    Upto 500 the BTC value reflects as 0.00000500 then when we type the 4th digit 9, the BTC value resets to 0.00000000

    opened by i5hi 3
  • Wallet remodel

    Wallet remodel

    Stripped down the app into a single sig descriptor wallet.

    Remodelled wallet to support saving wallet creation state and Partial/Complete states for script wallets.

    Maintained reddit fix from previous commit to master.

    Updated a few ffi outputs to support new api. Few fixes still required here. Mainly with build_tx: new input called txOutputs which is a dart List<txOutput> stringified. It supports batch transactions rather than single address amount field. Where address and amount is read from a user, a txOutput {address:String,amount:int} must be constructed. User should be able to add more outputs. The array of List<txOutput>.

    opened by i5hi 3
  • Changing to testnet bug

    Changing to testnet bug

    Changing from mainnet to testnet from settings

    • Toggle to testnet does not check for master key and errors.
    • if there is no master key/wallets for testnet,it throws an error on homepage
    bug 
    opened by yashwanthambati 2
  • Bump to v0.0.14

    Bump to v0.0.14

    This update brings the following new changes:

    TOR

    • User does not have to wait for Tor to load to enter the wallet and generate addresses (offline operations). Online operations will not work as a default socks5 proxy value is used with libstackmate which will lead to an error.
    • Tor now has a dedicated configuration page
    • Users can not use an external Tor instance
    • Users can not opt out of Tor (although Tor is default)

    TAPROOT

    • Users can derive a taproot account

    COLDCARD

    • End to end support for ColdCard Air Gapped Operation
    • Supports file system operations for reading generic.json to create watch only wallet,writing .psbt, and reading .tx file to broadcast transaction hex

    BACKUP LATER

    • Users can backup their wallet (write down their seed words and passphrase) later. This allows them to wait to be in a safe space to backup their wallet, for cases when they want to receive bitcoin immediately after on-boarding./

    SINGLE MASTER KEY WALLET

    • Users can now only manage a single master key wallet from which they can derive a segwit or taproot account.
    • They will later be able to derive multi-sig accounts from the same master key.
    • Users cannot import multiple seeds anymore.

    GENERAL STABILITY

    • The wallet is now stable for the most part with a few minor known bugs.

    KNOWN BUGS

    • RECEIVE rotates addresses everytime clicked.

    This can lead to unnecessary address index rotation and lead to a messy wallet.

    If users create large enough gaps between addresses that receive funds, this could lead to errors in wallet sync. This can be fixed by updating libstackmate to use a larger wallet stop gap, however this comes at the cost of longer sync time. This is not the best approach. We need to figure out how to effectively manage unused addresses and prevent large gaps.

    Another alternative is to save a list of all addresses ever generated by the wallet, so users can reuse addresses that they have not used before.

    enhancement 
    opened by i5hi 2
  • Allow user to backup key later

    Allow user to backup key later

    Allow users to write down seed phrase later.

    This makes onboarding someone at a social event easier.

    Show a warning on the homepage if backup is not made.

    Store seed phrase backup in MasterKey model.

    Make warnings more severe if wallet balance gets above certain amounts and backup is still not made.

    enhancement 
    opened by i5hi 2
  • Merging Updates to Single Sig wallet only with Tor by Default

    Merging Updates to Single Sig wallet only with Tor by Default

    v 0.0.10 corrects various minor bugs and strips down the app into only a single signature descriptor wallet with the ability to recover and create new signers or watchers.

    It also now uses tor by default and as a result android only until libstackmate provides a cross compatible tor daemon.

    Other feature additions include:

    • incognito mode
    • sats/btc unit selector (still needs to update in TransactionItemDetail popup)
    • Global PSBT broadcaster
    • Ability for Watcher wallets to build a PSBT for an external signer.

    Some known bugs:

    • Buttons can be janky and unresponsive in certain sections like Wallet recovery and SEND.
    • A particular case was found where change was not being picked up by the wallet. This is an issue with libstackmate. TESTERS should always verify balances and history after a TX to see if this bug appears again.
    • Since we use bdk's memory database, sync happens before every api that requires a network call i.e. balance, history and build.
    • Fee estimator is very naive (allows fall back into user set rates)
    enhancement frontend 
    opened by i5hi 2
  • Tor update

    Tor update

    Allow users to more easily toggle tor off on the Home Screen.

    When Tor is disabled, change the shield to Yellow colour rather than Red. This is because Tor off is not necessarily an error. A user might have a safe node setup over clearnet.

    Red colour should be reserved for Disconnected while Tor is enabled.

    opened by i5hi 0
  • Low fees returns weird error

    Low fees returns weird error

    When using lowest fee option in some cases, the transaction fails at the broadcast stage with a weird error.

    Will add the exact error message here when I am able to test again.

    This particular error has to be translated to "Use higher fee"

    opened by i5hi 0
  • Create screens for cypherpost

    Create screens for cypherpost

    Following screens are. required:

    • [ ] NetworksHome: List of joined networks and link to Join new network.
    • [ ] NetworkJoin: Form to register to a network
    • [ ] NetworkSingle: Contains menu for Info & Discover + List of counterParties with whom user has chatHistory
    • [ ] Chat: A Chat with a single counterParty
    • [ ] NetworkDiscover: List of all existing counterParties(members) on a network.
    • [ ] MyNetworkInfo: Info about the user on a network
    frontend 
    opened by i5hi 1
Owner
Stackmate Network
Components of stackmate bitcoin services
Stackmate Network
Bitcoin Ticker App which will fetch you the real time Bitcoin exchange values written in Dart & Flutter

About This project is written completely in Dart & Flutter. The app will basically provide you the real time value of three major cryptocurrencies nam

null 0 Dec 21, 2021
Flutter Wallet - Beautiful Wallet flutter πŸ’³

wallet A new Flutter project Wallt UI Use this source code in your project with animation Rate me ⭐ Thank you ☺ Platform Android βœ”οΈ Ios βœ”οΈ Preview Dev

Amirziya 17 Dec 14, 2022
Shacoin-wallet - A flutter wallet app for shacoin

SHACOIN Mobile app for storing your shacoins Β· Report Bug Β· Request Feature Tabl

batuhan demircan 0 Jan 7, 2022
This is an on-chain(truffle) ETH wallet with traditional crypto wallet features

This is an on-chain(truffle) ETH wallet with traditional crypto wallet features (including live ETH price display). I enjoyed playing with emojis in this one ??

Chinyeaka Chinonso 15 Dec 7, 2022
An application to track bitcoin prices around the world.

![App Brewery Banner](https://github.com/londonappbrewery/Images/blob/master/AppBreweryBanner.png) # Bitcoin Ticker ?? ## Our Goal The object

Aryaman Prakash 1 Jan 7, 2022
A WebLN interface for creating Bitcoin Lightning powered web applications.

A package that helps you to interact with WebLN providers by providing a FlutterWebln interface for creating Bitcoin Lightning powered web application

Aniket Ambore 2 Sep 19, 2022
An open source flutter ride-hailing app for learning purpose(Provider & Bloc)

citycab An open source ride hailing app with flutter. Getting Started This project is a starting point for a Flutter application. A few resources to g

Paul Edeme'kong - Flutter Fairy 94 Jan 2, 2023
Purpose of this project is to create extendable architecture of making platform aware Widgets which automatically select platform specific implementation

Old good factory Main obstacle in creating native experience on Flutter is the fact that you are asked to rebuild two layouts using platform specific

Swav Kulinski (Robotoaster) 101 Oct 14, 2022
Flutter Developers may add themselves to this app for the purpose of showcasing their work

Flutter Developers may add themselves to this app for the purpose of showcasing their work

Luke Pighetti 129 Dec 6, 2022
Flutter-Apps-Collection: a collection of apps made in flutter for learning purpose

Flutter-Apps-Collection This is a repository of a collection of apps made in flutter for learning purpose Some Screenshots . . . Apps build in Flutter

Himanshu Singh 96 May 27, 2022
A mobile application for both android and ios made for work out and fitness purpose

It's a mobile application for both android and ios made for work out and fitness purpose with many features you can read about here, but it can be used under all subject you want, well architected code and organized !

Gwhyyy 20 Dec 18, 2022
The purpose of this project was to test Google Map Services in connection with Flutter on Android, iOS

A large variety of apps depend on map services. The purpose of this project was to test Google Map Services in connection with Flutter on Android, iOS and Web platforms. Here is what I got:

Derek Jones 15 Oct 17, 2022
A 3rd party wallet for zenon.network

Notes Please don't use your main seed while testing until Cano is fully audited by the community Click Create Wallet to generate Prerequisites Flutter

Cano Wallet 10 Oct 26, 2022
Wallet app built in flutter

flutter_wallet_app Smart course app is a design implementaion of Wallet App designed by Muhammad Abdull Download App Android Screenshots HomePage Tran

Sonu Sharma 291 Dec 24, 2022
Opensource Wallet & Explorer by joinseeds.com

seeds_light_wallet Opensource Wallet & Explorer by joinseeds.com A payment platform and financial ecosystem to empower humanity and heal our planet Ge

SEEDS - Conscious Currency | Regenerative Civilization 39 Dec 30, 2022
A reference credential wallet built on Flutter and DIDKit.

Check out the Credible documentation here. Credible Credible is a native mobile wallet that supports W3C Verifiable Credentials and Decentralized Iden

Spruce Systems, Inc. 31 Nov 7, 2022
Wallet for Peercoin and Peercoin Testnet written in Flutter

peercoin_flutter Wallet for Peercoin and Peercoin Testnet using Electrumx as backend. App in constant development Basic testing successfull on iOS 14.

Peercoin project 21 Oct 25, 2022