jsup 2.1 - investor's relief (experiment on separation of investment and SNS)

by joviansummer original STEEMIT post: https://steemit.com/blog/@joviansummer/jsup-2-1-investor-s-relief-experiment-on-separation-of-investment-and-sns Hello, this is @joviansummer(witness: @jswit). I'm starting a new experiment regarding my @jsup vote service. The purpose of this experiment is to separate STEEM investment and social interaction(posting/commenting). For many people, writing a post daily(literally 365 posts per year) is not easy. It's not fun, and mandatory daily post only written for self-voting delegation service tends to result in useless low-quality content. I hope this new function of @jsup will reduce those posts, and also make it a bit more easy to invest in STEEM without worrying about daily posting. I think pressure of daily posting significantly undermines Steem as SNS. It's not fun. This is how it works: From 11:45 PM to 11:50 PM every night(reference time zone is GMT+9), @jsup checks if eligible delegators wrote something and received daily v...

파이썬에서 스팀잇 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

스티미언의 영향력 지수 계산

jsup/avle 보팅 코드 갱신 - 1일1포스팅 강박에서 벗어나기

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