Skip to content

chore: bump SDK to v31.1.0-beta.8 - #370

Merged
polymesh-bot merged 4 commits into
alphafrom
feat/bump-sdk-v31.1
Sep 1, 2026
Merged

chore: bump SDK to v31.1.0-beta.8#370
polymesh-bot merged 4 commits into
alphafrom
feat/bump-sdk-v31.1

Conversation

@prashantasdeveloper

Copy link
Copy Markdown
Contributor

Summary

Bumps @polymeshassociation/polymesh-sdk to 31.1.0-beta.8 and wires up the REST-visible additions from its changelog.

  • chore: bump SDK to v31.1.0-beta.8 — no breaking changes, tsc/lint/tests pass unchanged
  • feat: issue NFTs directly to an AccountIssueNftDto now accepts an optional account, mirroring the existing IssueDto.account on fungible asset issuance
  • fix: support an API key for the middleware V2 connectionmiddlewareV2 previously always connected with key: '' with no way to supply a real one; adds POLYMESH_MIDDLEWARE_V2_API_KEY and stops hardcoding an empty key (the SDK now omits the x-api-key header entirely when none is given)

Also fixed for free by the SDK bump (verified, no REST code needed)

  • Authorizations.getReceived({ includeExpired: true }) — REST's DTO already defaults and documents true; the SDK was silently ignoring it and now actually honors it
  • DividendDistribution.claim() wrongly resolving the signing Identity from a shared Context instead of the Procedure's own — the changelog calls this REST API out by name as the case it was breaking
  • BigNumber.isBigNumber fixes across portfolio.delete, redeemTokens, redeemNft, modifyAsset, moveFunds, and other REST-exposed calls
  • On-chain failure reason reporting, and the new TransactionStatus.InBlock event — both flow through REST's existing generic error/webhook handling with no gaps

Out of scope (by request)

Ethereum wallet signing, EVM address mapping, and the new staking module (staking has no REST coverage today - this would be a sizeable net-new module).

Also left out as net-new features rather than fixes, to keep this PR to just the changelog's actual REST-visible deltas: a POLYX transaction history endpoint (doesn't exist in REST today), NFT batchIssue, and broadcast()/watch()/submission-timeout support.

Verification

  • npx tsc --noEmit — clean
  • yarn lint — clean
  • npx prettier --check — clean
  • yarn test — 103/103 suites, 1073/1073 tests passing

🤖 Generated with Claude Code

Pulls in Ethereum wallet signing and EVM address mapping, wider staking
coverage (era progress, historical era reads, validator set, chill,
rebond, total issuance), issuing NFTs directly to an Account, ordering
POLYX transaction history, an optional middleware API key, transaction
broadcast/watch with submission timeouts, and connecting from runtimes
that disallow WASM compilation.

Also fixes several bugs: BigNumber.isBigNumber checks across duplicate
package copies, includeExpired being silently ignored on
Authorizations.getReceived, a POLYX transaction count of NaN, on-chain
failure reasons collapsing to "Unknown error", staking's totalStaked
being off by 1e6, staking actions applying permission checks the chain
doesn't make, withdraw failing when the controller isn't the stash, and
DividendDistribution.claim() rejecting a genuine participant when the
signing Identity is resolved from a shared Context - the exact pattern
this REST API uses.

No breaking changes: tsc, lint and the full test suite pass unchanged.
NftCollection.issue now accepts an optional account, mirroring the
account option FungibleAsset.issue already offers on IssueDto. Omitted,
the NFT is issued to the signer's default portfolio as before.
middlewareV2 always connected with key: '', with no way to supply one -
POLYMESH_MIDDLEWARE_API_KEY only ever wired into the deprecated
middleware (V1) config. Adds POLYMESH_MIDDLEWARE_V2_API_KEY, and stops
hardcoding an empty key: the SDK now omits the x-api-key header
entirely when none is given, rather than sending it empty.
@socket-security

socket-security Bot commented Aug 27, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​polymeshassociation/​polymesh-sdk@​31.0.0 ⏵ 31.1.0-beta.886 -110010096 +1100

View full report

@socket-security

socket-security Bot commented Aug 27, 2026

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn Medium
Recently published: npm @polymeshassociation/polymesh-sdk published 5 days ago

Location: Package overview

From: package.jsonnpm/@polymeshassociation/polymesh-sdk@31.1.0-beta.8

ℹ Read more on: This package | This alert | What are recently published artifacts?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should either be allowlisted to allow recently-published versions, or an older version should be used instead.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@polymeshassociation/polymesh-sdk@31.1.0-beta.8. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

Comment thread src/nfts/dto/issue-nft.dto.ts
@sonarqubecloud

sonarqubecloud Bot commented Sep 1, 2026

Copy link
Copy Markdown

@prashantasdeveloper

Copy link
Copy Markdown
Contributor Author

/fast-forward

@polymesh-bot
polymesh-bot merged commit 4f2f0ca into alpha Sep 1, 2026
10 checks passed
@polymesh-bot
polymesh-bot deleted the feat/bump-sdk-v31.1 branch September 1, 2026 11:41
@polymesh-bot

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 9.0.0-alpha.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants