Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
77f8caf
sip solana starship
sdqede Sep 2, 2025
8905b28
run starship solana success
sdqede Sep 3, 2025
f701c5f
moved unit tests to starship folder
sdqede Sep 3, 2025
32b8ccd
Merge token.test.ts from solana-with-tests branch
sdqede Sep 3, 2025
c5e55cf
test(solana/starship): use local config endpoints + generated keypair…
sdqede Sep 3, 2025
10b9997
feat(solana-tests): make SPL token tests pass without local node
sdqede Sep 3, 2025
b20e366
modified port forward script
sdqede Sep 4, 2025
488443e
fixed the issue that ws test failed for the first time running after …
sdqede Sep 4, 2025
7c3c940
test(solana): silence expected console.error in invalid-endpoint test
sdqede Sep 4, 2025
af1cf03
feat(solana): stabilize local integration test confirmations
sdqede Sep 4, 2025
64bd1b0
fixed the spl token test issue
sdqede Sep 4, 2025
4820506
replace test utils file path
sdqede Sep 5, 2025
2eb9657
modified the path of yaml config file
sdqede Sep 5, 2025
5c3c9e4
add solana ci workflow_dispatch
sdqede Sep 5, 2025
2fa894a
chore(ci): add push trigger for sonala branch to Solana unit tests wo…
sdqede Sep 5, 2025
9d65748
ci(workflows): fix Solana workflow push trigger (sonala -> solana)
sdqede Sep 5, 2025
2d4e04a
modified resources in order to be able to run gitbhu cicd
sdqede Sep 5, 2025
f57465b
wip: ci
sdqede Sep 5, 2025
0402e83
ci(solana): port-forward before health check, then run tests
sdqede Sep 5, 2025
3b304ef
ci(solana): keep port-forward alive during tests and wait for RPC health
sdqede Sep 5, 2025
49edef5
ci(solana): run Jest sequentially with --runInBand for stability
sdqede Sep 5, 2025
8981ffb
wip: cicd, modified config
sdqede Sep 9, 2025
722ddf4
wip: solving cicd websocket issue
sdqede Sep 15, 2025
bdad65d
added readme
sdqede Sep 16, 2025
02f3041
wip: ci
sdqede Sep 16, 2025
194f750
wip: ci
sdqede Sep 16, 2025
ce29594
wip: cicd
sdqede Sep 16, 2025
ea86fab
fix port-forward
Zetazzz Sep 24, 2025
c79b9fe
Merge branch 'main' into solana
Zetazzz Sep 25, 2025
74a7484
solana queries implementation
Zetazzz Sep 27, 2025
4368f59
solana signing process
Zetazzz Oct 1, 2025
f87ddc8
Merge branch 'main' into solana-refactor-new
Zetazzz Oct 1, 2025
986b0c6
fix solana starship tests
Zetazzz Oct 1, 2025
e7828a9
Merge branch 'main' into solana-refactor-new
Zetazzz Oct 2, 2025
909356f
merge solana package.json
Zetazzz Oct 2, 2025
4eeb06d
debug solana starship testing
Zetazzz Oct 3, 2025
3894873
add debug to .gitignore
Zetazzz Oct 3, 2025
6f5c2be
recover solana starship tests
Zetazzz Oct 3, 2025
673f778
refactored integration test of solana
Zetazzz Oct 4, 2025
b5dd875
add refactor docs for solana
Zetazzz Oct 4, 2025
3c48428
fixed spl and token tests
Zetazzz Oct 4, 2025
3c75572
fix solana websocket
Zetazzz Oct 4, 2025
8a658c4
add test cases to solana ws test
Zetazzz Oct 5, 2025
f7c2284
fixed hang forever in ws client
Zetazzz Oct 5, 2025
c8f0e61
fixed ws unstable subs
Zetazzz Oct 9, 2025
b9f36c0
add solana to getSigner
Zetazzz Oct 12, 2025
2270be5
refactor utils and helpers
Zetazzz Oct 13, 2025
d44fcd4
fixed solana rpc queries
Zetazzz Oct 13, 2025
a5d641b
fixed starship tests and delete srcback
Zetazzz Oct 14, 2025
6d221f7
fixed test
Zetazzz Oct 14, 2025
a58fe3a
make solana keypair implementing IWallet
Zetazzz Oct 14, 2025
ca60ce5
regulate getSigner
Zetazzz Oct 14, 2025
978f7a5
sync solana docs
Zetazzz Oct 14, 2025
b424a32
sync docs
Zetazzz Oct 14, 2025
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
147 changes: 147 additions & 0 deletions .github/workflows/solana-unit-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
name: Run Solana Unit Tests

on:
push:
branches:
- solana
workflow_dispatch:

jobs:
networks-solana:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository 📝
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"
cache: "yarn"

- name: Install Dependencies
run: yarn install --frozen-lockfile

- name: Build Project
run: yarn build

- name: Set Up Starship Infrastructure
id: starship-infra
uses: hyperweb-io/starship-action@0.5.9
with:
config: networks/solana/starship/configs/config.yaml

- name: Port-forward and run Solana unit tests
run: |
set -euxo pipefail
# Discover namespace
NS="${{ steps.starship-infra.outputs.namespace }}"
if [ -z "${NS}" ]; then
NS=$(kubectl get pods -A -o jsonpath='{range .items[*]}{.metadata.namespace}{" "}{.metadata.name}{"\n"}{end}' | awk '/solana-genesis/{print $1; exit}' || true)
fi
echo "Using namespace: ${NS:-<unknown>}"

echo "Checking pods status..."
kubectl get pods -A -o wide || true
if [ -n "${NS}" ]; then
kubectl get pods -n "$NS" -o wide || true
(kubectl wait --for=condition=Ready pod -l app=solana-genesis -n "$NS" --timeout=300s || \
kubectl wait --for=condition=Ready pod -l app.kubernetes.io/name=solana-genesis -n "$NS" --timeout=300s) || true
fi

# Start port-forward and keep this step alive while tests run
if [ -n "${NS}" ]; then
echo "Starting port-forward process..."
PORTS_ENV_FILE="networks/solana/starship/.pf-env" NS="$NS" bash networks/solana/starship/port-forward.sh &
PF_SUPERVISOR_PID=$!
# Clean up on exit
trap 'echo "Stopping port-forward"; kill -9 ${PF_SUPERVISOR_PID} >/dev/null 2>&1 || true; pkill -f "kubectl -n ${NS} port-forward" || true' EXIT

# Give port-forward script time to start
echo "Allowing port-forward script time to initialize..."
sleep 5
else
echo "Could not determine namespace for port-forward" >&2
exit 1
fi

# Load dynamic ports from port-forward script if provided
PF_ENV="networks/solana/starship/.pf-env"
echo "Waiting for port-forward setup to complete..."
for i in $(seq 1 100); do
if [ -f "$PF_ENV" ]; then
# shellcheck disable=SC1090
. "$PF_ENV" || true
echo "Port-forward environment loaded from $PF_ENV"
cat "$PF_ENV" || true
break
fi
if [ $((i % 25)) -eq 0 ]; then
echo "Still waiting for port-forward setup... (${i}/100)"
fi
sleep 0.2
done

RPC_PORT="${SOLANA_RPC_PORT:-8899}"
WS_PORT="${SOLANA_WS_PORT:-8900}"
export SOLANA_RPC_PORT="$RPC_PORT"
export SOLANA_WS_PORT="$WS_PORT"
export SOLANA_RPC_ENDPOINT="http://127.0.0.1:${RPC_PORT}"
export SOLANA_WS_ENDPOINT="ws://127.0.0.1:${WS_PORT}"

echo "Waiting for RPC health on 127.0.0.1:${RPC_PORT} ..."
ok=0
for i in $(seq 1 60); do
if curl -fsS "http://127.0.0.1:${RPC_PORT}/health" | grep -qi ok; then
ok=1; break
fi
sleep 5
done

if [ "$ok" -ne 1 ]; then
echo "RPC not healthy; dumping diagnostics" >&2
kubectl get pods -A -o wide || true
if [ -n "${NS}" ]; then kubectl describe pods -n "$NS" || true; fi
exit 1
fi

echo "Waiting for WS port on 127.0.0.1:${WS_PORT} ..."
ws_ok=0
for i in $(seq 1 60); do
if command -v nc >/dev/null 2>&1; then
if nc -z 127.0.0.1 "${WS_PORT}" >/dev/null 2>&1; then ws_ok=1; break; fi
else
if (exec 3<>/dev/tcp/127.0.0.1/"${WS_PORT}") 2>/dev/null; then exec 3>&- 3<&-; ws_ok=1; break; fi
fi
sleep 2
done
if [ "$ws_ok" -ne 1 ]; then
echo "WebSocket port ${WS_PORT} not reachable; dumping diagnostics" >&2
echo "=== Current listening ports ==="
if command -v ss >/dev/null 2>&1; then ss -ltnp || true; fi
if command -v lsof >/dev/null 2>&1; then lsof -iTCP -sTCP:LISTEN || true; fi
echo "=== Port-forward environment file ==="
if [ -f "$PF_ENV" ]; then cat "$PF_ENV" || true; else echo "No $PF_ENV file found"; fi
echo "=== Port-forward log files ==="
ls -la networks/solana/starship/pf_*.log 2>/dev/null || echo "No port-forward log files found"
for log in networks/solana/starship/pf_*.log; do
if [ -f "$log" ]; then
echo "=== Contents of $log ==="
cat "$log" || true
fi
done
echo "=== Kubernetes services ==="
kubectl get svc -A -o wide || true
if [ -n "${NS}" ]; then
echo "=== Pods in namespace $NS ==="
kubectl get pods -n "$NS" -o wide || true
echo "=== Pod descriptions ==="
(kubectl describe pods -l app=solana-genesis -n "$NS" || \
kubectl describe pods -l app.kubernetes.io/name=solana-genesis -n "$NS") || true
fi
exit 1
fi

cd ./networks/solana
yarn test --runInBand
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,9 @@ CLAUDE.md
AGENTS.md

.cert/
debug/

# Runtime-generated port-forward environment files
**/.pf-env

.augment/
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ A single, universal signing interface for any network. Birthed from the intercha
- [Supported Networks](#supported-networks)
- [Cosmos Network](#cosmos-network)
- [Injective Network](#injective-network)
- [Solana Network](#solana-network)
- [Ethereum Network](#ethereum-network)
- [Interchain JavaScript Stack ⚛️](#interchain-javascript-stack-️)
- [Credits](#credits)
Expand All @@ -61,7 +62,7 @@ At its core, InterchainJS provides a **flexible adapter pattern** that abstracts

InterchainJS sits at the foundation of the **[Interchain JavaScript Stack](https://hyperweb.io/stack)**, a set of tools that work together like nested building blocks:

- **[InterchainJS](https://hyperweb.io/stack/interchainjs)** → Powers signing across Cosmos, Ethereum (EIP-712), and beyond.
- **[InterchainJS](https://hyperweb.io/stack/interchainjs)** → Powers signing across Cosmos, Solana, Ethereum (EIP-712), and beyond.
- **[Interchain Kit](https://hyperweb.io/stack/interchain-kit)** → Wallet adapters that connect dApps to multiple blockchain networks.
- **[Interchain UI](https://hyperweb.io/stack/interchain-ui)** → A flexible UI component library for seamless app design.
- **[Create Interchain App](https://hyperweb.io/stack/create-interchain-app)** → A developer-friendly starter kit for cross-chain applications.
Expand All @@ -76,6 +77,7 @@ The diagram below illustrates how InterchainJS connects different signer types t
graph LR
signers --> cosmos_signer["Cosmos Network"]
signers --> injective_signer["Injective Network"]
signers --> solana_signer["Solana Network"]
signers --> ethereum_signer["Ethereum Network"]
signers --> implement_signer["ANY Network"]

Expand All @@ -88,6 +90,8 @@ graph LR
injective_signer --> injective_amino["Amino Signer"]
injective_signer --> injective_direct["Direct Signer"]

solana_signer --> solana_std["Standard Signer"]

implement_signer --> any_signer["Any Signer"]

style signers fill:#f9f,stroke:#333,stroke-width:2px
Expand Down Expand Up @@ -236,6 +240,17 @@ Then an authz example website will be created and users can take a look how sign

---

### Solana Network

Build on the request-object query client with automatic protocol detection and wallet-aware workflows.

| Feature | Package |
| ---------------------------- | -------------------------------------------------------- |
| **Query & Transactions** | [@interchainjs/solana](https://docs.hyperweb.io/interchain-js/networks/solana) |
| **Standard Signer (`solana_std`)** | [Solana Signer Guide](./libs/interchainjs/README.md#solana-signers-solana_std) |

---

### Ethereum Network

| Feature | Package |
Expand Down
Loading
Loading