refactor: rename the remaining Lamassu-branded identifiers
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.
This commit is contained in:
parent
561fd35aed
commit
34c2a6c42d
8 changed files with 14 additions and 14 deletions
|
|
@ -35,8 +35,8 @@ export const themes: ThemeOption[] = [
|
||||||
{ id: 'starrynight', label: 'Starry Night' },
|
{ id: 'starrynight', label: 'Starry Night' },
|
||||||
]
|
]
|
||||||
|
|
||||||
const THEME_KEY = 'lamassu-theme'
|
const THEME_KEY = 'bitspire-theme'
|
||||||
const MODE_KEY = 'lamassu-color-mode'
|
const MODE_KEY = 'bitspire-color-mode'
|
||||||
|
|
||||||
const isElectron = !!(window as unknown as Record<string, unknown>).electronAPI
|
const isElectron = !!(window as unknown as Record<string, unknown>).electronAPI
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
[package]
|
[package]
|
||||||
name = "lamassu-hal"
|
name = "bitspire-hal"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "Hardware Abstraction Layer for Lamassu ATM"
|
description = "Hardware Abstraction Layer for the bitSpire ATM (orphaned Rust HAL; not built)"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://github.com/lamassu/lamassu-next"
|
repository = "https://git.atitlan.io/aiolabs/bitspire"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["cdylib"]
|
crate-type = ["cdylib"]
|
||||||
|
|
|
||||||
|
|
@ -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,
|
//! This crate provides Rust implementations of hardware drivers for bill validators,
|
||||||
//! dispensers, printers, and other ATM peripherals. These are exposed to Node.js
|
//! dispensers, printers, and other ATM peripherals. These are exposed to Node.js
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
//! # Usage
|
//! # Usage
|
||||||
//!
|
//!
|
||||||
//! ```typescript
|
//! ```typescript
|
||||||
//! import { BillValidatorWrapper, ValidatorDriver } from '@lamassu/hal'
|
//! import { BillValidatorWrapper, ValidatorDriver } from '@bitSpire/hal'
|
||||||
//!
|
//!
|
||||||
//! const validator = new BillValidatorWrapper(ValidatorDriver.Id003, '/dev/ttyUSB0', 'USD')
|
//! const validator = new BillValidatorWrapper(ValidatorDriver.Id003, '/dev/ttyUSB0', 'USD')
|
||||||
//! await validator.connect()
|
//! await validator.connect()
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { describe, it, expect } from 'vitest'
|
||||||
import { generateIdentity } from '../identity.js'
|
import { generateIdentity } from '../identity.js'
|
||||||
import { LocalSigner } from '../signer.js'
|
import { LocalSigner } from '../signer.js'
|
||||||
import { createSignedEvent, createAuthEvent, validateEvent, generateTxId } from '../events.js'
|
import { createSignedEvent, createAuthEvent, validateEvent, generateTxId } from '../events.js'
|
||||||
import { LamassuEventKind } from '../types.js'
|
import { BitSpireEventKind } from '../types.js'
|
||||||
|
|
||||||
describe('events', () => {
|
describe('events', () => {
|
||||||
describe('createSignedEvent', () => {
|
describe('createSignedEvent', () => {
|
||||||
|
|
@ -33,7 +33,7 @@ describe('events', () => {
|
||||||
|
|
||||||
const event = await createAuthEvent(signer, relayUrl, challenge)
|
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.content).toBe('')
|
||||||
expect(event.tags).toContainEqual(['relay', relayUrl])
|
expect(event.tags).toContainEqual(['relay', relayUrl])
|
||||||
expect(event.tags).toContainEqual(['challenge', challenge])
|
expect(event.tags).toContainEqual(['challenge', challenge])
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
import { type Event, type EventTemplate, type VerifiedEvent, getEventHash } from 'nostr-tools'
|
import { type Event, type EventTemplate, type VerifiedEvent, getEventHash } from 'nostr-tools'
|
||||||
import type { Signer } from './signer.js'
|
import type { Signer } from './signer.js'
|
||||||
import { LamassuEventKind } from './types.js'
|
import { BitSpireEventKind } from './types.js'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sign an event template with the given signer.
|
* Sign an event template with the given signer.
|
||||||
|
|
@ -29,7 +29,7 @@ export function createAuthEvent(
|
||||||
challenge: string
|
challenge: string
|
||||||
): Promise<VerifiedEvent> {
|
): Promise<VerifiedEvent> {
|
||||||
return signer.signEvent({
|
return signer.signEvent({
|
||||||
kind: LamassuEventKind.Auth,
|
kind: BitSpireEventKind.Auth,
|
||||||
content: '',
|
content: '',
|
||||||
tags: [
|
tags: [
|
||||||
['relay', relayUrl],
|
['relay', relayUrl],
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ export type {
|
||||||
ClientEvents,
|
ClientEvents,
|
||||||
} from './types.js'
|
} from './types.js'
|
||||||
|
|
||||||
export { LamassuEventKind } from './types.js'
|
export { BitSpireEventKind } from './types.js'
|
||||||
|
|
||||||
// Re-export useful nostr-tools types
|
// Re-export useful nostr-tools types
|
||||||
export type { Event, UnsignedEvent, Filter } from 'nostr-tools'
|
export type { Event, UnsignedEvent, Filter } from 'nostr-tools'
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ export interface SubscriptionOptions {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ATM-specific event kinds */
|
/** ATM-specific event kinds */
|
||||||
export enum LamassuEventKind {
|
export enum BitSpireEventKind {
|
||||||
/** CLINK Offer Request/Response */
|
/** CLINK Offer Request/Response */
|
||||||
ClinkOffer = 21001,
|
ClinkOffer = 21001,
|
||||||
/** CLINK Debit Request/Response */
|
/** CLINK Debit Request/Response */
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ export default defineConfig({
|
||||||
build: {
|
build: {
|
||||||
lib: {
|
lib: {
|
||||||
entry: resolve(__dirname, 'src/index.ts'),
|
entry: resolve(__dirname, 'src/index.ts'),
|
||||||
name: 'LamassuUIShared',
|
name: 'BitSpireUIShared',
|
||||||
fileName: 'index',
|
fileName: 'index',
|
||||||
},
|
},
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue