-
Notifications
You must be signed in to change notification settings - Fork 90
Adding multisig wallet #354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rodendron-xrhodium
wants to merge
24
commits into
block-core:multisig-wallet
Choose a base branch
from
rodendron-xrhodium:master
base: multisig-wallet
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 14 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
30b6405
Added multisig wallet
rodendron-xrhodium 1cd6679
Extracting root account interface so that it can be substituted
rodendron-xrhodium 3121132
Extracting account interface so that it can be substituted
rodendron-xrhodium 39459b3
Adding multisig scheme class
rodendron-xrhodium f8e60a4
Testing multisig address derivation
rodendron-xrhodium 736a8a4
Changing wallet class use interfaces instead of concrete classes
rodendron-xrhodium 8480e28
Integrating multisig wallet and interfaces into wallet manager
rodendron-xrhodium 912b880
Walletmanager should prefer dealing with interface based objects
rodendron-xrhodium 3762664
Refactoring to use interfaces instead of concrete classes.
rodendron-xrhodium e49168f
Refactoring to use interfaces instead of concrete classes.
rodendron-xrhodium 6f36959
Refactoring to use interfaces instead of concrete classes
rodendron-xrhodium 8b3b554
Handling strange build problems.
rodendron-xrhodium cb57401
Handling strange build problems again
rodendron-xrhodium 65faa2d
Refactored to use interface collection instead of concreted class.
rodendron-xrhodium f6a6ff8
Added create multisig wallet operation to IWalletManager interface.
rodendron-xrhodium 4326068
Added explicit network parameter to GeneratePublicKey with default nu…
rodendron-xrhodium 210650d
Created transaction hex response model for wallet RPCs.
rodendron-xrhodium 0e93ac6
Changed HD paths back to m/44' from m/45' as this was breaking privat…
rodendron-xrhodium a5e4b00
Cleand up imports /usings.
rodendron-xrhodium 982f81e
Updated CreateMutisigWallet to use seed and xpubs as previous version…
rodendron-xrhodium 978c3d9
Modified tests to verify private key + (n)xpub multisig wallet.
rodendron-xrhodium 5950514
Modified tests to verify private key + (n)xpub multisig wallet.
rodendron-xrhodium a3e7c1e
Added RPCs to create multisig wallet, create multisig transctions, co…
rodendron-xrhodium f1b3066
Bug fix for null LastBlockSynchedHash after creating new wallet
rodendron-xrhodium File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
22 changes: 22 additions & 0 deletions
22
src/Features/Blockcore.Features.Wallet/Interfaces/IAccountRoot.cs
This file contains hidden or 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,22 @@ | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using Blockcore.Features.Wallet.Database; | ||
| using Blockcore.Networks; | ||
| using NBitcoin; | ||
|
|
||
| namespace Blockcore.Features.Wallet.Interfaces | ||
| { | ||
| public interface IAccountRoot | ||
| { | ||
| ICollection<IHdAccount> Accounts { get; set; } | ||
| int? CoinType { get; set; } | ||
| uint256 LastBlockSyncedHash { get; set; } | ||
| int? LastBlockSyncedHeight { get; set; } | ||
|
|
||
| IHdAccount AddNewAccount(ExtPubKey accountExtPubKey, int accountIndex, Network network, DateTimeOffset accountCreationTime); | ||
| IHdAccount AddNewAccount(string password, string encryptedSeed, byte[] chainCode, Network network, DateTimeOffset accountCreationTime, int? accountIndex = null, string accountName = null); | ||
| IHdAccount CreateAccount(string password, string encryptedSeed, byte[] chainCode, Network network, DateTimeOffset accountCreationTime, int newAccountIndex, string newAccountName = null); | ||
| IHdAccount GetAccountByName(string accountName); | ||
| IHdAccount GetFirstUnusedAccount(IWalletStore walletStore); | ||
| } | ||
| } | ||
30 changes: 30 additions & 0 deletions
30
src/Features/Blockcore.Features.Wallet/Interfaces/IHdAccount.cs
This file contains hidden or 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,30 @@ | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using Blockcore.Features.Wallet.Database; | ||
| using Blockcore.Features.Wallet.Types; | ||
| using Blockcore.Networks; | ||
| using NBitcoin; | ||
|
|
||
| namespace Blockcore.Features.Wallet.Interfaces | ||
| { | ||
| public interface IHdAccount | ||
| { | ||
| DateTimeOffset CreationTime { get; set; } | ||
| string ExtendedPubKey { get; set; } | ||
| ICollection<HdAddress> ExternalAddresses { get; set; } | ||
| string HdPath { get; set; } | ||
| int Index { get; set; } | ||
| ICollection<HdAddress> InternalAddresses { get; set; } | ||
| string Name { get; set; } | ||
|
|
||
| IEnumerable<HdAddress> CreateAddresses(Network network, int addressesQuantity, bool isChange = false); | ||
| (Money ConfirmedAmount, Money UnConfirmedAmount) GetBalances(IWalletStore walletStore, bool excludeColdStakeUtxo); | ||
| int GetCoinType(); | ||
| IEnumerable<HdAddress> GetCombinedAddresses(); | ||
| HdAddress GetFirstUnusedChangeAddress(IWalletStore walletStore); | ||
| HdAddress GetFirstUnusedReceivingAddress(IWalletStore walletStore); | ||
| HdAddress GetLastUsedAddress(IWalletStore walletStore, bool isChange); | ||
| IEnumerable<UnspentOutputReference> GetSpendableTransactions(IWalletStore walletStore, int currentChainHeight, long coinbaseMaturity, int confirmations = 0); | ||
| bool IsNormalAccount(); | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.