forked from StackmateNetwork/the-stackmate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request StackmateNetwork#37 from StackmateNetwork/dev
Merging Updates to Single Sig wallet only with Tor by Default
- Loading branch information
Showing
230 changed files
with
8,712 additions
and
8,260 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# stackmate | ||
|
||
stackmate is a bitcoin descriptor wallet made by bitcoiners for everyone. | ||
|
||
within open source wallet software research & development, stackmate finds its place through a primary focus on simplicity.. | ||
|
||
simplicity here is for: | ||
|
||
- users: through friendly application interface design; users have an intuitive experience with money. | ||
- developers: through use of simple, tried and tested coding patterns and practices; devs find it easy to understand and | ||
contribute to the project. | ||
|
||
# features | ||
|
||
## Single Signature Wallets | ||
|
||
The entry point into bitcoin is the single signature wallet. | ||
|
||
stackmate provides the classic interface that we all know and love. | ||
|
||
stackmate provides a helpful recovery tool that supports recovery from: | ||
|
||
- descriptors | ||
- extended keys | ||
- mnemonics | ||
|
||
stackmate supports other handy features such as rbf and batch send. | ||
|
||
stackmate also supports watch-only wallets (cold card pair). | ||
|
||
## Broadcaster | ||
|
||
stackmate supports broadcasting psbt's as a standalone tool (cold card pair). | ||
|
||
## Electrum Backend | ||
|
||
stackmate requires an electrum backend to interact with the bitcoin network. | ||
|
||
stackmate allows users to use their own node or defaults to blockstream. | ||
|
||
## Tor | ||
|
||
stackmate comes bundled with tor for network level privacy. | ||
|
||
This is especially important if you are not using your own node.. | ||
|
||
## Script Signature Wallets | ||
|
||
stackmate supports the creation and complete management of 3 types of bitcoin scripts: | ||
|
||
1. Inheritance: 1/2 w/timelocked | ||
2. Escrow: 2/3 multisig | ||
3. Team: n/7 multisig | ||
|
||
### Script Recovery | ||
|
||
It is also possible to recover arbitraty scripts, as long as they are in the descriptor format. Additionally, to move funds | ||
out of such a wallet all the minimum private keys will need to be present - either within the descriptor or imported in | ||
addition to the descriptor. | ||
|
||
## E2EE Comms | ||
|
||
script wallets that involve more than one party have always faced a problem with synchronization. | ||
|
||
Synchronization is primarily required for two operational processes: | ||
|
||
1. Wallet Creation: | ||
|
||
All parties must submit their portion of the script, usually their public keys, and agree on the final definition of the | ||
script. | ||
|
||
2. Transaction: | ||
|
||
To make a transaction, all the required members must present their portion of the script satisfied, usually done by | ||
passing a psbt for successive signatures until it is finalized; after which it can be broadcasted. | ||
|
||
stackmate facilitates sync for the above two process by providing an e2ee message posting service (cypherpost) which will | ||
allow parties in a script to easily share wallet data and stay in sync with each other. | ||
|
||
For natively created scripts, all script wallets have their own respective cypherpost group chat. | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Privacy Policy | ||
|
||
Stackmate is designed to maximize self-sovereignty and minimize dependency and trust in third parties. | ||
|
||
## Tor By Default | ||
|
||
The client comes bundled with Tor, which is a requirement to make network calls from the app. | ||
|
||
This protects you from being fingerprinted via IP address by a backend service providers. | ||
|
||
## Backend Service Provider Defaults | ||
|
||
All backend services can be substituted with your own services or be entirely opted out of. | ||
|
||
We use the following services as default: | ||
|
||
### Electrum Node | ||
|
||
`Blockstream` | ||
|
||
This is the core backend service required to sync your wallet public data and also broadcast transactions. | ||
|
||
This can be your own server. | ||
|
||
### Exchange Rate | ||
|
||
Coming soon | ||
|
||
### Blockexplorer | ||
|
||
`BullBitcoin` | ||
|
||
This is used to view transactions on an explorer to study its path in depth. | ||
|
||
This can be your own server. | ||
|
||
## Telemetry | ||
|
||
The app currently uses no telemetry. | ||
|
||
## Platform Specific Considerations | ||
|
||
Android users must ensure that they disable GBoards analytics or entirely opt-out and try options like OpenBoards. | ||
|
||
The moment private data is either copied to a clipboard or typed by GBoard, it will have severely degraded in its integrity. | ||
|
||
### Permissions | ||
|
||
#### Camera | ||
|
||
The app currently requires permission to use your camera ONLY when scanning a Bitcoin address or Public Key. | ||
|
||
#### Biometrics | ||
|
||
To use native authentication to access the app. | ||
|
||
## Bitcoin Specific Considerations | ||
|
||
Imported wallets currently estimate your last used address index based on your transaction history. | ||
|
||
You have the ability to manually increment your index if you believe the estimations are not accurate. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,38 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.sats.stackmate"> | ||
package="com.sats.stackmate.wallet"> | ||
<!-- Flutter needs it to communicate with the running application | ||
to allow setting breakpoints, to provide hot reload, etc. | ||
--> | ||
<uses-permission android:name="android.permission.INTERNET"/> | ||
|
||
<application android:label="Stackmate" android:icon="@mipmap/launcher_icon" android:extractNativeLibs="true"> | ||
<activity android:name=".MainActivity" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize"> | ||
<!-- Specifies an Android theme to apply to this Activity as soon as | ||
the Android process has started. This theme is visible to the user | ||
while the Flutter UI initializes. After that, this theme continues | ||
to determine the Window background behind the Flutter UI. --> | ||
<meta-data android:name="io.flutter.embedding.android.NormalTheme" android:resource="@style/NormalTheme" /> | ||
<!-- Displays an Android View that continues showing the launch screen | ||
Drawable until Flutter paints its first frame, then this splash | ||
screen fades out. A splash screen is useful to avoid any visual | ||
gap between the end of Android's launch screen and the painting of | ||
Flutter's first frame. --> | ||
<meta-data android:name="io.flutter.embedding.android.SplashScreenDrawable" android:resource="@drawable/launch_background" /> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN"/> | ||
<category android:name="android.intent.category.LAUNCHER"/> | ||
</intent-filter> | ||
|
||
<intent-filter> | ||
<action android:name="android.intent.action.VIEW"/> | ||
<category android:name="android.intent.category.DEFAULT"/> | ||
<category android:name="android.intent.category.BROWSABLE"/> | ||
<data android:host="satswala.page.link" android:scheme="https"/> | ||
</intent-filter> | ||
</activity> | ||
<!-- Don't delete the meta-data below. | ||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --> | ||
<meta-data android:name="flutterEmbedding" android:value="2" /> | ||
|
||
</application> | ||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
org.gradle.jvmargs=-Xmx1536M | ||
android.useAndroidX=true | ||
android.enableJetifier=true | ||
android.bundle.enableUncompressedNativeLibs=false |
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# External Signers | ||
|
||
This example uses bdk-cli as a `signer` and stackmate as a `watcher`. | ||
|
||
## Create or restore a seed | ||
|
||
```bash | ||
bdk-cli key restore --mnemonic 'transfer spare party divorce screen used pole march warfare another balance find' 01:10:37 AM | ||
{ | ||
"fingerprint": "8099ce1e", | ||
"xprv": "tprv8ZgxMBicQKsPctM9UgftwPdDCxMq2c57utsBu5htMG7ySHZzT33jWyiSBQJwvjDEoMHmZGFgezhVTyKmiKfdPtdFtoAAdSzFYdstokvpop1" | ||
} | ||
``` | ||
|
||
## Derive account keys | ||
|
||
```bash | ||
bdk-cli key derive --xprv tprv8ZgxMBicQKsPctM9UgftwPdDCxMq2c57utsBu5htMG7ySHZzT33jWyiSBQJwvjDEoMHmZGFgezhVTyKmiKfdPtdFtoAAdSzFYdstokvpop1 --path "m/84h/1h/0h" | ||
{ | ||
"xprv": "[8099ce1e/84'/1'/0']tprv8fVh3n3LQjFrTRXZYeZ9n8tvbEPshXqeRgauvZXXxn7117kDegj92XaHy9kVTH2zN9fXg8Ce4cpX5ihr9CBBAuA7DJSmdU2gVj3Xjd2T41G/*", | ||
"xpub": "[8099ce1e/84'/1'/0']tpubDCBjCC5aZ6wXLtZMSJDkBYZ3AFuors2YzzBhD5ZqP3uPqbzzH5YjD2CA9HDhUYNhrqq67v4XAN93KSbSL4bwa5hEvidkFuj7ycWA7EYzp41/*" | ||
} | ||
``` | ||
|
||
## Create descriptor | ||
|
||
bdk-cli no longer supports the policy command, so we will just build the descriptor by hand. | ||
|
||
`wpkh([8099ce1e/84'/1'/0']tprv8fVh3n3LQjFrTRXZYeZ9n8tvbEPshXqeRgauvZXXxn7117kDegj92XaHy9kVTH2zN9fXg8Ce4cpX5ihr9CBBAuA7DJSmdU2gVj3Xjd2T41G/*)` | ||
|
||
## Sync bdk-cli wallet | ||
|
||
```bash | ||
bdk-cli wallet -d "wpkh([8099ce1e/84'/1'/0']tprv8fVh3n3LQjFrTRXZYeZ9n8tvbEPshXqeRgauvZXXxn7117kDegj92XaHy9kVTH2zN9fXg8Ce4cpX5ihr9CBBAuA7DJSmdU2gVj3Xjd2T41G/0/*)" | ||
-c"wpkh([8099ce1e/84'/1'/0']tprv8fVh3n3LQjFrTRXZYeZ9n8tvbEPshXqeRgauvZXXxn7117kDegj92XaHy9kVTH2zN9fXg8Ce4cpX5ihr9CBBAuA7DJSmdU2gVj3Xjd2T41G/1/*)" sync | ||
|
||
bdk-cli wallet -d "wpkh([8099ce1e/84'/1'/0']tprv8fVh3n3LQjFrTRXZYeZ9n8tvbEPshXqeRgauvZXXxn7117kDegj92XaHy9kVTH2zN9fXg8Ce4cpX5ihr9CBBAuA7DJSmdU2gVj3Xjd2T41G/0/*)" | ||
-c"wpkh([8099ce1e/84'/1'/0']tprv8fVh3n3LQjFrTRXZYeZ9n8tvbEPshXqeRgauvZXXxn7117kDegj92XaHy9kVTH2zN9fXg8Ce4cpX5ihr9CBBAuA7DJSmdU2gVj3Xjd2T41G/1/*)" get_balance | ||
|
||
``` | ||
|
||
## Import wallet into stackmate | ||
|
||
Create a stackmate watcher wallet by importing the following pubkey: | ||
|
||
`[8099ce1e/84'/1'/0']tpubDCBjCC5aZ6wXLtZMSJDkBYZ3AFuors2YzzBhD5ZqP3uPqbzzH5YjD2CA9HDhUYNhrqq67v4XAN93KSbSL4bwa5hEvidkFuj7ycWA7EYzp41` | ||
|
||
Confirm that the wallet created is correct based on balance. | ||
|
||
## Build and copy transaction on stackmate watcher | ||
|
||
## Sign transaction on bdk-cli | ||
|
||
Substitute $PSBT for the psbt copied from stackmate. | ||
|
||
```bash | ||
bdk-cli wallet -d "wpkh([8099ce1e/84'/1'/0']tprv8fVh3n3LQjFrTRXZYeZ9n8tvbEPshXqeRgauvZXXxn7117kDegj92XaHy9kVTH2zN9fXg8Ce4cpX5ihr9CBBAuA7DJSmdU2gVj3Xjd2T41G/0/*)" | ||
-c"wpkh([8099ce1e/84'/1'/0']tprv8fVh3n3LQjFrTRXZYeZ9n8tvbEPshXqeRgauvZXXxn7117kDegj92XaHy9kVTH2zN9fXg8Ce4cpX5ihr9CBBAuA7DJSmdU2gVj3Xjd2T41G/1/*)" sign --psbt $PSBT | ||
``` | ||
|
||
## Broadcast transaction on stackmate |
Oops, something went wrong.