com.coinbase.cdp.auth
- PEM-encoded EC keys (ES256)
- Base64-encoded Ed25519 keys (64 bytes: 32-byte seed + 32-byte public key)
- Base64-encoded PKCS#8 DER keys (for wallet secrets)
Method Details
parsePrivateKey
keyData (String) - the key data (PEM string or base64 encoded)
Returns:
PrivateKey - the parsed private key
Throws:
[KeyParseException](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/auth/exceptions/KeyParseException "class in com.coinbase.cdp.auth.exceptions") - if parsing fails
parseWalletKey
walletSecret (String) - the base64-encoded PKCS#8 DER key
Returns:
PrivateKey - the parsed private key
Throws:
[KeyParseException](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/auth/exceptions/KeyParseException "class in com.coinbase.cdp.auth.exceptions") - if parsing fails
isEcKey
key (PrivateKey) - the private key
Returns:
boolean - true if the key uses EC algorithm
isEd25519Key
key (PrivateKey) - the private key
Returns:
boolean - true if the key uses Ed25519/EdDSA algorithm