Git Product home page Git Product logo

Comments (6)

sanity avatar sanity commented on June 10, 2024

I think it belongs in the client_api module, perhaps for now in a client_api.simple module.

So something like:

let api = client_api.simple.API::new(ws_port);
let contract_state : Vec<u8> = api.get(contract_address).await;

Would appreciate @iduartgomez's input also.

from freenet-core.

gogo2464 avatar gogo2464 commented on June 10, 2024

I started to implement it.

I love the concept of exposing minimal api. The issue is it sounds a windows driver wrapper philosophy. We should expose only the required and let everything else in private.

We may let folders as

  • internal
    • everything
  • external
    • API
      • update
      • get

from freenet-core.

gogo2464 avatar gogo2464 commented on June 10, 2024

I suggest for a final version to do:

  • freenet
    • everything
    • lib.rs
    • API
      • update
      • get

At this moment we may merge my current pr. Ready for a review.

from freenet-core.

gogo2464 avatar gogo2464 commented on June 10, 2024

already usable with:

use freenet::client_api::simple::API;

#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
    let mut api = API::new(50509);
    let out = api.update(String::from("lftMopswnMBotiZflwjYvuGCWbsileTEruGllHmLnOAWp"), vec![1, 2, 3]).await;
}

the value of out should be Ok().

from freenet-core.

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.