syntax = "proto3";

package github.com.boxo.ipns.pb;

option go_package = ".;pb";

// https://specs.ipfs.tech/ipns/ipns-record/#record-serialization-format
message IpnsRecord {
	enum ValidityType {
		EOL = 0;
	}

	// 1-6 are legacy fields used only in V1+V2 records
	optional bytes value = 1;
	optional bytes signatureV1 = 2;
	optional ValidityType validityType = 3;
	optional bytes validity = 4;
	optional uint64 sequence = 5;
	optional uint64 ttl = 6;
	// 7-9 are V2 records
	optional bytes pubKey = 7;
	optional bytes signatureV2 = 8;
	optional bytes data = 9;
}
