Git Product home page Git Product logo

Comments (11)

sohkai avatar sohkai commented on July 17, 2024

Alternatively, @TimDaub and I had a discussion where it might make more sense if bigchaindb_driver exposed bigchaindb_common's Transaction model to the end user. That way, driver.transactions.retrieve can also return a Transaction model (that should be much, much easier to work with than plain JSON).

from bigchaindb-driver.

sohkai avatar sohkai commented on July 17, 2024

It may also be useful to expose a TransactionBuilder from the driver if this gets implemented.

from bigchaindb-driver.

sbellem avatar sbellem commented on July 17, 2024

For now, I propose we focus on what could be called a low-level driver, in which dictionaries are used for the data structure for response and request payloads. This will keep things simpler, and uniform for all endpoints.

from bigchaindb-driver.

sohkai avatar sohkai commented on July 17, 2024

I'm not a big fan if that means we'll eventually write another package that's a high-level driver. I'd be ok with this if we exposed a convenient interface on the main BigchainDB object while the low-level stuff lives in BigchainDB.raw or similar.

Making (and using) cryptocondition dicts by hand is just way too hard for someone new or just wants basic functionality.

from bigchaindb-driver.

sbellem avatar sbellem commented on July 17, 2024

All this involves is that the end-user of the driver passes and receives dictionaries, instead of a Transaction model instances. The Transaction model is still used under the hood to perform the required operations, such as creating a TRANSFER transaction, getting the inputs, and signing the transaction.

from bigchaindb-driver.

TimDaub avatar TimDaub commented on July 17, 2024

All this involves is that the end-user of the driver passes and receives dictionaries, instead of a Transaction model instances.

Not sure how suitable this is. Creating a transfer is not as easy as giving a transfer method a couple of input transactions.

See here:

from bigchaindb-driver.

sbellem avatar sbellem commented on July 17, 2024

@TimDaub both .to_inputs() and .transfer() are currently used "under the hood" and will still be used.

I will make a PR and we can discuss if needed around the PR itself, it will be more productive this way and will help prevent misunderstandings.

from bigchaindb-driver.

sbellem avatar sbellem commented on July 17, 2024

@sohkai and @TimDaub can we close this issue since .transfer is being deprecated, and given the changes introduced by #109?

As for the question of the design choices, and whether the driver should deal with dictionaries or expose models, I propose to discuss these matters in a separate issue.

If you can be a bit patient, and wait for the design document that should come out of #156, the discussion may be more productive and grounded then.

from bigchaindb-driver.

TimDaub avatar TimDaub commented on July 17, 2024

πŸ‘

from bigchaindb-driver.

sbellem avatar sbellem commented on July 17, 2024

status

😏

from bigchaindb-driver.

sohkai avatar sohkai commented on July 17, 2024

πŸ‘

from bigchaindb-driver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.