Interface DelegatedKeyPairService
- All Superinterfaces:
DelegatedPublicKeyProvider
-
Method Summary
Modifier and TypeMethodDescriptionvoid
createKeyPair
(KeyMetadata keyMetadata) Create a new delegated key pair.Methods inherited from interface org.xrpl.xrpl4j.crypto.core.signing.DelegatedPublicKeyProvider
getPublicKey
-
Method Details
-
createKeyPair
Create a new delegated key pair.There is often some inherent latency with creating new key pairs on external systems such as an HSM or a cloud based key management system. In some cases, those external APIs will eagerly return a successful result before the key pair has actually been generated. Therefore, this method does not return anything, and callers should not expect that a key pair has been generated on the external system yet just because this method did not throw an exception.
With this in mind, users should call this method to create a key pair, then call
DelegatedPublicKeyProvider.getPublicKey(KeyMetadata)
until it returns a result. Alternatively, the implementation ofDelegatedPublicKeyProvider.getPublicKey(KeyMetadata)
could poll until it receives a successful result containing a public key.- Parameters:
keyMetadata
- TheKeyMetadata
identifying the key pair to create.
-