Closed mosinms7711 closed 5 years ago
I have not tried Ipfs.Core with Xamarin. Could you please give the errors?
Does Xamarin support .Net Standard 2? Have you read https://dzone.com/articles/xamarin-forms-and-net-standard-getting-started?
This may also help https://docs.microsoft.com/en-us/xamarin/xamarin-forms/internals/net-standard
Also, are you trying to add ipfs.core of ipfs.api? Please raise individual issues, my mind only has a few slots for issues.
If you have repo with the project, I'll fork it and try to get it to work.
@richardschneider Thanks for help.can you please tell me...How to wrap data in Merkle Dag with xamarin forms or c#.?I need to add content to ipfs network.Before that i want hash value for the content.Now i can get hash values of raw data but when we add content to ipfs it wrap the data with merkle dag then create hash value of the content before uploading to ipfs n/w.
The easy way is to simply call FileSystem.AddFileAsync. It returns a FileSystemNode which contains the Id
. The ID is a CID (Content ID) which in the normal case, v0, is the multihash.
using Ipfs.Api;
var ipfs = new IpfsClient();
var path = "path-to-file";
var node = await ipfs.FileSystem.AddFileAsync(path);
var hash = (string)node.Id;
Console.WriteLine($"The hash is {hash}");
@richardschneider thank for help...for the jpeg image above code gives different hash value than IPFS add.Can you please help me with the same.?
Please show what IPFS add
returns and what the above code prints. Also please attach the image.
I did test this on my machine and it worked.
The new documentation on the client and the file system may help.
Hello...I am not unable to add IPFS.Core package in my android project...My Dependancy in .net Standard 2.0 and m targetting 8.1...Please help me out...