@mysten-incubation/devstack 0.0.0
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/LICENSE +189 -0
- package/README.md +94 -0
- package/dist/_virtual/_rolldown/runtime.mjs +13 -0
- package/dist/api/define-capabilities.d.mts +25 -0
- package/dist/api/define-capabilities.mjs +19 -0
- package/dist/api/define-capabilities.mjs.map +1 -0
- package/dist/api/define-devstack-with.d.mts +41 -0
- package/dist/api/define-devstack-with.mjs +24 -0
- package/dist/api/define-devstack-with.mjs.map +1 -0
- package/dist/api/define-devstack.d.mts +62 -0
- package/dist/api/define-devstack.mjs +108 -0
- package/dist/api/define-devstack.mjs.map +1 -0
- package/dist/api/define-plugin.d.mts +1 -0
- package/dist/api/inference-network.mjs +122 -0
- package/dist/api/inference-network.mjs.map +1 -0
- package/dist/api/mode-narrowed-factory.d.mts +26 -0
- package/dist/api/mode-narrowed-factory.mjs +8 -0
- package/dist/api/mode-narrowed-factory.mjs.map +1 -0
- package/dist/api/plugin-errors.mjs +10 -0
- package/dist/api/plugin-errors.mjs.map +1 -0
- package/dist/api/run-stack.d.mts +82 -0
- package/dist/api/run-stack.mjs +127 -0
- package/dist/api/run-stack.mjs.map +1 -0
- package/dist/build-integrations/playwright/config.d.mts +92 -0
- package/dist/build-integrations/playwright/config.mjs +71 -0
- package/dist/build-integrations/playwright/config.mjs.map +1 -0
- package/dist/build-integrations/playwright/errors.d.mts +82 -0
- package/dist/build-integrations/playwright/errors.mjs +43 -0
- package/dist/build-integrations/playwright/errors.mjs.map +1 -0
- package/dist/build-integrations/playwright/global-setup.d.mts +64 -0
- package/dist/build-integrations/playwright/global-setup.mjs +44 -0
- package/dist/build-integrations/playwright/global-setup.mjs.map +1 -0
- package/dist/build-integrations/playwright/index.d.mts +6 -0
- package/dist/build-integrations/playwright/index.mjs +6 -0
- package/dist/build-integrations/playwright/stack-context.d.mts +95 -0
- package/dist/build-integrations/playwright/stack-context.mjs +277 -0
- package/dist/build-integrations/playwright/stack-context.mjs.map +1 -0
- package/dist/build-integrations/playwright/wallet-context.d.mts +87 -0
- package/dist/build-integrations/playwright/wallet-context.mjs +148 -0
- package/dist/build-integrations/playwright/wallet-context.mjs.map +1 -0
- package/dist/build-integrations/runtime/cold-start-url.d.mts +67 -0
- package/dist/build-integrations/runtime/cold-start-url.mjs +56 -0
- package/dist/build-integrations/runtime/cold-start-url.mjs.map +1 -0
- package/dist/build-integrations/runtime/dapp-kit-slot.mjs +10 -0
- package/dist/build-integrations/runtime/dapp-kit-slot.mjs.map +1 -0
- package/dist/build-integrations/runtime/discover.d.mts +78 -0
- package/dist/build-integrations/runtime/discover.mjs +124 -0
- package/dist/build-integrations/runtime/discover.mjs.map +1 -0
- package/dist/build-integrations/runtime/endpoint-registry.d.mts +26 -0
- package/dist/build-integrations/runtime/endpoint-registry.mjs +41 -0
- package/dist/build-integrations/runtime/endpoint-registry.mjs.map +1 -0
- package/dist/build-integrations/runtime/errors.d.mts +64 -0
- package/dist/build-integrations/runtime/errors.mjs +51 -0
- package/dist/build-integrations/runtime/errors.mjs.map +1 -0
- package/dist/build-integrations/runtime/index.d.mts +7 -0
- package/dist/build-integrations/runtime/index.mjs +6 -0
- package/dist/build-integrations/runtime/read-stack-context.d.mts +38 -0
- package/dist/build-integrations/runtime/read-stack-context.mjs +130 -0
- package/dist/build-integrations/runtime/read-stack-context.mjs.map +1 -0
- package/dist/build-integrations/runtime/stack-context.d.mts +53 -0
- package/dist/build-integrations/vitest/config.d.mts +62 -0
- package/dist/build-integrations/vitest/config.mjs +80 -0
- package/dist/build-integrations/vitest/config.mjs.map +1 -0
- package/dist/build-integrations/vitest/env.d.mts +48 -0
- package/dist/build-integrations/vitest/env.mjs +50 -0
- package/dist/build-integrations/vitest/env.mjs.map +1 -0
- package/dist/build-integrations/vitest/errors.d.mts +44 -0
- package/dist/build-integrations/vitest/errors.mjs +18 -0
- package/dist/build-integrations/vitest/errors.mjs.map +1 -0
- package/dist/build-integrations/vitest/index.d.mts +6 -0
- package/dist/build-integrations/vitest/index.mjs +6 -0
- package/dist/build-integrations/vitest/setup.d.mts +53 -0
- package/dist/build-integrations/vitest/setup.mjs +56 -0
- package/dist/build-integrations/vitest/setup.mjs.map +1 -0
- package/dist/build-integrations/vitest/stack-context.d.mts +58 -0
- package/dist/build-integrations/vitest/stack-context.mjs +67 -0
- package/dist/build-integrations/vitest/stack-context.mjs.map +1 -0
- package/dist/cli/main.d.mts +5 -0
- package/dist/cli/main.mjs +586 -0
- package/dist/cli/main.mjs.map +1 -0
- package/dist/cli/prune-direct.mjs +216 -0
- package/dist/cli/prune-direct.mjs.map +1 -0
- package/dist/cli/snapshot-reader.mjs +73 -0
- package/dist/cli/snapshot-reader.mjs.map +1 -0
- package/dist/cli/up-lifecycle.mjs +28 -0
- package/dist/cli/up-lifecycle.mjs.map +1 -0
- package/dist/contracts/capability-decl.d.mts +42 -0
- package/dist/contracts/chain-probe.d.mts +26 -0
- package/dist/contracts/chain-probe.mjs +8 -0
- package/dist/contracts/chain-probe.mjs.map +1 -0
- package/dist/contracts/codegenable.d.mts +43 -0
- package/dist/contracts/container-runtime.d.mts +245 -0
- package/dist/contracts/liveness-classifier.d.mts +19 -0
- package/dist/contracts/network-resolver.d.mts +15 -0
- package/dist/contracts/network-resolver.mjs +7 -0
- package/dist/contracts/network-resolver.mjs.map +1 -0
- package/dist/contracts/projection.d.mts +15 -0
- package/dist/contracts/routable.d.mts +53 -0
- package/dist/contracts/snapshotable.d.mts +39 -0
- package/dist/contracts/strategy-contributor.d.mts +26 -0
- package/dist/index.d.mts +89 -0
- package/dist/index.mjs +37 -0
- package/dist/orchestrators/codegen/bindings.d.mts +2 -0
- package/dist/orchestrators/codegen/bindings.mjs +340 -0
- package/dist/orchestrators/codegen/bindings.mjs.map +1 -0
- package/dist/orchestrators/codegen/emit.mjs +56 -0
- package/dist/orchestrators/codegen/emit.mjs.map +1 -0
- package/dist/orchestrators/codegen/errors.d.mts +1 -0
- package/dist/orchestrators/codegen/errors.mjs +66 -0
- package/dist/orchestrators/codegen/errors.mjs.map +1 -0
- package/dist/orchestrators/codegen/extras.mjs +16 -0
- package/dist/orchestrators/codegen/extras.mjs.map +1 -0
- package/dist/orchestrators/codegen/format.mjs +109 -0
- package/dist/orchestrators/codegen/format.mjs.map +1 -0
- package/dist/orchestrators/codegen/gitignore.mjs +67 -0
- package/dist/orchestrators/codegen/gitignore.mjs.map +1 -0
- package/dist/orchestrators/codegen/paths.d.mts +1 -0
- package/dist/orchestrators/codegen/paths.mjs +33 -0
- package/dist/orchestrators/codegen/paths.mjs.map +1 -0
- package/dist/orchestrators/codegen/permissions.mjs +6 -0
- package/dist/orchestrators/codegen/permissions.mjs.map +1 -0
- package/dist/orchestrators/codegen/service.d.mts +1 -0
- package/dist/orchestrators/codegen/service.mjs +276 -0
- package/dist/orchestrators/codegen/service.mjs.map +1 -0
- package/dist/orchestrators/router/cleanup.mjs +58 -0
- package/dist/orchestrators/router/cleanup.mjs.map +1 -0
- package/dist/orchestrators/router/cors.mjs +31 -0
- package/dist/orchestrators/router/cors.mjs.map +1 -0
- package/dist/orchestrators/router/entrypoints.d.mts +1 -0
- package/dist/orchestrators/router/entrypoints.mjs +80 -0
- package/dist/orchestrators/router/entrypoints.mjs.map +1 -0
- package/dist/orchestrators/router/errors.d.mts +1 -0
- package/dist/orchestrators/router/errors.mjs +103 -0
- package/dist/orchestrators/router/errors.mjs.map +1 -0
- package/dist/orchestrators/router/file-provider.d.mts +1 -0
- package/dist/orchestrators/router/file-provider.mjs +320 -0
- package/dist/orchestrators/router/file-provider.mjs.map +1 -0
- package/dist/orchestrators/router/hostname.d.mts +1 -0
- package/dist/orchestrators/router/hostname.mjs +107 -0
- package/dist/orchestrators/router/hostname.mjs.map +1 -0
- package/dist/orchestrators/router/index.d.mts +1 -0
- package/dist/orchestrators/router/profile.d.mts +1 -0
- package/dist/orchestrators/router/profile.mjs +109 -0
- package/dist/orchestrators/router/profile.mjs.map +1 -0
- package/dist/orchestrators/router/service.d.mts +3 -0
- package/dist/orchestrators/router/service.mjs +421 -0
- package/dist/orchestrators/router/service.mjs.map +1 -0
- package/dist/orchestrators/router/traefik-container.d.mts +1 -0
- package/dist/orchestrators/router/traefik-container.mjs +229 -0
- package/dist/orchestrators/router/traefik-container.mjs.map +1 -0
- package/dist/orchestrators/runtime-composition.d.mts +10 -0
- package/dist/orchestrators/runtime-composition.mjs +168 -0
- package/dist/orchestrators/runtime-composition.mjs.map +1 -0
- package/dist/orchestrators/snapshot/capture.d.mts +1 -0
- package/dist/orchestrators/snapshot/capture.mjs +350 -0
- package/dist/orchestrators/snapshot/capture.mjs.map +1 -0
- package/dist/orchestrators/snapshot/descriptor.d.mts +1 -0
- package/dist/orchestrators/snapshot/descriptor.mjs +109 -0
- package/dist/orchestrators/snapshot/descriptor.mjs.map +1 -0
- package/dist/orchestrators/snapshot/identity-guard.d.mts +1 -0
- package/dist/orchestrators/snapshot/identity-guard.mjs +132 -0
- package/dist/orchestrators/snapshot/identity-guard.mjs.map +1 -0
- package/dist/orchestrators/snapshot/image-bundle-tags.mjs +207 -0
- package/dist/orchestrators/snapshot/image-bundle-tags.mjs.map +1 -0
- package/dist/orchestrators/snapshot/index.d.mts +1 -0
- package/dist/orchestrators/snapshot/integrity.d.mts +1 -0
- package/dist/orchestrators/snapshot/integrity.mjs +74 -0
- package/dist/orchestrators/snapshot/integrity.mjs.map +1 -0
- package/dist/orchestrators/snapshot/prune.d.mts +1 -0
- package/dist/orchestrators/snapshot/prune.mjs +110 -0
- package/dist/orchestrators/snapshot/prune.mjs.map +1 -0
- package/dist/orchestrators/snapshot/restore.d.mts +1 -0
- package/dist/orchestrators/snapshot/restore.mjs +404 -0
- package/dist/orchestrators/snapshot/restore.mjs.map +1 -0
- package/dist/orchestrators/snapshot/service.d.mts +1 -0
- package/dist/orchestrators/snapshot/service.mjs +296 -0
- package/dist/orchestrators/snapshot/service.mjs.map +1 -0
- package/dist/orchestrators/snapshot/state-document.mjs +18 -0
- package/dist/orchestrators/snapshot/state-document.mjs.map +1 -0
- package/dist/orchestrators/snapshot/wipe.d.mts +1 -0
- package/dist/orchestrators/snapshot/wipe.mjs +59 -0
- package/dist/orchestrators/snapshot/wipe.mjs.map +1 -0
- package/dist/plugins/account/codegen.d.mts +12 -0
- package/dist/plugins/account/codegen.mjs +22 -0
- package/dist/plugins/account/codegen.mjs.map +1 -0
- package/dist/plugins/account/errors.d.mts +44 -0
- package/dist/plugins/account/errors.mjs +16 -0
- package/dist/plugins/account/errors.mjs.map +1 -0
- package/dist/plugins/account/funding.d.mts +94 -0
- package/dist/plugins/account/funding.mjs +199 -0
- package/dist/plugins/account/funding.mjs.map +1 -0
- package/dist/plugins/account/index.d.mts +54 -0
- package/dist/plugins/account/index.mjs +151 -0
- package/dist/plugins/account/index.mjs.map +1 -0
- package/dist/plugins/account/keypair.d.mts +32 -0
- package/dist/plugins/account/keypair.mjs +99 -0
- package/dist/plugins/account/keypair.mjs.map +1 -0
- package/dist/plugins/account/lease.mjs +21 -0
- package/dist/plugins/account/lease.mjs.map +1 -0
- package/dist/plugins/account/registry.d.mts +33 -0
- package/dist/plugins/account/registry.mjs +36 -0
- package/dist/plugins/account/registry.mjs.map +1 -0
- package/dist/plugins/account/service.d.mts +104 -0
- package/dist/plugins/account/service.mjs +405 -0
- package/dist/plugins/account/service.mjs.map +1 -0
- package/dist/plugins/account/snapshot.mjs +33 -0
- package/dist/plugins/account/snapshot.mjs.map +1 -0
- package/dist/plugins/account/variants/env.mjs +24 -0
- package/dist/plugins/account/variants/env.mjs.map +1 -0
- package/dist/plugins/account/variants/ephemeral.mjs +72 -0
- package/dist/plugins/account/variants/ephemeral.mjs.map +1 -0
- package/dist/plugins/account/variants/impersonate.d.mts +16 -0
- package/dist/plugins/account/variants/impersonate.mjs +48 -0
- package/dist/plugins/account/variants/impersonate.mjs.map +1 -0
- package/dist/plugins/account/variants/inline.mjs +13 -0
- package/dist/plugins/account/variants/inline.mjs.map +1 -0
- package/dist/plugins/account/variants/keystore.mjs +93 -0
- package/dist/plugins/account/variants/keystore.mjs.map +1 -0
- package/dist/plugins/account/variants/signer.mjs +31 -0
- package/dist/plugins/account/variants/signer.mjs.map +1 -0
- package/dist/plugins/action/build-context.d.mts +41 -0
- package/dist/plugins/action/discriminator.d.mts +20 -0
- package/dist/plugins/action/discriminator.mjs +13 -0
- package/dist/plugins/action/discriminator.mjs.map +1 -0
- package/dist/plugins/action/errors.d.mts +31 -0
- package/dist/plugins/action/errors.mjs +13 -0
- package/dist/plugins/action/errors.mjs.map +1 -0
- package/dist/plugins/action/execute.d.mts +2 -0
- package/dist/plugins/action/execute.mjs +145 -0
- package/dist/plugins/action/execute.mjs.map +1 -0
- package/dist/plugins/action/index.d.mts +56 -0
- package/dist/plugins/action/index.mjs +82 -0
- package/dist/plugins/action/index.mjs.map +1 -0
- package/dist/plugins/action/service.d.mts +26 -0
- package/dist/plugins/action/service.mjs +84 -0
- package/dist/plugins/action/service.mjs.map +1 -0
- package/dist/plugins/coin/address-resolution.d.mts +34 -0
- package/dist/plugins/coin/address-resolution.mjs +80 -0
- package/dist/plugins/coin/address-resolution.mjs.map +1 -0
- package/dist/plugins/coin/codegen.d.mts +16 -0
- package/dist/plugins/coin/codegen.mjs +21 -0
- package/dist/plugins/coin/codegen.mjs.map +1 -0
- package/dist/plugins/coin/discovery.d.mts +26 -0
- package/dist/plugins/coin/discovery.mjs +112 -0
- package/dist/plugins/coin/discovery.mjs.map +1 -0
- package/dist/plugins/coin/errors.d.mts +48 -0
- package/dist/plugins/coin/errors.mjs +13 -0
- package/dist/plugins/coin/errors.mjs.map +1 -0
- package/dist/plugins/coin/index.d.mts +95 -0
- package/dist/plugins/coin/index.mjs +172 -0
- package/dist/plugins/coin/index.mjs.map +1 -0
- package/dist/plugins/coin/metadata.d.mts +15 -0
- package/dist/plugins/coin/metadata.mjs +99 -0
- package/dist/plugins/coin/metadata.mjs.map +1 -0
- package/dist/plugins/coin/mint.d.mts +34 -0
- package/dist/plugins/coin/mint.mjs +164 -0
- package/dist/plugins/coin/mint.mjs.map +1 -0
- package/dist/plugins/coin/registry.d.mts +1 -0
- package/dist/plugins/coin/registry.mjs +37 -0
- package/dist/plugins/coin/registry.mjs.map +1 -0
- package/dist/plugins/coin/service.d.mts +47 -0
- package/dist/plugins/coin/service.mjs +51 -0
- package/dist/plugins/coin/service.mjs.map +1 -0
- package/dist/plugins/coin/snapshot.mjs +19 -0
- package/dist/plugins/coin/snapshot.mjs.map +1 -0
- package/dist/plugins/coin/type-strings.mjs +49 -0
- package/dist/plugins/coin/type-strings.mjs.map +1 -0
- package/dist/plugins/deepbook/codegen.d.mts +39 -0
- package/dist/plugins/deepbook/codegen.mjs +15 -0
- package/dist/plugins/deepbook/codegen.mjs.map +1 -0
- package/dist/plugins/deepbook/deploy.mjs +437 -0
- package/dist/plugins/deepbook/deploy.mjs.map +1 -0
- package/dist/plugins/deepbook/errors.d.mts +29 -0
- package/dist/plugins/deepbook/errors.mjs +26 -0
- package/dist/plugins/deepbook/errors.mjs.map +1 -0
- package/dist/plugins/deepbook/faucet-strategy.d.mts +8 -0
- package/dist/plugins/deepbook/faucet-strategy.mjs +81 -0
- package/dist/plugins/deepbook/faucet-strategy.mjs.map +1 -0
- package/dist/plugins/deepbook/index.d.mts +171 -0
- package/dist/plugins/deepbook/index.mjs +359 -0
- package/dist/plugins/deepbook/index.mjs.map +1 -0
- package/dist/plugins/deepbook/plugin-key.mjs +7 -0
- package/dist/plugins/deepbook/plugin-key.mjs.map +1 -0
- package/dist/plugins/deepbook/pyth/index.mjs +226 -0
- package/dist/plugins/deepbook/pyth/index.mjs.map +1 -0
- package/dist/plugins/deepbook/routable.mjs +21 -0
- package/dist/plugins/deepbook/routable.mjs.map +1 -0
- package/dist/plugins/deepbook/snapshot.mjs +49 -0
- package/dist/plugins/deepbook/snapshot.mjs.map +1 -0
- package/dist/plugins/deepbook/types.d.mts +125 -0
- package/dist/plugins/deepbook/types.mjs +12 -0
- package/dist/plugins/deepbook/types.mjs.map +1 -0
- package/dist/plugins/faucet/dispatcher.d.mts +9 -0
- package/dist/plugins/faucet/dispatcher.mjs +13 -0
- package/dist/plugins/faucet/dispatcher.mjs.map +1 -0
- package/dist/plugins/faucet/errors.d.mts +86 -0
- package/dist/plugins/faucet/errors.mjs +19 -0
- package/dist/plugins/faucet/errors.mjs.map +1 -0
- package/dist/plugins/faucet/http.mjs +127 -0
- package/dist/plugins/faucet/http.mjs.map +1 -0
- package/dist/plugins/faucet/index.d.mts +43 -0
- package/dist/plugins/faucet/index.mjs +42 -0
- package/dist/plugins/faucet/index.mjs.map +1 -0
- package/dist/plugins/faucet/service.d.mts +20 -0
- package/dist/plugins/faucet/strategies/sui-local.d.mts +23 -0
- package/dist/plugins/faucet/strategies/sui-local.mjs +29 -0
- package/dist/plugins/faucet/strategies/sui-local.mjs.map +1 -0
- package/dist/plugins/host-service/errors.d.mts +27 -0
- package/dist/plugins/host-service/errors.mjs +14 -0
- package/dist/plugins/host-service/errors.mjs.map +1 -0
- package/dist/plugins/host-service/index.d.mts +10 -0
- package/dist/plugins/host-service/index.mjs +48 -0
- package/dist/plugins/host-service/index.mjs.map +1 -0
- package/dist/plugins/host-service/routable.mjs +24 -0
- package/dist/plugins/host-service/routable.mjs.map +1 -0
- package/dist/plugins/host-service/service.d.mts +49 -0
- package/dist/plugins/host-service/service.mjs +375 -0
- package/dist/plugins/host-service/service.mjs.map +1 -0
- package/dist/plugins/package/build.d.mts +1 -0
- package/dist/plugins/package/build.mjs +24 -0
- package/dist/plugins/package/build.mjs.map +1 -0
- package/dist/plugins/package/codegen.d.mts +19 -0
- package/dist/plugins/package/codegen.mjs +41 -0
- package/dist/plugins/package/codegen.mjs.map +1 -0
- package/dist/plugins/package/dep-resolution.mjs +10 -0
- package/dist/plugins/package/dep-resolution.mjs.map +1 -0
- package/dist/plugins/package/errors.d.mts +34 -0
- package/dist/plugins/package/errors.mjs +13 -0
- package/dist/plugins/package/errors.mjs.map +1 -0
- package/dist/plugins/package/index.d.mts +109 -0
- package/dist/plugins/package/index.mjs +207 -0
- package/dist/plugins/package/index.mjs.map +1 -0
- package/dist/plugins/package/mode-known.mjs +41 -0
- package/dist/plugins/package/mode-known.mjs.map +1 -0
- package/dist/plugins/package/mode-local.d.mts +1 -0
- package/dist/plugins/package/mode-local.mjs +183 -0
- package/dist/plugins/package/mode-local.mjs.map +1 -0
- package/dist/plugins/package/publish-executor.mjs +202 -0
- package/dist/plugins/package/publish-executor.mjs.map +1 -0
- package/dist/plugins/package/publish-output.d.mts +28 -0
- package/dist/plugins/package/publish-output.mjs +45 -0
- package/dist/plugins/package/publish-output.mjs.map +1 -0
- package/dist/plugins/package/registry.d.mts +25 -0
- package/dist/plugins/package/registry.mjs +30 -0
- package/dist/plugins/package/registry.mjs.map +1 -0
- package/dist/plugins/package/service.mjs +20 -0
- package/dist/plugins/package/service.mjs.map +1 -0
- package/dist/plugins/package/snapshot.mjs +25 -0
- package/dist/plugins/package/snapshot.mjs.map +1 -0
- package/dist/plugins/postgres/codegen.mjs +42 -0
- package/dist/plugins/postgres/codegen.mjs.map +1 -0
- package/dist/plugins/postgres/connection.d.mts +33 -0
- package/dist/plugins/postgres/connection.mjs +19 -0
- package/dist/plugins/postgres/connection.mjs.map +1 -0
- package/dist/plugins/postgres/db-ensure.mjs +100 -0
- package/dist/plugins/postgres/db-ensure.mjs.map +1 -0
- package/dist/plugins/postgres/errors.d.mts +55 -0
- package/dist/plugins/postgres/errors.mjs +29 -0
- package/dist/plugins/postgres/errors.mjs.map +1 -0
- package/dist/plugins/postgres/index.d.mts +37 -0
- package/dist/plugins/postgres/index.mjs +75 -0
- package/dist/plugins/postgres/index.mjs.map +1 -0
- package/dist/plugins/postgres/routable.mjs +33 -0
- package/dist/plugins/postgres/routable.mjs.map +1 -0
- package/dist/plugins/postgres/service.d.mts +50 -0
- package/dist/plugins/postgres/service.mjs +145 -0
- package/dist/plugins/postgres/service.mjs.map +1 -0
- package/dist/plugins/postgres/snapshot.d.mts +1 -0
- package/dist/plugins/postgres/snapshot.mjs +32 -0
- package/dist/plugins/postgres/snapshot.mjs.map +1 -0
- package/dist/plugins/router-entrypoints.mjs +21 -0
- package/dist/plugins/router-entrypoints.mjs.map +1 -0
- package/dist/plugins/seal/bootstrap-assets/cargo-image.mjs +59 -0
- package/dist/plugins/seal/bootstrap-assets/cargo-image.mjs.map +1 -0
- package/dist/plugins/seal/bootstrap-assets/source-fetch.mjs +132 -0
- package/dist/plugins/seal/bootstrap-assets/source-fetch.mjs.map +1 -0
- package/dist/plugins/seal/codegen.d.mts +19 -0
- package/dist/plugins/seal/codegen.mjs +16 -0
- package/dist/plugins/seal/codegen.mjs.map +1 -0
- package/dist/plugins/seal/config-render.mjs +82 -0
- package/dist/plugins/seal/config-render.mjs.map +1 -0
- package/dist/plugins/seal/deploy.mjs +198 -0
- package/dist/plugins/seal/deploy.mjs.map +1 -0
- package/dist/plugins/seal/errors.d.mts +52 -0
- package/dist/plugins/seal/errors.mjs +19 -0
- package/dist/plugins/seal/errors.mjs.map +1 -0
- package/dist/plugins/seal/index.d.mts +161 -0
- package/dist/plugins/seal/index.mjs +235 -0
- package/dist/plugins/seal/index.mjs.map +1 -0
- package/dist/plugins/seal/key-manager.d.mts +22 -0
- package/dist/plugins/seal/key-manager.mjs +22 -0
- package/dist/plugins/seal/key-manager.mjs.map +1 -0
- package/dist/plugins/seal/key-server.mjs +175 -0
- package/dist/plugins/seal/key-server.mjs.map +1 -0
- package/dist/plugins/seal/keygen.mjs +96 -0
- package/dist/plugins/seal/keygen.mjs.map +1 -0
- package/dist/plugins/seal/mode/fork-known.d.mts +8 -0
- package/dist/plugins/seal/mode/fork-known.mjs +23 -0
- package/dist/plugins/seal/mode/fork-known.mjs.map +1 -0
- package/dist/plugins/seal/mode/live.d.mts +18 -0
- package/dist/plugins/seal/mode/live.mjs +64 -0
- package/dist/plugins/seal/mode/live.mjs.map +1 -0
- package/dist/plugins/seal/mode/local-keygen.mjs +180 -0
- package/dist/plugins/seal/mode/local-keygen.mjs.map +1 -0
- package/dist/plugins/seal/plugin-key.mjs +7 -0
- package/dist/plugins/seal/plugin-key.mjs.map +1 -0
- package/dist/plugins/seal/registry-publish.d.mts +43 -0
- package/dist/plugins/seal/registry-publish.mjs +9 -0
- package/dist/plugins/seal/registry-publish.mjs.map +1 -0
- package/dist/plugins/seal/routable.mjs +57 -0
- package/dist/plugins/seal/routable.mjs.map +1 -0
- package/dist/plugins/seal/service.mjs +17 -0
- package/dist/plugins/seal/service.mjs.map +1 -0
- package/dist/plugins/seal/snapshot.mjs +51 -0
- package/dist/plugins/seal/snapshot.mjs.map +1 -0
- package/dist/plugins/sui/auto-tick.mjs +45 -0
- package/dist/plugins/sui/auto-tick.mjs.map +1 -0
- package/dist/plugins/sui/chain-build-container.d.mts +1 -0
- package/dist/plugins/sui/chain-probe.d.mts +85 -0
- package/dist/plugins/sui/chain-probe.mjs +104 -0
- package/dist/plugins/sui/chain-probe.mjs.map +1 -0
- package/dist/plugins/sui/codegen.d.mts +14 -0
- package/dist/plugins/sui/codegen.mjs +26 -0
- package/dist/plugins/sui/codegen.mjs.map +1 -0
- package/dist/plugins/sui/errors.d.mts +74 -0
- package/dist/plugins/sui/errors.mjs +28 -0
- package/dist/plugins/sui/errors.mjs.map +1 -0
- package/dist/plugins/sui/fork-orchestration.mjs +24 -0
- package/dist/plugins/sui/fork-orchestration.mjs.map +1 -0
- package/dist/plugins/sui/fork-transaction.mjs +96 -0
- package/dist/plugins/sui/fork-transaction.mjs.map +1 -0
- package/dist/plugins/sui/index.d.mts +318 -0
- package/dist/plugins/sui/index.mjs +182 -0
- package/dist/plugins/sui/index.mjs.map +1 -0
- package/dist/plugins/sui/mode/external.mjs +60 -0
- package/dist/plugins/sui/mode/external.mjs.map +1 -0
- package/dist/plugins/sui/mode/fork.mjs +283 -0
- package/dist/plugins/sui/mode/fork.mjs.map +1 -0
- package/dist/plugins/sui/mode/live.mjs +103 -0
- package/dist/plugins/sui/mode/live.mjs.map +1 -0
- package/dist/plugins/sui/mode/local.mjs +293 -0
- package/dist/plugins/sui/mode/local.mjs.map +1 -0
- package/dist/plugins/sui/mode/shared-boot.mjs +254 -0
- package/dist/plugins/sui/mode/shared-boot.mjs.map +1 -0
- package/dist/plugins/sui/mode/shared.d.mts +103 -0
- package/dist/plugins/sui/mode/shared.mjs +12 -0
- package/dist/plugins/sui/mode/shared.mjs.map +1 -0
- package/dist/plugins/sui/mode/spec.d.mts +94 -0
- package/dist/plugins/sui/network-resolver.d.mts +23 -0
- package/dist/plugins/sui/routable.mjs +88 -0
- package/dist/plugins/sui/routable.mjs.map +1 -0
- package/dist/plugins/sui/seed-objects.d.mts +18 -0
- package/dist/plugins/sui/seed-objects.mjs +25 -0
- package/dist/plugins/sui/seed-objects.mjs.map +1 -0
- package/dist/plugins/sui/service.mjs +38 -0
- package/dist/plugins/sui/service.mjs.map +1 -0
- package/dist/plugins/sui/snapshot.mjs +53 -0
- package/dist/plugins/sui/snapshot.mjs.map +1 -0
- package/dist/plugins/wallet/codegen.d.mts +33 -0
- package/dist/plugins/wallet/codegen.mjs +34 -0
- package/dist/plugins/wallet/codegen.mjs.map +1 -0
- package/dist/plugins/wallet/errors.d.mts +66 -0
- package/dist/plugins/wallet/errors.mjs +16 -0
- package/dist/plugins/wallet/errors.mjs.map +1 -0
- package/dist/plugins/wallet/index.d.mts +63 -0
- package/dist/plugins/wallet/index.mjs +126 -0
- package/dist/plugins/wallet/index.mjs.map +1 -0
- package/dist/plugins/wallet/origin-policy.d.mts +1 -0
- package/dist/plugins/wallet/origin-policy.mjs +65 -0
- package/dist/plugins/wallet/origin-policy.mjs.map +1 -0
- package/dist/plugins/wallet/pairing.d.mts +11 -0
- package/dist/plugins/wallet/pairing.mjs +125 -0
- package/dist/plugins/wallet/pairing.mjs.map +1 -0
- package/dist/plugins/wallet/protocol.d.mts +1 -0
- package/dist/plugins/wallet/protocol.mjs +96 -0
- package/dist/plugins/wallet/protocol.mjs.map +1 -0
- package/dist/plugins/wallet/routable.mjs +32 -0
- package/dist/plugins/wallet/routable.mjs.map +1 -0
- package/dist/plugins/wallet/server.d.mts +12 -0
- package/dist/plugins/wallet/server.mjs +317 -0
- package/dist/plugins/wallet/server.mjs.map +1 -0
- package/dist/plugins/wallet/service.d.mts +68 -0
- package/dist/plugins/wallet/service.mjs +97 -0
- package/dist/plugins/wallet/service.mjs.map +1 -0
- package/dist/plugins/wallet/snapshot.d.mts +1 -0
- package/dist/plugins/wallet/snapshot.mjs +14 -0
- package/dist/plugins/wallet/snapshot.mjs.map +1 -0
- package/dist/plugins/walrus/bootstrap-assets/cargo-image.mjs +42 -0
- package/dist/plugins/walrus/bootstrap-assets/cargo-image.mjs.map +1 -0
- package/dist/plugins/walrus/codegen.d.mts +38 -0
- package/dist/plugins/walrus/codegen.mjs +34 -0
- package/dist/plugins/walrus/codegen.mjs.map +1 -0
- package/dist/plugins/walrus/deploy-paths.mjs +14 -0
- package/dist/plugins/walrus/deploy-paths.mjs.map +1 -0
- package/dist/plugins/walrus/deploy.d.mts +1 -0
- package/dist/plugins/walrus/deploy.mjs +224 -0
- package/dist/plugins/walrus/deploy.mjs.map +1 -0
- package/dist/plugins/walrus/errors.d.mts +38 -0
- package/dist/plugins/walrus/errors.mjs +26 -0
- package/dist/plugins/walrus/errors.mjs.map +1 -0
- package/dist/plugins/walrus/faucet-strategy.d.mts +12 -0
- package/dist/plugins/walrus/faucet-strategy.mjs +62 -0
- package/dist/plugins/walrus/faucet-strategy.mjs.map +1 -0
- package/dist/plugins/walrus/index.d.mts +177 -0
- package/dist/plugins/walrus/index.mjs +284 -0
- package/dist/plugins/walrus/index.mjs.map +1 -0
- package/dist/plugins/walrus/mode/known-deploy.d.mts +25 -0
- package/dist/plugins/walrus/mode/known-deploy.mjs +71 -0
- package/dist/plugins/walrus/mode/known-deploy.mjs.map +1 -0
- package/dist/plugins/walrus/mode/local-cluster.d.mts +34 -0
- package/dist/plugins/walrus/mode/local-cluster.mjs +153 -0
- package/dist/plugins/walrus/mode/local-cluster.mjs.map +1 -0
- package/dist/plugins/walrus/plugin-key.mjs +7 -0
- package/dist/plugins/walrus/plugin-key.mjs.map +1 -0
- package/dist/plugins/walrus/registry-publish.d.mts +24 -0
- package/dist/plugins/walrus/registry-publish.mjs +7 -0
- package/dist/plugins/walrus/registry-publish.mjs.map +1 -0
- package/dist/plugins/walrus/routable.mjs +99 -0
- package/dist/plugins/walrus/routable.mjs.map +1 -0
- package/dist/plugins/walrus/service.mjs +20 -0
- package/dist/plugins/walrus/service.mjs.map +1 -0
- package/dist/plugins/walrus/snapshot.mjs +53 -0
- package/dist/plugins/walrus/snapshot.mjs.map +1 -0
- package/dist/plugins/walrus/storage-nodes.d.mts +15 -0
- package/dist/plugins/walrus/storage-nodes.mjs +154 -0
- package/dist/plugins/walrus/storage-nodes.mjs.map +1 -0
- package/dist/plugins/walrus/wal-swap.d.mts +2 -0
- package/dist/plugins/walrus/wal-swap.mjs +58 -0
- package/dist/plugins/walrus/wal-swap.mjs.map +1 -0
- package/dist/primitives/artifact-publisher.d.mts +12 -0
- package/dist/primitives/cache.d.mts +1 -0
- package/dist/runtime/built-in-plugin-layers.mjs +49 -0
- package/dist/runtime/built-in-plugin-layers.mjs.map +1 -0
- package/dist/runtime/docker/client.d.mts +2 -0
- package/dist/runtime/docker/client.mjs +54 -0
- package/dist/runtime/docker/client.mjs.map +1 -0
- package/dist/runtime/docker/container.d.mts +1 -0
- package/dist/runtime/docker/container.mjs +562 -0
- package/dist/runtime/docker/container.mjs.map +1 -0
- package/dist/runtime/docker/errors.d.mts +1 -0
- package/dist/runtime/docker/errors.mjs +187 -0
- package/dist/runtime/docker/errors.mjs.map +1 -0
- package/dist/runtime/docker/exec.d.mts +1 -0
- package/dist/runtime/docker/exec.mjs +63 -0
- package/dist/runtime/docker/exec.mjs.map +1 -0
- package/dist/runtime/docker/image.d.mts +1 -0
- package/dist/runtime/docker/image.mjs +278 -0
- package/dist/runtime/docker/image.mjs.map +1 -0
- package/dist/runtime/docker/index.d.mts +1 -0
- package/dist/runtime/docker/inventory.d.mts +1 -0
- package/dist/runtime/docker/inventory.mjs +167 -0
- package/dist/runtime/docker/inventory.mjs.map +1 -0
- package/dist/runtime/docker/labels.d.mts +1 -0
- package/dist/runtime/docker/labels.mjs +97 -0
- package/dist/runtime/docker/labels.mjs.map +1 -0
- package/dist/runtime/docker/logs.d.mts +1 -0
- package/dist/runtime/docker/logs.mjs +34 -0
- package/dist/runtime/docker/logs.mjs.map +1 -0
- package/dist/runtime/docker/network.d.mts +1 -0
- package/dist/runtime/docker/network.mjs +168 -0
- package/dist/runtime/docker/network.mjs.map +1 -0
- package/dist/runtime/docker/service.d.mts +9 -0
- package/dist/runtime/docker/service.mjs +266 -0
- package/dist/runtime/docker/service.mjs.map +1 -0
- package/dist/runtime/docker/sweep.d.mts +1 -0
- package/dist/runtime/docker/sweep.mjs +220 -0
- package/dist/runtime/docker/sweep.mjs.map +1 -0
- package/dist/runtime/docker/volume.d.mts +1 -0
- package/dist/runtime/docker/volume.mjs +24 -0
- package/dist/runtime/docker/volume.mjs.map +1 -0
- package/dist/runtime/docker/wrap.d.mts +1 -0
- package/dist/runtime/docker/wrap.mjs +131 -0
- package/dist/runtime/docker/wrap.mjs.map +1 -0
- package/dist/substrate/brand.d.mts +24 -0
- package/dist/substrate/brand.mjs +14 -0
- package/dist/substrate/brand.mjs.map +1 -0
- package/dist/substrate/cross-process.d.mts +1 -0
- package/dist/substrate/cross-process.mjs +28 -0
- package/dist/substrate/cross-process.mjs.map +1 -0
- package/dist/substrate/events.d.mts +117 -0
- package/dist/substrate/identity.d.mts +13 -0
- package/dist/substrate/lifecycle.d.mts +12 -0
- package/dist/substrate/manifest.d.mts +39 -0
- package/dist/substrate/manifest.mjs +33 -0
- package/dist/substrate/manifest.mjs.map +1 -0
- package/dist/substrate/network.d.mts +34 -0
- package/dist/substrate/options.d.mts +23 -0
- package/dist/substrate/plugin.d.mts +101 -0
- package/dist/substrate/plugin.mjs +61 -0
- package/dist/substrate/plugin.mjs.map +1 -0
- package/dist/substrate/projection.d.mts +100 -0
- package/dist/substrate/runtime/artifact-publisher/index.mjs +76 -0
- package/dist/substrate/runtime/artifact-publisher/index.mjs.map +1 -0
- package/dist/substrate/runtime/atomic-write.mjs +106 -0
- package/dist/substrate/runtime/atomic-write.mjs.map +1 -0
- package/dist/substrate/runtime/cache/index.d.mts +1 -0
- package/dist/substrate/runtime/cache/schema.d.mts +1 -0
- package/dist/substrate/runtime/cache/schema.mjs +22 -0
- package/dist/substrate/runtime/cache/schema.mjs.map +1 -0
- package/dist/substrate/runtime/cache/service.d.mts +1 -0
- package/dist/substrate/runtime/cache/service.mjs +89 -0
- package/dist/substrate/runtime/cache/service.mjs.map +1 -0
- package/dist/substrate/runtime/capability-sinks/index.d.mts +1 -0
- package/dist/substrate/runtime/capability-sinks/layer.d.mts +1 -0
- package/dist/substrate/runtime/capability-sinks/layer.mjs +31 -0
- package/dist/substrate/runtime/capability-sinks/layer.mjs.map +1 -0
- package/dist/substrate/runtime/capability-sinks/service.d.mts +36 -0
- package/dist/substrate/runtime/capability-sinks/service.mjs +74 -0
- package/dist/substrate/runtime/capability-sinks/service.mjs.map +1 -0
- package/dist/substrate/runtime/config-validation.d.mts +38 -0
- package/dist/substrate/runtime/config-validation.mjs +137 -0
- package/dist/substrate/runtime/config-validation.mjs.map +1 -0
- package/dist/substrate/runtime/context-helpers.mjs +32 -0
- package/dist/substrate/runtime/context-helpers.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/command-channel/channel.mjs +128 -0
- package/dist/substrate/runtime/cross-process/command-channel/channel.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/command-channel/file-channel.mjs +136 -0
- package/dist/substrate/runtime/cross-process/command-channel/file-channel.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/command-channel/protocol.mjs +49 -0
- package/dist/substrate/runtime/cross-process/command-channel/protocol.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/command-channel/runtime-control-lock.mjs +9 -0
- package/dist/substrate/runtime/cross-process/command-channel/runtime-control-lock.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/liveness.mjs +119 -0
- package/dist/substrate/runtime/cross-process/liveness.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/roster.mjs +275 -0
- package/dist/substrate/runtime/cross-process/roster.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/snapshot-reservation.d.mts +1 -0
- package/dist/substrate/runtime/cross-process/snapshot-reservation.mjs +117 -0
- package/dist/substrate/runtime/cross-process/snapshot-reservation.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/stack-lock.d.mts +1 -0
- package/dist/substrate/runtime/cross-process/stack-lock.mjs +142 -0
- package/dist/substrate/runtime/cross-process/stack-lock.mjs.map +1 -0
- package/dist/substrate/runtime/current-plugin.mjs +15 -0
- package/dist/substrate/runtime/current-plugin.mjs.map +1 -0
- package/dist/substrate/runtime/errors.d.mts +1 -0
- package/dist/substrate/runtime/errors.mjs +76 -0
- package/dist/substrate/runtime/errors.mjs.map +1 -0
- package/dist/substrate/runtime/host-tree-tar/index.mjs +364 -0
- package/dist/substrate/runtime/host-tree-tar/index.mjs.map +1 -0
- package/dist/substrate/runtime/http-probe.d.mts +35 -0
- package/dist/substrate/runtime/http-probe.mjs +65 -0
- package/dist/substrate/runtime/http-probe.mjs.map +1 -0
- package/dist/substrate/runtime/lease-broker/index.d.mts +1 -0
- package/dist/substrate/runtime/lease-broker/service.d.mts +64 -0
- package/dist/substrate/runtime/lease-broker/service.mjs +155 -0
- package/dist/substrate/runtime/lease-broker/service.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/dep-graph.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/dep-graph.mjs +138 -0
- package/dist/substrate/runtime/lifecycle/dep-graph.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/index.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/lifecycle-fact.mjs +31 -0
- package/dist/substrate/runtime/lifecycle/lifecycle-fact.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/plugin-registry.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/plugin-registry.mjs +133 -0
- package/dist/substrate/runtime/lifecycle/plugin-registry.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/ready-gate.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/ready-gate.mjs +34 -0
- package/dist/substrate/runtime/lifecycle/ready-gate.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/selective-restart.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/selective-restart.mjs +43 -0
- package/dist/substrate/runtime/lifecycle/selective-restart.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/signals.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/signals.mjs +64 -0
- package/dist/substrate/runtime/lifecycle/signals.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/state-machine.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/state-machine.mjs +38 -0
- package/dist/substrate/runtime/lifecycle/state-machine.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/watch-attribution.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/watch-attribution.mjs +27 -0
- package/dist/substrate/runtime/lifecycle/watch-attribution.mjs.map +1 -0
- package/dist/substrate/runtime/managed-container.d.mts +30 -0
- package/dist/substrate/runtime/managed-container.mjs +32 -0
- package/dist/substrate/runtime/managed-container.mjs.map +1 -0
- package/dist/substrate/runtime/manifest/manifest.mjs +73 -0
- package/dist/substrate/runtime/manifest/manifest.mjs.map +1 -0
- package/dist/substrate/runtime/mode-errors.d.mts +36 -0
- package/dist/substrate/runtime/observability/cascade-formatter.d.mts +1 -0
- package/dist/substrate/runtime/observability/cascade-formatter.mjs +135 -0
- package/dist/substrate/runtime/observability/cascade-formatter.mjs.map +1 -0
- package/dist/substrate/runtime/observability/formatter-registry.d.mts +1 -0
- package/dist/substrate/runtime/observability/formatter-registry.mjs +65 -0
- package/dist/substrate/runtime/observability/formatter-registry.mjs.map +1 -0
- package/dist/substrate/runtime/observability/index.d.mts +3 -0
- package/dist/substrate/runtime/observability/logger.d.mts +58 -0
- package/dist/substrate/runtime/observability/logger.mjs +89 -0
- package/dist/substrate/runtime/observability/logger.mjs.map +1 -0
- package/dist/substrate/runtime/observability/pretty-error.d.mts +1 -0
- package/dist/substrate/runtime/observability/pretty-error.mjs +119 -0
- package/dist/substrate/runtime/observability/pretty-error.mjs.map +1 -0
- package/dist/substrate/runtime/observability/process-lines.d.mts +31 -0
- package/dist/substrate/runtime/observability/process-lines.mjs +40 -0
- package/dist/substrate/runtime/observability/process-lines.mjs.map +1 -0
- package/dist/substrate/runtime/observability/redaction.d.mts +28 -0
- package/dist/substrate/runtime/observability/redaction.mjs +45 -0
- package/dist/substrate/runtime/observability/redaction.mjs.map +1 -0
- package/dist/substrate/runtime/observability/spans.d.mts +1 -0
- package/dist/substrate/runtime/observability/spans.mjs +87 -0
- package/dist/substrate/runtime/observability/spans.mjs.map +1 -0
- package/dist/substrate/runtime/observability/subprocess-capture.d.mts +2 -0
- package/dist/substrate/runtime/observability/subprocess-capture.mjs +82 -0
- package/dist/substrate/runtime/observability/subprocess-capture.mjs.map +1 -0
- package/dist/substrate/runtime/paths.d.mts +17 -0
- package/dist/substrate/runtime/paths.mjs +61 -0
- package/dist/substrate/runtime/paths.mjs.map +1 -0
- package/dist/substrate/runtime/port-broker/index.d.mts +1 -0
- package/dist/substrate/runtime/port-broker/service.d.mts +1 -0
- package/dist/substrate/runtime/port-broker/service.mjs +319 -0
- package/dist/substrate/runtime/port-broker/service.mjs.map +1 -0
- package/dist/substrate/runtime/post-acquire-tasks.d.mts +1 -0
- package/dist/substrate/runtime/post-acquire-tasks.mjs +34 -0
- package/dist/substrate/runtime/post-acquire-tasks.mjs.map +1 -0
- package/dist/substrate/runtime/probes.d.mts +51 -0
- package/dist/substrate/runtime/probes.mjs +84 -0
- package/dist/substrate/runtime/probes.mjs.map +1 -0
- package/dist/substrate/runtime/process-supervisor.d.mts +57 -0
- package/dist/substrate/runtime/process-supervisor.mjs +73 -0
- package/dist/substrate/runtime/process-supervisor.mjs.map +1 -0
- package/dist/substrate/runtime/projection/operational-endpoints.mjs +44 -0
- package/dist/substrate/runtime/projection/operational-endpoints.mjs.map +1 -0
- package/dist/substrate/runtime/projection/persisted.mjs +195 -0
- package/dist/substrate/runtime/projection/persisted.mjs.map +1 -0
- package/dist/substrate/runtime/projection/state-ref.mjs +48 -0
- package/dist/substrate/runtime/projection/state-ref.mjs.map +1 -0
- package/dist/substrate/runtime/projection/update.mjs +200 -0
- package/dist/substrate/runtime/projection/update.mjs.map +1 -0
- package/dist/substrate/runtime/retry-policy.d.mts +18 -0
- package/dist/substrate/runtime/retry-policy.mjs +16 -0
- package/dist/substrate/runtime/retry-policy.mjs.map +1 -0
- package/dist/substrate/runtime/run.mjs +86 -0
- package/dist/substrate/runtime/run.mjs.map +1 -0
- package/dist/substrate/runtime/runtime-decode.d.mts +32 -0
- package/dist/substrate/runtime/runtime-decode.mjs +53 -0
- package/dist/substrate/runtime/runtime-decode.mjs.map +1 -0
- package/dist/substrate/runtime/scoped-http-server.mjs +36 -0
- package/dist/substrate/runtime/scoped-http-server.mjs.map +1 -0
- package/dist/substrate/runtime/scoped-ref-map/service.mjs +83 -0
- package/dist/substrate/runtime/scoped-ref-map/service.mjs.map +1 -0
- package/dist/substrate/runtime/stage-and-swap/index.d.mts +1 -0
- package/dist/substrate/runtime/stage-and-swap/index.mjs +131 -0
- package/dist/substrate/runtime/stage-and-swap/index.mjs.map +1 -0
- package/dist/substrate/runtime/state-store/schema.mjs +36 -0
- package/dist/substrate/runtime/state-store/schema.mjs.map +1 -0
- package/dist/substrate/runtime/strategy-registry/chain-probe-for.d.mts +1 -0
- package/dist/substrate/runtime/strategy-registry/chain-probe-for.mjs +22 -0
- package/dist/substrate/runtime/strategy-registry/chain-probe-for.mjs.map +1 -0
- package/dist/substrate/runtime/strategy-registry/faucet-capability-for.d.mts +1 -0
- package/dist/substrate/runtime/strategy-registry/faucet-capability-for.mjs +30 -0
- package/dist/substrate/runtime/strategy-registry/faucet-capability-for.mjs.map +1 -0
- package/dist/substrate/runtime/strategy-registry/index.d.mts +1 -0
- package/dist/substrate/runtime/strategy-registry/service.d.mts +1 -0
- package/dist/substrate/runtime/strategy-registry/service.mjs +67 -0
- package/dist/substrate/runtime/strategy-registry/service.mjs.map +1 -0
- package/dist/substrate/runtime/sui-execute/index.d.mts +11 -0
- package/dist/substrate/runtime/sui-execute/index.mjs +144 -0
- package/dist/substrate/runtime/sui-execute/index.mjs.map +1 -0
- package/dist/substrate/runtime/sui-move-build/index.d.mts +1 -0
- package/dist/substrate/runtime/sui-move-build/index.mjs +283 -0
- package/dist/substrate/runtime/sui-move-build/index.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor.d.mts +1 -0
- package/dist/substrate/runtime/supervisor.mjs +831 -0
- package/dist/substrate/runtime/supervisor.mjs.map +1 -0
- package/dist/surfaces/cli/command-tree.mjs +276 -0
- package/dist/surfaces/cli/command-tree.mjs.map +1 -0
- package/dist/surfaces/cli/commands/config.mjs +31 -0
- package/dist/surfaces/cli/commands/config.mjs.map +1 -0
- package/dist/surfaces/cli/commands/confirm-node.mjs +26 -0
- package/dist/surfaces/cli/commands/confirm-node.mjs.map +1 -0
- package/dist/surfaces/cli/commands/confirm.mjs +26 -0
- package/dist/surfaces/cli/commands/confirm.mjs.map +1 -0
- package/dist/surfaces/cli/commands/doctor-probes.mjs +452 -0
- package/dist/surfaces/cli/commands/doctor-probes.mjs.map +1 -0
- package/dist/surfaces/cli/commands/doctor.mjs +38 -0
- package/dist/surfaces/cli/commands/doctor.mjs.map +1 -0
- package/dist/surfaces/cli/commands/prune-picker.mjs +347 -0
- package/dist/surfaces/cli/commands/prune-picker.mjs.map +1 -0
- package/dist/surfaces/cli/commands/prune.mjs +178 -0
- package/dist/surfaces/cli/commands/prune.mjs.map +1 -0
- package/dist/surfaces/cli/commands/snapshot.mjs +141 -0
- package/dist/surfaces/cli/commands/snapshot.mjs.map +1 -0
- package/dist/surfaces/cli/commands/status.mjs +95 -0
- package/dist/surfaces/cli/commands/status.mjs.map +1 -0
- package/dist/surfaces/cli/commands/supervisor-presence.mjs +33 -0
- package/dist/surfaces/cli/commands/supervisor-presence.mjs.map +1 -0
- package/dist/surfaces/cli/commands/wipe.mjs +28 -0
- package/dist/surfaces/cli/commands/wipe.mjs.map +1 -0
- package/dist/surfaces/cli/envelope.mjs +43 -0
- package/dist/surfaces/cli/envelope.mjs.map +1 -0
- package/dist/surfaces/cli/errors.mjs +110 -0
- package/dist/surfaces/cli/errors.mjs.map +1 -0
- package/dist/surfaces/cli/flags.mjs +56 -0
- package/dist/surfaces/cli/flags.mjs.map +1 -0
- package/dist/surfaces/cli/index.mjs +418 -0
- package/dist/surfaces/cli/index.mjs.map +1 -0
- package/dist/surfaces/cli/output.mjs +115 -0
- package/dist/surfaces/cli/output.mjs.map +1 -0
- package/dist/surfaces/cli/sysexits.mjs +139 -0
- package/dist/surfaces/cli/sysexits.mjs.map +1 -0
- package/dist/surfaces/tui/app.mjs +104 -0
- package/dist/surfaces/tui/app.mjs.map +1 -0
- package/dist/surfaces/tui/dashboard.mjs +261 -0
- package/dist/surfaces/tui/dashboard.mjs.map +1 -0
- package/dist/surfaces/tui/display-derivation.mjs +395 -0
- package/dist/surfaces/tui/display-derivation.mjs.map +1 -0
- package/dist/surfaces/tui/errors.mjs +11 -0
- package/dist/surfaces/tui/errors.mjs.map +1 -0
- package/dist/surfaces/tui/event-log.mjs +155 -0
- package/dist/surfaces/tui/event-log.mjs.map +1 -0
- package/dist/surfaces/tui/heartbeat.mjs +33 -0
- package/dist/surfaces/tui/heartbeat.mjs.map +1 -0
- package/dist/surfaces/tui/index.mjs +50 -0
- package/dist/surfaces/tui/index.mjs.map +1 -0
- package/dist/surfaces/tui/input.mjs +104 -0
- package/dist/surfaces/tui/input.mjs.map +1 -0
- package/dist/surfaces/tui/mode-detect.mjs +32 -0
- package/dist/surfaces/tui/mode-detect.mjs.map +1 -0
- package/dist/surfaces/tui/mount-ink.mjs +31 -0
- package/dist/surfaces/tui/mount-ink.mjs.map +1 -0
- package/dist/surfaces/tui/plain-renderer.mjs +170 -0
- package/dist/surfaces/tui/plain-renderer.mjs.map +1 -0
- package/dist/surfaces/tui/resource-table.mjs +507 -0
- package/dist/surfaces/tui/resource-table.mjs.map +1 -0
- package/images/_shared/signal-forward.sh +77 -0
- package/images/postgres/Dockerfile +32 -0
- package/images/seal/Dockerfile +68 -0
- package/images/seal/entrypoint.sh +65 -0
- package/images/sui/Dockerfile +73 -0
- package/images/sui/entrypoint.sh +244 -0
- package/images/sui-fork/Dockerfile +53 -0
- package/images/sui-fork/entrypoint.sh +51 -0
- package/images/walrus/Dockerfile +122 -0
- package/images/walrus/deploy-walrus.sh +305 -0
- package/images/walrus/run-walrus.sh +53 -0
- package/package.json +94 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { SpanAttr } from "../../substrate/runtime/observability/spans.mjs";
|
|
2
|
+
import { walletBootError } from "./errors.mjs";
|
|
3
|
+
import { WalletHttpPath } from "./protocol.mjs";
|
|
4
|
+
import { acquirePairingToken, composePairUrl, tokenPath } from "./pairing.mjs";
|
|
5
|
+
import { resolveOriginPolicy } from "./origin-policy.mjs";
|
|
6
|
+
import { startHttpServer } from "./server.mjs";
|
|
7
|
+
import { Effect } from "effect";
|
|
8
|
+
//#region src/plugins/wallet/service.ts
|
|
9
|
+
const WALLET_DEFAULT_BIND_ADDRESS = "0.0.0.0";
|
|
10
|
+
const WALLET_DIRECT_URL_HOST = "127.0.0.1";
|
|
11
|
+
const portProbeHostForBindAddress = (bindAddress) => bindAddress === WALLET_DEFAULT_BIND_ADDRESS ? "0.0.0.0" : "127.0.0.1";
|
|
12
|
+
const directUrlHostForBindAddress = (bindAddress) => bindAddress === WALLET_DEFAULT_BIND_ADDRESS ? WALLET_DIRECT_URL_HOST : bindAddress;
|
|
13
|
+
/**
|
|
14
|
+
* Acquire the wallet service.
|
|
15
|
+
*
|
|
16
|
+
* Distilled-doc invariants honored:
|
|
17
|
+
*
|
|
18
|
+
* - C12 (mandatory Origin + bearer): both gates are wired in
|
|
19
|
+
* `server.ts:dispatch`.
|
|
20
|
+
* - Token comparison constant-time: `pairing.ts:safeBearerEquals`.
|
|
21
|
+
* - Token file 0o600: `pairing.ts:acquirePairingToken`.
|
|
22
|
+
* - Token in URL fragment only: `pairing.ts:composePairUrl`.
|
|
23
|
+
* - Token NEVER in log lines: handlers log only `bearerValid:
|
|
24
|
+
* boolean`.
|
|
25
|
+
* - Default bindAddress `'0.0.0.0'`: required for the Docker router to
|
|
26
|
+
* reach host-loopback services on native Linux.
|
|
27
|
+
* - Stack-scoped origin allowlist (no cross-stack pairing risk):
|
|
28
|
+
* `origin-policy.ts:resolveOriginPolicy`.
|
|
29
|
+
*/
|
|
30
|
+
const acquireWallet = (opts, ctx) => Effect.gen(function* () {
|
|
31
|
+
yield* Effect.annotateCurrentSpan({
|
|
32
|
+
"wallet.app": ctx.app,
|
|
33
|
+
"wallet.stack": ctx.stack,
|
|
34
|
+
"wallet.chain": ctx.chain
|
|
35
|
+
});
|
|
36
|
+
const accounts = yield* ctx.resolveAccounts();
|
|
37
|
+
yield* Effect.annotateCurrentSpan({ "wallet.accountCount": accounts.length });
|
|
38
|
+
if (accounts.length === 0) return yield* Effect.fail(walletBootError({
|
|
39
|
+
phase: "no-accounts",
|
|
40
|
+
message: "wallet resolved zero accounts; add account('name') to the stack or pass accounts explicitly.",
|
|
41
|
+
hint: "`wallet()` and `wallet({ accounts: 'all' })` require at least one account member in the final stack."
|
|
42
|
+
}));
|
|
43
|
+
const accountsByAddress = /* @__PURE__ */ new Map();
|
|
44
|
+
for (const acct of accounts) accountsByAddress.set(acct.address, acct);
|
|
45
|
+
const bindAddress = opts.bindAddress ?? WALLET_DEFAULT_BIND_ADDRESS;
|
|
46
|
+
const port = yield* ctx.allocatePort(opts.port, portProbeHostForBindAddress(bindAddress));
|
|
47
|
+
const token = yield* acquirePairingToken(tokenPath(ctx.stateRoot));
|
|
48
|
+
const server = yield* startHttpServer({
|
|
49
|
+
bindAddress,
|
|
50
|
+
port,
|
|
51
|
+
token,
|
|
52
|
+
policy: yield* resolveOriginPolicy({
|
|
53
|
+
app: ctx.app,
|
|
54
|
+
stack: ctx.stack,
|
|
55
|
+
vitePortForThisStack: ctx.vitePortForThisStack,
|
|
56
|
+
routedAppOrigin: ctx.routedAppOrigin,
|
|
57
|
+
extraOrigins: opts.allowedOrigins ?? [],
|
|
58
|
+
allowLocalhostVite: opts.allowLocalhostVite ?? false
|
|
59
|
+
}),
|
|
60
|
+
accountsByAddress,
|
|
61
|
+
supervisorCtx: ctx.supervisorCtx
|
|
62
|
+
});
|
|
63
|
+
const walletUrl = ctx.routerFrontedUrl ?? `http://${directUrlHostForBindAddress(bindAddress)}:${port}`;
|
|
64
|
+
const pairUrl = composePairUrl(walletUrl, token);
|
|
65
|
+
const bindings = {
|
|
66
|
+
walletUrl,
|
|
67
|
+
pairUrl,
|
|
68
|
+
chain: ctx.chain,
|
|
69
|
+
protocolPaths: {
|
|
70
|
+
health: WalletHttpPath.HEALTH,
|
|
71
|
+
accounts: WalletHttpPath.ACCOUNTS,
|
|
72
|
+
signTransaction: WalletHttpPath.SIGN_TRANSACTION,
|
|
73
|
+
signPersonalMessage: WalletHttpPath.SIGN_PERSONAL_MESSAGE,
|
|
74
|
+
execute: WalletHttpPath.EXECUTE
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
yield* Effect.annotateCurrentSpan({
|
|
78
|
+
"wallet.url": walletUrl,
|
|
79
|
+
"wallet.localPort": port
|
|
80
|
+
});
|
|
81
|
+
yield* Effect.logInfo("wallet ready").pipe(Effect.annotateLogs({
|
|
82
|
+
[SpanAttr.walletUrl]: walletUrl,
|
|
83
|
+
[SpanAttr.walletToken]: "redacted-fragment"
|
|
84
|
+
}));
|
|
85
|
+
return {
|
|
86
|
+
url: walletUrl,
|
|
87
|
+
pairUrl,
|
|
88
|
+
bindings,
|
|
89
|
+
localPort: port,
|
|
90
|
+
token,
|
|
91
|
+
server
|
|
92
|
+
};
|
|
93
|
+
});
|
|
94
|
+
//#endregion
|
|
95
|
+
export { acquireWallet };
|
|
96
|
+
|
|
97
|
+
//# sourceMappingURL=service.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.mjs","names":[],"sources":["../../../src/plugins/wallet/service.ts"],"sourcesContent":["// Wallet plugin — main acquire Effect.\n//\n// What this file does (15-wallet.md §Lifecycle, Startup ordered):\n//\n// 1. Resolve each consumed account tag and key the AccountValues by\n// address (load-bearing: sign endpoints look up by address).\n// 2. Allocate a port via the substrate's `PortBrokerService`.\n// 3. Mint or rehydrate the pairing token (read-existing-or-mint at\n// `<stateRoot>/wallet/token`, mode 0o600) via the substrate's\n// `atomicWriteFile`.\n// 4. Resolve the stack-scoped origin allowlist via\n// `origin-policy.ts`.\n// 5. Start the in-process HTTP server.\n// 6. Compose the wallet URL + pair URL + return the resolved\n// `WalletValue`.\n//\n// The substrate handles:\n//\n// - Scope finalizers (port release, server close) — declared by the\n// substrate primitives we call into.\n// - Endpoint registry publication (we surface the URL/pairUrl via\n// our resolved tag value; the substrate's endpoint-registry\n// primitive consumes the `RoutableDecl` from `routable.ts`).\n// - Manifest emit — the substrate projects from registry. We never\n// write `.devstack/manifest.json` directly.\n\nimport { Effect } from 'effect';\nimport type { FileSystem, Scope } from 'effect';\n\nimport type { AccountValue } from '../account/service.ts';\nimport type { DappKitConfigBindings } from './codegen.ts';\nimport { walletBootError, type WalletBootError } from './errors.ts';\nimport { resolveOriginPolicy } from './origin-policy.ts';\nimport { acquirePairingToken, composePairUrl, tokenPath, type PairingToken } from './pairing.ts';\nimport { startHttpServer, type WalletServerConfig, type WalletServerHandle } from './server.ts';\nimport { WalletHttpPath } from './protocol.ts';\n\n// ----------------------------------------------------------------------\n// User-facing options\n// ----------------------------------------------------------------------\n\nimport type { ResourceRef } from '../../api/define-plugin.ts';\nimport { SpanAttr } from '../../substrate/runtime/observability/spans.ts';\nimport type { AccountResourceId } from '../account/index.ts';\n\n/** Literal sentinel for `WalletOptions.accounts: 'all'` — every account\n * member in the stack. Expanded by the composer at `defineDevstack`\n * call time (api-surface-design §4 D6). Kept as an exported constant\n * so the wallet factory + composer share one source of truth. */\nexport const WALLET_ACCOUNTS_ALL = 'all' as const;\nexport type WalletAccountsAll = typeof WALLET_ACCOUNTS_ALL;\n\n/** A user-supplied account ref. The user passes the result of\n * `account('alice')` — NOT a bare string. Generic over the literal\n * account name so the wallet's dependency tuple preserves each\n * per-account resource id (`account/alice`, `account/bob`, ...). */\nexport type WalletAccountMember<Name extends string = string> = ResourceRef<\n\tAccountResourceId<Name>,\n\tAccountValue\n>;\n\nexport interface WalletOptions<\n\tAccounts extends ReadonlyArray<WalletAccountMember> = ReadonlyArray<WalletAccountMember>,\n> {\n\t/** Accounts the wallet binds. Each is yielded for ordering AND its\n\t * resolved value is keyed by address into the sign-handler map.\n\t *\n\t * Two shapes:\n\t *\n\t * - Explicit tuple — each entry is the plugin/resource ref returned\n\t * by `account('name')`. Pins the bound set at the wallet's call\n\t * site; preserves each literal `account/${Name}` so stack\n\t * composition can validate and recursively expand the refs.\n\t *\n\t * - The literal `'all'` — shorthand for \"every account member in\n\t * the stack\". The composer expands this against the final\n\t * member tuple at `defineDevstack(...)` time (api-surface-design\n\t * §4 D6). The wallet member returned by the factory carries an\n\t * expander hook keyed off `WALLET_ACCOUNTS_ALL` that the\n\t * composer invokes once the account-providing members are\n\t * known. */\n\treadonly accounts: Accounts | typeof WALLET_ACCOUNTS_ALL;\n\t/** Extra origins merged on top of the stack-scoped auto-derived\n\t * origin. Useful for headless test runners and custom dev hosts. */\n\treadonly allowedOrigins?: ReadonlyArray<string>;\n\t/** Preferred host port. Substrate's port broker forward-scans if\n\t * this is taken. Default: substrate-picked (no preference). */\n\treadonly port?: number;\n\t/** NIC the HTTP server binds. Defaults to `'0.0.0.0'` because the\n\t * router runs in Docker and must reach the host process through the\n\t * host-gateway address on native Linux. The public wallet URL remains\n\t * router-fronted and stack-scoped. */\n\treadonly bindAddress?: string;\n\t/** Opt-in: allowlist the bare `http://localhost:<vite-port>` form.\n\t * Off by default to close the cross-stack pairing risk (see\n\t * `origin-policy.ts` for the long-form rationale). */\n\treadonly allowLocalhostVite?: boolean;\n}\n\n// ----------------------------------------------------------------------\n// Resolved value (what the wallet plugin publishes)\n// ----------------------------------------------------------------------\n\nexport interface WalletValue {\n\treadonly url: string; // router-fronted URL when available, loopback otherwise\n\treadonly pairUrl: string;\n\treadonly bindings: DappKitConfigBindings;\n\treadonly localPort: number;\n\treadonly token: PairingToken;\n\t/** Server handle — substrate's scope finalizer chain invokes\n\t * `.close()`; callers don't reach in. Exposed here so tests can\n\t * drive teardown explicitly. */\n\treadonly server: WalletServerHandle;\n}\n\nconst WALLET_DEFAULT_BIND_ADDRESS = '0.0.0.0' as const;\nconst WALLET_DIRECT_URL_HOST = '127.0.0.1' as const;\ntype WalletPortProbeHost = '127.0.0.1' | '0.0.0.0';\n\nconst portProbeHostForBindAddress = (bindAddress: string): WalletPortProbeHost =>\n\tbindAddress === WALLET_DEFAULT_BIND_ADDRESS ? '0.0.0.0' : '127.0.0.1';\n\nconst directUrlHostForBindAddress = (bindAddress: string): string =>\n\tbindAddress === WALLET_DEFAULT_BIND_ADDRESS ? WALLET_DIRECT_URL_HOST : bindAddress;\n\n// ----------------------------------------------------------------------\n// Per-acquire context — supplied by the barrel\n// ----------------------------------------------------------------------\n\n/** Inputs from the substrate. The barrel fills these from the\n * BuildContext; tests can construct directly. */\nexport interface WalletAcquireContext {\n\treadonly app: string;\n\treadonly stack: string;\n\treadonly chain: string;\n\t/** State root where `wallet/token` lives. Convention:\n\t * `<appDir>/.devstack/stacks/<stack>/runtime`. */\n\treadonly stateRoot: string;\n\t/** Vite port for THIS stack (per-stack scoping — see\n\t * `origin-policy.ts`). `null` if no vite is mounted. */\n\treadonly vitePortForThisStack: number | null;\n\t/** Port broker seam — returns the allocated port + a scope-\n\t * finalizer-installed release. The barrel adapts the substrate's\n\t * `PortBrokerService.allocate` to this signature so tests can pin\n\t * the port without yielding from a substrate Layer. */\n\treadonly allocatePort: (\n\t\tpreferred?: number,\n\t\tprobeHost?: WalletPortProbeHost,\n\t) => Effect.Effect<number, WalletBootError, Scope.Scope>;\n\t/** Account value resolver — the barrel hands this in keyed off the\n\t * BuildContext so the service body stays substrate-agnostic. */\n\treadonly resolveAccounts: () => Effect.Effect<ReadonlyArray<AccountValue>, WalletBootError>;\n\t/** Stable router-fronted base URL for this wallet on the stack-scoped\n\t * hostname (e.g. `http://wallet.<app>.localhost:<router-port>`). Null\n\t * only in tests that bypass the router derivation. */\n\treadonly routerFrontedUrl: string | null;\n\t/** Stable router-fronted dev-server origin for this stack. Added to\n\t * the wallet allowlist so app+wallet stacks work without repeating\n\t * router origins in user configs. */\n\treadonly routedAppOrigin: string | null;\n\t/** Supervisor context captured for log/span propagation on handler\n\t * fibers (the in-process HTTP server forks per-request from this). */\n\treadonly supervisorCtx: unknown;\n}\n\n// ----------------------------------------------------------------------\n// Acquire\n// ----------------------------------------------------------------------\n\n/**\n * Acquire the wallet service.\n *\n * Distilled-doc invariants honored:\n *\n * - C12 (mandatory Origin + bearer): both gates are wired in\n * `server.ts:dispatch`.\n * - Token comparison constant-time: `pairing.ts:safeBearerEquals`.\n * - Token file 0o600: `pairing.ts:acquirePairingToken`.\n * - Token in URL fragment only: `pairing.ts:composePairUrl`.\n * - Token NEVER in log lines: handlers log only `bearerValid:\n * boolean`.\n * - Default bindAddress `'0.0.0.0'`: required for the Docker router to\n * reach host-loopback services on native Linux.\n * - Stack-scoped origin allowlist (no cross-stack pairing risk):\n * `origin-policy.ts:resolveOriginPolicy`.\n */\nexport const acquireWallet = (\n\topts: WalletOptions,\n\tctx: WalletAcquireContext,\n): Effect.Effect<WalletValue, WalletBootError, Scope.Scope | FileSystem.FileSystem> =>\n\tEffect.gen(function* () {\n\t\tyield* Effect.annotateCurrentSpan({\n\t\t\t'wallet.app': ctx.app,\n\t\t\t'wallet.stack': ctx.stack,\n\t\t\t'wallet.chain': ctx.chain,\n\t\t});\n\n\t\t// 1. Resolve the dependency account values. The barrel sets up\n\t\t// `resolveAccounts` to walk the BuildContext via resolved dependencies in\n\t\t// `opts.accounts`; we just project to the address-keyed map.\n\t\t// Count is annotated AFTER resolution — `opts.accounts` may\n\t\t// be the `'all'` sentinel before composer expansion, so the\n\t\t// resolved-array length is the load-bearing value.\n\t\tconst accounts = yield* ctx.resolveAccounts();\n\t\tyield* Effect.annotateCurrentSpan({\n\t\t\t'wallet.accountCount': accounts.length,\n\t\t});\n\t\tif (accounts.length === 0) {\n\t\t\treturn yield* Effect.fail(\n\t\t\t\twalletBootError({\n\t\t\t\t\tphase: 'no-accounts',\n\t\t\t\t\tmessage:\n\t\t\t\t\t\t\"wallet resolved zero accounts; add account('name') to the stack or pass accounts explicitly.\",\n\t\t\t\t\thint: \"`wallet()` and `wallet({ accounts: 'all' })` require at least one account member in the final stack.\",\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\t\tconst accountsByAddress = new Map<string, AccountValue>();\n\t\tfor (const acct of accounts) {\n\t\t\taccountsByAddress.set(acct.address, acct);\n\t\t}\n\n\t\t// 2. Port allocation. Probe the same host family the real\n\t\t// listener uses, otherwise a process bound on a non-loopback\n\t\t// interface could race the wallet's all-interface listen.\n\t\tconst bindAddress = opts.bindAddress ?? WALLET_DEFAULT_BIND_ADDRESS;\n\t\tconst port = yield* ctx.allocatePort(opts.port, portProbeHostForBindAddress(bindAddress));\n\n\t\t// 3. Token mint or rehydrate. Lives at the stack-scoped state root\n\t\t// so warm-start + snapshot-restore preserve the existing\n\t\t// pairing.\n\t\tconst token = yield* acquirePairingToken(tokenPath(ctx.stateRoot));\n\n\t\t// 4. Origin policy. Stack-scoped — only allows THIS stack's vite\n\t\t// port through.\n\t\tconst policy = yield* resolveOriginPolicy({\n\t\t\tapp: ctx.app,\n\t\t\tstack: ctx.stack,\n\t\t\tvitePortForThisStack: ctx.vitePortForThisStack,\n\t\t\troutedAppOrigin: ctx.routedAppOrigin,\n\t\t\textraOrigins: opts.allowedOrigins ?? [],\n\t\t\tallowLocalhostVite: opts.allowLocalhostVite ?? false,\n\t\t});\n\n\t\t// 5. Start the HTTP server. The dispatcher in `server.ts` owns\n\t\t// route matching + the constant-time bearer compare + the\n\t\t// JSON envelope contract.\n\t\tconst serverConfig: WalletServerConfig = {\n\t\t\tbindAddress,\n\t\t\tport,\n\t\t\ttoken,\n\t\t\tpolicy,\n\t\t\taccountsByAddress,\n\t\t\tsupervisorCtx: ctx.supervisorCtx,\n\t\t};\n\t\tconst server = yield* startHttpServer(serverConfig);\n\n\t\t// 6. Compose URLs. Router-fronted form when available, loopback\n\t\t// fallback otherwise. The token rides ONLY the fragment — never\n\t\t// a query param — per C13.\n\t\tconst walletUrl =\n\t\t\tctx.routerFrontedUrl ?? `http://${directUrlHostForBindAddress(bindAddress)}:${port}`;\n\t\tconst pairUrl = composePairUrl(walletUrl, token);\n\n\t\tconst bindings: DappKitConfigBindings = {\n\t\t\twalletUrl,\n\t\t\tpairUrl,\n\t\t\tchain: ctx.chain,\n\t\t\tprotocolPaths: {\n\t\t\t\thealth: WalletHttpPath.HEALTH,\n\t\t\t\taccounts: WalletHttpPath.ACCOUNTS,\n\t\t\t\tsignTransaction: WalletHttpPath.SIGN_TRANSACTION,\n\t\t\t\tsignPersonalMessage: WalletHttpPath.SIGN_PERSONAL_MESSAGE,\n\t\t\t\texecute: WalletHttpPath.EXECUTE,\n\t\t\t},\n\t\t};\n\n\t\tyield* Effect.annotateCurrentSpan({\n\t\t\t'wallet.url': walletUrl,\n\t\t\t'wallet.localPort': port,\n\t\t});\n\n\t\t// Defensive: NEVER log `pairUrl` directly. It carries the token.\n\t\tyield* Effect.logInfo('wallet ready').pipe(\n\t\t\tEffect.annotateLogs({\n\t\t\t\t[SpanAttr.walletUrl]: walletUrl,\n\t\t\t\t[SpanAttr.walletToken]: 'redacted-fragment',\n\t\t\t}),\n\t\t);\n\n\t\treturn {\n\t\t\turl: walletUrl,\n\t\t\tpairUrl,\n\t\t\tbindings,\n\t\t\tlocalPort: port,\n\t\t\ttoken,\n\t\t\tserver,\n\t\t} satisfies WalletValue;\n\t});\n"],"mappings":";;;;;;;;AAmHA,MAAM,8BAA8B;AACpC,MAAM,yBAAyB;AAG/B,MAAM,+BAA+B,gBACpC,gBAAgB,8BAA8B,YAAY;AAE3D,MAAM,+BAA+B,gBACpC,gBAAgB,8BAA8B,yBAAyB;;;;;;;;;;;;;;;;;;AA+DxE,MAAa,iBACZ,MACA,QAEA,OAAO,IAAI,aAAa;AACvB,QAAO,OAAO,oBAAoB;EACjC,cAAc,IAAI;EAClB,gBAAgB,IAAI;EACpB,gBAAgB,IAAI;EACpB,CAAC;CAQF,MAAM,WAAW,OAAO,IAAI,iBAAiB;AAC7C,QAAO,OAAO,oBAAoB,EACjC,uBAAuB,SAAS,QAChC,CAAC;AACF,KAAI,SAAS,WAAW,EACvB,QAAO,OAAO,OAAO,KACpB,gBAAgB;EACf,OAAO;EACP,SACC;EACD,MAAM;EACN,CAAC,CACF;CAEF,MAAM,oCAAoB,IAAI,KAA2B;AACzD,MAAK,MAAM,QAAQ,SAClB,mBAAkB,IAAI,KAAK,SAAS,KAAK;CAM1C,MAAM,cAAc,KAAK,eAAe;CACxC,MAAM,OAAO,OAAO,IAAI,aAAa,KAAK,MAAM,4BAA4B,YAAY,CAAC;CAKzF,MAAM,QAAQ,OAAO,oBAAoB,UAAU,IAAI,UAAU,CAAC;CAwBlE,MAAM,SAAS,OAAO,gBAAgB;EAPrC;EACA;EACA;EACA,QAAA,OAhBqB,oBAAoB;GACzC,KAAK,IAAI;GACT,OAAO,IAAI;GACX,sBAAsB,IAAI;GAC1B,iBAAiB,IAAI;GACrB,cAAc,KAAK,kBAAkB,EAAE;GACvC,oBAAoB,KAAK,sBAAsB;GAC/C,CAAC;EAUD;EACA,eAAe,IAAI;EAE8B,CAAC;CAKnD,MAAM,YACL,IAAI,oBAAoB,UAAU,4BAA4B,YAAY,CAAC,GAAG;CAC/E,MAAM,UAAU,eAAe,WAAW,MAAM;CAEhD,MAAM,WAAkC;EACvC;EACA;EACA,OAAO,IAAI;EACX,eAAe;GACd,QAAQ,eAAe;GACvB,UAAU,eAAe;GACzB,iBAAiB,eAAe;GAChC,qBAAqB,eAAe;GACpC,SAAS,eAAe;GACxB;EACD;AAED,QAAO,OAAO,oBAAoB;EACjC,cAAc;EACd,oBAAoB;EACpB,CAAC;AAGF,QAAO,OAAO,QAAQ,eAAe,CAAC,KACrC,OAAO,aAAa;GAClB,SAAS,YAAY;GACrB,SAAS,cAAc;EACxB,CAAC,CACF;AAED,QAAO;EACN,KAAK;EACL;EACA;EACA,WAAW;EACX;EACA;EACA;EACA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
//#region src/plugins/wallet/snapshot.ts
|
|
3
|
+
const makeWalletSnapshotable = () => ({
|
|
4
|
+
kind: "snapshotable",
|
|
5
|
+
subtrees: ["wallet/token"],
|
|
6
|
+
missingTolerance: "fatal",
|
|
7
|
+
secretMaterial: true,
|
|
8
|
+
preRestore: Effect.succeed({ kind: "wallet-pairing-token" }),
|
|
9
|
+
postRestore: Effect.void
|
|
10
|
+
});
|
|
11
|
+
//#endregion
|
|
12
|
+
export { makeWalletSnapshotable };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=snapshot.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapshot.mjs","names":[],"sources":["../../../src/plugins/wallet/snapshot.ts"],"sourcesContent":["// Wallet plugin — Snapshotable contribution.\n//\n// The dev-wallet pairing token is plugin-owned state. Snapshot L3 must\n// not special-case its runtime path; the wallet declares the subtree\n// like any other stateful plugin.\n\nimport { Effect } from 'effect';\n\nimport type { SnapshotableDecl } from '../../contracts/snapshotable.ts';\n\nexport const makeWalletSnapshotable = (): SnapshotableDecl => ({\n\tkind: 'snapshotable',\n\tsubtrees: ['wallet/token'],\n\tmissingTolerance: 'fatal',\n\tsecretMaterial: true,\n\tpreRestore: Effect.succeed({ kind: 'wallet-pairing-token' as const }),\n\tpostRestore: Effect.void,\n});\n"],"mappings":";;AAUA,MAAa,gCAAkD;CAC9D,MAAM;CACN,UAAU,CAAC,eAAe;CAC1B,kBAAkB;CAClB,gBAAgB;CAChB,YAAY,OAAO,QAAQ,EAAE,MAAM,wBAAiC,CAAC;CACrE,aAAa,OAAO;CACpB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { walrusPluginError } from "../errors.mjs";
|
|
2
|
+
import { Effect } from "effect";
|
|
3
|
+
//#region src/plugins/walrus/bootstrap-assets/cargo-image.ts
|
|
4
|
+
const WALRUS_CARGO_IMAGE_OVERRIDE_ENV = "WALRUS_CARGO_IMAGE_OVERRIDE";
|
|
5
|
+
/** Pinned Walrus release whose native binaries are packaged into the
|
|
6
|
+
* local-cluster wrapper image. */
|
|
7
|
+
const DEFAULT_WALRUS_REF = "testnet-v1.49.1";
|
|
8
|
+
/** Distilled-doc invariant 24: the wrapper-baked sui binary must
|
|
9
|
+
* match the localnet image's sui release. Pinned here in lockstep
|
|
10
|
+
* with the walrus ref bump. */
|
|
11
|
+
const DEFAULT_SUI_VERSION = "devnet-v1.71.0";
|
|
12
|
+
/** Resolve to the on-disk path of the vendored Dockerfile context. */
|
|
13
|
+
const vendoredDockerfileContext = () => new URL("../../../../images/walrus/", import.meta.url).pathname;
|
|
14
|
+
/** Resolve the walrus image. Path (a) trusts an env-override tag; path
|
|
15
|
+
* (b) builds the vendored Dockerfile via `runtime.ensureImage`. */
|
|
16
|
+
const resolveCargoImage = (runtime, inputs) => Effect.gen(function* () {
|
|
17
|
+
const override = globalThis.process?.env?.[WALRUS_CARGO_IMAGE_OVERRIDE_ENV];
|
|
18
|
+
if (override && override.length > 0) return {
|
|
19
|
+
digest: override,
|
|
20
|
+
tag: override
|
|
21
|
+
};
|
|
22
|
+
const buildCtx = {
|
|
23
|
+
contextPath: vendoredDockerfileContext(),
|
|
24
|
+
dockerfile: "Dockerfile",
|
|
25
|
+
buildArgs: {
|
|
26
|
+
WALRUS_VERSION: inputs.walrusRef,
|
|
27
|
+
SUI_VERSION: inputs.suiVersion
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
const built = yield* runtime.ensureImage(buildCtx).pipe(Effect.mapError((cause) => walrusPluginError("image-build", `walrus image build failed (walrusRef=${inputs.walrusRef}, suiVersion=${inputs.suiVersion}): ${cause.reason}: ${cause.detail}`, { cause })));
|
|
31
|
+
return {
|
|
32
|
+
digest: built.digest,
|
|
33
|
+
tag: built.tag ?? built.digest
|
|
34
|
+
};
|
|
35
|
+
}).pipe(Effect.withSpan("devstack.plugin.walrus.cargoImage.resolve", { attributes: {
|
|
36
|
+
"walrus.ref": inputs.walrusRef,
|
|
37
|
+
"walrus.suiVersion": inputs.suiVersion
|
|
38
|
+
} }));
|
|
39
|
+
//#endregion
|
|
40
|
+
export { DEFAULT_SUI_VERSION, DEFAULT_WALRUS_REF, resolveCargoImage };
|
|
41
|
+
|
|
42
|
+
//# sourceMappingURL=cargo-image.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cargo-image.mjs","names":[],"sources":["../../../../src/plugins/walrus/bootstrap-assets/cargo-image.ts"],"sourcesContent":["// Walrus vendored Dockerfile-built image.\n//\n// CONTRACT:\n//\n// The vendored Dockerfile packages the upstream Walrus release tarball\n// selected by Docker's TARGETARCH. It never builds Walrus from source:\n// upstream release binaries are the contract, and the Dockerfile verifies\n// the selected asset before the image is accepted.\n//\n// Two staged paths:\n//\n// (a) `WALRUS_CARGO_IMAGE_OVERRIDE` env var — points at a pre-baked\n// registry tag (or a locally `docker build`-tagged image). Skips\n// the runtime build entirely and returns a bare `ImageRef`. The\n// e2e stub test uses this path (`walrus-test-stub:latest`).\n//\n// (b) Vendored Dockerfile build via `runtime.ensureImage()`. The\n// substrate's content-addressed build cache short-circuits when\n// the (context + dockerfile + buildArgs) hash matches a prior result;\n// cold-cache wall-time is the upstream release download.\n//\n// Distilled-doc invariants honored:\n// - 24: `DEFAULT_SUI_VERSION` (the wrapper-baked sui binary) MUST\n// align with the localnet image's sui release.\n// - 25: ubuntu:24.04 base — handled in the Dockerfile.\n\nimport { Effect, type Scope } from 'effect';\n\nimport type { ContainerRuntime, ImageRef } from '../../../contracts/container-runtime.ts';\nimport { walrusPluginError, type WalrusPluginError } from '../errors.ts';\n\nconst WALRUS_CARGO_IMAGE_OVERRIDE_ENV = 'WALRUS_CARGO_IMAGE_OVERRIDE' as const;\n\n/** Pinned Walrus release whose native binaries are packaged into the\n * local-cluster wrapper image. */\nexport const DEFAULT_WALRUS_REF = 'testnet-v1.49.1' as const;\n\n/** Distilled-doc invariant 24: the wrapper-baked sui binary must\n * match the localnet image's sui release. Pinned here in lockstep\n * with the walrus ref bump. */\nexport const DEFAULT_SUI_VERSION = 'devnet-v1.71.0' as const;\n\n/** Inputs to the walrus image resolver. */\nexport interface WalrusCargoImageInputs<Ref extends string = string, SuiV extends string = string> {\n\treadonly walrusRef: Ref;\n\treadonly suiVersion: SuiV;\n}\n\n/** Resolved value — the content-addressed image ref. */\nexport interface WalrusCargoImageResolved {\n\treadonly digest: string;\n\treadonly tag: string;\n}\n\n// ---------------------------------------------------------------------------\n// Runtime resolver\n// ---------------------------------------------------------------------------\n\n/** Resolve to the on-disk path of the vendored Dockerfile context. */\nconst vendoredDockerfileContext = (): string =>\n\tnew URL('../../../../images/walrus/', import.meta.url).pathname;\n\n/** Resolve the walrus image. Path (a) trusts an env-override tag; path\n * (b) builds the vendored Dockerfile via `runtime.ensureImage`. */\nexport const resolveCargoImage = (\n\truntime: ContainerRuntime,\n\tinputs: WalrusCargoImageInputs,\n): Effect.Effect<WalrusCargoImageResolved, WalrusPluginError, Scope.Scope> =>\n\tEffect.gen(function* () {\n\t\tconst override = (globalThis as { process?: { env?: Record<string, string | undefined> } })\n\t\t\t.process?.env?.[WALRUS_CARGO_IMAGE_OVERRIDE_ENV];\n\t\tif (override && override.length > 0) {\n\t\t\t// Trust-the-tag path. The digest is opaque (substrate's\n\t\t\t// content-addressed cache will re-resolve via `docker inspect`\n\t\t\t// when it materializes the image).\n\t\t\treturn { digest: override, tag: override };\n\t\t}\n\n\t\t// Real build via the vendored Dockerfile.\n\t\tconst buildCtx = {\n\t\t\tcontextPath: vendoredDockerfileContext(),\n\t\t\tdockerfile: 'Dockerfile',\n\t\t\tbuildArgs: {\n\t\t\t\tWALRUS_VERSION: inputs.walrusRef,\n\t\t\t\tSUI_VERSION: inputs.suiVersion,\n\t\t\t},\n\t\t};\n\n\t\tconst built = yield* runtime\n\t\t\t.ensureImage(buildCtx)\n\t\t\t.pipe(\n\t\t\t\tEffect.mapError((cause) =>\n\t\t\t\t\twalrusPluginError(\n\t\t\t\t\t\t'image-build',\n\t\t\t\t\t\t`walrus image build failed (walrusRef=${inputs.walrusRef}, suiVersion=${inputs.suiVersion}): ${cause.reason}: ${cause.detail}`,\n\t\t\t\t\t\t{ cause },\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\t\treturn { digest: built.digest, tag: built.tag ?? built.digest };\n\t}).pipe(\n\t\tEffect.withSpan('devstack.plugin.walrus.cargoImage.resolve', {\n\t\t\tattributes: {\n\t\t\t\t'walrus.ref': inputs.walrusRef,\n\t\t\t\t'walrus.suiVersion': inputs.suiVersion,\n\t\t\t},\n\t\t}),\n\t);\n\n/** Convenience: resolve via the default inputs. */\nexport const resolveDefaultCargoImage = (\n\truntime: ContainerRuntime,\n): Effect.Effect<ImageRef, WalrusPluginError, Scope.Scope> =>\n\tresolveCargoImage(runtime, {\n\t\twalrusRef: DEFAULT_WALRUS_REF,\n\t\tsuiVersion: DEFAULT_SUI_VERSION,\n\t});\n"],"mappings":";;;AA+BA,MAAM,kCAAkC;;;AAIxC,MAAa,qBAAqB;;;;AAKlC,MAAa,sBAAsB;;AAmBnC,MAAM,kCACL,IAAI,IAAI,8BAA8B,OAAO,KAAK,IAAI,CAAC;;;AAIxD,MAAa,qBACZ,SACA,WAEA,OAAO,IAAI,aAAa;CACvB,MAAM,WAAY,WAChB,SAAS,MAAM;AACjB,KAAI,YAAY,SAAS,SAAS,EAIjC,QAAO;EAAE,QAAQ;EAAU,KAAK;EAAU;CAI3C,MAAM,WAAW;EAChB,aAAa,2BAA2B;EACxC,YAAY;EACZ,WAAW;GACV,gBAAgB,OAAO;GACvB,aAAa,OAAO;GACpB;EACD;CAED,MAAM,QAAQ,OAAO,QACnB,YAAY,SAAS,CACrB,KACA,OAAO,UAAU,UAChB,kBACC,eACA,wCAAwC,OAAO,UAAU,eAAe,OAAO,WAAW,KAAK,MAAM,OAAO,IAAI,MAAM,UACtH,EAAE,OAAO,CACT,CACD,CACD;AACF,QAAO;EAAE,QAAQ,MAAM;EAAQ,KAAK,MAAM,OAAO,MAAM;EAAQ;EAC9D,CAAC,KACF,OAAO,SAAS,6CAA6C,EAC5D,YAAY;CACX,cAAc,OAAO;CACrB,qBAAqB,OAAO;CAC5B,EACD,CAAC,CACF"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//#region src/plugins/walrus/codegen.d.ts
|
|
2
|
+
/** Per-node descriptor — matches the storage-nodes module's shape
|
|
3
|
+
* for the local-cluster path, and is empty (or whatever the user
|
|
4
|
+
* provides) for known. */
|
|
5
|
+
interface WalrusNodeBinding {
|
|
6
|
+
readonly nodeIndex: number;
|
|
7
|
+
readonly publicHostname: string;
|
|
8
|
+
readonly rpcUrl: string;
|
|
9
|
+
}
|
|
10
|
+
/** The typed shape the emitted file exports. */
|
|
11
|
+
interface WalrusBindings {
|
|
12
|
+
readonly mode: 'local' | 'known';
|
|
13
|
+
readonly chain: string;
|
|
14
|
+
readonly walrusPackageId: string | null;
|
|
15
|
+
readonly walPackageId: string | null;
|
|
16
|
+
readonly walCoinType: string | null;
|
|
17
|
+
/** SDK-ready `packageConfig` — structurally compatible with
|
|
18
|
+
* `@mysten/walrus`'s `WalrusPackageConfig`. */
|
|
19
|
+
readonly packageConfig: {
|
|
20
|
+
readonly systemObjectId: string;
|
|
21
|
+
readonly stakingPoolId: string;
|
|
22
|
+
readonly exchangeIds?: ReadonlyArray<string>;
|
|
23
|
+
};
|
|
24
|
+
/** HTTP URLs — present iff the publishing mode populated them
|
|
25
|
+
* (local always; known only when all three are non-empty —
|
|
26
|
+
* distilled-doc invariant 15). */
|
|
27
|
+
readonly proxyUrl: string | null;
|
|
28
|
+
readonly aggregatorUrl: string | null;
|
|
29
|
+
readonly publisherUrl: string | null;
|
|
30
|
+
/** Storage-node committee — local publishes N descriptors; known
|
|
31
|
+
* publishes user-supplied nodes (testnet/mainnet's 100+ nodes
|
|
32
|
+
* are fetched dynamically by the SDK, not pinned here —
|
|
33
|
+
* distilled-doc invariant 16). */
|
|
34
|
+
readonly nodes: ReadonlyArray<WalrusNodeBinding>;
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
export { WalrusBindings, WalrusNodeBinding };
|
|
38
|
+
//# sourceMappingURL=codegen.d.mts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
//#region src/plugins/walrus/codegen.ts
|
|
3
|
+
/** Construct the Codegenable contribution. Emit is byte-deterministic
|
|
4
|
+
* on unchanged input (architecture: no mtime churn on no-op
|
|
5
|
+
* cycles). */
|
|
6
|
+
const makeCodegenable = (inputs) => ({
|
|
7
|
+
kind: "codegenable",
|
|
8
|
+
emitterName: "walrus-network",
|
|
9
|
+
outputPath: "walrus/network.ts",
|
|
10
|
+
emit: (ctx) => Effect.sync(() => {
|
|
11
|
+
const bindings = {
|
|
12
|
+
mode: inputs.mode,
|
|
13
|
+
chain: inputs.chain,
|
|
14
|
+
walrusPackageId: inputs.walrusPackageId,
|
|
15
|
+
walPackageId: inputs.walPackageId,
|
|
16
|
+
walCoinType: inputs.walCoinType,
|
|
17
|
+
packageConfig: {
|
|
18
|
+
systemObjectId: inputs.systemObjectId,
|
|
19
|
+
stakingPoolId: inputs.stakingPoolId,
|
|
20
|
+
exchangeIds: inputs.exchangeIds.length > 0 ? inputs.exchangeIds : void 0
|
|
21
|
+
},
|
|
22
|
+
proxyUrl: inputs.proxyUrl,
|
|
23
|
+
aggregatorUrl: inputs.aggregatorUrl,
|
|
24
|
+
publisherUrl: inputs.publisherUrl,
|
|
25
|
+
nodes: inputs.nodes
|
|
26
|
+
};
|
|
27
|
+
ctx.exportConst("walrus", bindings);
|
|
28
|
+
return ctx.done();
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
//#endregion
|
|
32
|
+
export { makeCodegenable };
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=codegen.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codegen.mjs","names":[],"sources":["../../../src/plugins/walrus/codegen.ts"],"sourcesContent":["// Walrus plugin — Codegenable contribution.\n//\n// Architecture §6: plugins emit typed `CodegenableDecl`s; the codegen\n// orchestrator stages files into the user's source tree WITHOUT\n// naming the plugin. Walrus's contribution is the SDK-ready\n// `packageConfig` shape that the `@mysten/walrus` SDK consumes —\n// `{systemObjectId, stakingPoolId, exchangeIds}` — plus the proxy /\n// aggregator / publisher URLs for HTTP consumers.\n//\n// Distilled-doc opportunity #8: the v3 `localnetWalrusOptions` couples\n// to a free-form cast. We surface the bindings here as a typed\n// `WalrusBindings` shape so downstream code can `import { walrus }`\n// from the codegen-staged file and get a fully-typed handle.\n//\n// Mode-asymmetric emission:\n// - Local: emits `{packageConfig, proxyUrl, aggregatorUrl,\n// publisherUrl, nodes}` — full shape.\n// - Known: emits `{packageConfig, proxyUrl?, aggregatorUrl?,\n// publisherUrl?}` — the proxy URLs are optional because the\n// contract only publishes them when ALL three are present\n// (distilled-doc invariant 15).\n\nimport { Effect } from 'effect';\n\nimport type { CodegenableDecl } from '../../contracts/codegenable.ts';\n\n/** Per-node descriptor — matches the storage-nodes module's shape\n * for the local-cluster path, and is empty (or whatever the user\n * provides) for known. */\nexport interface WalrusNodeBinding {\n\treadonly nodeIndex: number;\n\treadonly publicHostname: string;\n\treadonly rpcUrl: string;\n}\n\n/** The typed shape the emitted file exports. */\nexport interface WalrusBindings {\n\treadonly mode: 'local' | 'known';\n\treadonly chain: string;\n\treadonly walrusPackageId: string | null;\n\treadonly walPackageId: string | null;\n\treadonly walCoinType: string | null;\n\t/** SDK-ready `packageConfig` — structurally compatible with\n\t * `@mysten/walrus`'s `WalrusPackageConfig`. */\n\treadonly packageConfig: {\n\t\treadonly systemObjectId: string;\n\t\treadonly stakingPoolId: string;\n\t\treadonly exchangeIds?: ReadonlyArray<string>;\n\t};\n\t/** HTTP URLs — present iff the publishing mode populated them\n\t * (local always; known only when all three are non-empty —\n\t * distilled-doc invariant 15). */\n\treadonly proxyUrl: string | null;\n\treadonly aggregatorUrl: string | null;\n\treadonly publisherUrl: string | null;\n\t/** Storage-node committee — local publishes N descriptors; known\n\t * publishes user-supplied nodes (testnet/mainnet's 100+ nodes\n\t * are fetched dynamically by the SDK, not pinned here —\n\t * distilled-doc invariant 16). */\n\treadonly nodes: ReadonlyArray<WalrusNodeBinding>;\n}\n\n/** Inputs to the codegen contribution — supplied at acquire-time.\n * The codegen orchestrator's resolve-once memo picks up the real\n * values via the dynamic capability factory (same shape used by\n * Sui + Account: the factory stamps placeholders at compose-time\n * and the post-acquire factory restamps with resolved fields). */\nexport interface MakeCodegenableInputs {\n\treadonly mode: 'local' | 'known';\n\treadonly chain: string;\n\treadonly walrusPackageId: string | null;\n\treadonly walPackageId: string | null;\n\treadonly walCoinType: string | null;\n\treadonly systemObjectId: string;\n\treadonly stakingPoolId: string;\n\treadonly exchangeIds: ReadonlyArray<string>;\n\treadonly proxyUrl: string | null;\n\treadonly aggregatorUrl: string | null;\n\treadonly publisherUrl: string | null;\n\treadonly nodes: ReadonlyArray<WalrusNodeBinding>;\n}\n\n/** Construct the Codegenable contribution. Emit is byte-deterministic\n * on unchanged input (architecture: no mtime churn on no-op\n * cycles). */\nexport const makeCodegenable = (\n\tinputs: MakeCodegenableInputs,\n): CodegenableDecl<'walrus-network'> => ({\n\tkind: 'codegenable',\n\temitterName: 'walrus-network',\n\toutputPath: 'walrus/network.ts',\n\temit: (ctx) =>\n\t\tEffect.sync(() => {\n\t\t\tconst bindings: WalrusBindings = {\n\t\t\t\tmode: inputs.mode,\n\t\t\t\tchain: inputs.chain,\n\t\t\t\twalrusPackageId: inputs.walrusPackageId,\n\t\t\t\twalPackageId: inputs.walPackageId,\n\t\t\t\twalCoinType: inputs.walCoinType,\n\t\t\t\tpackageConfig: {\n\t\t\t\t\tsystemObjectId: inputs.systemObjectId,\n\t\t\t\t\tstakingPoolId: inputs.stakingPoolId,\n\t\t\t\t\texchangeIds: inputs.exchangeIds.length > 0 ? inputs.exchangeIds : undefined,\n\t\t\t\t},\n\t\t\t\tproxyUrl: inputs.proxyUrl,\n\t\t\t\taggregatorUrl: inputs.aggregatorUrl,\n\t\t\t\tpublisherUrl: inputs.publisherUrl,\n\t\t\t\tnodes: inputs.nodes,\n\t\t\t};\n\t\t\tctx.exportConst('walrus', bindings);\n\t\t\treturn ctx.done();\n\t\t}),\n});\n"],"mappings":";;;;;AAqFA,MAAa,mBACZ,YACwC;CACxC,MAAM;CACN,aAAa;CACb,YAAY;CACZ,OAAO,QACN,OAAO,WAAW;EACjB,MAAM,WAA2B;GAChC,MAAM,OAAO;GACb,OAAO,OAAO;GACd,iBAAiB,OAAO;GACxB,cAAc,OAAO;GACrB,aAAa,OAAO;GACpB,eAAe;IACd,gBAAgB,OAAO;IACvB,eAAe,OAAO;IACtB,aAAa,OAAO,YAAY,SAAS,IAAI,OAAO,cAAc,KAAA;IAClE;GACD,UAAU,OAAO;GACjB,eAAe,OAAO;GACtB,cAAc,OAAO;GACrB,OAAO,OAAO;GACd;AACD,MAAI,YAAY,UAAU,SAAS;AACnC,SAAO,IAAI,MAAM;GAChB;CACH"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { dirname, join, relative } from "node:path";
|
|
2
|
+
//#region src/plugins/walrus/deploy-paths.ts
|
|
3
|
+
const walrusDeployMountPaths = (deployOutputDirHostPath, mountTarget) => {
|
|
4
|
+
const sourceHostPath = dirname(dirname(dirname(deployOutputDirHostPath)));
|
|
5
|
+
return {
|
|
6
|
+
sourceHostPath,
|
|
7
|
+
mountTarget,
|
|
8
|
+
outputDirInContainer: join(mountTarget, relative(sourceHostPath, deployOutputDirHostPath))
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { walrusDeployMountPaths };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=deploy-paths.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy-paths.mjs","names":[],"sources":["../../../src/plugins/walrus/deploy-paths.ts"],"sourcesContent":["import { dirname, join, relative } from 'node:path';\n\nexport interface WalrusDeployMountPaths {\n\treadonly sourceHostPath: string;\n\treadonly mountTarget: string;\n\treadonly outputDirInContainer: string;\n}\n\nexport const walrusDeployMountPaths = (\n\tdeployOutputDirHostPath: string,\n\tmountTarget: string,\n): WalrusDeployMountPaths => {\n\tconst sourceHostPath = dirname(dirname(dirname(deployOutputDirHostPath)));\n\tconst outputDirInContainer = join(mountTarget, relative(sourceHostPath, deployOutputDirHostPath));\n\treturn { sourceHostPath, mountTarget, outputDirInContainer };\n};\n"],"mappings":";;AAQA,MAAa,0BACZ,yBACA,gBAC4B;CAC5B,MAAM,iBAAiB,QAAQ,QAAQ,QAAQ,wBAAwB,CAAC,CAAC;AAEzE,QAAO;EAAE;EAAgB;EAAa,sBADT,KAAK,aAAa,SAAS,gBAAgB,wBAAwB,CACtC;EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { Effect, Schema, Scope } from "effect";
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { walrusDeployMountPaths } from "./deploy-paths.mjs";
|
|
2
|
+
import { walrusPluginError } from "./errors.mjs";
|
|
3
|
+
import { Duration, Effect, Schema } from "effect";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
import { access, mkdir, writeFile } from "node:fs/promises";
|
|
6
|
+
//#region src/plugins/walrus/deploy.ts
|
|
7
|
+
/** Verify-schema: the publisher decodes the cached id's on-chain
|
|
8
|
+
* object through this. Minimal — the substrate's `ChainProbe`
|
|
9
|
+
* decodes against this; any decode failure surfaces structured.
|
|
10
|
+
* Distilled-doc invariant 8: the probe MUST consume a stable
|
|
11
|
+
* identifier (the object id), NOT a derived hash. */
|
|
12
|
+
const WalrusDeployVerifyShape = Schema.Struct({
|
|
13
|
+
systemObjectId: Schema.String,
|
|
14
|
+
stakingObjectId: Schema.String
|
|
15
|
+
});
|
|
16
|
+
const SuiObjectExistsShape = Schema.Struct({ objectId: Schema.String });
|
|
17
|
+
const requiredDeployOutputFiles = (inputs) => [join(inputs.outputDirHostPath, "deploy"), ...Array.from({ length: inputs.committeeSize }, (_, nodeIndex) => [
|
|
18
|
+
join(inputs.outputDirHostPath, `dryrun-node-${nodeIndex}.yaml`),
|
|
19
|
+
join(inputs.outputDirHostPath, `dryrun-node-${nodeIndex}-sui.yaml`),
|
|
20
|
+
join(inputs.outputDirHostPath, `dryrun-node-${nodeIndex}.keystore`)
|
|
21
|
+
]).flat()];
|
|
22
|
+
const deployOutputFilesComplete = (inputs) => Effect.tryPromise({
|
|
23
|
+
try: async () => {
|
|
24
|
+
await Promise.all(requiredDeployOutputFiles(inputs).map((file) => access(file)));
|
|
25
|
+
return true;
|
|
26
|
+
},
|
|
27
|
+
catch: (cause) => walrusPluginError("deploy", `walrus deploy cache is missing local output files under ${inputs.outputDirHostPath}`, { cause })
|
|
28
|
+
}).pipe(Effect.catch(() => Effect.succeed(false)));
|
|
29
|
+
/** Default deploy one-shot timeout. Walrus genesis publish runs the
|
|
30
|
+
* Move publish + WAL exchange creation + per-node config emission;
|
|
31
|
+
* observed wall-clock is 30-60s. 5-minute ceiling absorbs cold-cache
|
|
32
|
+
* + slow CI runners. */
|
|
33
|
+
const DEPLOY_TIMEOUT_MS = 5 * 6e4;
|
|
34
|
+
const DEPLOY_BIND_SOURCE_RETRY_ATTEMPTS = 10;
|
|
35
|
+
const DEPLOY_BIND_SOURCE_RETRY_DELAY_MS = 500;
|
|
36
|
+
const ensureDeployOutputDir = (inputs) => Effect.tryPromise({
|
|
37
|
+
try: async () => {
|
|
38
|
+
await mkdir(inputs.outputDirHostPath, { recursive: true });
|
|
39
|
+
await writeFile(join(inputs.outputDirHostPath, ".devstack-bind-source"), "devstack walrus bind source\n", "utf8");
|
|
40
|
+
},
|
|
41
|
+
catch: (cause) => walrusPluginError("deploy", `walrus deploy failed to prepare output directory ${inputs.outputDirHostPath}`, { cause })
|
|
42
|
+
});
|
|
43
|
+
const hostBindMountOwner = () => {
|
|
44
|
+
const process = globalThis.process;
|
|
45
|
+
if (typeof process?.getuid !== "function" || typeof process.getgid !== "function") return;
|
|
46
|
+
return `${process.getuid()}:${process.getgid()}`;
|
|
47
|
+
};
|
|
48
|
+
const excerpt = (label, value) => {
|
|
49
|
+
const trimmed = value.trim();
|
|
50
|
+
if (trimmed.length === 0) return "";
|
|
51
|
+
const body = trimmed.length > 2400 ? `${trimmed.slice(0, 1100)}...<truncated ${trimmed.length - 2200} chars>...${trimmed.slice(-1100)}` : trimmed;
|
|
52
|
+
return ` ${label}=${JSON.stringify(body)}`;
|
|
53
|
+
};
|
|
54
|
+
const deployExitDetail = (result, inputs) => {
|
|
55
|
+
const missingCommandHint = result.exitCode === 127 ? " exit 127 usually means the deploy image is missing walrus-deploy or an entrypoint command." : "";
|
|
56
|
+
return `walrus deploy exited with code ${result.exitCode}.` + missingCommandHint + ` outputDir=${inputs.outputDirHostPath} committee=${inputs.committeeSize} shards=${inputs.shards}` + excerpt("stdout", result.stdout) + excerpt("stderr", result.stderr);
|
|
57
|
+
};
|
|
58
|
+
const isBindSourceMissing = (result) => result.exitCode === 125 && /bind source path does not exist/i.test(result.stderr) && /invalid mount config/i.test(result.stderr);
|
|
59
|
+
const stringifyCause = (cause) => {
|
|
60
|
+
if (cause instanceof Error) return cause.message;
|
|
61
|
+
if (typeof cause === "string") return cause;
|
|
62
|
+
try {
|
|
63
|
+
return JSON.stringify(cause);
|
|
64
|
+
} catch {
|
|
65
|
+
return String(cause);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
/** Parse the walrus deploy output into a `CachedDeployState`.
|
|
69
|
+
*
|
|
70
|
+
* Expected output format (best-effort match against the v3 reference's
|
|
71
|
+
* deploy stdout — the walrus binary's exact format may drift between
|
|
72
|
+
* versions):
|
|
73
|
+
*
|
|
74
|
+
* walrus_package_id: 0x<hex>
|
|
75
|
+
* system_object: 0x<hex>
|
|
76
|
+
* staking_object: 0x<hex>
|
|
77
|
+
* upgrade_manager_object: 0x<hex> (optional)
|
|
78
|
+
* treasury_object: 0x<hex> (optional)
|
|
79
|
+
* exchange_object: 0x<hex> (optional)
|
|
80
|
+
*
|
|
81
|
+
* Returns the parsed state OR a typed `WalrusPluginError('deploy')`
|
|
82
|
+
* surfaced with stdout/stderr capture for debugging. */
|
|
83
|
+
const parseDeployOutput = (stdout) => {
|
|
84
|
+
const pick = (k) => {
|
|
85
|
+
const v = new RegExp(`(?:^|\\n)\\s*${k}\\s*[:=]\\s*(\\S+)`).exec(stdout)?.[1];
|
|
86
|
+
if (v === void 0 || v === "None") return void 0;
|
|
87
|
+
return v;
|
|
88
|
+
};
|
|
89
|
+
const walrusPackageId = pick("walrus_package_id") ?? pick("package_id");
|
|
90
|
+
const systemObject = pick("system_object") ?? pick("system_object_id");
|
|
91
|
+
const stakingObject = pick("staking_object") ?? pick("staking_pool_id") ?? pick("staking_object_id");
|
|
92
|
+
if (!walrusPackageId || !systemObject || !stakingObject) return null;
|
|
93
|
+
return {
|
|
94
|
+
walrusPackageId,
|
|
95
|
+
systemObject,
|
|
96
|
+
stakingObject,
|
|
97
|
+
upgradeManagerObject: pick("upgrade_manager_object"),
|
|
98
|
+
treasuryObject: pick("treasury_object"),
|
|
99
|
+
exchangeObject: pick("exchange_object")
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
/** Run the walrus-deploy one-shot and parse the output.
|
|
103
|
+
*
|
|
104
|
+
* Implementation:
|
|
105
|
+
* 1. `runtime.runOneShot({ image, argv: ['deploy', ...] })` —
|
|
106
|
+
* fresh `docker run --rm` container. Mount the host output dir
|
|
107
|
+
* at `/opt/walrus/outputs` so the per-node config files persist.
|
|
108
|
+
* 2. Parse stdout for the deploy summary.
|
|
109
|
+
* 3. Surface non-zero exits + parse failures as
|
|
110
|
+
* `WalrusPluginError('deploy')` with stdout/stderr capture. */
|
|
111
|
+
const runDeployOneShot = (runtime, inputs) => Effect.gen(function* () {
|
|
112
|
+
if (inputs.waitForFundsReady !== void 0) yield* inputs.waitForFundsReady.pipe(Effect.mapError((cause) => walrusPluginError("deploy", `walrus deploy funding gate failed before walrus-deploy: ${stringifyCause(cause)}`, { cause })));
|
|
113
|
+
yield* ensureDeployOutputDir(inputs);
|
|
114
|
+
const outputOwner = hostBindMountOwner();
|
|
115
|
+
const outputMount = walrusDeployMountPaths(inputs.outputDirHostPath, "/opt/walrus/runtime");
|
|
116
|
+
const argv = [
|
|
117
|
+
"deploy",
|
|
118
|
+
"--output-dir",
|
|
119
|
+
outputMount.outputDirInContainer,
|
|
120
|
+
"--committee-size",
|
|
121
|
+
String(inputs.committeeSize),
|
|
122
|
+
"--shards",
|
|
123
|
+
String(inputs.shards),
|
|
124
|
+
"--epoch-duration",
|
|
125
|
+
inputs.epochDuration,
|
|
126
|
+
"--sui-rpc-url",
|
|
127
|
+
inputs.suiRpcUrlInNetwork,
|
|
128
|
+
"--faucet-url",
|
|
129
|
+
inputs.walrusFaucetUrlInNetwork,
|
|
130
|
+
"--public-hosts",
|
|
131
|
+
inputs.publicHostsCsv,
|
|
132
|
+
"--listening-ips",
|
|
133
|
+
inputs.listeningIpsCsv
|
|
134
|
+
];
|
|
135
|
+
const runAttempt = () => runtime.runOneShot({
|
|
136
|
+
image: inputs.walrusImage,
|
|
137
|
+
argv,
|
|
138
|
+
mounts: [{
|
|
139
|
+
source: outputMount.sourceHostPath,
|
|
140
|
+
target: outputMount.mountTarget
|
|
141
|
+
}],
|
|
142
|
+
...outputOwner === void 0 ? {} : { env: { DEVSTACK_HOST_UID_GID: outputOwner } },
|
|
143
|
+
network: inputs.suiNetworkName,
|
|
144
|
+
extraHosts: { "host.docker.internal": "host-gateway" },
|
|
145
|
+
timeoutMillis: DEPLOY_TIMEOUT_MS
|
|
146
|
+
}).pipe(Effect.catch((cause) => Effect.fail(walrusPluginError("deploy", `walrus deploy one-shot failed: ${cause.reason}: ${cause.detail}`, { cause }))));
|
|
147
|
+
let result;
|
|
148
|
+
for (let attempt = 0;; attempt += 1) {
|
|
149
|
+
result = yield* runAttempt();
|
|
150
|
+
if (!isBindSourceMissing(result) || attempt >= DEPLOY_BIND_SOURCE_RETRY_ATTEMPTS) break;
|
|
151
|
+
yield* ensureDeployOutputDir(inputs);
|
|
152
|
+
yield* Effect.sleep(Duration.millis(DEPLOY_BIND_SOURCE_RETRY_DELAY_MS));
|
|
153
|
+
}
|
|
154
|
+
if (result.exitCode !== 0) return yield* Effect.fail(walrusPluginError("deploy", deployExitDetail(result, inputs), {
|
|
155
|
+
exitCode: result.exitCode,
|
|
156
|
+
stdout: result.stdout,
|
|
157
|
+
stderr: result.stderr
|
|
158
|
+
}));
|
|
159
|
+
const parsed = parseDeployOutput(result.stdout);
|
|
160
|
+
if (!parsed) return yield* Effect.fail(walrusPluginError("deploy", "walrus deploy: parser could not find walrus_package_id / system_object / staking_object in deploy output. Confirm the walrus binary's output format and adjust `parseDeployOutput` regexes in deploy.ts. SEAM: see deploy.ts header for the expected format.", {
|
|
161
|
+
stdout: result.stdout,
|
|
162
|
+
stderr: result.stderr
|
|
163
|
+
}));
|
|
164
|
+
return parsed;
|
|
165
|
+
}).pipe(Effect.withSpan("devstack.plugin.walrus.deploy.oneShot", { attributes: {
|
|
166
|
+
"walrus.committeeSize": inputs.committeeSize,
|
|
167
|
+
"walrus.shards": inputs.shards
|
|
168
|
+
} }), Effect.timeoutOrElse({
|
|
169
|
+
duration: Duration.millis(DEPLOY_TIMEOUT_MS + 5e3),
|
|
170
|
+
orElse: () => Effect.fail(walrusPluginError("deploy", `walrus deploy: outer timeout ${DEPLOY_TIMEOUT_MS}ms exceeded`))
|
|
171
|
+
}));
|
|
172
|
+
/** Compose the ArtifactSpec for a walrus deploy and dispatch
|
|
173
|
+
* through the substrate primitive. The publisher handles the full
|
|
174
|
+
* cache/verify/produce/register loop.
|
|
175
|
+
*
|
|
176
|
+
* Produce: real wiring — `runDeployOneShot` runs
|
|
177
|
+
* `docker run --rm walrusImage deploy …` and parses the deploy stdout.
|
|
178
|
+
*
|
|
179
|
+
* Verify-hit projection: the artifact publisher primitive returns the cached
|
|
180
|
+
* `Produced` payload after verify succeeds, so callers keep the full
|
|
181
|
+
* `CachedDeployState` shape across warm restarts. */
|
|
182
|
+
const deployWalrusContracts = (publisher, probe, runtime, inputs) => Effect.gen(function* () {
|
|
183
|
+
const verified = yield* publisher.publish({
|
|
184
|
+
namespace: "walrus-deploy",
|
|
185
|
+
chain: inputs.chainId,
|
|
186
|
+
contentHash: inputs.contentHash,
|
|
187
|
+
verifySchema: WalrusDeployVerifyShape,
|
|
188
|
+
verify: (cached) => Effect.gen(function* () {
|
|
189
|
+
if (!(yield* deployOutputFilesComplete(inputs))) return null;
|
|
190
|
+
const system = yield* probe.get({
|
|
191
|
+
kind: "object",
|
|
192
|
+
objectId: cached.systemObject
|
|
193
|
+
}, SuiObjectExistsShape, "lenient");
|
|
194
|
+
if (system === null) return null;
|
|
195
|
+
const staking = yield* probe.get({
|
|
196
|
+
kind: "object",
|
|
197
|
+
objectId: cached.stakingObject
|
|
198
|
+
}, SuiObjectExistsShape, "lenient");
|
|
199
|
+
if (staking === null) return null;
|
|
200
|
+
return {
|
|
201
|
+
systemObjectId: system.objectId,
|
|
202
|
+
stakingObjectId: staking.objectId
|
|
203
|
+
};
|
|
204
|
+
}).pipe(Effect.catch(() => Effect.succeed(null))),
|
|
205
|
+
produce: runDeployOneShot(runtime, inputs).pipe(Effect.mapError((err) => ({
|
|
206
|
+
_tag: "ArtifactPublishError",
|
|
207
|
+
reason: "produce-failed",
|
|
208
|
+
detail: `walrus.deploy ${err.phase}: ${err.message}`
|
|
209
|
+
}))),
|
|
210
|
+
register: () => Effect.void
|
|
211
|
+
});
|
|
212
|
+
return { state: "walrusPackageId" in verified ? verified : {
|
|
213
|
+
walrusPackageId: "<cache-hit-not-rehydrated>",
|
|
214
|
+
systemObject: verified.systemObjectId,
|
|
215
|
+
stakingObject: verified.stakingObjectId
|
|
216
|
+
} };
|
|
217
|
+
}).pipe(Effect.withSpan("devstack.plugin.walrus.deploy", { attributes: {
|
|
218
|
+
"walrus.name": inputs.walrusName,
|
|
219
|
+
"walrus.chain": inputs.chainId
|
|
220
|
+
} }));
|
|
221
|
+
//#endregion
|
|
222
|
+
export { deployWalrusContracts };
|
|
223
|
+
|
|
224
|
+
//# sourceMappingURL=deploy.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy.mjs","names":[],"sources":["../../../src/plugins/walrus/deploy.ts"],"sourcesContent":["// Walrus deploy one-shot — Move publish via ArtifactPublisher.\n//\n// Distilled-doc reference (06-walrus.md §\"Lifecycle phase 2\"):\n// the `walrus-deploy` one-shot:\n// - publishes the Walrus Move package on the local sui chain,\n// - mints a WAL exchange,\n// - emits per-node config files (`dryrun-node-<i>.yaml`,\n// `dryrun-node-<i>.keystore`) under `runtime/walrus/<name>/deploy/`.\n//\n// We route this through the substrate's `ArtifactPublisher`\n// primitive (architecture §10 — \"callable from any plugin; no\n// plugin-side contract to implement\"). The publisher owns:\n// - cache key derivation (folds `chainId`),\n// - verify probe (lenient — re-derives on transient RPC failure),\n// - produce-on-miss (runs `walrus-deploy`),\n// - register-on-every-cycle (so downstream consumers always see\n// the resolved state).\n//\n// Distilled-doc invariants honored here:\n// - 5: cache key folds `chainId`.\n// - 6: verify checks BOTH the on-disk `deploy` file AND on-chain\n// object existence (system + staking). Either failure\n// invalidates and re-deploys.\n// - 7: `runtime/walrus/<name>/deploy/` rides the snapshot tar\n// (declared via `Snapshotable.subtrees` in `snapshot.ts`).\n// - 10: deploy summary must contain `package_id` + `system_object`\n// + `staking_object`. We surface parse failure as\n// `WalrusPluginError{phase: 'deploy'}` (the publisher's\n// `produce-failed` reason).\n\nimport { Duration, Effect, Schema, type Scope } from 'effect';\nimport { access, mkdir, writeFile } from 'node:fs/promises';\nimport { join } from 'node:path';\n\nimport type { ContainerRuntime, ImageRef } from '../../contracts/container-runtime.ts';\nimport type {\n\tArtifactPublishError,\n\tArtifactPublisher,\n} from '../../primitives/artifact-publisher.ts';\nimport type { ChainProbe } from '../../contracts/chain-probe.ts';\nimport type { ChainId, ContentHash } from '../../substrate/brand.ts';\nimport type { SuiProbeKey } from '../sui/chain-probe.ts';\nimport { walrusDeployMountPaths } from './deploy-paths.ts';\nimport { walrusPluginError, type WalrusPluginError } from './errors.ts';\n\n/** Cache-stored payload — what verify re-confirms on every cycle.\n * Mirrors the v3 `CachedDeployState` shape (06-walrus.md §\"State-\n * store entries\"). */\nexport interface CachedDeployState {\n\treadonly walrusPackageId: string;\n\treadonly systemObject: string;\n\treadonly stakingObject: string;\n\treadonly upgradeManagerObject?: string;\n\treadonly treasuryObject?: string;\n\treadonly exchangeObject?: string;\n}\n\n/** Verify-schema: the publisher decodes the cached id's on-chain\n * object through this. Minimal — the substrate's `ChainProbe`\n * decodes against this; any decode failure surfaces structured.\n * Distilled-doc invariant 8: the probe MUST consume a stable\n * identifier (the object id), NOT a derived hash. */\nexport const WalrusDeployVerifyShape = Schema.Struct({\n\tsystemObjectId: Schema.String,\n\tstakingObjectId: Schema.String,\n});\nexport type WalrusDeployVerified = Schema.Schema.Type<typeof WalrusDeployVerifyShape>;\n\nconst SuiObjectExistsShape = Schema.Struct({\n\tobjectId: Schema.String,\n});\n\nconst requiredDeployOutputFiles = (inputs: DeployInputs): ReadonlyArray<string> => [\n\tjoin(inputs.outputDirHostPath, 'deploy'),\n\t...Array.from({ length: inputs.committeeSize }, (_, nodeIndex) => [\n\t\tjoin(inputs.outputDirHostPath, `dryrun-node-${nodeIndex}.yaml`),\n\t\tjoin(inputs.outputDirHostPath, `dryrun-node-${nodeIndex}-sui.yaml`),\n\t\tjoin(inputs.outputDirHostPath, `dryrun-node-${nodeIndex}.keystore`),\n\t]).flat(),\n];\n\nconst deployOutputFilesComplete = (\n\tinputs: DeployInputs,\n): Effect.Effect<boolean, WalrusPluginError> =>\n\tEffect.tryPromise({\n\t\ttry: async () => {\n\t\t\tawait Promise.all(requiredDeployOutputFiles(inputs).map((file) => access(file)));\n\t\t\treturn true;\n\t\t},\n\t\tcatch: (cause) =>\n\t\t\twalrusPluginError(\n\t\t\t\t'deploy',\n\t\t\t\t`walrus deploy cache is missing local output files under ${inputs.outputDirHostPath}`,\n\t\t\t\t{ cause },\n\t\t\t),\n\t}).pipe(Effect.catch(() => Effect.succeed(false)));\n\n/** Inputs to one deploy round. */\nexport interface DeployInputs {\n\treadonly walrusName: string;\n\treadonly chainId: ChainId;\n\treadonly contentHash: ContentHash;\n\t/** Pre-derived host output dir — substrate's `servicePath('walrus',\n\t * name, 'deploy')` equivalent. Persists across teardown\n\t * (distilled-doc §\"What survives teardown\"). */\n\treadonly outputDirHostPath: string;\n\treadonly suiRpcUrlInNetwork: string;\n\treadonly walrusFaucetUrlInNetwork: string;\n\treadonly committeeSize: number;\n\treadonly shards: number;\n\treadonly epochDuration: string;\n\treadonly publicHostsCsv: string;\n\treadonly listeningIpsCsv: string;\n\t/** Wrapper image — the cargo-built walrus image (bootstrap asset).\n\t * The deploy one-shot is `docker run --rm <image> deploy …`. */\n\treadonly walrusImage: ImageRef;\n\t/** Docker network the deploy one-shot attaches to, so its in-network\n\t * Sui RPC + faucet hostnames resolve. */\n\treadonly suiNetworkName: string;\n\t/** Centralized Sui funding readiness gate. Local Sui exposes this so\n\t * callers don't race the faucet's socket-ready / funds-ready gap. */\n\treadonly waitForFundsReady?: Effect.Effect<void, unknown>;\n}\n\n/** Default deploy one-shot timeout. Walrus genesis publish runs the\n * Move publish + WAL exchange creation + per-node config emission;\n * observed wall-clock is 30-60s. 5-minute ceiling absorbs cold-cache\n * + slow CI runners. */\nconst DEPLOY_TIMEOUT_MS = 5 * 60_000;\nconst DEPLOY_BIND_SOURCE_RETRY_ATTEMPTS = 10;\nconst DEPLOY_BIND_SOURCE_RETRY_DELAY_MS = 500;\n\nconst ensureDeployOutputDir = (inputs: DeployInputs): Effect.Effect<void, WalrusPluginError> =>\n\tEffect.tryPromise({\n\t\ttry: async () => {\n\t\t\tawait mkdir(inputs.outputDirHostPath, { recursive: true });\n\t\t\tawait writeFile(\n\t\t\t\tjoin(inputs.outputDirHostPath, '.devstack-bind-source'),\n\t\t\t\t'devstack walrus bind source\\n',\n\t\t\t\t'utf8',\n\t\t\t);\n\t\t},\n\t\tcatch: (cause) =>\n\t\t\twalrusPluginError(\n\t\t\t\t'deploy',\n\t\t\t\t`walrus deploy failed to prepare output directory ${inputs.outputDirHostPath}`,\n\t\t\t\t{ cause },\n\t\t\t),\n\t});\n\nconst hostBindMountOwner = (): string | undefined => {\n\tconst process = (\n\t\tglobalThis as {\n\t\t\tprocess?: { getuid?: () => number; getgid?: () => number };\n\t\t}\n\t).process;\n\tif (typeof process?.getuid !== 'function' || typeof process.getgid !== 'function') {\n\t\treturn undefined;\n\t}\n\treturn `${process.getuid()}:${process.getgid()}`;\n};\n\nconst excerpt = (label: string, value: string): string => {\n\tconst trimmed = value.trim();\n\tif (trimmed.length === 0) return '';\n\tconst max = 2_400;\n\tconst body =\n\t\ttrimmed.length > max\n\t\t\t? `${trimmed.slice(0, 1_100)}...<truncated ${trimmed.length - 2_200} chars>...${trimmed.slice(-1_100)}`\n\t\t\t: trimmed;\n\treturn ` ${label}=${JSON.stringify(body)}`;\n};\n\nconst deployExitDetail = (\n\tresult: { readonly exitCode: number; readonly stdout: string; readonly stderr: string },\n\tinputs: DeployInputs,\n): string => {\n\tconst missingCommandHint =\n\t\tresult.exitCode === 127\n\t\t\t? ' exit 127 usually means the deploy image is missing walrus-deploy or an entrypoint command.'\n\t\t\t: '';\n\treturn (\n\t\t`walrus deploy exited with code ${result.exitCode}.` +\n\t\tmissingCommandHint +\n\t\t` outputDir=${inputs.outputDirHostPath} committee=${inputs.committeeSize} shards=${inputs.shards}` +\n\t\texcerpt('stdout', result.stdout) +\n\t\texcerpt('stderr', result.stderr)\n\t);\n};\n\nconst isBindSourceMissing = (result: {\n\treadonly exitCode: number;\n\treadonly stderr: string;\n}): boolean =>\n\tresult.exitCode === 125 &&\n\t/bind source path does not exist/i.test(result.stderr) &&\n\t/invalid mount config/i.test(result.stderr);\n\nconst stringifyCause = (cause: unknown): string => {\n\tif (cause instanceof Error) return cause.message;\n\tif (typeof cause === 'string') return cause;\n\ttry {\n\t\treturn JSON.stringify(cause);\n\t} catch {\n\t\treturn String(cause);\n\t}\n};\n\n/** Parse the walrus deploy output into a `CachedDeployState`.\n *\n * Expected output format (best-effort match against the v3 reference's\n * deploy stdout — the walrus binary's exact format may drift between\n * versions):\n *\n * walrus_package_id: 0x<hex>\n * system_object: 0x<hex>\n * staking_object: 0x<hex>\n * upgrade_manager_object: 0x<hex> (optional)\n * treasury_object: 0x<hex> (optional)\n * exchange_object: 0x<hex> (optional)\n *\n * Returns the parsed state OR a typed `WalrusPluginError('deploy')`\n * surfaced with stdout/stderr capture for debugging. */\nexport const parseDeployOutput = (stdout: string): CachedDeployState | null => {\n\t// Match `key: value` (or `key = value`) lines; treat `None` as\n\t// \"absent\" per the upstream walrus-deploy output convention. The\n\t// pattern is permissive on the value (`\\S+`) — walrus-deploy\n\t// versions have varied on the exact hex format, and the substrate's\n\t// downstream `ChainProbe` re-validates the id shape anyway.\n\tconst pick = (k: string): string | undefined => {\n\t\tconst re = new RegExp(`(?:^|\\\\n)\\\\s*${k}\\\\s*[:=]\\\\s*(\\\\S+)`);\n\t\tconst m = re.exec(stdout);\n\t\tconst v = m?.[1];\n\t\tif (v === undefined || v === 'None') return undefined;\n\t\treturn v;\n\t};\n\tconst walrusPackageId = pick('walrus_package_id') ?? pick('package_id');\n\tconst systemObject = pick('system_object') ?? pick('system_object_id');\n\tconst stakingObject =\n\t\tpick('staking_object') ?? pick('staking_pool_id') ?? pick('staking_object_id');\n\tif (!walrusPackageId || !systemObject || !stakingObject) return null;\n\treturn {\n\t\twalrusPackageId,\n\t\tsystemObject,\n\t\tstakingObject,\n\t\tupgradeManagerObject: pick('upgrade_manager_object'),\n\t\ttreasuryObject: pick('treasury_object'),\n\t\texchangeObject: pick('exchange_object'),\n\t};\n};\n\n/** Run the walrus-deploy one-shot and parse the output.\n *\n * Implementation:\n * 1. `runtime.runOneShot({ image, argv: ['deploy', ...] })` —\n * fresh `docker run --rm` container. Mount the host output dir\n * at `/opt/walrus/outputs` so the per-node config files persist.\n * 2. Parse stdout for the deploy summary.\n * 3. Surface non-zero exits + parse failures as\n * `WalrusPluginError('deploy')` with stdout/stderr capture. */\nexport const runDeployOneShot = (\n\truntime: ContainerRuntime,\n\tinputs: DeployInputs,\n): Effect.Effect<CachedDeployState, WalrusPluginError, Scope.Scope> =>\n\tEffect.gen(function* () {\n\t\tif (inputs.waitForFundsReady !== undefined) {\n\t\t\tyield* inputs.waitForFundsReady.pipe(\n\t\t\t\tEffect.mapError((cause) =>\n\t\t\t\t\twalrusPluginError(\n\t\t\t\t\t\t'deploy',\n\t\t\t\t\t\t`walrus deploy funding gate failed before walrus-deploy: ${stringifyCause(cause)}`,\n\t\t\t\t\t\t{ cause },\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t\tyield* ensureDeployOutputDir(inputs);\n\n\t\tconst outputOwner = hostBindMountOwner();\n\t\tconst outputMount = walrusDeployMountPaths(inputs.outputDirHostPath, '/opt/walrus/runtime');\n\t\tconst argv: ReadonlyArray<string> = [\n\t\t\t'deploy',\n\t\t\t'--output-dir',\n\t\t\toutputMount.outputDirInContainer,\n\t\t\t'--committee-size',\n\t\t\tString(inputs.committeeSize),\n\t\t\t'--shards',\n\t\t\tString(inputs.shards),\n\t\t\t'--epoch-duration',\n\t\t\tinputs.epochDuration,\n\t\t\t'--sui-rpc-url',\n\t\t\tinputs.suiRpcUrlInNetwork,\n\t\t\t'--faucet-url',\n\t\t\tinputs.walrusFaucetUrlInNetwork,\n\t\t\t'--public-hosts',\n\t\t\tinputs.publicHostsCsv,\n\t\t\t'--listening-ips',\n\t\t\tinputs.listeningIpsCsv,\n\t\t];\n\n\t\tconst runAttempt = () =>\n\t\t\truntime\n\t\t\t\t.runOneShot({\n\t\t\t\t\timage: inputs.walrusImage,\n\t\t\t\t\targv,\n\t\t\t\t\tmounts: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tsource: outputMount.sourceHostPath,\n\t\t\t\t\t\t\ttarget: outputMount.mountTarget,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t...(outputOwner === undefined ? {} : { env: { DEVSTACK_HOST_UID_GID: outputOwner } }),\n\t\t\t\t\tnetwork: inputs.suiNetworkName,\n\t\t\t\t\t// Same `host-gateway` rationale as storage-nodes.ts —\n\t\t\t\t\t// deploy one-shot dials sui's host-bound RPC + faucet via\n\t\t\t\t\t// `host.docker.internal`. Native Linux Docker needs the\n\t\t\t\t\t// explicit mapping; Docker Desktop is a no-op.\n\t\t\t\t\textraHosts: { 'host.docker.internal': 'host-gateway' },\n\t\t\t\t\ttimeoutMillis: DEPLOY_TIMEOUT_MS,\n\t\t\t\t})\n\t\t\t\t.pipe(\n\t\t\t\t\tEffect.catch((cause) =>\n\t\t\t\t\t\tEffect.fail(\n\t\t\t\t\t\t\twalrusPluginError(\n\t\t\t\t\t\t\t\t'deploy',\n\t\t\t\t\t\t\t\t`walrus deploy one-shot failed: ${cause.reason}: ${cause.detail}`,\n\t\t\t\t\t\t\t\t{ cause },\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t);\n\n\t\tlet result: { readonly exitCode: number; readonly stdout: string; readonly stderr: string };\n\t\tfor (let attempt = 0; ; attempt += 1) {\n\t\t\tresult = yield* runAttempt();\n\t\t\tif (!isBindSourceMissing(result) || attempt >= DEPLOY_BIND_SOURCE_RETRY_ATTEMPTS) break;\n\t\t\tyield* ensureDeployOutputDir(inputs);\n\t\t\tyield* Effect.sleep(Duration.millis(DEPLOY_BIND_SOURCE_RETRY_DELAY_MS));\n\t\t}\n\n\t\tif (result.exitCode !== 0) {\n\t\t\treturn yield* Effect.fail(\n\t\t\t\twalrusPluginError('deploy', deployExitDetail(result, inputs), {\n\t\t\t\t\texitCode: result.exitCode,\n\t\t\t\t\tstdout: result.stdout,\n\t\t\t\t\tstderr: result.stderr,\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\n\t\tconst parsed = parseDeployOutput(result.stdout);\n\t\tif (!parsed) {\n\t\t\treturn yield* Effect.fail(\n\t\t\t\twalrusPluginError(\n\t\t\t\t\t'deploy',\n\t\t\t\t\t`walrus deploy: parser could not find walrus_package_id / system_object / staking_object ` +\n\t\t\t\t\t\t`in deploy output. Confirm the walrus binary's output format and adjust ` +\n\t\t\t\t\t\t`\\`parseDeployOutput\\` regexes in deploy.ts. ` +\n\t\t\t\t\t\t`SEAM: see deploy.ts header for the expected format.`,\n\t\t\t\t\t{ stdout: result.stdout, stderr: result.stderr },\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t\treturn parsed;\n\t}).pipe(\n\t\tEffect.withSpan('devstack.plugin.walrus.deploy.oneShot', {\n\t\t\tattributes: { 'walrus.committeeSize': inputs.committeeSize, 'walrus.shards': inputs.shards },\n\t\t}),\n\t\tEffect.timeoutOrElse({\n\t\t\tduration: Duration.millis(DEPLOY_TIMEOUT_MS + 5_000),\n\t\t\torElse: () =>\n\t\t\t\tEffect.fail(\n\t\t\t\t\twalrusPluginError(\n\t\t\t\t\t\t'deploy',\n\t\t\t\t\t\t`walrus deploy: outer timeout ${DEPLOY_TIMEOUT_MS}ms exceeded`,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t}),\n\t);\n\n/** Outputs of one deploy round — surfaced to the plugin's\n * resolved value. */\nexport interface DeployOutputs {\n\treadonly state: CachedDeployState;\n}\n\n/** Compose the ArtifactSpec for a walrus deploy and dispatch\n * through the substrate primitive. The publisher handles the full\n * cache/verify/produce/register loop.\n *\n * Produce: real wiring — `runDeployOneShot` runs\n * `docker run --rm walrusImage deploy …` and parses the deploy stdout.\n *\n * Verify-hit projection: the artifact publisher primitive returns the cached\n * `Produced` payload after verify succeeds, so callers keep the full\n * `CachedDeployState` shape across warm restarts. */\nexport const deployWalrusContracts = (\n\tpublisher: ArtifactPublisher,\n\tprobe: ChainProbe<SuiProbeKey>,\n\truntime: ContainerRuntime,\n\tinputs: DeployInputs,\n): Effect.Effect<DeployOutputs, WalrusPluginError | ArtifactPublishError, Scope.Scope> =>\n\tEffect.gen(function* () {\n\t\tconst verified = yield* publisher.publish<CachedDeployState, WalrusDeployVerified>({\n\t\t\tnamespace: 'walrus-deploy',\n\t\t\tchain: inputs.chainId,\n\t\t\tcontentHash: inputs.contentHash,\n\t\t\tverifySchema: WalrusDeployVerifyShape,\n\t\t\t// Verify: lenient probes of the cached system + staking\n\t\t\t// objects. The Sui chain probe decodes raw `getObject`\n\t\t\t// responses, so the probe schema matches that envelope and\n\t\t\t// this closure returns the compact verified shape.\n\t\t\tverify: (cached) =>\n\t\t\t\tEffect.gen(function* () {\n\t\t\t\t\tif (!(yield* deployOutputFilesComplete(inputs))) return null;\n\n\t\t\t\t\tconst system = yield* probe.get(\n\t\t\t\t\t\t{ kind: 'object', objectId: cached.systemObject },\n\t\t\t\t\t\tSuiObjectExistsShape,\n\t\t\t\t\t\t'lenient',\n\t\t\t\t\t);\n\t\t\t\t\tif (system === null) return null;\n\n\t\t\t\t\tconst staking = yield* probe.get(\n\t\t\t\t\t\t{ kind: 'object', objectId: cached.stakingObject },\n\t\t\t\t\t\tSuiObjectExistsShape,\n\t\t\t\t\t\t'lenient',\n\t\t\t\t\t);\n\t\t\t\t\tif (staking === null) return null;\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\tsystemObjectId: system.objectId,\n\t\t\t\t\t\tstakingObjectId: staking.objectId,\n\t\t\t\t\t} satisfies WalrusDeployVerified;\n\t\t\t\t}).pipe(Effect.catch(() => Effect.succeed(null as WalrusDeployVerified | null))),\n\t\t\t// Produce: real walrus-deploy one-shot.\n\t\t\tproduce: runDeployOneShot(runtime, inputs).pipe(\n\t\t\t\tEffect.mapError(\n\t\t\t\t\t(err): ArtifactPublishError => ({\n\t\t\t\t\t\t_tag: 'ArtifactPublishError',\n\t\t\t\t\t\treason: 'produce-failed',\n\t\t\t\t\t\tdetail: `walrus.deploy ${err.phase}: ${err.message}`,\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t),\n\t\t\t// Register: fires on EVERY cycle. The plugin's outer body\n\t\t\t// performs the walrus-state / endpoint / package registry\n\t\t\t// publishes after both deploy + storage-nodes are up; this\n\t\t\t// closure is the publisher-side null-op so the substrate\n\t\t\t// satisfies its Invariant-6 contract.\n\t\t\tregister: () => Effect.void,\n\t\t});\n\n\t\t// Project Produced ∪ Verified onto CachedDeployState. artifact publisher returns\n\t\t// the cached Produced payload on verify-hit, but keep a defensive\n\t\t// projection for custom publisher implementations in tests.\n\t\tconst state: CachedDeployState =\n\t\t\t'walrusPackageId' in verified\n\t\t\t\t? verified\n\t\t\t\t: {\n\t\t\t\t\t\t// Verify-hit path: synthesize from the cached id's.\n\t\t\t\t\t\t// The richer fields (packageId, exchange etc.) live\n\t\t\t\t\t\t// in the on-disk artifact publisher cache; downstream consumers\n\t\t\t\t\t\t// surface them through the in-process registry. The\n\t\t\t\t\t\t// artifact publisher primitive's next API revision will hand the\n\t\t\t\t\t\t// full Produced payload back here directly —\n\t\t\t\t\t\t// architecture revision tracked in the file header.\n\t\t\t\t\t\twalrusPackageId: '<cache-hit-not-rehydrated>',\n\t\t\t\t\t\tsystemObject: verified.systemObjectId,\n\t\t\t\t\t\tstakingObject: verified.stakingObjectId,\n\t\t\t\t\t};\n\n\t\treturn { state };\n\t}).pipe(\n\t\tEffect.withSpan('devstack.plugin.walrus.deploy', {\n\t\t\tattributes: { 'walrus.name': inputs.walrusName, 'walrus.chain': inputs.chainId },\n\t\t}),\n\t);\n"],"mappings":";;;;;;;;;;;AA8DA,MAAa,0BAA0B,OAAO,OAAO;CACpD,gBAAgB,OAAO;CACvB,iBAAiB,OAAO;CACxB,CAAC;AAGF,MAAM,uBAAuB,OAAO,OAAO,EAC1C,UAAU,OAAO,QACjB,CAAC;AAEF,MAAM,6BAA6B,WAAgD,CAClF,KAAK,OAAO,mBAAmB,SAAS,EACxC,GAAG,MAAM,KAAK,EAAE,QAAQ,OAAO,eAAe,GAAG,GAAG,cAAc;CACjE,KAAK,OAAO,mBAAmB,eAAe,UAAU,OAAO;CAC/D,KAAK,OAAO,mBAAmB,eAAe,UAAU,WAAW;CACnE,KAAK,OAAO,mBAAmB,eAAe,UAAU,WAAW;CACnE,CAAC,CAAC,MAAM,CACT;AAED,MAAM,6BACL,WAEA,OAAO,WAAW;CACjB,KAAK,YAAY;AAChB,QAAM,QAAQ,IAAI,0BAA0B,OAAO,CAAC,KAAK,SAAS,OAAO,KAAK,CAAC,CAAC;AAChF,SAAO;;CAER,QAAQ,UACP,kBACC,UACA,2DAA2D,OAAO,qBAClE,EAAE,OAAO,CACT;CACF,CAAC,CAAC,KAAK,OAAO,YAAY,OAAO,QAAQ,MAAM,CAAC,CAAC;;;;;AAiCnD,MAAM,oBAAoB,IAAI;AAC9B,MAAM,oCAAoC;AAC1C,MAAM,oCAAoC;AAE1C,MAAM,yBAAyB,WAC9B,OAAO,WAAW;CACjB,KAAK,YAAY;AAChB,QAAM,MAAM,OAAO,mBAAmB,EAAE,WAAW,MAAM,CAAC;AAC1D,QAAM,UACL,KAAK,OAAO,mBAAmB,wBAAwB,EACvD,iCACA,OACA;;CAEF,QAAQ,UACP,kBACC,UACA,oDAAoD,OAAO,qBAC3D,EAAE,OAAO,CACT;CACF,CAAC;AAEH,MAAM,2BAA+C;CACpD,MAAM,UACL,WAGC;AACF,KAAI,OAAO,SAAS,WAAW,cAAc,OAAO,QAAQ,WAAW,WACtE;AAED,QAAO,GAAG,QAAQ,QAAQ,CAAC,GAAG,QAAQ,QAAQ;;AAG/C,MAAM,WAAW,OAAe,UAA0B;CACzD,MAAM,UAAU,MAAM,MAAM;AAC5B,KAAI,QAAQ,WAAW,EAAG,QAAO;CAEjC,MAAM,OACL,QAAQ,SAAS,OACd,GAAG,QAAQ,MAAM,GAAG,KAAM,CAAC,gBAAgB,QAAQ,SAAS,KAAM,YAAY,QAAQ,MAAM,MAAO,KACnG;AACJ,QAAO,IAAI,MAAM,GAAG,KAAK,UAAU,KAAK;;AAGzC,MAAM,oBACL,QACA,WACY;CACZ,MAAM,qBACL,OAAO,aAAa,MACjB,gGACA;AACJ,QACC,kCAAkC,OAAO,SAAS,KAClD,qBACA,cAAc,OAAO,kBAAkB,aAAa,OAAO,cAAc,UAAU,OAAO,WAC1F,QAAQ,UAAU,OAAO,OAAO,GAChC,QAAQ,UAAU,OAAO,OAAO;;AAIlC,MAAM,uBAAuB,WAI5B,OAAO,aAAa,OACpB,mCAAmC,KAAK,OAAO,OAAO,IACtD,wBAAwB,KAAK,OAAO,OAAO;AAE5C,MAAM,kBAAkB,UAA2B;AAClD,KAAI,iBAAiB,MAAO,QAAO,MAAM;AACzC,KAAI,OAAO,UAAU,SAAU,QAAO;AACtC,KAAI;AACH,SAAO,KAAK,UAAU,MAAM;SACrB;AACP,SAAO,OAAO,MAAM;;;;;;;;;;;;;;;;;;AAmBtB,MAAa,qBAAqB,WAA6C;CAM9E,MAAM,QAAQ,MAAkC;EAG/C,MAAM,IADI,IADK,OAAO,gBAAgB,EAAE,oBAC5B,CAAC,KAAK,OACP,GAAG;AACd,MAAI,MAAM,KAAA,KAAa,MAAM,OAAQ,QAAO,KAAA;AAC5C,SAAO;;CAER,MAAM,kBAAkB,KAAK,oBAAoB,IAAI,KAAK,aAAa;CACvE,MAAM,eAAe,KAAK,gBAAgB,IAAI,KAAK,mBAAmB;CACtE,MAAM,gBACL,KAAK,iBAAiB,IAAI,KAAK,kBAAkB,IAAI,KAAK,oBAAoB;AAC/E,KAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,cAAe,QAAO;AAChE,QAAO;EACN;EACA;EACA;EACA,sBAAsB,KAAK,yBAAyB;EACpD,gBAAgB,KAAK,kBAAkB;EACvC,gBAAgB,KAAK,kBAAkB;EACvC;;;;;;;;;;;AAYF,MAAa,oBACZ,SACA,WAEA,OAAO,IAAI,aAAa;AACvB,KAAI,OAAO,sBAAsB,KAAA,EAChC,QAAO,OAAO,kBAAkB,KAC/B,OAAO,UAAU,UAChB,kBACC,UACA,2DAA2D,eAAe,MAAM,IAChF,EAAE,OAAO,CACT,CACD,CACD;AAEF,QAAO,sBAAsB,OAAO;CAEpC,MAAM,cAAc,oBAAoB;CACxC,MAAM,cAAc,uBAAuB,OAAO,mBAAmB,sBAAsB;CAC3F,MAAM,OAA8B;EACnC;EACA;EACA,YAAY;EACZ;EACA,OAAO,OAAO,cAAc;EAC5B;EACA,OAAO,OAAO,OAAO;EACrB;EACA,OAAO;EACP;EACA,OAAO;EACP;EACA,OAAO;EACP;EACA,OAAO;EACP;EACA,OAAO;EACP;CAED,MAAM,mBACL,QACE,WAAW;EACX,OAAO,OAAO;EACd;EACA,QAAQ,CACP;GACC,QAAQ,YAAY;GACpB,QAAQ,YAAY;GACpB,CACD;EACD,GAAI,gBAAgB,KAAA,IAAY,EAAE,GAAG,EAAE,KAAK,EAAE,uBAAuB,aAAa,EAAE;EACpF,SAAS,OAAO;EAKhB,YAAY,EAAE,wBAAwB,gBAAgB;EACtD,eAAe;EACf,CAAC,CACD,KACA,OAAO,OAAO,UACb,OAAO,KACN,kBACC,UACA,kCAAkC,MAAM,OAAO,IAAI,MAAM,UACzD,EAAE,OAAO,CACT,CACD,CACD,CACD;CAEH,IAAI;AACJ,MAAK,IAAI,UAAU,IAAK,WAAW,GAAG;AACrC,WAAS,OAAO,YAAY;AAC5B,MAAI,CAAC,oBAAoB,OAAO,IAAI,WAAW,kCAAmC;AAClF,SAAO,sBAAsB,OAAO;AACpC,SAAO,OAAO,MAAM,SAAS,OAAO,kCAAkC,CAAC;;AAGxE,KAAI,OAAO,aAAa,EACvB,QAAO,OAAO,OAAO,KACpB,kBAAkB,UAAU,iBAAiB,QAAQ,OAAO,EAAE;EAC7D,UAAU,OAAO;EACjB,QAAQ,OAAO;EACf,QAAQ,OAAO;EACf,CAAC,CACF;CAGF,MAAM,SAAS,kBAAkB,OAAO,OAAO;AAC/C,KAAI,CAAC,OACJ,QAAO,OAAO,OAAO,KACpB,kBACC,UACA,gQAIA;EAAE,QAAQ,OAAO;EAAQ,QAAQ,OAAO;EAAQ,CAChD,CACD;AAEF,QAAO;EACN,CAAC,KACF,OAAO,SAAS,yCAAyC,EACxD,YAAY;CAAE,wBAAwB,OAAO;CAAe,iBAAiB,OAAO;CAAQ,EAC5F,CAAC,EACF,OAAO,cAAc;CACpB,UAAU,SAAS,OAAO,oBAAoB,IAAM;CACpD,cACC,OAAO,KACN,kBACC,UACA,gCAAgC,kBAAkB,aAClD,CACD;CACF,CAAC,CACF;;;;;;;;;;;AAkBF,MAAa,yBACZ,WACA,OACA,SACA,WAEA,OAAO,IAAI,aAAa;CACvB,MAAM,WAAW,OAAO,UAAU,QAAiD;EAClF,WAAW;EACX,OAAO,OAAO;EACd,aAAa,OAAO;EACpB,cAAc;EAKd,SAAS,WACR,OAAO,IAAI,aAAa;AACvB,OAAI,EAAE,OAAO,0BAA0B,OAAO,EAAG,QAAO;GAExD,MAAM,SAAS,OAAO,MAAM,IAC3B;IAAE,MAAM;IAAU,UAAU,OAAO;IAAc,EACjD,sBACA,UACA;AACD,OAAI,WAAW,KAAM,QAAO;GAE5B,MAAM,UAAU,OAAO,MAAM,IAC5B;IAAE,MAAM;IAAU,UAAU,OAAO;IAAe,EAClD,sBACA,UACA;AACD,OAAI,YAAY,KAAM,QAAO;AAE7B,UAAO;IACN,gBAAgB,OAAO;IACvB,iBAAiB,QAAQ;IACzB;IACA,CAAC,KAAK,OAAO,YAAY,OAAO,QAAQ,KAAoC,CAAC,CAAC;EAEjF,SAAS,iBAAiB,SAAS,OAAO,CAAC,KAC1C,OAAO,UACL,SAA+B;GAC/B,MAAM;GACN,QAAQ;GACR,QAAQ,iBAAiB,IAAI,MAAM,IAAI,IAAI;GAC3C,EACD,CACD;EAMD,gBAAgB,OAAO;EACvB,CAAC;AAqBF,QAAO,EAAE,OAfR,qBAAqB,WAClB,WACA;EAQA,iBAAiB;EACjB,cAAc,SAAS;EACvB,eAAe,SAAS;EACxB,EAEY;EACf,CAAC,KACF,OAAO,SAAS,iCAAiC,EAChD,YAAY;CAAE,eAAe,OAAO;CAAY,gBAAgB,OAAO;CAAS,EAChF,CAAC,CACF"}
|