Portal Community
Private key material is never emitted. None of these operations place private key bytes into config, output, ToDictionary(), or logs — generate's result record has no field capable of holding private bytes, and import's incoming key material lives only in a short-scoped local variable.

generate

FieldTypeRequiredDefaultDescription
keyNametext✓ YesLocal name to assign to the new key.
keyTypeselectNoed25519rsa | ed25519.
keySizeintNoBit length; only meaningful when keyType is rsa.
ipnsBasetextNobase36Multibase encoding used to render the returned Id.

Missing keyNameCFG_MISSING_KEY_NAME. Response: { keyName, keyID } — public identity only.

list

FieldTypeRequiredDefaultDescription
longboolNofalse"Long" listing — include each key's type.
ipnsBasetextNobase36Multibase encoding for each key's Id.

Response: array of { name, id, type? } (includes the implicit self key), plus count.

remove

FieldTypeRequiredDefaultDescription
keyNametext✓ YesLocal name of the key to remove.
showExtraInfoboolNofalseShow extra info (type/size) about the removed key.
ipnsBasetextNobase36Multibase encoding for the returned Id.

Missing keyNameCFG_MISSING_KEY_NAME. Response: { keyName, keyID }.

Irreversible: removal permanently deletes the key from the local keystore. Any IPNS name previously published under it can no longer be updated — the last-published record simply expires per its lifetime.

rename

FieldTypeRequiredDefaultDescription
oldKeyNametext✓ YesCurrent key name.
newKeyNametext✓ YesDesired new key name.
forceboolNofalseOverwrite (and permanently destroy) an existing key already at newKeyName.

Missing fields → CFG_MISSING_OLD_KEY_NAME, then CFG_MISSING_NEW_KEY_NAME. Renaming does not change the underlying keypair or its Id — only the local label.

import

Binary input — the key material itself is never a config key.

FieldTypeRequiredDefaultDescription
keyNametext✓ YesLocal name to assign to the imported key.
inputDataKeytextNodataInputData key under which the upstream node's key material is expected.
dataModeselectNobase64base64 | text.
inlineContenttextNoInline fallback key material — never re-emitted anywhere.
formatselectNolibp2p-keylibp2p-key | pem-pkcs8-cleartext.
allowAnyKeyTypeboolNofalseRelax Kubo's importable-key-type restriction.

Missing keyNameCFG_MISSING_KEY_NAME. Response: { keyName, keyID }.