Skip to main content

ResQ.Storage

PinMetadata Class

Represents metadata for a file pinned to IPFS.
public record PinMetadata : System.IEquatable<ResQ.Storage.PinMetadata>
Inheritance System.Object → PinMetadata Implements System.IEquatable<PinMetadata>

Example

var pins = await storageClient.ListPinsAsync("evidence-");
foreach (var pin in pins)
{
    Console.WriteLine($"{pin.Name}: {pin.Cid}");
    foreach (var kv in pin.KeyValues)
    {
        Console.WriteLine($"  {kv.Key}: {kv.Value}");
    }
}

Remarks

Pin metadata provides information about files that have been pinned to IPFS through the Pinata service. This includes the CID, custom metadata key-value pairs, and pinning information. Pinned files are guaranteed to remain available on the IPFS network as long as they remain pinned.
Constructors
PinMetadata(string, string, long, DateTimeOffset, Dictionary<string,string>)Represents metadata for a file pinned to IPFS.
Properties
CidThe IPFS Content Identifier.
KeyValuesDictionary of custom metadata key-value pairs.
NameThe human-readable name assigned to the pin.
PinnedAtUTC timestamp when the content was pinned.
SizeBytesThe size of the pinned content in bytes.