Address Switching - Generating and using new Address in Light Wallet
See original GitHub issueWhat would you like to be added:
Currently, on the Light Wallet, only index:0
addresses are used. The internal implementation of jellyfish-wallet
allows multi addresses to be used. This issue calls for implementing wallet management with multi addresses supported.
- Listing all the active addresses within the wallet.
- Generating a new Address
n+1
and storing the maxindex
to know how many addresses have been generated. - Discovering all addresses on the wallet via https://github.com/DeFiCh/jellyfish/blob/47c3dabe7995bbfe8e7812ea1dfd1e885a6355f7/packages/jellyfish-wallet/src/wallet.ts#L69-L77 and storing the max indexes.
Assumptions:
- We are not using Node-like address management where all addresses are pooled together with one balance, for simplicity reasons each address is an account within the wallet system that the user can switch to.
- We are following a Metamask like experience
- We are not going to store all addresses like a wallet.dat file, we just need to track where the max index is.
Max Index Length determines the maximum number of activated addresses allowed in the wallet. Accounts are considered active if the address contains any transaction activity. You can always generate an address (+1). You can’t generate another address until you have activated the previous address. You active a previous address by using it. (contains any transaction activity)
Max Index Length = 1
, only 1 default addressMax Index Length = 2
, 2 addresses [Active, Active/In-Inactive]Max Index Length = 3
, 3 addresses [Active, Active, Active/In-Inactive]
- Avatars of wallet are already implemented.
/area core wallet
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Why you should always generate new Bitcoin addresses
In order to create a new address, you need to be running your own Bitcoin node or using a non-custodial wallet, like Electrum....
Read more >Why my wallet's BTC address keep changing? - Coin Guides
Wondering why your Bitcoin address keeps changing everytime you make a new transaction or request a payment? It is for your own privacy....
Read more >PSA: Using paper wallets, understanding change addresses.
By creating change addresses for every transaction the unspent funds are placed in a new address where the public key has not been...
Read more >How Create Multiple Bitcoin Wallet Address in Blockchain
how create multiple bitcoin wallet address in blockchain. This section of the wallet, found under Settings, is home to all your wallet's ......
Read more >Does your Bitcoin wallet address change with every transaction?
Yes, it does. It automatically generate a new address for you after every transaction you make or when funds are moved between your...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Acceptance Criteria: User generates new address and perform transactions from new address Android:
active
tab on displayiOS:
active
tab on display@fullstackninja864 yes, need to save selection