Skip to content

Commit d0657f1

Browse files
Ryang-21quietbitsoceans404claude
authored
Modernization (#1444)
* [Modernization] Make fetch default (#1394) * Replace __USE_AXIOS__ dynamic require with static fetch default * Add babel and webpack aliasing to emit axios variant from shared source * Flip package.json exports: fetch default, /axios opt-in, drop /no-axios * Update eventsource and remove no-eventsource build (#1395) * update eventsource to v4.1.0 and remove conditional import of eventsource * remove the dom-monkeypatch as its now included in the tsconfig lib field * build and export cjs and esm build varients, remove export of umd bundles * Base Migration (#1399) * move stellar-base src under src/base * migrate from classic yarn to pnpm (#1400) * remove randomBytes for universal crypto.getRandomValues * replace sha.js with noble/hashes and update to version 2.2.0 * update BigNumber to v11.0.0 * replace noble/curves with noble/ed25519 for reduced bundle size * replace toml with smol-toml * replace URI for native URL (#1402) * refactor: replace URI usage for native URL + URLSearchParam objects * allow expandUriTemplate to handle relative templated links * Tooling modernization: Node 22, husky v9, pnpm minimumReleaseAge, drop nyc (#1408) * Update husky config + remove nyc * Root .nvmrc + bump Node to v22 * pnpm minimumReleaseAge config * Use pnpm workspace (#1417) * New docs (#1413) * TypeDoc setup * P27 updates (#1429) * Update XDR base URLs and improve Makefile for TypeScript definitions * pull and regenerate xdr definitions for p27 * handle signing the new SorobanCredential varients * add CAP-71 delegate-credential signing helpers - buildAuthorizationEntryPreimage: expose the signature payload (authorizeEntry now builds its preimage through it) - buildWithDelegatesEntry: wrap ADDRESS/ADDRESS_V2 into ADDRESS_WITH_DELEGATES, sorting + de-duping delegates; top-level signature defaults to Void - authorizeEntry: optional forAddress to fill a specific node (top-level or a delegate) instead of always the top-level - export the new helpers + DelegateSignature/BuildWithDelegatesParams from base * Update readme + pre-push check for docs (#1430) * Pre-push hook + updated docs * Update pre-push hook * Add @stellar/stellar-base migration guide to the installation docs * Map xdr.HashIdPreimage in typedoc to fix docs:reference build --------- Co-authored-by: oceans404 <so.orpilla@gmail.com> * Tx builder type regression (#1438) * Implement TransactionSource interface for Account and MuxedAccount classes; update TransactionBuilder to use TransactionSource * TSDoc: Replace @internal with @ignore tag (#1436) * TSDoc: Replace @internal with @ignore tag * Add friendbot call builder items * Dependency updates (#1433) * Minor: axios + bignumber.js * Patch: vitest + @vitest * Minor astro + patch @astro * Minor: esbuild to v0.27.7 (not latest v0.28.0) * Some patch + minor * Major: @rollup/plugin-commonjs * Major: cross-env + dotenv * Major: jsdom * Updated pnpm-lock * Auth flag namespace (#1441) * add back AuthFlag namespace * fix: update build types script for axios to ensure generated types are copied correctly * P27 guide (#1440) * add p27 guide * docs: add task-oriented guides (connect-and-fund, send-a-payment) + internal-link tooling (#1434) * docs: add internal-link tooling (base-prefix rewriting + dead-link validation) * docs: add connect-and-fund and send-a-payment guides * docs: add issue-an-asset guide * docs: refine issue-an-asset guide (token framing, typed helper, review fixes) * docs: add query-and-stream guide * docs: add handle-errors guide * docs: link guides 02-04 to the handle-errors guide Add error-handling pointers now that guide 05 exists (sibling-link upgrade): a primary pointer in guide 02's submit section and lighter pointers in 03/04. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs: add invoke-a-contract guide (06) Teaches invoking a deployed Soroban contract from JS with contract.Client and AssembledTransaction: connect over RPC, preview a call by simulation, then sign and send a state change. Uses the increment contract; deployment is linked out to the Stellar CLI tutorial. Regenerate llms bundles. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs: add contract-auth guide (07) Covers signing Soroban contract authorization for an account other than the transaction source, framed for AddressV2 (CAP-0071-02) readiness: the same code is correct on the legacy ADDRESS credential today and on AddressV2 after the Protocol 28 flip. Distinguishes envelope signing from authorization-entry signing, and gives a before/after migration for hand-rolled signers (buildAuthorizationEntryPreimage / authorizeEntry). Also upgrades the Invoke a Contract guide's closing link to point at this guide, replaces numbered guide references with named links, and regenerates the llms bundles. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs: fold versioning into the home page, drop it as a guide Versioning and compatibility is reference material, not a task how-to, so it moves out of the guides nav into a 'Versioning and compatibility' section on the home page (README -> index). Repoints the agents.md reference to the new home-page anchor and regenerates index.md + llms bundles. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs: add migration guide (00) A versioned breaking-changes guide for upgrading to the v16 modernization release (base fold-in, native fetch, ESM, Node 22) and Protocol 27 / 28 Soroban auth (AddressV2). Modeled on viem's migration guide: one section per version, one entry per change, with before/after diffs. Sorts first in the guides nav and opens with a pointer to the home-page versioning section. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs: link API references in migration guide (00) Link the first mention of each documented symbol (Keypair, the auth helpers, contract.Client/basicNodeSigner/signAuthEntries, rpc.Server/Horizon.Server, getLatestLedger, BalanceResponse, SigningCallback) to its reference page, base-agnostic, matching guide 07. Anchors verified against the rendered reference pages; internal link check passes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Ryan Yang <ryan.yang@stellar.org> Co-authored-by: Iveta <iveta@stellar.org> * update package version to 16.0.0-rc.1 * fix: improve token formatting logic --------- Co-authored-by: Iveta <quietbits@users.noreply.github.com> Co-authored-by: oceans404 <so.orpilla@gmail.com> Co-authored-by: Steph <91382964+oceans404@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Iveta <iveta@stellar.org>
1 parent c5eafa2 commit d0657f1

398 files changed

Lines changed: 182806 additions & 11501 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/bundle_size.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/docs_build.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Docs build
2+
3+
on:
4+
pull_request:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
check:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Setup pnpm
17+
uses: pnpm/action-setup@v4
18+
19+
- name: Install Node (22.x)
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: "22.x"
23+
cache: pnpm
24+
cache-dependency-path: pnpm-lock.yaml
25+
26+
- name: Enable Corepack
27+
run: corepack enable
28+
29+
- name: Install Dependencies
30+
run: pnpm install --frozen-lockfile --network-concurrency 1
31+
32+
- name: Cache Astro build
33+
uses: actions/cache@v4
34+
with:
35+
path: .astro
36+
key: astro-${{ hashFiles('astro.config.mjs', 'pnpm-lock.yaml') }}
37+
38+
- name: Build reference docs
39+
run: pnpm docs:reference
40+
41+
- name: Build llms.txt bundles
42+
run: pnpm docs:llms
43+
44+
- name: Verify generated docs are up to date
45+
run: git diff --exit-code -- docs/
46+
47+
- name: Generate robots.txt from config
48+
run: pnpm docs:robots
49+
50+
- name: Generate .htaccess from config (Apache hosts only)
51+
run: pnpm docs:htaccess
52+
53+
- name: Build Starlight site
54+
run: pnpm docs:site

.github/workflows/docs_deploy.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Docs deploy
2+
3+
on:
4+
push:
5+
branches: [master]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Setup pnpm
25+
uses: pnpm/action-setup@v4
26+
27+
- name: Install Node (22.x)
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: "22.x"
31+
cache: pnpm
32+
cache-dependency-path: pnpm-lock.yaml
33+
34+
- name: Enable Corepack
35+
run: corepack enable
36+
37+
- name: Install Dependencies
38+
run: pnpm install --frozen-lockfile --network-concurrency 1
39+
40+
- name: Cache Astro build
41+
uses: actions/cache@v4
42+
with:
43+
path: .astro
44+
key: astro-${{ hashFiles('astro.config.mjs', 'pnpm-lock.yaml') }}
45+
46+
- name: Build docs
47+
run: pnpm run docs
48+
49+
- name: Upload Pages artifact
50+
uses: actions/upload-pages-artifact@v3
51+
with:
52+
path: dist/site
53+
54+
deploy:
55+
needs: build
56+
runs-on: ubuntu-latest
57+
environment:
58+
name: github-pages
59+
url: ${{ steps.deployment.outputs.page_url }}
60+
steps:
61+
- name: Deploy to GitHub Pages
62+
id: deployment
63+
uses: actions/deploy-pages@v4

.github/workflows/e2e.yml

Lines changed: 36 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
test:
1010
env:
11-
NODE: "20"
11+
NODE: "22"
1212
name: Test contract.Client (${{ matrix.job }})
1313
runs-on: ubuntu-22.04
1414
strategy:
@@ -27,35 +27,41 @@ jobs:
2727
ENABLE_SOROBAN_RPC: true
2828
PROTOCOL_VERSION: 25
2929
options: >-
30-
--health-cmd "curl --no-progress-meter --fail-with-body -X POST \"http://localhost:8000/soroban/rpc\" -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"id\":8675309,\"method\":\"getNetwork\"}' && curl --no-progress-meter \"http://localhost:8000/friendbot\" | grep '\"invalid_field\": \"addr\"'"
31-
--health-interval 10s
32-
--health-timeout 5s
33-
--health-retries 50
30+
--health-cmd "curl --no-progress-meter --fail-with-body -X POST
31+
\"http://localhost:8000/soroban/rpc\" -H 'Content-Type:
32+
application/json' -d
33+
'{\"jsonrpc\":\"2.0\",\"id\":8675309,\"method\":\"getNetwork\"}' &&
34+
curl --no-progress-meter \"http://localhost:8000/friendbot\" | grep
35+
'\"invalid_field\": \"addr\"'" --health-interval 10s --health-timeout
36+
5s --health-retries 50
3437
steps:
35-
- uses: actions/checkout@v4
36-
with:
37-
submodules: true
38-
- uses: actions/cache@v4
39-
with:
40-
path: |
41-
target/
42-
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
43-
- uses: actions/setup-node@v4
44-
with:
45-
node-version: ${{ env.NODE }}
46-
- uses: stellar/stellar-cli@v23.4.0
38+
- uses: actions/checkout@v4
39+
with:
40+
submodules: true
41+
- name: Setup pnpm
42+
uses: pnpm/action-setup@v4
43+
- uses: actions/cache@v4
44+
with:
45+
path: |
46+
target/
47+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
48+
- uses: actions/setup-node@v4
49+
with:
50+
node-version: ${{ env.NODE }}
51+
cache: pnpm
52+
cache-dependency-path: pnpm-lock.yaml
53+
- uses: stellar/stellar-cli@v23.4.0
4754

48-
# Install system dependencies required for Stellar CLI
49-
- name: Install system dependencies
50-
run: |
51-
sudo apt-get update
52-
sudo apt-get install -y libdbus-1-dev pkg-config
55+
# Install system dependencies required for Stellar CLI
56+
- name: Install system dependencies
57+
run: |
58+
sudo apt-get update
59+
sudo apt-get install -y libdbus-1-dev pkg-config
5360
54-
# Workaround for some `yarn` nonsense, see:
55-
# https://github.com/yarnpkg/yarn/issues/6312#issuecomment-429685210
56-
- run: rustup target add wasm32v1-none
57-
- run: yarn install --network-concurrency 1
58-
- run: yarn playwright install
59-
- run: yarn playwright install-deps
60-
- run: yarn build:prod
61-
- run: yarn ${{ matrix.job }}
61+
- run: corepack enable
62+
- run: rustup target add wasm32v1-none
63+
- run: pnpm install --frozen-lockfile --network-concurrency 1
64+
- run: pnpm exec playwright install
65+
- run: pnpm exec playwright install-deps
66+
- run: pnpm run build:prod
67+
- run: pnpm run ${{ matrix.job }}

.github/workflows/format.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Code Formatting
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [master]
66
pull_request:
77

88
jobs:
@@ -12,21 +12,27 @@ jobs:
1212
- name: Checkout
1313
uses: actions/checkout@v4
1414

15-
- name: Use Node.js 20
15+
- name: Setup pnpm
16+
uses: pnpm/action-setup@v4
17+
18+
- name: Use Node.js 22
1619
uses: actions/setup-node@v4
1720
with:
18-
node-version: 20
21+
node-version: 22
22+
cache: pnpm
23+
cache-dependency-path: pnpm-lock.yaml
24+
25+
- name: Enable Corepack
26+
run: corepack enable
1927

20-
# Workaround for some `yarn` nonsense, see:
21-
# https://github.com/yarnpkg/yarn/issues/6312#issuecomment-429685210
2228
- name: Install Dependencies
23-
run: yarn install --network-concurrency 1
29+
run: pnpm install --frozen-lockfile --network-concurrency 1
2430

2531
- name: Run Linter Checks
2632
run: |
27-
yarn fmt
33+
pnpm run fmt
2834
if ! git diff-index --quiet HEAD; then
29-
echo "::error::Formatting issues detected. Please run 'yarn fmt' locally and commit the changes."
35+
echo "::error::Formatting issues detected. Please run 'pnpm run fmt' locally and commit the changes."
3036
git diff --stat
3137
git diff
3238
exit 1

.github/workflows/gh_pages.yaml

Lines changed: 0 additions & 51 deletions
This file was deleted.

.github/workflows/npm_publish.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
types: [published]
66

77
permissions:
8-
id-token: write # Required for OIDC
8+
id-token: write # Required for OIDC
99
contents: read
1010

1111
jobs:
@@ -15,23 +15,31 @@ jobs:
1515
- name: Checkout
1616
uses: actions/checkout@v4
1717

18+
- name: Setup pnpm
19+
uses: pnpm/action-setup@v4
20+
1821
- name: Install Node
1922
uses: actions/setup-node@v4
2023
with:
21-
node-version: '20.x'
22-
registry-url: 'https://registry.npmjs.org'
24+
node-version: "22.x"
25+
registry-url: "https://registry.npmjs.org"
26+
cache: pnpm
27+
cache-dependency-path: pnpm-lock.yaml
2328

2429
- name: Upgrade npm for OIDC trusted publishing
2530
run: npm install -g npm@^11.5.1
2631

32+
- name: Enable Corepack
33+
run: corepack enable
34+
2735
- name: Install Dependencies
28-
run: yarn install
36+
run: pnpm install --frozen-lockfile --network-concurrency 1
2937

3038
- name: Install Playwright
31-
run: yarn playwright install --with-deps chromium firefox
39+
run: pnpm exec playwright install --with-deps chromium firefox
3240

3341
- name: Build, Test, and Package
34-
run: yarn preversion
42+
run: pnpm run preversion
3543

3644
- name: Publish npm package
37-
run: npm publish --access public --provenance
45+
run: npm publish --access public --provenance --tag "p27"

0 commit comments

Comments
 (0)