Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
4eef13b
feat(testnet): read InstantSend locks from the DAPI bloom stream
PastaPastaPasta Oct 23, 2026
64d09b0
feat(islock): subscribe on several evonodes at once and take the firs…
PastaPastaPasta Oct 23, 2026
45d40b0
refactor(islock): drop redundant node counters in multi-node subscribe
PastaPastaPasta Oct 23, 2026
a057e84
fix(testnet): read Platform status through the EvoSDK
PastaPastaPasta Oct 23, 2026
c0d9e85
feat(testnet): fetch the live evonode list at client init
PastaPastaPasta Oct 24, 2026
7b453e3
docs(testnet): align comments, docs and e2e with the DAPI stream model
PastaPastaPasta Oct 24, 2026
49b2094
fix(testnet): harden client init, status routing and evonode parsing
PastaPastaPasta Oct 24, 2026
d473390
fix(islock): fail the subscription before broadcast when every node f…
PastaPastaPasta Oct 24, 2026
e7e981c
fix(islock): race the start height across nodes instead of one random…
PastaPastaPasta Oct 24, 2026
35eddc7
fix(testnet): don't download the EvoSDK just for the health indicator
PastaPastaPasta Oct 24, 2026
abb4ec8
fix(ui): keep the health indicator fresh and visible across resets
PastaPastaPasta Oct 24, 2026
30fe215
feat(islock): log which node delivered the InstantSend lock
PastaPastaPasta Oct 24, 2026
afc6dc8
fix(testnet): address review of the height race and health indicator
PastaPastaPasta Oct 24, 2026
55801a2
feat(testnet): connect the EvoSDK when a funding flow starts
PastaPastaPasta Oct 24, 2026
7945718
fix(testnet): keep the degraded verdict stable and polls from racing
PastaPastaPasta Oct 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ src/
│ └── builder.ts # InstantSend lock proof building
├── api/ # Network communication
│ ├── insight.ts # Insight API client (UTXO fetching, broadcast)
│ └── dapi.ts # DAPI client (Platform operations, InstantSend)
│ ├── dapi.ts # JSON-RPC client (mainnet InstantSend locks, best chain lock)
│ ├── dapi-subscription.ts # DAPI bloom-filter stream (testnet/devnet InstantSend locks)
│ ├── islock.ts # IslockService: picks the InstantSend lock source per network
│ └── evonodes.ts # Live testnet evonode list (static list in config.ts is the fallback)
├── platform/ # Dash Platform operations
│ ├── identity.ts # Identity registration and top-up
│ └── login.ts # Sign in with Dash: key checks and signing
Expand Down Expand Up @@ -81,6 +84,12 @@ Uses random one-time keypair (not HD-derived) to add credits to an existing iden

Network is determined by URL parameter: `?network=mainnet` (defaults to testnet).

InstantSend lock source and Platform status per network:

- **mainnet**: JSON-RPC at `rpc.digitalcash.dev` (`rpcUrl` in `config.ts`).
- **testnet**: no JSON-RPC service (trpc.digitalcash.dev never upgraded to Core V24). The lock comes from the DAPI bloom-filter stream on evonodes, discovered from the quorum service at init with the static `dapiAddresses` as fallback. Platform status is read through the EvoSDK (`platform/status.ts`) because dapi-client's `platform.getStatus()` throws on testnet nodes.
- **devnets**: their configured `rpcUrl` if any, otherwise the DAPI stream over their `dapiAddresses`; Platform status through dapi-client.

## Dependencies

Core dependencies: `@dashevo/evo-sdk`, `@noble/hashes`, `@noble/secp256k1`, `@scure/bip32`, `@scure/bip39`, `bs58check`, `qrcode`
38 changes: 38 additions & 0 deletions e2e/deterministic.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,44 @@ import {
const MOCK_QUERY = '/?network=testnet&e2e=mock';

test.describe('Deterministic UI E2E (mock mode)', () => {
test('testnet discovers evonodes from the quorum service, never calls digitalcash.dev and does not load the SDK for the health poll', async ({ page }) => {
const digitalcashRequests: string[] = [];
const sdkRequests: string[] = [];
page.on('request', (request) => {
const url = new URL(request.url());
if (/(^|\.)digitalcash\.dev$/.test(url.hostname)) digitalcashRequests.push(request.url());
// The EvoSDK bundle/wasm must not be fetched just to draw the health indicator.
if (/evo-sdk|wasm[-_]sdk/i.test(url.pathname)) sdkRequests.push(request.url());
});
await page.route('https://quorums.testnet.networks.dash.org/masternodes', (route) =>
route.fulfill({
status: 200,
contentType: 'application/json',
headers: { 'access-control-allow-origin': '*' },
body: JSON.stringify({
success: true,
data: [1, 2, 3].map((n) => ({
address: `203.0.113.${n}:19999`,
status: 'ENABLED',
versionCheck: 'success',
})),
}),
})
);

// Client init (warmup) fetches the evonode list and starts network-status polling.
const evonodeRequest = page.waitForRequest('https://quorums.testnet.networks.dash.org/masternodes', {
timeout: 15000,
});
await page.goto(MOCK_QUERY);
await evonodeRequest;
// Let the first network-status poll (Insight + Platform status) go out.
await page.waitForTimeout(2000);

expect(digitalcashRequests).toEqual([]);
expect(sdkRequests).toEqual([]);
});

test('create identity flow transitions to completion and DPNS registration', async ({ page }) => {
await page.goto(MOCK_QUERY);

Expand Down
Loading
Loading