agentvault 1.0.2 → 1.0.5
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 -0
- package/README.md +66 -6
- package/dist/cli/commands/approve.d.ts.map +1 -0
- package/dist/cli/commands/approve.js +357 -1
- package/dist/cli/commands/approve.js.map +1 -0
- package/dist/cli/commands/archive.d.ts.map +1 -0
- package/dist/cli/commands/archive.js.map +1 -0
- package/dist/cli/commands/backup.d.ts.map +1 -0
- package/dist/cli/commands/backup.js +303 -20
- package/dist/cli/commands/backup.js.map +1 -0
- package/dist/cli/commands/cloud-backup.d.ts.map +1 -0
- package/dist/cli/commands/cloud-backup.js +17 -0
- package/dist/cli/commands/cloud-backup.js.map +1 -0
- package/dist/cli/commands/cron.d.ts +14 -0
- package/dist/cli/commands/cron.d.ts.map +1 -0
- package/dist/cli/commands/cron.js +144 -0
- package/dist/cli/commands/cron.js.map +1 -0
- package/dist/cli/commands/cycles.d.ts.map +1 -0
- package/dist/cli/commands/cycles.js.map +1 -0
- package/dist/cli/commands/decrypt.d.ts.map +1 -0
- package/dist/cli/commands/decrypt.js.map +1 -0
- package/dist/cli/commands/deploy.d.ts.map +1 -0
- package/dist/cli/commands/deploy.js.map +1 -0
- package/dist/cli/commands/exec.d.ts.map +1 -0
- package/dist/cli/commands/exec.js.map +1 -0
- package/dist/cli/commands/fetch.d.ts +3 -0
- package/dist/cli/commands/fetch.d.ts.map +1 -0
- package/dist/cli/commands/fetch.js +68 -4
- package/dist/cli/commands/fetch.js.map +1 -0
- package/dist/cli/commands/health.d.ts.map +1 -0
- package/dist/cli/commands/health.js +57 -2
- package/dist/cli/commands/health.js.map +1 -0
- package/dist/cli/commands/identity.d.ts.map +1 -0
- package/dist/cli/commands/identity.js.map +1 -0
- package/dist/cli/commands/inference.d.ts.map +1 -0
- package/dist/cli/commands/inference.js.map +1 -0
- package/dist/cli/commands/info.d.ts.map +1 -0
- package/dist/cli/commands/info.js.map +1 -0
- package/dist/cli/commands/init.d.ts +18 -1
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +152 -27
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/instrument.d.ts.map +1 -0
- package/dist/cli/commands/instrument.js.map +1 -0
- package/dist/cli/commands/list.d.ts.map +1 -0
- package/dist/cli/commands/list.js.map +1 -0
- package/dist/cli/commands/logs.d.ts.map +1 -0
- package/dist/cli/commands/logs.js.map +1 -0
- package/dist/cli/commands/mcp.d.ts +4 -0
- package/dist/cli/commands/mcp.d.ts.map +1 -0
- package/dist/cli/commands/mcp.js +228 -0
- package/dist/cli/commands/mcp.js.map +1 -0
- package/dist/cli/commands/memory.d.ts +26 -0
- package/dist/cli/commands/memory.d.ts.map +1 -0
- package/dist/cli/commands/memory.js +509 -0
- package/dist/cli/commands/memory.js.map +1 -0
- package/dist/cli/commands/mint.d.ts +25 -0
- package/dist/cli/commands/mint.d.ts.map +1 -0
- package/dist/cli/commands/mint.js +276 -0
- package/dist/cli/commands/mint.js.map +1 -0
- package/dist/cli/commands/mirror.d.ts +19 -0
- package/dist/cli/commands/mirror.d.ts.map +1 -0
- package/dist/cli/commands/mirror.js +216 -0
- package/dist/cli/commands/mirror.js.map +1 -0
- package/dist/cli/commands/monitor.d.ts.map +1 -0
- package/dist/cli/commands/monitor.js.map +1 -0
- package/dist/cli/commands/network.d.ts.map +1 -0
- package/dist/cli/commands/network.js.map +1 -0
- package/dist/cli/commands/orchestrate.d.ts +35 -0
- package/dist/cli/commands/orchestrate.d.ts.map +1 -0
- package/dist/cli/commands/orchestrate.js +190 -0
- package/dist/cli/commands/orchestrate.js.map +1 -0
- package/dist/cli/commands/package.d.ts.map +1 -0
- package/dist/cli/commands/package.js.map +1 -0
- package/dist/cli/commands/pilot.d.ts +17 -0
- package/dist/cli/commands/pilot.d.ts.map +1 -0
- package/dist/cli/commands/pilot.js +490 -0
- package/dist/cli/commands/pilot.js.map +1 -0
- package/dist/cli/commands/polytician.d.ts +4 -0
- package/dist/cli/commands/polytician.d.ts.map +1 -0
- package/dist/cli/commands/polytician.js +229 -0
- package/dist/cli/commands/polytician.js.map +1 -0
- package/dist/cli/commands/profile.d.ts.map +1 -0
- package/dist/cli/commands/profile.js +1 -1
- package/dist/cli/commands/profile.js.map +1 -0
- package/dist/cli/commands/promote.d.ts.map +1 -0
- package/dist/cli/commands/promote.js.map +1 -0
- package/dist/cli/commands/rebase.d.ts +85 -0
- package/dist/cli/commands/rebase.d.ts.map +1 -0
- package/dist/cli/commands/rebase.js +175 -0
- package/dist/cli/commands/rebase.js.map +1 -0
- package/dist/cli/commands/rebuild.d.ts.map +1 -0
- package/dist/cli/commands/rebuild.js.map +1 -0
- package/dist/cli/commands/repo.d.ts +19 -0
- package/dist/cli/commands/repo.d.ts.map +1 -0
- package/dist/cli/commands/repo.js +187 -0
- package/dist/cli/commands/repo.js.map +1 -0
- package/dist/cli/commands/rollback.d.ts.map +1 -0
- package/dist/cli/commands/rollback.js.map +1 -0
- package/dist/cli/commands/safehouse.d.ts +11 -0
- package/dist/cli/commands/safehouse.d.ts.map +1 -0
- package/dist/cli/commands/safehouse.js +323 -0
- package/dist/cli/commands/safehouse.js.map +1 -0
- package/dist/cli/commands/show.d.ts.map +1 -0
- package/dist/cli/commands/show.js.map +1 -0
- package/dist/cli/commands/skills.d.ts +12 -0
- package/dist/cli/commands/skills.d.ts.map +1 -0
- package/dist/cli/commands/skills.js +248 -0
- package/dist/cli/commands/skills.js.map +1 -0
- package/dist/cli/commands/stats.d.ts.map +1 -0
- package/dist/cli/commands/stats.js +2 -2
- package/dist/cli/commands/stats.js.map +1 -0
- package/dist/cli/commands/status.d.ts +2 -0
- package/dist/cli/commands/status.d.ts.map +1 -0
- package/dist/cli/commands/status.js +25 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/commands/test.d.ts.map +1 -0
- package/dist/cli/commands/test.js.map +1 -0
- package/dist/cli/commands/tokens.d.ts.map +1 -0
- package/dist/cli/commands/tokens.js.map +1 -0
- package/dist/cli/commands/trace.d.ts.map +1 -0
- package/dist/cli/commands/trace.js +3 -3
- package/dist/cli/commands/trace.js.map +1 -0
- package/dist/cli/commands/vault.d.ts +7 -0
- package/dist/cli/commands/vault.d.ts.map +1 -0
- package/dist/cli/commands/vault.js +551 -0
- package/dist/cli/commands/vault.js.map +1 -0
- package/dist/cli/commands/wallet-export.d.ts.map +1 -0
- package/dist/cli/commands/wallet-export.js.map +1 -0
- package/dist/cli/commands/wallet-history.d.ts.map +1 -0
- package/dist/cli/commands/wallet-history.js +2 -26
- package/dist/cli/commands/wallet-history.js.map +1 -0
- package/dist/cli/commands/wallet-import.d.ts.map +1 -0
- package/dist/cli/commands/wallet-import.js.map +1 -0
- package/dist/cli/commands/wallet-multi-send.d.ts.map +1 -0
- package/dist/cli/commands/wallet-multi-send.js.map +1 -0
- package/dist/cli/commands/wallet-process-queue.d.ts.map +1 -0
- package/dist/cli/commands/wallet-process-queue.js +2 -23
- package/dist/cli/commands/wallet-process-queue.js.map +1 -0
- package/dist/cli/commands/wallet-sign.d.ts.map +1 -0
- package/dist/cli/commands/wallet-sign.js +2 -26
- package/dist/cli/commands/wallet-sign.js.map +1 -0
- package/dist/cli/commands/wallet.d.ts +61 -0
- package/dist/cli/commands/wallet.d.ts.map +1 -0
- package/dist/cli/commands/wallet.js +312 -42
- package/dist/cli/commands/wallet.js.map +1 -0
- package/dist/cli/commands/wiki.d.ts +29 -0
- package/dist/cli/commands/wiki.d.ts.map +1 -0
- package/dist/cli/commands/wiki.js +528 -0
- package/dist/cli/commands/wiki.js.map +1 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +74 -2
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/merge.d.ts +70 -0
- package/dist/cli/merge.d.ts.map +1 -0
- package/dist/cli/merge.js +232 -0
- package/dist/cli/merge.js.map +1 -0
- package/dist/src/archival/archive-manager.d.ts +4 -0
- package/dist/src/archival/archive-manager.d.ts.map +1 -0
- package/dist/src/archival/archive-manager.js +6 -0
- package/dist/src/archival/archive-manager.js.map +1 -0
- package/dist/src/archival/arweave-archiver.d.ts +173 -0
- package/dist/src/archival/arweave-archiver.d.ts.map +1 -0
- package/dist/src/archival/arweave-archiver.js +279 -0
- package/dist/src/archival/arweave-archiver.js.map +1 -0
- package/dist/src/archival/arweave-client.d.ts +1 -0
- package/dist/src/archival/arweave-client.d.ts.map +1 -0
- package/dist/src/archival/arweave-client.js +5 -2
- package/dist/src/archival/arweave-client.js.map +1 -0
- package/dist/src/archival/index.d.ts +4 -1
- package/dist/src/archival/index.d.ts.map +1 -0
- package/dist/src/archival/index.js +2 -1
- package/dist/src/archival/index.js.map +1 -0
- package/dist/src/backbone/constants.d.ts +30 -0
- package/dist/src/backbone/constants.d.ts.map +1 -0
- package/dist/src/backbone/constants.js +62 -0
- package/dist/src/backbone/constants.js.map +1 -0
- package/dist/src/backbone/index.d.ts +15 -0
- package/dist/src/backbone/index.d.ts.map +1 -0
- package/dist/src/backbone/index.js +18 -0
- package/dist/src/backbone/index.js.map +1 -0
- package/dist/src/backbone/services/communication.d.ts +42 -0
- package/dist/src/backbone/services/communication.d.ts.map +1 -0
- package/dist/src/backbone/services/communication.js +107 -0
- package/dist/src/backbone/services/communication.js.map +1 -0
- package/dist/src/backbone/services/consensus.d.ts +61 -0
- package/dist/src/backbone/services/consensus.d.ts.map +1 -0
- package/dist/src/backbone/services/consensus.js +210 -0
- package/dist/src/backbone/services/consensus.js.map +1 -0
- package/dist/src/backbone/services/index.d.ts +10 -0
- package/dist/src/backbone/services/index.d.ts.map +1 -0
- package/dist/src/backbone/services/index.js +6 -0
- package/dist/src/backbone/services/index.js.map +1 -0
- package/dist/src/backbone/services/knowledge.d.ts +44 -0
- package/dist/src/backbone/services/knowledge.d.ts.map +1 -0
- package/dist/src/backbone/services/knowledge.js +99 -0
- package/dist/src/backbone/services/knowledge.js.map +1 -0
- package/dist/src/backbone/services/memory.d.ts +36 -0
- package/dist/src/backbone/services/memory.d.ts.map +1 -0
- package/dist/src/backbone/services/memory.js +94 -0
- package/dist/src/backbone/services/memory.js.map +1 -0
- package/dist/src/backbone/services/vault-health.d.ts +18 -0
- package/dist/src/backbone/services/vault-health.d.ts.map +1 -0
- package/dist/src/backbone/services/vault-health.js +74 -0
- package/dist/src/backbone/services/vault-health.js.map +1 -0
- package/dist/src/backbone/types.d.ts +211 -0
- package/dist/src/backbone/types.d.ts.map +1 -0
- package/dist/src/backbone/types.js +8 -0
- package/dist/src/backbone/types.js.map +1 -0
- package/dist/src/backbone/validators.d.ts +211 -0
- package/dist/src/backbone/validators.d.ts.map +1 -0
- package/dist/src/backbone/validators.js +122 -0
- package/dist/src/backbone/validators.js.map +1 -0
- package/dist/src/backup/backup.d.ts +107 -1
- package/dist/src/backup/backup.d.ts.map +1 -0
- package/dist/src/backup/backup.js +413 -4
- package/dist/src/backup/backup.js.map +1 -0
- package/dist/src/backup/index.d.ts +3 -1
- package/dist/src/backup/index.d.ts.map +1 -0
- package/dist/src/backup/index.js +3 -1
- package/dist/src/backup/index.js.map +1 -0
- package/dist/src/backup/merkle.d.ts +44 -0
- package/dist/src/backup/merkle.d.ts.map +1 -0
- package/dist/src/backup/merkle.js +85 -0
- package/dist/src/backup/merkle.js.map +1 -0
- package/dist/src/backup/thoughtform-bundle.d.ts +42 -0
- package/dist/src/backup/thoughtform-bundle.d.ts.map +1 -0
- package/dist/src/backup/thoughtform-bundle.js +200 -0
- package/dist/src/backup/thoughtform-bundle.js.map +1 -0
- package/dist/src/canister/actor.d.ts +310 -0
- package/dist/src/canister/actor.d.ts.map +1 -0
- package/dist/src/canister/actor.idl.d.ts +8 -0
- package/dist/src/canister/actor.idl.d.ts.map +1 -0
- package/dist/src/canister/actor.idl.js +518 -0
- package/dist/src/canister/actor.idl.js.map +1 -0
- package/dist/src/canister/actor.js +51 -0
- package/dist/src/canister/actor.js.map +1 -0
- package/dist/src/canister/encryption.d.ts +158 -0
- package/dist/src/canister/encryption.d.ts.map +1 -0
- package/dist/src/canister/encryption.js +296 -0
- package/dist/src/canister/encryption.js.map +1 -0
- package/dist/src/canister/memory-repo-actor.d.ts +162 -0
- package/dist/src/canister/memory-repo-actor.d.ts.map +1 -0
- package/dist/src/canister/memory-repo-actor.idl.d.ts +8 -0
- package/dist/src/canister/memory-repo-actor.idl.d.ts.map +1 -0
- package/dist/src/canister/memory-repo-actor.idl.js +90 -0
- package/dist/src/canister/memory-repo-actor.idl.js.map +1 -0
- package/dist/src/canister/memory-repo-actor.js +69 -0
- package/dist/src/canister/memory-repo-actor.js.map +1 -0
- package/dist/src/canister/types.d.ts +54 -0
- package/dist/src/canister/types.d.ts.map +1 -0
- package/dist/src/canister/types.js +7 -0
- package/dist/src/canister/types.js.map +1 -0
- package/dist/src/cloud-storage/cloud-sync.d.ts.map +1 -0
- package/dist/src/cloud-storage/cloud-sync.js +10 -5
- package/dist/src/cloud-storage/cloud-sync.js.map +1 -0
- package/dist/src/cloud-storage/index.d.ts.map +1 -0
- package/dist/src/cloud-storage/index.js.map +1 -0
- package/dist/src/cloud-storage/provider-detector.d.ts.map +1 -0
- package/dist/src/cloud-storage/provider-detector.js.map +1 -0
- package/dist/src/cloud-storage/types.d.ts +5 -0
- package/dist/src/cloud-storage/types.d.ts.map +1 -0
- package/dist/src/cloud-storage/types.js.map +1 -0
- package/dist/src/debugging/debug-logger.d.ts +8 -0
- package/dist/src/debugging/debug-logger.d.ts.map +1 -0
- package/dist/src/debugging/debug-logger.js +11 -0
- package/dist/src/debugging/debug-logger.js.map +1 -0
- package/dist/src/debugging/index.d.ts +1 -0
- package/dist/src/debugging/index.d.ts.map +1 -0
- package/dist/src/debugging/index.js +1 -0
- package/dist/src/debugging/index.js.map +1 -0
- package/dist/src/debugging/logs.d.ts.map +1 -0
- package/dist/src/debugging/logs.js.map +1 -0
- package/dist/src/debugging/types.d.ts.map +1 -0
- package/dist/src/debugging/types.js.map +1 -0
- package/dist/src/deployment/deployer.d.ts.map +1 -0
- package/dist/src/deployment/deployer.js +133 -1
- package/dist/src/deployment/deployer.js.map +1 -0
- package/dist/src/deployment/icpClient.d.ts.map +1 -0
- package/dist/src/deployment/icpClient.js +4 -0
- package/dist/src/deployment/icpClient.js.map +1 -0
- package/dist/src/deployment/index.d.ts.map +1 -0
- package/dist/src/deployment/index.js.map +1 -0
- package/dist/src/deployment/promotion.d.ts.map +1 -0
- package/dist/src/deployment/promotion.js.map +1 -0
- package/dist/src/deployment/types.d.ts +2 -1
- package/dist/src/deployment/types.d.ts.map +1 -0
- package/dist/src/deployment/types.js.map +1 -0
- package/dist/src/fault-tolerance/backup-status.d.ts +31 -0
- package/dist/src/fault-tolerance/backup-status.d.ts.map +1 -0
- package/dist/src/fault-tolerance/backup-status.js +76 -0
- package/dist/src/fault-tolerance/backup-status.js.map +1 -0
- package/dist/src/fault-tolerance/cron-check.d.ts +66 -0
- package/dist/src/fault-tolerance/cron-check.d.ts.map +1 -0
- package/dist/src/fault-tolerance/cron-check.js +177 -0
- package/dist/src/fault-tolerance/cron-check.js.map +1 -0
- package/dist/src/fault-tolerance/index.d.ts +12 -0
- package/dist/src/fault-tolerance/index.d.ts.map +1 -0
- package/dist/src/fault-tolerance/index.js +12 -0
- package/dist/src/fault-tolerance/index.js.map +1 -0
- package/dist/src/fault-tolerance/mirror-sync.d.ts +61 -0
- package/dist/src/fault-tolerance/mirror-sync.d.ts.map +1 -0
- package/dist/src/fault-tolerance/mirror-sync.js +203 -0
- package/dist/src/fault-tolerance/mirror-sync.js.map +1 -0
- package/dist/src/icp/batch.d.ts.map +1 -0
- package/dist/src/icp/batch.js +10 -4
- package/dist/src/icp/batch.js.map +1 -0
- package/dist/src/icp/cycles.d.ts.map +1 -0
- package/dist/src/icp/cycles.js.map +1 -0
- package/dist/src/icp/environment.d.ts.map +1 -0
- package/dist/src/icp/environment.js.map +1 -0
- package/dist/src/icp/icpcli.d.ts.map +1 -0
- package/dist/src/icp/icpcli.js.map +1 -0
- package/dist/src/icp/icwasm.d.ts.map +1 -0
- package/dist/src/icp/icwasm.js.map +1 -0
- package/dist/src/icp/identity.d.ts.map +1 -0
- package/dist/src/icp/identity.js.map +1 -0
- package/dist/src/icp/index.d.ts.map +1 -0
- package/dist/src/icp/index.js.map +1 -0
- package/dist/src/icp/optimization.d.ts.map +1 -0
- package/dist/src/icp/optimization.js.map +1 -0
- package/dist/src/icp/tokens.d.ts.map +1 -0
- package/dist/src/icp/tokens.js.map +1 -0
- package/dist/src/icp/tool-detector.d.ts.map +1 -0
- package/dist/src/icp/tool-detector.js +19 -5
- package/dist/src/icp/tool-detector.js.map +1 -0
- package/dist/src/icp/types.d.ts.map +1 -0
- package/dist/src/icp/types.js.map +1 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +22 -1
- package/dist/src/index.js.map +1 -0
- package/dist/src/inference/bittensor-client.d.ts +54 -1
- package/dist/src/inference/bittensor-client.d.ts.map +1 -0
- package/dist/src/inference/bittensor-client.js +96 -3
- package/dist/src/inference/bittensor-client.js.map +1 -0
- package/dist/src/inference/fallback-chain.d.ts +90 -0
- package/dist/src/inference/fallback-chain.d.ts.map +1 -0
- package/dist/src/inference/fallback-chain.js +219 -0
- package/dist/src/inference/fallback-chain.js.map +1 -0
- package/dist/src/inference/index.d.ts +6 -1
- package/dist/src/inference/index.d.ts.map +1 -0
- package/dist/src/inference/index.js +6 -1
- package/dist/src/inference/index.js.map +1 -0
- package/dist/src/inference/inference-manager.d.ts.map +1 -0
- package/dist/src/inference/inference-manager.js.map +1 -0
- package/dist/src/inference/local-model-client.d.ts +46 -0
- package/dist/src/inference/local-model-client.d.ts.map +1 -0
- package/dist/src/inference/local-model-client.js +92 -0
- package/dist/src/inference/local-model-client.js.map +1 -0
- package/dist/src/inference/secure-inference.d.ts +105 -0
- package/dist/src/inference/secure-inference.d.ts.map +1 -0
- package/dist/src/inference/secure-inference.js +237 -0
- package/dist/src/inference/secure-inference.js.map +1 -0
- package/dist/src/inference/venice-client.d.ts +149 -0
- package/dist/src/inference/venice-client.d.ts.map +1 -0
- package/dist/src/inference/venice-client.js +333 -0
- package/dist/src/inference/venice-client.js.map +1 -0
- package/dist/src/metrics/index.d.ts.map +1 -0
- package/dist/src/metrics/index.js.map +1 -0
- package/dist/src/metrics/metrics.d.ts.map +1 -0
- package/dist/src/metrics/metrics.js.map +1 -0
- package/dist/src/mint/google-adk.d.ts +19 -0
- package/dist/src/mint/google-adk.d.ts.map +1 -0
- package/dist/src/mint/google-adk.js +180 -0
- package/dist/src/mint/google-adk.js.map +1 -0
- package/dist/src/monitoring/alerting.d.ts.map +1 -0
- package/dist/src/monitoring/alerting.js.map +1 -0
- package/dist/src/monitoring/health.d.ts +9 -1
- package/dist/src/monitoring/health.d.ts.map +1 -0
- package/dist/src/monitoring/health.js +63 -0
- package/dist/src/monitoring/health.js.map +1 -0
- package/dist/src/monitoring/index.d.ts +2 -2
- package/dist/src/monitoring/index.d.ts.map +1 -0
- package/dist/src/monitoring/index.js +1 -1
- package/dist/src/monitoring/index.js.map +1 -0
- package/dist/src/monitoring/info.d.ts.map +1 -0
- package/dist/src/monitoring/info.js.map +1 -0
- package/dist/src/monitoring/types.d.ts +26 -0
- package/dist/src/monitoring/types.d.ts.map +1 -0
- package/dist/src/monitoring/types.js.map +1 -0
- package/dist/src/network/index.d.ts.map +1 -0
- package/dist/src/network/index.js.map +1 -0
- package/dist/src/network/network-config.d.ts.map +1 -0
- package/dist/src/network/network-config.js.map +1 -0
- package/dist/src/orchestration/claude.d.ts +125 -0
- package/dist/src/orchestration/claude.d.ts.map +1 -0
- package/dist/src/orchestration/claude.js +639 -0
- package/dist/src/orchestration/claude.js.map +1 -0
- package/dist/src/orchestration/google-adk.d.ts +77 -0
- package/dist/src/orchestration/google-adk.d.ts.map +1 -0
- package/dist/src/orchestration/google-adk.js +659 -0
- package/dist/src/orchestration/google-adk.js.map +1 -0
- package/dist/src/orchestration/mcp-client.d.ts +47 -0
- package/dist/src/orchestration/mcp-client.d.ts.map +1 -0
- package/dist/src/orchestration/mcp-client.js +179 -0
- package/dist/src/orchestration/mcp-client.js.map +1 -0
- package/dist/src/orchestration/polytician-enricher.d.ts +21 -0
- package/dist/src/orchestration/polytician-enricher.d.ts.map +1 -0
- package/dist/src/orchestration/polytician-enricher.js +131 -0
- package/dist/src/orchestration/polytician-enricher.js.map +1 -0
- package/dist/src/orchestration/smallchat-bridge.d.ts +121 -0
- package/dist/src/orchestration/smallchat-bridge.d.ts.map +1 -0
- package/dist/src/orchestration/smallchat-bridge.js +331 -0
- package/dist/src/orchestration/smallchat-bridge.js.map +1 -0
- package/dist/src/orchestration/smallchat-compression.d.ts +100 -0
- package/dist/src/orchestration/smallchat-compression.d.ts.map +1 -0
- package/dist/src/orchestration/smallchat-compression.js +203 -0
- package/dist/src/orchestration/smallchat-compression.js.map +1 -0
- package/dist/src/orchestration/smallchat-policy.d.ts +158 -0
- package/dist/src/orchestration/smallchat-policy.d.ts.map +1 -0
- package/dist/src/orchestration/smallchat-policy.js +314 -0
- package/dist/src/orchestration/smallchat-policy.js.map +1 -0
- package/dist/src/orchestration/smallchat-tools.d.ts +69 -0
- package/dist/src/orchestration/smallchat-tools.d.ts.map +1 -0
- package/dist/src/orchestration/smallchat-tools.js +501 -0
- package/dist/src/orchestration/smallchat-tools.js.map +1 -0
- package/dist/src/packaging/compiler.d.ts.map +1 -0
- package/dist/src/packaging/compiler.js.map +1 -0
- package/dist/src/packaging/config-persistence.d.ts.map +1 -0
- package/dist/src/packaging/config-persistence.js.map +1 -0
- package/dist/src/packaging/config-schemas.d.ts +44 -2
- package/dist/src/packaging/config-schemas.d.ts.map +1 -0
- package/dist/src/packaging/config-schemas.js +19 -0
- package/dist/src/packaging/config-schemas.js.map +1 -0
- package/dist/src/packaging/detector.d.ts.map +1 -0
- package/dist/src/packaging/detector.js +15 -1
- package/dist/src/packaging/detector.js.map +1 -0
- package/dist/src/packaging/index.d.ts +11 -5
- package/dist/src/packaging/index.d.ts.map +1 -0
- package/dist/src/packaging/index.js +10 -4
- package/dist/src/packaging/index.js.map +1 -0
- package/dist/src/packaging/packager.d.ts.map +1 -0
- package/dist/src/packaging/packager.js.map +1 -0
- package/dist/src/packaging/parsers/clawdbot.d.ts +1 -1
- package/dist/src/packaging/parsers/clawdbot.d.ts.map +1 -0
- package/dist/src/packaging/parsers/clawdbot.js +26 -28
- package/dist/src/packaging/parsers/clawdbot.js.map +1 -0
- package/dist/src/packaging/parsers/cline.d.ts.map +1 -0
- package/dist/src/packaging/parsers/cline.js.map +1 -0
- package/dist/src/packaging/parsers/generic.d.ts +1 -1
- package/dist/src/packaging/parsers/generic.d.ts.map +1 -0
- package/dist/src/packaging/parsers/generic.js +13 -20
- package/dist/src/packaging/parsers/generic.js.map +1 -0
- package/dist/src/packaging/parsers/goose.d.ts.map +1 -0
- package/dist/src/packaging/parsers/goose.js.map +1 -0
- package/dist/src/packaging/parsers/index.d.ts +2 -0
- package/dist/src/packaging/parsers/index.d.ts.map +1 -0
- package/dist/src/packaging/parsers/index.js +2 -0
- package/dist/src/packaging/parsers/index.js.map +1 -0
- package/dist/src/packaging/parsers/nemoclaw.d.ts +4 -0
- package/dist/src/packaging/parsers/nemoclaw.d.ts.map +1 -0
- package/dist/src/packaging/parsers/nemoclaw.js +145 -0
- package/dist/src/packaging/parsers/nemoclaw.js.map +1 -0
- package/dist/src/packaging/parsers/polytician.d.ts +4 -0
- package/dist/src/packaging/parsers/polytician.d.ts.map +1 -0
- package/dist/src/packaging/parsers/polytician.js +121 -0
- package/dist/src/packaging/parsers/polytician.js.map +1 -0
- package/dist/src/packaging/serializer.d.ts +7 -1
- package/dist/src/packaging/serializer.d.ts.map +1 -0
- package/dist/src/packaging/serializer.js +14 -3
- package/dist/src/packaging/serializer.js.map +1 -0
- package/dist/src/packaging/serializers/index.d.ts +3 -0
- package/dist/src/packaging/serializers/index.d.ts.map +1 -0
- package/dist/src/packaging/serializers/index.js +2 -0
- package/dist/src/packaging/serializers/index.js.map +1 -0
- package/dist/src/packaging/serializers/thoughtform.d.ts +89 -0
- package/dist/src/packaging/serializers/thoughtform.d.ts.map +1 -0
- package/dist/src/packaging/serializers/thoughtform.js +84 -0
- package/dist/src/packaging/serializers/thoughtform.js.map +1 -0
- package/dist/src/packaging/state-format.d.ts +332 -0
- package/dist/src/packaging/state-format.d.ts.map +1 -0
- package/dist/src/packaging/state-format.js +602 -0
- package/dist/src/packaging/state-format.js.map +1 -0
- package/dist/src/packaging/types.d.ts +2 -2
- package/dist/src/packaging/types.d.ts.map +1 -0
- package/dist/src/packaging/types.js.map +1 -0
- package/dist/src/packaging/wasm-compiler.d.ts +160 -0
- package/dist/src/packaging/wasm-compiler.d.ts.map +1 -0
- package/dist/src/packaging/wasm-compiler.js +662 -0
- package/dist/src/packaging/wasm-compiler.js.map +1 -0
- package/dist/src/packaging/wasmedge-compiler.d.ts.map +1 -0
- package/dist/src/packaging/wasmedge-compiler.js +6 -4
- package/dist/src/packaging/wasmedge-compiler.js.map +1 -0
- package/dist/src/pilot/air-gap.d.ts +51 -0
- package/dist/src/pilot/air-gap.d.ts.map +1 -0
- package/dist/src/pilot/air-gap.js +118 -0
- package/dist/src/pilot/air-gap.js.map +1 -0
- package/dist/src/pilot/index.d.ts +14 -0
- package/dist/src/pilot/index.d.ts.map +1 -0
- package/dist/src/pilot/index.js +16 -0
- package/dist/src/pilot/index.js.map +1 -0
- package/dist/src/pilot/private-replica.d.ts +67 -0
- package/dist/src/pilot/private-replica.d.ts.map +1 -0
- package/dist/src/pilot/private-replica.js +429 -0
- package/dist/src/pilot/private-replica.js.map +1 -0
- package/dist/src/pilot/proxy-config.d.ts +36 -0
- package/dist/src/pilot/proxy-config.d.ts.map +1 -0
- package/dist/src/pilot/proxy-config.js +96 -0
- package/dist/src/pilot/proxy-config.js.map +1 -0
- package/dist/src/pilot/types.d.ts +181 -0
- package/dist/src/pilot/types.d.ts.map +1 -0
- package/dist/src/pilot/types.js +7 -0
- package/dist/src/pilot/types.js.map +1 -0
- package/dist/src/security/icp-audit.d.ts +63 -0
- package/dist/src/security/icp-audit.d.ts.map +1 -0
- package/dist/src/security/icp-audit.js +234 -0
- package/dist/src/security/icp-audit.js.map +1 -0
- package/dist/src/security/index.d.ts +7 -1
- package/dist/src/security/index.d.ts.map +1 -0
- package/dist/src/security/index.js +12 -2
- package/dist/src/security/index.js.map +1 -0
- package/dist/src/security/mfa-approval.d.ts +219 -0
- package/dist/src/security/mfa-approval.d.ts.map +1 -0
- package/dist/src/security/mfa-approval.js +668 -0
- package/dist/src/security/mfa-approval.js.map +1 -0
- package/dist/src/security/multisig.d.ts.map +1 -0
- package/dist/src/security/multisig.js.map +1 -0
- package/dist/src/security/totp.d.ts +67 -0
- package/dist/src/security/totp.d.ts.map +1 -0
- package/dist/src/security/totp.js +148 -0
- package/dist/src/security/totp.js.map +1 -0
- package/dist/src/security/types.d.ts +7 -2
- package/dist/src/security/types.d.ts.map +1 -0
- package/dist/src/security/types.js +14 -14
- package/dist/src/security/types.js.map +1 -0
- package/dist/src/security/vetkeys.d.ts +43 -0
- package/dist/src/security/vetkeys.d.ts.map +1 -0
- package/dist/src/security/vetkeys.js +144 -15
- package/dist/src/security/vetkeys.js.map +1 -0
- package/dist/src/security/webauthn.d.ts +127 -0
- package/dist/src/security/webauthn.d.ts.map +1 -0
- package/dist/src/security/webauthn.js +246 -0
- package/dist/src/security/webauthn.js.map +1 -0
- package/dist/src/testing/index.d.ts.map +1 -0
- package/dist/src/testing/index.js.map +1 -0
- package/dist/src/testing/local-runner.d.ts.map +1 -0
- package/dist/src/testing/local-runner.js.map +1 -0
- package/dist/src/testing/types.d.ts.map +1 -0
- package/dist/src/testing/types.js.map +1 -0
- package/dist/src/trading/api-key-manager.d.ts +96 -0
- package/dist/src/trading/api-key-manager.d.ts.map +1 -0
- package/dist/src/trading/api-key-manager.js +201 -0
- package/dist/src/trading/api-key-manager.js.map +1 -0
- package/dist/src/trading/consensus.d.ts +171 -0
- package/dist/src/trading/consensus.d.ts.map +1 -0
- package/dist/src/trading/consensus.js +291 -0
- package/dist/src/trading/consensus.js.map +1 -0
- package/dist/src/trading/index.d.ts +19 -0
- package/dist/src/trading/index.d.ts.map +1 -0
- package/dist/src/trading/index.js +15 -0
- package/dist/src/trading/index.js.map +1 -0
- package/dist/src/trading/ip-whitelist.d.ts +70 -0
- package/dist/src/trading/ip-whitelist.d.ts.map +1 -0
- package/dist/src/trading/ip-whitelist.js +239 -0
- package/dist/src/trading/ip-whitelist.js.map +1 -0
- package/dist/src/trading/skill-sandbox.d.ts +88 -0
- package/dist/src/trading/skill-sandbox.d.ts.map +1 -0
- package/dist/src/trading/skill-sandbox.js +175 -0
- package/dist/src/trading/skill-sandbox.js.map +1 -0
- package/dist/src/utils/path-validation.d.ts +34 -0
- package/dist/src/utils/path-validation.d.ts.map +1 -0
- package/dist/src/utils/path-validation.js +88 -0
- package/dist/src/utils/path-validation.js.map +1 -0
- package/dist/src/vault/bitwarden.d.ts +51 -0
- package/dist/src/vault/bitwarden.d.ts.map +1 -0
- package/dist/src/vault/bitwarden.js +172 -0
- package/dist/src/vault/bitwarden.js.map +1 -0
- package/dist/src/vault/client.d.ts +44 -0
- package/dist/src/vault/client.d.ts.map +1 -0
- package/dist/src/vault/client.js +523 -0
- package/dist/src/vault/client.js.map +1 -0
- package/dist/src/vault/config.d.ts +68 -0
- package/dist/src/vault/config.d.ts.map +1 -0
- package/dist/src/vault/config.js +265 -0
- package/dist/src/vault/config.js.map +1 -0
- package/dist/src/vault/encrypted-memory-store.d.ts +80 -0
- package/dist/src/vault/encrypted-memory-store.d.ts.map +1 -0
- package/dist/src/vault/encrypted-memory-store.js +175 -0
- package/dist/src/vault/encrypted-memory-store.js.map +1 -0
- package/dist/src/vault/hashicorp-provider.d.ts +22 -0
- package/dist/src/vault/hashicorp-provider.d.ts.map +1 -0
- package/dist/src/vault/hashicorp-provider.js +63 -0
- package/dist/src/vault/hashicorp-provider.js.map +1 -0
- package/dist/src/vault/index.d.ts +40 -0
- package/dist/src/vault/index.d.ts.map +1 -0
- package/dist/src/vault/index.js +38 -0
- package/dist/src/vault/index.js.map +1 -0
- package/dist/src/vault/memory-provider.d.ts +26 -0
- package/dist/src/vault/memory-provider.d.ts.map +1 -0
- package/dist/src/vault/memory-provider.js +42 -0
- package/dist/src/vault/memory-provider.js.map +1 -0
- package/dist/src/vault/provider.d.ts +68 -0
- package/dist/src/vault/provider.d.ts.map +1 -0
- package/dist/src/vault/provider.js +50 -0
- package/dist/src/vault/provider.js.map +1 -0
- package/dist/src/vault/safehouse-types.d.ts +204 -0
- package/dist/src/vault/safehouse-types.d.ts.map +1 -0
- package/dist/src/vault/safehouse-types.js +9 -0
- package/dist/src/vault/safehouse-types.js.map +1 -0
- package/dist/src/vault/secret-audit.d.ts +91 -0
- package/dist/src/vault/secret-audit.d.ts.map +1 -0
- package/dist/src/vault/secret-audit.js +224 -0
- package/dist/src/vault/secret-audit.js.map +1 -0
- package/dist/src/vault/secret-injector.d.ts +62 -0
- package/dist/src/vault/secret-injector.d.ts.map +1 -0
- package/dist/src/vault/secret-injector.js +237 -0
- package/dist/src/vault/secret-injector.js.map +1 -0
- package/dist/src/vault/secret-leak-detector.d.ts +94 -0
- package/dist/src/vault/secret-leak-detector.d.ts.map +1 -0
- package/dist/src/vault/secret-leak-detector.js +218 -0
- package/dist/src/vault/secret-leak-detector.js.map +1 -0
- package/dist/src/vault/secret-management-layer.d.ts +139 -0
- package/dist/src/vault/secret-management-layer.d.ts.map +1 -0
- package/dist/src/vault/secret-management-layer.js +366 -0
- package/dist/src/vault/secret-management-layer.js.map +1 -0
- package/dist/src/vault/secret-rotation.d.ts +54 -0
- package/dist/src/vault/secret-rotation.d.ts.map +1 -0
- package/dist/src/vault/secret-rotation.js +156 -0
- package/dist/src/vault/secret-rotation.js.map +1 -0
- package/dist/src/vault/secret-sandbox.d.ts +94 -0
- package/dist/src/vault/secret-sandbox.d.ts.map +1 -0
- package/dist/src/vault/secret-sandbox.js +232 -0
- package/dist/src/vault/secret-sandbox.js.map +1 -0
- package/dist/src/vault/types.d.ts +148 -0
- package/dist/src/vault/types.d.ts.map +1 -0
- package/dist/src/vault/types.js +7 -0
- package/dist/src/vault/types.js.map +1 -0
- package/dist/src/wallet/cbor-serializer.d.ts.map +1 -0
- package/dist/src/wallet/cbor-serializer.js +7 -2
- package/dist/src/wallet/cbor-serializer.js.map +1 -0
- package/dist/src/wallet/chain-dispatcher.d.ts +1 -1
- package/dist/src/wallet/chain-dispatcher.d.ts.map +1 -0
- package/dist/src/wallet/chain-dispatcher.js +8 -19
- package/dist/src/wallet/chain-dispatcher.js.map +1 -0
- package/dist/src/wallet/cross-chain-aggregator.d.ts.map +1 -0
- package/dist/src/wallet/cross-chain-aggregator.js.map +1 -0
- package/dist/src/wallet/hsm/index.d.ts +39 -0
- package/dist/src/wallet/hsm/index.d.ts.map +1 -0
- package/dist/src/wallet/hsm/index.js +60 -0
- package/dist/src/wallet/hsm/index.js.map +1 -0
- package/dist/src/wallet/hsm/ledger-provider.d.ts +75 -0
- package/dist/src/wallet/hsm/ledger-provider.d.ts.map +1 -0
- package/dist/src/wallet/hsm/ledger-provider.js +272 -0
- package/dist/src/wallet/hsm/ledger-provider.js.map +1 -0
- package/dist/src/wallet/hsm/sgx-provider.d.ts +83 -0
- package/dist/src/wallet/hsm/sgx-provider.d.ts.map +1 -0
- package/dist/src/wallet/hsm/sgx-provider.js +281 -0
- package/dist/src/wallet/hsm/sgx-provider.js.map +1 -0
- package/dist/src/wallet/hsm/types.d.ts +134 -0
- package/dist/src/wallet/hsm/types.d.ts.map +1 -0
- package/dist/src/wallet/hsm/types.js +46 -0
- package/dist/src/wallet/hsm/types.js.map +1 -0
- package/dist/src/wallet/index.d.ts +8 -2
- package/dist/src/wallet/index.d.ts.map +1 -0
- package/dist/src/wallet/index.js +9 -2
- package/dist/src/wallet/index.js.map +1 -0
- package/dist/src/wallet/key-derivation.d.ts +29 -1
- package/dist/src/wallet/key-derivation.d.ts.map +1 -0
- package/dist/src/wallet/key-derivation.js +106 -23
- package/dist/src/wallet/key-derivation.js.map +1 -0
- package/dist/src/wallet/providers/arweave-provider.d.ts +34 -0
- package/dist/src/wallet/providers/arweave-provider.d.ts.map +1 -0
- package/dist/src/wallet/providers/arweave-provider.js +126 -0
- package/dist/src/wallet/providers/arweave-provider.js.map +1 -0
- package/dist/src/wallet/providers/base-provider.d.ts.map +1 -0
- package/dist/src/wallet/providers/base-provider.js.map +1 -0
- package/dist/src/wallet/providers/cketh-provider.d.ts.map +1 -0
- package/dist/src/wallet/providers/cketh-provider.js.map +1 -0
- package/dist/src/wallet/providers/icp-provider.d.ts +34 -0
- package/dist/src/wallet/providers/icp-provider.d.ts.map +1 -0
- package/dist/src/wallet/providers/icp-provider.js +114 -0
- package/dist/src/wallet/providers/icp-provider.js.map +1 -0
- package/dist/src/wallet/providers/polkadot-provider.d.ts.map +1 -0
- package/dist/src/wallet/providers/polkadot-provider.js +5 -6
- package/dist/src/wallet/providers/polkadot-provider.js.map +1 -0
- package/dist/src/wallet/providers/provider-factory.d.ts +23 -0
- package/dist/src/wallet/providers/provider-factory.d.ts.map +1 -0
- package/dist/src/wallet/providers/provider-factory.js +74 -0
- package/dist/src/wallet/providers/provider-factory.js.map +1 -0
- package/dist/src/wallet/providers/solana-provider.d.ts.map +1 -0
- package/dist/src/wallet/providers/solana-provider.js +6 -7
- package/dist/src/wallet/providers/solana-provider.js.map +1 -0
- package/dist/src/wallet/secure-wallet.d.ts +132 -0
- package/dist/src/wallet/secure-wallet.d.ts.map +1 -0
- package/dist/src/wallet/secure-wallet.js +298 -0
- package/dist/src/wallet/secure-wallet.js.map +1 -0
- package/dist/src/wallet/transaction-queue.d.ts.map +1 -0
- package/dist/src/wallet/transaction-queue.js.map +1 -0
- package/dist/src/wallet/types.d.ts +57 -2
- package/dist/src/wallet/types.d.ts.map +1 -0
- package/dist/src/wallet/types.js.map +1 -0
- package/dist/src/wallet/vetkeys-adapter.d.ts.map +1 -0
- package/dist/src/wallet/vetkeys-adapter.js +16 -25
- package/dist/src/wallet/vetkeys-adapter.js.map +1 -0
- package/dist/src/wallet/wallet-crypto.d.ts +101 -0
- package/dist/src/wallet/wallet-crypto.d.ts.map +1 -0
- package/dist/src/wallet/wallet-crypto.js +185 -0
- package/dist/src/wallet/wallet-crypto.js.map +1 -0
- package/dist/src/wallet/wallet-manager.d.ts +24 -4
- package/dist/src/wallet/wallet-manager.d.ts.map +1 -0
- package/dist/src/wallet/wallet-manager.js +70 -3
- package/dist/src/wallet/wallet-manager.js.map +1 -0
- package/dist/src/wallet/wallet-storage.d.ts +15 -7
- package/dist/src/wallet/wallet-storage.d.ts.map +1 -0
- package/dist/src/wallet/wallet-storage.js +34 -18
- package/dist/src/wallet/wallet-storage.js.map +1 -0
- package/dist/src/wiki/index.d.ts +30 -0
- package/dist/src/wiki/index.d.ts.map +1 -0
- package/dist/src/wiki/index.js +30 -0
- package/dist/src/wiki/index.js.map +1 -0
- package/dist/src/wiki/ingest.d.ts +51 -0
- package/dist/src/wiki/ingest.d.ts.map +1 -0
- package/dist/src/wiki/ingest.js +197 -0
- package/dist/src/wiki/ingest.js.map +1 -0
- package/dist/src/wiki/lint.d.ts +43 -0
- package/dist/src/wiki/lint.d.ts.map +1 -0
- package/dist/src/wiki/lint.js +187 -0
- package/dist/src/wiki/lint.js.map +1 -0
- package/dist/src/wiki/mcp-tools.d.ts +35 -0
- package/dist/src/wiki/mcp-tools.d.ts.map +1 -0
- package/dist/src/wiki/mcp-tools.js +353 -0
- package/dist/src/wiki/mcp-tools.js.map +1 -0
- package/dist/src/wiki/query.d.ts +38 -0
- package/dist/src/wiki/query.d.ts.map +1 -0
- package/dist/src/wiki/query.js +117 -0
- package/dist/src/wiki/query.js.map +1 -0
- package/dist/src/wiki/wiki-store.d.ts +53 -0
- package/dist/src/wiki/wiki-store.d.ts.map +1 -0
- package/dist/src/wiki/wiki-store.js +132 -0
- package/dist/src/wiki/wiki-store.js.map +1 -0
- package/package.json +35 -11
- package/.claude/settings.local.json +0 -9
- package/.dfx/local/network-id +0 -4
- package/.next/trace +0 -2
- package/.vercel/README.txt +0 -11
- package/.vercel/project.json +0 -1
- package/AGENTS.md +0 -43
- package/PLAN_VAULT_INTEGRATION.md +0 -318
- package/dist/vitest.config.d.ts +0 -3
- package/dist/vitest.config.js +0 -14
- package/fixup_1_0_OSS_release.md +0 -136
- package/fixup_REALEASE_PRD.md +0 -136
- package/macos-wallet-app/AgentVaultWallet/App/AgentVaultWalletApp.swift +0 -54
- package/macos-wallet-app/AgentVaultWallet/Models/AppState.swift +0 -102
- package/macos-wallet-app/AgentVaultWallet/Models/Chain.swift +0 -121
- package/macos-wallet-app/AgentVaultWallet/Models/Wallet.swift +0 -98
- package/macos-wallet-app/AgentVaultWallet/Resources/AgentVaultWallet.entitlements +0 -27
- package/macos-wallet-app/AgentVaultWallet/Resources/Info.plist +0 -69
- package/macos-wallet-app/AgentVaultWallet/Services/BackupService.swift +0 -270
- package/macos-wallet-app/AgentVaultWallet/Services/CLIBridge.swift +0 -367
- package/macos-wallet-app/AgentVaultWallet/Services/CryptoService.swift +0 -157
- package/macos-wallet-app/AgentVaultWallet/Services/FileService.swift +0 -120
- package/macos-wallet-app/AgentVaultWallet/Services/KeychainService.swift +0 -219
- package/macos-wallet-app/AgentVaultWallet/Utilities/Constants.swift +0 -44
- package/macos-wallet-app/AgentVaultWallet/Utilities/Extensions.swift +0 -115
- package/macos-wallet-app/AgentVaultWallet/ViewModels/BackupViewModel.swift +0 -237
- package/macos-wallet-app/AgentVaultWallet/ViewModels/CreateWalletViewModel.swift +0 -137
- package/macos-wallet-app/AgentVaultWallet/ViewModels/ImportWalletViewModel.swift +0 -179
- package/macos-wallet-app/AgentVaultWallet/ViewModels/WalletStore.swift +0 -286
- package/macos-wallet-app/AgentVaultWallet/Views/Backup/BackupView.swift +0 -235
- package/macos-wallet-app/AgentVaultWallet/Views/Backup/RestoreView.swift +0 -316
- package/macos-wallet-app/AgentVaultWallet/Views/Create/CreateWalletFlow.swift +0 -438
- package/macos-wallet-app/AgentVaultWallet/Views/Import/ImportWalletFlow.swift +0 -399
- package/macos-wallet-app/AgentVaultWallet/Views/MainView.swift +0 -134
- package/macos-wallet-app/AgentVaultWallet/Views/Settings/SettingsView.swift +0 -276
- package/macos-wallet-app/AgentVaultWallet/Views/Sidebar/SidebarView.swift +0 -133
- package/macos-wallet-app/AgentVaultWallet/Views/Wallet/DashboardView.swift +0 -233
- package/macos-wallet-app/AgentVaultWallet/Views/Wallet/WalletDetailView.swift +0 -281
- package/macos-wallet-app/AgentVaultWallet/Views/Wallet/WalletListView.swift +0 -280
- package/macos-wallet-app/AgentVaultWallet/Views/Welcome/WelcomeView.swift +0 -176
- package/macos-wallet-app/Makefile +0 -47
- package/macos-wallet-app/project.yml +0 -40
- package/macos-wallet-app/setup.sh +0 -73
- package/pnpm-workspace.yaml +0 -5
- package/vercel.json +0 -8
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import SwiftUI
|
|
2
|
-
|
|
3
|
-
/// Manages the multi-step wallet creation flow
|
|
4
|
-
@MainActor
|
|
5
|
-
final class CreateWalletViewModel: ObservableObject {
|
|
6
|
-
|
|
7
|
-
enum Step: Int, CaseIterable {
|
|
8
|
-
case selectChain = 0
|
|
9
|
-
case generating = 1
|
|
10
|
-
case showMnemonic = 2
|
|
11
|
-
case confirmMnemonic = 3
|
|
12
|
-
case nameWallet = 4
|
|
13
|
-
case complete = 5
|
|
14
|
-
|
|
15
|
-
var title: String {
|
|
16
|
-
switch self {
|
|
17
|
-
case .selectChain: return "Select Network"
|
|
18
|
-
case .generating: return "Generating Wallet"
|
|
19
|
-
case .showMnemonic: return "Recovery Phrase"
|
|
20
|
-
case .confirmMnemonic: return "Confirm Backup"
|
|
21
|
-
case .nameWallet: return "Name Your Wallet"
|
|
22
|
-
case .complete: return "Wallet Created"
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
@Published var currentStep: Step = .selectChain
|
|
28
|
-
@Published var selectedChain: Chain = .ethereum
|
|
29
|
-
@Published var walletName: String = ""
|
|
30
|
-
@Published var mnemonic: String = ""
|
|
31
|
-
@Published var mnemonicWords: [String] = []
|
|
32
|
-
@Published var confirmationInput: String = ""
|
|
33
|
-
@Published var confirmWordIndices: [Int] = [] // Which words to verify
|
|
34
|
-
@Published var createdWallet: Wallet?
|
|
35
|
-
@Published var isProcessing: Bool = false
|
|
36
|
-
@Published var errorMessage: String?
|
|
37
|
-
|
|
38
|
-
/// Words the user needs to confirm (randomly selected from the mnemonic)
|
|
39
|
-
var wordsToConfirm: [(index: Int, word: String)] {
|
|
40
|
-
confirmWordIndices.compactMap { idx in
|
|
41
|
-
guard idx < mnemonicWords.count else { return nil }
|
|
42
|
-
return (index: idx, word: mnemonicWords[idx])
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/// Whether the user can proceed from the current step
|
|
47
|
-
var canProceed: Bool {
|
|
48
|
-
switch currentStep {
|
|
49
|
-
case .selectChain: return true
|
|
50
|
-
case .generating: return false
|
|
51
|
-
case .showMnemonic: return true
|
|
52
|
-
case .confirmMnemonic: return isConfirmationValid
|
|
53
|
-
case .nameWallet: return !walletName.trimmingCharacters(in: .whitespaces).isEmpty
|
|
54
|
-
case .complete: return true
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/// Validate mnemonic confirmation
|
|
59
|
-
var isConfirmationValid: Bool {
|
|
60
|
-
let inputWords = confirmationInput
|
|
61
|
-
.trimmingCharacters(in: .whitespacesAndNewlines)
|
|
62
|
-
.lowercased()
|
|
63
|
-
.components(separatedBy: .whitespaces)
|
|
64
|
-
.filter { !$0.isEmpty }
|
|
65
|
-
|
|
66
|
-
guard inputWords.count == confirmWordIndices.count else { return false }
|
|
67
|
-
|
|
68
|
-
for (i, idx) in confirmWordIndices.enumerated() {
|
|
69
|
-
guard i < inputWords.count, idx < mnemonicWords.count else { return false }
|
|
70
|
-
if inputWords[i] != mnemonicWords[idx].lowercased() { return false }
|
|
71
|
-
}
|
|
72
|
-
return true
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
func goToNext() {
|
|
76
|
-
guard let nextStep = Step(rawValue: currentStep.rawValue + 1) else { return }
|
|
77
|
-
withAnimation(.easeInOut(duration: 0.3)) {
|
|
78
|
-
currentStep = nextStep
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
func goBack() {
|
|
83
|
-
guard let prevStep = Step(rawValue: currentStep.rawValue - 1) else { return }
|
|
84
|
-
withAnimation(.easeInOut(duration: 0.3)) {
|
|
85
|
-
currentStep = prevStep
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/// Generate a new wallet using the CLI bridge
|
|
90
|
-
func generateWallet(store: WalletStore) async {
|
|
91
|
-
isProcessing = true
|
|
92
|
-
errorMessage = nil
|
|
93
|
-
currentStep = .generating
|
|
94
|
-
|
|
95
|
-
do {
|
|
96
|
-
let name = walletName.isEmpty ? "\(selectedChain.displayName) Wallet" : walletName
|
|
97
|
-
let result = try await store.createWallet(chain: selectedChain, name: name)
|
|
98
|
-
|
|
99
|
-
createdWallet = result.wallet
|
|
100
|
-
if let m = result.mnemonic {
|
|
101
|
-
mnemonic = m
|
|
102
|
-
mnemonicWords = m.components(separatedBy: " ")
|
|
103
|
-
selectRandomConfirmationWords()
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
isProcessing = false
|
|
107
|
-
currentStep = .showMnemonic
|
|
108
|
-
} catch {
|
|
109
|
-
isProcessing = false
|
|
110
|
-
errorMessage = error.localizedDescription
|
|
111
|
-
currentStep = .selectChain
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/// Select 3 random word indices for confirmation
|
|
116
|
-
private func selectRandomConfirmationWords() {
|
|
117
|
-
guard mnemonicWords.count >= 3 else { return }
|
|
118
|
-
var indices = Set<Int>()
|
|
119
|
-
while indices.count < 3 {
|
|
120
|
-
indices.insert(Int.random(in: 0..<mnemonicWords.count))
|
|
121
|
-
}
|
|
122
|
-
confirmWordIndices = indices.sorted()
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
func reset() {
|
|
126
|
-
currentStep = .selectChain
|
|
127
|
-
selectedChain = .ethereum
|
|
128
|
-
walletName = ""
|
|
129
|
-
mnemonic = ""
|
|
130
|
-
mnemonicWords = []
|
|
131
|
-
confirmationInput = ""
|
|
132
|
-
confirmWordIndices = []
|
|
133
|
-
createdWallet = nil
|
|
134
|
-
isProcessing = false
|
|
135
|
-
errorMessage = nil
|
|
136
|
-
}
|
|
137
|
-
}
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import SwiftUI
|
|
2
|
-
import UniformTypeIdentifiers
|
|
3
|
-
|
|
4
|
-
/// Manages the multi-step wallet import flow
|
|
5
|
-
@MainActor
|
|
6
|
-
final class ImportWalletViewModel: ObservableObject {
|
|
7
|
-
|
|
8
|
-
enum Step: Int, CaseIterable {
|
|
9
|
-
case selectChain = 0
|
|
10
|
-
case selectMethod = 1
|
|
11
|
-
case enterInput = 2
|
|
12
|
-
case nameWallet = 3
|
|
13
|
-
case importing = 4
|
|
14
|
-
case complete = 5
|
|
15
|
-
|
|
16
|
-
var title: String {
|
|
17
|
-
switch self {
|
|
18
|
-
case .selectChain: return "Select Network"
|
|
19
|
-
case .selectMethod: return "Import Method"
|
|
20
|
-
case .enterInput: return "Enter Details"
|
|
21
|
-
case .nameWallet: return "Name Your Wallet"
|
|
22
|
-
case .importing: return "Importing"
|
|
23
|
-
case .complete: return "Import Complete"
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
@Published var currentStep: Step = .selectChain
|
|
29
|
-
@Published var selectedChain: Chain = .ethereum
|
|
30
|
-
@Published var selectedMethod: ImportMethod = .mnemonic
|
|
31
|
-
@Published var walletName: String = ""
|
|
32
|
-
@Published var inputText: String = "" // Mnemonic or private key
|
|
33
|
-
@Published var passwordInput: String = "" // For keystore files
|
|
34
|
-
@Published var selectedFileURL: URL? // For file-based imports
|
|
35
|
-
@Published var importedWallet: Wallet?
|
|
36
|
-
@Published var isProcessing: Bool = false
|
|
37
|
-
@Published var errorMessage: String?
|
|
38
|
-
@Published var showFileImporter: Bool = false
|
|
39
|
-
|
|
40
|
-
/// Available import methods for the selected chain
|
|
41
|
-
var availableMethods: [ImportMethod] {
|
|
42
|
-
selectedChain.supportedImportMethods
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/// Whether the current input is valid enough to proceed
|
|
46
|
-
var isInputValid: Bool {
|
|
47
|
-
switch selectedMethod {
|
|
48
|
-
case .mnemonic:
|
|
49
|
-
return CryptoService.shared.isValidMnemonic(inputText)
|
|
50
|
-
case .privateKey:
|
|
51
|
-
let cleaned = inputText.trimmingCharacters(in: .whitespacesAndNewlines)
|
|
52
|
-
if selectedChain == .ethereum {
|
|
53
|
-
return CryptoService.shared.isValidEthPrivateKey(cleaned)
|
|
54
|
-
}
|
|
55
|
-
return cleaned.count >= 32
|
|
56
|
-
case .pemFile, .jwkFile, .keystoreJSON:
|
|
57
|
-
return selectedFileURL != nil
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
var canProceed: Bool {
|
|
62
|
-
switch currentStep {
|
|
63
|
-
case .selectChain: return true
|
|
64
|
-
case .selectMethod: return true
|
|
65
|
-
case .enterInput: return isInputValid
|
|
66
|
-
case .nameWallet: return !walletName.trimmingCharacters(in: .whitespaces).isEmpty
|
|
67
|
-
case .importing: return false
|
|
68
|
-
case .complete: return true
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/// File types accepted for the current import method
|
|
73
|
-
var allowedFileTypes: [UTType] {
|
|
74
|
-
switch selectedMethod {
|
|
75
|
-
case .jwkFile: return [.json]
|
|
76
|
-
case .pemFile: return [UTType(filenameExtension: "pem") ?? .data]
|
|
77
|
-
case .keystoreJSON: return [.json]
|
|
78
|
-
default: return []
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/// Placeholder text for the input field
|
|
83
|
-
var inputPlaceholder: String {
|
|
84
|
-
switch selectedMethod {
|
|
85
|
-
case .mnemonic: return "Enter your 12 or 24-word recovery phrase, separated by spaces..."
|
|
86
|
-
case .privateKey:
|
|
87
|
-
if selectedChain == .ethereum { return "Enter your hex-encoded private key (0x...)" }
|
|
88
|
-
return "Enter your private key..."
|
|
89
|
-
default: return ""
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
func goToNext() {
|
|
94
|
-
guard let nextStep = Step(rawValue: currentStep.rawValue + 1) else { return }
|
|
95
|
-
withAnimation(.easeInOut(duration: 0.3)) {
|
|
96
|
-
currentStep = nextStep
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
func goBack() {
|
|
101
|
-
guard let prevStep = Step(rawValue: currentStep.rawValue - 1) else { return }
|
|
102
|
-
withAnimation(.easeInOut(duration: 0.3)) {
|
|
103
|
-
currentStep = prevStep
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/// Execute the import
|
|
108
|
-
func importWallet(store: WalletStore) async {
|
|
109
|
-
isProcessing = true
|
|
110
|
-
errorMessage = nil
|
|
111
|
-
currentStep = .importing
|
|
112
|
-
|
|
113
|
-
do {
|
|
114
|
-
let name = walletName.isEmpty ? "\(selectedChain.displayName) Import" : walletName
|
|
115
|
-
|
|
116
|
-
switch selectedMethod {
|
|
117
|
-
case .mnemonic:
|
|
118
|
-
importedWallet = try await store.importFromMnemonic(
|
|
119
|
-
chain: selectedChain,
|
|
120
|
-
mnemonic: inputText.trimmingCharacters(in: .whitespacesAndNewlines),
|
|
121
|
-
name: name
|
|
122
|
-
)
|
|
123
|
-
|
|
124
|
-
case .privateKey:
|
|
125
|
-
importedWallet = try await store.importFromPrivateKey(
|
|
126
|
-
chain: selectedChain,
|
|
127
|
-
privateKey: inputText.trimmingCharacters(in: .whitespacesAndNewlines),
|
|
128
|
-
name: name
|
|
129
|
-
)
|
|
130
|
-
|
|
131
|
-
case .jwkFile:
|
|
132
|
-
guard let url = selectedFileURL else { throw ImportError.noFileSelected }
|
|
133
|
-
importedWallet = try await store.importFromJWK(fileURL: url, name: name)
|
|
134
|
-
|
|
135
|
-
case .pemFile:
|
|
136
|
-
guard let url = selectedFileURL else { throw ImportError.noFileSelected }
|
|
137
|
-
importedWallet = try await store.importFromPEM(fileURL: url, name: name)
|
|
138
|
-
|
|
139
|
-
case .keystoreJSON:
|
|
140
|
-
guard let url = selectedFileURL else { throw ImportError.noFileSelected }
|
|
141
|
-
importedWallet = try await store.importFromKeystore(
|
|
142
|
-
fileURL: url,
|
|
143
|
-
password: passwordInput,
|
|
144
|
-
name: name
|
|
145
|
-
)
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
isProcessing = false
|
|
149
|
-
currentStep = .complete
|
|
150
|
-
} catch {
|
|
151
|
-
isProcessing = false
|
|
152
|
-
errorMessage = error.localizedDescription
|
|
153
|
-
currentStep = .enterInput
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
func reset() {
|
|
158
|
-
currentStep = .selectChain
|
|
159
|
-
selectedChain = .ethereum
|
|
160
|
-
selectedMethod = .mnemonic
|
|
161
|
-
walletName = ""
|
|
162
|
-
inputText = ""
|
|
163
|
-
passwordInput = ""
|
|
164
|
-
selectedFileURL = nil
|
|
165
|
-
importedWallet = nil
|
|
166
|
-
isProcessing = false
|
|
167
|
-
errorMessage = nil
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
enum ImportError: LocalizedError {
|
|
171
|
-
case noFileSelected
|
|
172
|
-
|
|
173
|
-
var errorDescription: String? {
|
|
174
|
-
switch self {
|
|
175
|
-
case .noFileSelected: return "No file was selected for import"
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
@@ -1,286 +0,0 @@
|
|
|
1
|
-
import SwiftUI
|
|
2
|
-
import Combine
|
|
3
|
-
|
|
4
|
-
/// Central state manager for all wallet operations.
|
|
5
|
-
/// Acts as the single source of truth for wallet data in the app.
|
|
6
|
-
@MainActor
|
|
7
|
-
final class WalletStore: ObservableObject {
|
|
8
|
-
|
|
9
|
-
@Published var wallets: [Wallet] = []
|
|
10
|
-
@Published var isLoading: Bool = false
|
|
11
|
-
@Published var errorMessage: String?
|
|
12
|
-
@Published var selectedWalletId: UUID?
|
|
13
|
-
|
|
14
|
-
private let fileService = FileService.shared
|
|
15
|
-
private let keychain = KeychainService.shared
|
|
16
|
-
private let cliBridge = CLIBridge()
|
|
17
|
-
private let backupService = BackupService.shared
|
|
18
|
-
|
|
19
|
-
// MARK: - Computed Properties
|
|
20
|
-
|
|
21
|
-
var selectedWallet: Wallet? {
|
|
22
|
-
guard let id = selectedWalletId else { return nil }
|
|
23
|
-
return wallets.first { $0.id == id }
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
var walletsByChain: [Chain: [Wallet]] {
|
|
27
|
-
Dictionary(grouping: wallets, by: \.chain)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
var totalWalletCount: Int { wallets.count }
|
|
31
|
-
|
|
32
|
-
var icpWallets: [Wallet] { wallets.filter { $0.chain == .icp } }
|
|
33
|
-
var ethWallets: [Wallet] { wallets.filter { $0.chain == .ethereum } }
|
|
34
|
-
var arweaveWallets: [Wallet] { wallets.filter { $0.chain == .arweave } }
|
|
35
|
-
|
|
36
|
-
// MARK: - Persistence
|
|
37
|
-
|
|
38
|
-
func loadWallets() {
|
|
39
|
-
do {
|
|
40
|
-
wallets = try fileService.loadWallets()
|
|
41
|
-
} catch {
|
|
42
|
-
errorMessage = "Failed to load wallets: \(error.localizedDescription)"
|
|
43
|
-
wallets = []
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
func saveWallets() {
|
|
48
|
-
do {
|
|
49
|
-
try fileService.saveWallets(wallets)
|
|
50
|
-
} catch {
|
|
51
|
-
errorMessage = "Failed to save wallets: \(error.localizedDescription)"
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// MARK: - Create Wallet
|
|
56
|
-
|
|
57
|
-
/// Create a new wallet via the CLI bridge
|
|
58
|
-
func createWallet(chain: Chain, name: String) async throws -> WalletCreationResult {
|
|
59
|
-
isLoading = true
|
|
60
|
-
defer { isLoading = false }
|
|
61
|
-
|
|
62
|
-
let result = try await cliBridge.generateWallet(chain: chain, name: name)
|
|
63
|
-
|
|
64
|
-
let walletId = UUID()
|
|
65
|
-
let wallet = Wallet(
|
|
66
|
-
id: walletId,
|
|
67
|
-
name: name,
|
|
68
|
-
chain: chain,
|
|
69
|
-
address: result.address,
|
|
70
|
-
isImported: false,
|
|
71
|
-
derivationPath: chain.derivationPath,
|
|
72
|
-
hasMnemonicBackup: result.mnemonic != nil
|
|
73
|
-
)
|
|
74
|
-
|
|
75
|
-
// Save secrets to Keychain
|
|
76
|
-
if let mnemonic = result.mnemonic {
|
|
77
|
-
try keychain.saveMnemonic(mnemonic, forWalletId: walletId)
|
|
78
|
-
}
|
|
79
|
-
if let privateKey = result.privateKey {
|
|
80
|
-
try keychain.savePrivateKey(privateKey, forWalletId: walletId)
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
// Add to wallet list and persist
|
|
84
|
-
wallets.append(wallet)
|
|
85
|
-
saveWallets()
|
|
86
|
-
|
|
87
|
-
return WalletCreationResult(
|
|
88
|
-
wallet: wallet,
|
|
89
|
-
mnemonic: result.mnemonic,
|
|
90
|
-
privateKeyHex: result.privateKey,
|
|
91
|
-
jwkData: nil
|
|
92
|
-
)
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// MARK: - Import Wallet
|
|
96
|
-
|
|
97
|
-
/// Import a wallet from a mnemonic phrase
|
|
98
|
-
func importFromMnemonic(chain: Chain, mnemonic: String, name: String) async throws -> Wallet {
|
|
99
|
-
isLoading = true
|
|
100
|
-
defer { isLoading = false }
|
|
101
|
-
|
|
102
|
-
let result = try await cliBridge.importFromMnemonic(chain: chain, mnemonic: mnemonic, name: name)
|
|
103
|
-
|
|
104
|
-
let walletId = UUID()
|
|
105
|
-
let wallet = Wallet(
|
|
106
|
-
id: walletId,
|
|
107
|
-
name: name,
|
|
108
|
-
chain: chain,
|
|
109
|
-
address: result.address,
|
|
110
|
-
isImported: true,
|
|
111
|
-
derivationPath: chain.derivationPath,
|
|
112
|
-
hasMnemonicBackup: true
|
|
113
|
-
)
|
|
114
|
-
|
|
115
|
-
try keychain.saveMnemonic(mnemonic, forWalletId: walletId)
|
|
116
|
-
if let privateKey = result.privateKey {
|
|
117
|
-
try keychain.savePrivateKey(privateKey, forWalletId: walletId)
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
wallets.append(wallet)
|
|
121
|
-
saveWallets()
|
|
122
|
-
return wallet
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
/// Import a wallet from a private key
|
|
126
|
-
func importFromPrivateKey(chain: Chain, privateKey: String, name: String) async throws -> Wallet {
|
|
127
|
-
isLoading = true
|
|
128
|
-
defer { isLoading = false }
|
|
129
|
-
|
|
130
|
-
let result = try await cliBridge.importFromPrivateKey(chain: chain, privateKey: privateKey, name: name)
|
|
131
|
-
|
|
132
|
-
let walletId = UUID()
|
|
133
|
-
let wallet = Wallet(
|
|
134
|
-
id: walletId,
|
|
135
|
-
name: name,
|
|
136
|
-
chain: chain,
|
|
137
|
-
address: result.address,
|
|
138
|
-
isImported: true,
|
|
139
|
-
derivationPath: chain.derivationPath,
|
|
140
|
-
hasMnemonicBackup: false
|
|
141
|
-
)
|
|
142
|
-
|
|
143
|
-
try keychain.savePrivateKey(privateKey, forWalletId: walletId)
|
|
144
|
-
|
|
145
|
-
wallets.append(wallet)
|
|
146
|
-
saveWallets()
|
|
147
|
-
return wallet
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/// Import an Arweave wallet from a JWK file
|
|
151
|
-
func importFromJWK(fileURL: URL, name: String) async throws -> Wallet {
|
|
152
|
-
isLoading = true
|
|
153
|
-
defer { isLoading = false }
|
|
154
|
-
|
|
155
|
-
let jwkData = try FileService.shared.readJWKFile(at: fileURL)
|
|
156
|
-
let result = try await cliBridge.importFromJWK(filePath: fileURL.path, name: name)
|
|
157
|
-
|
|
158
|
-
let walletId = UUID()
|
|
159
|
-
let wallet = Wallet(
|
|
160
|
-
id: walletId,
|
|
161
|
-
name: name,
|
|
162
|
-
chain: .arweave,
|
|
163
|
-
address: result.address,
|
|
164
|
-
isImported: true,
|
|
165
|
-
derivationPath: "",
|
|
166
|
-
hasMnemonicBackup: false
|
|
167
|
-
)
|
|
168
|
-
|
|
169
|
-
try keychain.saveJWK(jwkData, forWalletId: walletId)
|
|
170
|
-
|
|
171
|
-
wallets.append(wallet)
|
|
172
|
-
saveWallets()
|
|
173
|
-
return wallet
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
/// Import an ICP identity from a PEM file
|
|
177
|
-
func importFromPEM(fileURL: URL, name: String) async throws -> Wallet {
|
|
178
|
-
isLoading = true
|
|
179
|
-
defer { isLoading = false }
|
|
180
|
-
|
|
181
|
-
let pemContent = try FileService.shared.readPEMFile(at: fileURL)
|
|
182
|
-
let result = try await cliBridge.importFromPEM(filePath: fileURL.path, name: name)
|
|
183
|
-
|
|
184
|
-
let walletId = UUID()
|
|
185
|
-
let wallet = Wallet(
|
|
186
|
-
id: walletId,
|
|
187
|
-
name: name,
|
|
188
|
-
chain: .icp,
|
|
189
|
-
address: result.address,
|
|
190
|
-
isImported: true,
|
|
191
|
-
derivationPath: Chain.icp.derivationPath,
|
|
192
|
-
hasMnemonicBackup: false
|
|
193
|
-
)
|
|
194
|
-
|
|
195
|
-
try keychain.savePrivateKey(pemContent, forWalletId: walletId)
|
|
196
|
-
|
|
197
|
-
wallets.append(wallet)
|
|
198
|
-
saveWallets()
|
|
199
|
-
return wallet
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/// Import an Ethereum wallet from a keystore JSON
|
|
203
|
-
func importFromKeystore(fileURL: URL, password: String, name: String) async throws -> Wallet {
|
|
204
|
-
isLoading = true
|
|
205
|
-
defer { isLoading = false }
|
|
206
|
-
|
|
207
|
-
_ = try FileService.shared.readKeystoreFile(at: fileURL)
|
|
208
|
-
let result = try await cliBridge.importFromKeystore(filePath: fileURL.path, password: password, name: name)
|
|
209
|
-
|
|
210
|
-
let walletId = UUID()
|
|
211
|
-
let wallet = Wallet(
|
|
212
|
-
id: walletId,
|
|
213
|
-
name: name,
|
|
214
|
-
chain: .ethereum,
|
|
215
|
-
address: result.address,
|
|
216
|
-
isImported: true,
|
|
217
|
-
derivationPath: Chain.ethereum.derivationPath,
|
|
218
|
-
hasMnemonicBackup: false
|
|
219
|
-
)
|
|
220
|
-
|
|
221
|
-
if let privateKey = result.privateKey {
|
|
222
|
-
try keychain.savePrivateKey(privateKey, forWalletId: walletId)
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
wallets.append(wallet)
|
|
226
|
-
saveWallets()
|
|
227
|
-
return wallet
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
// MARK: - Wallet Management
|
|
231
|
-
|
|
232
|
-
/// Delete a wallet and all its associated secrets
|
|
233
|
-
func deleteWallet(_ wallet: Wallet) {
|
|
234
|
-
keychain.deleteAllSecrets(forWalletId: wallet.id)
|
|
235
|
-
wallets.removeAll { $0.id == wallet.id }
|
|
236
|
-
if selectedWalletId == wallet.id {
|
|
237
|
-
selectedWalletId = nil
|
|
238
|
-
}
|
|
239
|
-
saveWallets()
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
/// Rename a wallet
|
|
243
|
-
func renameWallet(_ wallet: Wallet, to newName: String) {
|
|
244
|
-
guard let index = wallets.firstIndex(where: { $0.id == wallet.id }) else { return }
|
|
245
|
-
wallets[index].name = newName
|
|
246
|
-
saveWallets()
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
/// Refresh balance for a single wallet
|
|
250
|
-
func refreshBalance(for wallet: Wallet) async {
|
|
251
|
-
guard let index = wallets.firstIndex(where: { $0.id == wallet.id }) else { return }
|
|
252
|
-
|
|
253
|
-
do {
|
|
254
|
-
let balance = try await cliBridge.getBalance(chain: wallet.chain, address: wallet.address)
|
|
255
|
-
wallets[index].cachedBalance = balance
|
|
256
|
-
wallets[index].balanceLastUpdated = Date()
|
|
257
|
-
saveWallets()
|
|
258
|
-
} catch {
|
|
259
|
-
// Silently fail balance refresh — don't disrupt the UI
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
/// Refresh balances for all wallets
|
|
264
|
-
func refreshAllBalances() async {
|
|
265
|
-
isLoading = true
|
|
266
|
-
defer { isLoading = false }
|
|
267
|
-
|
|
268
|
-
await withTaskGroup(of: Void.self) { group in
|
|
269
|
-
for wallet in wallets {
|
|
270
|
-
group.addTask { [weak self] in
|
|
271
|
-
await self?.refreshBalance(for: wallet)
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
/// Check if we have the mnemonic for a given wallet
|
|
278
|
-
func hasMnemonic(for wallet: Wallet) -> Bool {
|
|
279
|
-
keychain.hasMnemonic(forWalletId: wallet.id)
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
/// Retrieve mnemonic for a wallet (requires confirmation)
|
|
283
|
-
func getMnemonic(for wallet: Wallet) -> String? {
|
|
284
|
-
try? keychain.getMnemonic(forWalletId: wallet.id)
|
|
285
|
-
}
|
|
286
|
-
}
|