Skip to content
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

Feat: Multichain payment #845

Merged
merged 73 commits into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
42690c3
init payment service
volodymyr-basiuk Nov 5, 2024
485c4b8
payment abi gen
volodymyr-basiuk Nov 5, 2024
2009e0c
add recipient
volodymyr-basiuk Nov 7, 2024
9d1eb97
Merge branch 'develop' into feat/multichain-payment
x1m3 Nov 8, 2024
e4c62ca
chore: linter
x1m3 Nov 8, 2024
8d02268
chore: Use protocol messages
x1m3 Nov 12, 2024
de4ab31
feat: Payment settings
x1m3 Nov 12, 2024
bec717b
feat: Payment settings injected in service and endpoint to return it
x1m3 Nov 12, 2024
7e4c0ac
feat: Test get payment settings
x1m3 Nov 13, 2024
8b3b041
feat: Payment options repo redone
x1m3 Nov 14, 2024
a5655a0
feat: Payment options API.
x1m3 Nov 15, 2024
ee7833e
feat: Create Payment Option test
x1m3 Nov 15, 2024
c428691
fix: API running via docker
x1m3 Nov 18, 2024
d30d1ae
chore: Test get payment option
x1m3 Nov 18, 2024
a6b8d1d
feat: Test get payment options
x1m3 Nov 18, 2024
d76f784
feat: Test remove payment options
x1m3 Nov 19, 2024
b79059d
feat: Define structure for paymentOption Config
x1m3 Nov 20, 2024
40bae14
wip: Payment request endpoint uses payment options
x1m3 Nov 21, 2024
cb95423
feat: Payload signed with kms using key
x1m3 Nov 22, 2024
726ba7a
fix: Remove not used status response
x1m3 Nov 25, 2024
1602ac9
feat: One paymentRequest object for each stable coin
x1m3 Nov 25, 2024
6d8471e
fix: Remove unwanted commented code
x1m3 Nov 25, 2024
35268d8
fix: request parsing in CreatePaymentRequest
x1m3 Nov 25, 2024
a5b2acd
fix: Amounts management. Other tests.
x1m3 Nov 26, 2024
11bb162
chore: lint
x1m3 Nov 26, 2024
3f4231b
feat: If present, use signin key in payment option config
x1m3 Nov 27, 2024
06ce29a
fix: linter
x1m3 Nov 27, 2024
e3bd7bb
chore: verifyPayment endpoint now accepts and optionid and returns ob…
x1m3 Nov 28, 2024
2a04d8e
feat: improve example
x1m3 Nov 28, 2024
a61300e
feat: Load contract from configuration and test it
x1m3 Nov 28, 2024
db3ada8
chore: Reuse protocol constants for payment request type defined in i…
x1m3 Nov 29, 2024
2c7dd00
feat: Payment request repository
x1m3 Dec 4, 2024
3580d7e
fix payment-request signature
volodymyr-basiuk Dec 4, 2024
19c8ede
big int fix
volodymyr-basiuk Dec 4, 2024
f33764d
fix ERC20 type
volodymyr-basiuk Dec 4, 2024
2569644
feat: Change payment config format file
x1m3 Dec 4, 2024
7dcd1c6
feat: Remove hack to pass private key to sign payment requests
x1m3 Dec 4, 2024
a2c6520
feat: config and payments options management
x1m3 Dec 5, 2024
f037545
remove currency
volodymyr-basiuk Dec 5, 2024
06af779
Merge remote-tracking branch 'origin/feat/multichain-payment' into fe…
x1m3 Dec 5, 2024
714bf11
feat: Implement create payment request endpoint
x1m3 Dec 9, 2024
ff20d8c
fix: Failing test.
x1m3 Dec 9, 2024
a58e756
feat: revert changes in agent endpoint.
x1m3 Dec 9, 2024
37c801e
feat: revert changes in function to extrack ethkey from vault
x1m3 Dec 9, 2024
85216e1
chore: Extra check and remove unused code
x1m3 Dec 9, 2024
296810c
chore: Remove unused NewAgentProposalRequest function
x1m3 Dec 9, 2024
7b7430f
fix verificationMethod and signature += 27
volodymyr-basiuk Dec 9, 2024
7bb30c8
fix linter
volodymyr-basiuk Dec 9, 2024
37455ab
feat: MVP for verify payment endpoint
x1m3 Dec 10, 2024
a4df756
fix signature len check
volodymyr-basiuk Dec 10, 2024
783217e
fix: payments repo GetPaymentRequestItem fixed and tested
x1m3 Dec 10, 2024
a823a07
Merge remote-tracking branch 'origin/develop' into feat/multichain-pa…
x1m3 Dec 10, 2024
ede1e0c
fix: merge conflict
x1m3 Dec 10, 2024
7f5ea11
fix IsPaymentDone (check Recipient address)
volodymyr-basiuk Dec 10, 2024
2fd4345
feat: Use RPC resolver from network resolver
x1m3 Dec 11, 2024
9007c70
feat: Verify payment handles failed and cancelled transactions
x1m3 Dec 11, 2024
2cc84ff
update ethereumClientsByChainID
volodymyr-basiuk Dec 13, 2024
83b63bb
chore: Remove protocol.Iden3PaymentRequestCryptoV1Type as we do not s…
x1m3 Dec 16, 2024
daaeebc
chore: Remove hardcoded private key from test.
x1m3 Dec 16, 2024
b2b7137
chore: Fix context.Background and remove unneeded commented test code.
x1m3 Dec 16, 2024
c404908
feat: standardise lower case letters in payment api responses
x1m3 Dec 17, 2024
e8d8158
Merge remote-tracking branch 'refs/remotes/origin/develop' into feat/…
x1m3 Dec 17, 2024
84ffd93
feat: k8s configuration
x1m3 Dec 17, 2024
0463ede
feat: Refresh schema context on the fly if not present.
x1m3 Dec 18, 2024
d767ae9
Merge remote-tracking branch 'origin/develop' into feat/multichain-pa…
x1m3 Dec 18, 2024
71fb3d7
fix: merge conflict
x1m3 Dec 18, 2024
7f2c4b6
fix: configmap
x1m3 Dec 18, 2024
f5bb512
chore: payment configuration for devel
x1m3 Dec 18, 2024
97ea05d
feat: Return payments configuration
x1m3 Dec 18, 2024
9f63af5
feat: Rename field PaymentRequestMessage.RecipientDID to userDID
x1m3 Dec 18, 2024
9b6438c
Merge remote-tracking branch 'origin/develop' into feat/multichain-pa…
x1m3 Dec 19, 2024
8cf976e
chore: sync with develop
martinsaporiti Dec 23, 2024
3062fec
chore: update migration name for payments
martinsaporiti Dec 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .env-issuer.sample
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,10 @@ ISSUER_RESOLVER_PATH=./resolvers_settings.yaml
# if you want, you can specify the content of the resolvers encoded in base64. In this case ISSUER_RESOLVER_PATH have to be empty
ISSUER_RESOLVER_FILE=

ISSUER_UNIVERSAL_LINKS_BASE_URL=https://wallet.privado.id
ISSUER_UNIVERSAL_LINKS_BASE_URL=https://wallet.privado.id

#Payments configuration
# ISSUER_PAYMENTS_SETTINGS_PATH is the configutation file for payments.
# You can use another file by specifying the path. Be Sure to the file is mounted in the container (docker compose files)
ISSUER_PAYMENTS_SETTINGS_PATH=./payment_settings.yaml
#
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ bin/
.env-issuer
.env-ui
resolvers_settings.yaml
payment_settings.yaml

infrastructure/local/.vault/data
infrastructure/local/.vault/plugins
Expand Down
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ linters-settings:
min-complexity: 35
revive:
enable-all-rules: false

rules:
- name: argument-limit
severity: warning
Expand All @@ -74,6 +75,7 @@ linters-settings:
- name: exported
severity: warning
disabled: false
arguments: [ "disableChecksOnConstants", "disableChecksOnVariables" ]


issues:
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ RUN apk add curl
COPY --from=base ./service/api ./api
COPY --from=base ./service/bin/* ./
COPY --from=base ./service/pkg/credentials ./pkg/credentials
COPY --from=base ./service/resolvers_settings.* ./
COPY --from=base ./service/resolvers_settings.* ./
COPY --from=base ./service/payment_settings.* ./
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ a4a1d3ec9159 redis:6-alpine "docker-entrypoint.s…" 38 sec
make private_key=<private-key> import-private-key-to-kms
```

**_TODO_**: Add section to configure payments

then visit:
* http://localhost:8088/ to access the UI (default username / password are: user-ui, password-ui). You can set them using env [vars](.env-ui.sample).
* <PUBLICLY_ACCESSIBLE_URL_POINTING_TO_ISSUER_SERVER_PORT>:3001/ to access the API. (default username / password are: user-issuer, password-issuer)
Expand Down Expand Up @@ -139,6 +141,8 @@ then modify the file with the proper values. The most important fields to run th
In this file you can define customizations for each type of blockchain and network. For this example, we only need to
define the RPCs. that will use.

**_TODO_**: Add section to configure payments****

4. Copy .env-ui sample file and fill the needed env variables:

```bash
Expand Down
Loading
Loading