Key Operations
resource: key — 5 operations managing the IPNS keys used to sign publishes
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
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
keyName | text | ✓ Yes | — | Local name to assign to the new key. |
keyType | select | No | ed25519 | rsa | ed25519. |
keySize | int | No | — | Bit length; only meaningful when keyType is rsa. |
ipnsBase | text | No | base36 | Multibase encoding used to render the returned Id. |
Missing keyName → CFG_MISSING_KEY_NAME. Response: { keyName, keyID
} — public identity only.
list
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
long | bool | No | false | "Long" listing — include each key's type. |
ipnsBase | text | No | base36 | Multibase encoding for each key's Id. |
Response: array of { name, id, type? } (includes the implicit self key), plus
count.
remove
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
keyName | text | ✓ Yes | — | Local name of the key to remove. |
showExtraInfo | bool | No | false | Show extra info (type/size) about the removed key. |
ipnsBase | text | No | base36 | Multibase encoding for the returned Id. |
Missing keyName → CFG_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
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
oldKeyName | text | ✓ Yes | — | Current key name. |
newKeyName | text | ✓ Yes | — | Desired new key name. |
force | bool | No | false | Overwrite (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.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
keyName | text | ✓ Yes | — | Local name to assign to the imported key. |
inputDataKey | text | No | data | InputData key under which the upstream node's key material is expected. |
dataMode | select | No | base64 | base64 | text. |
inlineContent | text | No | — | Inline fallback key material — never re-emitted anywhere. |
format | select | No | libp2p-key | libp2p-key | pem-pkcs8-cleartext. |
allowAnyKeyType | bool | No | false | Relax Kubo's importable-key-type restriction. |
Missing keyName → CFG_MISSING_KEY_NAME. Response: { keyName, keyID
}.