jsup/avle code update - you don't have to write post everyday

by joviansummer original STEEMIT post: https://steemit.com/blog/@joviansummer/jsup-avle-code-update-you-don-t-have-to-write-post-everyday Hello, this is @joviansummer, developer of @jsup and@avle voting service. Voting service code for @jsup and @avle has been updated. I had been considering this update for a while, and recently I could come up with detailed implementation plan which resulted in a relatively swift code revision. The new added feature is capability to give daily upvote to the first thing you write for the day(timezone GMT+9) regardless of post or comment/reply. Writing a post everyday can be challenging. In that case, you can write a reply to receive daily upvote because writing a reply everyday is much easier and also a good way to engage in your community. Writing a post everyday just to get an upvote can be very tedious and exhausting, and post itself could easily become low-quality. There may be people who enjoy writing a post everyday, but we can't ignore th...

파이썬에서 스팀잇 ID 및 포스팅 키 유효성 확인

by joviansummer
original STEEMIT post: https://steemit.com/blog/@joviansummer/id


파이썬에서 스팀잇 ID와 포스팅 키가 유효한지 확인하는 방법입니다. steem-python 모듈을 활용합니다.

steem-python

먼저 포스팅 키가 유효한지 확인하는 과정은 아래의 코드로 가능합니다.

import steem

STEEMIT_ID="joviansummer"
POSTING_KEY="my_posting_key"

# 포스팅 키 유효성 확인
try:
  user = steem.Steem(keys=[POSTING_KEY])
except:
  print("포스팅 키가 유효하지 않습니다.")
print("유효한 포스팅 키입니다.")

포스팅 키가 유효한지 확인이 되었으면 이제 이 포스팅 키의 주인이 스팀잇 ID와 일치하는지 확인합니다. 위의 코드에 이어서 아래의 코드로 가능합니다. (인터넷에서 발견하고 적어 두었는데 어디에서 찾았었는지 기억이 안 나네요.)

from steembase.account import PrivateKey

# 포스팅 키에 대응하는 공개키(public key)
pubkey = PrivateKey(POSTING_KEY).pubkey

# 스팀잇 ID에 대응하는 공개키
account = user.get_account(STEEM_ID)
pubkey2 = account['posting']['key_auths'][0][0]

# 양쪽 공개키가 일치하는지 확인
if str(pubkey) == str(pubkey2):
  print("스팀잇ID와 포스팅 키가 일치합니다.")
else:
  print("스팀잇ID와 포스팅 키가 일치하지 않습니다.")

오토보팅 서비스 개발은 주중에 틈틈이 설계하고 구상하면서 메모해 놓은 아이디어를 주말에 시간을 내서 구체적으로 시험하고 보완하는 식으로 진행중입니다. 시작한지 얼마 안되어서 그런지 일단 아직까지는 순조롭게 나아가고 있습니다.

Comments

Popular posts from this blog

Nuitka - 파이썬 스크립트를 바이너리 실행 파일로 변환

[ENG] jsup 2.0 - make your upvote great again

[EN] STEEM-services: dapps/services webpage with sort and search functions