aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Expand)AuthorAgeFilesLines
...
* content tweaksAdam Soltys2022-10-056-13/+12
* handle login/registration errorsAdam Soltys2022-10-057-12/+25
* prettierAdam Soltys2022-10-0510-14/+18
* detect internal sendsAdam Soltys2022-10-0513-68/+178
* fix wide screen avatar positionAdam Soltys2022-10-043-3/+9
* rm logsAdam Soltys2022-10-042-2/+0
* tip slider progress fillAdam Soltys2022-10-044-27/+37
* support endpointAdam Soltys2022-10-042-47/+78
* swap balancesAdam Soltys2022-10-041-7/+6
* tipping fixesAdam Soltys2022-10-049-135/+114
* higher res QR in full screenAdam Soltys2022-10-041-23/+37
* pass token to upload helperAdam Soltys2022-10-043-2/+4
* refactoringAdam Soltys2022-10-0425-94/+83
* refactoringAdam Soltys2022-10-0340-529/+246
* send amount confirmationAdam Soltys2022-10-036-28/+60
* load rate server sideAdam Soltys2022-10-035-63/+61
* lightning send improvementsAdam Soltys2022-10-037-58/+120
* migrate to new actions/cookies apiAdam Soltys2022-10-0314-73/+47
* send lightning endpointAdam Soltys2022-10-015-11/+65
* Guided Translation Script can detect removed stringsAdrien Hopkins2022-10-012-26/+28
* Translated new site header to FrenchAdrien Hopkins2022-10-013-7/+3
* French TranslationAdrien Hopkins2022-10-011-5/+56
* marker cssAdam Soltys2022-09-301-8/+3
* marker cluster wipAdam Soltys2022-09-301-30/+23
* sent payment confirmationAdam Soltys2022-09-3011-19/+59
* formatsecondl1ght2022-09-2910-35/+31
* update initial boundssecondl1ght2022-09-291-1/+2
* add new coffee shop to location mapsecondl1ght2022-09-291-1/+6
* address parsingAdam Soltys2022-09-2912-321/+287
* withdraw page and other fixupsAdam Soltys2022-09-2812-126/+429
* center mobile avatar positionAdam Soltys2022-09-281-1/+1
* format fiat balanceAdam Soltys2022-09-281-1/+1
* Merge remote-tracking branch 'prod/prod'Adam Soltys2022-09-281-1/+1
|\
| * push prod testJohn Barratt2022-09-271-1/+1
* | animated balanceAdam Soltys2022-09-288-32/+54
|/
* launch page redirectsAdam Soltys2022-09-274-4/+12
* spanish translationAdam Soltys2022-09-273-1/+234
* cleanupAdam Soltys2022-09-276-41/+32
* tip refactoringAdam Soltys2022-09-266-219/+241
* cleanupAdam Soltys2022-09-262-26/+13
* hide toast on payment receivedAdam Soltys2022-09-266-199/+218
* invoice updatesAdam Soltys2022-09-269-124/+143
* use invoice uuidAdam Soltys2022-09-262-3/+3
* fix autofocusAdam Soltys2022-09-261-27/+9
* wipAdam Soltys2022-09-253-14/+20
* wipAdam Soltys2022-09-2510-13/+146
* refactor tx history to remove extra containersecondl1ght2022-09-251-4/+2
* Merge branch 'master' of github.com:coinos/coinos-ui-v2secondl1ght2022-09-251-1/+4
|\
| * don't display empty addressesAdam Soltys2022-09-241-1/+4
* | fix adjust avatar positionsecondl1ght2022-09-254-6/+6
|/
lass="nx">blindMailboxId(keys.mailbox.pubkey, hex.decode(info.mailboxPubkey), keys.vtxo.privkey); const address = encodeAddress({ testnet: info.network !== 'bitcoin', serverPubkey: hex.decode(info.serverPubkey), userPubkey: keys.vtxo.pubkey, blindedMailboxId: blindedId, }); console.log('\nour ark address:', address); console.log('round-trip decode:', decodeAddress(address)); // --- 3. pay it from the bark CLI --- console.log(`\npaying ${AMOUNT_SAT} sat from alice (bark CLI)...`); execSync(`${ALICE} send ${address} "${AMOUNT_SAT} sat"`, { stdio: 'inherit' }); // --- 4. read mailbox, decode, validate --- let received = null; for (let attempt = 0; attempt < 15 && !received; attempt++) { const { messages } = await readMailbox(ARK, keys.mailbox); for (const m of messages) { if (m.kind === 'arkoor' && m.vtxos.length) received = m; } if (!received) await new Promise((res) => setTimeout(res, 2000)); } if (!received) { console.error('❌ no arkoor message in mailbox after 30s'); process.exit(1); } console.log(`\nmailbox message (checkpoint ${received.checkpoint}), ${received.vtxos.length} vtxo(s):`); const ourPub = hex.encode(keys.vtxo.pubkey); let ok = true; const check = (name, cond, detail = '') => { console.log(` ${cond ? '✓' : '✗'} ${name}${detail ? ' — ' + detail : ''}`); if (!cond) ok = false; }; for (const v of received.vtxos) { console.log(`\nvtxo ${v.id}`); console.log(` amount: ${v.amountSat} sat, expiry height: ${v.expiryHeight}, exit delta: ${v.exitDelta}`); console.log(` anchor: ${v.anchorPoint.txid}:${v.anchorPoint.vout}, genesis depth: ${v.genesis.length}`); console.log(` transitions: ${v.genesis.map((g) => g.transition.type).join(' -> ')}`); check('policy is pubkey', v.policy.type === 'pubkey', v.policy.type); check('paid to our key', v.policy.userPubkey === ourPub, v.policy.userPubkey); check('amount matches', v.amountSat === AMOUNT_SAT, String(v.amountSat)); check('server pubkey matches ark info', v.serverPubkey === info.serverPubkey); check('all genesis transitions signed', v.genesis.every((g) => g.transition.signature)); const st = await fetch(`${ESPLORA}/tx/${v.anchorPoint.txid}/status`).then((r) => r.json()); check('chain anchor tx confirmed onchain', st.confirmed === true, `esplora height ${st.block_height}`); const tip = await fetch(`${ESPLORA}/blocks/tip/height`).then((r) => r.text()); check('not expired', v.expiryHeight > Number(tip), `expires ${v.expiryHeight}, tip ${tip}`); } console.log(ok ? `\n✅ SUCCESS: native-JS client received + decoded + validated an off-chain Ark payment (balance: ${received.vtxos.reduce((n, v) => n + v.amountSat, 0)} sat)` : '\n❌ some checks failed'); process.exit(ok ? 0 : 1);