Skip to main content

Commands

Enum Commands 

Source
pub enum Commands {
    Generate {
        method: String,
        key_type: String,
        domain: Option<String>,
        output: Option<PathBuf>,
        key_output: Option<PathBuf>,
        save: bool,
        default: bool,
        label: Option<String>,
    },
    Lookup {
        did: String,
        output: Option<PathBuf>,
    },
    Keys {
        subcommand: Option<KeysCommands>,
    },
    Import {
        key_file: PathBuf,
        default: bool,
        label: Option<String>,
    },
    Pack {
        input: PathBuf,
        output: Option<PathBuf>,
        sender: Option<String>,
        recipient: Option<String>,
        mode: String,
    },
    Unpack {
        input: PathBuf,
        output: Option<PathBuf>,
        recipient: Option<String>,
    },
}
Expand description

Available CLI commands

Variants§

§

Generate

Generate a new DID

Fields

§method: String

The DID method to use (key or web)

§key_type: String

The key type to use

§domain: Option<String>

Domain for did:web (required if method is ‘web’)

§output: Option<PathBuf>

Output file path for the DID document

§key_output: Option<PathBuf>

Output file for private key (if not specified, key is shown only in console)

§save: bool

Save key to default location (~/.tap/keys.json)

§default: bool

Set as default key

§label: Option<String>

Label for the key (defaults to agent-{n})

§

Lookup

Lookup and resolve a DID to its DID Document

Fields

§did: String

The DID to resolve

§output: Option<PathBuf>

Output file path for the resolved DID document

§

Keys

List all stored keys

Fields

§subcommand: Option<KeysCommands>
§

Import

Import an existing key into storage

Fields

§key_file: PathBuf

The JSON file containing the key to import

§default: bool

Set as default key

§label: Option<String>

Label for the imported key (defaults to agent-{n})

§

Pack

Pack a plaintext DIDComm message

Fields

§input: PathBuf

The input file containing the plaintext message

§output: Option<PathBuf>

The output file for the packed message

§sender: Option<String>

The DID of the sender (uses default if not specified)

§recipient: Option<String>

The DID of the recipient

§mode: String

The security mode to use (plain, signed, authcrypt, or anoncrypt)

§

Unpack

Unpack a signed or encrypted DIDComm message

Fields

§input: PathBuf

The input file containing the packed message

§output: Option<PathBuf>

The output file for the unpacked message

§recipient: Option<String>

The DID of the recipient (uses default if not specified)

Trait Implementations§

Source§

impl Debug for Commands

Source§

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

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

impl FromArgMatches for Commands

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for Commands

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

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> 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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: 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: 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> 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<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