Skip to main content

Transfer

Struct Transfer 

Source
pub struct Transfer {
Show 14 fields pub schema: String, pub transfer_id: String, pub source_claim: String, pub source_claim_digest: String, pub source_gate_status_claimed: String, pub source_attachments: Vec<String>, pub target_claim: String, pub target_premise_digest: String, pub target_attachments: Vec<String>, pub homomorphism: HomomorphismDescriptor, pub provenance: Provenance, pub note: String, pub signature: String, pub signer_pubkey_hex: String,
}
Expand description

A signed, content-addressed cross-domain transfer.

Fields§

§schema: String§transfer_id: String

vtr_<16hex>, content-addressed over the canonical body with transfer_id, signature, signer_pubkey_hex zeroed. Key-independent so Rust and Python derive the same id from the same body.

§source_claim: String

The source claim object (vf_/vfr_/vat_) in domain X.

§source_claim_digest: String

sha256(A.claim.trim())[:16] — the same digest the gate keys A on.

§source_gate_status_claimed: String

A’s gate status AS DECLARED. DISPLAY ONLY; re-derived at verify time via derive_transfer_status, never trusted from here (mirrors attempt.claimed_status).

§source_attachments: Vec<String>

The vva_ attachment ids that earn A’s gate status (the evidence set, bound into the signed body).

§target_claim: String

The target claim object (vf_/vfr_) whose premise this discharges.

§target_premise_digest: String

sha256(premise.trim())[:16] of the exact premise A discharges — not all of B. Pins the link to one obligation.

§target_attachments: Vec<String>

The vva_ attachment ids proving the TARGET verifier gate-verified the mapped object φ(A) — the second of the two verifier receipts a FrozenVerifier link stands on. derive_transfer_status requires the gate over these to be Verified. Always present (an empty list for a LeanHomomorphism link, whose theorem already covers every input).

§homomorphism: HomomorphismDescriptor§provenance: Provenance§note: String§signature: String§signer_pubkey_hex: String

Implementations§

Source§

impl Transfer

Source

pub fn build(draft: TransferDraft, key: &SigningKey) -> Result<Self, String>

Build + sign. The id is a pure content address of the canonical body (key-independent); the signature binds the signer. Mirrors Attempt::build.

Source

pub fn derive_id(&self) -> Result<String, String>

vtr_<16hex> over the canonical content preimage.

Source

pub fn verify(&self) -> Result<(), String>

Structural verify: re-derive the id, verify the signature over the content preimage. Any hand-edit to the body fails here. (Admission — that the link is sound — is a separate read-time check, derive_transfer_status.)

Source

pub fn deposit_event( &self, actor_id: &str, actor_type: &str, reason: &str, ) -> StateEvent

Build the canonical transfer.deposited event. The full object travels in payload.transfer; the reducer verifies and upserts it.

Trait Implementations§

Source§

impl Clone for Transfer

Source§

fn clone(&self) -> Transfer

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Transfer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Transfer

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for Transfer

Source§

impl PartialEq for Transfer

Source§

fn eq(&self, other: &Transfer) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Transfer

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Transfer

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V