Skip to content

Conversation

@soerenbf
Copy link
Collaborator

@soerenbf soerenbf commented Sep 2, 2025

Ref COR-1718

Purpose

Make @concordium/web-sdk (and dependents exposing any of these types) forward compatible by introducing unknown variants in the form of Upward<T> (among other more specialized unknown variant types) for selected types that can be expected to change in the future.

Changes

Checklist

  • My code follows the style of this project.
  • The code compiles without warnings.
  • I have performed a self-review of the changes.
  • I have documented my code, in particular the intent of the
    hard-to-understand areas.
  • (If necessary) I have updated the CHANGELOG.

@soerenbf soerenbf self-assigned this Sep 2, 2025
@soerenbf soerenbf added the Breaking changes Implementation of the issue will cause breaking changes. label Sep 2, 2025
soerenbf and others added 16 commits September 4, 2025 14:41
Restructure token module types + add reject reason
Co-authored-by: Søren Bruus Zeppelin <[email protected]>
Co-authored-by: Søren Bruus Zeppelin <[email protected]>
Co-authored-by: Søren Bruus Zeppelin <[email protected]>
Co-authored-by: Søren Bruus Zeppelin <[email protected]>
* Add unknown variants to `AccountInfo`
* Add unknown variants to uses of `OpenStatusText` for validator pools.
@soerenbf soerenbf mentioned this pull request Sep 8, 2025
5 tasks
@soerenbf soerenbf changed the title Feature/forwards compatibility WIP: Feature/forwards compatibility Sep 8, 2025
* Forward compat for parsing encoded token module events

* Move cbor decode functionality into its own file

* Add parser function for token module reject reasons

* Parse token ops

* Align tests to introduction of unknown variants + `TokenModuleRejectReason`

* Add option to `Cbor.decode` into type `TokenOperation[]`

* Update changelog

* Add missing jsdoc

* Fix examples

* Fix tests

* Apply PR suggestions

* ..
* Wrap `ContractTraceEvent` uses in `Upward`

* Remove `ContractVersion` in favor of good ol' `number`

* Align helper block item summary functions with rust SDK

* Add handle PLT events for block item summary helpers
* `Upward` for `VerifyKey`

* Add type for unwrapping `Upward` recursively for types that are used in both read/write scenarios

* JSDoc improvements

* Align representation of `UpdatePublicKey` in grpc/sdk
@soerenbf soerenbf marked this pull request as ready for review September 9, 2025 11:00
@soerenbf soerenbf requested review from DOBEN and limemloh September 9, 2025 11:00
@soerenbf soerenbf changed the title WIP: Feature/forwards compatibility Feature/forwards compatibility Sep 9, 2025
@squirer squirer self-requested a review September 9, 2025 13:51
@soerenbf soerenbf merged commit bb0b35b into release/sdk/11 Sep 9, 2025
33 checks passed
@soerenbf soerenbf deleted the feature/forwards-compatibility branch September 9, 2025 14:57
@soerenbf soerenbf mentioned this pull request Sep 9, 2025
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Breaking changes Implementation of the issue will cause breaking changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants