Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

Existing account importer #178

Open
kwek20 opened this issue Jun 17, 2019 · 2 comments
Open

Existing account importer #178

kwek20 opened this issue Jun 17, 2019 · 2 comments

Comments

@kwek20
Copy link
Contributor

kwek20 commented Jun 17, 2019

We need to make an importer to use the account module from an existing seed.
Method signature: ´iotaAccount.importStateFromSeed(boolean overwriteCurrent)´

Boolean is used when we find conflicting balances in the existing account state, and the one from the node.

Does not run by default on anything, and must have a disclaimer on the javadoc that it is unchecked. Developers should not underestimate responsibility for usage of this method.

@ghost
Copy link

ghost commented Dec 3, 2019

is this why i'm not getting balance? there is no import from existing seed?.

IotaAccount account = new IotaAccount.Builder(
"KIZVHLJALXKEVKLDYARIK.............YOTALRMCNMPABGIQZ")
.securityLevel(2).mwm(14).depth(2).store(store).api(api).build();

		account.load();

@kwek20
Copy link
Contributor Author

kwek20 commented Dec 3, 2019

Yes, Accounts are for now intended to use from a clean slate. It is best to generate a new seed, use it on the account to get a new deposit address, and send your balance to this new seed.

We made this decision because from a technical standpoint, nodes cannot with certainty know which addresses are spent from, and what balances are on which account. (although currently with the coordinator we can)

Otherwise, you could find the balance for each address and manually add them in the json storage, but that seems like a lot of effort :D

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant