Fix: Update External Field Encoding#346
Open
sephynox wants to merge 13 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the anchor external field encoding to a new v2 format that stores per-anchor data in independently framed EncryptedContainers, and introduces a provider-independent AnchorTransactionStatus facade with lib-owned interfaces that services can implement (asset-movement added as the first implementation).
Changes:
- Switch
AnchorExternalto v2: plaintext outer envelope mapping anchor id → base64EncryptedContainerslice, with per-slice signing/binding and optional per-slice encryption. - Add
AnchorTransactionStatus(plus ports/types) and an asset-movementAnchorStatusSourceimplementation to read standardized transfer statuses. - Add/adjust tests covering v2 external encoding/decoding behavior and transaction status reading.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/services/asset-movement/status-source.ts | Adds an AnchorStatusSource implementation backed by the asset-movement client/provider resolution. |
| src/services/asset-movement/common.ts | Refines TransactionStatus typing to standardize COMPLETE while allowing provider-specific strings. |
| src/lib/index.ts | Re-exports AnchorTransactionStatus from the lib entrypoint. |
| src/lib/anchor-status.ts | Introduces provider-independent status reader interfaces and the AnchorTransactionStatus facade. |
| src/lib/anchor-status.test.ts | Adds integration-style tests for status reading and external-driven status lookups. |
| src/lib/anchor-external.ts | Implements v2 external encoding/decoding with per-anchor slices (independent signing/encryption). |
| src/lib/anchor-external.test.ts | Updates tests to v2 semantics and adds coverage for multi-anchor and opaque-slice behavior. |
| src/lib/anchor-external.generated.ts | Updates typia-generated validators for the new v2 envelope and v1 slice shapes. |
| src/client/index.ts | Exposes the asset-movement status source via the client namespace exports. |
rkeene
reviewed
Jun 2, 2026
Srayman
reviewed
Jun 2, 2026
ezraripps
approved these changes
Jun 4, 2026
…x/external-field-encoding
|
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.



Summary
Invert external field to v2 (per-anchor encrypted containers) and add provider-independent
AnchorTransactionStatuswith lib-owned interfaces implemented by services/asset-movement.