Skip to content

Commit

Permalink
Merge branch 'interledger:main' into backend-case-insensitiveness
Browse files Browse the repository at this point in the history
  • Loading branch information
s100tist authored Aug 1, 2024
2 parents f669c49 + c61e03e commit 7b5e936
Show file tree
Hide file tree
Showing 104 changed files with 4,422 additions and 1,065 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/node-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/workflows/rafiki/env-setup
- run: pnpm --filter backend build:deps
- run: NODE_OPTIONS=--max-old-space-size=4096 pnpm --filter backend test:ci
- run: NODE_OPTIONS="--max-old-space-size=4096" pnpm --filter backend test:ci
- name: AsyncAPI extension
run: |
echo "{\"extends\":[\"spectral:oas\",\"spectral:asyncapi\"]}" >> .spectral.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,10 @@ script:pre-request {

script:post-response {
const body = res.getBody();

bru.setEnvVar("outgoingPaymentId", body.data.createOutgoingPayment.payment.id);

if (body?.data) {
bru.setEnvVar("outgoingPaymentId", body.data.createOutgoingPayment.payment.id);
}
}

tests {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ script:pre-request {

script:post-response {
const body = res.getBody();

bru.setEnvVar("quoteId", body.data.createQuote.quote.id);

if (body?.data) {
bru.setEnvVar("quoteId", body.data.createQuote.quote.id);
}
}

tests {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@ script:pre-request {

script:post-response {
const body = res.getBody();

bru.setEnvVar("receiverId", body.data.createReceiver.receiver.id);

if (body?.data) {
bru.setEnvVar("receiverId", body.data.createReceiver.receiver.id);
}
}

tests {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,10 @@ script:pre-request {

script:post-response {
const body = res.getBody();

bru.setEnvVar("outgoingPaymentId", body.data.createOutgoingPayment.payment.id);

if (body?.data) {
bru.setEnvVar("outgoingPaymentId", body.data.createOutgoingPayment.payment.id);
}
}

tests {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ script:pre-request {

script:post-response {
const body = res.getBody();

bru.setEnvVar("quoteId", body.data.createQuote.quote.id);

if (body?.data) {
bru.setEnvVar("quoteId", body.data.createQuote.quote.id);
}
}

tests {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ script:pre-request {

script:post-response {
const body = res.getBody();

bru.setEnvVar("receiverId", body.data.createReceiver.receiver.id);

if (body?.data) {
bru.setEnvVar("receiverId", body.data.createReceiver.receiver.id);
}
}

tests {
Expand Down
6 changes: 4 additions & 2 deletions bruno/collections/Rafiki/Rafiki Admin APIs/Create Asset.bru
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ script:pre-request {

script:post-response {
const body = res.getBody();

bru.setEnvVar("assetId", body.data.createAsset.asset?.id);

if (body?.data) {
bru.setEnvVar("assetId", body.data.createAsset.asset?.id);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ script:pre-request {

script:post-response {
const body = res.getBody();

bru.setEnvVar("incomingPaymentId", body.data.createIncomingPayment.payment.id);

if (body?.data) {
bru.setEnvVar("incomingPaymentId", body.data.createIncomingPayment.payment.id);
}
}

tests {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ script:pre-request {

script:post-response {
const body = res.getBody();

bru.setEnvVar("peerId", body.data.createOrUpdatePeerByUrl?.peer.id);

if (body?.data) {
bru.setEnvVar("peerId", body.data.createOrUpdatePeerByUrl?.peer.id);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,10 @@ script:pre-request {

script:post-response {
const body = res.getBody();

bru.setEnvVar("outgoingPaymentId", body.data.createOutgoingPaymentFromIncomingPayment.payment.id);

if (body?.data) {
bru.setEnvVar("outgoingPaymentId", body.data.createOutgoingPaymentFromIncomingPayment.payment.id);
}
}

tests {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,10 @@ script:pre-request {

script:post-response {
const body = res.getBody();

bru.setEnvVar("outgoingPaymentId", body.data.createOutgoingPayment.payment.id);

if (body?.data) {
bru.setEnvVar("outgoingPaymentId", body.data.createOutgoingPayment.payment.id);
}
}

tests {
Expand Down
6 changes: 4 additions & 2 deletions bruno/collections/Rafiki/Rafiki Admin APIs/Create Peer.bru
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ script:pre-request {

script:post-response {
const body = res.getBody();

bru.setEnvVar("peerId", body.data.createPeer.peer.id);

if (body?.data) {
bru.setEnvVar("peerId", body.data.createPeer.peer.id);
}
}
6 changes: 4 additions & 2 deletions bruno/collections/Rafiki/Rafiki Admin APIs/Create Quote.bru
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ script:pre-request {

script:post-response {
const body = res.getBody();

bru.setEnvVar("quoteId", body.data.createQuote.quote.id);

if (body?.data) {
bru.setEnvVar("quoteId", body.data.createQuote.quote.id);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ script:pre-request {

script:post-response {
const body = res.getBody();

bru.setEnvVar("receiverId", body.data.createReceiver.receiver.id);

if (body?.data) {
bru.setEnvVar("receiverId", body.data.createReceiver.receiver.id);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ script:pre-request {

script:post-response {
const body = res.getBody();

bru.setEnvVar("walletAddressKeyId", body.data.createWalletAddressKey.walletAddressKey.id);

if (body?.data) {
bru.setEnvVar("walletAddressKeyId", body.data.createWalletAddressKey.walletAddressKey.id);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ script:pre-request {

script:post-response {
const body = res.getBody();
bru.setEnvVar("walletAddressId", body.data.createWalletAddress.walletAddress.id);

bru.setEnvVar("walletAddressUrl", body.data.createWalletAddress.walletAddress.url);

bru.setEnvVar('initialWalletAddressRequest',req)

if (body?.data) {
bru.setEnvVar("walletAddressId", body.data.createWalletAddress.walletAddress.id);
bru.setEnvVar("walletAddressUrl", body.data.createWalletAddress.walletAddress.url);
bru.setEnvVar('initialWalletAddressRequest',req)
}
}

tests {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
meta {
name: Get Accounting Ledger Transfers
type: graphql
seq: 1
}

post {
url: {{RafikiGraphqlHost}}/graphql
body: graphql
auth: none
}

body:graphql {
query AccountingTransfers($id: String!, $limit: Int) {
accountingTransfers(id: $id, limit: $limit) {
debits {
id
debitAccountId
creditAccountId
amount
transferType
ledger
createdAt
}
credits {
id
debitAccountId
creditAccountId
amount
transferType
ledger
createdAt
}
}
}

}

body:graphql:vars {
{
// Provide a 'ledger account identifier' (id):
"id": "{{assetIdTigerBeetle}}"
}
}

script:pre-request {
const scripts = require('./scripts');

scripts.addApiSignatureHeader();
}
22 changes: 20 additions & 2 deletions bruno/collections/Rafiki/environments/Autopeering.bru
Original file line number Diff line number Diff line change
@@ -1,9 +1,27 @@
vars {
clientWalletAddress: https://ilp.rafiki.money/d99f0eee
clientKeyId: e9a47ee7-99b3-4656-b85f-12431dbc16b9
senderWalletAddress: null
receiverWalletAddress: https://ilp.rafiki.money/d99f0eee
clientWalletAddress: https://ilp.rafiki.money/d99f0eee
clientKeyId: e9a47ee7-99b3-4656-b85f-12431dbc16b9
RafikiGraphqlHost: http://localhost:3001
RafikiAuthGraphqlHost: http://localhost:3003
PeerGraphqlHost: http://localhost:4001
PeerAuthGraphqlHost: http://localhost:4003
cloudNineWalletWebhookUrl: http://localhost:3030/webhooks
happyLifeBankWebhookUrl: http://localhost:3031/webhooks
signatureUrl: https://kxu5d4mr4blcthphxomjlc4xk40rvdsx.lambda-url.eu-central-1.on.aws/
clientPrivateKey: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1DNENBUUF3QlFZREsyVndCQ0lFSUUvMmFwQXduMlJPek5WNWd1L2ltZzdpT05rOWE1Ui9yakFxWVlUWHozZzgKLS0tLS1FTkQgUFJJVkFURSBLRVktLS0tLQ==
gfranklinWalletAddress: https://cloud-nine-wallet-backend/accounts/gfranklin
bhamchestWalletAddress: https://cloud-nine-wallet-backend/accounts/bhamchest
wbdcWalletAddress: https://cloud-nine-wallet-backend/accounts/wbdc
pfryWalletAddress: https://happy-life-bank-backend/accounts/pfry
planexWalletAddress: https://happy-life-bank-backend/accounts/planex
asmithWalletAddress: https://happy-life-bank-backend/accounts/asmith
larsWalletAddress: https://happy-life-bank-backend/accounts/lars
davidWalletAddress: https://happy-life-bank-backend/accounts/david
withdrawalTimeout: 60
backendApiSignatureVersion: 1
backendApiSignatureSecret: iyIgCprjb9uL8wFckR+pLEkJWMB7FJhgkvqhTQR/964=
authApiSignatureVersion: 1
authApiSignatureSecret: rPoZpe9tVyBNCigm05QDco7WLcYa0xMao7lO5KG1XG4=
}
1 change: 1 addition & 0 deletions bruno/collections/Rafiki/environments/Local Playground.bru
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ vars {
backendApiSignatureSecret: iyIgCprjb9uL8wFckR+pLEkJWMB7FJhgkvqhTQR/964=
authApiSignatureVersion: 1
authApiSignatureSecret: rPoZpe9tVyBNCigm05QDco7WLcYa0xMao7lO5KG1XG4=
assetIdTigerBeetle: 1
}
2 changes: 1 addition & 1 deletion infrastructure/helm/tigerbeetle/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ statefulset:
repository: ghcr.io/tigerbeetle/tigerbeetle
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "0.15.3"
tag: "0.15.4"

proxyImage:
repository: nginx
Expand Down
Loading

0 comments on commit 7b5e936

Please sign in to comment.