public async Task Self_Key_Exists() { IpfsClient ipfs = TestFixture.Ipfs; var keys = await ipfs.Key.ListAsync(); var self = keys.Single(k => k.Name == "self"); var me = await ipfs.IdAsync(); Assert.AreEqual("self", self.Name); Assert.AreEqual(me.Id, self.Id); }
/// <summary> /// Information about an IPFS peer. /// </summary> /// <param name="id"> /// The <see cref="string"/> ID of the IPFS peer. /// </param> /// <param name="cancel"> /// Is used to stop the task. When cancelled, the <see cref="TaskCanceledException"/> is raised. /// </param> public Task <PeerNode> FindPeerAsync(string id, CancellationToken cancel = default(CancellationToken)) { return(ipfs.IdAsync(id, cancel)); }
/// <summary> /// Information about an IPFS peer. /// </summary> /// <param name="id"> /// The <see cref="string"/> ID of the IPFS peer. /// </param> public Task <PeerNode> FindPeerAsync(string id) { return(ipfs.IdAsync(id)); }
public Task <Peer> FindPeerAsync(MultiHash id, CancellationToken cancel = default(CancellationToken)) { return(ipfs.IdAsync(id, cancel)); }