Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

freenet hight level API #1032

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

freenet hight level API #1032

wants to merge 3 commits into from

Conversation

gogo2464
Copy link
Contributor

@gogo2464 gogo2464 commented Apr 6, 2024

fixes : #1031

@gogo2464 gogo2464 force-pushed the simple-api branch 3 times, most recently from d5e7ac1 to 8d707ce Compare April 6, 2024 22:30
@gogo2464
Copy link
Contributor Author

gogo2464 commented Apr 7, 2024

The program compiles.

I tested 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("kjgwfelkhjwfefewhjwefnjfewnlwfejlfewnj"), vec![DELTA CONTENT]);
}

a cargo run returns:

Updating contract kjgwfelkhjwfefewhjwefnjfewnlwfejlfewnj
test: Err(update error for contract kjgwfelkhjwfefewhjwefnjfewnlwfejlfewnj, reason: missing contract parameters)

could someone check it please? I am 90% sure it is an isue with library call usage. Not implementing.

@iduartgomez
Copy link
Collaborator

Can you remove the Cargo.lock changes? Also open a PR for the sodlib changes?

@gogo2464
Copy link
Contributor Author

gogo2464 commented Apr 8, 2024

2 differents PR:

  • 1 for freenet core
  • 2 a second for stdlib?

@gogo2464
Copy link
Contributor Author

gogo2464 commented Apr 8, 2024

like this freenet/freenet-stdlib#16 ?

@gogo2464
Copy link
Contributor Author

gogo2464 commented Apr 8, 2024

I think this line is wrong:

https://github.com/freenet/freenet-core/pull/1032/files#diff-0d0493959efa2953a932a317ab5d09c1a98c80f5dcd427d4f989e879353530d9R150

could you check if the String is nicely translated to an array please?

@gogo2464
Copy link
Contributor Author

gogo2464 commented Apr 8, 2024

could you review freenet/freenet-stdlib#16 please?

@gogo2464
Copy link
Contributor Author

gogo2464 commented Apr 8, 2024

Can you remove the Cargo.lock changes? Also open a PR for the sodlib changes?

can I do cargo update?

@gogo2464
Copy link
Contributor Author

gogo2464 commented Apr 9, 2024

stdl PR has been open.

@sanity I bring back the old Cargo.lock. Raises error.

could you review please?

@gogo2464
Copy link
Contributor Author

@gogo2464
Copy link
Contributor Author

might be fixed. I might misread the doc

@gogo2464
Copy link
Contributor Author

FIXED!!!!!

The Config::conf().contracts_dir() and other functions like these correspond to /tmp/freenet instead of the real folder.

I have to push.

We also have to fix it. I will open an issue.

@iduartgomez iduartgomez mentioned this pull request Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

create a hight level api for freenet-core
2 participants