Struct ipns_entry::cbor::Data
source · pub struct Data {
pub value: Vec<u8>,
pub validity: Vec<u8>,
pub sequence: u64,
pub ttl: u64,
pub validity_type: i32,
}
Expand description
Struct to hold the data to create the CBOR bytes.
Example
use ipns_entry::cbor;
let value = "QmWEekX7EZLUd9VXRNMRXW3LXe4F6x7mB8oPxY5XLptrBq";
let validity = "2033-05-18T03:33:20.000000000Z";
let sequence = 0;
let ttl = 0;
let data = cbor::Data {
value: value.as_bytes().to_vec(),
validity: validity.as_bytes().to_vec(),
validity_type: 0,
sequence,
ttl,
}
.to_bytes();
// ...sign the data
Fields§
§value: Vec<u8>
§validity: Vec<u8>
§sequence: u64
§ttl: u64
§validity_type: i32