pub struct KeysClient { /* private fields */ }Expand description
Client for keys operations.
Implementations§
Source§impl KeysClient
impl KeysClient
pub fn new(client: Client) -> Self
Sourcepub async fn list_keys(
&self,
query: Option<ListKeysQuery>,
) -> Result<ListKeysResponse, Error>
pub async fn list_keys( &self, query: Option<ListKeysQuery>, ) -> Result<ListKeysResponse, Error>
Retrieve all keys registered for your organization.
Sourcepub async fn create_key(
&self,
body: CreateKeyRequest,
) -> Result<CreateKeyResponse, Error>
pub async fn create_key( &self, body: CreateKeyRequest, ) -> Result<CreateKeyResponse, Error>
Creates a key for the given scheme and curve. Returns the new key entity.
Sourcepub async fn delegate_key(
&self,
key_id: String,
body: DelegateKeyRequest,
) -> Result<DelegateKeyResponse, Error>
pub async fn delegate_key( &self, key_id: String, body: DelegateKeyRequest, ) -> Result<DelegateKeyResponse, Error>
Sourcepub async fn get_key(&self, key_id: String) -> Result<GetKeyResponse, Error>
pub async fn get_key(&self, key_id: String) -> Result<GetKeyResponse, Error>
Retrieves a key information by its ID.
Sourcepub async fn update_key(
&self,
key_id: String,
body: UpdateKeyRequest,
) -> Result<UpdateKeyResponse, Error>
pub async fn update_key( &self, key_id: String, body: UpdateKeyRequest, ) -> Result<UpdateKeyResponse, Error>
Updates the name of an existing key.
Sourcepub async fn delete_key(
&self,
key_id: String,
) -> Result<DeleteKeyResponse, Error>
pub async fn delete_key( &self, key_id: String, ) -> Result<DeleteKeyResponse, Error>
Deletes the key and all wallets using this key. Once deleted, keys (and wallets) are not usable anymore, and won’t count in your overall organisation wallet count.
Sourcepub async fn derive_key(
&self,
key_id: String,
body: DeriveKeyRequest,
) -> Result<DeriveKeyResponse, Error>
pub async fn derive_key( &self, key_id: String, body: DeriveKeyRequest, ) -> Result<DeriveKeyResponse, Error>
Dfns decentralized key management network supports threshold Diffie-Hellman protocol based on GLOW20 paper. You can use the DH protocol to derive output from a domain separation tag and a seed value. The derivation process is deterministic, i.e. the same Diffie-Hellman key and seed will lead to the same derived output. To ensure reproducibility, we use hash to curve RFC9380 and standard ciphersuite secp256k1_XMD:SHA-256_SSWU_RO_.
Sourcepub async fn export_key(
&self,
key_id: String,
body: ExportKeyRequest,
) -> Result<ExportKeyResponse, Error>
pub async fn export_key( &self, key_id: String, body: ExportKeyRequest, ) -> Result<ExportKeyResponse, Error>
Dfns secures private keys by generating them as MPC key shares in our decentralized key management network. Our goal is to eliminate all single points of failure (SPOFs) associated with blockchain private keys.
In certain circumstances, however, customers require Dfns to export a private key. In this case, Dfns exposes the following endpoint which can be used in conjunction with our export SDK. Each signer returns its key share encrypted to an encryption key you provide; the full private key is reconstituted client-side and is never assembled on Dfns servers.
Sourcepub async fn list_signatures(
&self,
key_id: String,
query: Option<ListSignaturesQuery>,
) -> Result<ListSignaturesResponse, Error>
pub async fn list_signatures( &self, key_id: String, query: Option<ListSignaturesQuery>, ) -> Result<ListSignaturesResponse, Error>
List all signature requests for a key.
Sourcepub async fn generate_signature(
&self,
key_id: String,
body: GenerateSignatureRequest,
) -> Result<GenerateSignatureResponse, Error>
pub async fn generate_signature( &self, key_id: String, body: GenerateSignatureRequest, ) -> Result<GenerateSignatureResponse, Error>
Request to generate a signature with the key. This process does not broadcast anything on-chain, this is just an off-chain signature request.
Dfns is compatible with any blockchain that uses a supported key format. If Dfns doesn’t officially integrate with a blockchain, you can use hash signing to generate the signatures to interact with the chain.
Sourcepub async fn get_signature(
&self,
key_id: String,
signature_id: String,
) -> Result<GetSignatureResponse, Error>
pub async fn get_signature( &self, key_id: String, signature_id: String, ) -> Result<GetSignatureResponse, Error>
Retrieve a signature request details.
Sourcepub async fn import_key(
&self,
body: ImportKeyRequest,
) -> Result<ImportKeyResponse, Error>
pub async fn import_key( &self, body: ImportKeyRequest, ) -> Result<ImportKeyResponse, Error>
Dfns secures private keys by generating them as MPC key shares in our decentralized key management network. This happens by default when you create a key or wallet.
In some circumstances, however, you may need to import an existing private key into Dfns infrastructure, instead of creating a brand new wallet with Dfns and transfer funds to it. As an example, you might want to keep an existing wallet if its address is tied to a smart contract which you don’t want to re-deploy.
Trait Implementations§
Source§impl Clone for KeysClient
impl Clone for KeysClient
Source§fn clone(&self) -> KeysClient
fn clone(&self) -> KeysClient
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more