Skip to main content

InstallArgs

Struct InstallArgs 

Source
pub struct InstallArgs<'a> {
    pub global: bool,
    pub did_key_id: String,
    pub vta_key_id: String,
    pub credential_did: String,
    pub credential_private_key_mb: String,
    pub vta_did: String,
    pub vta_url: String,
    pub mediator_did: Option<String>,
    pub user_name: Option<String>,
    pub verifying_key: &'a [u8; 32],
}
Expand description

Inputs to install did-git-sign for an already-provisioned persona.

All fields are values the caller already has — there is no VTA bootstrap here. The function writes the config file, stores VTA credentials in the OS keyring, runs the relevant git config invocations, and updates the allowed_signers file.

The verifying_key is the Ed25519 public key (32 raw bytes) that signs the persona’s commits. It’s used in the allowed_signers entry; the caller is expected to have already derived it from the persona key material.

Fields§

§global: bool

true writes config to the user’s ~/.config/did-git-sign/, false writes a repo-local .did-git-sign.json.

§did_key_id: String

The verification method id, e.g. did:webvh:.../persona#key-1.

§vta_key_id: String

VTA key UUID for the persona’s signing key (stored in keyring so did-git-sign -Y sign can fetch the secret on demand).

§credential_did: String

DID this binary authenticates to the VTA as. The persona admin DID minted during VTA provisioning is the right value here.

§credential_private_key_mb: String

Multibase-encoded private key paired with credential_did.

§vta_did: String

VTA’s own DID (e.g. did:webvh:.../vta).

§vta_url: String

VTA service URL, as resolved from the VTA’s DID document. May be empty for DIDComm-only VTAs — mediator_did must be set in that case so the signer can reach the VTA over DIDComm.

§mediator_did: Option<String>

DIDComm mediator DID advertised by the VTA. When Some, the signer uses DIDComm transport instead of REST. Required when vta_url is empty.

§user_name: Option<String>

Optional git config user.name to set during install.

§verifying_key: &'a [u8; 32]

Persona signing key public bytes (Ed25519, 32 bytes).

Auto Trait Implementations§

§

impl<'a> Freeze for InstallArgs<'a>

§

impl<'a> RefUnwindSafe for InstallArgs<'a>

§

impl<'a> Send for InstallArgs<'a>

§

impl<'a> Sync for InstallArgs<'a>

§

impl<'a> Unpin for InstallArgs<'a>

§

impl<'a> UnsafeUnpin for InstallArgs<'a>

§

impl<'a> UnwindSafe for InstallArgs<'a>

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more