Skip to content
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
2e5fcfc
chore: bump @kukks/bitcoin-descriptors to 3.2.3
Kukks Mar 25, 2026
fac2994
feat: use arkade-regtest submodule for regtest environment
Kukks Mar 26, 2026
437b041
fix: add chmod +x for regtest scripts in CI
Kukks Mar 26, 2026
9d24e0b
fix: update container name and nigiri PATH for arkade-regtest
Kukks Mar 26, 2026
c8f2deb
chore: bump arkade-regtest submodule (add delegator)
Kukks Mar 26, 2026
2137f09
fix: update delegator port from 7002 to 7012
Kukks Mar 26, 2026
6f87195
chore: bump arkade-regtest (increase delegator retries)
Kukks Mar 26, 2026
3bef99c
fix: configure arkd for ts-sdk test compatibility
Kukks Mar 26, 2026
df75647
chore: bump arkade-regtest (export env vars fix)
Kukks Mar 26, 2026
a479f49
chore: bump arkade-regtest (always recreate arkd with env vars)
Kukks Mar 26, 2026
f774d10
chore: bump arkade-regtest (add wallet signer key)
Kukks Mar 26, 2026
0b6c0e2
chore: bump arkade-regtest (wallet network + unlocker fix)
Kukks Mar 26, 2026
73ec403
chore: bump arkade-regtest (custom arkd health check)
Kukks Mar 26, 2026
aa6c3de
chore: bump arkade-regtest (simpler health check)
Kukks Mar 26, 2026
229d750
chore: bump arkade-regtest (docker exec health check)
Kukks Mar 26, 2026
37030b0
chore: bump arkade-regtest (multi-method health check)
Kukks Mar 26, 2026
06fbc87
chore: bump arkade-regtest (health check debug)
Kukks Mar 26, 2026
0a811d8
chore: bump arkade-regtest (TCP health check)
Kukks Mar 26, 2026
6a15f55
chore: bump arkade-regtest (combined TCP+init health check)
Kukks Mar 26, 2026
183e35f
chore: bump arkade-regtest (admin port health check)
Kukks Mar 26, 2026
3fb08d8
chore: bump arkade-regtest (separate init retry)
Kukks Mar 26, 2026
a252896
chore: bump arkade-regtest (longer ark init retries)
Kukks Mar 26, 2026
6ce8a68
fix: update arkade-regtest with chain indexing wait and better diagno…
Kukks Mar 28, 2026
ed5a98e
chore: trigger CI
Kukks Mar 28, 2026
6ceaec6
ci: add workflow_dispatch trigger for manual CI runs
Kukks Mar 28, 2026
90ebd76
fix: update arkade-regtest with bitcoin RPC readiness check
Kukks Mar 28, 2026
a4415fb
fix: resolve merge conflicts with master (dependency rename)
Kukks Mar 28, 2026
14fcbdc
fix: update arkade-regtest submodule (bitcoin restart after arkd init)
Kukks Mar 28, 2026
7021e4e
fix: update arkade-regtest (nbxplorer sync check before custom arkd)
Kukks Mar 28, 2026
d3a91e5
fix: update arkade-regtest (nbxplorer container name, CSV block type)
Kukks Mar 28, 2026
ddc85e2
fix: update arkade-regtest (host curl, clean volumes, more retries)
Kukks Mar 28, 2026
aad37dd
fix: update arkade-regtest (remove broken nbxplorer check)
Kukks Mar 28, 2026
f9a005e
fix: use gocron scheduler for seconds-based VtxoTreeExpiry
Kukks Mar 28, 2026
e87381f
fix: use gocron + ALLOW_CSV_BLOCK_TYPE=false for v0.9.0 compat
Kukks Mar 28, 2026
4c040fe
fix: use block scheduler for v0.9.0, update regtest submodule
Kukks Mar 28, 2026
d921113
fix: update regtest submodule (GET for wallet seed endpoint)
Kukks Mar 29, 2026
dfc814a
fix: update regtest submodule (non-fatal redeem-notes)
Kukks Mar 29, 2026
b86cde7
fix: update regtest submodule (timeout for note/redeem-notes)
Kukks Mar 29, 2026
a4160a1
fix: update regtest submodule (curl timeouts + mine blocks before set…
Kukks Mar 29, 2026
650c579
fix: update regtest submodule (add ARKD_ROUND_INTERVAL for block sche…
Kukks Mar 29, 2026
64497ea
fix: reduce ARKD_ROUND_INTERVAL to 3 for faster rounds in tests
Kukks Mar 29, 2026
0d0fd6a
fix: update regtest submodule (restart chopsticks after bitcoin restart)
Kukks Mar 29, 2026
aeeb212
fix: update regtest submodule with arkd restart after chopsticks
Kukks Mar 29, 2026
c600c58
fix: update regtest submodule - move bitcoin config before arkd startup
Kukks Mar 29, 2026
f23c260
fix: skip Bitcoin Core restart to prevent nbxplorer connection loss
Kukks Mar 29, 2026
0fe76a3
fix: update regtest submodule — fund server wallet, not client boardi…
Kukks Mar 29, 2026
0fccb81
fix: update regtest — 21-tx server funding for fee estimation
Kukks Mar 29, 2026
5842c35
fix: update regtest — fund Boltz wallet for on-chain swaps
Kukks Mar 29, 2026
0949f5d
fix: update regtest — increase server funding to 21 BTC
Kukks Mar 29, 2026
efb1c87
fix: increase VTXO expiry and use fee-aware arkade-regtest
Kukks Mar 29, 2026
4807dff
fix: enable CSV block type for block-based scheduler
Kukks Mar 29, 2026
d650973
fix: VTXO expiry must be < 512 for block-based scheduling
Kukks Mar 29, 2026
0e9ce7a
fix: revert VTXO expiry to 20 blocks for ts-sdk
Kukks Mar 29, 2026
e632b9f
diag: add extensive logging to failing asset + indexer tests
Kukks Mar 29, 2026
ba65ba2
chore: bump regtest (conditional nbxplorer restart)
Kukks Mar 30, 2026
fef492d
chore: remove diagnostic logging from e2e tests
Kukks Mar 30, 2026
9d1fad9
chore: point regtest submodule to master after PR merge
Kukks Mar 30, 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
14 changes: 14 additions & 0 deletions .env.regtest
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# ts-sdk arkade-regtest overrides
ARKD_IMAGE=ghcr.io/arkade-os/arkd:v0.9.0
ARKD_WALLET_IMAGE=ghcr.io/arkade-os/arkd-wallet:v0.9.0

# Match old ts-sdk docker-compose arkd config
ARKD_ALLOW_CSV_BLOCK_TYPE=true
ARKD_VTXO_TREE_EXPIRY=20
ARKD_BOARDING_EXIT_DELAY=1024

# Zero fees — ts-sdk tests manage fees individually via setFees()/clearFees()
ARK_OFFCHAIN_INPUT_FEE="0.0"
ARK_ONCHAIN_INPUT_FEE="0.0"
ARK_OFFCHAIN_OUTPUT_FEE="0.0"
ARK_ONCHAIN_OUTPUT_FEE="0.0"
Comment on lines +16 to +19
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check if other .env files in arkade-regtest use quotes for numeric values

# Search for numeric environment variable assignments in the regtest submodule
fd -e env -e env.example . regtest/ --exec cat {} \; | grep -E '(FEE|DELAY|EXPIRY).*=' | head -20

Repository: arkade-os/ts-sdk

Length of output: 42


🏁 Script executed:

# Check repository structure and locate env files
ls -la
find . -name ".env*" -type f 2>/dev/null | head -20

Repository: arkade-os/ts-sdk

Length of output: 1787


🏁 Script executed:

# Check if regtest is a submodule and explore its contents
git config --file=.gitmodules --name-only --get-regexp path 2>/dev/null || echo "No submodules or .gitmodules not found"
ls -la | grep regtest

Repository: arkade-os/ts-sdk

Length of output: 207


🏁 Script executed:

# Read the actual .env.regtest file to get full context
cat .env.regtest

Repository: arkade-os/ts-sdk

Length of output: 517


🏁 Script executed:

# Search for how FEE variables are referenced in the codebase
rg "ARK_(?:OFFCHAIN|ONCHAIN)_(?:INPUT|OUTPUT)_FEE" -t json -t ts -t js --max-count=10

Repository: arkade-os/ts-sdk

Length of output: 42


🏁 Script executed:

# Check contents of regtest directory
ls -la regtest/

Repository: arkade-os/ts-sdk

Length of output: 170


🏁 Script executed:

# Search for setFees and clearFees implementations
rg "setFees|clearFees" --max-count=20

Repository: arkade-os/ts-sdk

Length of output: 388


🏁 Script executed:

# Search for .env pattern usage in source files
rg "process\.env|import.*env" src/ --max-count=15

Repository: arkade-os/ts-sdk

Length of output: 166


🏁 Script executed:

# Check if there's any documentation about arkd or fee configuration
find . -name "README*" -o -name "*.md" | xargs grep -l "fee\|FEE" 2>/dev/null | head -5

Repository: arkade-os/ts-sdk

Length of output: 71


🏁 Script executed:

# Read the setFees/clearFees implementation
sed -n '1,100p' test/e2e/utils.ts | cat -n

Repository: arkade-os/ts-sdk

Length of output: 3541


🏁 Script executed:

# Search for the actual implementation of setFees/clearFees function
rg "function setFees|export.*setFees" -A 10

Repository: arkade-os/ts-sdk

Length of output: 640


🏁 Script executed:

# Check README for fee-related documentation
grep -i "fee\|ARK_" README.md | head -30

Repository: arkade-os/ts-sdk

Length of output: 845


Remove quotes from fee environment variables for consistency with other numeric values.

The fee variables use quoted values ("0.0") while other numeric environment variables in the same file (ARKD_VTXO_TREE_EXPIRY=20, ARKD_BOARDING_EXIT_DELAY=1024) are unquoted. This inconsistency could potentially cause arkd's parser to treat fees as strings rather than numbers, even if the actual value is the same. Standardize by removing the quotes:

ARK_OFFCHAIN_INPUT_FEE=0.0
ARK_ONCHAIN_INPUT_FEE=0.0
ARK_OFFCHAIN_OUTPUT_FEE=0.0
ARK_ONCHAIN_OUTPUT_FEE=0.0
🧰 Tools
🪛 dotenv-linter (4.0.0)

[warning] 11-11: [QuoteCharacter] The value has quote characters (', ")

(QuoteCharacter)


[warning] 12-12: [QuoteCharacter] The value has quote characters (', ")

(QuoteCharacter)


[warning] 13-13: [QuoteCharacter] The value has quote characters (', ")

(QuoteCharacter)


[warning] 13-13: [UnorderedKey] The ARK_OFFCHAIN_OUTPUT_FEE key should go before the ARK_ONCHAIN_INPUT_FEE key

(UnorderedKey)


[warning] 14-14: [QuoteCharacter] The value has quote characters (', ")

(QuoteCharacter)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.env.regtest around lines 11 - 14, The fee environment variables
ARK_OFFCHAIN_INPUT_FEE, ARK_ONCHAIN_INPUT_FEE, ARK_OFFCHAIN_OUTPUT_FEE, and
ARK_ONCHAIN_OUTPUT_FEE are quoted which is inconsistent with other numeric env
values and may be parsed as strings; remove the surrounding quotes so each is
set as an unquoted numeric literal (e.g., ARK_OFFCHAIN_INPUT_FEE=0.0) to match
ARKD's numeric formatting and other vars like ARKD_VTXO_TREE_EXPIRY and
ARKD_BOARDING_EXIT_DELAY.

143 changes: 74 additions & 69 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,74 +7,79 @@ on:
branches: [ master, next ]

jobs:
test:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22.12.0'

- name: Install pnpm
uses: pnpm/action-setup@v4.2.0
with:
version: 10.25.0

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install

- name: Run linter
run: pnpm lint

- name: Run unit tests
run: pnpm test:unit

- name: Run Nigiri
uses: vulpemventures/nigiri-github-action@v1
with:
use_liquid: false
use_ln: false

- name: Build arkd master
run: pnpm run test:build-docker

- name: Run arkd master
run: pnpm run test:up-docker

- name: Run setup script
run: pnpm test:setup-docker

- name: Run integration tests
run: pnpm test:integration-docker

- name: Capture arkd logs
if: failure()
run: |
docker logs arkd > arkd.log || true
if [ -f arkd.log ]; then
echo "=== arkd logs ==="
cat arkd.log
fi

- name: Tear down arkd
run: pnpm run test:down-docker
if: always()

- name: Check TypeScript compilation
run: pnpm build
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22.12.0
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm lint

unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22.12.0
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm test:unit

integration:
runs-on: ubuntu-latest
needs: [lint, unit]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-go@v5
with:
go-version: '1.23'
- uses: actions/cache@v4
with:
path: regtest/_build
key: nigiri-${{ hashFiles('regtest/.env.defaults', '.env.regtest') }}
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22.12.0
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Start regtest environment
run: chmod +x regtest/*.sh regtest/helpers/*.sh && ./regtest/start-env.sh
- name: Add nigiri to PATH
run: echo "${{ github.workspace }}/regtest/_build/nigiri/build" >> $GITHUB_PATH
- name: Setup test wallets
run: pnpm test:setup-docker
- name: Run integration tests
run: pnpm test:integration-docker
env:
ARK_ENV: docker
- name: Capture logs on failure
if: failure()
run: |
docker logs ark 2>&1 || true
docker logs boltz 2>&1 || true
docker logs boltz-lnd 2>&1 || true
docker logs boltz-fulmine 2>&1 || true
- name: Cleanup
if: always()
run: chmod +x regtest/*.sh regtest/helpers/*.sh 2>/dev/null; ./regtest/clean-env.sh

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22.12.0
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm build
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "regtest"]
path = regtest
url = https://github.com/ArkLabsHQ/arkade-regtest.git
branch = feat/shared-regtest-env-discovery
128 changes: 0 additions & 128 deletions docker-compose.yml

This file was deleted.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@
"test:master": "ARK_ENV=master vitest run",
"test:unit": "vitest run --exclude test/e2e",
"test:setup": "node test/setup.mjs",
"regtest": "pnpm test:down-docker && pnpm test:build-docker && pnpm test:up-docker && pnpm test:setup-docker",
"regtest:start": "./regtest/start-env.sh",
"regtest:stop": "./regtest/stop-env.sh",
"regtest:clean": "./regtest/clean-env.sh",
"regtest": "pnpm regtest:clean && pnpm regtest:start && pnpm test:setup-docker",
"test:setup-docker": "node test/setup.mjs docker",
"test:build-docker": "docker compose -f docker-compose.yml build --no-cache",
"test:up-docker": "docker compose -f docker-compose.yml up -d",
"test:down-docker": "docker compose -f docker-compose.yml down",
"test:integration": "vitest run test/e2e/**",
"test:integration-docker": "ARK_ENV=docker vitest run test/e2e/**",
"test:watch": "vitest",
Expand All @@ -115,7 +115,7 @@
"release:cleanup": "bash scripts/release.sh --cleanup"
},
"dependencies": {
"@kukks/bitcoin-descriptors": "3.2.2",
"@kukks/bitcoin-descriptors": "3.2.3",
"@marcbachmann/cel-js": "7.3.1",
"@noble/curves": "2.0.0",
"@noble/secp256k1": "3.0.0",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions regtest
Submodule regtest added at e5b3be
39 changes: 0 additions & 39 deletions server.Dockerfile

This file was deleted.

Loading
Loading