[][src]Struct algo_rust_sdk::kmd::KmdClient

pub struct KmdClient { /* fields omitted */ }

Client for interacting with the key management daemon

Implementations

impl KmdClient[src]

pub fn new(address: &str, token: &str) -> KmdClient[src]

pub fn versions(&self) -> Result<VersionsResponse, Error>[src]

Retrieves the current version

pub fn list_wallets(&self) -> Result<ListWalletsResponse, Error>[src]

List all of the wallets that kmd is aware of

pub fn create_wallet(
    &self,
    wallet_name: &str,
    wallet_password: &str,
    wallet_driver_name: &str,
    master_derivation_key: MasterDerivationKey
) -> Result<CreateWalletResponse, Error>
[src]

Creates a wallet

pub fn init_wallet_handle(
    &self,
    wallet_id: &str,
    wallet_password: &str
) -> Result<InitWalletHandleResponse, Error>
[src]

Unlock the wallet and return a wallet token that can be used for subsequent operations

These tokens expire periodically and must be renewed. You can see how much time remains until expiration with get_wallet and renew it with renew_wallet_handle. When you're done, you can invalidate the token with release_wallet_handle

pub fn release_wallet_handle(
    &self,
    wallet_handle: &str
) -> Result<ReleaseWalletHandleResponse, Error>
[src]

Release a wallet handle token

pub fn renew_wallet_handle(
    &self,
    wallet_handle: &str
) -> Result<RenewWalletHandleResponse, Error>
[src]

Renew a wallet handle token

pub fn rename_wallet(
    &self,
    wallet_id: &str,
    wallet_password: &str,
    new_name: &str
) -> Result<RenameWalletResponse, Error>
[src]

Rename a wallet

pub fn get_wallet(
    &self,
    wallet_handle: &str
) -> Result<GetWalletResponse, Error>
[src]

Get wallet info

pub fn export_master_derivation_key(
    &self,
    wallet_handle: &str,
    wallet_password: &str
) -> Result<ExportMasterDerivationKeyResponse, Error>
[src]

Export the master derivation key from a wallet

pub fn import_key(
    &self,
    wallet_handle: &str,
    private_key: [u8; 32]
) -> Result<ImportKeyResponse, Error>
[src]

Import an externally generated key into the wallet

pub fn export_key(
    &self,
    wallet_handle: &str,
    wallet_password: &str,
    address: &str
) -> Result<ExportKeyResponse, Error>
[src]

Export the Ed25519 seed associated with the passed address

Note the first 32 bytes of the returned value is the seed, the second 32 bytes is the public key

pub fn generate_key(
    &self,
    wallet_handle: &str
) -> Result<GenerateKeyResponse, Error>
[src]

Generates a key and adds it to the wallet, returning the public key

pub fn delete_key(
    &self,
    wallet_handle: &str,
    wallet_password: &str,
    address: &str
) -> Result<DeleteKeyResponse, Error>
[src]

Deletes the key from the wallet

pub fn list_keys(&self, wallet_handle: &str) -> Result<ListKeysResponse, Error>[src]

List all of the public keys in the wallet

pub fn sign_transaction(
    &self,
    wallet_handle: &str,
    wallet_password: &str,
    transaction: &Transaction
) -> Result<SignTransactionResponse, Error>
[src]

Sign a transaction

pub fn list_multisig(
    &self,
    wallet_handle: &str
) -> Result<ListMultisigResponse, Error>
[src]

Lists all of the multisig accounts whose preimages this wallet stores

pub fn import_multisig(
    &self,
    wallet_handle: &str,
    version: u8,
    threshold: u8,
    pks: &[Ed25519PublicKey]
) -> Result<ImportMultisigResponse, Error>
[src]

Import a multisig account

pub fn export_multisig(
    &self,
    wallet_handle: &str,
    address: &str
) -> Result<ExportMultisigResponse, Error>
[src]

Export multisig address metadata

pub fn delete_multisig(
    &self,
    wallet_handle: &str,
    wallet_password: &str,
    address: &str
) -> Result<DeleteMultisigResponse, Error>
[src]

Delete a multisig from the wallet

pub fn sign_multisig_transaction(
    &self,
    wallet_handle: &str,
    wallet_password: &str,
    transaction: &Transaction,
    public_key: Ed25519PublicKey,
    partial_multisig: Option<MultisigSignature>
) -> Result<SignMultisigTransactionResponse, Error>
[src]

Start a multisig signature or add a signature to a partially completed multisig signature

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

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

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