# -*- coding: utf-8 -*-

import json
from pprint import pprint

from tgolosbase.api import Api

print('connect')
b4 = Api()
input('try call?')

to = 'thallid'
amount = '1.000'
from_account = 'ksantoprotein'
rate = 4500
wif = '5...'

tx = b4.delegate_vesting_shares_with_interest(to, amount, from_account, rate,
                                              wif)
pprint(tx)
input('next?')

amount = '0.000'
tx = b4.delegate_vesting_shares(to, amount, from_account, wif)
pprint(tx)
input('end')
# -*- coding: utf-8 -*-

import json
from pprint import pprint

from tgolosbase.api import Api

print('connect')
b4 = Api()
print('try call')

tx = b4.get_order_price()

pprint(tx)
input()
# -*- coding: utf-8 -*-

import json
from pprint import pprint

from tgolosbase.api import Api

print('connect')
b4 = Api()
print('try call')

tx = b4.get_account_count()
print(tx)

input()
Exemple #4
0
# -*- coding: utf-8 -*-

import json
from pprint import pprint

from tgolosbase.api import Api

print('connect')
b4 = Api()
input('try call?')

to = 'thallid'
amount = '1.000'
from_account = 'ksantoprotein'
wif = '5...'

tx = b4.delegate_vesting_shares(to, amount, from_account, wif)
pprint(tx)
input('next?')

amount = '0.000'
tx = b4.delegate_vesting_shares(to, amount, from_account, wif)
pprint(tx)
input('end')
# -*- coding: utf-8 -*-

import json
from pprint import pprint

from tgolosbase.api import Api

print('connect')
b4 = Api()
print('try call')

tx = b4.get_all_accounts()
file = 'get_all_accounts.csv'
with open(file, 'w', encoding='utf8') as f:
    for login, value in tx.items():
        f.write(';'.join([login, json.dumps(value) + '\n']))

input('next')
Exemple #6
0
# -*- coding: utf-8 -*-

import json
from pprint import pprint

from tgolosbase.api import Api

print('connect')
b4 = Api()
input('try call?')

title = 'test'
body = 'test'
author = 'ksantoprotein'
wif = '5...'
curation = 'max'

url = 'https://golos.id/thallid/@ksantoprotein/test-1568630110'

tx = b4.post(title, body, author, wif, curation=curation, url=url)
pprint(tx)
input('end')
Exemple #7
0
# -*- coding: utf-8 -*-

import json
from pprint import pprint

from tgolosbase.api import Api

print('connect')
b4 = Api()
print('try call')

block = 30000910

tx = b4.get_block(block)

pprint(tx)
input()
Exemple #8
0
# -*- coding: utf-8 -*-

import json
from pprint import pprint

from tgolosbase.api import Api

print('connect')
b4 = Api()
print('try call')

for account in ['ksantoprotein', 'sci-populi']:
    tx = b4.get_accounts([account])[0]
    pprint(tx)

    file = 'get_account.json'
    with open(file, 'w', encoding='utf8') as f:
        json.dump(tx, f, ensure_ascii=False)

    input('next')
# -*- coding: utf-8 -*-

import json
from pprint import pprint

from tgolosbase.api import Api

print('connect')
b4 = Api()

account = 'ksantoprotein'
wif = '5...'
json_metadata = {
    "profile": {
        "profile_image": 'https://thumb.ibb.co/e929Gv/av_543.gif',
        "name": 'Протеюшко',
        "about": 'кафедра биоинженерии и биоинформатики',
        "gender": 'male',
        "location": 'Волгоград',
        "website": 'https://golos.io/@sci-populi',
        "pinnedPosts": [],
    }
}

tx = b4.get_accounts([account])[0]
print(tx["json_metadata"])
input('try call?')

tx = b4.account_metadata(account, json_metadata, wif)
pprint(tx)
# -*- coding: utf-8 -*-

import json
from pprint import pprint

from tgolosbase.api import Api

print('connect')
b4 = Api()
print('try call')

tx = b4.get_witness_schedule()

pprint(tx)
input()
Exemple #11
0
# -*- coding: utf-8 -*-

import json
from pprint import pprint

from tgolosbase.api import Api

print('connect')
b4 = Api()
print('try call')

limit = 3

tx = b4.get_order_book_extended(limit)

pprint(tx)
input()