[−][src]Struct algo_rust_sdk::kmd::KmdClient
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]
&self,
wallet_name: &str,
wallet_password: &str,
wallet_driver_name: &str,
master_derivation_key: MasterDerivationKey
) -> Result<CreateWalletResponse, Error>
Creates a wallet
pub fn init_wallet_handle(
&self,
wallet_id: &str,
wallet_password: &str
) -> Result<InitWalletHandleResponse, Error>
[src]
&self,
wallet_id: &str,
wallet_password: &str
) -> Result<InitWalletHandleResponse, Error>
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]
&self,
wallet_handle: &str
) -> Result<ReleaseWalletHandleResponse, Error>
Release a wallet handle token
pub fn renew_wallet_handle(
&self,
wallet_handle: &str
) -> Result<RenewWalletHandleResponse, Error>
[src]
&self,
wallet_handle: &str
) -> Result<RenewWalletHandleResponse, Error>
Renew a wallet handle token
pub fn rename_wallet(
&self,
wallet_id: &str,
wallet_password: &str,
new_name: &str
) -> Result<RenameWalletResponse, Error>
[src]
&self,
wallet_id: &str,
wallet_password: &str,
new_name: &str
) -> Result<RenameWalletResponse, Error>
Rename a wallet
pub fn get_wallet(
&self,
wallet_handle: &str
) -> Result<GetWalletResponse, Error>
[src]
&self,
wallet_handle: &str
) -> Result<GetWalletResponse, Error>
Get wallet info
pub fn export_master_derivation_key(
&self,
wallet_handle: &str,
wallet_password: &str
) -> Result<ExportMasterDerivationKeyResponse, Error>
[src]
&self,
wallet_handle: &str,
wallet_password: &str
) -> Result<ExportMasterDerivationKeyResponse, Error>
Export the master derivation key from a wallet
pub fn import_key(
&self,
wallet_handle: &str,
private_key: [u8; 32]
) -> Result<ImportKeyResponse, Error>
[src]
&self,
wallet_handle: &str,
private_key: [u8; 32]
) -> Result<ImportKeyResponse, Error>
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]
&self,
wallet_handle: &str,
wallet_password: &str,
address: &str
) -> Result<ExportKeyResponse, Error>
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]
&self,
wallet_handle: &str
) -> Result<GenerateKeyResponse, Error>
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]
&self,
wallet_handle: &str,
wallet_password: &str,
address: &str
) -> Result<DeleteKeyResponse, Error>
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]
&self,
wallet_handle: &str,
wallet_password: &str,
transaction: &Transaction
) -> Result<SignTransactionResponse, Error>
Sign a transaction
pub fn list_multisig(
&self,
wallet_handle: &str
) -> Result<ListMultisigResponse, Error>
[src]
&self,
wallet_handle: &str
) -> Result<ListMultisigResponse, Error>
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]
&self,
wallet_handle: &str,
version: u8,
threshold: u8,
pks: &[Ed25519PublicKey]
) -> Result<ImportMultisigResponse, Error>
Import a multisig account
pub fn export_multisig(
&self,
wallet_handle: &str,
address: &str
) -> Result<ExportMultisigResponse, Error>
[src]
&self,
wallet_handle: &str,
address: &str
) -> Result<ExportMultisigResponse, Error>
Export multisig address metadata
pub fn delete_multisig(
&self,
wallet_handle: &str,
wallet_password: &str,
address: &str
) -> Result<DeleteMultisigResponse, Error>
[src]
&self,
wallet_handle: &str,
wallet_password: &str,
address: &str
) -> Result<DeleteMultisigResponse, Error>
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]
&self,
wallet_handle: &str,
wallet_password: &str,
transaction: &Transaction,
public_key: Ed25519PublicKey,
partial_multisig: Option<MultisigSignature>
) -> Result<SignMultisigTransactionResponse, Error>
Start a multisig signature or add a signature to a partially completed multisig signature
Auto Trait Implementations
impl !RefUnwindSafe for KmdClient
[src]
impl Send for KmdClient
[src]
impl Sync for KmdClient
[src]
impl Unpin for KmdClient
[src]
impl !UnwindSafe for KmdClient
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,