Created
July 8, 2020 09:15
-
-
Save MariusVanDerWijden/8dc5e644e1342219460c27abac121c02 to your computer and use it in GitHub Desktop.
This file contains 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
// Open Keystore | |
ks := keystore.NewKeyStore("/home/matematik/keystore", keystore.StandardScryptN, keystore.StandardScryptP) | |
// Create an account | |
acc, err := ks.NewAccount("password") | |
// List all accounts | |
accs := ks.Accounts() | |
// Unlock an account | |
ks.Unlock(accs[0], "password") | |
// Create a TransactOpts object | |
ksOpts, err := bind.NewKeyStoreTransactor(ks, accs[0]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment