-
Notifications
You must be signed in to change notification settings - Fork 112
feat(backend, mock-ase): encrypted data exchange #3888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 25 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
48e71ca
feat(backend): update sender data in incoming partial payment webhook…
njlie 28125e9
feat(backend): add confirmPartialIncomingPayment resolver (#3819)
njlie 921a317
feat(backend): reject partial payment gql api (#3823)
njlie fa44fe8
feat(backend): add middleware that handles STREAM KYC/additional data…
sanducb b1b8f92
fix: cherrypick 4917c14f
sanducb b2b70d2
chore: format
sanducb 0a9755b
fix: remove duplicate property
sanducb 683096a
fix: backend tests
sanducb aa40a06
chore: merge branch 'main' of https://github.com/interledger/rafiki i…
sanducb c96473d
chore: update lock file
sanducb d5bac6e
chore: format
sanducb bdc1dfa
chore: update lock file
sanducb 918f65e
fix: attempt to fix CI builds
sanducb 0c110a8
fix: address PR comments
sanducb b7adfed
feat: add encrypted data exchange docker compose variant and manual t…
BlairCurrey feb7411
feat: add partial payment rejection description on outgoing_payment.f…
sanducb 1fb8054
chore: merge branch 'feature/encrypted-data-exchange' of https://gith…
sanducb b2a507c
fix: pin testcontainers to 10.16.0 for Tigerbeetle tests
sanducb 8ba1392
fix: attempt to fix CI backend build
sanducb adfe271
chore: merge branch 'main' of https://github.com/interledger/rafiki i…
sanducb 463c032
fix: revert testcontainers version changes and update lockfile
sanducb a5b236b
chore: format
sanducb 786ca0c
fix: missing error message in outgoing payment tests
sanducb 26b01aa
chore: minor updates for encrypted data exchange feature (#3911)
mkurapov 1bc8c74
fix: use dataFromSender instead dataToTransmit when decrypting webhoo…
sanducb 834e7e5
chore: update localenv doc
sanducb 228ce99
chore: update RejectPartialIncomingPaymentInput reason description
sanducb b040ac8
chore: regenerate graphql types
sanducb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Run with Encrypted Data Exchange | ||
|
|
||
| Start the env with the feature flag enabled on the receiver: | ||
|
|
||
| ```bash | ||
| pnpm localenv:compose:partial-payment up | ||
| ``` | ||
|
|
||
| # Manually Test the Encrypted Data Exchange Flow (Happy Path) | ||
|
|
||
| ## Steps | ||
|
|
||
| - Run the **Examples > Admin API > Open Payments** or the **Examples > Open Payments > Peer-to-Peer Payment** requests in Bruno. | ||
|
|
||
| ## Verification | ||
|
|
||
| In the `happy-life-bank-mock-ase` logs: | ||
|
|
||
| - `incoming_payment.partial_payment_received` webhook was received, with `partialIncomingPaymentId` and the `dataToTransmit` defined in the payload | ||
| - `confirmPartialIncomingPayment` was called | ||
|
|
||
| In Bruno: | ||
|
|
||
| - Confirm the Outgoing Payment is completed by calling the `Get Outgoing Payment` request, and verifying a positive `sentAmount`. | ||
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
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
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
60 changes: 60 additions & 0 deletions
60
localenv/mock-account-servicing-entity/generated/graphql.ts
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| services: | ||
| happy-life-backend: | ||
| environment: | ||
| ENABLE_PARTIAL_PAYMENT_DECISION: 'true' | ||
| PARTIAL_PAYMENT_DECISION_MAX_WAIT_MS: '30000' |
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
31 changes: 31 additions & 0 deletions
31
packages/backend/migrations/20251126191852_add_sender_data_to_outgoing_payment.js
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| /** | ||
| * @param { import("knex").Knex } knex | ||
| * @returns { Promise<void> } | ||
| */ | ||
| exports.up = async function (knex) { | ||
| const hasColumn = await knex.schema.hasColumn( | ||
| 'outgoingPayments', | ||
| 'dataToTransmit' | ||
| ) | ||
| if (!hasColumn) { | ||
| await knex.schema.alterTable('outgoingPayments', function (table) { | ||
| table.string('dataToTransmit').nullable() | ||
| }) | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * @param { import("knex").Knex } knex | ||
| * @returns { Promise<void> } | ||
| */ | ||
| exports.down = async function (knex) { | ||
| const hasColumn = await knex.schema.hasColumn( | ||
| 'outgoingPayments', | ||
| 'dataToTransmit' | ||
| ) | ||
| if (hasColumn) { | ||
| await knex.schema.alterTable('outgoingPayments', function (table) { | ||
| table.dropColumn('dataToTransmit') | ||
| }) | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small thing but shouldn't
dataToTransmithere bedataFromSender? I know there was a partial replacement of these terms but I think this one should be from sender. judging by theincomingPaymentEventin thewebhook.yamlopen api spec, mock asehandleIncomingPartialPaymentReceivedwebhook handler, etc.