spirekeeper/tests
Padreug 1f5652b425
Some checks failed
ci.yml / feat(transport): get_machine_config RPC — server-delivered machine config (#41) (pull_request) Failing after 0s
feat(transport): get_machine_config RPC — server-delivered machine config (#41)
A paired ATM pulls its operator pubkey + fee config over the already-
authenticated kind-21000 transport, instead of the operator pubkey being
provisioned into the machine's .env and the fee config learned only from an
operator-signed kind-30078 broadcast. This lets a seed-only machine (blank
.env, scanned spire-seed) leave "awaiting configuration" with zero per-machine
provisioning — closing the gap surfaced by bitspire#70. Client half: bitspire#71.

The transport is already per-machine authenticated (the ATM signs with its
bunker-minted spire key == dca_machines.machine_npub), so the handler resolves
the exact machine → operator from the verified request.sender_pubkey — same
lookup as cashin_transport, no client-supplied trust — and returns only the
caller's own config. Returns {operator_pubkey, fee_config, fiat_code,
machine_npub, wallet_id, created_at}; fee_config is None until the operator has
a super-config. Reuses build_fee_payload + get_account; AUTH_ACCOUNT; registers
soft-failing (older lnbits) like the roster hook. kind-30078 push stays
dual-run for live mid-run updates.

6 tests; full suite 235 pass; black + ruff clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 21:54:40 +02:00
..
__init__.py feat: code quality 2024-08-13 08:20:45 +02:00
conftest.py refactor: rename extension identity to spirekeeper 2026-06-13 22:30:05 +02:00
test_calculations.py refactor(v2): canonical sat-amount vocabulary + delete Lamassu-era reverse-derivation 2026-05-26 20:08:30 +02:00
test_cassette_configs.py refactor: rename extension identity to spirekeeper 2026-06-13 22:30:05 +02:00
test_cassette_state_consumer.py chore(v2): lint pass — black + ruff auto-fix + mypy regressions (#29 v1.1) 2026-05-31 15:50:14 +02:00
test_collision_guard.py refactor: rename extension identity to spirekeeper 2026-06-13 22:30:05 +02:00
test_deposit_currency.py feat(v2): lock deposit currency to machine.fiat_code (closes #26) 2026-05-16 18:03:34 +02:00
test_fee_cap_validation.py feat(v2): CRUD + per-direction fee cap validation (#38 2/5) 2026-06-01 10:42:03 +02:00
test_fee_mismatch_recording.py refactor: rename extension identity to spirekeeper 2026-06-13 22:30:05 +02:00
test_fee_publish_triggers.py feat(v2): wire fee-config publish into machine + super-config triggers (#39 3/3) 2026-06-01 20:07:56 +02:00
test_fee_transport.py feat(v2): fee_transport — kind-30078 publisher for operator fee config (#39 2/3) 2026-06-01 20:00:29 +02:00
test_machine_config_transport.py feat(transport): get_machine_config RPC — server-delivered machine config (#41) 2026-07-02 21:54:40 +02:00
test_nip44_v2.py chore(v2): lint pass — black + ruff auto-fix + mypy regressions (#29 v1.1) 2026-05-31 15:50:14 +02:00
test_nostr_attribution.py refactor(v2): canonical sat-amount vocabulary + delete Lamassu-era reverse-derivation 2026-05-26 20:08:30 +02:00
test_operator_split_legs.py feat(v2): principal-based fee split — fixes super under-payment (#38 3/5) 2026-06-01 11:24:09 +02:00
test_pair_endpoint.py fix(pairing): retry all bunker admin RPCs past transient timeouts (#38) 2026-07-02 15:30:55 +02:00
test_pairing.py fix(pairing): retry all bunker admin RPCs past transient timeouts (#38) 2026-07-02 15:30:55 +02:00
test_principal_based_fees.py feat(v2): principal-based fee split — fixes super under-payment (#38 3/5) 2026-06-01 11:24:09 +02:00
test_roster_resolver.py refactor: rename extension identity to spirekeeper 2026-06-13 22:30:05 +02:00
test_unpaired_machine_guards.py fix: complete the unpaired-machine sweep + regression test 2026-06-22 16:55:33 +02:00