Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
84fa83d
refactor: extract type-agnostic transaction assembler
erubboli Sep 17, 2026
f7d8ac4
feat: add buildRawTransaction and forgeTransaction
erubboli Sep 17, 2026
38876bc
feat: re-export wasm encoding primitives
erubboli Sep 17, 2026
4507215
ci: add npm publish workflow on release
erubboli Sep 17, 2026
40c4f66
docs: npm publish setup handoff
erubboli Sep 17, 2026
c7b15ac
release: 1.1.0
erubboli Sep 17, 2026
3199a59
test: raw transaction builder coverage
erubboli Sep 17, 2026
d414d6d
fix(ci): make the publish workflow ship a buildable, version-verified…
erubboli Sep 17, 2026
0023768
fix(sdk): harden raw transaction input normalization
erubboli Sep 17, 2026
70c67c0
fix(sdk): raw requirements netting, IssueNft token id pre-encode, id …
erubboli Sep 17, 2026
9957cda
fix(sdk): stop cumulative fee deduction for DelegationWithdraw outputs
erubboli Sep 17, 2026
6cb36e8
refactor(sdk): shared fee table, sequence-safe nonces, block height h…
erubboli Sep 17, 2026
bbef460
docs: npm handoff typo fix; export BuiltTransaction type (reviewer nits)
erubboli Sep 17, 2026
c81d8bc
test: extract shared api mock helper
erubboli Sep 17, 2026
bdd2fc0
test: extend raw transaction coverage
erubboli Sep 17, 2026
30c99ba
fix(sdk): zero-amount decimals, withdraw underflow guard, token data …
erubboli Sep 18, 2026
e6eb4d6
fix(ci): bind workflow_dispatch publishes to an explicit release tag
erubboli Sep 18, 2026
8abc3d2
refactor(sdk): consolidate raw normalization and fee-height plumbing
erubboli Sep 18, 2026
ffb0163
refactor(sdk): single hex-encoding path for builder string fields
erubboli Sep 18, 2026
819d18d
docs: require protected release tags for publish workflow integrity
erubboli Sep 18, 2026
3c61298
fix(sdk): validate caller-supplied ids on legacy builder paths
erubboli Sep 18, 2026
0721f10
test: migrate legacy suites to shared api-mocks; adopt BuiltTransacti…
erubboli Sep 18, 2026
f9a643e
fix(sdk): validate HTLC transaction ids and tighten raw normalization
erubboli Sep 18, 2026
68ff0d4
test: rejection coverage for round-3/5 validation guards; lift client…
erubboli Sep 18, 2026
cbeb505
test: migrate verify-challenge and standalone-providers to shared api…
erubboli Sep 18, 2026
548077e
style(test): multi-line helper import, shared client helper in new te…
erubboli Sep 18, 2026
bbfd0ed
docs: corporate npm access runbook — org migration over personal-acco…
erubboli Sep 18, 2026
618b7ab
ci: add trusted publishing workflow; sdk package metadata (MIT, repos…
erubboli Sep 18, 2026
9c046c5
ci: reconcile publish workflow - dispatch-with-tag, version check, SH…
erubboli Sep 18, 2026
bf3faa9
refactor(sdk): single transaction assembly engine in Transaction class
erubboli Sep 18, 2026
203896c
test(sdk): decode fixtures, round-trip and fee-parity for the unified…
erubboli Sep 18, 2026
b22261a
fix(sdk): round-1 review fixes — correctness, hardening, dedupe
erubboli Sep 18, 2026
2c2156f
test(sdk): round-2 regression pins — unmint decode, forceSpend dedup,…
erubboli Sep 18, 2026
f4b49cd
fix(sdk): round-2 review fixes
erubboli Sep 18, 2026
9bd4a86
style(sdk): prettier wallet-state.ts (pre-existing drift)
erubboli Sep 18, 2026
542aa47
fix(sdk): HTLC input keys count toward the fee size estimate
erubboli Sep 18, 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
93 changes: 93 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Publish

on:
workflow_dispatch:
inputs:
tag:
description: 'Release tag to publish (e.g. sdk-v1.1.0)'
required: true
type: string

jobs:
publish:
runs-on: ubuntu-latest
environment: npm-publish
permissions:
contents: read
id-token: write

steps:
- name: Derive package from tag
run: |
TAG="${{ inputs.tag }}"
case "$TAG" in
sdk-v*) PKG="@mintlayer/sdk" ;;
react-v*) PKG="@mintlayer/react" ;;
wasm-lib-v*) PKG="@mintlayer/wasm-lib" ;;
*) echo "Unknown tag format: $TAG (expected sdk-vX.Y.Z | react-vX.Y.Z | wasm-lib-vX.Y.Z)" >&2; exit 1 ;;
esac
echo "PKG=$PKG" >> "$GITHUB_ENV"
echo "TAG=$TAG" >> "$GITHUB_ENV"
echo "PKG_DIR=packages/${PKG#*/}" >> "$GITHUB_ENV"

- name: Checkout release tag
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ inputs.tag }}

- name: Verify package version matches tag
run: |
PKG_VERSION="$(node -p "require('./${PKG_DIR}/package.json').version")"
TAG_VERSION="${TAG#*v}"
if [ "$PKG_VERSION" != "$TAG_VERSION" ]; then
echo "Version mismatch: ${PKG_DIR}/package.json is $PKG_VERSION but tag is $TAG" >&2
exit 1
fi
echo "Publishing $PKG@$PKG_VERSION from $TAG"

- name: Install pnpm
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
with:
version: 10

- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 22
registry-url: https://registry.npmjs.org/
cache: pnpm

- name: Install latest npm
run: npm install -g npm@latest

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm --filter "$PKG" build --if-present

- name: Test
run: pnpm --filter "$PKG" test --if-present

- name: Replace workspace: dependencies with concrete versions
shell: node {0}
run: |
const fs = require('fs');
const path = process.env.PKG_DIR + '/package.json';
const pkg = JSON.parse(fs.readFileSync(path, 'utf8'));
for (const section of ['dependencies', 'peerDependencies', 'devDependencies', 'optionalDependencies']) {
const deps = pkg[section];
if (!deps) continue;
for (const [name, spec] of Object.entries(deps)) {
if (typeof spec !== 'string' || !spec.startsWith('workspace:')) continue;
const dep = JSON.parse(fs.readFileSync('packages/' + name.split('/')[1] + '/package.json', 'utf8'));
const prefix = spec.slice('workspace:'.length);
deps[name] = prefix === '*' ? '^' + dep.version : prefix.replace(/\*/, dep.version);
}
}
fs.writeFileSync(path, JSON.stringify(pkg, null, 2) + '\n');
console.log('Resolved workspace deps for', process.env.PKG);

- name: Stage publish
working-directory: ${{ env.PKG_DIR }}
run: npm stage publish --provenance
18 changes: 15 additions & 3 deletions packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,34 @@
{
"name": "@mintlayer/sdk",
"version": "1.0.38",
"version": "1.1.0",
"description": "",
"main": "dist/mintlayer-connect-sdk.js",
"types": "dist/mintlayer-connect-sdk.d.ts",
"files": [
"dist"
],
"author": "Mintlayer",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/mintlayer/mintlayer-connect-sdk.git"
},
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"scripts": {
"build": "tsc",
"serve": "npx http-server . -p 8080",
"test": "jest",
"test:watch": "jest --watch",
"prepublishOnly": "pnpm run test && pnpm run build",
"docs": "typedoc --options typedoc.js"
},
"dependencies": {
"@mintlayer/wasm-lib": "workspace:*"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@types/jest": "^29.5.14",
"@types/node":"^20.4.2",
Expand Down
Loading
Loading