[Lightsteem] Broadcasting transactions

in #lightsteem6 years ago (edited)

I have managed to decouple the signing from steem-python. (Work in progress, not released yet.)

Current internal API to broadcast operations:

from lightsteem.client import Client
from lightsteem.datastructures import Operation

c = Client(
    keys=["<private_key>",])

op = Operation('account_witness_vote', {
        'account': '<your_account>',
        'witness': 'emrebeyler',
        'approve': True,
    })


c.broadcast(op)

To bundle operations:

from lightsteem.client import Client
from lightsteem.datastructures import Operation

c = Client(
    keys=["<private_key>",])

ops = [
    Operation('transfer', {
        'from': 'emrebeyler',
        'to': '<receiver_account_1>',
        'amount': '0.001 SBD',
        'memo': 'test1!'
    }),
    Operation('transfer', {
        'from': 'emrebeyler',
        'to': '<receiver_account_2>',
        'amount': '0.001 SBD',
        'memo': 'test1!'
    }),

]

c.broadcast(ops)

Stop by Lightsteem Discord to join the fun.

Coin Marketplace

STEEM 0.26
TRX 0.11
JST 0.033
BTC 63851.10
ETH 3059.36
USDT 1.00
SBD 3.85