Skip to content
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

Feat/use ledger #35

Draft
wants to merge 31 commits into
base: main
Choose a base branch
from
Draft

Feat/use ledger #35

wants to merge 31 commits into from

Conversation

0x3bfc
Copy link

@0x3bfc 0x3bfc commented Jul 4, 2023

The following features are used with ledger:

  • send NEAR tokens to another accounts (fund another account).
  • create sub-accounts only on mainnet and testnet
  • deploy contract using ledger (blocked by near-app transaction hard limit)
  • send broadcast transaction on Near
  • send aurora transaction (ETH transactions)
  • replace InMemorySigner with more generic signer

@@ -74,6 +77,56 @@ pub fn read_key_file<P: AsRef<Path>>(path: P) -> anyhow::Result<InMemorySigner>
}
}

pub fn read_ledger_keypair() -> anyhow::Result<InMemorySigner> {
//TODO: use prompt to get the HD derivation path from the user.
let input_seed_phrase_path = BIP32Path::from_str("44'/397'/0'/0'/1'").unwrap();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should "44'/397'/0'/0'/1'" be provided like a command line argument?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method will be refactored as part of the generic signer struct.

Cargo.toml Outdated Show resolved Hide resolved
@0x3bfc 0x3bfc marked this pull request as ready for review July 4, 2023 09:45
@0x3bfc 0x3bfc marked this pull request as draft July 4, 2023 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants