Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Empty file added .cargo-home/.package-cache
Empty file.
3 changes: 3 additions & 0 deletions .cargo-home/git/CACHEDIR.TAG
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Signature: 8a477f597d28d172789f06886806bc55
# This file is a cache directory tag created by cargo.
# For information about cache directory tags see https://bford.info/cachedir/
1 change: 1 addition & 0 deletions .cargo-home/git/db/rs-soroban-sdk-df48d49759b97bac/HEAD
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ref: refs/heads/master
6 changes: 6 additions & 0 deletions .cargo-home/git/db/rs-soroban-sdk-df48d49759b97bac/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[core]
bare = true
repositoryformatversion = 0
filemode = true
ignorecase = true
precomposeunicode = true
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Unnamed repository; edit this file 'description' to name the repository.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
#
# Place appropriately named executable hook scripts into this directory
# to intercept various actions that git takes. See `git help hooks` for
# more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# File patterns to ignore; see `git help ignore` for more information.
# Lines that start with '#' are comments.
4 changes: 1 addition & 3 deletions .github/workflows/benchmark-regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Rust
uses: actions/setup-rust@v2
with:
rust-version: stable
uses: dtolnay/rust-toolchain@stable

- name: Install dependencies
run: |
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ jobs:
- name: Compile circuits
run: ./scripts/compile-circuits.sh

- name: Install co-noir for CRS download
run: cargo install --git https://github.com/TaceoLabs/co-snarks --branch main co-noir

- name: Download CRS
run: ./scripts/download-crs.sh

Expand Down Expand Up @@ -144,7 +147,7 @@ jobs:
run: cd app && npm ci

- name: Lint
run: cd app && npm run lint
run: cd app && npm run lint --if-present

- name: Build
run: cd app && npm run build
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/docker-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: trivy-scan-results
continue-on-error: true

- name: Generate scan summary
run: |
Expand All @@ -128,4 +129,6 @@ jobs:
ls -1 *-trivy-results.sarif | sed 's/-trivy-results.sarif//' | sed 's/^/- /' >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "Results are available in the Security tab." >> $GITHUB_STEP_SUMMARY
else
echo "⚠️ No scan results available. Check whether the image build and scan steps completed successfully." >> $GITHUB_STEP_SUMMARY
fi
93 changes: 81 additions & 12 deletions app/package-lock.json

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

5 changes: 5 additions & 0 deletions app/src/lib/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
connectFreighterWallet as connectFreighter,
trySilentReconnect as tryReconnectFreighter,
isFreighterInstalled,
getActiveAddress as getActiveFreighterAddress,
} from "./freighter";

import {
Expand Down Expand Up @@ -79,6 +80,10 @@ export async function trySilentReconnect(): Promise<WalletSession | null> {
return null;
}

export async function getActiveAddress(): Promise<string | null> {
return getActiveFreighterAddress();
}

export function getWalletDisplayName(session: WalletSession): string {
const meta = WALLET_META[session.walletType];
return meta ? meta.name : session.walletType;
Expand Down
Binary file not shown.
62 changes: 53 additions & 9 deletions scripts/check-api-spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import os
import sys
import pathlib
import subprocess

SPEC_PATH = pathlib.Path(__file__).parent.parent / "docs" / "openapi.yaml"
COORDINATOR_URL = os.environ.get("COORDINATOR_URL", "")
Expand Down Expand Up @@ -119,23 +120,66 @@ def run_schemathesis_offline() -> bool:
)
return True # non-blocking in offline mode

try:
schema = schemathesis.from_path(str(SPEC_PATH))
count = sum(1 for _ in schema.get_all_operations())
print(f"[OK] schemathesis loaded spec: {count} operations found.")
loader_candidates = [
("schemathesis.from_path", getattr(schemathesis, "from_path", None)),
(
"schemathesis.openapi.from_path",
getattr(getattr(schemathesis, "openapi", None), "from_path", None),
),
(
"schemathesis.openapi.from_file",
getattr(getattr(schemathesis, "openapi", None), "from_file", None),
),
]

loader_errors = []
for loader_name, loader in loader_candidates:
if not callable(loader):
continue
try:
if loader_name.endswith("from_file"):
with open(SPEC_PATH, "rb") as fd:
schema = loader(fd)
else:
schema = loader(str(SPEC_PATH))

count = None
if hasattr(schema, "get_all_operations"):
count = sum(1 for _ in schema.get_all_operations())
elif hasattr(schema, "get_all_endpoints"):
count = sum(1 for _ in schema.get_all_endpoints())
elif hasattr(schema, "__iter__"):
count = sum(1 for _ in schema)

if count is None:
print(f"[OK] schemathesis loaded spec via {loader_name}.")
else:
print(f"[OK] schemathesis loaded spec via {loader_name}: {count} operations found.")
return True
except Exception as exc:
loader_errors.append(f"{loader_name}: {exc}")

# Fall back to the CLI if the Python API shape changed again. The CLI is
# generally more stable across releases than the import surface.
cli_cmd = [sys.executable, "-m", "schemathesis", "run", str(SPEC_PATH), "--dry-run"]
result = subprocess.run(cli_cmd, capture_output=True, text=True)
if result.returncode == 0:
print("[OK] schemathesis loaded spec via CLI dry-run.")
return True
except Exception as exc:
print(f"[FAIL] schemathesis could not load spec: {exc}", file=sys.stderr)
return False

details = "; ".join(loader_errors) if loader_errors else "no compatible schemathesis loader found"
cli_output = (result.stderr or result.stdout).strip()
if cli_output:
details = f"{details}; CLI dry-run: {cli_output}"
print(f"[FAIL] schemathesis could not load spec: {details}", file=sys.stderr)
return False


def run_schemathesis_live() -> bool:
"""
Run a real schemathesis CLI conformance test against a live coordinator.
Uses subprocess so the output streams directly to stdout/stderr.
"""
import subprocess

checks = ",".join([
"not_a_server_error",
"response_schema_conformance",
Expand Down
6 changes: 6 additions & 0 deletions scripts/download-crs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ echo "Output directory: ${CRS_DIR}"

mkdir -p "${CRS_DIR}"

if ! command -v co-noir >/dev/null 2>&1; then
echo "ERROR: co-noir not found on PATH." >&2
echo "Install it with: cargo install --git https://github.com/TaceoLabs/co-snarks --branch main co-noir" >&2
exit 127
fi

# co-noir download-crs fetches the BN254 SRS points file
# --crs specifies the output file path, --num-points how many G1 points to download
co-noir download-crs --crs "${CRS_DIR}/bn254_g1.dat" --num-points 4194304
Expand Down
Loading
Loading