```python from beem.steem import Steem from beemgraphenebase.account import PrivateKey def validate_private_key(steem_instance, account, private_key): try: public_key = str(PrivateKey(private_key).pubkey) except ValueError as e: if 'Base58' in e.args[0]: raise ValueError("Invalid private key") raise accounts = steem_instance.wallet.getAccountsFromPublicKey(str(public_key)) if not account in accounts: raise ValueError("Invalid private key") if __name__ == '__main__': s = Steem(node=["https://api.steemit.com"]) validate_private_key(s, '<steem_username>', '<private_key>') ``` *** This example uses Beem library but it's possible with every client/library. You need to utilize the ```get_key_references``` [call](http://steem.readthedocs.io/en/latest/steem.html#steem.steemd.Steemd.get_key_references) on steem nodes.
author | emrebeyler |
---|---|
permlink | a-simple-function-to-validate-username-and-private-key-couples |
category | steem |
json_metadata | {"community":"busy","app":"busy/2.5.4","format":"markdown","tags":["steem","python","beem","busy"],"users":[],"links":["http://steem.readthedocs.io/en/latest/steem.html#steem.steemd.Steemd.get_key_references"],"image":[]} |
created | 2018-07-31 11:57:21 |
last_update | 2018-07-31 11:58:06 |
depth | 0 |
children | 3 |
last_payout | 2018-08-07 11:57:21 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 2.552 HBD |
curator_payout_value | 0.338 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 897 |
author_reputation | 448,528,959,341,273 |
root_title | "A simple function to validate username and private key couples" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 66,629,505 |
net_rshares | 1,696,653,754,539 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tombstone | 0 | 110,982,483,615 | 0.06% | ||
lola-carola | 0 | 339,916,977 | 0.6% | ||
kevinwong | 0 | 38,652,989,868 | 0.15% | ||
shortcut | 0 | 23,474,571,067 | 10% | ||
felixxx | 0 | 125,195,327,312 | 30% | ||
themanualbot | 0 | 130,089,488 | 1% | ||
novacadian | 0 | 9,177,461,351 | 50% | ||
busy.pay | 0 | 487,507,110,186 | 3.47% | ||
decebal2dac | 0 | 6,465,626,957 | 100% | ||
teamhumble | 0 | 3,725,448,766 | 6% | ||
heymattsokol | 0 | 617,632,515 | 6% | ||
paolobeneforti | 0 | 19,661,269,801 | 6% | ||
silviabeneforti | 0 | 2,312,393,759 | 4% | ||
siriusgaia | 0 | 111,701,264 | 4.9% | ||
fingersik | 0 | 1,394,357,958 | 2% | ||
erb | 0 | 1,386,482,766 | 4% | ||
toninux | 0 | 275,106,487 | 24.5% | ||
oendertuerk | 0 | 39,660,478,583 | 20% | ||
teachblogger | 0 | 684,035,074 | 5% | ||
kenan1989 | 0 | 4,100,709,772 | 20% | ||
malay11 | 0 | 642,179,427 | 24.5% | ||
eurogee | 0 | 366,078,360 | 2% | ||
dbzfan4awhile | 0 | 322,378,545 | 3% | ||
luvabi | 0 | 1,329,040,695 | 5% | ||
world-travel-pro | 0 | 980,210,288 | 0.2% | ||
bitrocker2020 | 0 | 1,024,914,319 | 1% | ||
ruel.cedeno | 0 | 31,567,626,870 | 100% | ||
kemal13 | 0 | 1,221,636,728 | 30% | ||
bearone | 0 | 1,618,246,612 | 2% | ||
reddragonfly | 0 | 1,597,540,402 | 4% | ||
lastozgur | 0 | 4,913,465,180 | 100% | ||
howtostartablog | 0 | 1,252,683,840 | 3% | ||
faluthi01 | 0 | 141,471,632 | 10% | ||
affiedalfayed | 0 | 244,243,648 | 2% | ||
carrotcake | 0 | 1,661,138,362 | 2% | ||
firatozbek | 0 | 4,492,553,662 | 100% | ||
coloringiship | 0 | 774,553,033 | 2% | ||
nitindafda | 0 | 191,735,593 | 100% | ||
mintvilla | 0 | 6,064,202,147 | 12% | ||
martibis | 0 | 125,633,079 | 3% | ||
leotrap | 0 | 2,830,071,028 | 4% | ||
steemitph | 0 | 10,975,131,553 | 10% | ||
aaronleang | 0 | 3,722,788,452 | 10% | ||
nessyquel | 0 | 550,724,725 | 20% | ||
massivevibration | 0 | 3,084,718,190 | 5% | ||
boontjie | 0 | 1,447,419,823 | 100% | ||
markjason | 0 | 615,045,248 | 20% | ||
anna-mi | 0 | 847,637,393 | 10% | ||
smafey | 0 | 363,950,176 | 24.5% | ||
revisesociology | 0 | 1,248,782,814 | 1% | ||
espoem | 0 | 6,686,922,777 | 6% | ||
playitforward | 0 | 5,192,229,293 | 6% | ||
critic-on | 0 | 63,970,153 | 2% | ||
birgitt | 0 | 800,595,200 | 24.5% | ||
penauthor | 0 | 71,970,450 | 1% | ||
mrblinddraw | 0 | 2,977,583,213 | 18% | ||
animagic | 0 | 246,209,597 | 20% | ||
jacobkaled | 0 | 102,361,449 | 24.5% | ||
isnochys | 0 | 5,737,041,711 | 13% | ||
zord189 | 0 | 1,643,224,043 | 2% | ||
sam.hsuu | 0 | 419,910,758 | 2% | ||
nanastraybutt | 0 | 83,624,932 | 2% | ||
rightscomet | 0 | 141,035,870 | 24.5% | ||
explorernations | 0 | 304,756,731 | 1% | ||
notimetospace | 0 | 327,283,167 | 2% | ||
nudgent | 0 | 149,548,407 | 24.5% | ||
unforgettable | 0 | 3,179,514,864 | 100% | ||
jaff8 | 0 | 2,625,453,890 | 4% | ||
elchin | 0 | 729,571,773 | 100% | ||
emrebeyler | 0 | 174,214,782,573 | 100% | ||
mrmaracucho | 0 | 280,356,714 | 49% | ||
spectrums | 0 | 173,297,960 | 20% | ||
nairadaddy | 0 | 234,179,820 | 1% | ||
jeffbernst | 0 | 1,043,761,051 | 4% | ||
evilest-fiend | 0 | 1,614,977,741 | 50% | ||
tentalavera | 0 | 177,762,873 | 5% | ||
mela65 | 0 | 79,269,349 | 24.5% | ||
forkonti | 0 | 591,288,103 | 100% | ||
hellowhale | 0 | 203,971,430 | 100% | ||
enjoyy | 0 | 316,868,595 | 24.5% | ||
berkerpeksag | 0 | 1,592,859,538 | 100% | ||
iptrucs | 0 | 3,564,283,558 | 15% | ||
thinkermyles | 0 | 91,665,092 | 14.7% | ||
handfree42 | 0 | 72,974,518 | 24.5% | ||
steemerturk | 0 | 583,331,855 | 25% | ||
vaire | 0 | 178,427,867 | 25% | ||
turkolog | 0 | 431,120,818 | 100% | ||
ataturk | 0 | 454,387,703 | 100% | ||
asyrafahamed | 0 | 255,475,276 | 6% | ||
iwanderela | 0 | 677,052,973 | 5% | ||
tinowhale | 0 | 2,364,656,746 | 49% | ||
ewq | 0 | 258,466,233 | 6% | ||
paragon99 | 0 | 100,205,691 | 10% | ||
lukecreed | 0 | 198,234,750 | 24.5% | ||
fromhell2sky | 0 | 6,390,516,980 | 24.5% | ||
leticiapereira | 0 | 585,251,415 | 100% | ||
sauronbey | 0 | 3,395,652,776 | 100% | ||
crypto3d | 0 | 2,328,151,327 | 10% | ||
googletr | 0 | 1,690,804,301 | 100% | ||
eruditescholar1 | 0 | 106,625,182 | 24.5% | ||
blogger-funda | 0 | 85,143,466 | 20% | ||
chorock | 0 | 51,713,587,070 | 15% | ||
canburaksimsek | 0 | 3,539,909,374 | 25% | ||
theturk | 0 | 124,017,464 | 25% | ||
muradovv | 0 | 3,153,522,072 | 5% | ||
aytekinaygun | 0 | 593,717,148 | 100% | ||
holger80 | 0 | 115,635,351,353 | 33% | ||
uzerebru | 0 | 165,799,230 | 41% | ||
uzercanan | 0 | 891,775,497 | 45% | ||
sndbox-alpha | 0 | 13,091,517,808 | 20% | ||
kaylog | 0 | 91,543,283 | 24.5% | ||
ahmetmertugrul | 0 | 862,973,341 | 100% | ||
giftbox | 0 | 243,200,487 | 100% | ||
kaeo | 0 | 122,321,600 | 20% | ||
tdogvoid | 0 | 437,505,338 | 100% | ||
rinbird | 0 | 122,021,426 | 20% | ||
faithvarron | 0 | 106,530,656 | 24.5% | ||
tipitip | 0 | 508,143,736 | 100% | ||
aimei | 0 | 60,969,165 | 10% | ||
antigenx | 0 | 3,180,019,108 | 10% | ||
ahmeterbay | 0 | 1,534,529,657 | 100% | ||
mbadayee | 0 | 486,883,035 | 10% | ||
gjones15 | 0 | 327,905,631 | 12.25% | ||
ulfiatu.akiya | 0 | 118,100,192 | 24.5% | ||
nagaclub | 0 | 146,811,770 | 24.5% | ||
ruh | 0 | 691,413,088 | 100% | ||
muratkbesiroglu | 0 | 264,027,587,233 | 100% | ||
oldtown | 0 | 149,861,018 | 24.5% | ||
sereze | 0 | 781,459,749 | 100% | ||
zcool | 0 | 236,241,655 | 10% | ||
carloniere | 0 | 66,811,447 | 20% | ||
carment | 0 | 149,182,626 | 24.5% | ||
daszod | 0 | 240,983,943 | 49% | ||
andreas-winkler | 0 | 69,630,802 | 24.5% | ||
trsteemer | 0 | 170,842,900 | 35% | ||
theagriculturist | 0 | 61,091,140 | 10% | ||
qurator-tier-0 | 0 | 3,478,368,096 | 1% | ||
blockmountain | 0 | 98,119,346 | 10% | ||
feronio | 0 | 1,331,440,587 | 100% | ||
hyroniz | 0 | 152,495,375 | 25% | ||
brightex | 0 | 60,862,179 | 10% | ||
rechellomataro | 0 | 131,219,186 | 24.5% | ||
apteacher | 0 | 444,401,864 | 4% | ||
tyramisoux | 0 | 5,396,531,530 | 25% | ||
acun | 0 | 488,822,393 | 100% | ||
kryptorero | 0 | 151,667,598 | 24.5% | ||
bahagia9 | 0 | 125,203,929 | 24.5% | ||
gydronium | 0 | 180,467,007 | 29.4% | ||
senseofhumor | 0 | 608,963,921 | 100% | ||
gmlgang | 0 | 55,739,025 | 41% | ||
aksapphires | 0 | 106,423,212 | 24.5% | ||
mannylumanao | 0 | 101,882,306 | 10% | ||
zam398 | 0 | 240,357,376 | 10% | ||
parakazan | 0 | 276,037,124 | 100% | ||
steemit-uruguay | 0 | 88,530,200 | 20% | ||
khaliloff | 0 | 611,004,878 | 100% | ||
sbd-fairy | 0 | 275,507,692 | 49% | ||
carpet.duck | 0 | 76,185,789 | 10% | ||
votebott | 0 | 600,365,658 | 100% | ||
pablorg94 | 0 | 442,647,107 | 100% | ||
sulwati | 0 | 143,703,514 | 24.5% | ||
steemcanvas | 0 | 69,996,254 | 24.5% | ||
oyundelisi | 0 | 602,517,741 | 100% | ||
bigboy9 | 0 | 602,375,625 | 100% | ||
basav | 0 | 106,514,373 | 24.5% | ||
sutter | 0 | 675,406,144 | 24.5% | ||
thales7 | 0 | 3,355,522,509 | 100% | ||
oguzcan | 0 | 128,023,540 | 100% | ||
ayaennaciri | 0 | 88,787,134 | 100% | ||
trsteemian | 0 | 63,859,855 | 12.25% | ||
iauns | 0 | 10,298,012,154 | 100% | ||
yollardannotlar | 0 | 1,649,141,572 | 100% | ||
jacekw.dev | 0 | 755,854,152 | 100% | ||
beemtutorials | 0 | 454,743,883 | 100% | ||
alperenaktas | 0 | 76,132,160 | 12.5% | ||
xtramonio | 0 | 264,551,567 | 100% |
I recently discovered how to sign in Javascript and verify in Beem, thus allowing Steem logins without SteemConnect. Private keys do not go to the server but the private key is proven to exist via the signature [ August 6th : Sign in Steem-JS, verify in Beem!](https://steemit.com/steemdev/@leprechaun/sign-in-javascript-validate-in-beem-journal-entry-for-2018-08-august-06)
author | leprechaun |
---|---|
permlink | re-emrebeyler-a-simple-function-to-validate-username-and-private-key-couples-20180806t171109228z |
category | steem |
json_metadata | {"tags":["steem"],"image":["https://steemitimages.com/100x200/https://cdn.steemitimages.com/DQmUzRYDJKhwo4D7CQwTPXWfQiJ6gamdkNcpHHvFna9LtyF/sign-in-javascript-verify-in-beem.png"],"links":["https://steemit.com/steemdev/@leprechaun/sign-in-javascript-validate-in-beem-journal-entry-for-2018-08-august-06"],"app":"steemit/0.1"} |
created | 2018-08-06 17:11:12 |
last_update | 2018-08-06 17:11:12 |
depth | 1 |
children | 2 |
last_payout | 2018-08-13 17:11:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 529 |
author_reputation | 42,996,623,841,345 |
root_title | "A simple function to validate username and private key couples" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 67,319,399 |
net_rshares | 0 |
Long time, no see mr. Lepre.
author | emrebeyler |
---|---|
permlink | re-leprechaun-re-emrebeyler-a-simple-function-to-validate-username-and-private-key-couples-20180806t182606177z |
category | steem |
json_metadata | {"tags":["steem"],"app":"steemit/0.1"} |
created | 2018-08-06 18:26:06 |
last_update | 2018-08-06 18:26:06 |
depth | 2 |
children | 1 |
last_payout | 2018-08-13 18:26:06 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 28 |
author_reputation | 448,528,959,341,273 |
root_title | "A simple function to validate username and private key couples" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 67,326,325 |
net_rshares | 0 |
Yes, I have to focus on earning money and blogging on Steemit had not been working out. So, I don't post often now.
author | leprechaun |
---|---|
permlink | re-emrebeyler-re-leprechaun-re-emrebeyler-a-simple-function-to-validate-username-and-private-key-couples-20180808t113712574z |
category | steem |
json_metadata | {"tags":["steem"],"app":"steemit/0.1"} |
created | 2018-08-08 11:37:15 |
last_update | 2018-08-08 11:37:15 |
depth | 3 |
children | 0 |
last_payout | 2018-08-15 11:37:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.249 HBD |
curator_payout_value | 0.005 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 116 |
author_reputation | 42,996,623,841,345 |
root_title | "A simple function to validate username and private key couples" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 67,516,767 |
net_rshares | 176,959,779,610 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
emrebeyler | 0 | 176,959,779,610 | 100% |