diff --git a/.github/workflows/game-shop.yml b/.github/workflows/game-shop.yml index b3ac04d..54dc8b8 100644 --- a/.github/workflows/game-shop.yml +++ b/.github/workflows/game-shop.yml @@ -20,20 +20,20 @@ jobs: - name: Check out the private-node test dependency uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 with: - repository: kryonlabs/daochi - ref: e64fc1169f7479e2504710a486dbb307e3dcee51 - path: work/daochi + repository: ziranlang/mesh + ref: 35159302be6f9011c3934636c6c200eec785ff5b + path: work/mesh submodules: recursive persist-credentials: false - uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 with: - go-version-file: work/daochi/go.mod - cache-dependency-path: work/daochi/go.sum + go-version-file: work/mesh/go.mod + cache-dependency-path: work/mesh/go.sum - name: Set up the node's locked compiler and native build tools id: node-ziran uses: ziranlang/ziran/.github/actions/setup@4c27b5a080a9596f5919ece1651e5a372be2142f with: - project: work/daochi + project: work/mesh path: .node-ziran fetch: true packages: >- @@ -42,14 +42,14 @@ jobs: - name: Build the private test node env: ZIRAN: ${{ steps.node-ziran.outputs.ziran }} - run: make -C work/daochi build ZIRAN="$ZIRAN" + run: make -C work/mesh build ZIRAN="$ZIRAN" - name: Set up Entity's locked compiler and packages uses: ziranlang/ziran/.github/actions/setup@4c27b5a080a9596f5919ece1651e5a372be2142f with: fetch: true - name: Native game-shop and production browser routing grant cases env: - DAOCHI_BIN: ${{ github.workspace }}/work/daochi/daochi + MESH_BIN: ${{ github.workspace }}/work/mesh/mesh run: | test ! -e ziran.local.toml make game-shop-test diff --git a/CHANGELOG.md b/CHANGELOG.md index 98db359..9788f42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## [Unreleased] +- Use the Mesh client namespace for account sync while preserving existing account keys, records and protocol bytes. + - Build with Ziran v0.5.0 (f9f92b46) and Kryon cc731751, the same pins as the apps that depend on Entity, so they share one Kryon. - The `native-profile` artifact runs `zi2zx` without the `bundle` verb that one-format Ziran removed, so hosts that request Entity's Profile bundle build it again. - The runtime that hosts and web pages link carries Ziran's instruction engine, so it opens the profile's ZX bundle; a page built for a test connects Kryon's test driver itself. diff --git a/Makefile b/Makefile index f16ccc0..fd79645 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ LOCK_FLAGS := $(if $(wildcard ziran.local.toml),,--locked) KRYON_DIR = $(shell $(ZIRAN) pkg path kryon $(LOCK_FLAGS)) ZIRAN_ROOT = $(shell $(ZIRAN) pkg path ziran $(LOCK_FLAGS)) QRCODE_DIR = $(shell $(ZIRAN) pkg path qrcode $(LOCK_FLAGS)) -DAOCHI_CLIENT_DIR = $(shell $(ZIRAN) pkg path daochi_client $(LOCK_FLAGS)) +MESH_CLIENT_DIR = $(shell $(ZIRAN) pkg path mesh_client $(LOCK_FLAGS)) CRYPTO_DIR = $(shell $(ZIRAN) pkg path crypto $(LOCK_FLAGS)) OQS_DIR = $(shell $(ZIRAN) pkg path oqs $(LOCK_FLAGS)) LIBOQS_DIR = $(shell $(ZIRAN) pkg path liboqs $(LOCK_FLAGS)) @@ -14,8 +14,8 @@ LIBOQS_LIBRARY ?= build/liboqs/lib/liboqs.a MODULE_PATHS = --module-path src --module-path kryon=$(KRYON_DIR)/src/backend \ --module-path $(KRYON_DIR)/src/backend --module-path kryon=$(KRYON_DIR)/src/ui \ --module-path $(KRYON_DIR)/src/ui --module-path $(ZIRAN_ROOT)/std \ - --module-path qrcode=$(QRCODE_DIR)/src --module-path daochi_client=$(DAOCHI_CLIENT_DIR) \ - --module-path $(DAOCHI_CLIENT_DIR) --module-path crypto=$(CRYPTO_DIR)/src --module-path oqs=$(OQS_DIR)/src + --module-path qrcode=$(QRCODE_DIR)/src --module-path mesh_client=$(MESH_CLIENT_DIR) \ + --module-path $(MESH_CLIENT_DIR) --module-path crypto=$(CRYPTO_DIR)/src --module-path oqs=$(OQS_DIR)/src ACHIEVEMENT_TEST_BINDS = --bind kryon/font_metrics:MeasureGlyphWidth=achievement_shape_host:MeasureGlyphWidth \ --bind kryon/font_metrics:MeasureGlyphLineHeight=achievement_shape_host:MeasureGlyphLineHeight \ --bind kryon/image_raster:ImageWidth=achievement_shape_host:ImageWidth \ @@ -107,7 +107,7 @@ build/liboqs/lib/liboqs.a: ziran.lock Makefile -DOQS_BUILD_ONLY_LIB=ON -DOQS_USE_OPENSSL=OFF -DOQS_DIST_BUILD=OFF -DOQS_OPT_TARGET=generic '-DOQS_MINIMAL_BUILD=SIG_ml_dsa_44;KEM_ml_kem_768' cmake --build build/liboqs --target oqs -# Native game shop and production browser routing against a private Daochi node. +# Native game shop and production browser routing against a private Mesh node. .PHONY: game-shop-test game-shop-test: $(LIBOQS_LIBRARY) ZIRAN_BIN=$(ZIRAN) LIBOQS_LIBRARY=$(abspath $(LIBOQS_LIBRARY)) python3 scripts/game_shop_test.py @@ -124,7 +124,7 @@ build/entity: build/generated/native/.complete build/ziran/libziran.a $(LIBOQS_L -I$(MONOCYPHER_DIR)/src $$(rg --files build/generated/native -g '*.c') $(MONOCYPHER_SOURCES) build/ziran/libziran.a $(LIBOQS_LIBRARY) \ $$(pkg-config --libs sdl2 cairo freetype2 fontconfig pangocairo gtk+-3.0) -lX11 -l:libcurl.so.4 -lm -lpthread -lz -o $@ native: build/entity -# Publishes a JSON document as a public Daochi publication; see tools/publication.zi. +# Publishes a JSON document as a public Mesh publication; see tools/publication.zi. publication: build/publication build/publication: tools/publication.zi src/publications_read.zi $(UI_SOURCES) build/ziran/libziran.a $(LIBOQS_LIBRARY) ziran.lock Makefile rm -rf build/publication-c @@ -132,23 +132,23 @@ build/publication: tools/publication.zi src/publications_read.zi $(UI_SOURCES) b $(CC) -std=c11 -O2 -ffunction-sections -fdata-sections -Wl,--gc-sections -I$(ZIRAN_ROOT)/include -Ibuild/publication-c $$(find build/publication-c -type d -printf ' -iquote %p') \ -I$(MONOCYPHER_DIR)/src $$(rg --files build/publication-c -g '*.c') $(MONOCYPHER_SOURCES) build/ziran/libziran.a $(LIBOQS_LIBRARY) -l:libcurl.so.4 -lm -lpthread -lz -o $@ # The entity.records service alone and between two devices through a -# private local Daochi node (DAOCHI_BIN, by default the checkout's build). +# private local Mesh node (MESH_BIN, by default the checkout's build). .PHONY: records-test records-test: $(LIBOQS_LIBRARY) - ZIRAN_BIN=$(ZIRAN) ZIRAN_ROOT=$(ZIRAN_ROOT) KRYON_DIR=$(KRYON_DIR) DAOCHI_CLIENT_DIR=$(DAOCHI_CLIENT_DIR) CRYPTO_DIR=$(CRYPTO_DIR) \ + ZIRAN_BIN=$(ZIRAN) ZIRAN_ROOT=$(ZIRAN_ROOT) KRYON_DIR=$(KRYON_DIR) MESH_CLIENT_DIR=$(MESH_CLIENT_DIR) CRYPTO_DIR=$(CRYPTO_DIR) \ OQS_DIR=$(OQS_DIR) MONOCYPHER_DIR=$(MONOCYPHER_DIR) LIBOQS_LIBRARY=$(abspath $(LIBOQS_LIBRARY)) python3 scripts/records_test.py # Account aliases set the way the Alias page does, through a private local -# Daochi node (DAOCHI_BIN, by default the checkout's build). +# Mesh node (MESH_BIN, by default the checkout's build). .PHONY: alias-test alias-test: $(LIBOQS_LIBRARY) - ZIRAN_BIN=$(ZIRAN) ZIRAN_ROOT=$(ZIRAN_ROOT) KRYON_DIR=$(KRYON_DIR) DAOCHI_CLIENT_DIR=$(DAOCHI_CLIENT_DIR) CRYPTO_DIR=$(CRYPTO_DIR) \ + ZIRAN_BIN=$(ZIRAN) ZIRAN_ROOT=$(ZIRAN_ROOT) KRYON_DIR=$(KRYON_DIR) MESH_CLIENT_DIR=$(MESH_CLIENT_DIR) CRYPTO_DIR=$(CRYPTO_DIR) \ OQS_DIR=$(OQS_DIR) MONOCYPHER_DIR=$(MONOCYPHER_DIR) LIBOQS_LIBRARY=$(abspath $(LIBOQS_LIBRARY)) python3 scripts/alias_test.py .PHONY: premium-alias-node-test premium-alias-node-test: $(LIBOQS_LIBRARY) - ZIRAN_BIN=$(ZIRAN) ZIRAN_ROOT=$(ZIRAN_ROOT) KRYON_DIR=$(KRYON_DIR) DAOCHI_CLIENT_DIR=$(DAOCHI_CLIENT_DIR) CRYPTO_DIR=$(CRYPTO_DIR) \ + ZIRAN_BIN=$(ZIRAN) ZIRAN_ROOT=$(ZIRAN_ROOT) KRYON_DIR=$(KRYON_DIR) MESH_CLIENT_DIR=$(MESH_CLIENT_DIR) CRYPTO_DIR=$(CRYPTO_DIR) \ OQS_DIR=$(OQS_DIR) MONOCYPHER_DIR=$(MONOCYPHER_DIR) LIBOQS_LIBRARY=$(abspath $(LIBOQS_LIBRARY)) python3 scripts/premium_alias_test.py native-test: $(LIBOQS_LIBRARY) - ZIRAN_BIN=$(ZIRAN) ZIRAN_ROOT=$(ZIRAN_ROOT) KRYON_DIR=$(KRYON_DIR) DAOCHI_CLIENT_DIR=$(DAOCHI_CLIENT_DIR) CRYPTO_DIR=$(CRYPTO_DIR) \ + ZIRAN_BIN=$(ZIRAN) ZIRAN_ROOT=$(ZIRAN_ROOT) KRYON_DIR=$(KRYON_DIR) MESH_CLIENT_DIR=$(MESH_CLIENT_DIR) CRYPTO_DIR=$(CRYPTO_DIR) \ OQS_DIR=$(OQS_DIR) MONOCYPHER_DIR=$(MONOCYPHER_DIR) LIBOQS_LIBRARY=$(LIBOQS_LIBRARY) python3 scripts/native_test.py run: all ./build/entity build/entity.zx diff --git a/README.md b/README.md index f881cd3..0511f7b 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ under a key derived from the password with Argon2id (64 MiB, 3 passes), so its strength depends on that password. No server can reset it. Older files keep opening. -A backup can also be saved on the account's Daochi node (`account_backup`). The +A backup can also be saved on the account's [Mesh](https://mesh.ziran-lang.org) node (`account_backup`). The node keeps only the sealed text and a verifier; a new device gets the salt, derives its proof from the password and receives the text only for that proof, under per-account attempt limits. Signing in with a username or public ID needs @@ -130,7 +130,7 @@ Device links seal the account with X25519 and ML-KEM-768 together. The QR code carries the relay ID and a key hash, and the keys travel through the relay. Older `inbe-link:1` codes keep working. -Recovery retains the existing plain and passphrase-protected Daochi key formats. +Recovery retains the existing plain and passphrase-protected Mesh key formats. An optional protected native context preserves Werkzeug's record vault across backup/import and new shared QR transfers. Plain-key QR transfers retain Inbe's existing payload. Receivers validate the account keys before import. Older Inbe @@ -153,7 +153,7 @@ run with `ENTITY_PRIVATE_DISPLAY=1` on a private Xvfb display. The `entity.records` app service (`entity/entity_records`) keeps the account's own records of each kind an app names, such as Shovey's level drafts in -`private.entity.v1.levels` (Daochi `docs/entity-data.md`). Requests (`list`, +`private.entity.v1.levels` (Mesh `docs/entity-data.md`). Requests (`list`, `get`, `put`, `delete`, `status`) answer at once from the device's copy, so a save never waits for the node; the native host then syncs the records in the account's signed sync as the `entity` app, sealed with the record key of @@ -161,7 +161,7 @@ their kind. Records saved before an account is connected stay on the device and become that account's own once it is. Documents are JSON objects of at most 140 KiB. Native hosts route the service and call `EntityHostPump` each frame. `make records-test` checks one device and two devices of a throwaway -account through a private local Daochi node. +account through a private local Mesh node. ## Collection sharing client @@ -420,7 +420,7 @@ verify Profile/Back navigation. Click the picture in Profile or Account to open one modal with Abstract and Classic tabs. Classic retains the existing icon set; Abstract contains three -generated bitmap pictures. The chosen picture family follows the verified Daochi account in +generated bitmap pictures. The chosen picture family follows the verified Mesh account in `private.entity.v1.profile`, record `00000000000000000000000000000001`, schema `entity.profile-appearance.v1`, through the existing encrypted Entity record service. Old profile documents keep their classic picture. @@ -468,7 +468,7 @@ positive integer `units` and nonnegative integer `balance`, both at most 9007199254740991, matching the existing reward helper's monetary semantics. `Done` means this reply credited the account; `AlreadyClaimed` means `credited:false`, carrying the catalog units without reporting a new award. -`result.claim` uses the existing Daochi `RewardClaim` model. Neither implies +`result.claim` uses the existing Mesh `RewardClaim` model. Neither implies remote record synchronization. Provider `busy`, `signin`, `ineligible` and `failed` remain distinct terminal states; arbitrary success text is rejected. Malformed, duplicate-field, wrong-reward or oversized replies stop without an @@ -611,14 +611,14 @@ proof of purchase origin. Account keys remain native. A custom signed-account provider imports `entity/referral_native` and calls `EntityReferralsConnect(client, context)` with `(context: *void, output: *Client) --> bool`, returning the current verified Daochi Client, false when signed out. +-> bool`, returning the current verified Mesh Client, false when signed out. Forward `entity.referrals` to `EntityReferralsAnswer(request)` and pump `EntityReferralsPump()` after each frame. Call `EntityReferralsReset()` on logout/relogin (even the same key), account replacement, callback reconfiguration and disposal. The adapter also detects owner, node and device changes before queueing, before sending and after polling, and clears receipts and private lists. Shared AccountStore/native hosts do this automatically. It uses the existing signed -Daochi challenge/login and Bearer request protocol through BeginRequest. +Mesh challenge/login and Bearer request protocol through BeginRequest. The empty service request returns a bounded snapshot: owner, generation, ready, can_claim, busy, operation, error, share_url, me, page and receipt. @@ -698,4 +698,4 @@ Run `build-queue -- make canvas-profile-host-test ZIRAN=/path/to/ziran` for a real generated browser host test of the cover, shared referrals/sign-in, input isolation, document reload and mini behavior. Signed referral acceptance and cross-device assertions must also run through the adopting application's -fresh private Daochi browser integration fixture. +fresh private Mesh browser integration fixture. diff --git a/android/README.md b/android/README.md index 94ffb26..b8eb49a 100644 --- a/android/README.md +++ b/android/README.md @@ -173,10 +173,10 @@ Use the same Cloud project as Drive above. certificate pair. Sign in with Google needs them too. 3. In [Data Access](https://console.cloud.google.com/auth/scopes) add only `openid`. The node keeps no email or name. -4. Set this on the Daochi node, web client first, then restart it: +4. Set this on the Mesh node, web client first, then restart it: ```sh - DAOCHI_GOOGLE_SIGNIN_CLIENT_IDS=WEB_CLIENT_ID + MESH_GOOGLE_SIGNIN_CLIENT_IDS=WEB_CLIENT_ID ``` The Google button stays hidden until the node has this value. diff --git a/docs/premium-usernames.md b/docs/premium-usernames.md index e3a2c16..a2d1c0a 100644 --- a/docs/premium-usernames.md +++ b/docs/premium-usernames.md @@ -1,6 +1,6 @@ # Premium usernames -The Alias page asks the account's selected Daochi node for availability and +The Alias page asks the account's selected Mesh node for availability and an exact integer Dew price. New usernames use 4–32 lowercase ASCII letters, numbers or underscores. Existing usernames, including older shorter names, remain owned and free to keep. @@ -24,7 +24,7 @@ Local validation: - `make premium-alias-test` covers input normalization, bounded strict quotes, exact integer prices, grandfathered names, intent round-trips and payment actions. -- `make premium-alias-node-test` uses throwaway accounts and a private Daochi +- `make premium-alias-node-test` uses throwaway accounts and a private Mesh node for quotes, unchanged legacy saves, insufficient funds, purchases, taken/owned names and restart retry after a successful debit but failed local save. It checks that the signed ledger is unchanged by the retry. diff --git a/scripts/alias_test.py b/scripts/alias_test.py index c6cead4..018e9c2 100644 --- a/scripts/alias_test.py +++ b/scripts/alias_test.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """Account aliases through the standalone account's provider, the way the -Alias page saves one, against a private local Daochi node: normalizing what +Alias page saves one, against a private local Mesh node: normalizing what people type, saving, changing, a taken alias and an unreachable node. Nothing here touches real accounts, nodes or displays.""" import os @@ -15,7 +15,7 @@ ROOT = Path(__file__).resolve().parents[1] ENV = {key: value for key, value in os.environ.items() if key not in ('DISPLAY', 'WAYLAND_DISPLAY', 'XAUTHORITY', 'DBUS_SESSION_BUS_ADDRESS')} ZIRAN = os.environ.get('ZIRAN_BIN', 'ziran') -DAOCHI = Path(os.environ.get('DAOCHI_BIN', ROOT.parents[2] / 'kryonlabs/daochi/daochi')) +MESH = Path(os.environ.get('MESH_BIN', ROOT.parents[2] / 'ziranlang/mesh/mesh')) def package(name): @@ -25,7 +25,7 @@ def package(name): std_root = Path(os.environ.get('ZIRAN_ROOT') or package('ziran')) kryon = package('kryon') -daochi = package('daochi_client') +mesh = package('mesh_client') oqs = package('oqs') crypto = package('crypto') monocypher = package('monocypher') @@ -35,7 +35,7 @@ shutil.rmtree(output, ignore_errors=True) output.mkdir(parents=True) paths = ['--module-path', str(ROOT / 'src'), '--module-path', str(std_root / 'std'), '--module-path', f'kryon={kryon / "src/backend"}', '--module-path', str(kryon / 'src/backend'), - '--module-path', str(kryon / 'src/ui'), '--module-path', f'daochi_client={daochi}', '--module-path', str(daochi), + '--module-path', str(kryon / 'src/ui'), '--module-path', f'mesh_client={mesh}', '--module-path', str(mesh), '--module-path', f'oqs={oqs / "src"}', '--module-path', f'crypto={crypto / "src"}'] flags = subprocess.check_output(['pkg-config', '--libs', 'gtk+-3.0'], text=True).split() @@ -54,11 +54,11 @@ subprocess.run([os.environ.get('CC', 'cc'), '-std=c11', '-O2', '-ffunction-secti str(liboqs), *flags, '-lX11', '-l:libcurl.so.4', '-lpthread', '-lm', '-lz', '-o', str(executable)], check=True, env=ENV) -assert DAOCHI.is_file(), f'Build the Daochi node first ({DAOCHI}) or set DAOCHI_BIN' +assert MESH.is_file(), f'Build the Mesh node first ({MESH}) or set MESH_BIN' node_folder = output / 'node' node_folder.mkdir(mode=0o700) -node_binary = node_folder / 'daochi' -shutil.copy2(DAOCHI, node_binary) +node_binary = node_folder / 'mesh' +shutil.copy2(MESH, node_binary) def free_port(): @@ -69,9 +69,9 @@ def free_port(): port = free_port() node_url = f'http://127.0.0.1:{port}' -node_env = {**ENV, 'DAOCHI_ADDR': f'127.0.0.1:{port}', 'DAOCHI_DB': str(node_folder / 'node.db'), - 'DAOCHI_BASE_URL': node_url, 'DAOCHI_LAN_DISCOVERY': '0', - 'DAOCHI_ALLOW_EPHEMERAL_TOKEN_SECRET': '1'} +node_env = {**ENV, 'MESH_ADDR': f'127.0.0.1:{port}', 'MESH_DB': str(node_folder / 'node.db'), + 'MESH_BASE_URL': node_url, 'MESH_LAN_DISCOVERY': '0', + 'MESH_ALLOW_EPHEMERAL_TOKEN_SECRET': '1'} devices = {name: output / name for name in ('first', 'second', 'offline')} for folder in devices.values(): folder.mkdir(mode=0o700) diff --git a/scripts/canvas-profile-host-browser.mjs b/scripts/canvas-profile-host-browser.mjs index c8f9459..20ecc42 100644 --- a/scripts/canvas-profile-host-browser.mjs +++ b/scripts/canvas-profile-host-browser.mjs @@ -42,7 +42,7 @@ try{ async function until(fn,message,timeout=45000){const end=Date.now()+timeout;while(Date.now() string { return "consumer rewards" diff --git a/scripts/game_reward_client_test.py b/scripts/game_reward_client_test.py index a7cb5e7..548bcb8 100644 --- a/scripts/game_reward_client_test.py +++ b/scripts/game_reward_client_test.py @@ -35,11 +35,23 @@ run(compiler, 'bundle', '--project', '--entry', entry, '--root', work / 'ir', '- run(compiler, 'run', work / 'test.zx') # Exercise the dependency's existing reward wire/model fixture with a fake node. -daochi = Path(subprocess.check_output([compiler, 'pkg', 'path', 'daochi_client'], env=env, text=True).strip()) -run(compiler, 'build', '--root', daochi, '--module-path', tool_root / 'std', - '--target=c', '--no-main', '-o', work / 'wire', daochi / 'rewards.zi') +mesh = Path(subprocess.check_output([compiler, 'pkg', 'path', 'mesh_client'], env=env, text=True).strip()) +run(compiler, 'build', '--root', mesh, '--module-path', tool_root / 'std', + '--module-path', f'mesh_client={mesh}', + '--target=c', '--no-main', '-o', work / 'wire', mesh / 'rewards.zi') +# Qualified self-imports use package-prefixed C header names. +headers = [] +for source in mesh.glob('*.zi'): + module = source.stem + matches = [path for path in [work / 'wire' / (module + '.h'), + *(work / 'wire').glob('p*_' + module + '.h')] if path.is_file()] + if matches: + selected = min(matches, key=lambda path: len(path.name)) + headers.append(f'#define MESH_{module.upper()}_HEADER "{selected.name}"\n') +(work / 'wire/test_headers.h').write_text(''.join(headers)) run(env.get('CC', 'cc'), '-std=c11', '-O0', '-ffunction-sections', '-fdata-sections', '-Wl,--gc-sections', '-I' + str(tool_root / 'include'), '-I' + str(work / 'wire'), - daochi / 'tests/rewards_test.c', *sorted((work / 'wire').rglob('*.c')), + '-include', work / 'wire/test_headers.h', + mesh / 'tests/rewards_test.c', *sorted((work / 'wire').rglob('*.c')), '-o', work / 'reward-wire-test') run(work / 'reward-wire-test') diff --git a/scripts/game_shop_test.py b/scripts/game_shop_test.py index a765c02..094ec04 100644 --- a/scripts/game_shop_test.py +++ b/scripts/game_shop_test.py @@ -30,8 +30,8 @@ def main(): out.mkdir(parents=True, exist_ok=True) fixture = Path(tempfile.mkdtemp(prefix='fixture-', dir=out)) fixture.chmod(0o700) - compiler, kryon, daochi, crypto, oqs, mono = (package(name) for name in - ('ziran', 'kryon', 'daochi_client', 'crypto', 'oqs', 'monocypher')) + compiler, kryon, mesh, crypto, oqs, mono = (package(name) for name in + ('ziran', 'kryon', 'mesh_client', 'crypto', 'oqs', 'monocypher')) generated = out / 'generated' # This disposable output also held the previous fixture's module path. shutil.rmtree(generated, ignore_errors=True) @@ -39,7 +39,7 @@ def main(): '--module-path', 'kryon=' + str(kryon / 'src/backend'), '--module-path', str(kryon / 'src/backend'), '--module-path', 'kryon=' + str(kryon / 'src/ui'), '--module-path', str(kryon / 'src/ui'), - '--module-path', 'daochi_client=' + str(daochi), '--module-path', str(daochi), + '--module-path', 'mesh_client=' + str(mesh), '--module-path', str(mesh), '--module-path', 'crypto=' + str(crypto / 'src'), '--module-path', 'oqs=' + str(oqs / 'src')] model = out / 'model' subprocess.run([ZIRAN, 'build', '--root', str(ROOT), *paths, '--target=c', '--entry', @@ -92,12 +92,12 @@ BundleAppServices :: (context: *void, module: *u8, function: *u8, arguments: *Ho probe.bind(('127.0.0.1', 0)) port = probe.getsockname()[1] url = 'http://127.0.0.1:' + str(port) - node_env = {**ENV, 'DAOCHI_ADDR': '127.0.0.1:' + str(port), 'DAOCHI_DB': str(fixture / 'node.db'), - 'DAOCHI_BASE_URL': url, 'DAOCHI_LAN_DISCOVERY': '0', 'DAOCHI_ALLOW_EPHEMERAL_TOKEN_SECRET': '1', - 'DAOCHI_SHOVEY_ISLAND_LAUNCH_AT': str(int(time.time()) - 86400), - 'DAOCHI_ADMIN_TOKEN': admin, 'DAOCHI_TOKEN_ISSUER_PUBLIC_KEY_HEX': public.hex(), - 'DAOCHI_TOKEN_ISSUER_PRIVATE_KEY_HEX': private.hex()} - node_binary = Path(os.environ.get('DAOCHI_BIN', ROOT.parents[2] / 'kryonlabs/daochi/daochi')) + node_env = {**ENV, 'MESH_ADDR': '127.0.0.1:' + str(port), 'MESH_DB': str(fixture / 'node.db'), + 'MESH_BASE_URL': url, 'MESH_LAN_DISCOVERY': '0', 'MESH_ALLOW_EPHEMERAL_TOKEN_SECRET': '1', + 'MESH_SHOVEY_ISLAND_LAUNCH_AT': str(int(time.time()) - 86400), + 'MESH_ADMIN_TOKEN': admin, 'MESH_TOKEN_ISSUER_PUBLIC_KEY_HEX': public.hex(), + 'MESH_TOKEN_ISSUER_PRIVATE_KEY_HEX': private.hex()} + node_binary = Path(os.environ.get('MESH_BIN', ROOT.parents[2] / 'ziranlang/mesh/mesh')) devices = {name: fixture / name for name in ('first', 'second', 'other')} for path in devices.values(): path.mkdir(mode=0o700) diff --git a/scripts/native_test.py b/scripts/native_test.py index f4bc1c9..7281188 100644 --- a/scripts/native_test.py +++ b/scripts/native_test.py @@ -17,7 +17,7 @@ def package(name): std_root = Path(os.environ.get('ZIRAN_ROOT') or package('ziran')) kryon = package('kryon') -daochi = package('daochi_client') +mesh = package('mesh_client') oqs = package('oqs') crypto = package('crypto') monocypher = package('monocypher') @@ -28,7 +28,7 @@ generated = output / 'generated' shutil.rmtree(generated, ignore_errors=True) paths = ['--module-path', str(ROOT / 'src'), '--module-path', str(std_root / 'std'), '--module-path', f'kryon={kryon / "src/backend"}', '--module-path', str(kryon / 'src/backend'), '--module-path', str(kryon / 'src/ui'), - '--module-path', f'daochi_client={daochi}', '--module-path', str(daochi), + '--module-path', f'mesh_client={mesh}', '--module-path', str(mesh), '--module-path', f'oqs={oqs / "src"}', '--module-path', f'crypto={crypto / "src"}'] subprocess.run([ZIRAN, 'build', '--target=c', '--root', str(ROOT), *paths, '--entry', 'management_test:Check', '-o', str(generated), diff --git a/scripts/premium_alias_test.py b/scripts/premium_alias_test.py index fa0e878..332fa41 100644 --- a/scripts/premium_alias_test.py +++ b/scripts/premium_alias_test.py @@ -23,13 +23,13 @@ def package(name): std = Path(os.environ.get('ZIRAN_ROOT') or package('ziran')) -kryon, client, oqs, crypto, monocypher = map(package, ('kryon', 'daochi_client', 'oqs', 'crypto', 'monocypher')) +kryon, client, oqs, crypto, monocypher = map(package, ('kryon', 'mesh_client', 'oqs', 'crypto', 'monocypher')) output = ROOT / 'build/premium-alias-node-test' output.mkdir(parents=True, exist_ok=True) generated = output / 'generated' paths = ['--module-path', str(ROOT / 'src'), '--module-path', str(std / 'std'), '--module-path', f'kryon={kryon / "src/backend"}', '--module-path', str(kryon / 'src/backend'), - '--module-path', str(kryon / 'src/ui'), '--module-path', f'daochi_client={client}', + '--module-path', str(kryon / 'src/ui'), '--module-path', f'mesh_client={client}', '--module-path', str(client), '--module-path', f'oqs={oqs / "src"}', '--module-path', f'crypto={crypto / "src"}'] subprocess.run([ZIRAN, 'build', '--target=c', '--root', str(ROOT), *paths, @@ -47,8 +47,8 @@ subprocess.run([os.environ.get('CC', 'cc'), '-std=c11', '-O2', '-ffunction-secti str(monocypher / 'src/optional/monocypher-ed25519.c'), os.environ['LIBOQS_LIBRARY'], *flags, '-lX11', '-l:libcurl.so.4', '-lpthread', '-lm', '-lz', '-o', str(executable)], check=True, env=ENV) -node_binary = Path(os.environ.get('DAOCHI_BIN', ROOT.parents[2] / 'kryonlabs/daochi/daochi')) -assert node_binary.is_file(), 'Build the canonical Daochi executable first' +node_binary = Path(os.environ.get('MESH_BIN', ROOT.parents[2] / 'ziranlang/mesh/mesh')) +assert node_binary.is_file(), 'Build the canonical Mesh executable first' work = ROOT / 'work' work.mkdir(exist_ok=True) with tempfile.TemporaryDirectory(prefix='premium-alias-', dir=work) as temporary: @@ -58,10 +58,10 @@ with tempfile.TemporaryDirectory(prefix='premium-alias-', dir=work) as temporary port = probe.getsockname()[1] address = f'http://127.0.0.1:{port}' admin = secrets.token_hex(32) - node_env = dict(ENV, DAOCHI_ADDR=f'127.0.0.1:{port}', DAOCHI_DB=str(private / 'node.db'), - DAOCHI_BASE_URL=address, DAOCHI_LAN_DISCOVERY='0', - DAOCHI_ALLOW_EPHEMERAL_TOKEN_SECRET='1', DAOCHI_PREMIUM_ALIASES_ENABLED='true', - DAOCHI_TOKEN_ISSUER_PRIVATE_KEY_HEX=secrets.token_hex(32), DAOCHI_ADMIN_TOKEN=admin) + node_env = dict(ENV, MESH_ADDR=f'127.0.0.1:{port}', MESH_DB=str(private / 'node.db'), + MESH_BASE_URL=address, MESH_LAN_DISCOVERY='0', + MESH_ALLOW_EPHEMERAL_TOKEN_SECRET='1', MESH_PREMIUM_ALIASES_ENABLED='true', + MESH_TOKEN_ISSUER_PRIVATE_KEY_HEX=secrets.token_hex(32), MESH_ADMIN_TOKEN=admin) with (private / 'node.log').open('w') as log: node = subprocess.Popen([str(node_binary)], cwd=private, env=node_env, stdout=log, stderr=subprocess.STDOUT) try: diff --git a/scripts/records_test.py b/scripts/records_test.py index 041478d..a5fb062 100644 --- a/scripts/records_test.py +++ b/scripts/records_test.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """The entity.records service: on one device, then two devices of one -throwaway account syncing through a private local Daochi node. Nothing here +throwaway account syncing through a private local Mesh node. Nothing here touches real accounts, nodes or displays.""" import os from pathlib import Path @@ -15,7 +15,7 @@ ROOT = Path(__file__).resolve().parents[1] ENV = {key: value for key, value in os.environ.items() if key not in ('DISPLAY', 'WAYLAND_DISPLAY', 'XAUTHORITY', 'DBUS_SESSION_BUS_ADDRESS')} ZIRAN = os.environ.get('ZIRAN_BIN', 'ziran') -DAOCHI = Path(os.environ.get('DAOCHI_BIN', ROOT.parents[2] / 'kryonlabs/daochi/daochi')) +MESH = Path(os.environ.get('MESH_BIN', ROOT.parents[2] / 'ziranlang/mesh/mesh')) def package(name): @@ -25,7 +25,7 @@ def package(name): std_root = Path(os.environ.get('ZIRAN_ROOT') or package('ziran')) kryon = package('kryon') -daochi = package('daochi_client') +mesh = package('mesh_client') oqs = package('oqs') crypto = package('crypto') monocypher = package('monocypher') @@ -37,7 +37,7 @@ ENV['XDG_DATA_HOME'] = str(output / 'shared') ENV['YUE_DESKTOP_RECOVERY'] = '0' paths = ['--module-path', str(ROOT / 'src'), '--module-path', str(std_root / 'std'), '--module-path', f'kryon={kryon / "src/backend"}', '--module-path', str(kryon / 'src/backend'), - '--module-path', str(kryon / 'src/ui'), '--module-path', f'daochi_client={daochi}', '--module-path', str(daochi), + '--module-path', str(kryon / 'src/ui'), '--module-path', f'mesh_client={mesh}', '--module-path', str(mesh), '--module-path', f'oqs={oqs / "src"}', '--module-path', f'crypto={crypto / "src"}'] flags = subprocess.check_output(['pkg-config', '--libs', 'gtk+-3.0'], text=True).split() @@ -72,18 +72,18 @@ subprocess.run([str(local)], check=True, env={**ENV, 'ENTITY_DATA': str(data)}) private(data) print('Entity records on one device: save, list with fields, read, delete and reload passed') -assert DAOCHI.is_file(), f'Build the Daochi node first ({DAOCHI}) or set DAOCHI_BIN' +assert MESH.is_file(), f'Build the Mesh node first ({MESH}) or set MESH_BIN' synced = build('entity_records_sync_test') node_folder = output / 'node' node_folder.mkdir(mode=0o700) -node_binary = node_folder / 'daochi' -shutil.copy2(DAOCHI, node_binary) +node_binary = node_folder / 'mesh' +shutil.copy2(MESH, node_binary) with socket.socket() as probe: probe.bind(('127.0.0.1', 0)) port = probe.getsockname()[1] -node_env = {**ENV, 'DAOCHI_ADDR': f'127.0.0.1:{port}', 'DAOCHI_DB': str(node_folder / 'node.db'), - 'DAOCHI_BASE_URL': f'http://127.0.0.1:{port}', 'DAOCHI_LAN_DISCOVERY': '0', - 'DAOCHI_ALLOW_EPHEMERAL_TOKEN_SECRET': '1'} +node_env = {**ENV, 'MESH_ADDR': f'127.0.0.1:{port}', 'MESH_DB': str(node_folder / 'node.db'), + 'MESH_BASE_URL': f'http://127.0.0.1:{port}', 'MESH_LAN_DISCOVERY': '0', + 'MESH_ALLOW_EPHEMERAL_TOKEN_SECRET': '1'} node_url = f'http://127.0.0.1:{port}' with (node_folder / 'node.log').open('w') as log: node = subprocess.Popen([str(node_binary)], cwd=node_folder, env=node_env, stdout=log, stderr=subprocess.STDOUT) diff --git a/src/account_backup.zi b/src/account_backup.zi index c3183ea..f505310 100644 --- a/src/account_backup.zi +++ b/src/account_backup.zi @@ -1,10 +1,10 @@ -// The optional backup a Daochi node keeps. The node holds only text sealed on +// The optional backup a Mesh node keeps. The node holds only text sealed on // this device, so it cannot read the account or reset the password. It hands // the text back to whoever presents the proof derived from the password. #import "recovery" #import "alias_model" -#import "daochi_client/keys" -#import "daochi_client/crypto" +#import "mesh_client/keys" +#import "mesh_client/crypto" #import "std/c_string" #import "std/text_buffer" #import "std/byte_text_linux" diff --git a/src/account_handoff.zi b/src/account_handoff.zi index a26de7e..b5f22ba 100644 --- a/src/account_handoff.zi +++ b/src/account_handoff.zi @@ -18,8 +18,8 @@ #import "recovery" #import "native_files" #import "model" -#import "daochi_client/keys" -#import "daochi_client/crypto" +#import "mesh_client/keys" +#import "mesh_client/crypto" #import "std/c_string" #import "std/file" #import "std/text_buffer" diff --git a/src/account_store.zi b/src/account_store.zi index c0c1d43..4af704f 100644 --- a/src/account_store.zi +++ b/src/account_store.zi @@ -10,10 +10,10 @@ #import "pairing_client" #import "shared_account" #import "picture_publish" -#import "daochi_client/keys" -#import "daochi_client/crypto" -#import "daochi_client/client" -Auth :: #import "daochi_client/auth"; +#import "mesh_client/keys" +#import "mesh_client/crypto" +#import "mesh_client/client" +Auth :: #import "mesh_client/auth"; #import "std/c_string" #import "std/text_buffer" #import "std/vec" @@ -21,7 +21,7 @@ Auth :: #import "daochi_client/auth"; #import "std/file" #import "std/date_time_linux" #import "std/net_http" -#import "daochi_client/async_client" +#import "mesh_client/async_client" #import "kryon/http_transfer" #if #defined(PLATFORM_WEB) { #import "kryon/file_picker" diff --git a/src/dew_native.zi b/src/dew_native.zi index a4f6780..4ccbf35 100644 --- a/src/dew_native.zi +++ b/src/dew_native.zi @@ -5,17 +5,17 @@ #import "model" #import "recovery" #import "std/net_http" -#import "daochi_client/crypto" +#import "mesh_client/crypto" #import "native_files" #import "std/c_string" #import "std/json_scan" #import "std/text_buffer" #import "std/vec" #import "std/date_time_linux" -#import "daochi_client/async_client" -#import "daochi_client/client" -#import "daochi_client/keys" -Auth :: #import "daochi_client/auth"; +#import "mesh_client/async_client" +#import "mesh_client/client" +#import "mesh_client/keys" +Auth :: #import "mesh_client/auth"; #import "kryon/http_transfer" #import "dew_play" diff --git a/src/drive_backup.zi b/src/drive_backup.zi index 79ecf41..23fd137 100644 --- a/src/drive_backup.zi +++ b/src/drive_backup.zi @@ -2,7 +2,7 @@ // Google class, scope or Android adapter. The adapter receives sealed v3 only. #import "recovery" #import "passphrase" -#import "daochi_client/keys" +#import "mesh_client/keys" #import "std/text_buffer" #import "std/c_string" #import "std/byte_text_linux" diff --git a/src/entity_dew.zi b/src/entity_dew.zi index efcb823..9bb4bc7 100644 --- a/src/entity_dew.zi +++ b/src/entity_dew.zi @@ -1,6 +1,6 @@ // The entity.dew service an app calls through its host: the account's Dew // to show, and rewards to claim, such as a game's secret chest. The node -// grants every reward and gives each to an account once (daochi_client's +// grants every reward and gives each to an account once (mesh_client's // rewards); an app only names it. Without a connected account the balance is // shown as 0 and a claim answers "signin", so the app can ask the player to // connect one and claim again. @@ -23,14 +23,14 @@ #import "std/text_buffer" #import "std/vec" #import "std/date_time_linux" -#import "daochi_client/async_client" -#import "daochi_client/client" -#import "daochi_client/rewards" -#import "daochi_client/crypto" -#import "daochi_client/keys" +#import "mesh_client/async_client" +#import "mesh_client/client" +#import "mesh_client/rewards" +#import "mesh_client/crypto" +#import "mesh_client/keys" #import "reward_migration" #import "game_shop_native" -Auth :: #import "daochi_client/auth"; +Auth :: #import "mesh_client/auth"; #import "kryon/http_transfer" ENTITY_DEW_SERVICE :: "entity.dew" diff --git a/src/entity_records.zi b/src/entity_records.zi index f3cc246..3f82e7c 100644 --- a/src/entity_records.zi +++ b/src/entity_records.zi @@ -1,5 +1,5 @@ // The "entity.records" app service: the account's own records of each kind -// (Daochi docs/entity-data.md), such as Shovey's levels, kept once for the +// (Mesh docs/entity-data.md), such as Shovey's levels, kept once for the // account and shared by every app. A request is answered at once from this // device's copy, so saving never waits for the node; the records then sync // in the account's signed sync as the entity app, sealed with the record key @@ -34,15 +34,15 @@ #import "std/vec" #import "std/net_http" #import "std/date_time_linux" -#import "daochi_client/entity" -#import "daochi_client/crypto" -#import "daochi_client/keys" -#import "daochi_client/client" -#import "daochi_client/sync" -#import "daochi_client/async_client" -#import "daochi_client/async_sync" -Auth :: #import "daochi_client/auth"; -RecordCodec :: #import "daochi_client/record_codec"; +#import "mesh_client/entity" +#import "mesh_client/crypto" +#import "mesh_client/keys" +#import "mesh_client/client" +#import "mesh_client/sync" +#import "mesh_client/async_client" +#import "mesh_client/async_sync" +Auth :: #import "mesh_client/auth"; +RecordCodec :: #import "mesh_client/record_codec"; #import "kryon/http_transfer" records_c :: #system_library "c"; diff --git a/src/friends_native.zi b/src/friends_native.zi index 30c31d5..c11588e 100644 --- a/src/friends_native.zi +++ b/src/friends_native.zi @@ -2,9 +2,9 @@ #import "account_store" #import "model" #import "recovery" -#import "daochi_client/client" -#import "daochi_client/async_client" -#import "daochi_client/social" +#import "mesh_client/client" +#import "mesh_client/async_client" +#import "mesh_client/social" #import "kryon/http_transfer" #import "std/net_http" #import "std/date_time_linux" @@ -12,7 +12,7 @@ #import "std/c_string" #import "std/text_buffer" #import "std/vec" -Auth :: #import "daochi_client/auth"; +Auth :: #import "mesh_client/auth"; friend_owner: [65]u8; friend_node: [512]u8; friend_pending: PendingRequest; diff --git a/src/friends_page.zi b/src/friends_page.zi index 94335e2..544d1fc 100644 --- a/src/friends_page.zi +++ b/src/friends_page.zi @@ -168,7 +168,7 @@ FriendsPage :: (x: float32, y: *float32, width: float32) { TextLine(cast(u64)row_key, name_text, x, y.* + 8.0 * scale, content_width - status_width - 8.0 * scale, 16) Muted(cast(u64)(row_key + 3), Label("profile_request_sent", "Request sent"), x + content_width - status_width, y.* + 8.0 * scale, status_width) - // Daochi lets the sender withdraw a pending request through decline. + // Mesh lets the sender withdraw a pending request through decline. if !busy && Action(row_key + 2, Label("entity.cancel", "Cancel"), Rectangle.{x + width - cancel_width, y.*, cancel_width, 44.0 * scale}) { FriendAction("decline", TextUntilNul(id[:])) diff --git a/src/game_completion.zi b/src/game_completion.zi index b81b83b..763b278 100644 --- a/src/game_completion.zi +++ b/src/game_completion.zi @@ -1,5 +1,5 @@ // Pure map identity shared by offline games and their account providers. -#import "daochi_client/crypto" +#import "mesh_client/crypto" #import "std/number_text" #scope_file diff --git a/src/game_progress_id.zi b/src/game_progress_id.zi index 75ce026..8964e4b 100644 --- a/src/game_progress_id.zi +++ b/src/game_progress_id.zi @@ -1,7 +1,7 @@ // Record IDs are an account-provider concern. Portable games address // progress by game name and use the pure game_progress document model. #import "game_progress" -#import "daochi_client/crypto" +#import "mesh_client/crypto" // Every host derives the same record ID for one game. The account remains // the record's owner; no device, installation or wrapper goes into its ID. diff --git a/src/game_reward_client.zi b/src/game_reward_client.zi index fa4a205..21c19b8 100644 --- a/src/game_reward_client.zi +++ b/src/game_reward_client.zi @@ -2,7 +2,7 @@ #import "std/json_document" #import "std/text_buffer" #import "std/vec" -Rewards :: #import "daochi_client/rewards"; +Rewards :: #import "mesh_client/rewards"; GAME_REWARD_CLIENT_OWNER_MAX :: 128 GAME_REWARD_CLIENT_REPLY_MAX :: 4096 diff --git a/src/game_shop_native.zi b/src/game_shop_native.zi index 138ecf3..133cdb7 100644 --- a/src/game_shop_native.zi +++ b/src/game_shop_native.zi @@ -11,10 +11,10 @@ #import "std/net_http" #import "std/vec" #import "std/date_time_linux" -#import "daochi_client/async_client" -#import "daochi_client/client" -Auth :: #import "daochi_client/auth"; -ShopWire :: #import "daochi_client/entity"; +#import "mesh_client/async_client" +#import "mesh_client/client" +Auth :: #import "mesh_client/auth"; +ShopWire :: #import "mesh_client/entity"; #import "kryon/http_transfer" #import "kryon/open_uri" diff --git a/src/leaderboard_native.zi b/src/leaderboard_native.zi index 52a6ae4..9934808 100644 --- a/src/leaderboard_native.zi +++ b/src/leaderboard_native.zi @@ -3,8 +3,8 @@ #import "leaderboard_model" #import "account_store" #import "recovery" -#import "daochi_client/keys" -#import "daochi_client/crypto" +#import "mesh_client/keys" +#import "mesh_client/crypto" #import "native_files" #import "std/number_text" #import "std/byte_text_linux" @@ -15,10 +15,10 @@ #import "std/text_buffer" #import "std/vec" #import "model" -#import "daochi_client/client" -#import "daochi_client/async_client" -#import "daochi_client/social" -Auth :: #import "daochi_client/auth"; +#import "mesh_client/client" +#import "mesh_client/async_client" +#import "mesh_client/social" +Auth :: #import "mesh_client/auth"; #import "kryon/http_transfer" LeaderboardInstalled :: #type (game: string) -> bool; diff --git a/src/native_management.zi b/src/native_management.zi index 77caf8c..e38c7c8 100644 --- a/src/native_management.zi +++ b/src/native_management.zi @@ -17,13 +17,13 @@ #import "std/text_buffer" #import "std/date_time_linux" #import "std/net_http" -#import "daochi_client/keys" -#import "daochi_client/crypto" -#import "daochi_client/client" -Auth :: #import "daochi_client/auth"; -#import "daochi_client/async_client" -#import "daochi_client/async_account" -#import "daochi_client/social" +#import "mesh_client/keys" +#import "mesh_client/crypto" +#import "mesh_client/client" +Auth :: #import "mesh_client/auth"; +#import "mesh_client/async_client" +#import "mesh_client/async_account" +#import "mesh_client/social" #import "kryon/http_transfer" Json :: #import "std/json_scan"; diff --git a/src/node_url.zi b/src/node_url.zi index a9857bc..963381a 100644 --- a/src/node_url.zi +++ b/src/node_url.zi @@ -1,4 +1,4 @@ -// A Daochi node is an origin, without credentials or request parameters. +// A Mesh node is an origin, without credentials or request parameters. // Plain HTTP is restricted to loopback for a locally hosted node. NodeOrigin :: (text: string) -> string { end := text.count diff --git a/src/pairing.zi b/src/pairing.zi index 32254ba..6572a3d 100644 --- a/src/pairing.zi +++ b/src/pairing.zi @@ -8,7 +8,7 @@ // its account to them. When the showing device holds the account, the scanning // device posts its keys, both screens show a number to compare, and the showing // device seals the account to the scanner, which checks the sender against the -// code. Daochi relays the sealed messages unread. +// code. Mesh relays the sealed messages unread. // // Codes from older apps (inbe-link:1) carry an X25519 key and stay readable; // those links are sealed with X25519 alone because the other app has nothing @@ -17,8 +17,8 @@ #import "std/text" #import "std/vec" #import "std/text_buffer" -#import "daochi_client/keys" -#import "daochi_client/crypto" +#import "mesh_client/keys" +#import "mesh_client/crypto" #import "oqs/Oqs" #import "model" #import "node_url" diff --git a/src/pairing_client.zi b/src/pairing_client.zi index e293d9d..4c885f5 100644 --- a/src/pairing_client.zi +++ b/src/pairing_client.zi @@ -3,9 +3,9 @@ #import "pairing" #import "recovery" #import "model" -#import "daochi_client/keys" -#import "daochi_client/crypto" -#import "daochi_client/async_client" +#import "mesh_client/keys" +#import "mesh_client/crypto" +#import "mesh_client/async_client" #import "std/json_scan" #import "std/text" #import "std/vec" diff --git a/src/passkey.zi b/src/passkey.zi index 120e1bf..e10727a 100644 --- a/src/passkey.zi +++ b/src/passkey.zi @@ -18,8 +18,8 @@ // credential. As in v3, the node stores only SHA-256 of the login proof. #import "recovery" #import "account_backup" -#import "daochi_client/keys" -#import "daochi_client/crypto" +#import "mesh_client/keys" +#import "mesh_client/crypto" #import "std/c_string" #import "std/text_buffer" #import "std/byte_text_linux" diff --git a/src/picture_publish.zi b/src/picture_publish.zi index 22269f4..936c90b 100644 --- a/src/picture_publish.zi +++ b/src/picture_publish.zi @@ -9,9 +9,9 @@ #import "std/text_buffer" #import "std/vec" #import "std/net_http" -#import "daochi_client/client" -Auth :: #import "daochi_client/auth"; -#import "daochi_client/async_client" +#import "mesh_client/client" +Auth :: #import "mesh_client/auth"; +#import "mesh_client/async_client" #import "kryon/http_transfer" ENTITY_PICTURE_RETRY :: 60 diff --git a/src/profile_appearance.zi b/src/profile_appearance.zi index 8362d67..ac52012 100644 --- a/src/profile_appearance.zi +++ b/src/profile_appearance.zi @@ -1,4 +1,4 @@ -// One versioned appearance record for the Daochi account, independent of app. +// One versioned appearance record for the Mesh account, independent of app. #import "model" #import "std/json_scan" #import "std/text_buffer" diff --git a/src/publications.zi b/src/publications.zi index 68f2e9a..d2441b8 100644 --- a/src/publications.zi +++ b/src/publications.zi @@ -18,8 +18,8 @@ // object, such as "publication", "publications", "document" or "deleted". #import "account_store" #import "model" -#import "daochi_client/client" -#import "daochi_client/async_client" +#import "mesh_client/client" +#import "mesh_client/async_client" #import "kryon/http_transfer" #import "std/net_http" #import "std/date_time_linux" @@ -28,7 +28,7 @@ #import "std/byte_text_linux" #import "std/text_buffer" #import "std/vec" -Auth :: #import "daochi_client/auth"; +Auth :: #import "mesh_client/auth"; PUBLICATIONS_SERVICE :: "publications" // A request body holds at most 256 KiB, the document and its description. diff --git a/src/recovery.zi b/src/recovery.zi index 1e4d714..8229dc5 100644 --- a/src/recovery.zi +++ b/src/recovery.zi @@ -20,8 +20,8 @@ // before it releases a stored copy, so a node can never open what it holds. // The work factors are fixed: anything else is refused, so a hostile node or // file can neither weaken the proof it receives nor exhaust this device. -#import "daochi_client/keys" -#import "daochi_client/crypto" +#import "mesh_client/keys" +#import "mesh_client/crypto" #import "std/c_string" #import "std/text_buffer" #import "std/byte_text_linux" diff --git a/src/referral_model.zi b/src/referral_model.zi index c1a02f4..58c173b 100644 --- a/src/referral_model.zi +++ b/src/referral_model.zi @@ -1,5 +1,5 @@ #import "std/text_buffer" -// Public referral responses only. Keys, purchases and credits belong to Daochi. +// Public referral responses only. Keys, purchases and credits belong to Mesh. #import "model" #import "std/json_scan" #import "std/c_string" diff --git a/src/referral_native.zi b/src/referral_native.zi index 8c90884..be4c4e9 100644 --- a/src/referral_native.zi +++ b/src/referral_native.zi @@ -3,8 +3,8 @@ #import "referral_model" #import "dew_model" #import "model" -#import "daochi_client/client" -#import "daochi_client/async_client" +#import "mesh_client/client" +#import "mesh_client/async_client" #import "kryon/http_transfer" #import "std/net_http" #import "std/date_time_linux" @@ -12,7 +12,7 @@ #import "std/json_scan" #import "std/text_buffer" #import "std/vec" -Auth :: #import "daochi_client/auth"; +Auth :: #import "mesh_client/auth"; ReferralClient :: #type (context: *void, output: *Client) -> bool; referral_client: ReferralClient; referral_context: *void; diff --git a/src/reward_migration.zi b/src/reward_migration.zi index fe25835..adf27c2 100644 --- a/src/reward_migration.zi +++ b/src/reward_migration.zi @@ -1,10 +1,10 @@ // Open only the node's immutable pre-upgrade Shovey progress snapshot. The // proof is the XChaCha nonce-prefix subkey for that version, never the account // private key or the reusable game-progress record key. -#import "daochi_client/entity" -#import "daochi_client/crypto" -#import "daochi_client/keys" -Wire :: #import "daochi_client/wire"; +#import "mesh_client/entity" +#import "mesh_client/crypto" +#import "mesh_client/keys" +Wire :: #import "mesh_client/wire"; #import "game_progress" #import "std/json_scan" #import "std/c_string" diff --git a/src/shared_account.zi b/src/shared_account.zi index 86b602d..cb84142 100644 --- a/src/shared_account.zi +++ b/src/shared_account.zi @@ -5,8 +5,8 @@ // cannot see the file, so they keep using their own sign-in. #import "recovery" #import "native_files" -#import "daochi_client/keys" -#import "daochi_client/crypto" +#import "mesh_client/keys" +#import "mesh_client/crypto" #import "std/c_string" #import "std/text_buffer" #import "std/file" diff --git a/src/sign_in_bridge.zi b/src/sign_in_bridge.zi index effe127..d64ecee 100644 --- a/src/sign_in_bridge.zi +++ b/src/sign_in_bridge.zi @@ -11,8 +11,8 @@ #import "management" #import "account_backup" #import "recovery" -#import "daochi_client/keys" -#import "daochi_client/crypto" +#import "mesh_client/keys" +#import "mesh_client/crypto" #import "std/c_string" #import "std/text_buffer" #import "std/byte_text_linux" diff --git a/tests/account_handoff_test.zi b/tests/account_handoff_test.zi index c0b991e..5993a50 100644 --- a/tests/account_handoff_test.zi +++ b/tests/account_handoff_test.zi @@ -5,8 +5,8 @@ #import "recovery" #import "model" #import "native_files" -#import "daochi_client/keys" -#import "daochi_client/crypto" +#import "mesh_client/keys" +#import "mesh_client/crypto" #import "std/c_string" #import "std/file" #import "std/text_buffer" diff --git a/tests/alias_test.zi b/tests/alias_test.zi index 7e08032..fc82b4f 100644 --- a/tests/alias_test.zi +++ b/tests/alias_test.zi @@ -15,7 +15,7 @@ #import "std/timer_linux" #import "std/text_buffer" #import "std/byte_text_linux" -#import "daochi_client/keys" +#import "mesh_client/keys" alias_result: [32]u8; alias_message: [256]u8; diff --git a/tests/entity_records_sync_test.zi b/tests/entity_records_sync_test.zi index ad5b1fb..b7efe51 100644 --- a/tests/entity_records_sync_test.zi +++ b/tests/entity_records_sync_test.zi @@ -11,11 +11,11 @@ #import "std/timer_linux" #import "std/text_buffer" #import "std/byte_text_linux" -#import "daochi_client/keys" -#import "daochi_client/async_client" +#import "mesh_client/keys" +#import "mesh_client/async_client" #import "native_management" #import "shared_account" -Auth :: #import "daochi_client/auth"; +Auth :: #import "mesh_client/auth"; backup_observer: ManagementProvider; diff --git a/tests/game_reward_client_test.zi b/tests/game_reward_client_test.zi index 4a5dc16..aa9ac7e 100644 --- a/tests/game_reward_client_test.zi +++ b/tests/game_reward_client_test.zi @@ -2,7 +2,7 @@ #import "std/c_string" #import "std/text_buffer" #import "std/vec" -Rewards :: #import "daochi_client/rewards"; +Rewards :: #import "mesh_client/rewards"; identity: string = "alice"; reply: string; diff --git a/tests/game_shop_integration.zi b/tests/game_shop_integration.zi index d4fd9be..1763f44 100644 --- a/tests/game_shop_integration.zi +++ b/tests/game_shop_integration.zi @@ -14,8 +14,8 @@ #import "std/net_http" #import "std/timer_linux" #import "std/date_time_linux" -#import "daochi_client/keys" -#import "daochi_client/async_client" +#import "mesh_client/keys" +#import "mesh_client/async_client" #import "kryon/http_transfer" transfer: HttpTransfer; diff --git a/tests/leaderboard_test.zi b/tests/leaderboard_test.zi index 2e571ad..cc5dc51 100644 --- a/tests/leaderboard_test.zi +++ b/tests/leaderboard_test.zi @@ -2,7 +2,7 @@ #import "leaderboard_native" #import "account_store" #import "recovery" -#import "daochi_client/keys" +#import "mesh_client/keys" #import "model" #import "native_files" #import "std/c_string" @@ -12,8 +12,8 @@ #import "std/net_http" #import "std/date_time_linux" #import "std/json_scan" -#import "daochi_client/async_client" -Auth :: #import "daochi_client/auth"; +#import "mesh_client/async_client" +Auth :: #import "mesh_client/auth"; installed: bool = true; IsInstalled :: (game: string) -> bool { return installed && (game == "arcade.shovey" || game == "wurm") } diff --git a/tests/management_test.zi b/tests/management_test.zi index b1a48bf..3c000dc 100644 --- a/tests/management_test.zi +++ b/tests/management_test.zi @@ -1,18 +1,18 @@ #import "model" -#import "daochi_client/keys" -#import "daochi_client/rewards" -#import "daochi_client/client" -#import "daochi_client/async_client" +#import "mesh_client/keys" +#import "mesh_client/rewards" +#import "mesh_client/client" +#import "mesh_client/async_client" #import "account_store" #import "management" #import "dew_model" #import "dew_native" #import "entity_dew" #import "reward_migration" -#import "daochi_client/crypto" +#import "mesh_client/crypto" #import "std/json_scan" #import "native_management" -Auth :: #import "daochi_client/auth"; +Auth :: #import "mesh_client/auth"; #import "native_files" #import "recovery" #import "passphrase" diff --git a/tests/passkey_test.zi b/tests/passkey_test.zi index 7e463a6..04ebf24 100644 --- a/tests/passkey_test.zi +++ b/tests/passkey_test.zi @@ -6,8 +6,8 @@ #import "model" #import "recovery" #import "account_backup" -#import "daochi_client/keys" -#import "daochi_client/crypto" +#import "mesh_client/keys" +#import "mesh_client/crypto" #import "std/c_string" #import "std/text_buffer" #import "std/byte_text_linux" diff --git a/tests/premium_alias_node_test.zi b/tests/premium_alias_node_test.zi index 440bacf..f45ced9 100644 --- a/tests/premium_alias_node_test.zi +++ b/tests/premium_alias_node_test.zi @@ -5,7 +5,7 @@ #import "model" #import "recovery" #import "native_files" -#import "daochi_client/keys" +#import "mesh_client/keys" #import "std/c_string" #import "std/text_buffer" #import "std/timer_linux" diff --git a/tests/profile_refresh_test.zi b/tests/profile_refresh_test.zi index 4ad0554..bf84e26 100644 --- a/tests/profile_refresh_test.zi +++ b/tests/profile_refresh_test.zi @@ -9,8 +9,8 @@ #import "recovery" #import "std/c_string" #import "std/text_buffer" -#import "daochi_client/async_client" -Auth :: #import "daochi_client/auth"; +#import "mesh_client/async_client" +Auth :: #import "mesh_client/auth"; account_identity :: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; diff --git a/tests/publications_test.zi b/tests/publications_test.zi index 2d836e3..8c5bf3b 100644 --- a/tests/publications_test.zi +++ b/tests/publications_test.zi @@ -4,8 +4,8 @@ #import "level_collections" #import "account_store" #import "model" -#import "daochi_client/client" -#import "daochi_client/async_client" +#import "mesh_client/client" +#import "mesh_client/async_client" #import "std/net_http" #import "std/date_time_linux" #import "std/json_scan" @@ -13,7 +13,7 @@ #import "std/byte_text_linux" #import "std/text_buffer" #import "std/vec" -Auth :: #import "daochi_client/auth"; +Auth :: #import "mesh_client/auth"; NODE :: "http://127.0.0.1:9" AUTHOR :: "abababababababababababababababababababababababababababababababab" diff --git a/tests/referral_test.zi b/tests/referral_test.zi index ae16ad7..68b4a85 100644 --- a/tests/referral_test.zi +++ b/tests/referral_test.zi @@ -1,11 +1,11 @@ -Auth :: #import "daochi_client/auth"; +Auth :: #import "mesh_client/auth"; #import "referral_model" #import "model" #import "std/text_buffer" #import "std/vec" #import "std/net_http" -#import "daochi_client/async_client" -#import "daochi_client/client" +#import "mesh_client/async_client" +#import "mesh_client/client" #import "std/byte_text_linux" #import "referral_native" #import "referral_locales" diff --git a/tools/publication.zi b/tools/publication.zi index 4da7340..e741227 100644 --- a/tools/publication.zi +++ b/tools/publication.zi @@ -1,4 +1,4 @@ -// Publishes a JSON document as a public Daochi publication from an account +// Publishes a JSON document as a public Mesh publication from an account // key file, so a game can ship content such as its level campaign without a // new release. Players read public publications without an account. // @@ -14,11 +14,11 @@ #import "std/text_buffer" #import "std/vec" #import "std/date_time_linux" -#import "daochi_client/async_client" -#import "daochi_client/client" -#import "daochi_client/crypto" -#import "daochi_client/keys" -Auth :: #import "daochi_client/auth"; +#import "mesh_client/async_client" +#import "mesh_client/client" +#import "mesh_client/crypto" +#import "mesh_client/keys" +Auth :: #import "mesh_client/auth"; #import "kryon/http_transfer" libc :: #system_library "libc"; diff --git a/ziran.lock b/ziran.lock index a40fe32..8159f7e 100644 --- a/ziran.lock +++ b/ziran.lock @@ -89,15 +89,6 @@ "ref": "360553150917f352e49e1beb78917370792ccaef", "url": "https://github.com/ziranlang/image-codec.git" }, - { - "commit": "970d5e44b1702158cb16469892da6ff50f142427", - "dependencies": {"crypto": "pc23fbf455e97614d", "oqs": "p7098ac9cd92f7e5f"}, - "dependency_refs": {"crypto": "master", "oqs": "master"}, - "id": "p6af0b5bd9fd0cd31", - "name": "DaochiClient", - "ref": "970d5e44b1702158cb16469892da6ff50f142427", - "url": "https://github.com/ziranlang/daochi-client.git" - }, { "commit": "22d2ddbdc236796953c905a05a2cebf5ab1b4ff3", "dependencies": {"liboqs": "p1ebd917f40021322"}, @@ -116,6 +107,15 @@ "source": true, "url": "https://aomedia.googlesource.com/aom" }, + { + "commit": "c1ac6095d01bcfdd4c5ae49c4636aaf9a0303449", + "dependencies": {"crypto": "pc23fbf455e97614d", "oqs": "p7098ac9cd92f7e5f"}, + "dependency_refs": {"crypto": "master", "oqs": "master"}, + "id": "p8204ae87a845c1c3", + "name": "mesh_client", + "ref": "c1ac6095d01bcfdd4c5ae49c4636aaf9a0303449", + "url": "https://github.com/ziranlang/mesh-client.git" + }, { "commit": "51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf", "dependencies": {}, @@ -216,8 +216,8 @@ } ], "root": { - "dependencies": {"curl": "p8da229d15597ab5c", "daochi_client": "p6af0b5bd9fd0cd31", "kryon": "peb1e86e2b07f33bb", "monocypher": "p966a7198f42a3ddc", "oqs": "p7098ac9cd92f7e5f", "qrcode": "p0dfa70137405b096", "zlib": "p82dbc05081cd4d96"}, - "dependency_refs": {"curl": "19b299005fbe2d895f4ad525cfdae62a2220c3ea", "daochi_client": "970d5e44b1702158cb16469892da6ff50f142427", "kryon": "3f72441949d4e16094834fa9220e5d7fa77a0ac0", "monocypher": "master", "oqs": "master", "qrcode": "master", "zlib": "51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf"}, + "dependencies": {"curl": "p8da229d15597ab5c", "kryon": "peb1e86e2b07f33bb", "mesh_client": "p8204ae87a845c1c3", "monocypher": "p966a7198f42a3ddc", "oqs": "p7098ac9cd92f7e5f", "qrcode": "p0dfa70137405b096", "zlib": "p82dbc05081cd4d96"}, + "dependency_refs": {"curl": "19b299005fbe2d895f4ad525cfdae62a2220c3ea", "kryon": "3f72441949d4e16094834fa9220e5d7fa77a0ac0", "mesh_client": "c1ac6095d01bcfdd4c5ae49c4636aaf9a0303449", "monocypher": "master", "oqs": "master", "qrcode": "master", "zlib": "51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf"}, "name": "Entity" }, "toolchain": { diff --git a/ziran.toml b/ziran.toml index 109a4a0..f266558 100644 --- a/ziran.toml +++ b/ziran.toml @@ -62,9 +62,9 @@ account_handoff = "src/account_handoff.zi" git = "https://github.com/ziranlang/qrcode.git" ref = "master" -[dependencies.daochi_client] -git = "https://github.com/ziranlang/daochi-client.git" -ref = "970d5e44b1702158cb16469892da6ff50f142427" +[dependencies.mesh_client] +git = "https://github.com/ziranlang/mesh-client.git" +ref = "c1ac6095d01bcfdd4c5ae49c4636aaf9a0303449" [dependencies.oqs] git = "https://github.com/ziranlang/oqs.git"