0

I have a Rust CLI where I make a balance transfer from one account to another using this code https://github.com/paritytech/substrate-subxt/blob/master/examples/submit_and_watch.rs.

The PairSigner is generated with let signer = PairSigner::new(AccountKeyring::Alice.pair());. Instead of using this test Keychain with Alic, how can I use my personal Polkadot wallet account to sign the transaction?

lovelikelando
  • 7,593
  • 6
  • 32
  • 50

1 Answers1

2

Using sp-core, one can use Phase::from_phrase to accomplish this.

let pair = Pair::from_phrase(&"menumonic".to_string(), Some("password"))?;

lovelikelando
  • 7,593
  • 6
  • 32
  • 50