Add codegen to make adding new bank account locations easier#168
Merged
Add codegen to make adding new bank account locations easier#168
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a small codegen pipeline for asset-movement bank-account “address” types/schemas, so new bank account location schemas can be added by dropping in a new file rather than manually editing large union types.
Changes:
- Introduces JSON-schema-like definitions for bank account address variants and shared schema fragments.
- Adds scripts + Makefile rules to generate
index.generated.tsandtypes.generated.tsfor address schemas. - Updates
asset-movement/common.tsto re-export and consume the generated address types.
Reviewed changes
Copilot reviewed 14 out of 16 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| utils/run-ts | Improves selection of the compiled JS entrypoint when tsc emits multiple files. |
| src/services/asset-movement/lib/data/types.ts | Adds BankAccountAddressSchema + shared schema fragments/references. |
| src/services/asset-movement/lib/data/json-schema.ts | Adds a minimal JSON-schema type subset used by schema definitions. |
| src/services/asset-movement/lib/data/scripts/generator.ts | Generates TypeScript types + exported JSON schema from address definitions. |
| src/services/asset-movement/lib/data/scripts/generate-index.sh | Generates an index module aggregating all address schema files. |
| src/services/asset-movement/lib/data/addresses/{us,pix,interac,iban-swift,clabe}.ts | Defines per-location bank-account schema fragments. |
| src/services/asset-movement/common.ts | Switches bank account address types to generated ones; re-exports generated artifacts. |
| Makefile | Adds generation steps and cleans generated address files. |
| .gitignore | Ignores generated asset-movement address .generated.ts files. |
| package.json / package-lock.json | Adds json-schema-to-typescript as a dev dependency. |
| .cspell.config.mjs | Adds interac to dictionary. |
|
rkeene
approved these changes
Mar 11, 2026
rkeene
added a commit
that referenced
this pull request
Mar 16, 2026
This is KeetaNet Anchor v0.0.43 which has the following changes: - 339c9f3 Allow fx anchors to list the affinities they support in the metadata (#215) - 08972f9 Feature: Icons Storage Client (#214) - 6659d09 Add metadata and errors on which operations an asset movement provider supports for a rail (#171) - 6a7eba8 Upgrade to KeetaNet Node and Client v0.16.0 (#217) - 3957856 Add pricing only FX server and client methods to get pricing information from estimates (#210) - efa2c52 Add codegen to make adding new bank account locations easier (#168) - 6dd9abe Add additional opaque metadata to asset movement transfers (#213) - 1ad15ed Cleanup JSON Exports (#209)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Because we will have many more bank account locations for the asset movement anchor soon, this PR creates an easier way to generate them, and generate JSONSchema specs for them.