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

feature(wallet-address)!: possibility to specify wallet address range #3324

Closed
wants to merge 34 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
ea7b2f7
feat(backend): tenants table v1 (#3132)
njlie Nov 26, 2024
9c6d7d9
Merge branch 'main' into 2893/multi-tenancy-v1
mkurapov Nov 28, 2024
ea7e660
feat(auth): tenants table v1 (#3133)
njlie Dec 2, 2024
349b01e
feat(auth): tenant service (#3144)
BlairCurrey Dec 3, 2024
07630c1
feat(backend): tenants service (#3123) (#3140)
njlie Dec 9, 2024
8e04749
Merge branch 'main' into 2893/multi-tenancy-v1
mkurapov Dec 9, 2024
10bc368
feat(auth, backend): seed operator tenant (#3156)
mkurapov Dec 11, 2024
1c43cdd
feat(integration): sign Admin API requests during integration tests (…
mkurapov Dec 16, 2024
a8b7ca4
feat(backend): tenant signature validation for admin api (#3164)
njlie Dec 17, 2024
fd8283b
feat: auth service-to-service api (#3148)
BlairCurrey Jan 14, 2025
0b6fb1a
feat(backend): tenanted assets (#3206)
mkurapov Jan 15, 2025
8ade26a
Merge branch 'main' into 2893/multi-tenancy-v1
mkurapov Jan 17, 2025
1bb2a9b
feat(fronted): tenanted admin api credentials (#3213)
BlairCurrey Jan 24, 2025
83c844d
feat(backend): tenant support for wallet address (#3114) (#3152)
koekiebox Jan 26, 2025
31df89e
feat(backend): backend tenant graphql resolvers (#3234)
njlie Feb 3, 2025
e7db0ad
Merge branch 'main' into 2893/multi-tenancy-v1
mkurapov Feb 6, 2025
99e7354
chore(integration): fix apollo client constructor
mkurapov Feb 10, 2025
8a863ed
chore(integration): fix & tidy integration tests
mkurapov Feb 10, 2025
a7f6b09
chore(backend): update auth apollo client signature timestamp
mkurapov Feb 10, 2025
4a4a48d
docs(localenv): add details for tenant credentials for admin ui (#3251)
BlairCurrey Feb 11, 2025
f8a61c4
feat(auth): tenanted grants (#3187)
njlie Feb 11, 2025
0b0e8a3
feat(2915): admin front-end for tenant support (#3254)
koekiebox Feb 12, 2025
f3cae25
feat(backend/frontend): 3256 able to view deleted tenant (#3299)
koekiebox Feb 14, 2025
8e227ca
feat(backend): tenanted incoming payments (#3271)
oana-lolea Feb 17, 2025
52b7c18
feat(backend): tenanted quotes and outgoing payments (#3171)
sanducb Feb 17, 2025
9d32bb6
feat(frontend): add operator-contextual dropdowns for tenant selectio…
njlie Feb 19, 2025
358332e
feat(tenantSettings): initial implementation (#3281)
golobitch Feb 24, 2025
fad2c4b
feat(graphql): schema update for specifying settings when creating te…
golobitch Feb 25, 2025
0d9e281
feat(tenant): add possibility to specify initial tenant settings as a…
golobitch Feb 25, 2025
432f5a4
test(tenant): create with settings
golobitch Feb 25, 2025
ac6e943
feat(wallet-address): rename url to address
golobitch Mar 1, 2025
a5d7b37
fix(tenant-settings): duplicate key for tenant
golobitch Mar 1, 2025
eeb1f4c
feat(wallet-address): replace url field with address field
golobitch Mar 1, 2025
6f72bf7
chore(backend): format
golobitch Mar 1, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ script:post-response {
authUrl.hostname.includes('happy-life-bank')
){
const port = authUrl.hostname.includes('cloud-nine-wallet')? authUrl.port: Number(authUrl.port) + 1000
bru.setEnvVar("receiverOpenPaymentsAuthHost", authUrl.protocol + '//localhost:' + port );
bru.setEnvVar("receiverOpenPaymentsAuthHost", authUrl.protocol + '//localhost:' + port + authUrl.path);
} else {
bru.setEnvVar("receiverOpenPaymentsAuthHost", body?.authServer);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ script:post-response {
}

const body = res.getBody()

bru.setEnvVar("senderAssetCode", body?.assetCode)
bru.setEnvVar("senderAssetScale", body?.assetScale)

Expand All @@ -38,7 +38,7 @@ script:post-response {
authUrl.hostname.includes('happy-life-bank')
){
const port = authUrl.hostname.includes('cloud-nine-wallet')? authUrl.port: Number(authUrl.port) + 1000
bru.setEnvVar("senderOpenPaymentsAuthHost", authUrl.protocol + '//localhost:' + port );
bru.setEnvVar("senderOpenPaymentsAuthHost", authUrl.protocol + '//localhost:' + port + authUrl.path);
} else {
bru.setEnvVar("senderOpenPaymentsAuthHost", body?.authServer);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ meta {
}

post {
url: {{receiverOpenPaymentsAuthHost}}/
url: {{receiverOpenPaymentsAuthHost}}
body: json
auth: none
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ meta {
}

post {
url: {{senderOpenPaymentsAuthHost}}/
url: {{senderOpenPaymentsAuthHost}}
body: json
auth: none
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ script:pre-request {

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

if (body?.id) {
bru.setEnvVar("incomingPaymentId", body.id.split("/").pop());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ script:pre-request {

script:post-response {
const url = require('url')

if (res.getStatus() !== 200) {
return
}

const body = res.getBody()
bru.setEnvVar("receiverAssetCode", body?.assetCode)
bru.setEnvVar("receiverAssetScale", body?.assetScale)
Expand All @@ -37,7 +37,7 @@ script:post-response {
authUrl.hostname.includes('happy-life-bank')
){
const port = authUrl.hostname.includes('cloud-nine-wallet')? authUrl.port: Number(authUrl.port) + 1000
bru.setEnvVar("receiverOpenPaymentsAuthHost", authUrl.protocol + '//localhost:' + port );
bru.setEnvVar("receiverOpenPaymentsAuthHost", authUrl.protocol + '//localhost:' + port + authUrl.path);
} else {
bru.setEnvVar("receiverOpenPaymentsAuthHost", body?.authServer);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ script:post-response {
authUrl.hostname.includes('happy-life-bank')
){
const port = authUrl.hostname.includes('cloud-nine-wallet')? authUrl.port: Number(authUrl.port) + 1000
bru.setEnvVar("senderOpenPaymentsAuthHost", authUrl.protocol + '//localhost:' + port );
bru.setEnvVar("senderOpenPaymentsAuthHost", authUrl.protocol + '//localhost:' + port + authUrl.path);
} else {
bru.setEnvVar("senderOpenPaymentsAuthHost", body?.authServer);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ meta {
}

post {
url: {{receiverOpenPaymentsAuthHost}}/
url: {{receiverOpenPaymentsAuthHost}}
body: json
auth: none
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ meta {
}

post {
url: {{senderOpenPaymentsAuthHost}}/
url: {{senderOpenPaymentsAuthHost}}
body: json
auth: none
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ meta {
}

post {
url: {{senderOpenPaymentsAuthHost}}/
url: {{senderOpenPaymentsAuthHost}}
body: json
auth: none
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ script:pre-request {

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

if (body?.id) {
bru.setEnvVar("incomingPaymentId", body.id.split("/").pop());
bru.setEnvVar("quoteDebitAmount", JSON.stringify({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ script:post-response {
}

const body = res.getBody()

bru.setEnvVar("receiverAssetCode", body?.assetCode)
bru.setEnvVar("receiverAssetScale", body?.assetScale)

Expand All @@ -38,7 +38,7 @@ script:post-response {
authUrl.hostname.includes('happy-life-bank')
){
const port = authUrl.hostname.includes('cloud-nine-wallet')? authUrl.port: Number(authUrl.port) + 1000
bru.setEnvVar("receiverOpenPaymentsAuthHost", authUrl.protocol + '//localhost:' + port );
bru.setEnvVar("receiverOpenPaymentsAuthHost", authUrl.protocol + '//localhost:' + port + authUrl.path);
} else {
bru.setEnvVar("receiverOpenPaymentsAuthHost", body?.authServer);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ script:post-response {
authUrl.hostname.includes('happy-life-bank')
){
const port = authUrl.hostname.includes('cloud-nine-wallet')? authUrl.port: Number(authUrl.port) + 1000
bru.setEnvVar("senderOpenPaymentsAuthHost", authUrl.protocol + '//localhost:' + port );
bru.setEnvVar("senderOpenPaymentsAuthHost", authUrl.protocol + '//localhost:' + port + authUrl.path);
} else {
bru.setEnvVar("senderOpenPaymentsAuthHost", body?.authServer);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ meta {
}

post {
url: {{receiverOpenPaymentsAuthHost}}/
url: {{receiverOpenPaymentsAuthHost}}
body: json
auth: none
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ meta {
}

post {
url: {{senderOpenPaymentsAuthHost}}/
url: {{senderOpenPaymentsAuthHost}}
body: json
auth: none
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ script:pre-request {

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

if (body?.id) {
bru.setEnvVar("incomingPaymentId", body.id.split("/").pop());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ get {
auth: none
}

query {
params:query {
first: 10
wallet-address: {{receiverWalletAddress}}
~cursor: ea3bf38f-2719-4473-a0f7-4ba967d1d81b
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ meta {
}

post {
url: {{receiverOpenPaymentsAuthHost}}/
url: {{receiverOpenPaymentsAuthHost}}
body: json
auth: none
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ body:graphql:vars {
},
"incomingAmount": null,
"walletAddressId": "{{walletAddressId}}"
}
},
"tenantId": "{{tenantId}}"
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
meta {
name: Create Tenant Settings
type: graphql
seq: 58
}

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

headers {
tenant-id: 438fa74a-fa7d-4317-9ced-dde32ece1787
}

body:graphql {
mutation CreateTenantSettings($input: [CreateTenantSettingsInput!]!) {
createTenantSettings(input:$input) {
settings {
key
value
}
}
}
}

body:graphql:vars {
{
"input": [
{
"key": "MY_KEY",
"value": "MY_VALUE"
}
]
}

}

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

scripts.addApiSignatureHeader();
}
50 changes: 50 additions & 0 deletions bruno/collections/Rafiki/Rafiki Admin APIs/Create Tenant.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
meta {
name: Create Tenant
type: graphql
seq: 54
}

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

body:graphql {
mutation CreateTenant($input: CreateTenantInput!) {
createTenant(input:$input) {
tenant {
id
email
apiSecret
idpConsentUrl
idpSecret
}
}
}
}

body:graphql:vars {
{
"input": {
"email": "example@example.com",
"apiSecret": "test-secret",
"idpConsentUrl": "https://example.com/consent",
"idpSecret": "test-idp-secret"
}
}
}

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

scripts.addApiSignatureHeader();
}

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

if (body?.data) {
bru.setEnvVar("tenantId", body.data.createTenant.tenant?.id);
}
}
31 changes: 31 additions & 0 deletions bruno/collections/Rafiki/Rafiki Admin APIs/Delete Tenant.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
meta {
name: Delete Tenant
type: graphql
seq: 56
}

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

body:graphql {
mutation DeleteTenant($id: String!) {
deleteTenant(id:$id) {
success
}
}
}

body:graphql:vars {
{
"id": "{{tenantId}}"
}
}

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

scripts.addApiSignatureHeader();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
meta {
name: Get Incoming Payment By Tenant
type: graphql
seq: 54
}

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

body:graphql {
query GetIncomingPayment($id: String!) {
incomingPayment(id: $id) {
id
walletAddressId
client
state
expiresAt
incomingAmount {
value
assetCode
assetScale
}
receivedAmount {
value
assetCode
assetScale
}
metadata
createdAt
}
}
}

body:graphql:vars {
{
"id": "{{incomingPaymentId}}",
"tenantId": "{{tenantId}}"
}
}

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

scripts.addApiSignatureHeader();
}
Loading
Loading