pub struct ActionEnvelope {
pub version: String,
pub action_type: String,
pub identity: String,
pub payload: Value,
pub timestamp: String,
pub signature: String,
pub attestation_chain: Option<Value>,
pub environment: Option<Value>,
}Expand description
Typed action envelope for signed actions.
Compatible with the existing Python SDK wire format (version “1.0”).
The signature field is excluded from the canonical signing data.
Args:
version: Protocol version string (currently “1.0”).action_type: The type of action being performed.identity: DID of the signing identity.payload: Arbitrary JSON payload.timestamp: RFC3339 timestamp string.signature: Hex-encoded Ed25519 signature over the canonical signing data.attestation_chain: Optional chain of attestations for verification.environment: Optional environment claim for gateway verification.
Usage:
ⓘ
let envelope = ActionEnvelope {
version: "1.0".into(),
action_type: "sign_commit".into(),
identity: "did:keri:Eabc123".into(),
payload: serde_json::json!({"hash": "abc123"}),
timestamp: "2024-01-01T00:00:00Z".into(),
signature: "deadbeef...".into(),
attestation_chain: None,
environment: None,
};Fields§
§version: StringProtocol version string.
action_type: StringThe type of action being performed.
identity: StringDID of the signing identity.
payload: ValueArbitrary JSON payload.
timestamp: StringRFC3339 timestamp string.
signature: StringHex-encoded Ed25519 signature over the canonical signing data.
attestation_chain: Option<Value>Optional chain of attestations for verification.
environment: Option<Value>Optional environment claim for gateway verification.
Implementations§
Source§impl ActionEnvelope
impl ActionEnvelope
Sourcepub fn signing_data(&self) -> ActionSigningData<'_>
pub fn signing_data(&self) -> ActionSigningData<'_>
Extracts the signing data from this envelope.
Trait Implementations§
Source§impl Clone for ActionEnvelope
impl Clone for ActionEnvelope
Source§fn clone(&self) -> ActionEnvelope
fn clone(&self) -> ActionEnvelope
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ActionEnvelope
impl Debug for ActionEnvelope
Source§impl<'de> Deserialize<'de> for ActionEnvelope
impl<'de> Deserialize<'de> for ActionEnvelope
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 PartialEq for ActionEnvelope
impl PartialEq for ActionEnvelope
Source§impl Serialize for ActionEnvelope
impl Serialize for ActionEnvelope
impl StructuralPartialEq for ActionEnvelope
Auto Trait Implementations§
impl Freeze for ActionEnvelope
impl RefUnwindSafe for ActionEnvelope
impl Send for ActionEnvelope
impl Sync for ActionEnvelope
impl Unpin for ActionEnvelope
impl UnsafeUnpin for ActionEnvelope
impl UnwindSafe for ActionEnvelope
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more