Skip to content

Commit e44bd0b

Browse files
committed
Add genesisbalance class bitshares#217
1 parent f0a51f3 commit e44bd0b

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

bitshares/genesisbalance.py

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# -*- coding: utf-8 -*-
2+
from .account import Account
3+
from .instance import BlockchainInstance
4+
from graphenecommon.genesisbalance import (
5+
GenesisBalance as GrapheneGenesisBalance,
6+
GenesisBalances as GrapheneGenesisBalances,
7+
)
8+
9+
from bitsharesbase.account import Address, PublicKey
10+
from bitsharesbase import operations
11+
12+
13+
@BlockchainInstance.inject
14+
class GenesisBalance(GrapheneGenesisBalance):
15+
""" Read data about a Genesis Balances from the chain
16+
17+
:param str identifier: identifier of the balance
18+
:param bitshares blockchain_instance: bitshares() instance to use when
19+
accesing a RPC
20+
21+
"""
22+
23+
type_id = 15
24+
25+
def define_classes(self):
26+
self.account_class = Account
27+
self.operations = operations
28+
self.address_class = Address
29+
self.publickey_class = PublicKey
30+
31+
32+
@BlockchainInstance.inject
33+
class GenesisBalances(GrapheneGenesisBalances):
34+
""" List genesis balances that can be claimed from the
35+
keys in the wallet
36+
"""
37+
38+
def define_classes(self):
39+
self.genesisbalance_class = GenesisBalance
40+
self.publickey_class = PublicKey
41+
self.address_class = Address

0 commit comments

Comments
 (0)