Skip to content

Add codegen to make adding new bank account locations easier#168

Merged
ezraripps merged 20 commits intomainfrom
feature/start-supporting-more-rails
Mar 11, 2026
Merged

Add codegen to make adding new bank account locations easier#168
ezraripps merged 20 commits intomainfrom
feature/start-supporting-more-rails

Conversation

@ezraripps
Copy link
Copy Markdown
Member

@ezraripps ezraripps commented Jan 31, 2026

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.ts and types.generated.ts for address schemas.
  • Updates asset-movement/common.ts to 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.

Comment thread src/services/asset-movement/lib/data/scripts/generate-index.sh Outdated
Comment thread src/services/asset-movement/lib/data/scripts/generator.ts
Comment thread src/services/asset-movement/lib/data/scripts/generator.ts Outdated
Comment thread src/services/asset-movement/lib/data/addresses/iban-swift.ts Outdated
Comment thread src/services/asset-movement/common.ts Outdated
Comment thread src/services/asset-movement/lib/data/scripts/generator.ts
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 16 changed files in this pull request and generated 5 comments.

Comment thread src/services/asset-movement/lib/data/scripts/generator.ts Outdated
Comment thread src/services/asset-movement/lib/data/addresses/iban-swift.ts Outdated
Comment thread src/services/asset-movement/common.ts Outdated
Comment thread Makefile Outdated
Comment thread src/services/asset-movement/lib/data/scripts/generate-index.sh Outdated
@ezraripps ezraripps changed the title WIP: Add codegen to make adding new bank account locations easier Add codegen to make adding new bank account locations easier Feb 19, 2026
@ezraripps ezraripps marked this pull request as ready for review February 19, 2026 23:34
@ezraripps ezraripps requested a review from rkeene February 19, 2026 23:36
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Mar 5, 2026

@rkeene rkeene added this to the v0.0.43 milestone Mar 11, 2026
@ezraripps ezraripps merged commit efa2c52 into main Mar 11, 2026
2 checks passed
@ezraripps ezraripps deleted the feature/start-supporting-more-rails branch March 11, 2026 15:29
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants