feat(docker): add dev.sh with auto-funding and ATM app setup
- Add dev.sh script for managing regtest development environment - Implement cmd_fund to fund ATM app owner via Lightning.Pub API - Add --fund flag to cmd_up for automatic funding on startup - Update setup_atm_app to write VITE_APP_ID to machine .env - Fix Electron IPC to pass appId and extensionApiUrl to renderer - Restructure repo from nested lamassu-next/ to root The dev.sh script now supports: - ./dev.sh up --fund # Start regtest and auto-fund ATM - ./dev.sh fund # Fund existing ATM app - ./dev.sh status # Show environment status - ./dev.sh reset # Clean restart Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
30a2eb2199
commit
c98f126ba7
180 changed files with 2695 additions and 9587 deletions
30
packages/cashu/package.json
Normal file
30
packages/cashu/package.json
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"name": "@lamassu/cashu",
|
||||
"version": "0.1.0",
|
||||
"description": "Cashu ecash integration for offline ATM operation",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.js"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"dev": "tsc --watch",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"lint": "eslint src/"
|
||||
},
|
||||
"dependencies": {
|
||||
"@cashu/cashu-ts": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.0.0",
|
||||
"typescript": "^5.7.0",
|
||||
"vitest": "^2.1.0"
|
||||
}
|
||||
}
|
||||
17
packages/cashu/src/__tests__/index.test.ts
Normal file
17
packages/cashu/src/__tests__/index.test.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import { describe, it, expect } from 'vitest'
|
||||
import { version } from '../index.js'
|
||||
|
||||
describe('@lamassu/cashu', () => {
|
||||
describe('exports', () => {
|
||||
it('should export version', () => {
|
||||
expect(version).toBe('0.1.0')
|
||||
})
|
||||
})
|
||||
|
||||
// TODO: Add tests when cashu functionality is implemented
|
||||
describe('placeholder', () => {
|
||||
it('should pass placeholder test', () => {
|
||||
expect(true).toBe(true)
|
||||
})
|
||||
})
|
||||
})
|
||||
21
packages/cashu/src/index.ts
Normal file
21
packages/cashu/src/index.ts
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
* @lamassu/cashu
|
||||
*
|
||||
* Cashu ecash integration for offline ATM operation.
|
||||
*
|
||||
* Cashu provides:
|
||||
* - Offline payment acceptance (ecash tokens)
|
||||
* - Privacy-preserving transactions
|
||||
* - Fallback when Lightning is unavailable
|
||||
*
|
||||
* This package will implement:
|
||||
* - Token minting and verification
|
||||
* - Token redemption
|
||||
* - Mint management
|
||||
*/
|
||||
|
||||
// Placeholder export - implementation will be added as needed
|
||||
export const version = '0.1.0'
|
||||
|
||||
// Re-export cashu-ts types for convenience when implemented
|
||||
// export * from '@cashu/cashu-ts'
|
||||
22
packages/cashu/tsconfig.json
Normal file
22
packages/cashu/tsconfig.json
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"sourceMap": true,
|
||||
"outDir": "./dist",
|
||||
"rootDir": "./src",
|
||||
"strict": true,
|
||||
"strictNullChecks": true,
|
||||
"noUncheckedIndexedAccess": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["node_modules", "dist", "**/*.test.ts"]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue