Release Candidate 0 - python-graphenelib 1.0.0steemCreated with Sketch.

in #graphene6 years ago (edited)

Dear fellows,

it's my pleasure to announce the release of python-graphenelib 1.0.0 (rc0).

The python-graphenelib library is a core element of libraries such as

  • python-bitshares
  • python-peerplays
  • piston-lib (unmaintained)

and provides common infrastructure that is shared among graphene-based blockchains. This simplifies customization of chain-specific implementations (If you want to know more and need your own chain library, contact me.

Significant Changes:

  • Use Independent StoreInterface for Configuration, Keys, etc
  • Implement Separate EncryptedKeyStore Interface
  • Ensure proper serialization
  • Simplify Interface for Serialization of Objects
  • Simplify Customization for other chains (framework - phase 1)
  • Add CLA, Contributing and CoC
  • Major Improvement to Testing Coverage
  • Fast unit testing

Implications

Eeasier customization of storage

With the new version, libraries can (and will) allow to provide custom storage implementations. The interfaces are define in graphenestorage.interfaces and can be used to store anything, including the configuration (node urls, default account etc) as well as keys (private keys, encrypted private keys). Additional stores can be easily setup.

So far, stores can be either

  • InRAMStore
  • SQLiteStore

Simplify wallet

The changes allow to simplify the implementation details of chain-specific wallets because of stores that allow encryption.

Simpified Operation definitions

With the new library, Operations are easier to define and come with less boilerplace. And example looks like this:

class Asset(GrapheneObject):
    def detail(self, *args, **kwargs):
        return OrderedDict([
            ('amount', Int64(kwargs["amount"])),
            ('asset_id', ObjectId(kwargs["asset_id"], "asset"))
        ])

BitShares

In particular for BitShares, the customizations will lead to an easier-to-read library with more functionality. A branch already exists that contains those customizations and usage of new features of graphenelib.