Skip to content

Development Home

Shannon Wells edited this page Oct 23, 2025 · 8 revisions

Detailed Developer Documentation

This is primarily for active developers of this repo. This information is not guaranteed to be up-to-date and PLL devs are encouraged to update it when needed or to their liking.

Releases

For now there are still consumers of the SIWFv1 functionality by users of Frequency Gateway. Until then, whenever there are updates to the polkadot dependencies for SIWFv2, there must also be a companion v1 release. This is because Gateway uses both v1 and v2, and the polkadot libraries have to match everywhere. The occasional security updates will also need to happen for v1.

The SIWFv2 release process is like a typical GitHub release process, whereby a new release tag is created from main branch, and the release is automatically published to npm.

Releasing and testing SIWFv1 is different. The V1 code still uses pnpm at the root, so please be sure to read those old READMEs for building and installing.

  1. Check out branch v1, and create a branch from this.
  2. Perform necessary updates to the new branch and commit.
  3. Verify v1 is working by following the steps in V1 Manual Testing
  4. On the SIWF New release page, enter a new release tag and set the target to your new v1 branch, NOT main. If you are sure enough about this branch working, make it an official release. Otherwise, add an rc number at the end and check "Set as a pre-release" then publish. Note that Pre-releases aren't published to npm.
  5. Once it's published to npm, verify again by installing the new package version into a local Gateway repo.
  6. Create a PR in Gateway to use the new version when needed.

V1 Manual Testing

  1. Build packages and run the signed-request-generator by following the instructions in the v1 README, "Development Setup"
  2. Verify the example app works (see Manual Testing Detail below)
  3. Build the siwf package: npm run build && npm run pack
  4. Test the siwf package. In Gateway's package.json, replace the siwfv2 line:
-    "@projectlibertylabs/siwfv1": "v1.2.3",
+    "@projectlibertylabs/siwfv1": "file://../siwf/packages/siwf/dist/projectlibertylabs-siwf-0.0.0.tgz",
  1. Run npm install in gateway root directory.
  2. Follow the instructions in Gateway to build and run account-api app locally (not Docker).
  3. Visit the swagger docs endpoint at http://localhost:3000/docs/swagger and execute the siwfv1 endpoint example, verifying that this does not fail.
  4. Having verified that all the above was successful, push the branch.
    • Verify with a Polkadot-compatible wallet that you can generate a signed request
    • Verify also with Metamask
    • Verify also by manually entering a signature. For example, by using the PolkadotUI to sign and verify a payload.
  5. Test in Gateway:
    • build, npm pack and npm install this package into <gateway checkout>/node_modules/ProjectLibertyLabs/siwfv2, then follow the instructions in gateway for building and running it.

V2 Manual Testing

V2 testing will be much the same, except to verify signature generation, mdbook is built and run.

  1. Follow the directions for building mdbook, as outlined in the current README.
  2. Run mdbook serve
  3. Perform the same signature generation tests as noted in V1 Manual Testing.

Perform v2 testing for Gateway with similar steps; first with npm run build && npm run pack, then:

  1. In Gateway's package.json, replace the siwfv2 line:
-    "@projectlibertylabs/siwfv2": "v2.3.5",
+    "@projectlibertylabs/siwfv2": "file://../siwf/packages/siwf/dist/projectlibertylabs-siwf-0.0.0.tgz",
  1. Run npm install in gateway root directory.
  2. Follow the instructions in Gateway to build and run account-api app locally (not Docker).
  3. Visit the swagger docs endpoint at http://localhost:3000/docs/swagger and execute a siwfv2 endpoint example, verifying that it does not fail.

Clone this wiki locally