From 34c2a6c42d9387608a5a53ba02ab34881df2a643 Mon Sep 17 00:00:00 2001 From: Padreug Date: Fri, 9 Oct 2026 21:58:55 +0200 Subject: [PATCH] refactor: rename the remaining Lamassu-branded identifiers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit LamassuEventKind → BitSpireEventKind (nostr-client; no consumers outside the package), the kiosk theme localStorage keys lamassu-theme / lamassu-color-mode → bitspire-* (a one-time theme reset on existing kiosks), the ui-shared UMD global LamassuUIShared → BitSpireUIShared, and the orphaned Rust HAL's Cargo name/description/repository plus its lib.rs header — now also labelled as the unbuilt leftover it is. nostr-client: 43/43 tests, tsc clean. Machine app: vue-tsc + electron tsc clean. --- apps/machine/src/composables/useTheme.ts | 4 ++-- packages/hal/Cargo.toml | 6 +++--- packages/hal/src/lib.rs | 4 ++-- packages/nostr-client/src/__tests__/events.test.ts | 4 ++-- packages/nostr-client/src/events.ts | 4 ++-- packages/nostr-client/src/index.ts | 2 +- packages/nostr-client/src/types.ts | 2 +- packages/ui-shared/vite.config.ts | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/apps/machine/src/composables/useTheme.ts b/apps/machine/src/composables/useTheme.ts index 52f73ee..becb8eb 100644 --- a/apps/machine/src/composables/useTheme.ts +++ b/apps/machine/src/composables/useTheme.ts @@ -35,8 +35,8 @@ export const themes: ThemeOption[] = [ { id: 'starrynight', label: 'Starry Night' }, ] -const THEME_KEY = 'lamassu-theme' -const MODE_KEY = 'lamassu-color-mode' +const THEME_KEY = 'bitspire-theme' +const MODE_KEY = 'bitspire-color-mode' const isElectron = !!(window as unknown as Record).electronAPI diff --git a/packages/hal/Cargo.toml b/packages/hal/Cargo.toml index 4314786..9ce2209 100644 --- a/packages/hal/Cargo.toml +++ b/packages/hal/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "lamassu-hal" +name = "bitspire-hal" version = "0.1.0" edition = "2021" -description = "Hardware Abstraction Layer for Lamassu ATM" +description = "Hardware Abstraction Layer for the bitSpire ATM (orphaned Rust HAL; not built)" license = "MIT" -repository = "https://github.com/lamassu/lamassu-next" +repository = "https://git.atitlan.io/aiolabs/bitspire" [lib] crate-type = ["cdylib"] diff --git a/packages/hal/src/lib.rs b/packages/hal/src/lib.rs index 6fff68b..32c501c 100644 --- a/packages/hal/src/lib.rs +++ b/packages/hal/src/lib.rs @@ -1,4 +1,4 @@ -//! Lamassu Hardware Abstraction Layer +//! bitSpire Hardware Abstraction Layer (orphaned Rust HAL — not built; the TypeScript HAL is the real one) //! //! This crate provides Rust implementations of hardware drivers for bill validators, //! dispensers, printers, and other ATM peripherals. These are exposed to Node.js @@ -30,7 +30,7 @@ //! # Usage //! //! ```typescript -//! import { BillValidatorWrapper, ValidatorDriver } from '@lamassu/hal' +//! import { BillValidatorWrapper, ValidatorDriver } from '@bitSpire/hal' //! //! const validator = new BillValidatorWrapper(ValidatorDriver.Id003, '/dev/ttyUSB0', 'USD') //! await validator.connect() diff --git a/packages/nostr-client/src/__tests__/events.test.ts b/packages/nostr-client/src/__tests__/events.test.ts index f072788..5c70830 100644 --- a/packages/nostr-client/src/__tests__/events.test.ts +++ b/packages/nostr-client/src/__tests__/events.test.ts @@ -2,7 +2,7 @@ import { describe, it, expect } from 'vitest' import { generateIdentity } from '../identity.js' import { LocalSigner } from '../signer.js' import { createSignedEvent, createAuthEvent, validateEvent, generateTxId } from '../events.js' -import { LamassuEventKind } from '../types.js' +import { BitSpireEventKind } from '../types.js' describe('events', () => { describe('createSignedEvent', () => { @@ -33,7 +33,7 @@ describe('events', () => { const event = await createAuthEvent(signer, relayUrl, challenge) - expect(event.kind).toBe(LamassuEventKind.Auth) + expect(event.kind).toBe(BitSpireEventKind.Auth) expect(event.content).toBe('') expect(event.tags).toContainEqual(['relay', relayUrl]) expect(event.tags).toContainEqual(['challenge', challenge]) diff --git a/packages/nostr-client/src/events.ts b/packages/nostr-client/src/events.ts index a1ff928..740733f 100644 --- a/packages/nostr-client/src/events.ts +++ b/packages/nostr-client/src/events.ts @@ -4,7 +4,7 @@ import { type Event, type EventTemplate, type VerifiedEvent, getEventHash } from 'nostr-tools' import type { Signer } from './signer.js' -import { LamassuEventKind } from './types.js' +import { BitSpireEventKind } from './types.js' /** * Sign an event template with the given signer. @@ -29,7 +29,7 @@ export function createAuthEvent( challenge: string ): Promise { return signer.signEvent({ - kind: LamassuEventKind.Auth, + kind: BitSpireEventKind.Auth, content: '', tags: [ ['relay', relayUrl], diff --git a/packages/nostr-client/src/index.ts b/packages/nostr-client/src/index.ts index e03b7f3..7cc81a8 100644 --- a/packages/nostr-client/src/index.ts +++ b/packages/nostr-client/src/index.ts @@ -96,7 +96,7 @@ export type { ClientEvents, } from './types.js' -export { LamassuEventKind } from './types.js' +export { BitSpireEventKind } from './types.js' // Re-export useful nostr-tools types export type { Event, UnsignedEvent, Filter } from 'nostr-tools' diff --git a/packages/nostr-client/src/types.ts b/packages/nostr-client/src/types.ts index 90dbc78..6cdb8c5 100644 --- a/packages/nostr-client/src/types.ts +++ b/packages/nostr-client/src/types.ts @@ -86,7 +86,7 @@ export interface SubscriptionOptions { } /** ATM-specific event kinds */ -export enum LamassuEventKind { +export enum BitSpireEventKind { /** CLINK Offer Request/Response */ ClinkOffer = 21001, /** CLINK Debit Request/Response */ diff --git a/packages/ui-shared/vite.config.ts b/packages/ui-shared/vite.config.ts index a0c49f2..443b52b 100644 --- a/packages/ui-shared/vite.config.ts +++ b/packages/ui-shared/vite.config.ts @@ -7,7 +7,7 @@ export default defineConfig({ build: { lib: { entry: resolve(__dirname, 'src/index.ts'), - name: 'LamassuUIShared', + name: 'BitSpireUIShared', fileName: 'index', }, rollupOptions: {