@code-yeongyu/senpi 2026.6.4 → 2026.6.10-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +69 -1
- package/README.md +116 -99
- package/dist/bun/cli.d.ts.map +1 -1
- package/dist/bun/cli.js.map +1 -1
- package/dist/bun/register-bedrock.d.ts.map +1 -1
- package/dist/bun/restore-sandbox-env.d.ts.map +1 -1
- package/dist/bun/restore-sandbox-env.js.map +1 -1
- package/dist/cli/args.d.ts +1 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +13 -4
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/config-selector.d.ts.map +1 -1
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/cli/file-processor.d.ts.map +1 -1
- package/dist/cli/file-processor.js.map +1 -1
- package/dist/cli/initial-message.d.ts +1 -1
- package/dist/cli/initial-message.d.ts.map +1 -1
- package/dist/cli/initial-message.js.map +1 -1
- package/dist/cli/list-models.d.ts.map +1 -1
- package/dist/cli/list-models.js.map +1 -1
- package/dist/cli/project-trust.d.ts +10 -0
- package/dist/cli/project-trust.d.ts.map +1 -0
- package/dist/cli/project-trust.js +48 -0
- package/dist/cli/project-trust.js.map +1 -0
- package/dist/cli/session-picker.d.ts.map +1 -1
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/cli/startup-ui.d.ts +7 -0
- package/dist/cli/startup-ui.d.ts.map +1 -0
- package/dist/cli/startup-ui.js +59 -0
- package/dist/cli/startup-ui.js.map +1 -0
- package/dist/cli-main.d.ts.map +1 -1
- package/dist/cli-main.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +10 -1
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts +3 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +4 -9
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +2 -1
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +2 -2
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +33 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +57 -79
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-guidance.d.ts.map +1 -1
- package/dist/core/auth-guidance.js.map +1 -1
- package/dist/core/auth-storage.d.ts +4 -0
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +4 -8
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/index.d.ts.map +1 -1
- package/dist/core/compaction/utils.d.ts +1 -1
- package/dist/core/compaction/utils.d.ts.map +1 -1
- package/dist/core/compaction/utils.js +1 -1
- package/dist/core/compaction/utils.js.map +1 -1
- package/dist/core/defaults.d.ts.map +1 -1
- package/dist/core/diagnostics.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/build.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/build.js.map +1 -1
- package/dist/core/dynamic-prompt/exploration.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/exploration.js.map +1 -1
- package/dist/core/dynamic-prompt/identity.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/identity.js.map +1 -1
- package/dist/core/dynamic-prompt/index.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/intent-gate.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/intent-gate.js.map +1 -1
- package/dist/core/dynamic-prompt/parallel-tools.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/parallel-tools.js.map +1 -1
- package/dist/core/dynamic-prompt/policies.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/policies.js.map +1 -1
- package/dist/core/dynamic-prompt/style.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/style.js.map +1 -1
- package/dist/core/dynamic-prompt/tool-categorization.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/tool-categorization.js.map +1 -1
- package/dist/core/dynamic-prompt/tool-section.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/tool-section.js.map +1 -1
- package/dist/core/dynamic-prompt/types.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/verification.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/verification.js.map +1 -1
- package/dist/core/event-bus.d.ts.map +1 -1
- package/dist/core/event-bus.js.map +1 -1
- package/dist/core/exec.d.ts.map +1 -1
- package/dist/core/exec.js.map +1 -1
- package/dist/core/export-html/ansi-to-html.d.ts.map +1 -1
- package/dist/core/export-html/ansi-to-html.js.map +1 -1
- package/dist/core/export-html/index.d.ts.map +1 -1
- package/dist/core/export-html/index.js.map +1 -1
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
- package/dist/core/export-html/tool-renderer.js.map +1 -1
- package/dist/core/extensions/builtin/anthropic-bash/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/anthropic-bash/index.js.map +1 -1
- package/dist/core/extensions/builtin/anthropic-web-search/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/anthropic-web-search/index.js.map +1 -1
- package/dist/core/extensions/builtin/bash-timeout/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/bash-timeout/index.js.map +1 -1
- package/dist/core/extensions/builtin/bash-timeout/timeout.d.ts.map +1 -1
- package/dist/core/extensions/builtin/bash-timeout/timeout.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/checkpoint-state.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/checkpoint-state.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/circuit-breaker.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/circuit-breaker.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/context-reduction.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/context-reduction.js +1 -1
- package/dist/core/extensions/builtin/compaction/context-reduction.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/degradation-monitor.d.ts +0 -1
- package/dist/core/extensions/builtin/compaction/degradation-monitor.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/degradation-monitor.js +0 -1
- package/dist/core/extensions/builtin/compaction/degradation-monitor.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/index.js +4 -4
- package/dist/core/extensions/builtin/compaction/index.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/openai-remote.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/openai-remote.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/per-turn-cap.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/per-turn-cap.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/policy.d.ts +0 -5
- package/dist/core/extensions/builtin/compaction/policy.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/policy.js +0 -4
- package/dist/core/extensions/builtin/compaction/policy.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/prompts.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/prompts.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/repair-tool-pairs.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/repair-tool-pairs.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/restoration-tracker.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/restoration-tracker.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/speculative.d.ts +0 -6
- package/dist/core/extensions/builtin/compaction/speculative.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/speculative.js +0 -3
- package/dist/core/extensions/builtin/compaction/speculative.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/state.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/state.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/todo-bridge.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/todo-bridge.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/tool-truncation.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/tool-truncation.js.map +1 -1
- package/dist/core/extensions/builtin/diff.d.ts.map +1 -1
- package/dist/core/extensions/builtin/diff.js.map +1 -1
- package/dist/core/extensions/builtin/files.d.ts.map +1 -1
- package/dist/core/extensions/builtin/files.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/apply.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/apply.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/constants.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/constants.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/errors.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/errors.js +0 -2
- package/dist/core/extensions/builtin/gpt-apply-patch/errors.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/extension.d.ts +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/extension.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/extension.js +10 -2
- package/dist/core/extensions/builtin/gpt-apply-patch/extension.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/params.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/params.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/parser.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/parser.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/patch-diff.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/patch-diff.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/patch-replace.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/patch-replace.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/preview-format.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/preview-format.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/preview.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/preview.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/seek-sequence.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/seek-sequence.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/streaming-parser.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/streaming-parser.js +7 -5
- package/dist/core/extensions/builtin/gpt-apply-patch/streaming-parser.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/streaming-render.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/streaming-render.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/text.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/text.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/tool.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/tool.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/types.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/workspace.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/workspace.js.map +1 -1
- package/dist/core/extensions/builtin/history-search/filter.d.ts.map +1 -1
- package/dist/core/extensions/builtin/history-search/filter.js.map +1 -1
- package/dist/core/extensions/builtin/history-search/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/history-search/index.js.map +1 -1
- package/dist/core/extensions/builtin/history-search/indexer.d.ts.map +1 -1
- package/dist/core/extensions/builtin/history-search/indexer.js.map +1 -1
- package/dist/core/extensions/builtin/history-search/overlay.d.ts.map +1 -1
- package/dist/core/extensions/builtin/history-search/overlay.js +3 -6
- package/dist/core/extensions/builtin/history-search/overlay.js.map +1 -1
- package/dist/core/extensions/builtin/history-search/types.d.ts.map +1 -1
- package/dist/core/extensions/builtin/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/kimi-web-search/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/kimi-web-search/index.js.map +1 -1
- package/dist/core/extensions/builtin/openai-web-search/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/openai-web-search/index.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/arity.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/arity.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/cli.d.ts +0 -3
- package/dist/core/extensions/builtin/permission-system/cli.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/cli.js +0 -13
- package/dist/core/extensions/builtin/permission-system/cli.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/config.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/config.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/evaluate.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/evaluate.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/events.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/events.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/external-dir.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/external-dir.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/index.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/non-interactive.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/non-interactive.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/parsers.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/parsers.js +3 -1
- package/dist/core/extensions/builtin/permission-system/parsers.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/prompt.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/prompt.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/service.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/service.js +2 -5
- package/dist/core/extensions/builtin/permission-system/service.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/settings.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/settings.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/storage.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/storage.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/types.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/types.js +3 -5
- package/dist/core/extensions/builtin/permission-system/types.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/wildcard.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/wildcard.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-5.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-5.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-6.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-6.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-7.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-7.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/file-operations.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/file-operations.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.2.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.2.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.3-codex.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.3-codex.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.4.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.4.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.5.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.5.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/index.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/kimi-k2-6.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/kimi-k2-6.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/presets.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/presets.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/settings.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/settings.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-url-widget.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-url-widget.js.map +1 -1
- package/dist/core/extensions/builtin/redraws.d.ts.map +1 -1
- package/dist/core/extensions/builtin/redraws.js.map +1 -1
- package/dist/core/extensions/builtin/service-tier.d.ts.map +1 -1
- package/dist/core/extensions/builtin/service-tier.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/index.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/loader.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/loader.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/overlay-format.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/overlay-format.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/overlay.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/overlay.js +13 -18
- package/dist/core/extensions/builtin/session-observer/overlay.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/scanner.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/scanner.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/text.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/text.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/transcript-entries.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/transcript-entries.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/transcript-format.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/transcript-format.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/transcript.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/transcript.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/types.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/index.js +0 -2
- package/dist/core/extensions/builtin/todotools/index.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/prompt.d.ts +1 -1
- package/dist/core/extensions/builtin/todotools/prompt.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/prompt.js +0 -2
- package/dist/core/extensions/builtin/todotools/prompt.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/state.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/state.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/tools/todoread.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/tools/todoread.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/tools/todowrite.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/tools/todowrite.js.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/index.js.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.d.ts.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.js.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-openai-chat-completions-payload.d.ts.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-openai-chat-completions-payload.js.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-openai-responses-payload.d.ts.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-openai-responses-payload.js.map +1 -1
- package/dist/core/extensions/builtin/tps.d.ts.map +1 -1
- package/dist/core/extensions/builtin/tps.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +4 -4
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +7 -2
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +69 -43
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +22 -2
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/extensions/wrapper.d.ts.map +1 -1
- package/dist/core/extensions/wrapper.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +17 -18
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/http-dispatcher.d.ts.map +1 -1
- package/dist/core/http-dispatcher.js.map +1 -1
- package/dist/core/keybindings.d.ts +1 -1
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +0 -1
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js.map +1 -1
- package/dist/core/model-registry.d.ts +3 -4
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +31 -16
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/output-guard.d.ts.map +1 -1
- package/dist/core/output-guard.js.map +1 -1
- package/dist/core/package-manager.d.ts +1 -0
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +25 -13
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/project-trust.d.ts +15 -0
- package/dist/core/project-trust.d.ts.map +1 -0
- package/dist/core/project-trust.js +58 -0
- package/dist/core/project-trust.js.map +1 -0
- package/dist/core/prompt-templates.d.ts +2 -1
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js +24 -26
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/provider-attribution.d.ts.map +1 -1
- package/dist/core/provider-attribution.js.map +1 -1
- package/dist/core/provider-display-names.d.ts.map +1 -1
- package/dist/core/resolve-config-value.d.ts +0 -4
- package/dist/core/resolve-config-value.d.ts.map +1 -1
- package/dist/core/resolve-config-value.js +0 -15
- package/dist/core/resolve-config-value.js.map +1 -1
- package/dist/core/resource-loader.d.ts +14 -2
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +117 -74
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-cwd.d.ts.map +1 -1
- package/dist/core/session-cwd.js +0 -1
- package/dist/core/session-cwd.js.map +1 -1
- package/dist/core/session-manager.d.ts +3 -0
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +41 -28
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/session-resident-store.d.ts +16 -0
- package/dist/core/session-resident-store.d.ts.map +1 -0
- package/dist/core/session-resident-store.js +48 -0
- package/dist/core/session-resident-store.js.map +1 -0
- package/dist/core/session-work-barrier.d.ts.map +1 -1
- package/dist/core/session-work-barrier.js +5 -3
- package/dist/core/session-work-barrier.js.map +1 -1
- package/dist/core/settings-manager.d.ts +14 -2
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +86 -46
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +1 -0
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/source-info.d.ts.map +1 -1
- package/dist/core/source-info.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/telemetry.d.ts.map +1 -1
- package/dist/core/telemetry.js.map +1 -1
- package/dist/core/thinking-levels.d.ts.map +1 -1
- package/dist/core/thinking-levels.js.map +1 -1
- package/dist/core/timings.d.ts.map +1 -1
- package/dist/core/timings.js.map +1 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +9 -6
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/diff-render.d.ts.map +1 -1
- package/dist/core/tools/diff-render.js.map +1 -1
- package/dist/core/tools/edit-diff.d.ts +0 -5
- package/dist/core/tools/edit-diff.d.ts.map +1 -1
- package/dist/core/tools/edit-diff.js +0 -7
- package/dist/core/tools/edit-diff.js.map +1 -1
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/file-mutation-queue.d.ts.map +1 -1
- package/dist/core/tools/file-mutation-queue.js.map +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +1 -1
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +1 -1
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/index.d.ts +0 -5
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +0 -67
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +1 -1
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/output-accumulator.d.ts.map +1 -1
- package/dist/core/tools/output-accumulator.js +12 -18
- package/dist/core/tools/output-accumulator.js.map +1 -1
- package/dist/core/tools/path-utils.d.ts.map +1 -1
- package/dist/core/tools/path-utils.js.map +1 -1
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +1 -1
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
- package/dist/core/tools/truncate.d.ts.map +1 -1
- package/dist/core/tools/truncate.js.map +1 -1
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +1 -2
- package/dist/core/tools/write.js.map +1 -1
- package/dist/core/trust-manager.d.ts +31 -0
- package/dist/core/trust-manager.d.ts.map +1 -0
- package/dist/core/trust-manager.js +186 -0
- package/dist/core/trust-manager.js.map +1 -0
- package/dist/index.d.ts +5 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +101 -86
- package/dist/main.js.map +1 -1
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js +39 -34
- package/dist/migrations.js.map +1 -1
- package/dist/modes/index.d.ts +1 -1
- package/dist/modes/index.d.ts.map +1 -1
- package/dist/modes/index.js.map +1 -1
- package/dist/modes/interactive/components/armin.d.ts.map +1 -1
- package/dist/modes/interactive/components/armin.js +6 -10
- package/dist/modes/interactive/components/armin.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +2 -11
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js +6 -11
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.js +0 -3
- package/dist/modes/interactive/components/bordered-loader.js.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.js +1 -3
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.js +1 -3
- package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/config-selector.js +5 -15
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -1
- package/dist/modes/interactive/components/countdown-timer.js +0 -5
- package/dist/modes/interactive/components/countdown-timer.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +1 -8
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +1 -6
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/daxnuts.d.ts.map +1 -1
- package/dist/modes/interactive/components/daxnuts.js +6 -8
- package/dist/modes/interactive/components/daxnuts.js.map +1 -1
- package/dist/modes/interactive/components/diff.d.ts.map +1 -1
- package/dist/modes/interactive/components/diff.js +2 -2
- package/dist/modes/interactive/components/diff.js.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.js +0 -1
- package/dist/modes/interactive/components/dynamic-border.js.map +1 -1
- package/dist/modes/interactive/components/earendil-announcement.d.ts.map +1 -1
- package/dist/modes/interactive/components/earendil-announcement.js.map +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-editor.js +1 -6
- package/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/dist/modes/interactive/components/extension-input.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-input.js +2 -8
- package/dist/modes/interactive/components/extension-input.js.map +1 -1
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-selector.js +1 -9
- package/dist/modes/interactive/components/extension-selector.js.map +1 -1
- package/dist/modes/interactive/components/favorite-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/favorite-models-selector.js +9 -15
- package/dist/modes/interactive/components/favorite-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +10 -3
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +1 -0
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js +1 -0
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts +1 -0
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +10 -10
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/model-favorites.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-favorites.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +9 -22
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +3 -12
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +33 -58
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +3 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +20 -4
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/show-images-selector.js +0 -1
- package/dist/modes/interactive/components/show-images-selector.js.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.js +1 -3
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
- package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/theme-selector.js +0 -2
- package/dist/modes/interactive/components/theme-selector.js.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.js +0 -1
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +35 -32
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector.js +18 -32
- package/dist/modes/interactive/components/tree-selector.js.map +1 -1
- package/dist/modes/interactive/components/trust-selector.d.ts +23 -0
- package/dist/modes/interactive/components/trust-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/trust-selector.js +85 -0
- package/dist/modes/interactive/components/trust-selector.js.map +1 -0
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.js +3 -6
- package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +0 -1
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +39 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +264 -114
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/session-info-format.d.ts.map +1 -1
- package/dist/modes/interactive/session-info-format.js.map +1 -1
- package/dist/modes/interactive/startup-tools.d.ts.map +1 -1
- package/dist/modes/interactive/startup-tools.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts +0 -4
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +0 -13
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/interactive/working-status.d.ts +2 -0
- package/dist/modes/interactive/working-status.d.ts.map +1 -1
- package/dist/modes/interactive/working-status.js +34 -0
- package/dist/modes/interactive/working-status.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/provider-native-rendering.d.ts.map +1 -1
- package/dist/modes/provider-native-rendering.js.map +1 -1
- package/dist/modes/rpc/jsonl.d.ts.map +1 -1
- package/dist/modes/rpc/jsonl.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +7 -8
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +0 -1
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/package-manager-cli.d.ts +6 -2
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +105 -11
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/self-update-bootstrap.d.ts.map +1 -1
- package/dist/self-update-bootstrap.js.map +1 -1
- package/dist/senpi +10 -1
- package/dist/utils/ansi.d.ts.map +1 -1
- package/dist/utils/ansi.js.map +1 -1
- package/dist/utils/changelog.d.ts +1 -0
- package/dist/utils/changelog.d.ts.map +1 -1
- package/dist/utils/changelog.js +78 -0
- package/dist/utils/changelog.js.map +1 -1
- package/dist/utils/child-process.d.ts.map +1 -1
- package/dist/utils/child-process.js.map +1 -1
- package/dist/utils/clipboard-image.d.ts.map +1 -1
- package/dist/utils/clipboard-image.js.map +1 -1
- package/dist/utils/clipboard-native.d.ts.map +1 -1
- package/dist/utils/clipboard-native.js.map +1 -1
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/deprecation.d.ts.map +1 -1
- package/dist/utils/deprecation.js.map +1 -1
- package/dist/utils/exif-orientation.d.ts.map +1 -1
- package/dist/utils/exif-orientation.js.map +1 -1
- package/dist/utils/frontmatter.d.ts.map +1 -1
- package/dist/utils/frontmatter.js.map +1 -1
- package/dist/utils/fs-watch.d.ts.map +1 -1
- package/dist/utils/fs-watch.js.map +1 -1
- package/dist/utils/git.d.ts.map +1 -1
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/html.d.ts.map +1 -1
- package/dist/utils/html.js.map +1 -1
- package/dist/utils/image-convert.d.ts.map +1 -1
- package/dist/utils/image-convert.js.map +1 -1
- package/dist/utils/image-resize-core.d.ts.map +1 -1
- package/dist/utils/image-resize-core.js.map +1 -1
- package/dist/utils/image-resize-worker.d.ts.map +1 -1
- package/dist/utils/image-resize-worker.js.map +1 -1
- package/dist/utils/image-resize.d.ts.map +1 -1
- package/dist/utils/image-resize.js.map +1 -1
- package/dist/utils/json.d.ts.map +1 -1
- package/dist/utils/json.js.map +1 -1
- package/dist/utils/mime.d.ts.map +1 -1
- package/dist/utils/mime.js.map +1 -1
- package/dist/utils/open-browser.d.ts.map +1 -1
- package/dist/utils/open-browser.js.map +1 -1
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/photon.d.ts.map +1 -1
- package/dist/utils/photon.js.map +1 -1
- package/dist/utils/pi-user-agent.d.ts.map +1 -1
- package/dist/utils/pi-user-agent.js.map +1 -1
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/sleep.d.ts.map +1 -1
- package/dist/utils/sleep.js.map +1 -1
- package/dist/utils/syntax-highlight.d.ts.map +1 -1
- package/dist/utils/syntax-highlight.js.map +1 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js.map +1 -1
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js.map +1 -1
- package/dist/utils/windows-self-update.d.ts.map +1 -1
- package/dist/utils/windows-self-update.js.map +1 -1
- package/docs/compaction-guide.md +9 -9
- package/docs/compaction.md +2 -2
- package/docs/containerization.md +22 -22
- package/docs/custom-provider.md +13 -13
- package/docs/development.md +4 -2
- package/docs/docs.json +4 -0
- package/docs/extensions.md +46 -18
- package/docs/index.md +5 -4
- package/docs/json.md +21 -15
- package/docs/keybindings.md +6 -3
- package/docs/models.md +10 -43
- package/docs/packages.md +12 -12
- package/docs/prompt-templates.md +11 -4
- package/docs/providers.md +9 -9
- package/docs/rpc.md +14 -13
- package/docs/sdk.md +18 -9
- package/docs/security.md +55 -0
- package/docs/session-format.md +4 -4
- package/docs/sessions.md +14 -14
- package/docs/settings.md +20 -7
- package/docs/skills.md +11 -11
- package/docs/terminal-setup.md +38 -4
- package/docs/termux.md +3 -3
- package/docs/themes.md +1 -1
- package/docs/tmux.md +4 -2
- package/docs/tui.md +4 -4
- package/docs/usage.md +60 -50
- package/examples/extensions/README.md +1 -0
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/minimal-mode.ts +6 -6
- package/examples/extensions/project-trust.ts +64 -0
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/node_modules/@earendil-works/pi-agent-core/README.md +4 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +125 -77
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts +7 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.js +2 -27
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +7 -20
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/utils.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/utils.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +0 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.js +0 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.js +0 -7
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.js +3 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.js +0 -5
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/uuid.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/uuid.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/system-prompt.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/system-prompt.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts +0 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js +0 -20
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/node.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +7 -4
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/package.json +6 -6
- package/node_modules/@earendil-works/pi-ai/README.md +4 -5
- package/node_modules/@earendil-works/pi-ai/dist/api-registry.d.ts +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/api-registry.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api-registry.js +0 -3
- package/node_modules/@earendil-works/pi-ai/dist/api-registry.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/bedrock-provider.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/cli.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/cli.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/image-models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts +30 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +30 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/image-models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/images-api-registry.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/images-api-registry.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/images.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/images.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +584 -397
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +578 -509
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/oauth.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js +15 -7
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.d.ts +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js +17 -7
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot-headers.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot-headers.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-shared.d.ts +0 -4
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-shared.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-shared.js +0 -13
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-shared.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/openrouter.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/openrouter.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/register-builtins.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/register-builtins.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.js +3 -3
- package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js +0 -7
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js +5 -4
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-prompt-cache.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-prompt-cache.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js +3 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/register-builtins.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/register-builtins.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.d.ts +1 -7
- package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.js +2 -16
- package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/transform-messages.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/transform-messages.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/session-resources.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/session-resources.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/stream.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/stream.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/context-transformer.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/context-transformer.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/gemma4.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/gemma4.js +10 -8
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/gemma4.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/hermes.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/hermes.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/json-mix.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/json-mix.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/morph-xml.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/morph-xml.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/xml-tool-tag-scanner.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/xml-tool-tag-scanner.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/yaml-xml.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/yaml-xml.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/stream-wrapper.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/stream-wrapper.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +6 -2
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/abort-signals.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/abort-signals.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/diagnostics.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/diagnostics.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js +3 -7
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/hash.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/hash.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/headers.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/headers.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/json-parse.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/json-parse.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/node-http-proxy.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/node-http-proxy.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/anthropic.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/anthropic.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/device-code.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/device-code.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/oauth-page.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/oauth-page.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/pkce.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/pkce.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts +0 -4
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +0 -6
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/sanitize-unicode.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/sanitize-unicode.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/tool-pair-repair.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/tool-pair-repair.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/typebox-helpers.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/typebox-helpers.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/validation.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/validation.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/package.json +5 -5
- package/node_modules/@earendil-works/pi-tui/README.md +1 -2
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts +3 -1
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js +0 -3
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/box.js +1 -6
- package/node_modules/@earendil-works/pi-tui/dist/components/box.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.js +4 -3
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +6 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +132 -93
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/image.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/image.js +0 -8
- package/node_modules/@earendil-works/pi-tui/dist/components/image.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/input.js +14 -14
- package/node_modules/@earendil-works/pi-tui/dist/components/input.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts +5 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.js +29 -17
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +0 -11
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js +4 -9
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +4 -12
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.js +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/text.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/text.js +0 -8
- package/node_modules/@earendil-works/pi-tui/dist/components/text.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.js +0 -3
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/editor-component.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js +131 -61
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.js +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js +2 -4
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keys.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keys.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.js +3 -1
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/slash-command-autocomplete.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/slash-command-autocomplete.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js +4 -6
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +4 -7
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +4 -7
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js +60 -103
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.js +39 -31
- package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.js +3 -1
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +0 -4
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.js +57 -33
- package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/word-navigation.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/word-navigation.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/node_modules/@types/node/README.md +3 -3
- package/node_modules/@types/node/assert/strict.d.ts +3 -55
- package/node_modules/@types/node/assert.d.ts +49 -177
- package/node_modules/@types/node/async_hooks.d.ts +151 -43
- package/node_modules/@types/node/buffer.buffer.d.ts +2 -8
- package/node_modules/@types/node/buffer.d.ts +43 -212
- package/node_modules/@types/node/child_process.d.ts +23 -133
- package/node_modules/@types/node/cluster.d.ts +238 -384
- package/node_modules/@types/node/compatibility/iterators.d.ts +1 -0
- package/node_modules/@types/node/console.d.ts +45 -404
- package/node_modules/@types/node/constants.d.ts +3 -10
- package/node_modules/@types/node/crypto.d.ts +640 -1127
- package/node_modules/@types/node/dgram.d.ts +14 -77
- package/node_modules/@types/node/diagnostics_channel.d.ts +3 -29
- package/node_modules/@types/node/dns/promises.d.ts +4 -10
- package/node_modules/@types/node/dns.d.ts +130 -177
- package/node_modules/@types/node/domain.d.ts +12 -32
- package/node_modules/@types/node/events.d.ts +872 -840
- package/node_modules/@types/node/fs/promises.d.ts +193 -20
- package/node_modules/@types/node/fs.d.ts +754 -435
- package/node_modules/@types/node/globals.d.ts +8 -30
- package/node_modules/@types/node/globals.typedarray.d.ts +63 -0
- package/node_modules/@types/node/http.d.ts +363 -305
- package/node_modules/@types/node/http2.d.ts +545 -781
- package/node_modules/@types/node/https.d.ts +64 -243
- package/node_modules/@types/node/index.d.ts +26 -6
- package/node_modules/@types/node/inspector/promises.d.ts +35 -0
- package/node_modules/@types/node/inspector.d.ts +68 -57
- package/node_modules/@types/node/inspector.generated.d.ts +764 -410
- package/node_modules/@types/node/module.d.ts +53 -189
- package/node_modules/@types/node/net.d.ts +101 -207
- package/node_modules/@types/node/os.d.ts +11 -19
- package/node_modules/@types/node/package.json +13 -3
- package/node_modules/@types/node/path/posix.d.ts +8 -0
- package/node_modules/@types/node/path/win32.d.ts +8 -0
- package/node_modules/@types/node/path.d.ts +119 -141
- package/node_modules/@types/node/perf_hooks.d.ts +317 -673
- package/node_modules/@types/node/process.d.ts +277 -157
- package/node_modules/@types/node/punycode.d.ts +3 -31
- package/node_modules/@types/node/querystring.d.ts +3 -16
- package/node_modules/@types/node/quic.d.ts +897 -0
- package/node_modules/@types/node/readline/promises.d.ts +3 -6
- package/node_modules/@types/node/readline.d.ts +65 -152
- package/node_modules/@types/node/repl.d.ts +101 -109
- package/node_modules/@types/node/sea.d.ts +9 -115
- package/node_modules/@types/node/sqlite.d.ts +415 -68
- package/node_modules/@types/node/stream/consumers.d.ts +91 -15
- package/node_modules/@types/node/stream/iter.d.ts +301 -0
- package/node_modules/@types/node/stream/promises.d.ts +136 -15
- package/node_modules/@types/node/stream/web.d.ts +179 -501
- package/node_modules/@types/node/stream.d.ts +577 -490
- package/node_modules/@types/node/string_decoder.d.ts +3 -43
- package/node_modules/@types/node/test/reporters.d.ts +59 -0
- package/node_modules/@types/node/test.d.ts +402 -286
- package/node_modules/@types/node/timers/promises.d.ts +3 -18
- package/node_modules/@types/node/timers.d.ts +3 -141
- package/node_modules/@types/node/tls.d.ts +115 -241
- package/node_modules/@types/node/trace_events.d.ts +3 -97
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +2 -8
- package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +2 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +28 -6
- package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
- package/node_modules/@types/node/ts5.7/index.d.ts +119 -0
- package/node_modules/@types/node/tty.d.ts +57 -40
- package/node_modules/@types/node/url.d.ts +156 -584
- package/node_modules/@types/node/util/types.d.ts +558 -0
- package/node_modules/@types/node/util.d.ts +167 -1096
- package/node_modules/@types/node/v8.d.ts +75 -15
- package/node_modules/@types/node/vm.d.ts +334 -198
- package/node_modules/@types/node/wasi.d.ts +24 -74
- package/node_modules/@types/node/web-globals/abortcontroller.d.ts +27 -2
- package/node_modules/@types/node/web-globals/blob.d.ts +23 -0
- package/node_modules/@types/node/web-globals/console.d.ts +9 -0
- package/node_modules/@types/node/web-globals/crypto.d.ts +39 -0
- package/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
- package/node_modules/@types/node/web-globals/events.d.ts +9 -0
- package/node_modules/@types/node/web-globals/fetch.d.ts +14 -0
- package/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
- package/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
- package/node_modules/@types/node/web-globals/navigator.d.ts +3 -0
- package/node_modules/@types/node/web-globals/performance.d.ts +45 -0
- package/node_modules/@types/node/web-globals/streams.d.ts +115 -0
- package/node_modules/@types/node/web-globals/timers.d.ts +44 -0
- package/node_modules/@types/node/web-globals/url.d.ts +24 -0
- package/node_modules/@types/node/worker_threads.d.ts +280 -393
- package/node_modules/@types/node/zlib/iter.d.ts +131 -0
- package/node_modules/@types/node/zlib.d.ts +7 -165
- package/node_modules/undici-types/agent.d.ts +13 -12
- package/node_modules/undici-types/api.d.ts +26 -26
- package/node_modules/undici-types/balanced-pool.d.ts +13 -12
- package/node_modules/undici-types/cache-interceptor.d.ts +179 -0
- package/node_modules/undici-types/client-stats.d.ts +15 -0
- package/node_modules/undici-types/client.d.ts +34 -19
- package/node_modules/undici-types/connector.d.ts +4 -2
- package/node_modules/undici-types/cookies.d.ts +2 -0
- package/node_modules/undici-types/diagnostics-channel.d.ts +18 -10
- package/node_modules/undici-types/dispatcher.d.ts +127 -104
- package/node_modules/undici-types/env-http-proxy-agent.d.ts +4 -3
- package/node_modules/undici-types/errors.d.ts +82 -54
- package/node_modules/undici-types/eventsource.d.ts +9 -4
- package/node_modules/undici-types/fetch.d.ts +22 -20
- package/node_modules/undici-types/formdata.d.ts +7 -7
- package/node_modules/undici-types/global-dispatcher.d.ts +4 -4
- package/node_modules/undici-types/global-origin.d.ts +5 -5
- package/node_modules/undici-types/h2c-client.d.ts +73 -0
- package/node_modules/undici-types/handlers.d.ts +8 -8
- package/node_modules/undici-types/header.d.ts +157 -1
- package/node_modules/undici-types/index.d.ts +67 -47
- package/node_modules/undici-types/interceptors.d.ts +71 -8
- package/node_modules/undici-types/mock-agent.d.ts +36 -18
- package/node_modules/undici-types/mock-call-history.d.ts +111 -0
- package/node_modules/undici-types/mock-client.d.ts +6 -4
- package/node_modules/undici-types/mock-errors.d.ts +3 -3
- package/node_modules/undici-types/mock-interceptor.d.ts +21 -20
- package/node_modules/undici-types/mock-pool.d.ts +6 -4
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/patch.d.ts +0 -4
- package/node_modules/undici-types/pool-stats.d.ts +8 -8
- package/node_modules/undici-types/pool.d.ts +15 -13
- package/node_modules/undici-types/proxy-agent.d.ts +5 -4
- package/node_modules/undici-types/readable.d.ts +19 -16
- package/node_modules/undici-types/retry-agent.d.ts +1 -1
- package/node_modules/undici-types/retry-handler.d.ts +19 -10
- package/node_modules/undici-types/round-robin-pool.d.ts +41 -0
- package/node_modules/undici-types/snapshot-agent.d.ts +109 -0
- package/node_modules/undici-types/socks5-proxy-agent.d.ts +25 -0
- package/node_modules/undici-types/util.d.ts +3 -3
- package/node_modules/undici-types/utility.d.ts +7 -0
- package/node_modules/undici-types/webidl.d.ts +148 -29
- package/node_modules/undici-types/websocket.d.ts +48 -10
- package/npm-shrinkwrap.json +21 -21
- package/package.json +13 -12
- package/dist/core/extensions/builtin/compaction/overflow-detection.d.ts +0 -11
- package/dist/core/extensions/builtin/compaction/overflow-detection.d.ts.map +0 -1
- package/dist/core/extensions/builtin/compaction/overflow-detection.js +0 -40
- package/dist/core/extensions/builtin/compaction/overflow-detection.js.map +0 -1
- package/dist/core/extensions/builtin/system-messages.d.ts +0 -47
- package/dist/core/extensions/builtin/system-messages.d.ts.map +0 -1
- package/dist/core/extensions/builtin/system-messages.js +0 -117
- package/dist/core/extensions/builtin/system-messages.js.map +0 -1
- package/dist/core/extensions/builtin/todotools/continuation/config.d.ts +0 -10
- package/dist/core/extensions/builtin/todotools/continuation/config.d.ts.map +0 -1
- package/dist/core/extensions/builtin/todotools/continuation/config.js +0 -33
- package/dist/core/extensions/builtin/todotools/continuation/config.js.map +0 -1
- package/dist/core/extensions/builtin/todotools/continuation/index.d.ts +0 -2
- package/dist/core/extensions/builtin/todotools/continuation/index.d.ts.map +0 -1
- package/dist/core/extensions/builtin/todotools/continuation/index.js +0 -2
- package/dist/core/extensions/builtin/todotools/continuation/index.js.map +0 -1
- package/dist/core/extensions/builtin/todotools/continuation/prompt.d.ts +0 -5
- package/dist/core/extensions/builtin/todotools/continuation/prompt.d.ts.map +0 -1
- package/dist/core/extensions/builtin/todotools/continuation/prompt.js +0 -34
- package/dist/core/extensions/builtin/todotools/continuation/prompt.js.map +0 -1
- package/dist/core/extensions/builtin/todotools/continuation/runtime.d.ts +0 -11
- package/dist/core/extensions/builtin/todotools/continuation/runtime.d.ts.map +0 -1
- package/dist/core/extensions/builtin/todotools/continuation/runtime.js +0 -201
- package/dist/core/extensions/builtin/todotools/continuation/runtime.js.map +0 -1
- package/dist/core/extensions/builtin/todotools/settings.d.ts +0 -6
- package/dist/core/extensions/builtin/todotools/settings.d.ts.map +0 -1
- package/dist/core/extensions/builtin/todotools/settings.js +0 -58
- package/dist/core/extensions/builtin/todotools/settings.js.map +0 -1
- package/dist/core/extensions/builtin/todotools/system-messages.d.ts +0 -34
- package/dist/core/extensions/builtin/todotools/system-messages.d.ts.map +0 -1
- package/dist/core/extensions/builtin/todotools/system-messages.js +0 -82
- package/dist/core/extensions/builtin/todotools/system-messages.js.map +0 -1
- package/dist/core/index.d.ts +0 -12
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js +0 -12
- package/dist/core/index.js.map +0 -1
- package/node_modules/@types/node/compatibility/disposable.d.ts +0 -14
- package/node_modules/@types/node/compatibility/index.d.ts +0 -9
- package/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
- package/node_modules/undici-types/file.d.ts +0 -39
- package/node_modules/undici-types/filereader.d.ts +0 -54
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* The `node:crypto` module provides cryptographic functionality that includes a
|
|
3
|
-
* set of wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign, and verify
|
|
4
|
-
* functions.
|
|
5
|
-
*
|
|
6
|
-
* ```js
|
|
7
|
-
* const { createHmac } = await import('node:crypto');
|
|
8
|
-
*
|
|
9
|
-
* const secret = 'abcdefg';
|
|
10
|
-
* const hash = createHmac('sha256', secret)
|
|
11
|
-
* .update('I love cupcakes')
|
|
12
|
-
* .digest('hex');
|
|
13
|
-
* console.log(hash);
|
|
14
|
-
* // Prints:
|
|
15
|
-
* // c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e
|
|
16
|
-
* ```
|
|
17
|
-
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/crypto.js)
|
|
18
|
-
*/
|
|
19
|
-
declare module "crypto" {
|
|
1
|
+
declare module "node:crypto" {
|
|
20
2
|
import { NonSharedBuffer } from "node:buffer";
|
|
21
3
|
import * as stream from "node:stream";
|
|
22
4
|
import { PeerCertificate } from "node:tls";
|
|
@@ -97,7 +79,7 @@ declare module "crypto" {
|
|
|
97
79
|
verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
|
|
98
80
|
}
|
|
99
81
|
namespace constants {
|
|
100
|
-
// https://nodejs.org/dist/latest-
|
|
82
|
+
// https://nodejs.org/dist/latest-v25.x/docs/api/crypto.html#crypto-constants
|
|
101
83
|
const OPENSSL_VERSION_NUMBER: number;
|
|
102
84
|
/** Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. */
|
|
103
85
|
const SSL_OP_ALL: number;
|
|
@@ -471,7 +453,6 @@ declare module "crypto" {
|
|
|
471
453
|
* // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e
|
|
472
454
|
* ```
|
|
473
455
|
* @since v0.1.94
|
|
474
|
-
* @deprecated Since v20.13.0 Calling `Hmac` class directly with `Hmac()` or `new Hmac()` is deprecated due to being internals, not intended for public use. Please use the {@link createHmac} method to create Hmac instances.
|
|
475
456
|
*/
|
|
476
457
|
class Hmac extends stream.Transform {
|
|
477
458
|
private constructor();
|
|
@@ -500,32 +481,66 @@ declare module "crypto" {
|
|
|
500
481
|
digest(): NonSharedBuffer;
|
|
501
482
|
digest(encoding: BinaryToTextEncoding): string;
|
|
502
483
|
}
|
|
484
|
+
type KeyFormat = "pem" | "der" | "jwk";
|
|
503
485
|
type KeyObjectType = "secret" | "public" | "private";
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
486
|
+
type PublicKeyExportType = "pkcs1" | "spki";
|
|
487
|
+
type PrivateKeyExportType = "pkcs1" | "pkcs8" | "sec1";
|
|
488
|
+
type KeyExportOptions =
|
|
489
|
+
| SymmetricKeyExportOptions
|
|
490
|
+
| PublicKeyExportOptions
|
|
491
|
+
| PrivateKeyExportOptions
|
|
492
|
+
| JwkKeyExportOptions;
|
|
493
|
+
interface SymmetricKeyExportOptions {
|
|
494
|
+
format?: "buffer" | undefined;
|
|
495
|
+
}
|
|
496
|
+
interface PublicKeyExportOptions<T extends PublicKeyExportType = PublicKeyExportType> {
|
|
497
|
+
type: T;
|
|
498
|
+
format: Exclude<KeyFormat, "jwk">;
|
|
499
|
+
}
|
|
500
|
+
interface PrivateKeyExportOptions<T extends PrivateKeyExportType = PrivateKeyExportType> {
|
|
501
|
+
type: T;
|
|
502
|
+
format: Exclude<KeyFormat, "jwk">;
|
|
507
503
|
cipher?: string | undefined;
|
|
508
504
|
passphrase?: string | Buffer | undefined;
|
|
509
505
|
}
|
|
510
506
|
interface JwkKeyExportOptions {
|
|
511
507
|
format: "jwk";
|
|
512
508
|
}
|
|
513
|
-
interface
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
509
|
+
interface KeyPairExportOptions<
|
|
510
|
+
TPublic extends PublicKeyExportType = PublicKeyExportType,
|
|
511
|
+
TPrivate extends PrivateKeyExportType = PrivateKeyExportType,
|
|
512
|
+
> {
|
|
513
|
+
publicKeyEncoding?: PublicKeyExportOptions<TPublic> | JwkKeyExportOptions | undefined;
|
|
514
|
+
privateKeyEncoding?: PrivateKeyExportOptions<TPrivate> | JwkKeyExportOptions | undefined;
|
|
515
|
+
}
|
|
516
|
+
type KeyExportResult<T, Default> = T extends { format: infer F extends KeyFormat }
|
|
517
|
+
? { der: NonSharedBuffer; jwk: webcrypto.JsonWebKey; pem: string }[F]
|
|
518
|
+
: Default;
|
|
519
|
+
interface KeyPairExportResult<T extends KeyPairExportOptions> {
|
|
520
|
+
publicKey: KeyExportResult<T["publicKeyEncoding"], KeyObject>;
|
|
521
|
+
privateKey: KeyExportResult<T["privateKeyEncoding"], KeyObject>;
|
|
522
|
+
}
|
|
523
|
+
type KeyPairExportCallback<T extends KeyPairExportOptions> = (
|
|
524
|
+
err: Error | null,
|
|
525
|
+
publicKey: KeyExportResult<T["publicKeyEncoding"], KeyObject>,
|
|
526
|
+
privateKey: KeyExportResult<T["privateKeyEncoding"], KeyObject>,
|
|
527
|
+
) => void;
|
|
528
|
+
type MLDSAKeyType = `ml-dsa-${44 | 65 | 87}`;
|
|
529
|
+
type MLKEMKeyType = `ml-kem-${1024 | 512 | 768}`;
|
|
530
|
+
type SLHDSAKeyType = `slh-dsa-${"sha2" | "shake"}-${128 | 192 | 256}${"f" | "s"}`;
|
|
531
|
+
type AsymmetricKeyType =
|
|
532
|
+
| "dh"
|
|
533
|
+
| "dsa"
|
|
534
|
+
| "ec"
|
|
535
|
+
| "ed25519"
|
|
536
|
+
| "ed448"
|
|
537
|
+
| MLDSAKeyType
|
|
538
|
+
| MLKEMKeyType
|
|
539
|
+
| "rsa-pss"
|
|
540
|
+
| "rsa"
|
|
541
|
+
| SLHDSAKeyType
|
|
542
|
+
| "x25519"
|
|
543
|
+
| "x448";
|
|
529
544
|
interface AsymmetricKeyDetails {
|
|
530
545
|
/**
|
|
531
546
|
* Key size in bits (RSA, DSA).
|
|
@@ -592,24 +607,14 @@ declare module "crypto" {
|
|
|
592
607
|
*/
|
|
593
608
|
static from(key: webcrypto.CryptoKey): KeyObject;
|
|
594
609
|
/**
|
|
595
|
-
* For asymmetric keys, this property represents the type of the key.
|
|
596
|
-
* types
|
|
597
|
-
*
|
|
598
|
-
* * `'rsa'` (OID 1.2.840.113549.1.1.1)
|
|
599
|
-
* * `'rsa-pss'` (OID 1.2.840.113549.1.1.10)
|
|
600
|
-
* * `'dsa'` (OID 1.2.840.10040.4.1)
|
|
601
|
-
* * `'ec'` (OID 1.2.840.10045.2.1)
|
|
602
|
-
* * `'x25519'` (OID 1.3.101.110)
|
|
603
|
-
* * `'x448'` (OID 1.3.101.111)
|
|
604
|
-
* * `'ed25519'` (OID 1.3.101.112)
|
|
605
|
-
* * `'ed448'` (OID 1.3.101.113)
|
|
606
|
-
* * `'dh'` (OID 1.2.840.113549.1.3.1)
|
|
610
|
+
* For asymmetric keys, this property represents the type of the key. See the
|
|
611
|
+
* supported [asymmetric key types](https://nodejs.org/docs/latest-v25.x/api/crypto.html#asymmetric-key-types).
|
|
607
612
|
*
|
|
608
613
|
* This property is `undefined` for unrecognized `KeyObject` types and symmetric
|
|
609
614
|
* keys.
|
|
610
615
|
* @since v11.6.0
|
|
611
616
|
*/
|
|
612
|
-
asymmetricKeyType?:
|
|
617
|
+
asymmetricKeyType?: AsymmetricKeyType;
|
|
613
618
|
/**
|
|
614
619
|
* This property exists only on asymmetric keys. Depending on the type of the key,
|
|
615
620
|
* this object contains information about the key. None of the information obtained
|
|
@@ -647,9 +652,7 @@ declare module "crypto" {
|
|
|
647
652
|
* PKCS#1 and SEC1 encryption.
|
|
648
653
|
* @since v11.6.0
|
|
649
654
|
*/
|
|
650
|
-
export(options
|
|
651
|
-
export(options?: KeyExportOptions<"der">): NonSharedBuffer;
|
|
652
|
-
export(options?: JwkKeyExportOptions): JsonWebKey;
|
|
655
|
+
export<T extends KeyExportOptions = {}>(options?: T): KeyExportResult<T, NonSharedBuffer>;
|
|
653
656
|
/**
|
|
654
657
|
* Returns `true` or `false` depending on whether the keys have exactly the same
|
|
655
658
|
* type, value, and parameters. This method is not [constant time](https://en.wikipedia.org/wiki/Timing_attack).
|
|
@@ -761,9 +764,9 @@ declare module "crypto" {
|
|
|
761
764
|
key: CipherKey,
|
|
762
765
|
iv: BinaryLike | null,
|
|
763
766
|
options?: stream.TransformOptions,
|
|
764
|
-
):
|
|
767
|
+
): Cipheriv;
|
|
765
768
|
/**
|
|
766
|
-
* Instances of the `
|
|
769
|
+
* Instances of the `Cipheriv` class are used to encrypt data. The class can be
|
|
767
770
|
* used in one of two ways:
|
|
768
771
|
*
|
|
769
772
|
* * As a `stream` that is both readable and writable, where plain unencrypted
|
|
@@ -772,10 +775,10 @@ declare module "crypto" {
|
|
|
772
775
|
* the encrypted data.
|
|
773
776
|
*
|
|
774
777
|
* The {@link createCipheriv} method is
|
|
775
|
-
* used to create `
|
|
778
|
+
* used to create `Cipheriv` instances. `Cipheriv` objects are not to be created
|
|
776
779
|
* directly using the `new` keyword.
|
|
777
780
|
*
|
|
778
|
-
* Example: Using `
|
|
781
|
+
* Example: Using `Cipheriv` objects as streams:
|
|
779
782
|
*
|
|
780
783
|
* ```js
|
|
781
784
|
* const {
|
|
@@ -810,7 +813,7 @@ declare module "crypto" {
|
|
|
810
813
|
* });
|
|
811
814
|
* ```
|
|
812
815
|
*
|
|
813
|
-
* Example: Using `
|
|
816
|
+
* Example: Using `Cipheriv` and piped streams:
|
|
814
817
|
*
|
|
815
818
|
* ```js
|
|
816
819
|
* import {
|
|
@@ -881,7 +884,7 @@ declare module "crypto" {
|
|
|
881
884
|
* ```
|
|
882
885
|
* @since v0.1.94
|
|
883
886
|
*/
|
|
884
|
-
class
|
|
887
|
+
class Cipheriv extends stream.Transform {
|
|
885
888
|
private constructor();
|
|
886
889
|
/**
|
|
887
890
|
* Updates the cipher with `data`. If the `inputEncoding` argument is given,
|
|
@@ -902,7 +905,7 @@ declare module "crypto" {
|
|
|
902
905
|
update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string;
|
|
903
906
|
update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string;
|
|
904
907
|
/**
|
|
905
|
-
* Once the `cipher.final()` method has been called, the `
|
|
908
|
+
* Once the `cipher.final()` method has been called, the `Cipheriv` object can no
|
|
906
909
|
* longer be used to encrypt data. Attempts to call `cipher.final()` more than
|
|
907
910
|
* once will result in an error being thrown.
|
|
908
911
|
* @since v0.1.94
|
|
@@ -912,7 +915,7 @@ declare module "crypto" {
|
|
|
912
915
|
final(): NonSharedBuffer;
|
|
913
916
|
final(outputEncoding: BufferEncoding): string;
|
|
914
917
|
/**
|
|
915
|
-
* When using block encryption algorithms, the `
|
|
918
|
+
* When using block encryption algorithms, the `Cipheriv` class will automatically
|
|
916
919
|
* add padding to the input data to the appropriate block size. To disable the
|
|
917
920
|
* default padding call `cipher.setAutoPadding(false)`.
|
|
918
921
|
*
|
|
@@ -928,7 +931,7 @@ declare module "crypto" {
|
|
|
928
931
|
*/
|
|
929
932
|
setAutoPadding(autoPadding?: boolean): this;
|
|
930
933
|
}
|
|
931
|
-
interface CipherCCM extends
|
|
934
|
+
interface CipherCCM extends Cipheriv {
|
|
932
935
|
setAAD(
|
|
933
936
|
buffer: NodeJS.ArrayBufferView,
|
|
934
937
|
options: {
|
|
@@ -937,7 +940,7 @@ declare module "crypto" {
|
|
|
937
940
|
): this;
|
|
938
941
|
getAuthTag(): NonSharedBuffer;
|
|
939
942
|
}
|
|
940
|
-
interface CipherGCM extends
|
|
943
|
+
interface CipherGCM extends Cipheriv {
|
|
941
944
|
setAAD(
|
|
942
945
|
buffer: NodeJS.ArrayBufferView,
|
|
943
946
|
options?: {
|
|
@@ -946,7 +949,7 @@ declare module "crypto" {
|
|
|
946
949
|
): this;
|
|
947
950
|
getAuthTag(): NonSharedBuffer;
|
|
948
951
|
}
|
|
949
|
-
interface CipherOCB extends
|
|
952
|
+
interface CipherOCB extends Cipheriv {
|
|
950
953
|
setAAD(
|
|
951
954
|
buffer: NodeJS.ArrayBufferView,
|
|
952
955
|
options?: {
|
|
@@ -955,7 +958,7 @@ declare module "crypto" {
|
|
|
955
958
|
): this;
|
|
956
959
|
getAuthTag(): NonSharedBuffer;
|
|
957
960
|
}
|
|
958
|
-
interface CipherChaCha20Poly1305 extends
|
|
961
|
+
interface CipherChaCha20Poly1305 extends Cipheriv {
|
|
959
962
|
setAAD(
|
|
960
963
|
buffer: NodeJS.ArrayBufferView,
|
|
961
964
|
options: {
|
|
@@ -965,7 +968,7 @@ declare module "crypto" {
|
|
|
965
968
|
getAuthTag(): NonSharedBuffer;
|
|
966
969
|
}
|
|
967
970
|
/**
|
|
968
|
-
* Creates and returns a `
|
|
971
|
+
* Creates and returns a `Decipheriv` object that uses the given `algorithm`, `key` and initialization vector (`iv`).
|
|
969
972
|
*
|
|
970
973
|
* The `options` argument controls stream behavior and is optional except when a
|
|
971
974
|
* cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the `authTagLength` option is required and specifies the length of the
|
|
@@ -1022,9 +1025,9 @@ declare module "crypto" {
|
|
|
1022
1025
|
key: CipherKey,
|
|
1023
1026
|
iv: BinaryLike | null,
|
|
1024
1027
|
options?: stream.TransformOptions,
|
|
1025
|
-
):
|
|
1028
|
+
): Decipheriv;
|
|
1026
1029
|
/**
|
|
1027
|
-
* Instances of the `
|
|
1030
|
+
* Instances of the `Decipheriv` class are used to decrypt data. The class can be
|
|
1028
1031
|
* used in one of two ways:
|
|
1029
1032
|
*
|
|
1030
1033
|
* * As a `stream` that is both readable and writable, where plain encrypted
|
|
@@ -1033,10 +1036,10 @@ declare module "crypto" {
|
|
|
1033
1036
|
* produce the unencrypted data.
|
|
1034
1037
|
*
|
|
1035
1038
|
* The {@link createDecipheriv} method is
|
|
1036
|
-
* used to create `
|
|
1039
|
+
* used to create `Decipheriv` instances. `Decipheriv` objects are not to be created
|
|
1037
1040
|
* directly using the `new` keyword.
|
|
1038
1041
|
*
|
|
1039
|
-
* Example: Using `
|
|
1042
|
+
* Example: Using `Decipheriv` objects as streams:
|
|
1040
1043
|
*
|
|
1041
1044
|
* ```js
|
|
1042
1045
|
* import { Buffer } from 'node:buffer';
|
|
@@ -1075,7 +1078,7 @@ declare module "crypto" {
|
|
|
1075
1078
|
* decipher.end();
|
|
1076
1079
|
* ```
|
|
1077
1080
|
*
|
|
1078
|
-
* Example: Using `
|
|
1081
|
+
* Example: Using `Decipheriv` and piped streams:
|
|
1079
1082
|
*
|
|
1080
1083
|
* ```js
|
|
1081
1084
|
* import {
|
|
@@ -1131,7 +1134,7 @@ declare module "crypto" {
|
|
|
1131
1134
|
* ```
|
|
1132
1135
|
* @since v0.1.94
|
|
1133
1136
|
*/
|
|
1134
|
-
class
|
|
1137
|
+
class Decipheriv extends stream.Transform {
|
|
1135
1138
|
private constructor();
|
|
1136
1139
|
/**
|
|
1137
1140
|
* Updates the decipher with `data`. If the `inputEncoding` argument is given,
|
|
@@ -1152,7 +1155,7 @@ declare module "crypto" {
|
|
|
1152
1155
|
update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string;
|
|
1153
1156
|
update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string;
|
|
1154
1157
|
/**
|
|
1155
|
-
* Once the `decipher.final()` method has been called, the `
|
|
1158
|
+
* Once the `decipher.final()` method has been called, the `Decipheriv` object can
|
|
1156
1159
|
* no longer be used to decrypt data. Attempts to call `decipher.final()` more
|
|
1157
1160
|
* than once will result in an error being thrown.
|
|
1158
1161
|
* @since v0.1.94
|
|
@@ -1175,7 +1178,7 @@ declare module "crypto" {
|
|
|
1175
1178
|
*/
|
|
1176
1179
|
setAutoPadding(auto_padding?: boolean): this;
|
|
1177
1180
|
}
|
|
1178
|
-
interface DecipherCCM extends
|
|
1181
|
+
interface DecipherCCM extends Decipheriv {
|
|
1179
1182
|
setAuthTag(buffer: NodeJS.ArrayBufferView): this;
|
|
1180
1183
|
setAAD(
|
|
1181
1184
|
buffer: NodeJS.ArrayBufferView,
|
|
@@ -1184,7 +1187,7 @@ declare module "crypto" {
|
|
|
1184
1187
|
},
|
|
1185
1188
|
): this;
|
|
1186
1189
|
}
|
|
1187
|
-
interface DecipherGCM extends
|
|
1190
|
+
interface DecipherGCM extends Decipheriv {
|
|
1188
1191
|
setAuthTag(buffer: NodeJS.ArrayBufferView): this;
|
|
1189
1192
|
setAAD(
|
|
1190
1193
|
buffer: NodeJS.ArrayBufferView,
|
|
@@ -1193,7 +1196,7 @@ declare module "crypto" {
|
|
|
1193
1196
|
},
|
|
1194
1197
|
): this;
|
|
1195
1198
|
}
|
|
1196
|
-
interface DecipherOCB extends
|
|
1199
|
+
interface DecipherOCB extends Decipheriv {
|
|
1197
1200
|
setAuthTag(buffer: NodeJS.ArrayBufferView): this;
|
|
1198
1201
|
setAAD(
|
|
1199
1202
|
buffer: NodeJS.ArrayBufferView,
|
|
@@ -1202,7 +1205,7 @@ declare module "crypto" {
|
|
|
1202
1205
|
},
|
|
1203
1206
|
): this;
|
|
1204
1207
|
}
|
|
1205
|
-
interface DecipherChaCha20Poly1305 extends
|
|
1208
|
+
interface DecipherChaCha20Poly1305 extends Decipheriv {
|
|
1206
1209
|
setAuthTag(buffer: NodeJS.ArrayBufferView): this;
|
|
1207
1210
|
setAAD(
|
|
1208
1211
|
buffer: NodeJS.ArrayBufferView,
|
|
@@ -1214,14 +1217,14 @@ declare module "crypto" {
|
|
|
1214
1217
|
interface PrivateKeyInput {
|
|
1215
1218
|
key: string | Buffer;
|
|
1216
1219
|
format?: KeyFormat | undefined;
|
|
1217
|
-
type?:
|
|
1220
|
+
type?: PrivateKeyExportType | undefined;
|
|
1218
1221
|
passphrase?: string | Buffer | undefined;
|
|
1219
1222
|
encoding?: string | undefined;
|
|
1220
1223
|
}
|
|
1221
1224
|
interface PublicKeyInput {
|
|
1222
1225
|
key: string | Buffer;
|
|
1223
1226
|
format?: KeyFormat | undefined;
|
|
1224
|
-
type?:
|
|
1227
|
+
type?: PublicKeyExportType | undefined;
|
|
1225
1228
|
encoding?: string | undefined;
|
|
1226
1229
|
}
|
|
1227
1230
|
/**
|
|
@@ -1274,7 +1277,7 @@ declare module "crypto" {
|
|
|
1274
1277
|
},
|
|
1275
1278
|
): KeyObject;
|
|
1276
1279
|
interface JsonWebKeyInput {
|
|
1277
|
-
key: JsonWebKey;
|
|
1280
|
+
key: webcrypto.JsonWebKey;
|
|
1278
1281
|
format: "jwk";
|
|
1279
1282
|
}
|
|
1280
1283
|
/**
|
|
@@ -1321,6 +1324,7 @@ declare module "crypto" {
|
|
|
1321
1324
|
* @since v0.1.92
|
|
1322
1325
|
* @param options `stream.Writable` options
|
|
1323
1326
|
*/
|
|
1327
|
+
// TODO: signing algorithm type
|
|
1324
1328
|
function createSign(algorithm: string, options?: stream.WritableOptions): Sign;
|
|
1325
1329
|
type DSAEncoding = "der" | "ieee-p1363";
|
|
1326
1330
|
interface SigningOptions {
|
|
@@ -1330,6 +1334,7 @@ declare module "crypto" {
|
|
|
1330
1334
|
padding?: number | undefined;
|
|
1331
1335
|
saltLength?: number | undefined;
|
|
1332
1336
|
dsaEncoding?: DSAEncoding | undefined;
|
|
1337
|
+
context?: ArrayBuffer | NodeJS.ArrayBufferView | undefined;
|
|
1333
1338
|
}
|
|
1334
1339
|
interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {}
|
|
1335
1340
|
interface SignKeyObjectInput extends SigningOptions {
|
|
@@ -2476,66 +2481,27 @@ declare module "crypto" {
|
|
|
2476
2481
|
* @since v6.6.0
|
|
2477
2482
|
*/
|
|
2478
2483
|
function timingSafeEqual(a: NodeJS.ArrayBufferView, b: NodeJS.ArrayBufferView): boolean;
|
|
2479
|
-
|
|
2480
|
-
type KeyFormat = "pem" | "der" | "jwk";
|
|
2481
|
-
interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {
|
|
2482
|
-
format: T;
|
|
2483
|
-
cipher?: string | undefined;
|
|
2484
|
-
passphrase?: string | undefined;
|
|
2485
|
-
}
|
|
2486
|
-
interface KeyPairKeyObjectResult {
|
|
2487
|
-
publicKey: KeyObject;
|
|
2488
|
-
privateKey: KeyObject;
|
|
2489
|
-
}
|
|
2490
|
-
interface ED25519KeyPairKeyObjectOptions {}
|
|
2491
|
-
interface ED448KeyPairKeyObjectOptions {}
|
|
2492
|
-
interface X25519KeyPairKeyObjectOptions {}
|
|
2493
|
-
interface X448KeyPairKeyObjectOptions {}
|
|
2494
|
-
interface ECKeyPairKeyObjectOptions {
|
|
2495
|
-
/**
|
|
2496
|
-
* Name of the curve to use
|
|
2497
|
-
*/
|
|
2498
|
-
namedCurve: string;
|
|
2499
|
-
/**
|
|
2500
|
-
* Must be `'named'` or `'explicit'`. Default: `'named'`.
|
|
2501
|
-
*/
|
|
2502
|
-
paramEncoding?: "explicit" | "named" | undefined;
|
|
2503
|
-
}
|
|
2504
|
-
interface RSAKeyPairKeyObjectOptions {
|
|
2505
|
-
/**
|
|
2506
|
-
* Key size in bits
|
|
2507
|
-
*/
|
|
2508
|
-
modulusLength: number;
|
|
2484
|
+
interface DHKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {
|
|
2509
2485
|
/**
|
|
2510
|
-
*
|
|
2511
|
-
* @default 0x10001
|
|
2486
|
+
* The prime parameter
|
|
2512
2487
|
*/
|
|
2513
|
-
|
|
2514
|
-
}
|
|
2515
|
-
interface RSAPSSKeyPairKeyObjectOptions {
|
|
2488
|
+
prime?: Buffer | undefined;
|
|
2516
2489
|
/**
|
|
2517
|
-
*
|
|
2490
|
+
* Prime length in bits
|
|
2518
2491
|
*/
|
|
2519
|
-
|
|
2492
|
+
primeLength?: number | undefined;
|
|
2520
2493
|
/**
|
|
2521
|
-
*
|
|
2522
|
-
* @default
|
|
2494
|
+
* Custom generator
|
|
2495
|
+
* @default 2
|
|
2523
2496
|
*/
|
|
2524
|
-
|
|
2497
|
+
generator?: number | undefined;
|
|
2525
2498
|
/**
|
|
2526
|
-
*
|
|
2499
|
+
* Diffie-Hellman group name
|
|
2500
|
+
* @see {@link getDiffieHellman}
|
|
2527
2501
|
*/
|
|
2528
|
-
|
|
2529
|
-
/**
|
|
2530
|
-
* Name of the message digest used by MGF1
|
|
2531
|
-
*/
|
|
2532
|
-
mgf1HashAlgorithm?: string | undefined;
|
|
2533
|
-
/**
|
|
2534
|
-
* Minimal salt length in bytes
|
|
2535
|
-
*/
|
|
2536
|
-
saltLength?: string | undefined;
|
|
2502
|
+
groupName?: string | undefined;
|
|
2537
2503
|
}
|
|
2538
|
-
interface
|
|
2504
|
+
interface DSAKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {
|
|
2539
2505
|
/**
|
|
2540
2506
|
* Key size in bits
|
|
2541
2507
|
*/
|
|
@@ -2545,25 +2511,22 @@ declare module "crypto" {
|
|
|
2545
2511
|
*/
|
|
2546
2512
|
divisorLength: number;
|
|
2547
2513
|
}
|
|
2548
|
-
interface
|
|
2514
|
+
interface ECKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8" | "sec1"> {
|
|
2549
2515
|
/**
|
|
2550
|
-
*
|
|
2516
|
+
* Name of the curve to use
|
|
2551
2517
|
*/
|
|
2552
|
-
|
|
2518
|
+
namedCurve: string;
|
|
2553
2519
|
/**
|
|
2554
|
-
*
|
|
2555
|
-
* @default
|
|
2520
|
+
* Must be `'named'` or `'explicit'`
|
|
2521
|
+
* @default 'named'
|
|
2556
2522
|
*/
|
|
2557
|
-
|
|
2558
|
-
publicKeyEncoding: {
|
|
2559
|
-
type: "pkcs1" | "spki";
|
|
2560
|
-
format: PubF;
|
|
2561
|
-
};
|
|
2562
|
-
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
|
|
2563
|
-
type: "pkcs1" | "pkcs8";
|
|
2564
|
-
};
|
|
2523
|
+
paramEncoding?: "explicit" | "named" | undefined;
|
|
2565
2524
|
}
|
|
2566
|
-
interface
|
|
2525
|
+
interface ED25519KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {}
|
|
2526
|
+
interface ED448KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {}
|
|
2527
|
+
interface MLDSAKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {}
|
|
2528
|
+
interface MLKEMKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {}
|
|
2529
|
+
interface RSAPSSKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {
|
|
2567
2530
|
/**
|
|
2568
2531
|
* Key size in bits
|
|
2569
2532
|
*/
|
|
@@ -2585,83 +2548,24 @@ declare module "crypto" {
|
|
|
2585
2548
|
* Minimal salt length in bytes
|
|
2586
2549
|
*/
|
|
2587
2550
|
saltLength?: string | undefined;
|
|
2588
|
-
publicKeyEncoding: {
|
|
2589
|
-
type: "spki";
|
|
2590
|
-
format: PubF;
|
|
2591
|
-
};
|
|
2592
|
-
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
|
|
2593
|
-
type: "pkcs8";
|
|
2594
|
-
};
|
|
2595
2551
|
}
|
|
2596
|
-
interface
|
|
2552
|
+
interface RSAKeyPairOptions extends KeyPairExportOptions<"pkcs1" | "spki", "pkcs1" | "pkcs8"> {
|
|
2597
2553
|
/**
|
|
2598
2554
|
* Key size in bits
|
|
2599
2555
|
*/
|
|
2600
2556
|
modulusLength: number;
|
|
2601
2557
|
/**
|
|
2602
|
-
*
|
|
2558
|
+
* Public exponent
|
|
2559
|
+
* @default 0x10001
|
|
2603
2560
|
*/
|
|
2604
|
-
|
|
2605
|
-
publicKeyEncoding: {
|
|
2606
|
-
type: "spki";
|
|
2607
|
-
format: PubF;
|
|
2608
|
-
};
|
|
2609
|
-
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
|
|
2610
|
-
type: "pkcs8";
|
|
2611
|
-
};
|
|
2612
|
-
}
|
|
2613
|
-
interface ECKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> extends ECKeyPairKeyObjectOptions {
|
|
2614
|
-
publicKeyEncoding: {
|
|
2615
|
-
type: "pkcs1" | "spki";
|
|
2616
|
-
format: PubF;
|
|
2617
|
-
};
|
|
2618
|
-
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
|
|
2619
|
-
type: "sec1" | "pkcs8";
|
|
2620
|
-
};
|
|
2621
|
-
}
|
|
2622
|
-
interface ED25519KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
|
|
2623
|
-
publicKeyEncoding: {
|
|
2624
|
-
type: "spki";
|
|
2625
|
-
format: PubF;
|
|
2626
|
-
};
|
|
2627
|
-
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
|
|
2628
|
-
type: "pkcs8";
|
|
2629
|
-
};
|
|
2630
|
-
}
|
|
2631
|
-
interface ED448KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
|
|
2632
|
-
publicKeyEncoding: {
|
|
2633
|
-
type: "spki";
|
|
2634
|
-
format: PubF;
|
|
2635
|
-
};
|
|
2636
|
-
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
|
|
2637
|
-
type: "pkcs8";
|
|
2638
|
-
};
|
|
2639
|
-
}
|
|
2640
|
-
interface X25519KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
|
|
2641
|
-
publicKeyEncoding: {
|
|
2642
|
-
type: "spki";
|
|
2643
|
-
format: PubF;
|
|
2644
|
-
};
|
|
2645
|
-
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
|
|
2646
|
-
type: "pkcs8";
|
|
2647
|
-
};
|
|
2648
|
-
}
|
|
2649
|
-
interface X448KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
|
|
2650
|
-
publicKeyEncoding: {
|
|
2651
|
-
type: "spki";
|
|
2652
|
-
format: PubF;
|
|
2653
|
-
};
|
|
2654
|
-
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
|
|
2655
|
-
type: "pkcs8";
|
|
2656
|
-
};
|
|
2657
|
-
}
|
|
2658
|
-
interface KeyPairSyncResult<T1 extends string | Buffer, T2 extends string | Buffer> {
|
|
2659
|
-
publicKey: T1;
|
|
2660
|
-
privateKey: T2;
|
|
2561
|
+
publicExponent?: number | undefined;
|
|
2661
2562
|
}
|
|
2563
|
+
interface SLHDSAKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {}
|
|
2564
|
+
interface X25519KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {}
|
|
2565
|
+
interface X448KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {}
|
|
2662
2566
|
/**
|
|
2663
|
-
* Generates a new asymmetric key pair of the given `type`.
|
|
2664
|
-
*
|
|
2567
|
+
* Generates a new asymmetric key pair of the given `type`. See the
|
|
2568
|
+
* supported [asymmetric key types](https://nodejs.org/docs/latest-v25.x/api/crypto.html#asymmetric-key-types).
|
|
2665
2569
|
*
|
|
2666
2570
|
* If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
|
|
2667
2571
|
* behaves as if `keyObject.export()` had been called on its result. Otherwise,
|
|
@@ -2698,147 +2602,60 @@ declare module "crypto" {
|
|
|
2698
2602
|
* When PEM encoding was selected, the respective key will be a string, otherwise
|
|
2699
2603
|
* it will be a buffer containing the data encoded as DER.
|
|
2700
2604
|
* @since v10.12.0
|
|
2701
|
-
* @param type
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
options: RSAKeyPairOptions<"pem", "der">,
|
|
2710
|
-
): KeyPairSyncResult<string, NonSharedBuffer>;
|
|
2711
|
-
function generateKeyPairSync(
|
|
2712
|
-
type: "rsa",
|
|
2713
|
-
options: RSAKeyPairOptions<"der", "pem">,
|
|
2714
|
-
): KeyPairSyncResult<NonSharedBuffer, string>;
|
|
2715
|
-
function generateKeyPairSync(
|
|
2716
|
-
type: "rsa",
|
|
2717
|
-
options: RSAKeyPairOptions<"der", "der">,
|
|
2718
|
-
): KeyPairSyncResult<NonSharedBuffer, NonSharedBuffer>;
|
|
2719
|
-
function generateKeyPairSync(type: "rsa", options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
2720
|
-
function generateKeyPairSync(
|
|
2721
|
-
type: "rsa-pss",
|
|
2722
|
-
options: RSAPSSKeyPairOptions<"pem", "pem">,
|
|
2723
|
-
): KeyPairSyncResult<string, string>;
|
|
2724
|
-
function generateKeyPairSync(
|
|
2725
|
-
type: "rsa-pss",
|
|
2726
|
-
options: RSAPSSKeyPairOptions<"pem", "der">,
|
|
2727
|
-
): KeyPairSyncResult<string, NonSharedBuffer>;
|
|
2728
|
-
function generateKeyPairSync(
|
|
2729
|
-
type: "rsa-pss",
|
|
2730
|
-
options: RSAPSSKeyPairOptions<"der", "pem">,
|
|
2731
|
-
): KeyPairSyncResult<NonSharedBuffer, string>;
|
|
2732
|
-
function generateKeyPairSync(
|
|
2733
|
-
type: "rsa-pss",
|
|
2734
|
-
options: RSAPSSKeyPairOptions<"der", "der">,
|
|
2735
|
-
): KeyPairSyncResult<NonSharedBuffer, NonSharedBuffer>;
|
|
2736
|
-
function generateKeyPairSync(type: "rsa-pss", options: RSAPSSKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
2737
|
-
function generateKeyPairSync(
|
|
2738
|
-
type: "dsa",
|
|
2739
|
-
options: DSAKeyPairOptions<"pem", "pem">,
|
|
2740
|
-
): KeyPairSyncResult<string, string>;
|
|
2741
|
-
function generateKeyPairSync(
|
|
2742
|
-
type: "dsa",
|
|
2743
|
-
options: DSAKeyPairOptions<"pem", "der">,
|
|
2744
|
-
): KeyPairSyncResult<string, NonSharedBuffer>;
|
|
2745
|
-
function generateKeyPairSync(
|
|
2605
|
+
* @param type The asymmetric key type to generate. See the
|
|
2606
|
+
* supported [asymmetric key types](https://nodejs.org/docs/latest-v25.x/api/crypto.html#asymmetric-key-types).
|
|
2607
|
+
*/
|
|
2608
|
+
function generateKeyPairSync<T extends DHKeyPairOptions>(
|
|
2609
|
+
type: "dh",
|
|
2610
|
+
options: T,
|
|
2611
|
+
): KeyPairExportResult<T>;
|
|
2612
|
+
function generateKeyPairSync<T extends DSAKeyPairOptions>(
|
|
2746
2613
|
type: "dsa",
|
|
2747
|
-
options:
|
|
2748
|
-
):
|
|
2749
|
-
function generateKeyPairSync(
|
|
2750
|
-
type: "dsa",
|
|
2751
|
-
options: DSAKeyPairOptions<"der", "der">,
|
|
2752
|
-
): KeyPairSyncResult<NonSharedBuffer, NonSharedBuffer>;
|
|
2753
|
-
function generateKeyPairSync(type: "dsa", options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
2754
|
-
function generateKeyPairSync(
|
|
2755
|
-
type: "ec",
|
|
2756
|
-
options: ECKeyPairOptions<"pem", "pem">,
|
|
2757
|
-
): KeyPairSyncResult<string, string>;
|
|
2758
|
-
function generateKeyPairSync(
|
|
2614
|
+
options: T,
|
|
2615
|
+
): KeyPairExportResult<T>;
|
|
2616
|
+
function generateKeyPairSync<T extends ECKeyPairOptions>(
|
|
2759
2617
|
type: "ec",
|
|
2760
|
-
options:
|
|
2761
|
-
):
|
|
2762
|
-
function generateKeyPairSync(
|
|
2763
|
-
type: "ec",
|
|
2764
|
-
options: ECKeyPairOptions<"der", "pem">,
|
|
2765
|
-
): KeyPairSyncResult<NonSharedBuffer, string>;
|
|
2766
|
-
function generateKeyPairSync(
|
|
2767
|
-
type: "ec",
|
|
2768
|
-
options: ECKeyPairOptions<"der", "der">,
|
|
2769
|
-
): KeyPairSyncResult<NonSharedBuffer, NonSharedBuffer>;
|
|
2770
|
-
function generateKeyPairSync(type: "ec", options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
2771
|
-
function generateKeyPairSync(
|
|
2772
|
-
type: "ed25519",
|
|
2773
|
-
options: ED25519KeyPairOptions<"pem", "pem">,
|
|
2774
|
-
): KeyPairSyncResult<string, string>;
|
|
2775
|
-
function generateKeyPairSync(
|
|
2776
|
-
type: "ed25519",
|
|
2777
|
-
options: ED25519KeyPairOptions<"pem", "der">,
|
|
2778
|
-
): KeyPairSyncResult<string, NonSharedBuffer>;
|
|
2779
|
-
function generateKeyPairSync(
|
|
2780
|
-
type: "ed25519",
|
|
2781
|
-
options: ED25519KeyPairOptions<"der", "pem">,
|
|
2782
|
-
): KeyPairSyncResult<NonSharedBuffer, string>;
|
|
2783
|
-
function generateKeyPairSync(
|
|
2618
|
+
options: T,
|
|
2619
|
+
): KeyPairExportResult<T>;
|
|
2620
|
+
function generateKeyPairSync<T extends ED25519KeyPairOptions = {}>(
|
|
2784
2621
|
type: "ed25519",
|
|
2785
|
-
options
|
|
2786
|
-
):
|
|
2787
|
-
function generateKeyPairSync
|
|
2788
|
-
function generateKeyPairSync(
|
|
2622
|
+
options?: T,
|
|
2623
|
+
): KeyPairExportResult<T>;
|
|
2624
|
+
function generateKeyPairSync<T extends ED448KeyPairOptions = {}>(
|
|
2789
2625
|
type: "ed448",
|
|
2790
|
-
options
|
|
2791
|
-
):
|
|
2792
|
-
function generateKeyPairSync(
|
|
2793
|
-
type:
|
|
2794
|
-
options
|
|
2795
|
-
):
|
|
2796
|
-
function generateKeyPairSync(
|
|
2797
|
-
type:
|
|
2798
|
-
options
|
|
2799
|
-
):
|
|
2800
|
-
function generateKeyPairSync(
|
|
2801
|
-
type: "
|
|
2802
|
-
options:
|
|
2803
|
-
):
|
|
2804
|
-
function generateKeyPairSync
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
function generateKeyPairSync(
|
|
2814
|
-
type: "x25519",
|
|
2815
|
-
options: X25519KeyPairOptions<"der", "pem">,
|
|
2816
|
-
): KeyPairSyncResult<NonSharedBuffer, string>;
|
|
2817
|
-
function generateKeyPairSync(
|
|
2626
|
+
options?: T,
|
|
2627
|
+
): KeyPairExportResult<T>;
|
|
2628
|
+
function generateKeyPairSync<T extends MLDSAKeyPairOptions = {}>(
|
|
2629
|
+
type: MLDSAKeyType,
|
|
2630
|
+
options?: T,
|
|
2631
|
+
): KeyPairExportResult<T>;
|
|
2632
|
+
function generateKeyPairSync<T extends MLKEMKeyPairOptions = {}>(
|
|
2633
|
+
type: MLKEMKeyType,
|
|
2634
|
+
options?: T,
|
|
2635
|
+
): KeyPairExportResult<T>;
|
|
2636
|
+
function generateKeyPairSync<T extends RSAPSSKeyPairOptions>(
|
|
2637
|
+
type: "rsa-pss",
|
|
2638
|
+
options: T,
|
|
2639
|
+
): KeyPairExportResult<T>;
|
|
2640
|
+
function generateKeyPairSync<T extends RSAKeyPairOptions>(
|
|
2641
|
+
type: "rsa",
|
|
2642
|
+
options: T,
|
|
2643
|
+
): KeyPairExportResult<T>;
|
|
2644
|
+
function generateKeyPairSync<T extends SLHDSAKeyPairOptions = {}>(
|
|
2645
|
+
type: SLHDSAKeyType,
|
|
2646
|
+
options?: T,
|
|
2647
|
+
): KeyPairExportResult<T>;
|
|
2648
|
+
function generateKeyPairSync<T extends X25519KeyPairOptions = {}>(
|
|
2818
2649
|
type: "x25519",
|
|
2819
|
-
options
|
|
2820
|
-
):
|
|
2821
|
-
function generateKeyPairSync
|
|
2822
|
-
function generateKeyPairSync(
|
|
2823
|
-
type: "x448",
|
|
2824
|
-
options: X448KeyPairOptions<"pem", "pem">,
|
|
2825
|
-
): KeyPairSyncResult<string, string>;
|
|
2826
|
-
function generateKeyPairSync(
|
|
2827
|
-
type: "x448",
|
|
2828
|
-
options: X448KeyPairOptions<"pem", "der">,
|
|
2829
|
-
): KeyPairSyncResult<string, NonSharedBuffer>;
|
|
2830
|
-
function generateKeyPairSync(
|
|
2831
|
-
type: "x448",
|
|
2832
|
-
options: X448KeyPairOptions<"der", "pem">,
|
|
2833
|
-
): KeyPairSyncResult<NonSharedBuffer, string>;
|
|
2834
|
-
function generateKeyPairSync(
|
|
2650
|
+
options?: T,
|
|
2651
|
+
): KeyPairExportResult<T>;
|
|
2652
|
+
function generateKeyPairSync<T extends X448KeyPairOptions = {}>(
|
|
2835
2653
|
type: "x448",
|
|
2836
|
-
options
|
|
2837
|
-
):
|
|
2838
|
-
function generateKeyPairSync(type: "x448", options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
2654
|
+
options?: T,
|
|
2655
|
+
): KeyPairExportResult<T>;
|
|
2839
2656
|
/**
|
|
2840
|
-
* Generates a new asymmetric key pair of the given `type`.
|
|
2841
|
-
*
|
|
2657
|
+
* Generates a new asymmetric key pair of the given `type`. See the
|
|
2658
|
+
* supported [asymmetric key types](https://nodejs.org/docs/latest-v25.x/api/crypto.html#asymmetric-key-types).
|
|
2842
2659
|
*
|
|
2843
2660
|
* If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
|
|
2844
2661
|
* behaves as if `keyObject.export()` had been called on its result. Otherwise,
|
|
@@ -2873,455 +2690,126 @@ declare module "crypto" {
|
|
|
2873
2690
|
* If this method is invoked as its `util.promisify()` ed version, it returns
|
|
2874
2691
|
* a `Promise` for an `Object` with `publicKey` and `privateKey` properties.
|
|
2875
2692
|
* @since v10.12.0
|
|
2876
|
-
* @param type
|
|
2693
|
+
* @param type The asymmetric key type to generate. See the
|
|
2694
|
+
* supported [asymmetric key types](https://nodejs.org/docs/latest-v25.x/api/crypto.html#asymmetric-key-types).
|
|
2877
2695
|
*/
|
|
2878
|
-
function generateKeyPair(
|
|
2879
|
-
type: "
|
|
2880
|
-
options:
|
|
2881
|
-
callback:
|
|
2882
|
-
): void;
|
|
2883
|
-
function generateKeyPair(
|
|
2884
|
-
type: "rsa",
|
|
2885
|
-
options: RSAKeyPairOptions<"pem", "der">,
|
|
2886
|
-
callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
|
|
2887
|
-
): void;
|
|
2888
|
-
function generateKeyPair(
|
|
2889
|
-
type: "rsa",
|
|
2890
|
-
options: RSAKeyPairOptions<"der", "pem">,
|
|
2891
|
-
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
|
|
2892
|
-
): void;
|
|
2893
|
-
function generateKeyPair(
|
|
2894
|
-
type: "rsa",
|
|
2895
|
-
options: RSAKeyPairOptions<"der", "der">,
|
|
2896
|
-
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void,
|
|
2897
|
-
): void;
|
|
2898
|
-
function generateKeyPair(
|
|
2899
|
-
type: "rsa",
|
|
2900
|
-
options: RSAKeyPairKeyObjectOptions,
|
|
2901
|
-
callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
|
|
2902
|
-
): void;
|
|
2903
|
-
function generateKeyPair(
|
|
2904
|
-
type: "rsa-pss",
|
|
2905
|
-
options: RSAPSSKeyPairOptions<"pem", "pem">,
|
|
2906
|
-
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
|
|
2907
|
-
): void;
|
|
2908
|
-
function generateKeyPair(
|
|
2909
|
-
type: "rsa-pss",
|
|
2910
|
-
options: RSAPSSKeyPairOptions<"pem", "der">,
|
|
2911
|
-
callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
|
|
2912
|
-
): void;
|
|
2913
|
-
function generateKeyPair(
|
|
2914
|
-
type: "rsa-pss",
|
|
2915
|
-
options: RSAPSSKeyPairOptions<"der", "pem">,
|
|
2916
|
-
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
|
|
2696
|
+
function generateKeyPair<T extends DHKeyPairOptions>(
|
|
2697
|
+
type: "dh",
|
|
2698
|
+
options: T,
|
|
2699
|
+
callback: KeyPairExportCallback<T>,
|
|
2917
2700
|
): void;
|
|
2918
|
-
function generateKeyPair(
|
|
2919
|
-
type: "rsa-pss",
|
|
2920
|
-
options: RSAPSSKeyPairOptions<"der", "der">,
|
|
2921
|
-
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void,
|
|
2922
|
-
): void;
|
|
2923
|
-
function generateKeyPair(
|
|
2924
|
-
type: "rsa-pss",
|
|
2925
|
-
options: RSAPSSKeyPairKeyObjectOptions,
|
|
2926
|
-
callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
|
|
2927
|
-
): void;
|
|
2928
|
-
function generateKeyPair(
|
|
2929
|
-
type: "dsa",
|
|
2930
|
-
options: DSAKeyPairOptions<"pem", "pem">,
|
|
2931
|
-
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
|
|
2932
|
-
): void;
|
|
2933
|
-
function generateKeyPair(
|
|
2934
|
-
type: "dsa",
|
|
2935
|
-
options: DSAKeyPairOptions<"pem", "der">,
|
|
2936
|
-
callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
|
|
2937
|
-
): void;
|
|
2938
|
-
function generateKeyPair(
|
|
2939
|
-
type: "dsa",
|
|
2940
|
-
options: DSAKeyPairOptions<"der", "pem">,
|
|
2941
|
-
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
|
|
2942
|
-
): void;
|
|
2943
|
-
function generateKeyPair(
|
|
2701
|
+
function generateKeyPair<T extends DSAKeyPairOptions>(
|
|
2944
2702
|
type: "dsa",
|
|
2945
|
-
options:
|
|
2946
|
-
callback:
|
|
2947
|
-
): void;
|
|
2948
|
-
function generateKeyPair(
|
|
2949
|
-
type: "dsa",
|
|
2950
|
-
options: DSAKeyPairKeyObjectOptions,
|
|
2951
|
-
callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
|
|
2952
|
-
): void;
|
|
2953
|
-
function generateKeyPair(
|
|
2954
|
-
type: "ec",
|
|
2955
|
-
options: ECKeyPairOptions<"pem", "pem">,
|
|
2956
|
-
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
|
|
2957
|
-
): void;
|
|
2958
|
-
function generateKeyPair(
|
|
2959
|
-
type: "ec",
|
|
2960
|
-
options: ECKeyPairOptions<"pem", "der">,
|
|
2961
|
-
callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
|
|
2962
|
-
): void;
|
|
2963
|
-
function generateKeyPair(
|
|
2964
|
-
type: "ec",
|
|
2965
|
-
options: ECKeyPairOptions<"der", "pem">,
|
|
2966
|
-
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
|
|
2967
|
-
): void;
|
|
2968
|
-
function generateKeyPair(
|
|
2969
|
-
type: "ec",
|
|
2970
|
-
options: ECKeyPairOptions<"der", "der">,
|
|
2971
|
-
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void,
|
|
2703
|
+
options: T,
|
|
2704
|
+
callback: KeyPairExportCallback<T>,
|
|
2972
2705
|
): void;
|
|
2973
|
-
function generateKeyPair(
|
|
2706
|
+
function generateKeyPair<T extends ECKeyPairOptions>(
|
|
2974
2707
|
type: "ec",
|
|
2975
|
-
options:
|
|
2976
|
-
callback:
|
|
2708
|
+
options: T,
|
|
2709
|
+
callback: KeyPairExportCallback<T>,
|
|
2977
2710
|
): void;
|
|
2978
|
-
function generateKeyPair(
|
|
2711
|
+
function generateKeyPair<T extends ED25519KeyPairOptions = {}>(
|
|
2979
2712
|
type: "ed25519",
|
|
2980
|
-
options:
|
|
2981
|
-
callback:
|
|
2713
|
+
options: T | undefined,
|
|
2714
|
+
callback: KeyPairExportCallback<T>,
|
|
2982
2715
|
): void;
|
|
2983
|
-
function generateKeyPair(
|
|
2984
|
-
type: "ed25519",
|
|
2985
|
-
options: ED25519KeyPairOptions<"pem", "der">,
|
|
2986
|
-
callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
|
|
2987
|
-
): void;
|
|
2988
|
-
function generateKeyPair(
|
|
2989
|
-
type: "ed25519",
|
|
2990
|
-
options: ED25519KeyPairOptions<"der", "pem">,
|
|
2991
|
-
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
|
|
2992
|
-
): void;
|
|
2993
|
-
function generateKeyPair(
|
|
2994
|
-
type: "ed25519",
|
|
2995
|
-
options: ED25519KeyPairOptions<"der", "der">,
|
|
2996
|
-
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void,
|
|
2997
|
-
): void;
|
|
2998
|
-
function generateKeyPair(
|
|
2999
|
-
type: "ed25519",
|
|
3000
|
-
options: ED25519KeyPairKeyObjectOptions | undefined,
|
|
3001
|
-
callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
|
|
3002
|
-
): void;
|
|
3003
|
-
function generateKeyPair(
|
|
2716
|
+
function generateKeyPair<T extends ED448KeyPairOptions = {}>(
|
|
3004
2717
|
type: "ed448",
|
|
3005
|
-
options:
|
|
3006
|
-
callback:
|
|
2718
|
+
options: T | undefined,
|
|
2719
|
+
callback: KeyPairExportCallback<T>,
|
|
3007
2720
|
): void;
|
|
3008
|
-
function generateKeyPair(
|
|
3009
|
-
type:
|
|
3010
|
-
options:
|
|
3011
|
-
callback:
|
|
2721
|
+
function generateKeyPair<T extends MLDSAKeyPairOptions = {}>(
|
|
2722
|
+
type: MLDSAKeyType,
|
|
2723
|
+
options: T | undefined,
|
|
2724
|
+
callback: KeyPairExportCallback<T>,
|
|
3012
2725
|
): void;
|
|
3013
|
-
function generateKeyPair(
|
|
3014
|
-
type:
|
|
3015
|
-
options:
|
|
3016
|
-
callback:
|
|
2726
|
+
function generateKeyPair<T extends MLKEMKeyPairOptions = {}>(
|
|
2727
|
+
type: MLKEMKeyType,
|
|
2728
|
+
options: T | undefined,
|
|
2729
|
+
callback: KeyPairExportCallback<T>,
|
|
3017
2730
|
): void;
|
|
3018
|
-
function generateKeyPair(
|
|
3019
|
-
type: "
|
|
3020
|
-
options:
|
|
3021
|
-
callback:
|
|
3022
|
-
): void;
|
|
3023
|
-
function generateKeyPair(
|
|
3024
|
-
type: "ed448",
|
|
3025
|
-
options: ED448KeyPairKeyObjectOptions | undefined,
|
|
3026
|
-
callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
|
|
3027
|
-
): void;
|
|
3028
|
-
function generateKeyPair(
|
|
3029
|
-
type: "x25519",
|
|
3030
|
-
options: X25519KeyPairOptions<"pem", "pem">,
|
|
3031
|
-
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
|
|
3032
|
-
): void;
|
|
3033
|
-
function generateKeyPair(
|
|
3034
|
-
type: "x25519",
|
|
3035
|
-
options: X25519KeyPairOptions<"pem", "der">,
|
|
3036
|
-
callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
|
|
2731
|
+
function generateKeyPair<T extends RSAPSSKeyPairOptions>(
|
|
2732
|
+
type: "rsa-pss",
|
|
2733
|
+
options: T,
|
|
2734
|
+
callback: KeyPairExportCallback<T>,
|
|
3037
2735
|
): void;
|
|
3038
|
-
function generateKeyPair(
|
|
3039
|
-
type: "
|
|
3040
|
-
options:
|
|
3041
|
-
callback:
|
|
2736
|
+
function generateKeyPair<T extends RSAKeyPairOptions>(
|
|
2737
|
+
type: "rsa",
|
|
2738
|
+
options: T,
|
|
2739
|
+
callback: KeyPairExportCallback<T>,
|
|
3042
2740
|
): void;
|
|
3043
|
-
function generateKeyPair(
|
|
3044
|
-
type:
|
|
3045
|
-
options:
|
|
3046
|
-
callback:
|
|
2741
|
+
function generateKeyPair<T extends SLHDSAKeyPairOptions = {}>(
|
|
2742
|
+
type: SLHDSAKeyType,
|
|
2743
|
+
options: T | undefined,
|
|
2744
|
+
callback: KeyPairExportCallback<T>,
|
|
3047
2745
|
): void;
|
|
3048
|
-
function generateKeyPair(
|
|
2746
|
+
function generateKeyPair<T extends X25519KeyPairOptions = {}>(
|
|
3049
2747
|
type: "x25519",
|
|
3050
|
-
options:
|
|
3051
|
-
callback:
|
|
2748
|
+
options: T | undefined,
|
|
2749
|
+
callback: KeyPairExportCallback<T>,
|
|
3052
2750
|
): void;
|
|
3053
|
-
function generateKeyPair(
|
|
2751
|
+
function generateKeyPair<T extends X448KeyPairOptions = {}>(
|
|
3054
2752
|
type: "x448",
|
|
3055
|
-
options:
|
|
3056
|
-
callback:
|
|
3057
|
-
): void;
|
|
3058
|
-
function generateKeyPair(
|
|
3059
|
-
type: "x448",
|
|
3060
|
-
options: X448KeyPairOptions<"pem", "der">,
|
|
3061
|
-
callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
|
|
3062
|
-
): void;
|
|
3063
|
-
function generateKeyPair(
|
|
3064
|
-
type: "x448",
|
|
3065
|
-
options: X448KeyPairOptions<"der", "pem">,
|
|
3066
|
-
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
|
|
3067
|
-
): void;
|
|
3068
|
-
function generateKeyPair(
|
|
3069
|
-
type: "x448",
|
|
3070
|
-
options: X448KeyPairOptions<"der", "der">,
|
|
3071
|
-
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void,
|
|
3072
|
-
): void;
|
|
3073
|
-
function generateKeyPair(
|
|
3074
|
-
type: "x448",
|
|
3075
|
-
options: X448KeyPairKeyObjectOptions | undefined,
|
|
3076
|
-
callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
|
|
2753
|
+
options: T | undefined,
|
|
2754
|
+
callback: KeyPairExportCallback<T>,
|
|
3077
2755
|
): void;
|
|
3078
2756
|
namespace generateKeyPair {
|
|
3079
|
-
function __promisify__(
|
|
3080
|
-
type: "
|
|
3081
|
-
options:
|
|
3082
|
-
): Promise<
|
|
3083
|
-
|
|
3084
|
-
privateKey: string;
|
|
3085
|
-
}>;
|
|
3086
|
-
function __promisify__(
|
|
3087
|
-
type: "rsa",
|
|
3088
|
-
options: RSAKeyPairOptions<"pem", "der">,
|
|
3089
|
-
): Promise<{
|
|
3090
|
-
publicKey: string;
|
|
3091
|
-
privateKey: NonSharedBuffer;
|
|
3092
|
-
}>;
|
|
3093
|
-
function __promisify__(
|
|
3094
|
-
type: "rsa",
|
|
3095
|
-
options: RSAKeyPairOptions<"der", "pem">,
|
|
3096
|
-
): Promise<{
|
|
3097
|
-
publicKey: NonSharedBuffer;
|
|
3098
|
-
privateKey: string;
|
|
3099
|
-
}>;
|
|
3100
|
-
function __promisify__(
|
|
3101
|
-
type: "rsa",
|
|
3102
|
-
options: RSAKeyPairOptions<"der", "der">,
|
|
3103
|
-
): Promise<{
|
|
3104
|
-
publicKey: NonSharedBuffer;
|
|
3105
|
-
privateKey: NonSharedBuffer;
|
|
3106
|
-
}>;
|
|
3107
|
-
function __promisify__(type: "rsa", options: RSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
3108
|
-
function __promisify__(
|
|
3109
|
-
type: "rsa-pss",
|
|
3110
|
-
options: RSAPSSKeyPairOptions<"pem", "pem">,
|
|
3111
|
-
): Promise<{
|
|
3112
|
-
publicKey: string;
|
|
3113
|
-
privateKey: string;
|
|
3114
|
-
}>;
|
|
3115
|
-
function __promisify__(
|
|
3116
|
-
type: "rsa-pss",
|
|
3117
|
-
options: RSAPSSKeyPairOptions<"pem", "der">,
|
|
3118
|
-
): Promise<{
|
|
3119
|
-
publicKey: string;
|
|
3120
|
-
privateKey: NonSharedBuffer;
|
|
3121
|
-
}>;
|
|
3122
|
-
function __promisify__(
|
|
3123
|
-
type: "rsa-pss",
|
|
3124
|
-
options: RSAPSSKeyPairOptions<"der", "pem">,
|
|
3125
|
-
): Promise<{
|
|
3126
|
-
publicKey: NonSharedBuffer;
|
|
3127
|
-
privateKey: string;
|
|
3128
|
-
}>;
|
|
3129
|
-
function __promisify__(
|
|
3130
|
-
type: "rsa-pss",
|
|
3131
|
-
options: RSAPSSKeyPairOptions<"der", "der">,
|
|
3132
|
-
): Promise<{
|
|
3133
|
-
publicKey: NonSharedBuffer;
|
|
3134
|
-
privateKey: NonSharedBuffer;
|
|
3135
|
-
}>;
|
|
3136
|
-
function __promisify__(
|
|
3137
|
-
type: "rsa-pss",
|
|
3138
|
-
options: RSAPSSKeyPairKeyObjectOptions,
|
|
3139
|
-
): Promise<KeyPairKeyObjectResult>;
|
|
3140
|
-
function __promisify__(
|
|
3141
|
-
type: "dsa",
|
|
3142
|
-
options: DSAKeyPairOptions<"pem", "pem">,
|
|
3143
|
-
): Promise<{
|
|
3144
|
-
publicKey: string;
|
|
3145
|
-
privateKey: string;
|
|
3146
|
-
}>;
|
|
3147
|
-
function __promisify__(
|
|
3148
|
-
type: "dsa",
|
|
3149
|
-
options: DSAKeyPairOptions<"pem", "der">,
|
|
3150
|
-
): Promise<{
|
|
3151
|
-
publicKey: string;
|
|
3152
|
-
privateKey: NonSharedBuffer;
|
|
3153
|
-
}>;
|
|
3154
|
-
function __promisify__(
|
|
3155
|
-
type: "dsa",
|
|
3156
|
-
options: DSAKeyPairOptions<"der", "pem">,
|
|
3157
|
-
): Promise<{
|
|
3158
|
-
publicKey: NonSharedBuffer;
|
|
3159
|
-
privateKey: string;
|
|
3160
|
-
}>;
|
|
3161
|
-
function __promisify__(
|
|
2757
|
+
function __promisify__<T extends DHKeyPairOptions>(
|
|
2758
|
+
type: "dh",
|
|
2759
|
+
options: T,
|
|
2760
|
+
): Promise<KeyPairExportResult<T>>;
|
|
2761
|
+
function __promisify__<T extends DSAKeyPairOptions>(
|
|
3162
2762
|
type: "dsa",
|
|
3163
|
-
options:
|
|
3164
|
-
): Promise<
|
|
3165
|
-
|
|
3166
|
-
privateKey: NonSharedBuffer;
|
|
3167
|
-
}>;
|
|
3168
|
-
function __promisify__(type: "dsa", options: DSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
3169
|
-
function __promisify__(
|
|
2763
|
+
options: T,
|
|
2764
|
+
): Promise<KeyPairExportResult<T>>;
|
|
2765
|
+
function __promisify__<T extends ECKeyPairOptions>(
|
|
3170
2766
|
type: "ec",
|
|
3171
|
-
options:
|
|
3172
|
-
): Promise<
|
|
3173
|
-
|
|
3174
|
-
privateKey: string;
|
|
3175
|
-
}>;
|
|
3176
|
-
function __promisify__(
|
|
3177
|
-
type: "ec",
|
|
3178
|
-
options: ECKeyPairOptions<"pem", "der">,
|
|
3179
|
-
): Promise<{
|
|
3180
|
-
publicKey: string;
|
|
3181
|
-
privateKey: NonSharedBuffer;
|
|
3182
|
-
}>;
|
|
3183
|
-
function __promisify__(
|
|
3184
|
-
type: "ec",
|
|
3185
|
-
options: ECKeyPairOptions<"der", "pem">,
|
|
3186
|
-
): Promise<{
|
|
3187
|
-
publicKey: NonSharedBuffer;
|
|
3188
|
-
privateKey: string;
|
|
3189
|
-
}>;
|
|
3190
|
-
function __promisify__(
|
|
3191
|
-
type: "ec",
|
|
3192
|
-
options: ECKeyPairOptions<"der", "der">,
|
|
3193
|
-
): Promise<{
|
|
3194
|
-
publicKey: NonSharedBuffer;
|
|
3195
|
-
privateKey: NonSharedBuffer;
|
|
3196
|
-
}>;
|
|
3197
|
-
function __promisify__(type: "ec", options: ECKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
3198
|
-
function __promisify__(
|
|
3199
|
-
type: "ed25519",
|
|
3200
|
-
options: ED25519KeyPairOptions<"pem", "pem">,
|
|
3201
|
-
): Promise<{
|
|
3202
|
-
publicKey: string;
|
|
3203
|
-
privateKey: string;
|
|
3204
|
-
}>;
|
|
3205
|
-
function __promisify__(
|
|
3206
|
-
type: "ed25519",
|
|
3207
|
-
options: ED25519KeyPairOptions<"pem", "der">,
|
|
3208
|
-
): Promise<{
|
|
3209
|
-
publicKey: string;
|
|
3210
|
-
privateKey: NonSharedBuffer;
|
|
3211
|
-
}>;
|
|
3212
|
-
function __promisify__(
|
|
3213
|
-
type: "ed25519",
|
|
3214
|
-
options: ED25519KeyPairOptions<"der", "pem">,
|
|
3215
|
-
): Promise<{
|
|
3216
|
-
publicKey: NonSharedBuffer;
|
|
3217
|
-
privateKey: string;
|
|
3218
|
-
}>;
|
|
3219
|
-
function __promisify__(
|
|
2767
|
+
options: T,
|
|
2768
|
+
): Promise<KeyPairExportResult<T>>;
|
|
2769
|
+
function __promisify__<T extends ED25519KeyPairOptions = {}>(
|
|
3220
2770
|
type: "ed25519",
|
|
3221
|
-
options
|
|
3222
|
-
): Promise<
|
|
3223
|
-
|
|
3224
|
-
privateKey: NonSharedBuffer;
|
|
3225
|
-
}>;
|
|
3226
|
-
function __promisify__(
|
|
3227
|
-
type: "ed25519",
|
|
3228
|
-
options?: ED25519KeyPairKeyObjectOptions,
|
|
3229
|
-
): Promise<KeyPairKeyObjectResult>;
|
|
3230
|
-
function __promisify__(
|
|
3231
|
-
type: "ed448",
|
|
3232
|
-
options: ED448KeyPairOptions<"pem", "pem">,
|
|
3233
|
-
): Promise<{
|
|
3234
|
-
publicKey: string;
|
|
3235
|
-
privateKey: string;
|
|
3236
|
-
}>;
|
|
3237
|
-
function __promisify__(
|
|
3238
|
-
type: "ed448",
|
|
3239
|
-
options: ED448KeyPairOptions<"pem", "der">,
|
|
3240
|
-
): Promise<{
|
|
3241
|
-
publicKey: string;
|
|
3242
|
-
privateKey: NonSharedBuffer;
|
|
3243
|
-
}>;
|
|
3244
|
-
function __promisify__(
|
|
2771
|
+
options?: T,
|
|
2772
|
+
): Promise<KeyPairExportResult<T>>;
|
|
2773
|
+
function __promisify__<T extends ED448KeyPairOptions = {}>(
|
|
3245
2774
|
type: "ed448",
|
|
3246
|
-
options
|
|
3247
|
-
): Promise<
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
): Promise<{
|
|
3270
|
-
publicKey: string;
|
|
3271
|
-
privateKey: NonSharedBuffer;
|
|
3272
|
-
}>;
|
|
3273
|
-
function __promisify__(
|
|
3274
|
-
type: "x25519",
|
|
3275
|
-
options: X25519KeyPairOptions<"der", "pem">,
|
|
3276
|
-
): Promise<{
|
|
3277
|
-
publicKey: NonSharedBuffer;
|
|
3278
|
-
privateKey: string;
|
|
3279
|
-
}>;
|
|
3280
|
-
function __promisify__(
|
|
3281
|
-
type: "x25519",
|
|
3282
|
-
options: X25519KeyPairOptions<"der", "der">,
|
|
3283
|
-
): Promise<{
|
|
3284
|
-
publicKey: NonSharedBuffer;
|
|
3285
|
-
privateKey: NonSharedBuffer;
|
|
3286
|
-
}>;
|
|
3287
|
-
function __promisify__(
|
|
2775
|
+
options?: T,
|
|
2776
|
+
): Promise<KeyPairExportResult<T>>;
|
|
2777
|
+
function __promisify__<T extends MLDSAKeyPairOptions = {}>(
|
|
2778
|
+
type: MLDSAKeyType,
|
|
2779
|
+
options?: T,
|
|
2780
|
+
): Promise<KeyPairExportResult<T>>;
|
|
2781
|
+
function __promisify__<T extends MLKEMKeyPairOptions = {}>(
|
|
2782
|
+
type: MLKEMKeyType,
|
|
2783
|
+
options?: T,
|
|
2784
|
+
): Promise<KeyPairExportResult<T>>;
|
|
2785
|
+
function __promisify__<T extends RSAPSSKeyPairOptions>(
|
|
2786
|
+
type: "rsa-pss",
|
|
2787
|
+
options: T,
|
|
2788
|
+
): Promise<KeyPairExportResult<T>>;
|
|
2789
|
+
function __promisify__<T extends RSAKeyPairOptions>(
|
|
2790
|
+
type: "rsa",
|
|
2791
|
+
options: T,
|
|
2792
|
+
): Promise<KeyPairExportResult<T>>;
|
|
2793
|
+
function __promisify__<T extends SLHDSAKeyPairOptions = {}>(
|
|
2794
|
+
type: SLHDSAKeyType,
|
|
2795
|
+
options?: T,
|
|
2796
|
+
): Promise<KeyPairExportResult<T>>;
|
|
2797
|
+
function __promisify__<T extends X25519KeyPairOptions = {}>(
|
|
3288
2798
|
type: "x25519",
|
|
3289
|
-
options?:
|
|
3290
|
-
): Promise<
|
|
3291
|
-
function __promisify__(
|
|
2799
|
+
options?: T,
|
|
2800
|
+
): Promise<KeyPairExportResult<T>>;
|
|
2801
|
+
function __promisify__<T extends X448KeyPairOptions = {}>(
|
|
3292
2802
|
type: "x448",
|
|
3293
|
-
options
|
|
3294
|
-
): Promise<
|
|
3295
|
-
publicKey: string;
|
|
3296
|
-
privateKey: string;
|
|
3297
|
-
}>;
|
|
3298
|
-
function __promisify__(
|
|
3299
|
-
type: "x448",
|
|
3300
|
-
options: X448KeyPairOptions<"pem", "der">,
|
|
3301
|
-
): Promise<{
|
|
3302
|
-
publicKey: string;
|
|
3303
|
-
privateKey: NonSharedBuffer;
|
|
3304
|
-
}>;
|
|
3305
|
-
function __promisify__(
|
|
3306
|
-
type: "x448",
|
|
3307
|
-
options: X448KeyPairOptions<"der", "pem">,
|
|
3308
|
-
): Promise<{
|
|
3309
|
-
publicKey: NonSharedBuffer;
|
|
3310
|
-
privateKey: string;
|
|
3311
|
-
}>;
|
|
3312
|
-
function __promisify__(
|
|
3313
|
-
type: "x448",
|
|
3314
|
-
options: X448KeyPairOptions<"der", "der">,
|
|
3315
|
-
): Promise<{
|
|
3316
|
-
publicKey: NonSharedBuffer;
|
|
3317
|
-
privateKey: NonSharedBuffer;
|
|
3318
|
-
}>;
|
|
3319
|
-
function __promisify__(type: "x448", options?: X448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
2803
|
+
options?: T,
|
|
2804
|
+
): Promise<KeyPairExportResult<T>>;
|
|
3320
2805
|
}
|
|
3321
2806
|
/**
|
|
3322
2807
|
* Calculates and returns the signature for `data` using the given private key and
|
|
3323
2808
|
* algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is
|
|
3324
|
-
* dependent upon the key type
|
|
2809
|
+
* dependent upon the key type.
|
|
2810
|
+
*
|
|
2811
|
+
* `algorithm` is required to be `null` or `undefined` for Ed25519, Ed448, and
|
|
2812
|
+
* ML-DSA.
|
|
3325
2813
|
*
|
|
3326
2814
|
* If `key` is not a `KeyObject`, this function behaves as if `key` had been
|
|
3327
2815
|
* passed to {@link createPrivateKey}. If it is an object, the following
|
|
@@ -3342,8 +2830,12 @@ declare module "crypto" {
|
|
|
3342
2830
|
callback: (error: Error | null, data: NonSharedBuffer) => void,
|
|
3343
2831
|
): void;
|
|
3344
2832
|
/**
|
|
3345
|
-
* Verifies the given signature for `data` using the given key and algorithm. If
|
|
3346
|
-
*
|
|
2833
|
+
* Verifies the given signature for `data` using the given key and algorithm. If
|
|
2834
|
+
* `algorithm` is `null` or `undefined`, then the algorithm is dependent upon the
|
|
2835
|
+
* key type.
|
|
2836
|
+
*
|
|
2837
|
+
* `algorithm` is required to be `null` or `undefined` for Ed25519, Ed448, and
|
|
2838
|
+
* ML-DSA.
|
|
3347
2839
|
*
|
|
3348
2840
|
* If `key` is not a `KeyObject`, this function behaves as if `key` had been
|
|
3349
2841
|
* passed to {@link createPublicKey}. If it is an object, the following
|
|
@@ -3371,16 +2863,102 @@ declare module "crypto" {
|
|
|
3371
2863
|
callback: (error: Error | null, result: boolean) => void,
|
|
3372
2864
|
): void;
|
|
3373
2865
|
/**
|
|
3374
|
-
*
|
|
3375
|
-
*
|
|
2866
|
+
* Key decapsulation using a KEM algorithm with a private key.
|
|
2867
|
+
*
|
|
2868
|
+
* Supported key types and their KEM algorithms are:
|
|
2869
|
+
*
|
|
2870
|
+
* * `'rsa'` RSA Secret Value Encapsulation
|
|
2871
|
+
* * `'ec'` DHKEM(P-256, HKDF-SHA256), DHKEM(P-384, HKDF-SHA256), DHKEM(P-521, HKDF-SHA256)
|
|
2872
|
+
* * `'x25519'` DHKEM(X25519, HKDF-SHA256)
|
|
2873
|
+
* * `'x448'` DHKEM(X448, HKDF-SHA512)
|
|
2874
|
+
* * `'ml-kem-512'` ML-KEM
|
|
2875
|
+
* * `'ml-kem-768'` ML-KEM
|
|
2876
|
+
* * `'ml-kem-1024'` ML-KEM
|
|
2877
|
+
*
|
|
2878
|
+
* If `key` is not a {@link KeyObject}, this function behaves as if `key` had been
|
|
2879
|
+
* passed to `crypto.createPrivateKey()`.
|
|
2880
|
+
*
|
|
2881
|
+
* If the `callback` function is provided this function uses libuv's threadpool.
|
|
2882
|
+
* @since v24.7.0
|
|
2883
|
+
*/
|
|
2884
|
+
function decapsulate(
|
|
2885
|
+
key: KeyLike | PrivateKeyInput | JsonWebKeyInput,
|
|
2886
|
+
ciphertext: ArrayBuffer | NodeJS.ArrayBufferView,
|
|
2887
|
+
): NonSharedBuffer;
|
|
2888
|
+
function decapsulate(
|
|
2889
|
+
key: KeyLike | PrivateKeyInput | JsonWebKeyInput,
|
|
2890
|
+
ciphertext: ArrayBuffer | NodeJS.ArrayBufferView,
|
|
2891
|
+
callback: (err: Error, sharedKey: NonSharedBuffer) => void,
|
|
2892
|
+
): void;
|
|
2893
|
+
/**
|
|
2894
|
+
* Computes the Diffie-Hellman shared secret based on a `privateKey` and a `publicKey`.
|
|
2895
|
+
* Both keys must have the same `asymmetricKeyType` and must support either the DH or
|
|
2896
|
+
* ECDH operation.
|
|
2897
|
+
*
|
|
2898
|
+
* If the `callback` function is provided this function uses libuv's threadpool.
|
|
3376
2899
|
* @since v13.9.0, v12.17.0
|
|
3377
2900
|
*/
|
|
3378
2901
|
function diffieHellman(options: { privateKey: KeyObject; publicKey: KeyObject }): NonSharedBuffer;
|
|
2902
|
+
function diffieHellman(
|
|
2903
|
+
options: { privateKey: KeyObject; publicKey: KeyObject },
|
|
2904
|
+
callback: (err: Error | null, secret: NonSharedBuffer) => void,
|
|
2905
|
+
): void;
|
|
3379
2906
|
/**
|
|
3380
|
-
*
|
|
3381
|
-
*
|
|
3382
|
-
*
|
|
3383
|
-
*
|
|
2907
|
+
* Key encapsulation using a KEM algorithm with a public key.
|
|
2908
|
+
*
|
|
2909
|
+
* Supported key types and their KEM algorithms are:
|
|
2910
|
+
*
|
|
2911
|
+
* * `'rsa'` RSA Secret Value Encapsulation
|
|
2912
|
+
* * `'ec'` DHKEM(P-256, HKDF-SHA256), DHKEM(P-384, HKDF-SHA256), DHKEM(P-521, HKDF-SHA256)
|
|
2913
|
+
* * `'x25519'` DHKEM(X25519, HKDF-SHA256)
|
|
2914
|
+
* * `'x448'` DHKEM(X448, HKDF-SHA512)
|
|
2915
|
+
* * `'ml-kem-512'` ML-KEM
|
|
2916
|
+
* * `'ml-kem-768'` ML-KEM
|
|
2917
|
+
* * `'ml-kem-1024'` ML-KEM
|
|
2918
|
+
*
|
|
2919
|
+
* If `key` is not a {@link KeyObject}, this function behaves as if `key` had been
|
|
2920
|
+
* passed to `crypto.createPublicKey()`.
|
|
2921
|
+
*
|
|
2922
|
+
* If the `callback` function is provided this function uses libuv's threadpool.
|
|
2923
|
+
* @since v24.7.0
|
|
2924
|
+
*/
|
|
2925
|
+
function encapsulate(
|
|
2926
|
+
key: KeyLike | PublicKeyInput | JsonWebKeyInput,
|
|
2927
|
+
): { sharedKey: NonSharedBuffer; ciphertext: NonSharedBuffer };
|
|
2928
|
+
function encapsulate(
|
|
2929
|
+
key: KeyLike | PublicKeyInput | JsonWebKeyInput,
|
|
2930
|
+
callback: (err: Error, result: { sharedKey: NonSharedBuffer; ciphertext: NonSharedBuffer }) => void,
|
|
2931
|
+
): void;
|
|
2932
|
+
interface OneShotDigestOptions {
|
|
2933
|
+
/**
|
|
2934
|
+
* Encoding used to encode the returned digest.
|
|
2935
|
+
* @default 'hex'
|
|
2936
|
+
*/
|
|
2937
|
+
outputEncoding?: BinaryToTextEncoding | "buffer" | undefined;
|
|
2938
|
+
/**
|
|
2939
|
+
* For XOF hash functions such as 'shake256', the outputLength option
|
|
2940
|
+
* can be used to specify the desired output length in bytes.
|
|
2941
|
+
*/
|
|
2942
|
+
outputLength?: number | undefined;
|
|
2943
|
+
}
|
|
2944
|
+
interface OneShotDigestOptionsWithStringEncoding extends OneShotDigestOptions {
|
|
2945
|
+
outputEncoding?: BinaryToTextEncoding | undefined;
|
|
2946
|
+
}
|
|
2947
|
+
interface OneShotDigestOptionsWithBufferEncoding extends OneShotDigestOptions {
|
|
2948
|
+
outputEncoding: "buffer";
|
|
2949
|
+
}
|
|
2950
|
+
/**
|
|
2951
|
+
* A utility for creating one-shot hash digests of data. It can be faster than
|
|
2952
|
+
* the object-based `crypto.createHash()` when hashing a smaller amount of data
|
|
2953
|
+
* (<= 5MB) that's readily available. If the data can be big or if it is streamed,
|
|
2954
|
+
* it's still recommended to use `crypto.createHash()` instead.
|
|
2955
|
+
*
|
|
2956
|
+
* The `algorithm` is dependent on the available algorithms supported by the
|
|
2957
|
+
* version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc.
|
|
2958
|
+
* On recent releases of OpenSSL, `openssl list -digest-algorithms` will
|
|
2959
|
+
* display the available digest algorithms.
|
|
2960
|
+
*
|
|
2961
|
+
* If `options` is a string, then it specifies the `outputEncoding`.
|
|
3384
2962
|
*
|
|
3385
2963
|
* Example:
|
|
3386
2964
|
*
|
|
@@ -3400,16 +2978,25 @@ declare module "crypto" {
|
|
|
3400
2978
|
* console.log(crypto.hash('sha1', Buffer.from(base64, 'base64'), 'buffer'));
|
|
3401
2979
|
* ```
|
|
3402
2980
|
* @since v21.7.0, v20.12.0
|
|
3403
|
-
* @param data When `data` is a string, it will be encoded as UTF-8 before being hashed. If a different
|
|
3404
|
-
*
|
|
3405
|
-
*
|
|
2981
|
+
* @param data When `data` is a string, it will be encoded as UTF-8 before being hashed. If a different
|
|
2982
|
+
* input encoding is desired for a string input, user could encode the string
|
|
2983
|
+
* into a `TypedArray` using either `TextEncoder` or `Buffer.from()` and passing
|
|
2984
|
+
* the encoded `TypedArray` into this API instead.
|
|
3406
2985
|
*/
|
|
3407
|
-
function hash(algorithm: string, data: BinaryLike, outputEncoding?: BinaryToTextEncoding): string;
|
|
3408
|
-
function hash(algorithm: string, data: BinaryLike, outputEncoding: "buffer"): NonSharedBuffer;
|
|
3409
2986
|
function hash(
|
|
3410
2987
|
algorithm: string,
|
|
3411
2988
|
data: BinaryLike,
|
|
3412
|
-
|
|
2989
|
+
options?: OneShotDigestOptionsWithStringEncoding | BinaryToTextEncoding,
|
|
2990
|
+
): string;
|
|
2991
|
+
function hash(
|
|
2992
|
+
algorithm: string,
|
|
2993
|
+
data: BinaryLike,
|
|
2994
|
+
options: OneShotDigestOptionsWithBufferEncoding | "buffer",
|
|
2995
|
+
): NonSharedBuffer;
|
|
2996
|
+
function hash(
|
|
2997
|
+
algorithm: string,
|
|
2998
|
+
data: BinaryLike,
|
|
2999
|
+
options: OneShotDigestOptions | BinaryToTextEncoding | "buffer",
|
|
3413
3000
|
): string | NonSharedBuffer;
|
|
3414
3001
|
type CipherMode = "cbc" | "ccm" | "cfb" | "ctr" | "ecb" | "gcm" | "ocb" | "ofb" | "stream" | "wrap" | "xts";
|
|
3415
3002
|
interface CipherInfoOptions {
|
|
@@ -3712,6 +3299,16 @@ declare module "crypto" {
|
|
|
3712
3299
|
* @since v15.6.0
|
|
3713
3300
|
*/
|
|
3714
3301
|
readonly serialNumber: string;
|
|
3302
|
+
/**
|
|
3303
|
+
* The algorithm used to sign the certificate or `undefined` if the signature algorithm is unknown by OpenSSL.
|
|
3304
|
+
* @since v24.9.0
|
|
3305
|
+
*/
|
|
3306
|
+
readonly signatureAlgorithm: string | undefined;
|
|
3307
|
+
/**
|
|
3308
|
+
* The OID of the algorithm used to sign the certificate.
|
|
3309
|
+
* @since v24.9.0
|
|
3310
|
+
*/
|
|
3311
|
+
readonly signatureAlgorithmOid: string;
|
|
3715
3312
|
/**
|
|
3716
3313
|
* The date/time from which this certificate is considered valid.
|
|
3717
3314
|
* @since v15.6.0
|
|
@@ -3983,7 +3580,136 @@ declare module "crypto" {
|
|
|
3983
3580
|
* @since v17.4.0
|
|
3984
3581
|
* @return Returns `typedArray`.
|
|
3985
3582
|
*/
|
|
3986
|
-
function getRandomValues<
|
|
3583
|
+
function getRandomValues<
|
|
3584
|
+
T extends Exclude<
|
|
3585
|
+
NodeJS.NonSharedTypedArray,
|
|
3586
|
+
NodeJS.NonSharedFloat16Array | NodeJS.NonSharedFloat32Array | NodeJS.NonSharedFloat64Array
|
|
3587
|
+
>,
|
|
3588
|
+
>(typedArray: T): T;
|
|
3589
|
+
type Argon2Algorithm = "argon2d" | "argon2i" | "argon2id";
|
|
3590
|
+
interface Argon2Parameters {
|
|
3591
|
+
/**
|
|
3592
|
+
* REQUIRED, this is the password for password hashing applications of Argon2.
|
|
3593
|
+
*/
|
|
3594
|
+
message: string | ArrayBuffer | NodeJS.ArrayBufferView;
|
|
3595
|
+
/**
|
|
3596
|
+
* REQUIRED, must be at least 8 bytes long. This is the salt for password hashing applications of Argon2.
|
|
3597
|
+
*/
|
|
3598
|
+
nonce: string | ArrayBuffer | NodeJS.ArrayBufferView;
|
|
3599
|
+
/**
|
|
3600
|
+
* REQUIRED, degree of parallelism determines how many computational chains (lanes)
|
|
3601
|
+
* can be run. Must be greater than 1 and less than `2**24-1`.
|
|
3602
|
+
*/
|
|
3603
|
+
parallelism: number;
|
|
3604
|
+
/**
|
|
3605
|
+
* REQUIRED, the length of the key to generate. Must be greater than 4 and
|
|
3606
|
+
* less than `2**32-1`.
|
|
3607
|
+
*/
|
|
3608
|
+
tagLength: number;
|
|
3609
|
+
/**
|
|
3610
|
+
* REQUIRED, memory cost in 1KiB blocks. Must be greater than
|
|
3611
|
+
* `8 * parallelism` and less than `2**32-1`. The actual number of blocks is rounded
|
|
3612
|
+
* down to the nearest multiple of `4 * parallelism`.
|
|
3613
|
+
*/
|
|
3614
|
+
memory: number;
|
|
3615
|
+
/**
|
|
3616
|
+
* REQUIRED, number of passes (iterations). Must be greater than 1 and less
|
|
3617
|
+
* than `2**32-1`.
|
|
3618
|
+
*/
|
|
3619
|
+
passes: number;
|
|
3620
|
+
/**
|
|
3621
|
+
* OPTIONAL, Random additional input,
|
|
3622
|
+
* similar to the salt, that should **NOT** be stored with the derived key. This is known as pepper in
|
|
3623
|
+
* password hashing applications. If used, must have a length not greater than `2**32-1` bytes.
|
|
3624
|
+
*/
|
|
3625
|
+
secret?: string | ArrayBuffer | NodeJS.ArrayBufferView | undefined;
|
|
3626
|
+
/**
|
|
3627
|
+
* OPTIONAL, Additional data to
|
|
3628
|
+
* be added to the hash, functionally equivalent to salt or secret, but meant for
|
|
3629
|
+
* non-random data. If used, must have a length not greater than `2**32-1` bytes.
|
|
3630
|
+
*/
|
|
3631
|
+
associatedData?: string | ArrayBuffer | NodeJS.ArrayBufferView | undefined;
|
|
3632
|
+
}
|
|
3633
|
+
/**
|
|
3634
|
+
* Provides an asynchronous [Argon2](https://www.rfc-editor.org/rfc/rfc9106.html) implementation. Argon2 is a password-based
|
|
3635
|
+
* key derivation function that is designed to be expensive computationally and
|
|
3636
|
+
* memory-wise in order to make brute-force attacks unrewarding.
|
|
3637
|
+
*
|
|
3638
|
+
* The `nonce` should be as unique as possible. It is recommended that a nonce is
|
|
3639
|
+
* random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
|
|
3640
|
+
*
|
|
3641
|
+
* When passing strings for `message`, `nonce`, `secret` or `associatedData`, please
|
|
3642
|
+
* consider [caveats when using strings as inputs to cryptographic APIs](https://nodejs.org/docs/latest-v25.x/api/crypto.html#using-strings-as-inputs-to-cryptographic-apis).
|
|
3643
|
+
*
|
|
3644
|
+
* The `callback` function is called with two arguments: `err` and `derivedKey`.
|
|
3645
|
+
* `err` is an exception object when key derivation fails, otherwise `err` is
|
|
3646
|
+
* `null`. `derivedKey` is passed to the callback as a `Buffer`.
|
|
3647
|
+
*
|
|
3648
|
+
* An exception is thrown when any of the input arguments specify invalid values
|
|
3649
|
+
* or types.
|
|
3650
|
+
*
|
|
3651
|
+
* ```js
|
|
3652
|
+
* const { argon2, randomBytes } = await import('node:crypto');
|
|
3653
|
+
*
|
|
3654
|
+
* const parameters = {
|
|
3655
|
+
* message: 'password',
|
|
3656
|
+
* nonce: randomBytes(16),
|
|
3657
|
+
* parallelism: 4,
|
|
3658
|
+
* tagLength: 64,
|
|
3659
|
+
* memory: 65536,
|
|
3660
|
+
* passes: 3,
|
|
3661
|
+
* };
|
|
3662
|
+
*
|
|
3663
|
+
* argon2('argon2id', parameters, (err, derivedKey) => {
|
|
3664
|
+
* if (err) throw err;
|
|
3665
|
+
* console.log(derivedKey.toString('hex')); // 'af91dad...9520f15'
|
|
3666
|
+
* });
|
|
3667
|
+
* ```
|
|
3668
|
+
* @since v24.7.0
|
|
3669
|
+
* @param algorithm Variant of Argon2, one of `"argon2d"`, `"argon2i"` or `"argon2id"`.
|
|
3670
|
+
* @experimental
|
|
3671
|
+
*/
|
|
3672
|
+
function argon2(
|
|
3673
|
+
algorithm: Argon2Algorithm,
|
|
3674
|
+
parameters: Argon2Parameters,
|
|
3675
|
+
callback: (err: Error | null, derivedKey: NonSharedBuffer) => void,
|
|
3676
|
+
): void;
|
|
3677
|
+
/**
|
|
3678
|
+
* Provides a synchronous [Argon2][] implementation. Argon2 is a password-based
|
|
3679
|
+
* key derivation function that is designed to be expensive computationally and
|
|
3680
|
+
* memory-wise in order to make brute-force attacks unrewarding.
|
|
3681
|
+
*
|
|
3682
|
+
* The `nonce` should be as unique as possible. It is recommended that a nonce is
|
|
3683
|
+
* random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
|
|
3684
|
+
*
|
|
3685
|
+
* When passing strings for `message`, `nonce`, `secret` or `associatedData`, please
|
|
3686
|
+
* consider [caveats when using strings as inputs to cryptographic APIs](https://nodejs.org/docs/latest-v25.x/api/crypto.html#using-strings-as-inputs-to-cryptographic-apis).
|
|
3687
|
+
*
|
|
3688
|
+
* An exception is thrown when key derivation fails, otherwise the derived key is
|
|
3689
|
+
* returned as a `Buffer`.
|
|
3690
|
+
*
|
|
3691
|
+
* An exception is thrown when any of the input arguments specify invalid values
|
|
3692
|
+
* or types.
|
|
3693
|
+
*
|
|
3694
|
+
* ```js
|
|
3695
|
+
* const { argon2Sync, randomBytes } = await import('node:crypto');
|
|
3696
|
+
*
|
|
3697
|
+
* const parameters = {
|
|
3698
|
+
* message: 'password',
|
|
3699
|
+
* nonce: randomBytes(16),
|
|
3700
|
+
* parallelism: 4,
|
|
3701
|
+
* tagLength: 64,
|
|
3702
|
+
* memory: 65536,
|
|
3703
|
+
* passes: 3,
|
|
3704
|
+
* };
|
|
3705
|
+
*
|
|
3706
|
+
* const derivedKey = argon2Sync('argon2id', parameters);
|
|
3707
|
+
* console.log(derivedKey.toString('hex')); // 'af91dad...9520f15'
|
|
3708
|
+
* ```
|
|
3709
|
+
* @since v24.7.0
|
|
3710
|
+
* @experimental
|
|
3711
|
+
*/
|
|
3712
|
+
function argon2Sync(algorithm: Argon2Algorithm, parameters: Argon2Parameters): NonSharedBuffer;
|
|
3987
3713
|
/**
|
|
3988
3714
|
* A convenient alias for `crypto.webcrypto.subtle`.
|
|
3989
3715
|
* @since v17.4.0
|
|
@@ -3997,37 +3723,40 @@ declare module "crypto" {
|
|
|
3997
3723
|
*/
|
|
3998
3724
|
const webcrypto: webcrypto.Crypto;
|
|
3999
3725
|
namespace webcrypto {
|
|
4000
|
-
type
|
|
4001
|
-
type
|
|
3726
|
+
type AlgorithmIdentifier = Algorithm | string;
|
|
3727
|
+
type BigInteger = NodeJS.NonSharedUint8Array;
|
|
3728
|
+
type KeyFormat = "jwk" | "pkcs8" | "raw" | "raw-public" | "raw-secret" | "raw-seed" | "spki";
|
|
4002
3729
|
type KeyType = "private" | "public" | "secret";
|
|
4003
3730
|
type KeyUsage =
|
|
3731
|
+
| "decapsulateBits"
|
|
3732
|
+
| "decapsulateKey"
|
|
4004
3733
|
| "decrypt"
|
|
4005
3734
|
| "deriveBits"
|
|
4006
3735
|
| "deriveKey"
|
|
3736
|
+
| "encapsulateBits"
|
|
3737
|
+
| "encapsulateKey"
|
|
4007
3738
|
| "encrypt"
|
|
4008
3739
|
| "sign"
|
|
4009
3740
|
| "unwrapKey"
|
|
4010
3741
|
| "verify"
|
|
4011
3742
|
| "wrapKey";
|
|
4012
|
-
type AlgorithmIdentifier = Algorithm | string;
|
|
4013
3743
|
type HashAlgorithmIdentifier = AlgorithmIdentifier;
|
|
4014
3744
|
type NamedCurve = string;
|
|
4015
|
-
|
|
3745
|
+
interface AeadParams extends Algorithm {
|
|
3746
|
+
additionalData?: NodeJS.BufferSource;
|
|
3747
|
+
iv: NodeJS.BufferSource;
|
|
3748
|
+
tagLength: number;
|
|
3749
|
+
}
|
|
4016
3750
|
interface AesCbcParams extends Algorithm {
|
|
4017
|
-
iv: BufferSource;
|
|
3751
|
+
iv: NodeJS.BufferSource;
|
|
4018
3752
|
}
|
|
4019
3753
|
interface AesCtrParams extends Algorithm {
|
|
4020
|
-
counter: BufferSource;
|
|
3754
|
+
counter: NodeJS.BufferSource;
|
|
4021
3755
|
length: number;
|
|
4022
3756
|
}
|
|
4023
3757
|
interface AesDerivedKeyParams extends Algorithm {
|
|
4024
3758
|
length: number;
|
|
4025
3759
|
}
|
|
4026
|
-
interface AesGcmParams extends Algorithm {
|
|
4027
|
-
additionalData?: BufferSource;
|
|
4028
|
-
iv: BufferSource;
|
|
4029
|
-
tagLength?: number;
|
|
4030
|
-
}
|
|
4031
3760
|
interface AesKeyAlgorithm extends KeyAlgorithm {
|
|
4032
3761
|
length: number;
|
|
4033
3762
|
}
|
|
@@ -4037,6 +3766,23 @@ declare module "crypto" {
|
|
|
4037
3766
|
interface Algorithm {
|
|
4038
3767
|
name: string;
|
|
4039
3768
|
}
|
|
3769
|
+
interface Argon2Params extends Algorithm {
|
|
3770
|
+
associatedData?: NodeJS.BufferSource;
|
|
3771
|
+
memory: number;
|
|
3772
|
+
nonce: NodeJS.BufferSource;
|
|
3773
|
+
parallelism: number;
|
|
3774
|
+
passes: number;
|
|
3775
|
+
secretValue?: NodeJS.BufferSource;
|
|
3776
|
+
version?: number;
|
|
3777
|
+
}
|
|
3778
|
+
interface CShakeParams extends Algorithm {
|
|
3779
|
+
customization?: NodeJS.BufferSource;
|
|
3780
|
+
functionName?: NodeJS.BufferSource;
|
|
3781
|
+
outputLength: number;
|
|
3782
|
+
}
|
|
3783
|
+
interface ContextParams extends Algorithm {
|
|
3784
|
+
context?: NodeJS.BufferSource;
|
|
3785
|
+
}
|
|
4040
3786
|
interface EcKeyAlgorithm extends KeyAlgorithm {
|
|
4041
3787
|
namedCurve: NamedCurve;
|
|
4042
3788
|
}
|
|
@@ -4052,13 +3798,10 @@ declare module "crypto" {
|
|
|
4052
3798
|
interface EcdsaParams extends Algorithm {
|
|
4053
3799
|
hash: HashAlgorithmIdentifier;
|
|
4054
3800
|
}
|
|
4055
|
-
interface Ed448Params extends Algorithm {
|
|
4056
|
-
context?: BufferSource;
|
|
4057
|
-
}
|
|
4058
3801
|
interface HkdfParams extends Algorithm {
|
|
4059
3802
|
hash: HashAlgorithmIdentifier;
|
|
4060
|
-
info: BufferSource;
|
|
4061
|
-
salt: BufferSource;
|
|
3803
|
+
info: NodeJS.BufferSource;
|
|
3804
|
+
salt: NodeJS.BufferSource;
|
|
4062
3805
|
}
|
|
4063
3806
|
interface HmacImportParams extends Algorithm {
|
|
4064
3807
|
hash: HashAlgorithmIdentifier;
|
|
@@ -4072,6 +3815,10 @@ declare module "crypto" {
|
|
|
4072
3815
|
hash: HashAlgorithmIdentifier;
|
|
4073
3816
|
length?: number;
|
|
4074
3817
|
}
|
|
3818
|
+
interface KangarooTwelveParams {
|
|
3819
|
+
customization?: NodeJS.BufferSource;
|
|
3820
|
+
outputLength: number;
|
|
3821
|
+
}
|
|
4075
3822
|
interface JsonWebKey {
|
|
4076
3823
|
alg?: string;
|
|
4077
3824
|
crv?: string;
|
|
@@ -4095,10 +3842,23 @@ declare module "crypto" {
|
|
|
4095
3842
|
interface KeyAlgorithm {
|
|
4096
3843
|
name: string;
|
|
4097
3844
|
}
|
|
3845
|
+
interface KmacImportParams extends Algorithm {
|
|
3846
|
+
length?: number;
|
|
3847
|
+
}
|
|
3848
|
+
interface KmacKeyAlgorithm extends KeyAlgorithm {
|
|
3849
|
+
length: number;
|
|
3850
|
+
}
|
|
3851
|
+
interface KmacKeyGenParams extends Algorithm {
|
|
3852
|
+
length?: number;
|
|
3853
|
+
}
|
|
3854
|
+
interface KmacParams extends Algorithm {
|
|
3855
|
+
customization?: NodeJS.BufferSource;
|
|
3856
|
+
outputLength: number;
|
|
3857
|
+
}
|
|
4098
3858
|
interface Pbkdf2Params extends Algorithm {
|
|
4099
3859
|
hash: HashAlgorithmIdentifier;
|
|
4100
3860
|
iterations: number;
|
|
4101
|
-
salt: BufferSource;
|
|
3861
|
+
salt: NodeJS.BufferSource;
|
|
4102
3862
|
}
|
|
4103
3863
|
interface RsaHashedImportParams extends Algorithm {
|
|
4104
3864
|
hash: HashAlgorithmIdentifier;
|
|
@@ -4118,7 +3878,7 @@ declare module "crypto" {
|
|
|
4118
3878
|
publicExponent: BigInteger;
|
|
4119
3879
|
}
|
|
4120
3880
|
interface RsaOaepParams extends Algorithm {
|
|
4121
|
-
label?: BufferSource;
|
|
3881
|
+
label?: NodeJS.BufferSource;
|
|
4122
3882
|
}
|
|
4123
3883
|
interface RsaOtherPrimesInfo {
|
|
4124
3884
|
d?: string;
|
|
@@ -4128,269 +3888,110 @@ declare module "crypto" {
|
|
|
4128
3888
|
interface RsaPssParams extends Algorithm {
|
|
4129
3889
|
saltLength: number;
|
|
4130
3890
|
}
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
*/
|
|
3891
|
+
interface TurboShakeParams {
|
|
3892
|
+
domainSeparation?: number;
|
|
3893
|
+
outputLength: number;
|
|
3894
|
+
}
|
|
4136
3895
|
interface Crypto {
|
|
4137
|
-
/**
|
|
4138
|
-
* Provides access to the `SubtleCrypto` API.
|
|
4139
|
-
* @since v15.0.0
|
|
4140
|
-
*/
|
|
4141
3896
|
readonly subtle: SubtleCrypto;
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
*/
|
|
4151
|
-
getRandomValues<T extends Exclude<NodeJS.TypedArray, Float32Array | Float64Array>>(typedArray: T): T;
|
|
4152
|
-
/**
|
|
4153
|
-
* Generates a random {@link https://www.rfc-editor.org/rfc/rfc4122.txt RFC 4122} version 4 UUID.
|
|
4154
|
-
* The UUID is generated using a cryptographic pseudorandom number generator.
|
|
4155
|
-
* @since v16.7.0
|
|
4156
|
-
*/
|
|
3897
|
+
getRandomValues<
|
|
3898
|
+
T extends Exclude<
|
|
3899
|
+
NodeJS.NonSharedTypedArray,
|
|
3900
|
+
NodeJS.NonSharedFloat16Array | NodeJS.NonSharedFloat32Array | NodeJS.NonSharedFloat64Array
|
|
3901
|
+
>,
|
|
3902
|
+
>(
|
|
3903
|
+
typedArray: T,
|
|
3904
|
+
): T;
|
|
4157
3905
|
randomUUID(): UUID;
|
|
4158
|
-
CryptoKey: CryptoKeyConstructor;
|
|
4159
|
-
}
|
|
4160
|
-
// This constructor throws ILLEGAL_CONSTRUCTOR so it should not be newable.
|
|
4161
|
-
interface CryptoKeyConstructor {
|
|
4162
|
-
/** Illegal constructor */
|
|
4163
|
-
(_: { readonly _: unique symbol }): never; // Allows instanceof to work but not be callable by the user.
|
|
4164
|
-
readonly length: 0;
|
|
4165
|
-
readonly name: "CryptoKey";
|
|
4166
|
-
readonly prototype: CryptoKey;
|
|
4167
3906
|
}
|
|
4168
|
-
/**
|
|
4169
|
-
* @since v15.0.0
|
|
4170
|
-
*/
|
|
4171
3907
|
interface CryptoKey {
|
|
4172
|
-
/**
|
|
4173
|
-
* An object detailing the algorithm for which the key can be used along with additional algorithm-specific parameters.
|
|
4174
|
-
* @since v15.0.0
|
|
4175
|
-
*/
|
|
4176
3908
|
readonly algorithm: KeyAlgorithm;
|
|
4177
|
-
/**
|
|
4178
|
-
* When `true`, the {@link CryptoKey} can be extracted using either `subtleCrypto.exportKey()` or `subtleCrypto.wrapKey()`.
|
|
4179
|
-
* @since v15.0.0
|
|
4180
|
-
*/
|
|
4181
3909
|
readonly extractable: boolean;
|
|
4182
|
-
/**
|
|
4183
|
-
* A string identifying whether the key is a symmetric (`'secret'`) or asymmetric (`'private'` or `'public'`) key.
|
|
4184
|
-
* @since v15.0.0
|
|
4185
|
-
*/
|
|
4186
3910
|
readonly type: KeyType;
|
|
4187
|
-
/**
|
|
4188
|
-
* An array of strings identifying the operations for which the key may be used.
|
|
4189
|
-
*
|
|
4190
|
-
* The possible usages are:
|
|
4191
|
-
* - `'encrypt'` - The key may be used to encrypt data.
|
|
4192
|
-
* - `'decrypt'` - The key may be used to decrypt data.
|
|
4193
|
-
* - `'sign'` - The key may be used to generate digital signatures.
|
|
4194
|
-
* - `'verify'` - The key may be used to verify digital signatures.
|
|
4195
|
-
* - `'deriveKey'` - The key may be used to derive a new key.
|
|
4196
|
-
* - `'deriveBits'` - The key may be used to derive bits.
|
|
4197
|
-
* - `'wrapKey'` - The key may be used to wrap another key.
|
|
4198
|
-
* - `'unwrapKey'` - The key may be used to unwrap another key.
|
|
4199
|
-
*
|
|
4200
|
-
* Valid key usages depend on the key algorithm (identified by `cryptokey.algorithm.name`).
|
|
4201
|
-
* @since v15.0.0
|
|
4202
|
-
*/
|
|
4203
3911
|
readonly usages: KeyUsage[];
|
|
4204
3912
|
}
|
|
4205
|
-
/**
|
|
4206
|
-
* The `CryptoKeyPair` is a simple dictionary object with `publicKey` and `privateKey` properties, representing an asymmetric key pair.
|
|
4207
|
-
* @since v15.0.0
|
|
4208
|
-
*/
|
|
4209
3913
|
interface CryptoKeyPair {
|
|
4210
|
-
/**
|
|
4211
|
-
* A {@link CryptoKey} whose type will be `'private'`.
|
|
4212
|
-
* @since v15.0.0
|
|
4213
|
-
*/
|
|
4214
3914
|
privateKey: CryptoKey;
|
|
4215
|
-
/**
|
|
4216
|
-
* A {@link CryptoKey} whose type will be `'public'`.
|
|
4217
|
-
* @since v15.0.0
|
|
4218
|
-
*/
|
|
4219
3915
|
publicKey: CryptoKey;
|
|
4220
3916
|
}
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
3917
|
+
interface EncapsulatedBits {
|
|
3918
|
+
sharedKey: ArrayBuffer;
|
|
3919
|
+
ciphertext: ArrayBuffer;
|
|
3920
|
+
}
|
|
3921
|
+
interface EncapsulatedKey {
|
|
3922
|
+
sharedKey: CryptoKey;
|
|
3923
|
+
ciphertext: ArrayBuffer;
|
|
3924
|
+
}
|
|
4224
3925
|
interface SubtleCrypto {
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
3926
|
+
decapsulateBits(
|
|
3927
|
+
decapsulationAlgorithm: AlgorithmIdentifier,
|
|
3928
|
+
decapsulationKey: CryptoKey,
|
|
3929
|
+
ciphertext: NodeJS.BufferSource,
|
|
3930
|
+
): Promise<ArrayBuffer>;
|
|
3931
|
+
decapsulateKey(
|
|
3932
|
+
decapsulationAlgorithm: AlgorithmIdentifier,
|
|
3933
|
+
decapsulationKey: CryptoKey,
|
|
3934
|
+
ciphertext: NodeJS.BufferSource,
|
|
3935
|
+
sharedKeyAlgorithm: AlgorithmIdentifier | HmacImportParams | AesDerivedKeyParams | KmacImportParams,
|
|
3936
|
+
extractable: boolean,
|
|
3937
|
+
usages: KeyUsage[],
|
|
3938
|
+
): Promise<CryptoKey>;
|
|
4238
3939
|
decrypt(
|
|
4239
|
-
algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams |
|
|
3940
|
+
algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams,
|
|
4240
3941
|
key: CryptoKey,
|
|
4241
|
-
data: BufferSource,
|
|
3942
|
+
data: NodeJS.BufferSource,
|
|
4242
3943
|
): Promise<ArrayBuffer>;
|
|
4243
|
-
/**
|
|
4244
|
-
* Using the method and parameters specified in `algorithm` and the keying material provided by `baseKey`,
|
|
4245
|
-
* `subtle.deriveBits()` attempts to generate `length` bits.
|
|
4246
|
-
* The Node.js implementation requires that when `length` is a number it must be multiple of `8`.
|
|
4247
|
-
* When `length` is `null` the maximum number of bits for a given algorithm is generated. This is allowed
|
|
4248
|
-
* for the `'ECDH'`, `'X25519'`, and `'X448'` algorithms.
|
|
4249
|
-
* If successful, the returned promise will be resolved with an `<ArrayBuffer>` containing the generated data.
|
|
4250
|
-
*
|
|
4251
|
-
* The algorithms currently supported include:
|
|
4252
|
-
*
|
|
4253
|
-
* - `'ECDH'`
|
|
4254
|
-
* - `'X25519'`
|
|
4255
|
-
* - `'X448'`
|
|
4256
|
-
* - `'HKDF'`
|
|
4257
|
-
* - `'PBKDF2'`
|
|
4258
|
-
* @since v15.0.0
|
|
4259
|
-
*/
|
|
4260
3944
|
deriveBits(
|
|
4261
|
-
algorithm: EcdhKeyDeriveParams,
|
|
3945
|
+
algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params | Argon2Params,
|
|
4262
3946
|
baseKey: CryptoKey,
|
|
4263
3947
|
length?: number | null,
|
|
4264
3948
|
): Promise<ArrayBuffer>;
|
|
4265
|
-
deriveBits(
|
|
4266
|
-
algorithm: EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params,
|
|
4267
|
-
baseKey: CryptoKey,
|
|
4268
|
-
length: number,
|
|
4269
|
-
): Promise<ArrayBuffer>;
|
|
4270
|
-
/**
|
|
4271
|
-
* Using the method and parameters specified in `algorithm`, and the keying material provided by `baseKey`,
|
|
4272
|
-
* `subtle.deriveKey()` attempts to generate a new <CryptoKey>` based on the method and parameters in `derivedKeyAlgorithm`.
|
|
4273
|
-
*
|
|
4274
|
-
* Calling `subtle.deriveKey()` is equivalent to calling `subtle.deriveBits()` to generate raw keying material,
|
|
4275
|
-
* then passing the result into the `subtle.importKey()` method using the `deriveKeyAlgorithm`, `extractable`, and `keyUsages` parameters as input.
|
|
4276
|
-
*
|
|
4277
|
-
* The algorithms currently supported include:
|
|
4278
|
-
*
|
|
4279
|
-
* - `'ECDH'`
|
|
4280
|
-
* - `'X25519'`
|
|
4281
|
-
* - `'X448'`
|
|
4282
|
-
* - `'HKDF'`
|
|
4283
|
-
* - `'PBKDF2'`
|
|
4284
|
-
* @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}.
|
|
4285
|
-
* @since v15.0.0
|
|
4286
|
-
*/
|
|
4287
3949
|
deriveKey(
|
|
4288
|
-
algorithm: EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params,
|
|
3950
|
+
algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params | Argon2Params,
|
|
4289
3951
|
baseKey: CryptoKey,
|
|
4290
|
-
|
|
3952
|
+
derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | KmacImportParams,
|
|
4291
3953
|
extractable: boolean,
|
|
4292
3954
|
keyUsages: readonly KeyUsage[],
|
|
4293
3955
|
): Promise<CryptoKey>;
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
/**
|
|
4310
|
-
* Using the method and parameters specified by `algorithm` and the keying material provided by `key`,
|
|
4311
|
-
* `subtle.encrypt()` attempts to encipher `data`. If successful,
|
|
4312
|
-
* the returned promise is resolved with an `<ArrayBuffer>` containing the encrypted result.
|
|
4313
|
-
*
|
|
4314
|
-
* The algorithms currently supported include:
|
|
4315
|
-
*
|
|
4316
|
-
* - `'RSA-OAEP'`
|
|
4317
|
-
* - `'AES-CTR'`
|
|
4318
|
-
* - `'AES-CBC'`
|
|
4319
|
-
* - `'AES-GCM'`
|
|
4320
|
-
* @since v15.0.0
|
|
4321
|
-
*/
|
|
3956
|
+
digest(
|
|
3957
|
+
algorithm: AlgorithmIdentifier | CShakeParams | TurboShakeParams | KangarooTwelveParams,
|
|
3958
|
+
data: NodeJS.BufferSource,
|
|
3959
|
+
): Promise<ArrayBuffer>;
|
|
3960
|
+
encapsulateBits(
|
|
3961
|
+
encapsulationAlgorithm: AlgorithmIdentifier,
|
|
3962
|
+
encapsulationKey: CryptoKey,
|
|
3963
|
+
): Promise<EncapsulatedBits>;
|
|
3964
|
+
encapsulateKey(
|
|
3965
|
+
encapsulationAlgorithm: AlgorithmIdentifier,
|
|
3966
|
+
encapsulationKey: CryptoKey,
|
|
3967
|
+
sharedKeyAlgorithm: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | KmacImportParams,
|
|
3968
|
+
extractable: boolean,
|
|
3969
|
+
usages: KeyUsage[],
|
|
3970
|
+
): Promise<EncapsulatedKey>;
|
|
4322
3971
|
encrypt(
|
|
4323
|
-
algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams |
|
|
3972
|
+
algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams,
|
|
4324
3973
|
key: CryptoKey,
|
|
4325
|
-
data: BufferSource,
|
|
3974
|
+
data: NodeJS.BufferSource,
|
|
4326
3975
|
): Promise<ArrayBuffer>;
|
|
4327
|
-
/**
|
|
4328
|
-
* Exports the given key into the specified format, if supported.
|
|
4329
|
-
*
|
|
4330
|
-
* If the `<CryptoKey>` is not extractable, the returned promise will reject.
|
|
4331
|
-
*
|
|
4332
|
-
* When `format` is either `'pkcs8'` or `'spki'` and the export is successful,
|
|
4333
|
-
* the returned promise will be resolved with an `<ArrayBuffer>` containing the exported key data.
|
|
4334
|
-
*
|
|
4335
|
-
* When `format` is `'jwk'` and the export is successful, the returned promise will be resolved with a
|
|
4336
|
-
* JavaScript object conforming to the {@link https://tools.ietf.org/html/rfc7517 JSON Web Key} specification.
|
|
4337
|
-
* @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`.
|
|
4338
|
-
* @returns `<Promise>` containing `<ArrayBuffer>`.
|
|
4339
|
-
* @since v15.0.0
|
|
4340
|
-
*/
|
|
4341
3976
|
exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>;
|
|
4342
3977
|
exportKey(format: Exclude<KeyFormat, "jwk">, key: CryptoKey): Promise<ArrayBuffer>;
|
|
4343
|
-
|
|
4344
|
-
* Using the method and parameters provided in `algorithm`,
|
|
4345
|
-
* `subtle.generateKey()` attempts to generate new keying material.
|
|
4346
|
-
* Depending the method used, the method may generate either a single `<CryptoKey>` or a `<CryptoKeyPair>`.
|
|
4347
|
-
*
|
|
4348
|
-
* The `<CryptoKeyPair>` (public and private key) generating algorithms supported include:
|
|
4349
|
-
*
|
|
4350
|
-
* - `'RSASSA-PKCS1-v1_5'`
|
|
4351
|
-
* - `'RSA-PSS'`
|
|
4352
|
-
* - `'RSA-OAEP'`
|
|
4353
|
-
* - `'ECDSA'`
|
|
4354
|
-
* - `'Ed25519'`
|
|
4355
|
-
* - `'Ed448'`
|
|
4356
|
-
* - `'ECDH'`
|
|
4357
|
-
* - `'X25519'`
|
|
4358
|
-
* - `'X448'`
|
|
4359
|
-
* The `<CryptoKey>` (secret key) generating algorithms supported include:
|
|
4360
|
-
*
|
|
4361
|
-
* - `'HMAC'`
|
|
4362
|
-
* - `'AES-CTR'`
|
|
4363
|
-
* - `'AES-CBC'`
|
|
4364
|
-
* - `'AES-GCM'`
|
|
4365
|
-
* - `'AES-KW'`
|
|
4366
|
-
* @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}.
|
|
4367
|
-
* @since v15.0.0
|
|
4368
|
-
*/
|
|
3978
|
+
exportKey(format: KeyFormat, key: CryptoKey): Promise<ArrayBuffer | JsonWebKey>;
|
|
4369
3979
|
generateKey(
|
|
4370
3980
|
algorithm: RsaHashedKeyGenParams | EcKeyGenParams,
|
|
4371
3981
|
extractable: boolean,
|
|
4372
|
-
keyUsages:
|
|
3982
|
+
keyUsages: KeyUsage[],
|
|
4373
3983
|
): Promise<CryptoKeyPair>;
|
|
4374
3984
|
generateKey(
|
|
4375
|
-
algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params,
|
|
3985
|
+
algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params | KmacKeyGenParams,
|
|
4376
3986
|
extractable: boolean,
|
|
4377
|
-
keyUsages:
|
|
3987
|
+
keyUsages: KeyUsage[],
|
|
4378
3988
|
): Promise<CryptoKey>;
|
|
4379
3989
|
generateKey(
|
|
4380
3990
|
algorithm: AlgorithmIdentifier,
|
|
4381
3991
|
extractable: boolean,
|
|
4382
3992
|
keyUsages: KeyUsage[],
|
|
4383
3993
|
): Promise<CryptoKeyPair | CryptoKey>;
|
|
4384
|
-
|
|
4385
|
-
* The `subtle.importKey()` method attempts to interpret the provided `keyData` as the given `format`
|
|
4386
|
-
* to create a `<CryptoKey>` instance using the provided `algorithm`, `extractable`, and `keyUsages` arguments.
|
|
4387
|
-
* If the import is successful, the returned promise will be resolved with the created `<CryptoKey>`.
|
|
4388
|
-
*
|
|
4389
|
-
* If importing a `'PBKDF2'` key, `extractable` must be `false`.
|
|
4390
|
-
* @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`.
|
|
4391
|
-
* @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}.
|
|
4392
|
-
* @since v15.0.0
|
|
4393
|
-
*/
|
|
3994
|
+
getPublicKey(key: CryptoKey, keyUsages: KeyUsage[]): Promise<CryptoKey>;
|
|
4394
3995
|
importKey(
|
|
4395
3996
|
format: "jwk",
|
|
4396
3997
|
keyData: JsonWebKey,
|
|
@@ -4399,147 +4000,59 @@ declare module "crypto" {
|
|
|
4399
4000
|
| RsaHashedImportParams
|
|
4400
4001
|
| EcKeyImportParams
|
|
4401
4002
|
| HmacImportParams
|
|
4402
|
-
| AesKeyAlgorithm
|
|
4003
|
+
| AesKeyAlgorithm
|
|
4004
|
+
| KmacImportParams,
|
|
4403
4005
|
extractable: boolean,
|
|
4404
|
-
keyUsages:
|
|
4006
|
+
keyUsages: KeyUsage[],
|
|
4405
4007
|
): Promise<CryptoKey>;
|
|
4406
4008
|
importKey(
|
|
4407
4009
|
format: Exclude<KeyFormat, "jwk">,
|
|
4408
|
-
keyData: BufferSource,
|
|
4010
|
+
keyData: NodeJS.BufferSource,
|
|
4409
4011
|
algorithm:
|
|
4410
4012
|
| AlgorithmIdentifier
|
|
4411
4013
|
| RsaHashedImportParams
|
|
4412
4014
|
| EcKeyImportParams
|
|
4413
4015
|
| HmacImportParams
|
|
4414
|
-
| AesKeyAlgorithm
|
|
4016
|
+
| AesKeyAlgorithm
|
|
4017
|
+
| KmacImportParams,
|
|
4415
4018
|
extractable: boolean,
|
|
4416
4019
|
keyUsages: KeyUsage[],
|
|
4417
4020
|
): Promise<CryptoKey>;
|
|
4418
|
-
/**
|
|
4419
|
-
* Using the method and parameters given by `algorithm` and the keying material provided by `key`,
|
|
4420
|
-
* `subtle.sign()` attempts to generate a cryptographic signature of `data`. If successful,
|
|
4421
|
-
* the returned promise is resolved with an `<ArrayBuffer>` containing the generated signature.
|
|
4422
|
-
*
|
|
4423
|
-
* The algorithms currently supported include:
|
|
4424
|
-
*
|
|
4425
|
-
* - `'RSASSA-PKCS1-v1_5'`
|
|
4426
|
-
* - `'RSA-PSS'`
|
|
4427
|
-
* - `'ECDSA'`
|
|
4428
|
-
* - `'Ed25519'`
|
|
4429
|
-
* - `'Ed448'`
|
|
4430
|
-
* - `'HMAC'`
|
|
4431
|
-
* @since v15.0.0
|
|
4432
|
-
*/
|
|
4433
4021
|
sign(
|
|
4434
|
-
algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams |
|
|
4022
|
+
algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | ContextParams | KmacParams,
|
|
4435
4023
|
key: CryptoKey,
|
|
4436
|
-
data: BufferSource,
|
|
4024
|
+
data: NodeJS.BufferSource,
|
|
4437
4025
|
): Promise<ArrayBuffer>;
|
|
4438
|
-
/**
|
|
4439
|
-
* In cryptography, "wrapping a key" refers to exporting and then encrypting the keying material.
|
|
4440
|
-
* The `subtle.unwrapKey()` method attempts to decrypt a wrapped key and create a `<CryptoKey>` instance.
|
|
4441
|
-
* It is equivalent to calling `subtle.decrypt()` first on the encrypted key data (using the `wrappedKey`, `unwrapAlgo`, and `unwrappingKey` arguments as input)
|
|
4442
|
-
* then passing the results in to the `subtle.importKey()` method using the `unwrappedKeyAlgo`, `extractable`, and `keyUsages` arguments as inputs.
|
|
4443
|
-
* If successful, the returned promise is resolved with a `<CryptoKey>` object.
|
|
4444
|
-
*
|
|
4445
|
-
* The wrapping algorithms currently supported include:
|
|
4446
|
-
*
|
|
4447
|
-
* - `'RSA-OAEP'`
|
|
4448
|
-
* - `'AES-CTR'`
|
|
4449
|
-
* - `'AES-CBC'`
|
|
4450
|
-
* - `'AES-GCM'`
|
|
4451
|
-
* - `'AES-KW'`
|
|
4452
|
-
*
|
|
4453
|
-
* The unwrapped key algorithms supported include:
|
|
4454
|
-
*
|
|
4455
|
-
* - `'RSASSA-PKCS1-v1_5'`
|
|
4456
|
-
* - `'RSA-PSS'`
|
|
4457
|
-
* - `'RSA-OAEP'`
|
|
4458
|
-
* - `'ECDSA'`
|
|
4459
|
-
* - `'Ed25519'`
|
|
4460
|
-
* - `'Ed448'`
|
|
4461
|
-
* - `'ECDH'`
|
|
4462
|
-
* - `'X25519'`
|
|
4463
|
-
* - `'X448'`
|
|
4464
|
-
* - `'HMAC'`
|
|
4465
|
-
* - `'AES-CTR'`
|
|
4466
|
-
* - `'AES-CBC'`
|
|
4467
|
-
* - `'AES-GCM'`
|
|
4468
|
-
* - `'AES-KW'`
|
|
4469
|
-
* @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`.
|
|
4470
|
-
* @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}.
|
|
4471
|
-
* @since v15.0.0
|
|
4472
|
-
*/
|
|
4473
4026
|
unwrapKey(
|
|
4474
4027
|
format: KeyFormat,
|
|
4475
|
-
wrappedKey: BufferSource,
|
|
4028
|
+
wrappedKey: NodeJS.BufferSource,
|
|
4476
4029
|
unwrappingKey: CryptoKey,
|
|
4477
|
-
unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams |
|
|
4030
|
+
unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams,
|
|
4478
4031
|
unwrappedKeyAlgorithm:
|
|
4479
4032
|
| AlgorithmIdentifier
|
|
4480
4033
|
| RsaHashedImportParams
|
|
4481
4034
|
| EcKeyImportParams
|
|
4482
4035
|
| HmacImportParams
|
|
4483
|
-
| AesKeyAlgorithm
|
|
4036
|
+
| AesKeyAlgorithm
|
|
4037
|
+
| KmacImportParams,
|
|
4484
4038
|
extractable: boolean,
|
|
4485
4039
|
keyUsages: KeyUsage[],
|
|
4486
4040
|
): Promise<CryptoKey>;
|
|
4487
|
-
/**
|
|
4488
|
-
* Using the method and parameters given in `algorithm` and the keying material provided by `key`,
|
|
4489
|
-
* `subtle.verify()` attempts to verify that `signature` is a valid cryptographic signature of `data`.
|
|
4490
|
-
* The returned promise is resolved with either `true` or `false`.
|
|
4491
|
-
*
|
|
4492
|
-
* The algorithms currently supported include:
|
|
4493
|
-
*
|
|
4494
|
-
* - `'RSASSA-PKCS1-v1_5'`
|
|
4495
|
-
* - `'RSA-PSS'`
|
|
4496
|
-
* - `'ECDSA'`
|
|
4497
|
-
* - `'Ed25519'`
|
|
4498
|
-
* - `'Ed448'`
|
|
4499
|
-
* - `'HMAC'`
|
|
4500
|
-
* @since v15.0.0
|
|
4501
|
-
*/
|
|
4502
4041
|
verify(
|
|
4503
|
-
algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams |
|
|
4042
|
+
algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | ContextParams | KmacParams,
|
|
4504
4043
|
key: CryptoKey,
|
|
4505
|
-
signature: BufferSource,
|
|
4506
|
-
data: BufferSource,
|
|
4044
|
+
signature: NodeJS.BufferSource,
|
|
4045
|
+
data: NodeJS.BufferSource,
|
|
4507
4046
|
): Promise<boolean>;
|
|
4508
|
-
/**
|
|
4509
|
-
* In cryptography, "wrapping a key" refers to exporting and then encrypting the keying material.
|
|
4510
|
-
* The `subtle.wrapKey()` method exports the keying material into the format identified by `format`,
|
|
4511
|
-
* then encrypts it using the method and parameters specified by `wrapAlgo` and the keying material provided by `wrappingKey`.
|
|
4512
|
-
* It is the equivalent to calling `subtle.exportKey()` using `format` and `key` as the arguments,
|
|
4513
|
-
* then passing the result to the `subtle.encrypt()` method using `wrappingKey` and `wrapAlgo` as inputs.
|
|
4514
|
-
* If successful, the returned promise will be resolved with an `<ArrayBuffer>` containing the encrypted key data.
|
|
4515
|
-
*
|
|
4516
|
-
* The wrapping algorithms currently supported include:
|
|
4517
|
-
*
|
|
4518
|
-
* - `'RSA-OAEP'`
|
|
4519
|
-
* - `'AES-CTR'`
|
|
4520
|
-
* - `'AES-CBC'`
|
|
4521
|
-
* - `'AES-GCM'`
|
|
4522
|
-
* - `'AES-KW'`
|
|
4523
|
-
* @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`.
|
|
4524
|
-
* @since v15.0.0
|
|
4525
|
-
*/
|
|
4526
4047
|
wrapKey(
|
|
4527
4048
|
format: KeyFormat,
|
|
4528
4049
|
key: CryptoKey,
|
|
4529
4050
|
wrappingKey: CryptoKey,
|
|
4530
|
-
wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams |
|
|
4051
|
+
wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams,
|
|
4531
4052
|
): Promise<ArrayBuffer>;
|
|
4532
4053
|
}
|
|
4533
4054
|
}
|
|
4534
|
-
|
|
4535
|
-
global {
|
|
4536
|
-
var crypto: typeof globalThis extends {
|
|
4537
|
-
crypto: infer T;
|
|
4538
|
-
onmessage: any;
|
|
4539
|
-
} ? T
|
|
4540
|
-
: webcrypto.Crypto;
|
|
4541
|
-
}
|
|
4542
4055
|
}
|
|
4543
|
-
declare module "
|
|
4544
|
-
export * from "crypto";
|
|
4056
|
+
declare module "crypto" {
|
|
4057
|
+
export * from "node:crypto";
|
|
4545
4058
|
}
|