@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,38 @@
|
|
|
1
|
+
import { ConfigIssue } from "../../substrate/runtime/config-validation.mjs";
|
|
2
|
+
import { ForkIncompatibleError } from "../../substrate/runtime/mode-errors.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/plugins/walrus/errors.d.ts
|
|
5
|
+
/** Phases for `WalrusError`. Closed sum — keeps the cause-walker's
|
|
6
|
+
* display table small. Matches the closed `WalrusPhases` from the
|
|
7
|
+
* distilled doc §"Cross-component references" except `'network'`
|
|
8
|
+
* is dropped (the substrate's `ContainerRuntime` owns docker network
|
|
9
|
+
* creation now, so its errors surface as `ContainerRuntimeError`
|
|
10
|
+
* upstream — we narrate the *phase* as `'cluster-network'` but the
|
|
11
|
+
* fault tags through the substrate). */
|
|
12
|
+
type WalrusPhase = 'image-build' | 'cluster-network' | 'deploy' | 'exchange' | 'storage-node' | 'proxy' | 'fund-wal' | 'register-known';
|
|
13
|
+
/** Generic Walrus plugin error. Raised by the plugin's acquire
|
|
14
|
+
* body, WAL funding strategy, and the per-mode builders. */
|
|
15
|
+
interface WalrusPluginError {
|
|
16
|
+
readonly _tag: 'WalrusPluginError';
|
|
17
|
+
readonly phase: WalrusPhase;
|
|
18
|
+
readonly message: string;
|
|
19
|
+
readonly cause?: unknown;
|
|
20
|
+
/** Optional sub-process capture envelope — populated for deploy
|
|
21
|
+
* one-shot + per-node container failures. */
|
|
22
|
+
readonly stderr?: string;
|
|
23
|
+
readonly stdout?: string;
|
|
24
|
+
readonly exitCode?: number;
|
|
25
|
+
}
|
|
26
|
+
/** Configuration error — synchronous factory-time guards
|
|
27
|
+
* (`nodeCount >= 1`, `shards >= nodeCount`, missing required
|
|
28
|
+
* fields on `.known(...)`). Surfaces as a thrown `Error` shaped
|
|
29
|
+
* like this in the factory, mirroring the distilled-doc behavior
|
|
30
|
+
* of synchronous configuration faults. */
|
|
31
|
+
interface WalrusConfigError extends ConfigIssue {
|
|
32
|
+
readonly _tag: 'WalrusConfigError';
|
|
33
|
+
}
|
|
34
|
+
/** Union of every error a Walrus-plugin caller may encounter. */
|
|
35
|
+
type WalrusError = WalrusPluginError | ForkIncompatibleError | WalrusConfigError;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { WalrusConfigError, WalrusError, WalrusPhase, WalrusPluginError };
|
|
38
|
+
//# sourceMappingURL=errors.d.mts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { defineConfigError } from "../../substrate/runtime/config-validation.mjs";
|
|
2
|
+
//#region src/plugins/walrus/errors.ts
|
|
3
|
+
const walrusPluginError = (phase, message, parts = {}) => ({
|
|
4
|
+
_tag: "WalrusPluginError",
|
|
5
|
+
phase,
|
|
6
|
+
message,
|
|
7
|
+
...parts
|
|
8
|
+
});
|
|
9
|
+
const makeWalrusConfigError = defineConfigError("WalrusConfigError");
|
|
10
|
+
const walrusConfigError = (field, message, hint, cause) => makeWalrusConfigError({
|
|
11
|
+
field,
|
|
12
|
+
message,
|
|
13
|
+
hint,
|
|
14
|
+
cause
|
|
15
|
+
});
|
|
16
|
+
/** Error tags this plugin contributes — surfaced to the cause
|
|
17
|
+
* walker via `PluginErrorContribution`. */
|
|
18
|
+
const WALRUS_ERROR_TAGS = [
|
|
19
|
+
"WalrusPluginError",
|
|
20
|
+
"ForkIncompatibleError",
|
|
21
|
+
"WalrusConfigError"
|
|
22
|
+
];
|
|
23
|
+
//#endregion
|
|
24
|
+
export { WALRUS_ERROR_TAGS, walrusConfigError, walrusPluginError };
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=errors.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.mjs","names":[],"sources":["../../../src/plugins/walrus/errors.ts"],"sourcesContent":["// Walrus plugin — typed errors.\n//\n// Errors raised and consumed inside the Walrus plugin live here.\n// Cross-service errors that Walrus *consumes* but the substrate\n// raises (e.g. `ArtifactPublishError`) come from the substrate's\n// primitive — we don't redeclare those.\n//\n// `ForkIncompatibleError` is a cross-cutting mode-refusal shape\n// owned by `substrate/runtime/mode-errors.ts`; walrus contributes\n// the `walrusLocalCluster` variant via the factory below.\n//\n// Effect v4: plain interfaces with `_tag` discriminator (per\n// surrounding subsystem style). `Effect.catchTag` matches on `_tag`.\n\nimport { ForkIncompatibleError } from '../../substrate/runtime/mode-errors.ts';\nimport { defineConfigError, type ConfigIssue } from '../../substrate/runtime/config-validation.ts';\n\nexport { ForkIncompatibleError };\n\n/** Phases for `WalrusError`. Closed sum — keeps the cause-walker's\n * display table small. Matches the closed `WalrusPhases` from the\n * distilled doc §\"Cross-component references\" except `'network'`\n * is dropped (the substrate's `ContainerRuntime` owns docker network\n * creation now, so its errors surface as `ContainerRuntimeError`\n * upstream — we narrate the *phase* as `'cluster-network'` but the\n * fault tags through the substrate). */\nexport type WalrusPhase =\n\t| 'image-build'\n\t| 'cluster-network'\n\t| 'deploy'\n\t| 'exchange'\n\t| 'storage-node'\n\t| 'proxy'\n\t| 'fund-wal'\n\t| 'register-known';\n\n/** Generic Walrus plugin error. Raised by the plugin's acquire\n * body, WAL funding strategy, and the per-mode builders. */\nexport interface WalrusPluginError {\n\treadonly _tag: 'WalrusPluginError';\n\treadonly phase: WalrusPhase;\n\treadonly message: string;\n\treadonly cause?: unknown;\n\t/** Optional sub-process capture envelope — populated for deploy\n\t * one-shot + per-node container failures. */\n\treadonly stderr?: string;\n\treadonly stdout?: string;\n\treadonly exitCode?: number;\n}\n\nexport const walrusPluginError = (\n\tphase: WalrusPhase,\n\tmessage: string,\n\tparts: Omit<WalrusPluginError, '_tag' | 'phase' | 'message'> = {},\n): WalrusPluginError => ({ _tag: 'WalrusPluginError', phase, message, ...parts });\n\n/**\n * Synchronous factory-time refusal when the user explicitly composes\n * the local-cluster mode against a fork network.\n *\n * sui-fork doesn't expose JSON-RPC; the local cluster's storage\n * nodes need JSON-RPC against the chain. Letting the supervisor\n * partway through the image build before the nodes fail to dial\n * would be confusing — we refuse synchronously at factory time\n * with an actionable hint pointing at `walrusFor(network).known({...})`.\n *\n * Primary refusal is TYPE-LEVEL via the `walrusFor(network).<mode>`\n * mode-narrowed namespace — fork networks expose only `.known`, so\n * calling `.local` is a compile error. This runtime shape is\n * defense-in-depth for callers that sneak through dynamic dispatch.\n */\nexport const forkIncompatibleError = (network: string): ForkIncompatibleError =>\n\tnew ForkIncompatibleError({\n\t\tvariant: 'walrusLocalCluster',\n\t\tnetwork,\n\t\tmessage: `walrus local-cluster does not support fork networks.`,\n\t\thint:\n\t\t\t`walrus local-cluster requires JSON-RPC, which sui-fork does not expose. ` +\n\t\t\t`Use walrusFor(network).known({...}) instead.`,\n\t});\n\n/** Configuration error — synchronous factory-time guards\n * (`nodeCount >= 1`, `shards >= nodeCount`, missing required\n * fields on `.known(...)`). Surfaces as a thrown `Error` shaped\n * like this in the factory, mirroring the distilled-doc behavior\n * of synchronous configuration faults. */\nexport interface WalrusConfigError extends ConfigIssue {\n\treadonly _tag: 'WalrusConfigError';\n}\n\nconst makeWalrusConfigError = defineConfigError('WalrusConfigError');\n\nexport const walrusConfigError = (\n\tfield: string,\n\tmessage: string,\n\thint?: string,\n\tcause?: unknown,\n): WalrusConfigError => makeWalrusConfigError({ field, message, hint, cause });\n\n/** Union of every error a Walrus-plugin caller may encounter. */\nexport type WalrusError = WalrusPluginError | ForkIncompatibleError | WalrusConfigError;\n\n/** Error tags this plugin contributes — surfaced to the cause\n * walker via `PluginErrorContribution`. */\nexport const WALRUS_ERROR_TAGS: ReadonlyArray<WalrusError['_tag']> = [\n\t'WalrusPluginError',\n\t'ForkIncompatibleError',\n\t'WalrusConfigError',\n] as const;\n"],"mappings":";;AAkDA,MAAa,qBACZ,OACA,SACA,QAA+D,EAAE,MACzC;CAAE,MAAM;CAAqB;CAAO;CAAS,GAAG;CAAO;AAoChF,MAAM,wBAAwB,kBAAkB,oBAAoB;AAEpE,MAAa,qBACZ,OACA,SACA,MACA,UACuB,sBAAsB;CAAE;CAAO;CAAS;CAAM;CAAO,CAAC;;;AAO9E,MAAa,oBAAwD;CACpE;CACA;CACA;CACA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AccountFundingStrategy } from "../account/funding.mjs";
|
|
2
|
+
import { WalrusPluginError } from "./errors.mjs";
|
|
3
|
+
import { Effect } from "effect";
|
|
4
|
+
|
|
5
|
+
//#region src/plugins/walrus/faucet-strategy.d.ts
|
|
6
|
+
/** Faucet strategy value — closed over the WAL exchange's object id.
|
|
7
|
+
* The requesting account signs the swap through the shared account
|
|
8
|
+
* funding pipeline. */
|
|
9
|
+
type WalFaucetStrategy = AccountFundingStrategy<WalrusPluginError>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { WalFaucetStrategy };
|
|
12
|
+
//# sourceMappingURL=faucet-strategy.d.mts.map
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { walrusPluginError } from "./errors.mjs";
|
|
2
|
+
import { swapAccountSuiForWal } from "./wal-swap.mjs";
|
|
3
|
+
import { Effect, Schema } from "effect";
|
|
4
|
+
//#region src/plugins/walrus/faucet-strategy.ts
|
|
5
|
+
/** Full local WAL coin type derived from the deployed Walrus package. */
|
|
6
|
+
const walCoinType = (packageId) => `${packageId}::wal::WAL`;
|
|
7
|
+
/** Resolve the package id that defines `wal::WAL`.
|
|
8
|
+
*
|
|
9
|
+
* The Walrus deploy summary's `package_id` can be the latest upgraded
|
|
10
|
+
* Walrus package, while Sui coin types use the original package id
|
|
11
|
+
* that defines `wal::WAL`. The protected treasury object is the
|
|
12
|
+
* reliable on-chain anchor for that original id. */
|
|
13
|
+
const parseWalCoinTypeFromTreasuryType = (treasuryType) => {
|
|
14
|
+
const protectedTreasury = /^(0x[0-9a-fA-F]+)::wal::ProtectedTreasury$/.exec(treasuryType);
|
|
15
|
+
if (protectedTreasury?.[1] !== void 0) return walCoinType(protectedTreasury[1]);
|
|
16
|
+
const treasuryCap = /^0x(?:0+)?2::coin::TreasuryCap<((0x[0-9a-fA-F]+)::wal::WAL)>$/.exec(treasuryType);
|
|
17
|
+
if (treasuryCap?.[1] !== void 0) return treasuryCap[1];
|
|
18
|
+
return null;
|
|
19
|
+
};
|
|
20
|
+
const walPackageIdFromCoinType = (fullCoinType) => fullCoinType.split("::")[0];
|
|
21
|
+
const WalTreasuryObjectShape = Schema.Struct({
|
|
22
|
+
objectId: Schema.String,
|
|
23
|
+
type: Schema.String
|
|
24
|
+
});
|
|
25
|
+
const resolveWalCoinType = (args) => Effect.gen(function* () {
|
|
26
|
+
if (args.treasuryObjectId === void 0) {
|
|
27
|
+
if (!args.requireTreasuryObject) return walCoinType(args.deployPackageId);
|
|
28
|
+
return yield* Effect.fail(walrusPluginError("exchange", "walrus.exchange: WAL exchange funding requires treasury_object in walrus deploy output so the original WAL coin type can be resolved."));
|
|
29
|
+
}
|
|
30
|
+
const found = yield* args.probe.get({
|
|
31
|
+
kind: "object",
|
|
32
|
+
objectId: args.treasuryObjectId
|
|
33
|
+
}, WalTreasuryObjectShape, "lenient").pipe(Effect.mapError((cause) => walrusPluginError("exchange", `walrus.exchange: failed to resolve WAL treasury object ${args.treasuryObjectId}: ${cause.reason}: ${cause.detail}`, { cause })));
|
|
34
|
+
if (found === null) {
|
|
35
|
+
if (!args.requireTreasuryObject) return walCoinType(args.deployPackageId);
|
|
36
|
+
return yield* Effect.fail(walrusPluginError("exchange", `walrus.exchange: WAL treasury object ${args.treasuryObjectId} was not found; cannot derive the WAL coin type for account funding.`));
|
|
37
|
+
}
|
|
38
|
+
const parsed = parseWalCoinTypeFromTreasuryType(found.type);
|
|
39
|
+
if (parsed !== null) return parsed;
|
|
40
|
+
return yield* Effect.fail(walrusPluginError("exchange", `walrus.exchange: unexpected WAL treasury object type "${found.type}" — expected "<pkg>::wal::ProtectedTreasury" or "0x2::coin::TreasuryCap<<pkg>::wal::WAL>".`));
|
|
41
|
+
});
|
|
42
|
+
/** Capability key for the WAL faucet strategy. */
|
|
43
|
+
const walFaucetStrategyKey = (fullCoinType) => `coinType:${fullCoinType}`;
|
|
44
|
+
/** Build the strategy value.
|
|
45
|
+
*
|
|
46
|
+
* The request amount is the SUI MIST amount to spend on the local
|
|
47
|
+
* exchange for WAL. Account funding skips zero amounts before the
|
|
48
|
+
* strategy is invoked; the guard here keeps direct calls no-op. */
|
|
49
|
+
const makeWalFaucetStrategy = (opts) => ({
|
|
50
|
+
usesAccountSigner: true,
|
|
51
|
+
request: (req) => req.amount <= 0n ? Effect.void : swapAccountSuiForWal({
|
|
52
|
+
account: req.account,
|
|
53
|
+
sdk: opts.sdk,
|
|
54
|
+
exchange: opts.exchange,
|
|
55
|
+
recipientAddress: req.address,
|
|
56
|
+
paymentMist: req.amount
|
|
57
|
+
}).pipe(Effect.asVoid)
|
|
58
|
+
});
|
|
59
|
+
//#endregion
|
|
60
|
+
export { makeWalFaucetStrategy, resolveWalCoinType, walCoinType, walFaucetStrategyKey, walPackageIdFromCoinType };
|
|
61
|
+
|
|
62
|
+
//# sourceMappingURL=faucet-strategy.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"faucet-strategy.mjs","names":[],"sources":["../../../src/plugins/walrus/faucet-strategy.ts"],"sourcesContent":["// Walrus WAL faucet strategy.\n//\n// Distilled-doc reference (06-walrus.md §\"Lifecycle phase 7a\"):\n// when the local cluster has a non-empty `exchange`, walrus registers\n// a WAL exchange strategy on the global strategy registry so any\n// `account('alice', { funding: [{ coin: wal, amount }] })` request\n// gets satisfied via SUI → WAL swap on chain.\n//\n// Architecture (StrategyContributor §7): the faucet registry is\n// `capabilityKey: 'coinType:<fullCoinType>'` (distilled-doc\n// convention shared with the faucet plugin's domain:discriminator\n// pattern). The dispatch site doesn't import this strategy — it\n// looks it up by key.\n//\nimport { Effect, Schema } from 'effect';\n\nimport type { ChainProbe } from '../../contracts/chain-probe.ts';\nimport type { StrategyContributorDecl } from '../../contracts/strategy-contributor.ts';\nimport type { AccountFundingRequest, AccountFundingStrategy } from '../account/index.ts';\nimport { walrusPluginError, type WalrusPluginError } from './errors.ts';\nimport type { WalExchangeProbeKey } from './wal-swap.ts';\nimport { swapAccountSuiForWal, type WalExchangeHandle, type WalSwapSdk } from './wal-swap.ts';\n\n/** Full local WAL coin type derived from the deployed Walrus package. */\nexport const walCoinType = <PackageId extends string>(\n\tpackageId: PackageId,\n): `${PackageId}::wal::WAL` => `${packageId}::wal::WAL` as const;\n\n/** Resolve the package id that defines `wal::WAL`.\n *\n * The Walrus deploy summary's `package_id` can be the latest upgraded\n * Walrus package, while Sui coin types use the original package id\n * that defines `wal::WAL`. The protected treasury object is the\n * reliable on-chain anchor for that original id. */\nexport const parseWalCoinTypeFromTreasuryType = (\n\ttreasuryType: string,\n): `${string}::wal::WAL` | null => {\n\tconst protectedTreasury = /^(0x[0-9a-fA-F]+)::wal::ProtectedTreasury$/.exec(treasuryType);\n\tif (protectedTreasury?.[1] !== undefined) {\n\t\treturn walCoinType(protectedTreasury[1]);\n\t}\n\n\tconst treasuryCap = /^0x(?:0+)?2::coin::TreasuryCap<((0x[0-9a-fA-F]+)::wal::WAL)>$/.exec(\n\t\ttreasuryType,\n\t);\n\tif (treasuryCap?.[1] !== undefined) {\n\t\treturn treasuryCap[1] as `${string}::wal::WAL`;\n\t}\n\n\treturn null;\n};\n\nexport const walPackageIdFromCoinType = (fullCoinType: `${string}::wal::WAL`): string =>\n\tfullCoinType.split('::')[0]!;\n\nconst WalTreasuryObjectShape = Schema.Struct({\n\tobjectId: Schema.String,\n\ttype: Schema.String,\n});\n\nexport const resolveWalCoinType = (args: {\n\treadonly probe: ChainProbe<WalExchangeProbeKey>;\n\treadonly treasuryObjectId: string | undefined;\n\treadonly deployPackageId: string;\n\treadonly requireTreasuryObject: boolean;\n}): Effect.Effect<`${string}::wal::WAL`, WalrusPluginError> =>\n\tEffect.gen(function* () {\n\t\tif (args.treasuryObjectId === undefined) {\n\t\t\tif (!args.requireTreasuryObject) return walCoinType(args.deployPackageId);\n\t\t\treturn yield* Effect.fail(\n\t\t\t\twalrusPluginError(\n\t\t\t\t\t'exchange',\n\t\t\t\t\t'walrus.exchange: WAL exchange funding requires treasury_object in walrus deploy output so the original WAL coin type can be resolved.',\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\n\t\tconst found = yield* args.probe\n\t\t\t.get({ kind: 'object', objectId: args.treasuryObjectId }, WalTreasuryObjectShape, 'lenient')\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'exchange',\n\t\t\t\t\t\t`walrus.exchange: failed to resolve WAL treasury object ${args.treasuryObjectId}: ${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\n\t\tif (found === null) {\n\t\t\tif (!args.requireTreasuryObject) return walCoinType(args.deployPackageId);\n\t\t\treturn yield* Effect.fail(\n\t\t\t\twalrusPluginError(\n\t\t\t\t\t'exchange',\n\t\t\t\t\t`walrus.exchange: WAL treasury object ${args.treasuryObjectId} was not found; cannot derive the WAL coin type for account funding.`,\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\n\t\tconst parsed = parseWalCoinTypeFromTreasuryType(found.type);\n\t\tif (parsed !== null) return parsed;\n\n\t\treturn yield* Effect.fail(\n\t\t\twalrusPluginError(\n\t\t\t\t'exchange',\n\t\t\t\t`walrus.exchange: unexpected WAL treasury object type \"${found.type}\" — expected \"<pkg>::wal::ProtectedTreasury\" or \"0x2::coin::TreasuryCap<<pkg>::wal::WAL>\".`,\n\t\t\t),\n\t\t);\n\t});\n\n/** Capability key for the WAL faucet strategy. */\nexport const walFaucetStrategyKey = <FullCoinType extends string>(\n\tfullCoinType: FullCoinType,\n): `coinType:${FullCoinType}` => `coinType:${fullCoinType}` as const;\n\n/** Per-request shape — the shared account funding request. */\nexport type WalFaucetRequest = AccountFundingRequest;\n\n/** Faucet strategy value — closed over the WAL exchange's object id.\n * The requesting account signs the swap through the shared account\n * funding pipeline. */\nexport type WalFaucetStrategy = AccountFundingStrategy<WalrusPluginError>;\n\n/** Inputs the local-cluster mode passes when constructing this. */\nexport interface WalFaucetStrategyOptions {\n\treadonly exchange: WalExchangeHandle;\n\treadonly sdk: WalSwapSdk;\n}\n\n/** Build the strategy value.\n *\n * The request amount is the SUI MIST amount to spend on the local\n * exchange for WAL. Account funding skips zero amounts before the\n * strategy is invoked; the guard here keeps direct calls no-op. */\nexport const makeWalFaucetStrategy = (opts: WalFaucetStrategyOptions): WalFaucetStrategy => ({\n\tusesAccountSigner: true,\n\trequest: (req) =>\n\t\treq.amount <= 0n\n\t\t\t? Effect.void\n\t\t\t: swapAccountSuiForWal({\n\t\t\t\t\taccount: req.account,\n\t\t\t\t\tsdk: opts.sdk,\n\t\t\t\t\texchange: opts.exchange,\n\t\t\t\t\trecipientAddress: req.address,\n\t\t\t\t\tpaymentMist: req.amount,\n\t\t\t\t}).pipe(Effect.asVoid),\n});\n\n/** Build the StrategyContributor decl. The faucet plugin's\n * dispatcher reads this key off the registry and dispatches WAL\n * funding requests through it. */\nexport const makeWalFaucetContribution = (\n\tfullCoinType: string,\n\topts: WalFaucetStrategyOptions,\n): StrategyContributorDecl<ReturnType<typeof walFaucetStrategyKey>, WalFaucetStrategy> => ({\n\tkind: 'strategy-contributor',\n\tcapabilityKey: walFaucetStrategyKey(fullCoinType),\n\tstrategy: makeWalFaucetStrategy(opts),\n\tautoMounted: true,\n});\n"],"mappings":";;;;;AAwBA,MAAa,eACZ,cAC8B,GAAG,UAAU;;;;;;;AAQ5C,MAAa,oCACZ,iBACkC;CAClC,MAAM,oBAAoB,6CAA6C,KAAK,aAAa;AACzF,KAAI,oBAAoB,OAAO,KAAA,EAC9B,QAAO,YAAY,kBAAkB,GAAG;CAGzC,MAAM,cAAc,gEAAgE,KACnF,aACA;AACD,KAAI,cAAc,OAAO,KAAA,EACxB,QAAO,YAAY;AAGpB,QAAO;;AAGR,MAAa,4BAA4B,iBACxC,aAAa,MAAM,KAAK,CAAC;AAE1B,MAAM,yBAAyB,OAAO,OAAO;CAC5C,UAAU,OAAO;CACjB,MAAM,OAAO;CACb,CAAC;AAEF,MAAa,sBAAsB,SAMlC,OAAO,IAAI,aAAa;AACvB,KAAI,KAAK,qBAAqB,KAAA,GAAW;AACxC,MAAI,CAAC,KAAK,sBAAuB,QAAO,YAAY,KAAK,gBAAgB;AACzE,SAAO,OAAO,OAAO,KACpB,kBACC,YACA,wIACA,CACD;;CAGF,MAAM,QAAQ,OAAO,KAAK,MACxB,IAAI;EAAE,MAAM;EAAU,UAAU,KAAK;EAAkB,EAAE,wBAAwB,UAAU,CAC3F,KACA,OAAO,UAAU,UAChB,kBACC,YACA,0DAA0D,KAAK,iBAAiB,IAAI,MAAM,OAAO,IAAI,MAAM,UAC3G,EAAE,OAAO,CACT,CACD,CACD;AAEF,KAAI,UAAU,MAAM;AACnB,MAAI,CAAC,KAAK,sBAAuB,QAAO,YAAY,KAAK,gBAAgB;AACzE,SAAO,OAAO,OAAO,KACpB,kBACC,YACA,wCAAwC,KAAK,iBAAiB,sEAC9D,CACD;;CAGF,MAAM,SAAS,iCAAiC,MAAM,KAAK;AAC3D,KAAI,WAAW,KAAM,QAAO;AAE5B,QAAO,OAAO,OAAO,KACpB,kBACC,YACA,yDAAyD,MAAM,KAAK,4FACpE,CACD;EACA;;AAGH,MAAa,wBACZ,iBACgC,YAAY;;;;;;AAqB7C,MAAa,yBAAyB,UAAuD;CAC5F,mBAAmB;CACnB,UAAU,QACT,IAAI,UAAU,KACX,OAAO,OACP,qBAAqB;EACrB,SAAS,IAAI;EACb,KAAK,KAAK;EACV,UAAU,KAAK;EACf,kBAAkB,IAAI;EACtB,aAAa,IAAI;EACjB,CAAC,CAAC,KAAK,OAAO,OAAO;CACzB"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { CodegenableDecl } from "../../contracts/codegenable.mjs";
|
|
2
|
+
import { LivenessClassifierDecl } from "../../contracts/liveness-classifier.mjs";
|
|
3
|
+
import { ProjectionDecl } from "../../contracts/projection.mjs";
|
|
4
|
+
import { RoutableDecl } from "../../contracts/routable.mjs";
|
|
5
|
+
import { SnapshotableDecl } from "../../contracts/snapshotable.mjs";
|
|
6
|
+
import { StrategyContributorDecl } from "../../contracts/strategy-contributor.mjs";
|
|
7
|
+
import { Plugin, ResourceRef } from "../../substrate/plugin.mjs";
|
|
8
|
+
import { ModeNamespace } from "../../api/mode-narrowed-factory.mjs";
|
|
9
|
+
import { SeedObjectsAccumulator } from "../sui/seed-objects.mjs";
|
|
10
|
+
import { SuiClient } from "../sui/mode/shared.mjs";
|
|
11
|
+
import { SuiOptions } from "../sui/mode/spec.mjs";
|
|
12
|
+
import { AccountFundingCoinValue } from "../account/funding.mjs";
|
|
13
|
+
import { ForkIncompatibleError } from "../../substrate/runtime/mode-errors.mjs";
|
|
14
|
+
import { WalrusConfigError, WalrusError, WalrusPhase, WalrusPluginError } from "./errors.mjs";
|
|
15
|
+
import { WalFaucetStrategy } from "./faucet-strategy.mjs";
|
|
16
|
+
import { WalrusStorageNode } from "./storage-nodes.mjs";
|
|
17
|
+
import { WalrusLocalClusterOptions } from "./mode/local-cluster.mjs";
|
|
18
|
+
import { WalrusKnownDeploymentOptions, WalrusKnownNetwork } from "./mode/known-deploy.mjs";
|
|
19
|
+
import { WalrusKnownStateEntry, WalrusLocalStateEntry, WalrusStateEntry } from "./registry-publish.mjs";
|
|
20
|
+
import { WalrusBindings, WalrusNodeBinding } from "./codegen.mjs";
|
|
21
|
+
//#region src/plugins/walrus/index.d.ts
|
|
22
|
+
/** The Walrus resolved value carried by the resource. */
|
|
23
|
+
interface WalrusResolved {
|
|
24
|
+
readonly mode: 'local' | 'known';
|
|
25
|
+
readonly chain: string;
|
|
26
|
+
readonly walrusPackageId: string | null;
|
|
27
|
+
readonly walPackageId: string | null;
|
|
28
|
+
/** SDK-ready `packageConfig` — structurally compatible with
|
|
29
|
+
* `@mysten/walrus`'s `WalrusPackageConfig`. */
|
|
30
|
+
readonly packageConfig: {
|
|
31
|
+
readonly systemObjectId: string;
|
|
32
|
+
readonly stakingPoolId: string;
|
|
33
|
+
readonly exchangeIds?: ReadonlyArray<string>;
|
|
34
|
+
};
|
|
35
|
+
readonly nodes: ReadonlyArray<WalrusStorageNode>;
|
|
36
|
+
readonly proxyUrl: string | null;
|
|
37
|
+
readonly aggregatorUrl: string | null;
|
|
38
|
+
readonly publisherUrl: string | null;
|
|
39
|
+
readonly walFaucetStrategy: WalFaucetStrategy | null;
|
|
40
|
+
readonly walCoinType: string | null;
|
|
41
|
+
}
|
|
42
|
+
interface WalCoinValue extends AccountFundingCoinValue {
|
|
43
|
+
readonly symbol: 'WAL';
|
|
44
|
+
readonly fullCoinType: `${string}::wal::WAL`;
|
|
45
|
+
readonly decimals: 9;
|
|
46
|
+
readonly source: 'walrus';
|
|
47
|
+
}
|
|
48
|
+
/** Resolve the local Walrus deployment's WAL coin as an account-funding
|
|
49
|
+
* coin ref. Accounts that need WAL should use:
|
|
50
|
+
*
|
|
51
|
+
* funding: [{ coin: walCoin(localWalrus), amount }]
|
|
52
|
+
*
|
|
53
|
+
* The funding strategy itself is contributed by the Walrus service
|
|
54
|
+
* once its local exchange exists. */
|
|
55
|
+
declare const walCoin: (walrusMember: ResourceRef<"walrus", WalrusResolved>) => Plugin<"coin:wal", WalCoinValue, readonly [ResourceRef<"walrus", WalrusResolved>], readonly ((Readonly<{
|
|
56
|
+
readonly kind: "snapshotable";
|
|
57
|
+
} & Omit<SnapshotableDecl, "kind">> | Readonly<{
|
|
58
|
+
readonly kind: "routable";
|
|
59
|
+
} & Omit<RoutableDecl, "kind">> | Readonly<{
|
|
60
|
+
readonly kind: "codegenable";
|
|
61
|
+
} & Omit<CodegenableDecl<string>, "kind">> | Readonly<{
|
|
62
|
+
readonly kind: "projection";
|
|
63
|
+
} & Omit<ProjectionDecl, "kind">> | Readonly<{
|
|
64
|
+
readonly kind: "strategy-contributor";
|
|
65
|
+
} & Omit<StrategyContributorDecl<string, unknown>, "kind">> | Readonly<{
|
|
66
|
+
readonly kind: "liveness-classifier";
|
|
67
|
+
} & Omit<LivenessClassifierDecl, "kind">>) | Readonly<{
|
|
68
|
+
readonly kind: string;
|
|
69
|
+
} & object>)[]>;
|
|
70
|
+
/** Local-cluster shorthand. Known deployments are selected through
|
|
71
|
+
* `walrusFor(network).known(...)` so network choice stays explicit. */
|
|
72
|
+
declare const walrus: (opts?: {
|
|
73
|
+
readonly local?: WalrusLocalClusterOptions;
|
|
74
|
+
}) => Plugin<"walrus", WalrusResolved, readonly [ResourceRef<"sui", SuiClient & {
|
|
75
|
+
readonly mode: SuiOptions["mode"];
|
|
76
|
+
readonly seedObjects: SeedObjectsAccumulator;
|
|
77
|
+
}>], readonly [SnapshotableDecl, CodegenableDecl<"walrus-network">, StrategyContributorDecl<"walrus-state-registry", {
|
|
78
|
+
readonly noteName: string;
|
|
79
|
+
}>, ...(RoutableDecl | {
|
|
80
|
+
kind: "strategy-contributor";
|
|
81
|
+
capabilityKey: `coinType:${string}`;
|
|
82
|
+
strategy: WalFaucetStrategy;
|
|
83
|
+
autoMounted: true;
|
|
84
|
+
})[]]>;
|
|
85
|
+
/** Mode-narrowed factory namespace.
|
|
86
|
+
*
|
|
87
|
+
* Usage:
|
|
88
|
+
* const network = { mode: 'local', chain: 'sui:localnet' } as const;
|
|
89
|
+
* walrusFor(network).local({...}) // OK
|
|
90
|
+
* walrusFor(network).known({...}) // type error: 'known' not in 'local' branch
|
|
91
|
+
*
|
|
92
|
+
* Critically, the fork branch exposes ONLY `.known` — calling
|
|
93
|
+
* `.local` on a fork-mode network is a **compile error** at the
|
|
94
|
+
* call site (distilled-doc invariant 12 — type-level refusal).
|
|
95
|
+
* Runtime defense-in-depth: see `mode/fork-refusal.ts`. */
|
|
96
|
+
declare const walrusFor: ModeNamespace<{
|
|
97
|
+
local: {
|
|
98
|
+
local: (opts?: WalrusLocalClusterOptions) => Plugin<"walrus", WalrusResolved, readonly [ResourceRef<"sui", SuiClient & {
|
|
99
|
+
readonly mode: SuiOptions["mode"];
|
|
100
|
+
readonly seedObjects: SeedObjectsAccumulator;
|
|
101
|
+
}>], readonly [SnapshotableDecl, CodegenableDecl<"walrus-network">, StrategyContributorDecl<"walrus-state-registry", {
|
|
102
|
+
readonly noteName: string;
|
|
103
|
+
}>, ...(RoutableDecl | {
|
|
104
|
+
kind: "strategy-contributor";
|
|
105
|
+
capabilityKey: `coinType:${string}`;
|
|
106
|
+
strategy: WalFaucetStrategy;
|
|
107
|
+
autoMounted: true;
|
|
108
|
+
})[]]>;
|
|
109
|
+
known: (opts: WalrusKnownDeploymentOptions) => Plugin<"walrus", {
|
|
110
|
+
mode: "known";
|
|
111
|
+
chain: string;
|
|
112
|
+
walrusPackageId: null;
|
|
113
|
+
walPackageId: null;
|
|
114
|
+
packageConfig: {
|
|
115
|
+
systemObjectId: string;
|
|
116
|
+
stakingPoolId: string;
|
|
117
|
+
exchangeIds: readonly string[] | undefined;
|
|
118
|
+
};
|
|
119
|
+
nodes: readonly WalrusStorageNode[];
|
|
120
|
+
proxyUrl: string | null;
|
|
121
|
+
aggregatorUrl: string | null;
|
|
122
|
+
publisherUrl: string | null;
|
|
123
|
+
walFaucetStrategy: null;
|
|
124
|
+
walCoinType: null;
|
|
125
|
+
}, readonly [ResourceRef<"sui", SuiClient & {
|
|
126
|
+
readonly mode: SuiOptions["mode"];
|
|
127
|
+
readonly seedObjects: SeedObjectsAccumulator;
|
|
128
|
+
}>], readonly [SnapshotableDecl, CodegenableDecl<"walrus-network">, StrategyContributorDecl<"walrus-state-registry", WalrusStateEntry>]>;
|
|
129
|
+
};
|
|
130
|
+
live: {
|
|
131
|
+
known: (opts: WalrusKnownDeploymentOptions) => Plugin<"walrus", {
|
|
132
|
+
mode: "known";
|
|
133
|
+
chain: string;
|
|
134
|
+
walrusPackageId: null;
|
|
135
|
+
walPackageId: null;
|
|
136
|
+
packageConfig: {
|
|
137
|
+
systemObjectId: string;
|
|
138
|
+
stakingPoolId: string;
|
|
139
|
+
exchangeIds: readonly string[] | undefined;
|
|
140
|
+
};
|
|
141
|
+
nodes: readonly WalrusStorageNode[];
|
|
142
|
+
proxyUrl: string | null;
|
|
143
|
+
aggregatorUrl: string | null;
|
|
144
|
+
publisherUrl: string | null;
|
|
145
|
+
walFaucetStrategy: null;
|
|
146
|
+
walCoinType: null;
|
|
147
|
+
}, readonly [ResourceRef<"sui", SuiClient & {
|
|
148
|
+
readonly mode: SuiOptions["mode"];
|
|
149
|
+
readonly seedObjects: SeedObjectsAccumulator;
|
|
150
|
+
}>], readonly [SnapshotableDecl, CodegenableDecl<"walrus-network">, StrategyContributorDecl<"walrus-state-registry", WalrusStateEntry>]>;
|
|
151
|
+
};
|
|
152
|
+
fork: {
|
|
153
|
+
known: (opts: WalrusKnownDeploymentOptions) => Plugin<"walrus", {
|
|
154
|
+
mode: "known";
|
|
155
|
+
chain: string;
|
|
156
|
+
walrusPackageId: null;
|
|
157
|
+
walPackageId: null;
|
|
158
|
+
packageConfig: {
|
|
159
|
+
systemObjectId: string;
|
|
160
|
+
stakingPoolId: string;
|
|
161
|
+
exchangeIds: readonly string[] | undefined;
|
|
162
|
+
};
|
|
163
|
+
nodes: readonly WalrusStorageNode[];
|
|
164
|
+
proxyUrl: string | null;
|
|
165
|
+
aggregatorUrl: string | null;
|
|
166
|
+
publisherUrl: string | null;
|
|
167
|
+
walFaucetStrategy: null;
|
|
168
|
+
walCoinType: null;
|
|
169
|
+
}, readonly [ResourceRef<"sui", SuiClient & {
|
|
170
|
+
readonly mode: SuiOptions["mode"];
|
|
171
|
+
readonly seedObjects: SeedObjectsAccumulator;
|
|
172
|
+
}>], readonly [SnapshotableDecl, CodegenableDecl<"walrus-network">, StrategyContributorDecl<"walrus-state-registry", WalrusStateEntry>]>;
|
|
173
|
+
};
|
|
174
|
+
}>;
|
|
175
|
+
//#endregion
|
|
176
|
+
export { WalCoinValue, WalrusResolved, walCoin, walrus, walrusFor };
|
|
177
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
import { definePlugin, resource } from "../../substrate/plugin.mjs";
|
|
2
|
+
import { pluginErrorContributions } from "../../api/plugin-errors.mjs";
|
|
3
|
+
import { IdentityContext, StackPathsService } from "../../substrate/runtime/paths.mjs";
|
|
4
|
+
import { defineModeNamespace } from "../../api/mode-narrowed-factory.mjs";
|
|
5
|
+
import { ContainerRuntimeService } from "../../runtime/docker/service.mjs";
|
|
6
|
+
import { suiResource } from "../sui/index.mjs";
|
|
7
|
+
import { ArtifactPublisherService } from "../../substrate/runtime/artifact-publisher/index.mjs";
|
|
8
|
+
import { chainProbeFor } from "../../substrate/runtime/strategy-registry/chain-probe-for.mjs";
|
|
9
|
+
import { WALRUS_ERROR_TAGS, walrusPluginError } from "./errors.mjs";
|
|
10
|
+
import { buildWalrusNetworkName } from "./storage-nodes.mjs";
|
|
11
|
+
import { makeLocalRoutables } from "./routable.mjs";
|
|
12
|
+
import { coinResourceId } from "../coin/index.mjs";
|
|
13
|
+
import { makeCodegenable } from "./codegen.mjs";
|
|
14
|
+
import { walrusPluginKey } from "./plugin-key.mjs";
|
|
15
|
+
import { walFaucetStrategyKey } from "./faucet-strategy.mjs";
|
|
16
|
+
import { resolveKnownDeploymentOptions } from "./mode/known-deploy.mjs";
|
|
17
|
+
import { resolveLocalClusterOptions } from "./mode/local-cluster.mjs";
|
|
18
|
+
import { bootWalrusService } from "./service.mjs";
|
|
19
|
+
import { makeSnapshotable } from "./snapshot.mjs";
|
|
20
|
+
import { WALRUS_STATE_REGISTRY_KEY } from "./registry-publish.mjs";
|
|
21
|
+
import { Effect, Path } from "effect";
|
|
22
|
+
//#region src/plugins/walrus/index.ts
|
|
23
|
+
/** Walrus plugin resource. */
|
|
24
|
+
const walrusResource = resource("walrus");
|
|
25
|
+
const walrusErrorContributions = pluginErrorContributions(WALRUS_ERROR_TAGS);
|
|
26
|
+
/** Walrus deploy records storage-node listening IPs under this /24.
|
|
27
|
+
* Docker network create requests the matching subnet explicitly, with
|
|
28
|
+
* the prefix derived from the Walrus network identity so parallel
|
|
29
|
+
* stacks don't all claim the same Docker IPAM range. */
|
|
30
|
+
const deriveWalrusSubnetPrefix = (identity) => {
|
|
31
|
+
const key = `${identity.app}\0${identity.stack}\0${identity.walrusName}`;
|
|
32
|
+
let hash = 2166136261;
|
|
33
|
+
for (let i = 0; i < key.length; i += 1) {
|
|
34
|
+
hash ^= key.charCodeAt(i);
|
|
35
|
+
hash = Math.imul(hash, 16777619) >>> 0;
|
|
36
|
+
}
|
|
37
|
+
const bucket = hash % (64 * 256);
|
|
38
|
+
return `10.${64 + Math.floor(bucket / 256)}.${bucket % 256}`;
|
|
39
|
+
};
|
|
40
|
+
const walrusNetworkCreateSpec = (spec, subnetPrefix) => ({
|
|
41
|
+
...spec,
|
|
42
|
+
subnet: `${subnetPrefix}.0/24`,
|
|
43
|
+
gateway: `${subnetPrefix}.1`
|
|
44
|
+
});
|
|
45
|
+
const withWalrusNetworkAddressing = (runtime, walrusNetworkName, subnetPrefix) => ({
|
|
46
|
+
...runtime,
|
|
47
|
+
ensureNetwork: (spec) => runtime.ensureNetwork(spec.name === walrusNetworkName ? walrusNetworkCreateSpec(spec, subnetPrefix) : spec)
|
|
48
|
+
});
|
|
49
|
+
const buildLocalPlugin = (opts) => {
|
|
50
|
+
const resolved = resolveLocalClusterOptions(opts);
|
|
51
|
+
const walrusKey = walrusPluginKey(resolved.name);
|
|
52
|
+
return definePlugin({
|
|
53
|
+
id: walrusResource.id,
|
|
54
|
+
dependsOn: [suiResource],
|
|
55
|
+
role: "service",
|
|
56
|
+
pluginKey: walrusKey,
|
|
57
|
+
start: (deps) => Effect.gen(function* () {
|
|
58
|
+
const [sui] = deps;
|
|
59
|
+
const runtime = yield* ContainerRuntimeService;
|
|
60
|
+
const identity = yield* IdentityContext;
|
|
61
|
+
const stackPaths = yield* StackPathsService;
|
|
62
|
+
const path = yield* Path.Path;
|
|
63
|
+
const publisher = yield* ArtifactPublisherService;
|
|
64
|
+
const probe = yield* chainProbeFor(sui.chain);
|
|
65
|
+
const deployHostMountPath = path.join(stackPaths.stackRoot, "walrus", resolved.name, "deploy");
|
|
66
|
+
const walrusNetworkName = buildWalrusNetworkName(identity.app, identity.stack, resolved.name);
|
|
67
|
+
const walrusSubnetPrefix = deriveWalrusSubnetPrefix({
|
|
68
|
+
app: identity.app,
|
|
69
|
+
stack: identity.stack,
|
|
70
|
+
walrusName: resolved.name
|
|
71
|
+
});
|
|
72
|
+
const walrusRuntime = withWalrusNetworkAddressing(runtime, walrusNetworkName, walrusSubnetPrefix);
|
|
73
|
+
const suiRpcUrlInNetwork = sui.hostGateway.rpcUrl;
|
|
74
|
+
const suiFaucetUrlInNetwork = sui.hostGateway.faucetUrl;
|
|
75
|
+
if (suiFaucetUrlInNetwork === null) return yield* Effect.fail(walrusPluginError("deploy", "walrus local-cluster requires a Sui faucet URL for deploy funding."));
|
|
76
|
+
const walrusFaucetUrlInNetwork = `${suiFaucetUrlInNetwork}/v2/gas`;
|
|
77
|
+
const mode = {
|
|
78
|
+
mode: "local",
|
|
79
|
+
opts: resolved
|
|
80
|
+
};
|
|
81
|
+
const boot = yield* bootWalrusService({
|
|
82
|
+
runtime: walrusRuntime,
|
|
83
|
+
publisher,
|
|
84
|
+
probe,
|
|
85
|
+
suiSdk: sui.sdk,
|
|
86
|
+
suiChainId: sui.chain,
|
|
87
|
+
suiRpcUrlInNetwork,
|
|
88
|
+
walrusFaucetUrlInNetwork,
|
|
89
|
+
waitForFundsReady: sui.waitForTransactionsReady.wait,
|
|
90
|
+
app: identity.app,
|
|
91
|
+
stack: identity.stack,
|
|
92
|
+
subnetPrefix: walrusSubnetPrefix,
|
|
93
|
+
walrusNetworkName,
|
|
94
|
+
suiNetworkName: walrusNetworkName,
|
|
95
|
+
deployHostMountPath
|
|
96
|
+
}, mode);
|
|
97
|
+
if (boot.mode !== "local") return yield* Effect.die("walrus: mode mismatch in local plugin");
|
|
98
|
+
return {
|
|
99
|
+
mode: "local",
|
|
100
|
+
chain: sui.chain,
|
|
101
|
+
walrusPackageId: boot.walrusPackageId,
|
|
102
|
+
walPackageId: boot.walPackageId,
|
|
103
|
+
packageConfig: {
|
|
104
|
+
systemObjectId: boot.deploy.systemObject,
|
|
105
|
+
stakingPoolId: boot.deploy.stakingObject,
|
|
106
|
+
exchangeIds: boot.exchangeObjectId ? [boot.exchangeObjectId] : void 0
|
|
107
|
+
},
|
|
108
|
+
nodes: boot.nodes,
|
|
109
|
+
proxyUrl: boot.proxyUrl,
|
|
110
|
+
aggregatorUrl: boot.aggregatorUrl,
|
|
111
|
+
publisherUrl: boot.publisherUrl,
|
|
112
|
+
walFaucetStrategy: boot.walFaucetStrategy,
|
|
113
|
+
walCoinType: boot.walCoinType
|
|
114
|
+
};
|
|
115
|
+
}),
|
|
116
|
+
capabilities: ({ value: resolvedValue, runtime: acquireCtx }) => makeLocalCapabilities({
|
|
117
|
+
name: resolved.name,
|
|
118
|
+
nodeCount: resolved.nodeCount,
|
|
119
|
+
containerApiPort: resolved.containerApiPort,
|
|
120
|
+
serviceKey: String(walrusKey),
|
|
121
|
+
resolved: resolvedValue,
|
|
122
|
+
acquireCtx
|
|
123
|
+
}),
|
|
124
|
+
errorContributions: walrusErrorContributions
|
|
125
|
+
});
|
|
126
|
+
};
|
|
127
|
+
const buildKnownPlugin = (opts) => {
|
|
128
|
+
const resolved = resolveKnownDeploymentOptions(opts);
|
|
129
|
+
return definePlugin({
|
|
130
|
+
id: walrusResource.id,
|
|
131
|
+
dependsOn: [suiResource],
|
|
132
|
+
role: "task",
|
|
133
|
+
start: () => Effect.succeed({
|
|
134
|
+
mode: "known",
|
|
135
|
+
chain: resolved.chain,
|
|
136
|
+
walrusPackageId: null,
|
|
137
|
+
walPackageId: null,
|
|
138
|
+
packageConfig: {
|
|
139
|
+
systemObjectId: resolved.systemObjectId,
|
|
140
|
+
stakingPoolId: resolved.stakingPoolId,
|
|
141
|
+
exchangeIds: resolved.exchangeIds.length > 0 ? resolved.exchangeIds : void 0
|
|
142
|
+
},
|
|
143
|
+
nodes: resolved.nodes,
|
|
144
|
+
proxyUrl: resolved.proxyUrl,
|
|
145
|
+
aggregatorUrl: resolved.aggregatorUrl,
|
|
146
|
+
publisherUrl: resolved.publisherUrl,
|
|
147
|
+
walFaucetStrategy: null,
|
|
148
|
+
walCoinType: null
|
|
149
|
+
}),
|
|
150
|
+
capabilities: ({ value: resolvedValue, runtime: acquireCtx }) => makeKnownCapabilities({
|
|
151
|
+
resolved: resolvedValue,
|
|
152
|
+
acquireCtx
|
|
153
|
+
}),
|
|
154
|
+
errorContributions: walrusErrorContributions
|
|
155
|
+
});
|
|
156
|
+
};
|
|
157
|
+
const makeLocalCapabilities = (parts) => {
|
|
158
|
+
const { name, nodeCount, containerApiPort, serviceKey, resolved, acquireCtx } = parts;
|
|
159
|
+
const snap = makeSnapshotable("local", acquireCtx.identity.app, acquireCtx.identity.stack, name, resolved.chain, nodeCount);
|
|
160
|
+
const codegen = makeCodegenable({
|
|
161
|
+
mode: "local",
|
|
162
|
+
chain: resolved.chain,
|
|
163
|
+
walrusPackageId: resolved.walrusPackageId,
|
|
164
|
+
walPackageId: resolved.walPackageId,
|
|
165
|
+
walCoinType: resolved.walCoinType,
|
|
166
|
+
systemObjectId: resolved.packageConfig.systemObjectId,
|
|
167
|
+
stakingPoolId: resolved.packageConfig.stakingPoolId,
|
|
168
|
+
exchangeIds: resolved.packageConfig.exchangeIds ? [...resolved.packageConfig.exchangeIds] : [],
|
|
169
|
+
proxyUrl: resolved.proxyUrl,
|
|
170
|
+
aggregatorUrl: resolved.aggregatorUrl,
|
|
171
|
+
publisherUrl: resolved.publisherUrl,
|
|
172
|
+
nodes: resolved.nodes
|
|
173
|
+
});
|
|
174
|
+
const stateRegistry = {
|
|
175
|
+
kind: "strategy-contributor",
|
|
176
|
+
capabilityKey: WALRUS_STATE_REGISTRY_KEY,
|
|
177
|
+
strategy: { noteName: name },
|
|
178
|
+
autoMounted: true
|
|
179
|
+
};
|
|
180
|
+
const walFaucetContribution = resolved.walFaucetStrategy === null || resolved.walCoinType === null ? [] : [{
|
|
181
|
+
kind: "strategy-contributor",
|
|
182
|
+
capabilityKey: walFaucetStrategyKey(resolved.walCoinType),
|
|
183
|
+
strategy: resolved.walFaucetStrategy,
|
|
184
|
+
autoMounted: true
|
|
185
|
+
}];
|
|
186
|
+
const routables = makeLocalRoutables({
|
|
187
|
+
app: acquireCtx.identity.app,
|
|
188
|
+
stack: acquireCtx.identity.stack,
|
|
189
|
+
walrusName: name,
|
|
190
|
+
serviceKey,
|
|
191
|
+
nodeCount,
|
|
192
|
+
containerApiPort
|
|
193
|
+
});
|
|
194
|
+
return [
|
|
195
|
+
snap,
|
|
196
|
+
codegen,
|
|
197
|
+
stateRegistry,
|
|
198
|
+
...walFaucetContribution,
|
|
199
|
+
...routables
|
|
200
|
+
];
|
|
201
|
+
};
|
|
202
|
+
const makeKnownCapabilities = (parts) => {
|
|
203
|
+
const { resolved, acquireCtx } = parts;
|
|
204
|
+
return [
|
|
205
|
+
makeSnapshotable("known", acquireCtx.identity.app, acquireCtx.identity.stack, "walrusKnownDeployment", resolved.chain),
|
|
206
|
+
makeCodegenable({
|
|
207
|
+
mode: "known",
|
|
208
|
+
chain: resolved.chain,
|
|
209
|
+
walrusPackageId: resolved.walrusPackageId,
|
|
210
|
+
walPackageId: resolved.walPackageId,
|
|
211
|
+
walCoinType: resolved.walCoinType,
|
|
212
|
+
systemObjectId: resolved.packageConfig.systemObjectId,
|
|
213
|
+
stakingPoolId: resolved.packageConfig.stakingPoolId,
|
|
214
|
+
exchangeIds: resolved.packageConfig.exchangeIds ? [...resolved.packageConfig.exchangeIds] : [],
|
|
215
|
+
proxyUrl: resolved.proxyUrl,
|
|
216
|
+
aggregatorUrl: resolved.aggregatorUrl,
|
|
217
|
+
publisherUrl: resolved.publisherUrl,
|
|
218
|
+
nodes: resolved.nodes
|
|
219
|
+
}),
|
|
220
|
+
{
|
|
221
|
+
kind: "strategy-contributor",
|
|
222
|
+
capabilityKey: WALRUS_STATE_REGISTRY_KEY,
|
|
223
|
+
strategy: {
|
|
224
|
+
name: "walrusKnownDeployment",
|
|
225
|
+
systemObjectId: resolved.packageConfig.systemObjectId,
|
|
226
|
+
stakingObjectId: resolved.packageConfig.stakingPoolId,
|
|
227
|
+
chain: resolved.chain
|
|
228
|
+
},
|
|
229
|
+
autoMounted: true
|
|
230
|
+
}
|
|
231
|
+
];
|
|
232
|
+
};
|
|
233
|
+
/** Resolve the local Walrus deployment's WAL coin as an account-funding
|
|
234
|
+
* coin ref. Accounts that need WAL should use:
|
|
235
|
+
*
|
|
236
|
+
* funding: [{ coin: walCoin(localWalrus), amount }]
|
|
237
|
+
*
|
|
238
|
+
* The funding strategy itself is contributed by the Walrus service
|
|
239
|
+
* once its local exchange exists. */
|
|
240
|
+
const walCoin = (walrusMember) => {
|
|
241
|
+
return definePlugin({
|
|
242
|
+
id: resource(coinResourceId("wal")).id,
|
|
243
|
+
dependsOn: walrusMember,
|
|
244
|
+
role: "task",
|
|
245
|
+
start: (resolved) => Effect.gen(function* () {
|
|
246
|
+
if (resolved.walCoinType === null) return yield* Effect.fail(walrusPluginError("exchange", "walCoin(...) requires a local Walrus deployment with a WAL package."));
|
|
247
|
+
return {
|
|
248
|
+
symbol: "WAL",
|
|
249
|
+
fullCoinType: resolved.walCoinType,
|
|
250
|
+
decimals: 9,
|
|
251
|
+
source: "walrus"
|
|
252
|
+
};
|
|
253
|
+
}),
|
|
254
|
+
errorContributions: walrusErrorContributions
|
|
255
|
+
});
|
|
256
|
+
};
|
|
257
|
+
/** Local-cluster shorthand. Known deployments are selected through
|
|
258
|
+
* `walrusFor(network).known(...)` so network choice stays explicit. */
|
|
259
|
+
const walrus = (opts) => {
|
|
260
|
+
return buildLocalPlugin(opts?.local ?? {});
|
|
261
|
+
};
|
|
262
|
+
/** Mode-narrowed factory namespace.
|
|
263
|
+
*
|
|
264
|
+
* Usage:
|
|
265
|
+
* const network = { mode: 'local', chain: 'sui:localnet' } as const;
|
|
266
|
+
* walrusFor(network).local({...}) // OK
|
|
267
|
+
* walrusFor(network).known({...}) // type error: 'known' not in 'local' branch
|
|
268
|
+
*
|
|
269
|
+
* Critically, the fork branch exposes ONLY `.known` — calling
|
|
270
|
+
* `.local` on a fork-mode network is a **compile error** at the
|
|
271
|
+
* call site (distilled-doc invariant 12 — type-level refusal).
|
|
272
|
+
* Runtime defense-in-depth: see `mode/fork-refusal.ts`. */
|
|
273
|
+
const walrusFor = defineModeNamespace({
|
|
274
|
+
local: {
|
|
275
|
+
local: (opts = {}) => buildLocalPlugin(opts),
|
|
276
|
+
known: (opts) => buildKnownPlugin(opts)
|
|
277
|
+
},
|
|
278
|
+
live: { known: (opts) => buildKnownPlugin(opts) },
|
|
279
|
+
fork: { known: (opts) => buildKnownPlugin(opts) }
|
|
280
|
+
});
|
|
281
|
+
//#endregion
|
|
282
|
+
export { walCoin, walrus, walrusFor };
|
|
283
|
+
|
|
284
|
+
//# sourceMappingURL=index.mjs.map
|