diff --git a/tests/e2e/gql.sh b/tests/e2e/gql.sh index 0c96942..809da58 100644 --- a/tests/e2e/gql.sh +++ b/tests/e2e/gql.sh @@ -3,7 +3,7 @@ GALOY_ENDPOINT="http://localhost:4455/graphql" gql_file() { - echo "${REPO_ROOT}/vendor/galoy-quickstart/galoy/test/bats/gql/$1.gql" + echo "${REPO_ROOT}/vendor/galoy-quickstart/graphql/gql/$1.gql" } gql_query() { diff --git a/vendir.lock.yml b/vendir.lock.yml index 031703c..5851874 100644 --- a/vendir.lock.yml +++ b/vendir.lock.yml @@ -2,10 +2,10 @@ apiVersion: vendir.k14s.io/v1alpha1 directories: - contents: - git: - commitTitle: 'refactor(core): cleanup old notification code (#3866)...' - sha: 87302ead3d5f75ce4f9dadda122bf119bd1f0b30 + commitTitle: 'chore(release): [ci skip] bump quickstart image to sha256@db6cadaf07496da7a06e545c3d7b9c526c88a4d9eb9ba085cd7ce4b0d6fb1e02' + sha: 944635e78eec2c086a3e8f191e3239dfcfe7ffa4 tags: - - 0.20.9 + - 0.20.17 path: galoy-quickstart path: vendor kind: LockConfig diff --git a/vendir.yml b/vendir.yml index 59c214a..37edef7 100644 --- a/vendir.yml +++ b/vendir.yml @@ -7,13 +7,10 @@ directories: - path: galoy-quickstart git: url: https://github.com/GaloyMoney/galoy.git - ref: 'main' + ref: main includePaths: - - quickstart/.env.galoy - quickstart/docker-compose.yml - quickstart/dev/**/* + - quickstart/bin/**/* - quickstart/graphql/**/* - - quickstart/galoy/test/**/* - - quickstart/bin/* - - quickstart/.gitignore newRootPath: quickstart diff --git a/vendor/galoy-quickstart/.env.galoy b/vendor/galoy-quickstart/.env.galoy deleted file mode 100644 index 55317b0..0000000 --- a/vendor/galoy-quickstart/.env.galoy +++ /dev/null @@ -1,67 +0,0 @@ -# .env.ci is interpolated into tmp.env.ci during CI testing after integration-deps have been spun up. -# tmp.env.ci is then passed into integration and bats test containers by setting the environment variable "TMP_ENV_CI=tmp.env.ci". -JEST_TIMEOUT=90000 -NET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GdlbmVyYXRlEgRyZWFkEgV3cml0ZRoWCgdtZXNzYWdlEgRyZWFkEgV3cml0ZRoXCghvZmZjaGFpbhIEcmVhZBIFd3JpdGUaFgoHb25jaGFpbhIEcmVhZBIFd3JpdGUaFAoFcGVlcnMSBHJlYWQSBXdyaXRlGhgKBnNpZ25lchIIZ2VuZXJhdGUSBHJlYWQAAAYgL7pU+cKOt6zGyWTdWWmAJLP1L3cnbOPb4Rd3QtniyyM= -MACAROONOUTSIDE2=AgEDbG5kAvgBAwoQfKO82/iPT2zIwWYPrOXvABIBMBoWCgdhZGRyZXNzEgRyZWFkEgV3cml0ZRoTCgRpbmZvEgRyZWFkEgV3cml0ZRoXCghpbnZvaWNlcxIEcmVhZBIFd3JpdGUaIQoIbWFjYXJvb24SCGdlbmVyYXRlEgRyZWFkEgV3cml0ZRoWCgdtZXNzYWdlEgRyZWFkEgV3cml0ZRoXCghvZmZjaGFpbhIEcmVhZBIFd3JpdGUaFgoHb25jaGFpbhIEcmVhZBIFd3JpdGUaFAoFcGVlcnMSBHJlYWQSBXdyaXRlGhgKBnNpZ25lchIIZ2VuZXJhdGUSBHJlYWQAAAYg2XkV+4Z4inbfXGZivRoY+r7KHNZhgxkCEdKByxbeb/Q= -LND1_PUBKEY=03ca1907342d5d37744cb7038375e1867c24a87564c293157c95b2a9d38dcfb4c2 -BITCOINDPORT=18443 -BITCOINDADDR=bitcoind -BITCOIND_SIGNER_PORT=18443 -BITCOIND_SIGNER_ADDR=bitcoind-signer -BITCOINDRPCPASS=rpcpassword -LND1_DNS=lnd1 -LND1_RPCPORT=10009 -LND1_TYPE=offchain,onchain -LND1_NAME=lnd1 -LNDOUTSIDE1ADDR=lnd-outside-1 -LNDOUTSIDE2ADDR=lnd-outside-2 -MONGODB_CON="mongodb://mongodb:27017/galoy" -REDIS_0_DNS=redis -REDIS_0_PORT=6379 -REDIS_TYPE=standalone -REDIS_MASTER_NAME=mymaster -REDIS_PASSWORD= -BRIA_HOST=bria -BRIA_PORT=2742 -PRICE_HOST=price -PRICE_PORT=50051 -PRICE_HISTORY_HOST=price-history -PRICE_HISTORY_PORT=50052 -OATHKEEPER_DECISION_ENDPOINT=http://oathkeeper:4456 -WEBSOCKET_PORT=4000 -GEETEST_ID=geetest_id -GEETEST_KEY=geetest_key -TWILIO_ACCOUNT_SID=AC_twilio_id -TWILIO_AUTH_TOKEN=AC_twilio_auth_token -TWILIO_VERIFY_SERVICE_ID=VA_twilio_service -COMMITHASH=hash -HELMREVISION=1 -PRICE_SERVER_HOST=stablesats -LND1_LOOP_MACAROON=AgEEbG9vcAJ3AwoQRGymK6/vfF3wwuVmaTj3RhIBMBoMCgRhdXRoEgRyZWFkGg8KBGxvb3ASAmluEgNvdXQaGgoLc3VnZ2VzdGlvbnMSBHJlYWQSBXdyaXRlGhUKBHN3YXASB2V4ZWN1dGUSBHJlYWQaDQoFdGVybXMSBHJlYWQAAAYgAFS/qTZItZ3ZKksQkfXAKFnsb0JS5Ok3Oi5fAgCaE/k= -LND1_LOOP_TLS=LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNKakNDQWMyZ0F3SUJBZ0lSQU1memVXM0J0UWJaaTdxSjZoQk5vMHN3Q2dZSUtvWkl6ajBFQXdJd09URWcKTUI0R0ExVUVDaE1YYkc5dmNDQmhkWFJ2WjJWdVpYSmhkR1ZrSUdObGNuUXhGVEFUQmdOVkJBTVREREpqWkdRMQpOMlptWlRZeFpEQWVGdzB5TWpBNU1EY3lNVE15TWpSYUZ3MHlNekV4TURJeU1UTXlNalJhTURreElEQWVCZ05WCkJBb1RGMnh2YjNBZ1lYVjBiMmRsYm1WeVlYUmxaQ0JqWlhKME1SVXdFd1lEVlFRREV3d3lZMlJrTlRkbVptVTIKTVdRd1dUQVRCZ2NxaGtqT1BRSUJCZ2dxaGtqT1BRTUJCd05DQUFUcU5qcVFMUGNHSURaSmtHenNlL3d2ZWt0TwpRVlhpaFJ6WmVLay9ZMFlTNDFkejB2TjlQdktaM0ZxTmN2eEN5a1cvZ1dKNWhBdEpCZTdDaTZhWitnR0tvNEcxCk1JR3lNQTRHQTFVZER3RUIvd1FFQXdJQ3BEQVRCZ05WSFNVRUREQUtCZ2dyQmdFRkJRY0RBVEFQQmdOVkhSTUIKQWY4RUJUQURBUUgvTUIwR0ExVWREZ1FXQkJRZHJscHQzM2lLdlZUZWQyVnV4Y25uQVJMeTlEQmJCZ05WSFJFRQpWREJTZ2d3eVkyUmtOVGRtWm1VMk1XU0NDV3h2WTJGc2FHOXpkSUlFZFc1cGVJSUtkVzVwZUhCaFkydGxkSUlIClluVm1ZMjl1Ym9jRWZ3QUFBWWNRQUFBQUFBQUFBQUFBQUFBQUFBQUFBWWNFckJzQUR6QUtCZ2dxaGtqT1BRUUQKQWdOSEFEQkVBaUJYaFI2VmRzSFYrREhhWGRrV2VRZ0pzMlRxT0pXajBwUXI1ZHFLcFViNjlBSWdTeGtYYTZFRQpWVk9CZ0VhNXR5Z3NBcGM2bDBSak5nVGF2SkF6T2dWT2tIWT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= -KRATOS_MASTER_USER_PASSWORD=passwordHardtoFindWithNumber123 -KRATOS_CALLBACK_API_KEY=The-Value-of-My-Key -KRATOS_PUBLIC_API=http://kratos:4433 -KRATOS_ADMIN_API=http://kratos:4434 -KRATOS_PG_CON="postgres://dbuser:secret@kratos-pg:5432/default?sslmode=disable" - -OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-agent:4318 -MATTERMOST_WEBHOOK_URL=https://chat.galoy.io/hooks/sometoken -UNSECURE_DEFAULT_LOGIN_CODE=000000 -SVIX_SECRET=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2OTE2NzIwMTQsImV4cCI6MjAwNzAzMjAxNCwibmJmIjoxNjkxNjcyMDE0LCJpc3MiOiJzdml4LXNlcnZlciIsInN1YiI6Im9yZ18yM3JiOFlkR3FNVDBxSXpwZ0d3ZFhmSGlyTXUifQ.b9s0aWSisNdUNki4edabBEToLNSwjC9-AiJQr4J3y4E -SVIX_ENDPOINT=http://svix:8071 - -BRIA_API_KEY=bria_dev_000000000000000000000 - -UNSECURE_DEFAULT_LOGIN_CODE=000000 -UNSECURE_IP_FROM_REQUEST_OBJECT=true - -HYDRA_PUBLIC_API="http://hydra:4444" -HYDRA_ADMIN_API="http://hydra:4445" - -NOTIFICATIONS_HOST="dummy" diff --git a/vendor/galoy-quickstart/.gitignore b/vendor/galoy-quickstart/.gitignore deleted file mode 100644 index 7a5af7a..0000000 --- a/vendor/galoy-quickstart/.gitignore +++ /dev/null @@ -1 +0,0 @@ -tmp* diff --git a/vendor/galoy-quickstart/bin/helpers.sh b/vendor/galoy-quickstart/bin/helpers.sh index 4b6b118..61dc2a9 100644 --- a/vendor/galoy-quickstart/bin/helpers.sh +++ b/vendor/galoy-quickstart/bin/helpers.sh @@ -81,7 +81,7 @@ bitcoin_signer_cli() { } gql_file() { - echo "$GALOY_DIR/galoy/test/bats/gql/$1.gql" + echo "$GALOY_DIR/graphql/gql/$1.gql" } gql_query() { diff --git a/vendor/galoy-quickstart/bin/init-onchain.sh b/vendor/galoy-quickstart/bin/init-onchain.sh index 48288f2..acce29e 100755 --- a/vendor/galoy-quickstart/bin/init-onchain.sh +++ b/vendor/galoy-quickstart/bin/init-onchain.sh @@ -13,7 +13,7 @@ bitcoin_cli createwallet "outside" || true bitcoin_cli -generate 200 > /dev/null 2>&1 bitcoin_signer_cli createwallet "dev" || true -bitcoin_signer_cli -rpcwallet=dev importdescriptors "$(cat $GALOY_DIR/galoy/test/bats/bitcoind_signer_descriptors.json)" +bitcoin_signer_cli -rpcwallet=dev importdescriptors "$(cat $GALOY_DIR/dev/config/bitcoind/bitcoind_signer_descriptors.json)" echo "Checking that bria is running..." diff --git a/vendor/galoy-quickstart/bin/re-render.sh b/vendor/galoy-quickstart/bin/re-render.sh index b56b881..3477379 100755 --- a/vendor/galoy-quickstart/bin/re-render.sh +++ b/vendor/galoy-quickstart/bin/re-render.sh @@ -3,18 +3,11 @@ set -e REPO_ROOT=$(git rev-parse --show-toplevel) -GALOY_ROOT_DIR=${REPO_ROOT}/quickstart/galoy +DEV_ROOT_DIR=${REPO_ROOT}/quickstart/dev pushd ${REPO_ROOT}/quickstart ytt -f vendir > vendir.yml vendir sync -ytt -f ./docker-compose.tmpl.yml -f ${GALOY_ROOT_DIR}/docker-compose.yml > docker-compose.yml - -pushd ${GALOY_ROOT_DIR} -source .env -mkdir -p "${GALOY_ROOT_DIR}/../vendor/galoy-quickstart/env" - -export OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-agent:4318 -envsubst < .env.ci | grep -v '^LND2' > ${GALOY_ROOT_DIR}/../.env.galoy +ytt -f ./docker-compose.tmpl.yml -f ${DEV_ROOT_DIR}/docker-compose.deps.yml > docker-compose.yml diff --git a/vendor/galoy-quickstart/dev/BUCK b/vendor/galoy-quickstart/dev/BUCK new file mode 100644 index 0000000..00fca6d --- /dev/null +++ b/vendor/galoy-quickstart/dev/BUCK @@ -0,0 +1,99 @@ +load("@toolchains//rover:macros.bzl", "supergraph", "diff_check", "dev_update_file") +load( ":tilt.bzl", "tilt",) + +# Bring up the full set of services for development +tilt( + name = "up", + subcmd = "up", +) + +# Bring down any remaining/running services +tilt( + name = "down", + subcmd = "down", +) + +python_bootstrap_binary( + name = "healthcheck", + main = "healthcheck.py", + visibility = ["PUBLIC"], +) + +supergraph( + name = "supergraph", + config = "config/apollo-federation/supergraph-config.yaml", + subgraphs = { + "API_KEYS_SCHEMA": "//core/api-keys:sdl", + "NOTIFICATIONS_SCHEMA": "//core/notifications:sdl", + "PUBLIC_SCHEMA": "//core/api:public-sdl", + }, +) + +diff_check( + name = "supergraph-diff", + original = "config/apollo-federation/supergraph.graphql", + new = ":supergraph" +) + +test_suite( + name = "check-sdls", + tests = [ + ":supergraph-diff", + "//core/api:public-schema-diff", + "//core/api:admin-schema-diff", + "//core/api-keys:schema-diff", + "//core/notifications:schema-diff", + ], +) + +dev_update_file( + name = "update-supergraph", + generated = ":supergraph", + out = "config/apollo-federation/supergraph.graphql" +) + +dev_update_file( + name = "update-core-supergraph", + generated = ":supergraph", + out = "../core/api/dev/apollo-federation/supergraph.graphql" +) + +sh_binary( + name = "update-schemas", + main = "bin/update-schemas.sh", +) + +sh_binary( + name = "init-onchain", + main = "bin/init-onchain.sh", +) + +sh_binary( + name = "init-lightning", + main = "bin/init-lightning.sh", +) + +sh_binary( + name = "init-user", + main = "bin/init-user.sh", +) + +sh_binary( + name = "setup-hydra-client", + main = "bin/setup-hydra-client.sh", +) + +sh_binary( + name = "stoppable-trigger", + main = "bin/run-stoppable-trigger.sh", +) + +sh_binary( + name = "add-test-users-with-usernames", + main = "bin/add-test-users-with-usernames.sh", +) + +sh_binary( + name = "fund-user", + main = "bin/fund-user.sh", +) diff --git a/vendor/galoy-quickstart/dev/Tiltfile b/vendor/galoy-quickstart/dev/Tiltfile new file mode 100644 index 0000000..7f68280 --- /dev/null +++ b/vendor/galoy-quickstart/dev/Tiltfile @@ -0,0 +1,549 @@ +config.define_string_list("test") +config.define_bool("bats") +cfg = config.parse() + +CORE_TEST_LABEL = "core" +CONSENT_TEST_LABEL = "consent" +DASHBOARD_TEST_LABEL = "dashboard" +PAY_TEST_LABEL = "pay" + +TEST_RESOURCES = { + CORE_TEST_LABEL: "api-test", + CONSENT_TEST_LABEL: "consent-test", + DASHBOARD_TEST_LABEL: "dashboard-test", + PAY_TEST_LABEL: "pay-test", +} + +is_ci=("ci" in sys.argv) or cfg.get("bats", False) +run_apps=not cfg.get("bats", False) + +# From the Tilt docs: +# +# > By default, Tilt will not let you develop against a remote cluster. +# +# The implication appears to be that if Tilt finds a configured Kubernetes setup on your system +# **and** it's a remote cluster, despite the fact that we are not using any Kubernetes features or +# capabilities, it will still try to connect and fail. Instead, we're going to disable this check +# and continue. +# +# - https://docs.tilt.dev/choosing_clusters.html#remote +# - https://docs.tilt.dev/api.html#api.allow_k8s_contexts +allow_k8s_contexts(k8s_context()) + +def _buck2_dep_inputs(target): + cmd = [ + "buck2", + "uquery", + "\"inputs(deps('{}'))\"".format(target), + ] + file_paths = str(local(" ".join(cmd))).splitlines() + + return file_paths + +dashboard_target = "//apps/dashboard:dev" +if is_ci: + dashboard_target = '//apps/dashboard:dashboard' +local_resource( + "dashboard", + labels = ["apps"], + cmd = "buck2 build {}".format(dashboard_target), + serve_cmd = ". .envs/dashboard.env && buck2 run {}".format(dashboard_target), + serve_env = { + "NEXTAUTH_URL": "http://localhost:3001", + "NEXTAUTH_SECRET": "secret", + "PORT": "3001", + }, + deps = _buck2_dep_inputs(dashboard_target), + allow_parallel = True, + auto_init = run_apps, + resource_deps = [ + "hydra-dashboard", + "api-keys", + "svix", + "svix-pg", + "add-test-users-with-usernames", + "fund-user", + ], + links = [ + link("http://localhost:3001", "dashboard"), + ], +) + +pay_target = "//apps/pay:dev" +if is_ci: + pay_target = '//apps/pay:pay' +local_resource( + "pay", + labels = ["apps"], + cmd = "buck2 build {}".format(pay_target), + serve_cmd = "buck2 run {}".format(pay_target), + serve_env = { + "PORT": "3002", + "CORE_GQL_URL_INTRANET": "http://localhost:4455/graphql", + "NEXT_PUBLIC_CORE_GQL_URL": "http://localhost:4455/graphql", + "NEXT_PUBLIC_CORE_GQL_WEB_SOCKET_URL": "wss://localhost:4455/graphql", + "NEXT_PUBLIC_PAY_DOMAIN": "localhost:3002", + }, + deps = _buck2_dep_inputs(pay_target), + allow_parallel = True, + resource_deps = [ + "api", + ], + links = [ + link("http://localhost:3002", "pay"), + ], +) + +local_resource( + name='hydra-dashboard', + labels = ['apps'], + cmd=[ + 'buck2', + 'run', + '//dev:setup-hydra-client', + '--', + 'dashboard', + 'authorization_code,refresh_token', + 'http://localhost:3001/api/auth/callback/blink', + ], + allow_parallel = True, + auto_init = run_apps, + resource_deps = [ + "hydra", + "api", + ] +) + +consent_test_target = "//apps/consent:test-integration" +local_resource( + "consent-test", + labels = ["test"], + auto_init = is_ci and CONSENT_TEST_LABEL in cfg.get("test", []), + cmd = "buck2 test {}".format(consent_test_target), + allow_parallel = True, + resource_deps = [ + "consent", + "init-test-user", + ], +) + +dashboard_test_target = "//apps/dashboard:test-integration" +local_resource( + "dashboard-test", + labels = ["test"], + auto_init = is_ci and DASHBOARD_TEST_LABEL in cfg.get("test", []), + cmd = "buck2 test {}".format(dashboard_test_target), + resource_deps = [ + "consent", + "dashboard", + "init-test-user", + ], +) + +pay_test_target = "//apps/pay:test-integration" +local_resource( + "pay-test", + labels = ["test"], + auto_init = is_ci and DASHBOARD_TEST_LABEL in cfg.get("test", []), + cmd = "buck2 test {}".format(pay_test_target), + resource_deps = [ + "api", + "pay", + ], +) + +local_resource( + name='init-test-user', + labels = ['test'], + cmd='buck2 run //dev:init-user', + allow_parallel = True, + resource_deps = [ + "oathkeeper", + "kratos", + "api", + ] +) + +local_resource( + name='add-test-users-with-usernames', + labels = ['test'], + cmd='buck2 run //dev:add-test-users-with-usernames', + allow_parallel = True, + resource_deps = [ + "oathkeeper", + "kratos", + "api", + ] +) + +local_resource( + name='fund-user', + labels = ['test'], + cmd='buck2 run //dev:fund-user', + allow_parallel = True, + resource_deps = [ + "oathkeeper", + "kratos", + "api", + "init-onchain", + "init-test-user", + "api-trigger", + "stablesats", + "price", + ] +) + + +consent_target = "//apps/consent:dev" +if is_ci: + consent_target = '//apps/consent:consent' +local_resource( + "consent", + labels = ["auth"], + cmd = "buck2 build {}".format(consent_target), + serve_cmd = "buck2 run {}".format(consent_target), + deps = _buck2_dep_inputs(consent_target), + allow_parallel = True, + auto_init = run_apps, + resource_deps = [ + "hydra-consent", + "apollo-router", + "hydra", + "api", + ], + links = [ + link("http://localhost:3000", "consent"), + ], +) + +local_resource( + name='hydra-consent', + labels = ['auth'], + cmd=[ + 'buck2', + 'run', + '//dev:setup-hydra-client', + '--', + 'consent', + 'authorization_code,refresh_token', + 'http://localhost:3000', + ], + allow_parallel = True, + auto_init = run_apps, + resource_deps = [ + "hydra", + "api", + ] +) + +core_serve_env = { + "HELMREVISION": "dev", + "NETWORK": "regtest", + "OATHKEEPER_DECISION_ENDPOINT": "http://localhost:4456", + "TWILIO_ACCOUNT_SID": "AC_twilio_id", + "TWILIO_AUTH_TOKEN": "AC_twilio_auth_token", + "TWILIO_VERIFY_SERVICE_ID": "VA_twilio_service", + "KRATOS_PG_CON": "postgres://dbuser:secret@localhost:5432/default?sslmode=disable", + "KRATOS_PUBLIC_API": "http://localhost:4433", + "KRATOS_ADMIN_API": "http://localhost:4434", + "KRATOS_MASTER_USER_PASSWORD": "passwordHardtoFindWithNumber123", + "KRATOS_CALLBACK_API_KEY": "The-Value-of-My-Key", + "PRICE_HOST": "localhost", + "PRICE_HISTORY_HOST": "localhost", + "BRIA_HOST": "localhost", + "BRIA_API_KEY": "bria_dev_000000000000000000000", + "NOTIFICATIONS_HOST": "localhost", + "MONGODB_CON": "mongodb://localhost:27017/galoy", + "REDIS_MASTER_NAME": "mymaster", + "REDIS_PASSWORD": "", + "REDIS_0_DNS": "localhost", + "REDIS_0_PORT": "6379", + "REDIS_TYPE": "standalone", + "UNSECURE_IP_FROM_REQUEST_OBJECT": "true", + "UNSECURE_DEFAULT_LOGIN_CODE": "000000", + "GEETEST_ID": "geetest_id", + "GEETEST_KEY": "geetest_key", + + "LND1_TLS": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNZVENDQWdlZ0F3SUJBZ0lSQU9zZzdYWFR4cnVZYlhkeTY2d3RuN1F3Q2dZSUtvWkl6ajBFQXdJd09ERWYKTUIwR0ExVUVDaE1XYkc1a0lHRjFkRzluWlc1bGNtRjBaV1FnWTJWeWRERVZNQk1HQTFVRUF4TU1PRFl4T1RneApNak5tT0Roak1CNFhEVEl6TURFeE9USXdOREUxTTFvWERUTTBNRGN5TVRJd05ERTFNMW93T0RFZk1CMEdBMVVFCkNoTVdiRzVrSUdGMWRHOW5aVzVsY21GMFpXUWdZMlZ5ZERFVk1CTUdBMVVFQXhNTU9EWXhPVGd4TWp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oXCghvZmZjaGFpbhIEcmVhZBIFd3JpdGUaFgoHb25jaGFpbhIEcmVhZBIFd3JpdGUaFAoFcGVlcnMSBHJlYWQSBXdyaXRlGhgKBnNpZ25lchIIZ2VuZXJhdGUSBHJlYWQAAAYgqHDdwGCqx0aQL1/Z3uUfzCpeBhfapGf9s/AZPOVwf6s=", + "LND1_PUBKEY":"03ca1907342d5d37744cb7038375e1867c24a87564c293157c95b2a9d38dcfb4c2", + "LND1_DNS": "localhost", + "LND1_RPCPORT": "10009", + "LND1_NAME": "lnd1", + "LND1_TYPE": "offchain,onchain", + + "LND2_TLS": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNZVENDQWdlZ0F3SUJBZ0lSQU9zZzdYWFR4cnVZYlhkeTY2d3RuN1F3Q2dZSUtvWkl6ajBFQXdJd09ERWYKTUIwR0ExVUVDaE1XYkc1a0lHRjFkRzluWlc1bGNtRjBaV1FnWTJWeWRERVZNQk1HQTFVRUF4TU1PRFl4T1RneApNak5tT0Roak1CNFhEVEl6TURFeE9USXdOREUxTTFvWERUTTBNRGN5TVRJd05ERTFNMW93T0RFZk1CMEdBMVVFCkNoTVdiRzVrSUdGMWRHOW5aVzVsY21GMFpXUWdZMlZ5ZERFVk1CTUdBMVVFQXhNTU9EWXhPVGd4TWpObU9EaGoKTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFM1lieUlKWU1Vcm8zZkl0UFFucysxZ2lpTXI5NQpJUXRmclFDQ2JhOWVtcjI4TENmbk1vYy9VQVFwUlg3QVlvVFRneUdiMFBuZGNUODF5ZVgvYTlPa0RLT0I4VENCCjdqQU9CZ05WSFE4QkFmOEVCQU1DQXFRd0V3WURWUjBsQkF3d0NnWUlLd1lCQlFVSEF3RXdEd1lEVlIwVEFRSC8KQkFVd0F3RUIvekFkQmdOVkhRNEVGZ1FVL1AxRHpJUkRzTEhHMU10d3NrZE5nZ0lub1Mwd2daWUdBMVVkRVFTQgp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JpYXQiOjE2OTE2NzIwMTQsImV4cCI6MjAwNzAzMjAxNCwibmJmIjoxNjkxNjcyMDE0LCJpc3MiOiJzdml4LXNlcnZlciIsInN1YiI6Im9yZ18yM3JiOFlkR3FNVDBxSXpwZ0d3ZFhmSGlyTXUifQ.b9s0aWSisNdUNki4edabBEToLNSwjC9-AiJQr4J3y4E", + "SVIX_ENDPOINT": "http://localhost:8071", + "EXPORTER_PORT": "3003" +} + +callback_target = "//bats/helpers/callback:run" +local_resource( + "callback", + labels = ["test"], + serve_cmd = "buck2 run {}".format(callback_target), + allow_parallel = True, + deps = _buck2_dep_inputs(callback_target), +) + +api_target = "//core/api:dev" +if is_ci: + api_target = "//core/api:api" +local_resource( + "api", + labels = ["core"], + cmd = "buck2 build {}".format(api_target), + serve_cmd = "buck2 run {}".format(api_target), + serve_env = core_serve_env, + allow_parallel = True, + readiness_probe = probe( + period_secs = 5, + http_get = http_get_action( + path = "healthz", + port = 4012, + ), + ), + deps = _buck2_dep_inputs(api_target), + resource_deps = [ + "init-onchain", + "init-lightning", + "lnd1", + "redis", + "mongodb", + "oathkeeper", + "svix", + ] +) + +api_trigger_target = "//core/api-trigger:dev" +if is_ci: + api_trigger_target = "//core/api-trigger:api-trigger" +local_resource( + "api-trigger", + labels = ["core"], + cmd = "buck2 build {}".format(api_trigger_target), + serve_cmd = "buck2 run //dev:stoppable-trigger {}".format(api_trigger_target), + serve_env = core_serve_env, + allow_parallel = True, + readiness_probe = probe( + period_secs = 5, + http_get = http_get_action( + path = "healthz", + port = 4012, + ), + ), + deps = _buck2_dep_inputs(api_trigger_target), + resource_deps = [ + "init-onchain", + "lnd1", + "redis", + "mongodb", + "oathkeeper", + ] +) + +api_exporter_target = "//core/api-exporter:dev" +if is_ci: + api_exporter_target = "//core/api-exporter:api-exporter" +local_resource( + "api-exporter", + labels = ["core"], + cmd = "buck2 build {}".format(api_exporter_target), + serve_cmd = "buck2 run {}".format(api_exporter_target), + serve_env = core_serve_env, + allow_parallel = True, + readiness_probe = probe( + period_secs = 5, + http_get = http_get_action( + path = "healthz", + port = 4012, + ), + ), + deps = _buck2_dep_inputs(api_exporter_target), + resource_deps = [ + "init-onchain", + "lnd1", + "redis", + "mongodb", + "oathkeeper", + ] +) + +api_ws_server_target = "//core/api-ws-server:dev" +if is_ci: + api_ws_server_target = "//core/api-ws-server:api-ws-server" +local_resource( + "api-ws-server", + labels = ["core"], + cmd = "buck2 build {}".format(api_ws_server_target), + serve_cmd = "buck2 run {}".format(api_ws_server_target), + serve_env = core_serve_env, + allow_parallel = True, + readiness_probe = probe( + period_secs = 5, + http_get = http_get_action( + path = "healthz", + port = 4012, + ), + ), + deps = _buck2_dep_inputs(api_ws_server_target), + resource_deps = [ + "init-onchain", + "lnd1", + "redis", + "mongodb", + "oathkeeper", + ] +) + +notifications_target = "//core/notifications:notifications" +local_resource( + "notifications", + labels = ["core"], + cmd = "buck2 build {}".format(notifications_target), + serve_cmd = "buck2 run {}".format(notifications_target), + serve_env = { + "PG_CON": "postgres://user:password@localhost:5433/pg", + "NOTIFICATIONS_CONFIG": "../core/notifications/notifications.yml", + "OTEL_EXPORTER_OTLP_ENDPOINT": "http://localhost:4317", + }, + deps = _buck2_dep_inputs(notifications_target), + allow_parallel = True, + resource_deps = [ + "api", + "notifications-pg" + ] +) + +local_resource( + name='init-onchain', + labels = ['bitcoin'], + cmd='buck2 run //dev:init-onchain', + allow_parallel = True, + resource_deps = [ + "bitcoind", + "bria", + ] +) + +local_resource( + name='init-lightning', + labels = ['bitcoin'], + cmd='buck2 run //dev:init-lightning', + allow_parallel = True, + resource_deps = [ + "init-onchain", + "lnd1", + "lnd-outside-1", + "lnd-outside-2", + ] +) + +api_keys_target = "//core/api-keys:api-keys" +local_resource( + "api-keys", + labels = ["auth"], + cmd = "buck2 build {}".format(api_keys_target), + serve_cmd = "buck2 run {}".format(api_keys_target), + serve_env = { + "PG_CON": "postgres://user:password@localhost:5431/pg", + "API_KEYS_CONFIG": "../core/api-keys/api-keys.yml", + "OTEL_EXPORTER_OTLP_ENDPOINT": "http://localhost:4317", + }, + deps = _buck2_dep_inputs(api_keys_target), + allow_parallel = True, + resource_deps = [ + "api", + "api-keys-pg" + ] +) + +docker_groups = { + "auth": [ + "api-keys-pg", + "oathkeeper", + "hydra", + "hydra-migrate", + "hydra-pg", + "kratos", + "kratos-pg", + ], + "core": [ + "apollo-router", + "mongodb", + "notifications-pg", + "oathkeeper", + "redis", + "stablesats", + "svix-pg", + "svix", + ], + "bitcoin": [ + "lnd1", + "lnd2", + "bria", + "bria-pg", + "bitcoind", + ], + "integration": [ + "lnd-outside-1", + "lnd-outside-2", + ], + "price": [ + "price", + "price-history", + "price-history-migrate", + "price-history-pg" + ], + "tracing": [ + "otel-agent", + ], +} + +to_run = cfg.get("to-run", []) +if to_run != []: + enabled_resources = [] + for svc in to_run: + enabled_resources.append(svc) + config.set_enabled_resources(enabled_resources) + +to_test = cfg.get("test", []) +if to_test != []: + enabled_resources = [] + for label in to_test: + svc = TEST_RESOURCES.get(label) + if svc: + enabled_resources.append(svc) + config.set_enabled_resources(enabled_resources) + +docker_compose("./docker-compose.deps.yml", project_name = "galoy-dev") + +for service in docker_groups["bitcoin"]: + dc_resource(service, labels = ["bitcoin"]) +for service in docker_groups["tracing"]: + dc_resource(service, labels = ["tracing"]) +for service in docker_groups["core"]: + dc_resource(service, labels = ["core"]) +for service in docker_groups["auth"]: + dc_resource(service, labels = ["auth"]) +for service in docker_groups["price"]: + dc_resource(service, labels = ["price"]) +for service in docker_groups["integration"]: + dc_resource(service, labels = ["integration"]) + +api_test_target = "//core/api:test-integration" +local_resource( + "api-test", + labels = ["test"], + auto_init = is_ci and CORE_TEST_LABEL in cfg.get("test", []), + cmd = "buck2 test {}".format(api_test_target), + resource_deps = [res for sublist in docker_groups.values() for res in sublist], +) diff --git a/vendor/galoy-quickstart/dev/apollo-federation/supergraph-config.yaml b/vendor/galoy-quickstart/dev/apollo-federation/supergraph-config.yaml deleted file mode 100644 index 2f2485b..0000000 --- a/vendor/galoy-quickstart/dev/apollo-federation/supergraph-config.yaml +++ /dev/null @@ -1,6 +0,0 @@ -federation_version: =2.3.2 -subgraphs: - public: - routing_url: http://bats-tests:4012/graphql - schema: - file: ../../src/graphql/public/schema.graphql diff --git a/vendor/galoy-quickstart/dev/appcheck/README.md b/vendor/galoy-quickstart/dev/appcheck/README.md deleted file mode 100644 index 5a93937..0000000 --- a/vendor/galoy-quickstart/dev/appcheck/README.md +++ /dev/null @@ -1,140 +0,0 @@ -## Device Login Flow for App Check - -```mermaid -sequenceDiagram - Mobile->>Firebase: (1) Call App Check API - Firebase->>Attestation Provider: (2) Check device authenticity - Attestation Provider-->>Firebase: (3) Device authenticated - Firebase-->>Mobile: (4) Here's jwt (1 hour validity) - Mobile-->>Oathkeeper: (5) Send usernameUUIDV4, passwordUUIDV4, deviceIdUUIDV4, Appcheck - Oathkeeper-->>Backend: (6) Device is real, /auth/create/device-acccount -``` - -## Device Account V3 - -New User/Password Flow ------------------ -1) get app-check jwt add to header `Appcheck` -2) mobile app generates locally a usernameUUIDV4, passwordUUIDV4, deviceIdUUIDV4 (or from keychain if uninstalled) -3) REST -``` -POST `/auth/create/device-account` -Authorization: basic base64(username:password) -Appcheck: jwt -BODY {deviceId} -``` -4) oathkeeper decision api to verify appcheck jwt via rule -- kratos will create identity with uuidv4Username and uuidV4Password - - In our backend store DeviceId in mongo user collection -- RETURN kratos session token - - mobile app needs to backup usernameUUIDV4, passwordUUIDV4, deviceIdUUIDV4 to keychain - -Upgrade To Phone Flow ------------------ -1) captcha flow in mobile app -2) grapqhl -``` -Post /graphql MUTATION UserLoginUpgrade -Authorization: bearer kratosSessionToken -BODY: phone + code -``` -3) backend -``` - isValid(code) then upgrade - a) kratos add phone trait - b) change scheme from "username_password_device_v0" to "phone_no_pasword_v0" - c) change password from passwordUUIDV4 to KratosMasterPassword -``` -RETURN kratos session token - -## Gen Test JWT -To simulate logging in with a device account a helper function has been created in `dev/bin/gen-test-jwt`. If you run `make gen-test-jwt` it will generate a test jwt. - -## Device Upgrade Flow - -Here is a detailed explaination of the `loginUpgradeWithPhone` flow from `src/app/auth/login.ts` - -### Scenario 1) -Phone account already exists (no txn with device acct) - User logs in with device account then he -wants to upgrade to a phone account that already exists. there are no txns on the device account. -Tell the user to logout and log back in with the phone account - -### Scenario 1.5) -Phone account already exists (txns with device acct) - User logs in with device account (and does some txns) then he -wants to upgrade to a phone account that already exists. -throw an error stating that a phone account already exists and the user needs to manually sweep funds -to the new account. Here are the steps the user need to perform: -1. login with phone account and create an invoice (save this invoice) -2. logout of the phone account -3. login with device account (it should auto login) -4 Pay the invoice with max wallet amount. -5. Logout of the device account -6. Log into the phone account and check for the funds - -** FUTURE USE CASE: is it a risk to have txn history persist if user sells phone? - -** can a user manually sweep funds to new account then click a btn in the mobile app to delete device account? - if device account bal is 0 and user clicks nuke account then delete kratos and mongo entries with - mutation nukeDeviceAccountMutation ? - -### Scenario 2) -Happy Path - User logs in with device account, no phone account exists, upgrade device to phone account -a. update kratos => update schema to phone_no_password_v0, remove device trait -b. mongo (user) => update user collection and remove device field, add phone -c. mongo (account) => update account to level 1 - -### Scenario 3) -Unhappy path - User sells phone and forgets to sweep funds to phone account -- Option 1 - too bad, we can't help them -- Option 2 - create some kind of recovery code process? - - -## Other notes on jwts -To create a JWKS (JSON Web Key Set) file, you'll first need to generate a public/private key pair (RSA or EC). You can use an existing pair or generate a new one. In this example, I will show you how to create an RSA key pair and then convert it into a JWKS file. - -Generate an RSA key pair using OpenSSL: - -```bash -openssl genpkey -algorithm RSA -out private_key.pem -pkeyopt rsa_keygen_bits:2048 -openssl rsa -pubout -in private_key.pem -out public_key.pem -``` - -Install the jwk-to-pem and pem-jwk packages to convert between PEM and JWK: -```bash -npm install jwk-to-pem pem-jwk -``` - -Create a jwks-generator.js file and add the following code to convert the RSA public key to a JWK and create a JWKS file: - -```js -const fs = require('fs'); -const { RSA_PEM_to_JWK } = require('pem-jwk'); - -const publicKeyPem = fs.readFileSync('public_key.pem', 'utf8'); -const jwk = RSA_PEM_to_JWK(publicKeyPem); - -const jwks = { - keys: [ - { - kty: jwk.kty, - n: jwk.n, - e: jwk.e, - alg: 'RS256', - use: 'sig', - kid: 'your-key-id', // Use a unique identifier for the key ID - }, - ], -}; - -fs.writeFileSync('.well-known/jwks.json', JSON.stringify(jwks, null, 2)); -console.log('JWKS file generated: .well-known/jwks.json'); -``` - -Run the script: -```bash -node jwks-generator.js -``` - -After running the script, you should have a .well-known/jwks.json file that contains your JWKS. You can then serve this file using an HTTP server (such as Express) or upload it to a web server where your identity provider is hosted. - -The JWKS file should be accessible from the URL specified in your Oathkeeper configuration. Update the `jwks_urls` and `trusted_issuers` fields in the Oathkeeper configuration to match the actual URL of your identity provider and JWKS file. diff --git a/vendor/galoy-quickstart/dev/apollo-federation/README.md b/vendor/galoy-quickstart/dev/config/apollo-federation/README.md similarity index 100% rename from vendor/galoy-quickstart/dev/apollo-federation/README.md rename to vendor/galoy-quickstart/dev/config/apollo-federation/README.md diff --git a/vendor/galoy-quickstart/dev/apollo-federation/router.yaml b/vendor/galoy-quickstart/dev/config/apollo-federation/router.yaml similarity index 100% rename from vendor/galoy-quickstart/dev/apollo-federation/router.yaml rename to vendor/galoy-quickstart/dev/config/apollo-federation/router.yaml diff --git a/vendor/galoy-quickstart/dev/config/apollo-federation/supergraph-config.yaml b/vendor/galoy-quickstart/dev/config/apollo-federation/supergraph-config.yaml new file mode 100644 index 0000000..2bbc4e4 --- /dev/null +++ b/vendor/galoy-quickstart/dev/config/apollo-federation/supergraph-config.yaml @@ -0,0 +1,14 @@ +federation_version: =2.3.2 +subgraphs: + public: + routing_url: http://bats-tests:4012/graphql + schema: + file: ${env.PUBLIC_SCHEMA:-../../../core/api/src/graphql/public/schema.graphql} + api_keys: + routing_url: http://bats-tests:5397/graphql + schema: + file: ${env.API_KEYS_SCHEMA:-../../../core/api-keys/subgraph/schema.graphql} + notifications: + routing_url: http://bats-tests:6684/graphql + schema: + file: ${env.NOTIFICATIONS_SCHEMA:-../../../core/notifications/subgraph/schema.graphql} diff --git a/vendor/galoy-quickstart/dev/apollo-federation/supergraph.graphql b/vendor/galoy-quickstart/dev/config/apollo-federation/supergraph.graphql similarity index 99% rename from vendor/galoy-quickstart/dev/apollo-federation/supergraph.graphql rename to vendor/galoy-quickstart/dev/config/apollo-federation/supergraph.graphql index 5a4f872..a865d53 100644 --- a/vendor/galoy-quickstart/dev/apollo-federation/supergraph.graphql +++ b/vendor/galoy-quickstart/dev/config/apollo-federation/supergraph.graphql @@ -1028,7 +1028,7 @@ type MapMarker @join__type(graph: PUBLIC) { mapInfo: MapInfo! - username: Username + username: Username! } """Text field in a lightning payment transaction""" @@ -1507,7 +1507,7 @@ type Query { accountDefaultWallet(username: Username!, walletCurrency: WalletCurrency): PublicWallet! @join__field(graph: PUBLIC) btcPriceList(range: PriceGraphRange!): [PricePoint] @join__field(graph: PUBLIC) - businessMapMarkers: [MapMarker] @join__field(graph: PUBLIC) + businessMapMarkers: [MapMarker!]! @join__field(graph: PUBLIC) currencyList: [Currency!]! @join__field(graph: PUBLIC) globals: Globals @join__field(graph: PUBLIC) lnInvoicePaymentStatus(input: LnInvoicePaymentStatusInput!): LnInvoicePaymentStatusPayload! @join__field(graph: PUBLIC) @@ -2023,6 +2023,8 @@ enum UserNotificationCategory { CIRCLES @join__enumValue(graph: NOTIFICATIONS) PAYMENTS @join__enumValue(graph: NOTIFICATIONS) + BALANCE @join__enumValue(graph: NOTIFICATIONS) + ADMIN_NOTIFICATION @join__enumValue(graph: NOTIFICATIONS) } enum UserNotificationChannel diff --git a/vendor/galoy-quickstart/dev/bitcoind/bitcoin.conf b/vendor/galoy-quickstart/dev/config/bitcoind/bitcoin.conf similarity index 100% rename from vendor/galoy-quickstart/dev/bitcoind/bitcoin.conf rename to vendor/galoy-quickstart/dev/config/bitcoind/bitcoin.conf diff --git a/vendor/galoy-quickstart/galoy/test/bats/bitcoind_signer_descriptors.json b/vendor/galoy-quickstart/dev/config/bitcoind/bitcoind_signer_descriptors.json similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/bitcoind_signer_descriptors.json rename to vendor/galoy-quickstart/dev/config/bitcoind/bitcoind_signer_descriptors.json diff --git a/vendor/galoy-quickstart/dev/bria.yml b/vendor/galoy-quickstart/dev/config/bria.yml similarity index 90% rename from vendor/galoy-quickstart/dev/bria.yml rename to vendor/galoy-quickstart/dev/config/bria.yml index 7daa7cf..25c27d3 100644 --- a/vendor/galoy-quickstart/dev/bria.yml +++ b/vendor/galoy-quickstart/dev/config/bria.yml @@ -4,5 +4,5 @@ app: electrum_url: fulcrum:50001 tracing: host: "otel-agent" - port: 6831 + port: 4318 service_name: "bria-dev" diff --git a/vendor/galoy-quickstart/dev/fulcrum/fulcrum.conf b/vendor/galoy-quickstart/dev/config/fulcrum/fulcrum.conf similarity index 100% rename from vendor/galoy-quickstart/dev/fulcrum/fulcrum.conf rename to vendor/galoy-quickstart/dev/config/fulcrum/fulcrum.conf diff --git a/vendor/galoy-quickstart/dev/fulcrum/tls.cert b/vendor/galoy-quickstart/dev/config/fulcrum/tls.cert similarity index 100% rename from vendor/galoy-quickstart/dev/fulcrum/tls.cert rename to vendor/galoy-quickstart/dev/config/fulcrum/tls.cert diff --git a/vendor/galoy-quickstart/dev/fulcrum/tls.key b/vendor/galoy-quickstart/dev/config/fulcrum/tls.key similarity index 100% rename from vendor/galoy-quickstart/dev/fulcrum/tls.key rename to vendor/galoy-quickstart/dev/config/fulcrum/tls.key diff --git a/vendor/galoy-quickstart/dev/lnd/lnd.conf b/vendor/galoy-quickstart/dev/config/lnd/lnd.conf similarity index 100% rename from vendor/galoy-quickstart/dev/lnd/lnd.conf rename to vendor/galoy-quickstart/dev/config/lnd/lnd.conf diff --git a/vendor/galoy-quickstart/dev/lnd/regtest/lnd-outside-1.admin.macaroon b/vendor/galoy-quickstart/dev/config/lnd/regtest/lnd-outside-1.admin.macaroon similarity index 100% rename from vendor/galoy-quickstart/dev/lnd/regtest/lnd-outside-1.admin.macaroon rename to vendor/galoy-quickstart/dev/config/lnd/regtest/lnd-outside-1.admin.macaroon diff --git a/vendor/galoy-quickstart/dev/lnd/regtest/lnd-outside-1.admin.macaroon.base64 b/vendor/galoy-quickstart/dev/config/lnd/regtest/lnd-outside-1.admin.macaroon.base64 similarity index 100% rename from vendor/galoy-quickstart/dev/lnd/regtest/lnd-outside-1.admin.macaroon.base64 rename to vendor/galoy-quickstart/dev/config/lnd/regtest/lnd-outside-1.admin.macaroon.base64 diff --git a/vendor/galoy-quickstart/dev/lnd/regtest/lnd-outside-1.macaroons.db b/vendor/galoy-quickstart/dev/config/lnd/regtest/lnd-outside-1.macaroons.db similarity index 100% rename from vendor/galoy-quickstart/dev/lnd/regtest/lnd-outside-1.macaroons.db rename to vendor/galoy-quickstart/dev/config/lnd/regtest/lnd-outside-1.macaroons.db diff --git a/vendor/galoy-quickstart/dev/lnd/regtest/lnd-outside-1.pubkey b/vendor/galoy-quickstart/dev/config/lnd/regtest/lnd-outside-1.pubkey similarity index 100% rename from vendor/galoy-quickstart/dev/lnd/regtest/lnd-outside-1.pubkey rename to vendor/galoy-quickstart/dev/config/lnd/regtest/lnd-outside-1.pubkey diff --git a/vendor/galoy-quickstart/dev/lnd/regtest/lnd-outside-1.wallet.db b/vendor/galoy-quickstart/dev/config/lnd/regtest/lnd-outside-1.wallet.db similarity index 100% rename from vendor/galoy-quickstart/dev/lnd/regtest/lnd-outside-1.wallet.db rename to vendor/galoy-quickstart/dev/config/lnd/regtest/lnd-outside-1.wallet.db diff --git a/vendor/galoy-quickstart/dev/lnd/regtest/lnd-outside-2.admin.macaroon b/vendor/galoy-quickstart/dev/config/lnd/regtest/lnd-outside-2.admin.macaroon similarity index 100% rename from vendor/galoy-quickstart/dev/lnd/regtest/lnd-outside-2.admin.macaroon rename to vendor/galoy-quickstart/dev/config/lnd/regtest/lnd-outside-2.admin.macaroon diff --git a/vendor/galoy-quickstart/dev/lnd/regtest/lnd-outside-2.admin.macaroon.base64 b/vendor/galoy-quickstart/dev/config/lnd/regtest/lnd-outside-2.admin.macaroon.base64 similarity index 100% rename from vendor/galoy-quickstart/dev/lnd/regtest/lnd-outside-2.admin.macaroon.base64 rename to vendor/galoy-quickstart/dev/config/lnd/regtest/lnd-outside-2.admin.macaroon.base64 diff --git a/vendor/galoy-quickstart/dev/lnd/regtest/lnd-outside-2.macaroons.db b/vendor/galoy-quickstart/dev/config/lnd/regtest/lnd-outside-2.macaroons.db similarity index 100% rename from vendor/galoy-quickstart/dev/lnd/regtest/lnd-outside-2.macaroons.db rename to vendor/galoy-quickstart/dev/config/lnd/regtest/lnd-outside-2.macaroons.db diff --git a/vendor/galoy-quickstart/dev/lnd/regtest/lnd-outside-2.pubkey b/vendor/galoy-quickstart/dev/config/lnd/regtest/lnd-outside-2.pubkey similarity index 100% rename from vendor/galoy-quickstart/dev/lnd/regtest/lnd-outside-2.pubkey rename to vendor/galoy-quickstart/dev/config/lnd/regtest/lnd-outside-2.pubkey diff --git a/vendor/galoy-quickstart/dev/lnd/regtest/lnd-outside-2.wallet.db b/vendor/galoy-quickstart/dev/config/lnd/regtest/lnd-outside-2.wallet.db similarity index 100% rename from vendor/galoy-quickstart/dev/lnd/regtest/lnd-outside-2.wallet.db rename to vendor/galoy-quickstart/dev/config/lnd/regtest/lnd-outside-2.wallet.db diff --git a/vendor/galoy-quickstart/dev/lnd/regtest/lnd1.admin.macaroon b/vendor/galoy-quickstart/dev/config/lnd/regtest/lnd1.admin.macaroon similarity index 100% rename from vendor/galoy-quickstart/dev/lnd/regtest/lnd1.admin.macaroon rename to vendor/galoy-quickstart/dev/config/lnd/regtest/lnd1.admin.macaroon diff --git a/vendor/galoy-quickstart/dev/lnd/regtest/lnd1.admin.macaroon.base64 b/vendor/galoy-quickstart/dev/config/lnd/regtest/lnd1.admin.macaroon.base64 similarity index 100% rename from vendor/galoy-quickstart/dev/lnd/regtest/lnd1.admin.macaroon.base64 rename to vendor/galoy-quickstart/dev/config/lnd/regtest/lnd1.admin.macaroon.base64 diff --git a/vendor/galoy-quickstart/dev/lnd/regtest/lnd1.macaroons.db b/vendor/galoy-quickstart/dev/config/lnd/regtest/lnd1.macaroons.db similarity index 100% rename from vendor/galoy-quickstart/dev/lnd/regtest/lnd1.macaroons.db rename to vendor/galoy-quickstart/dev/config/lnd/regtest/lnd1.macaroons.db diff --git a/vendor/galoy-quickstart/dev/lnd/regtest/lnd1.pubkey b/vendor/galoy-quickstart/dev/config/lnd/regtest/lnd1.pubkey similarity index 100% rename from vendor/galoy-quickstart/dev/lnd/regtest/lnd1.pubkey rename to vendor/galoy-quickstart/dev/config/lnd/regtest/lnd1.pubkey diff --git a/vendor/galoy-quickstart/dev/lnd/regtest/lnd1.wallet.db b/vendor/galoy-quickstart/dev/config/lnd/regtest/lnd1.wallet.db similarity index 100% rename from vendor/galoy-quickstart/dev/lnd/regtest/lnd1.wallet.db rename to vendor/galoy-quickstart/dev/config/lnd/regtest/lnd1.wallet.db diff --git a/vendor/galoy-quickstart/dev/lnd/regtest/lnd2.admin.macaroon b/vendor/galoy-quickstart/dev/config/lnd/regtest/lnd2.admin.macaroon similarity index 100% rename from vendor/galoy-quickstart/dev/lnd/regtest/lnd2.admin.macaroon rename to vendor/galoy-quickstart/dev/config/lnd/regtest/lnd2.admin.macaroon diff --git a/vendor/galoy-quickstart/dev/lnd/regtest/lnd2.admin.macaroon.base64 b/vendor/galoy-quickstart/dev/config/lnd/regtest/lnd2.admin.macaroon.base64 similarity index 100% rename from vendor/galoy-quickstart/dev/lnd/regtest/lnd2.admin.macaroon.base64 rename to vendor/galoy-quickstart/dev/config/lnd/regtest/lnd2.admin.macaroon.base64 diff --git a/vendor/galoy-quickstart/dev/lnd/regtest/lnd2.macaroons.db b/vendor/galoy-quickstart/dev/config/lnd/regtest/lnd2.macaroons.db similarity index 100% rename from vendor/galoy-quickstart/dev/lnd/regtest/lnd2.macaroons.db rename to vendor/galoy-quickstart/dev/config/lnd/regtest/lnd2.macaroons.db diff --git a/vendor/galoy-quickstart/dev/lnd/regtest/lnd2.pubkey b/vendor/galoy-quickstart/dev/config/lnd/regtest/lnd2.pubkey similarity index 100% rename from vendor/galoy-quickstart/dev/lnd/regtest/lnd2.pubkey rename to vendor/galoy-quickstart/dev/config/lnd/regtest/lnd2.pubkey diff --git a/vendor/galoy-quickstart/dev/lnd/regtest/lnd2.wallet.db b/vendor/galoy-quickstart/dev/config/lnd/regtest/lnd2.wallet.db similarity index 100% rename from vendor/galoy-quickstart/dev/lnd/regtest/lnd2.wallet.db rename to vendor/galoy-quickstart/dev/config/lnd/regtest/lnd2.wallet.db diff --git a/vendor/galoy-quickstart/dev/lnd/tls.cert b/vendor/galoy-quickstart/dev/config/lnd/tls.cert similarity index 100% rename from vendor/galoy-quickstart/dev/lnd/tls.cert rename to vendor/galoy-quickstart/dev/config/lnd/tls.cert diff --git a/vendor/galoy-quickstart/dev/lnd/tls.key b/vendor/galoy-quickstart/dev/config/lnd/tls.key similarity index 100% rename from vendor/galoy-quickstart/dev/lnd/tls.key rename to vendor/galoy-quickstart/dev/config/lnd/tls.key diff --git a/vendor/galoy-quickstart/dev/ory/body.jsonnet b/vendor/galoy-quickstart/dev/config/ory/body.jsonnet similarity index 100% rename from vendor/galoy-quickstart/dev/ory/body.jsonnet rename to vendor/galoy-quickstart/dev/config/ory/body.jsonnet diff --git a/vendor/galoy-quickstart/dev/ory/email_no_password_v0.identity.schema.json b/vendor/galoy-quickstart/dev/config/ory/email_no_password_v0.identity.schema.json similarity index 100% rename from vendor/galoy-quickstart/dev/ory/email_no_password_v0.identity.schema.json rename to vendor/galoy-quickstart/dev/config/ory/email_no_password_v0.identity.schema.json diff --git a/vendor/galoy-quickstart/dev/ory/hydra.yml b/vendor/galoy-quickstart/dev/config/ory/hydra.yml similarity index 100% rename from vendor/galoy-quickstart/dev/ory/hydra.yml rename to vendor/galoy-quickstart/dev/config/ory/hydra.yml diff --git a/vendor/galoy-quickstart/dev/ory/jwks.json b/vendor/galoy-quickstart/dev/config/ory/jwks.json similarity index 100% rename from vendor/galoy-quickstart/dev/ory/jwks.json rename to vendor/galoy-quickstart/dev/config/ory/jwks.json diff --git a/vendor/galoy-quickstart/dev/ory/kratos.yml b/vendor/galoy-quickstart/dev/config/ory/kratos.yml similarity index 100% rename from vendor/galoy-quickstart/dev/ory/kratos.yml rename to vendor/galoy-quickstart/dev/config/ory/kratos.yml diff --git a/vendor/galoy-quickstart/dev/ory/oathkeeper.yml b/vendor/galoy-quickstart/dev/config/ory/oathkeeper.yml similarity index 100% rename from vendor/galoy-quickstart/dev/ory/oathkeeper.yml rename to vendor/galoy-quickstart/dev/config/ory/oathkeeper.yml diff --git a/vendor/galoy-quickstart/dev/ory/oathkeeper_rules.yaml b/vendor/galoy-quickstart/dev/config/ory/oathkeeper_rules.yaml similarity index 100% rename from vendor/galoy-quickstart/dev/ory/oathkeeper_rules.yaml rename to vendor/galoy-quickstart/dev/config/ory/oathkeeper_rules.yaml diff --git a/vendor/galoy-quickstart/dev/ory/phone_email_no_password_v0.identity.schema.json b/vendor/galoy-quickstart/dev/config/ory/phone_email_no_password_v0.identity.schema.json similarity index 100% rename from vendor/galoy-quickstart/dev/ory/phone_email_no_password_v0.identity.schema.json rename to vendor/galoy-quickstart/dev/config/ory/phone_email_no_password_v0.identity.schema.json diff --git a/vendor/galoy-quickstart/dev/ory/phone_no_password_v0.identity.schema.json b/vendor/galoy-quickstart/dev/config/ory/phone_no_password_v0.identity.schema.json similarity index 100% rename from vendor/galoy-quickstart/dev/ory/phone_no_password_v0.identity.schema.json rename to vendor/galoy-quickstart/dev/config/ory/phone_no_password_v0.identity.schema.json diff --git a/vendor/galoy-quickstart/dev/ory/username_password_deviceid_v0.identity.schema.json b/vendor/galoy-quickstart/dev/config/ory/username_password_deviceid_v0.identity.schema.json similarity index 100% rename from vendor/galoy-quickstart/dev/ory/username_password_deviceid_v0.identity.schema.json rename to vendor/galoy-quickstart/dev/config/ory/username_password_deviceid_v0.identity.schema.json diff --git a/vendor/galoy-quickstart/dev/otel-agent-config.yaml b/vendor/galoy-quickstart/dev/config/otel-agent-config.yaml similarity index 100% rename from vendor/galoy-quickstart/dev/otel-agent-config.yaml rename to vendor/galoy-quickstart/dev/config/otel-agent-config.yaml diff --git a/vendor/galoy-quickstart/dev/stablesats.yml b/vendor/galoy-quickstart/dev/config/stablesats.yml similarity index 100% rename from vendor/galoy-quickstart/dev/stablesats.yml rename to vendor/galoy-quickstart/dev/config/stablesats.yml diff --git a/vendor/galoy-quickstart/dev/docker-compose.deps.yml b/vendor/galoy-quickstart/dev/docker-compose.deps.yml new file mode 100644 index 0000000..6c6866f --- /dev/null +++ b/vendor/galoy-quickstart/dev/docker-compose.deps.yml @@ -0,0 +1,356 @@ +#@data/values +--- +version: "3" +services: + price: + image: us.gcr.io/galoy-org/price:edge + ports: + - 50051:50051 + - 9464:9464 + price-history: + image: us.gcr.io/galoy-org/price-history:edge + ports: + - 50052:50052 + command: ./scripts/run-servers-dev.sh + environment: + - DB_HOST=price-history-pg + - DB_PORT=5432 + - DB_USER=galoy-price-usr + - DB_PWD=galoy-price-pwd + - DB_DB=galoy-price-history + - DB_POOL_MIN=1 + - DB_POOL_MAX=5 + - DB_DEBUG=false + depends_on: + - price-history-pg + - price-history-migrate + price-history-migrate: + image: us.gcr.io/galoy-org/price-history-migrate:edge + ports: [] + environment: + - DB_HOST=price-history-pg + - DB_PORT=5432 + - DB_USER=galoy-price-usr + - DB_PWD=galoy-price-pwd + - DB_DB=galoy-price-history + - DB_POOL_MIN=1 + - DB_POOL_MAX=5 + - DB_DEBUG=false + depends_on: + - price-history-pg + price-history-pg: + image: postgres:14.1 + environment: + - POSTGRES_USER=galoy-price-usr + - POSTGRES_PASSWORD=galoy-price-pwd + - POSTGRES_DB=galoy-price-history + api-keys-pg: + image: postgres:14.1 + environment: + - POSTGRES_USER=user + - POSTGRES_PASSWORD=password + - POSTGRES_DB=pg + ports: + - "5431:5432" + notifications-pg: + image: postgres:14.1 + environment: + - POSTGRES_USER=user + - POSTGRES_PASSWORD=password + - POSTGRES_DB=pg + ports: + - "5433:5432" + healthcheck: + test: ["CMD-SHELL", "pg_isready"] + interval: 5s + timeout: 30s + retries: 5 + oathkeeper: + image: oryd/oathkeeper:v0.40.6-distroless + ports: + - "4455:4455" + - "4456:4456" + extra_hosts: + - "bats-tests:host-gateway" + command: serve -c /home/ory/oathkeeper.yml --sqa-opt-out + volumes: + - ${HOST_PROJECT_PATH:-.}/config/ory:/home/ory + depends_on: + - kratos + - hydra + - apollo-router + - otel-agent + hydra: + image: oryd/hydra:v2.1.2 + ports: + - "4444:4444" #! Public port + - "4445:4445" #! Admin port + command: serve -c /home/ory/hydra.yml all --dev + volumes: + - ${HOST_PROJECT_PATH:-.}/config/ory:/home/ory + environment: + - DSN=postgres://hydra:secret@hydra-pg:5432/hydra?sslmode=disable&max_conns=20&max_idle_conns=4 + restart: unless-stopped + depends_on: + - hydra-migrate + - hydra-pg + + hydra-migrate: + image: oryd/hydra:v2.1.2 + environment: + - DSN=postgres://hydra:secret@hydra-pg:5432/hydra?sslmode=disable&max_conns=20&max_idle_conns=4 + command: migrate -c /home/ory/hydra.yml sql -e --yes + volumes: + - ${HOST_PROJECT_PATH:-.}/config/ory:/home/ory + + restart: on-failure + depends_on: + - hydra-pg + + hydra-pg: + image: postgres:14.1 + environment: + - POSTGRES_USER=hydra + - POSTGRES_PASSWORD=secret + - POSTGRES_DB=hydra + kratos: + image: oryd/kratos:v1.0.0 + extra_hosts: + - "bats-tests:host-gateway" + ports: + - "4433:4433" #! public + - "4434:4434" #! admin + entrypoint: sh -c + command: '"kratos migrate sql up -y -e && kratos serve -c /home/ory/kratos.yml --watch-courier --sqa-opt-out"' + environment: + DSN: postgres://dbuser:secret@kratos-pg:5432/default?sslmode=disable + links: + - kratos-pg:kratos-pg + volumes: + - ${HOST_PROJECT_PATH:-.}/config/ory:/home/ory + kratos-pg: + image: postgres:14.1 + ports: + - "5432:5432" + environment: + - POSTGRES_USER=dbuser + - POSTGRES_PASSWORD=secret + - POSTGRES_DB=default + apollo-router: + image: ghcr.io/apollographql/router:v1.25.0 + ports: + - 4004:4004 + extra_hosts: + - "bats-tests:host-gateway" + environment: + - APOLLO_ROUTER_SUPERGRAPH_PATH=/repo/dev/supergraph.graphql + - APOLLO_ROUTER_CONFIG_PATH=/repo/dev/router.yaml + volumes: + - ${HOST_PROJECT_PATH:-.}/config/apollo-federation:/repo/dev + depends_on: + - otel-agent + redis: + image: redis:7.0.8 + ports: + - "6379:6379" + environment: + - ALLOW_EMPTY_PASSWORD=yes + - REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL + mongodb: + image: mongo:7.0.2 + ports: + - "27017:27017" + environment: + - MONGO_INITDB_DATABASE=galoy + lnd1: + image: lightninglabs/lnd:v0.17.3-beta + ports: + - "10009:10009" + volumes: + - ${HOST_PROJECT_PATH:-.}/config/lnd/lnd.conf:/root/.lnd/lnd.conf + - ${HOST_PROJECT_PATH:-.}/config/lnd/tls.key:/root/.lnd/tls.key + - ${HOST_PROJECT_PATH:-.}/config/lnd/tls.cert:/root/.lnd/tls.cert + - ${HOST_PROJECT_PATH:-.}/config/lnd/regtest/lnd1.wallet.db:/root/.lnd/wallet.db + - ${HOST_PROJECT_PATH:-.}/config/lnd/regtest/lnd1.macaroons.db:/root/.lnd/macaroons.db + - ${HOST_PROJECT_PATH:-.}/config/lnd/regtest/lnd1.admin.macaroon:/root/.lnd/admin.macaroon + depends_on: [bitcoind] + entrypoint: ["/bin/sh", "-c"] + command: + - | + mkdir -p /root/.lnd/data/chain/bitcoin/regtest/ + cp /root/.lnd/wallet.db /root/.lnd/data/chain/bitcoin/regtest/wallet.db + cp /root/.lnd/macaroons.db /root/.lnd/data/chain/bitcoin/regtest/macaroons.db + cp /root/.lnd/admin.macaroon /root/.lnd/data/chain/bitcoin/regtest/admin.macaroon + /bin/lnd + lnd2: + image: lightninglabs/lnd:v0.17.3-beta + ports: + - "10010:10009" + volumes: + - ${HOST_PROJECT_PATH:-.}/config/lnd/lnd.conf:/root/.lnd/lnd.conf + - ${HOST_PROJECT_PATH:-.}/config/lnd/tls.key:/root/.lnd/tls.key + - ${HOST_PROJECT_PATH:-.}/config/lnd/tls.cert:/root/.lnd/tls.cert + - ${HOST_PROJECT_PATH:-.}/config/lnd/regtest/lnd2.wallet.db:/root/.lnd/wallet.db + - ${HOST_PROJECT_PATH:-.}/config/lnd/regtest/lnd2.macaroons.db:/root/.lnd/macaroons.db + - ${HOST_PROJECT_PATH:-.}/config/lnd/regtest/lnd2.admin.macaroon:/root/.lnd/admin.macaroon + depends_on: [bitcoind] + entrypoint: ["/bin/sh", "-c"] + command: + - | + mkdir -p /root/.lnd/data/chain/bitcoin/regtest/ + cp /root/.lnd/wallet.db /root/.lnd/data/chain/bitcoin/regtest/wallet.db + cp /root/.lnd/macaroons.db /root/.lnd/data/chain/bitcoin/regtest/macaroons.db + cp /root/.lnd/admin.macaroon /root/.lnd/data/chain/bitcoin/regtest/admin.macaroon + /bin/lnd + lnd-outside-1: + image: lightninglabs/lnd:v0.17.3-beta + ports: + - "10012:10009" + volumes: + - ${HOST_PROJECT_PATH:-.}/config/lnd/lnd.conf:/root/.lnd/lnd.conf + - ${HOST_PROJECT_PATH:-.}/config/lnd/tls.key:/root/.lnd/tls.key + - ${HOST_PROJECT_PATH:-.}/config/lnd/tls.cert:/root/.lnd/tls.cert + - ${HOST_PROJECT_PATH:-.}/config/lnd/regtest/lnd-outside-1.wallet.db:/root/.lnd/wallet.db + - ${HOST_PROJECT_PATH:-.}/config/lnd/regtest/lnd-outside-1.macaroons.db:/root/.lnd/macaroons.db + - ${HOST_PROJECT_PATH:-.}/config/lnd/regtest/lnd-outside-1.admin.macaroon:/root/.lnd/admin.macaroon + entrypoint: ["/bin/sh", "-c"] + command: + - | + mkdir -p /root/.lnd/data/chain/bitcoin/regtest/ + cp /root/.lnd/wallet.db /root/.lnd/data/chain/bitcoin/regtest/wallet.db + cp /root/.lnd/macaroons.db /root/.lnd/data/chain/bitcoin/regtest/macaroons.db + cp /root/.lnd/admin.macaroon /root/.lnd/data/chain/bitcoin/regtest/admin.macaroon + /bin/lnd + depends_on: [bitcoind] + lnd-outside-2: + image: lightninglabs/lnd:v0.17.3-beta + ports: + - "10013:10009" + volumes: + - ${HOST_PROJECT_PATH:-.}/config/lnd/lnd.conf:/root/.lnd/lnd.conf + - ${HOST_PROJECT_PATH:-.}/config/lnd/tls.key:/root/.lnd/tls.key + - ${HOST_PROJECT_PATH:-.}/config/lnd/tls.cert:/root/.lnd/tls.cert + - ${HOST_PROJECT_PATH:-.}/config/lnd/regtest/lnd-outside-2.wallet.db:/root/.lnd/wallet.db + - ${HOST_PROJECT_PATH:-.}/config/lnd/regtest/lnd-outside-2.macaroons.db:/root/.lnd/macaroons.db + - ${HOST_PROJECT_PATH:-.}/config/lnd/regtest/lnd-outside-2.admin.macaroon:/root/.lnd/admin.macaroon + entrypoint: ["/bin/sh", "-c"] + command: + - | + mkdir -p /root/.lnd/data/chain/bitcoin/regtest/ + cp /root/.lnd/wallet.db /root/.lnd/data/chain/bitcoin/regtest/wallet.db + cp /root/.lnd/macaroons.db /root/.lnd/data/chain/bitcoin/regtest/macaroons.db + cp /root/.lnd/admin.macaroon /root/.lnd/data/chain/bitcoin/regtest/admin.macaroon + /bin/lnd + depends_on: [bitcoind] + bria: + image: us.gcr.io/galoy-org/bria:latest + ports: + - "2743:2743" + - "2742:2742" + environment: + - PG_CON=postgres://user:password@bria-pg:5432/pg + - BITCOIND_SIGNER_ENDPOINT=https://bitcoind-signer:18443 + command: + - bria + - daemon + - --config + - /bria.yml + - dev + - -x + - tpubDDDDGYiFda8HfJRc2AHFJDxVzzEtBPrKsbh35EaW2UGd5qfzrF2G87ewAgeeRyHEz4iB3kvhAYW1sH6dpLepTkFUzAktumBN8AXeXWE9nd1 + - -d + - m/84h/0h/0h + volumes: + - ${HOST_PROJECT_PATH:-.}/config/bria.yml:/bria.yml + depends_on: + bitcoind-signer: + condition: service_started + otel-agent: + condition: service_started + fulcrum: + condition: service_started + bria-pg: + condition: service_healthy + bria-pg: + image: postgres:14.1 + environment: + - POSTGRES_USER=user + - POSTGRES_PASSWORD=password + - POSTGRES_DB=pg + healthcheck: + test: ["CMD-SHELL", "pg_isready"] + interval: 5s + timeout: 30s + retries: 5 + fulcrum: + image: cculianu/fulcrum:latest + ports: + - "50001:50001" + depends_on: [bitcoind] + volumes: + - ${HOST_PROJECT_PATH:-.}/config/fulcrum/fulcrum.conf:/fulcrum.conf + - ${HOST_PROJECT_PATH:-.}/config/fulcrum/tls.key:/tls.key + - ${HOST_PROJECT_PATH:-.}/config/fulcrum/tls.cert:/tls.cert + environment: + - DATA_DIR=/db + - SSL_CERTFILE=/tls.cert + - SSL_KEYFILE=/tls.key + command: ["Fulcrum", "/fulcrum.conf"] + bitcoind: + image: lncm/bitcoind:v25.1 + ports: + - "18443:18443" + volumes: + - ${HOST_PROJECT_PATH:-.}/config/bitcoind/bitcoin.conf:/data/.bitcoin/bitcoin.conf + bitcoind-signer: + image: lncm/bitcoind:v25.1 + ports: [] + volumes: + - ${HOST_PROJECT_PATH:-.}/config/bitcoind/bitcoin.conf:/data/.bitcoin/bitcoin.conf + depends_on: [bitcoind] + entrypoint: ["/bin/sh", "-c"] + command: + - | + bitcoind -connect=bitcoind:18444 + otel-agent: + ports: + - "4318:4318" #! http receiver + - "4317:4317" #! grpc receiver + image: otel/opentelemetry-collector-contrib:0.84.0 + command: ["--config=/etc/otel-agent-config.yaml"] + environment: + - HONEYCOMB_DATASET=${HONEYCOMB_DATASET} + - HONEYCOMB_API_KEY=${HONEYCOMB_API_KEY} + volumes: + - ${HOST_PROJECT_PATH:-.}/config/otel-agent-config.yaml:/etc/otel-agent-config.yaml + svix: + image: svix/svix-server:v1.11 + platform: linux/amd64 + environment: + WAIT_FOR: "true" + SVIX_DB_DSN: postgresql://postgres:postgres@svix-pg/postgres + SVIX_JWT_SECRET: 8KjzRXrKkd9YFcNyqLSIY8JwiaCeRc6WK4UkMnSW + SVIX_WHITELIST_SUBNETS: "[0.0.0.0/0]" + SVIX_QUEUE_TYPE: memory + depends_on: + - svix-pg + ports: + - 8071:8071 + extra_hosts: + - bats-tests:host-gateway + svix-pg: + image: postgres:14.1 + environment: + POSTGRES_PASSWORD: postgres + + stablesats: + image: us.gcr.io/galoy-org/stablesats-rs:latest + ports: + - "3325:3325" + command: ["stablesats", "run"] + working_dir: /repo/config + depends_on: + - otel-agent + restart: on-failure:10 + volumes: + - ${HOST_PROJECT_PATH:-.}/:/repo diff --git a/vendor/galoy-quickstart/dev/healthcheck.py b/vendor/galoy-quickstart/dev/healthcheck.py new file mode 100644 index 0000000..f8bb1f1 --- /dev/null +++ b/vendor/galoy-quickstart/dev/healthcheck.py @@ -0,0 +1,165 @@ +#!/usr/bin/env python3 +""" +Detects and reports the max number of open files allowed per process. +""" +import argparse +import subprocess +import shutil +import sys + +MIN_OPENFILES_VALUE = 1024 + + +def main() -> int: + parser = argparse.ArgumentParser(description=__doc__) + parser.parse_args() + + remediations = 0 + + section("Running health check on system for developing in the Galoy project") + + docker_cmd = detect_docker_command() + remediations += docker_cmd + if docker_cmd == 0: + remediations += detect_docker_engine() + remediations += detect_docker_compose() + remediations += detect_nix_bash() + remediations += detect_openfiles_soft_limit() + + blank() + if remediations > 0: + section(f"Health check complete with _{remediations}_ " + "suggested remediation(s)") + else: + section(f"Health check complete with **no** suggested remediations.") + + # If there are remediations, exit non-zero so scripts can detect that the + # current setup may not be healthy + return remediations + + +def detect_docker_command() -> int: + result = detect_command("docker") + return result + + +def detect_docker_engine() -> int: + result = subprocess.run(["docker", "info"], capture_output=True) + if result.returncode == 0: + info("Detected running Docker Engine") + return 0 + else: + warn("Failed to detect running Docker Engine") + indent("Output from `docker info` stderr:") + indent("-----") + for line in result.stderr.splitlines(): + indent(line.decode("ascii")) + indent("-----") + indent("Ensure that the Docker Engine is running and try again") + return 1 + + +def detect_docker_compose() -> int: + result = subprocess.run( + [ + "docker", + "compose", + "version", + ], + capture_output=True, + ) + if result.returncode == 0: + info("Detected Docker Compose is installed") + return 0 + else: + warn("Failed to detect Docker Compose installation") + indent("Output from `docker compose version` stderr:") + indent("-----") + for line in result.stderr.splitlines(): + indent(line.decode("ascii")) + indent("-----") + indent("Ensure that the Docker Compose is running and try again") + return 1 + + +def detect_nix_bash() -> int: + cmd = "bash" + result = shutil.which(cmd) + if result and result.startswith("/nix/store/"): + info(f"Found `{cmd}` in Nix environment") + return 0 + elif result: + warn(f"Failed to find `{cmd}` in Nix environment (cmd={result})") + indent("Ensure that your direnv setup is correct or that you have ran " + "`nix develop`") + return 1 + else: + warn(f"Failed to find `{cmd}` in Nix environment or on system") + indent("Ensure that your direnv setup is correct or that you have ran " + "`nix develop`") + return 1 + + +def detect_openfiles_soft_limit() -> int: + soft_limit = current_openfiles_soft_limit() + + if soft_limit < MIN_OPENFILES_VALUE: + new = MIN_OPENFILES_VALUE + warn("Low value for max open files soft limit detected in " + f"current shell (current={soft_limit})") + blank() + indent("To set a value for this shell session **only** run:") + indent(f"ulimit -Sn {new}", amount=2) + blank() + indent( + "To make a **permanent** change for all new shell sessions run:") + indent(f"echo 'ulimit -Sn {new}' >>\"$HOME/.profile\"", amount=2) + return 1 + else: + info("Reasonable value for max open files soft limit detected in " + f"current shell (current={soft_limit})") + return 0 + + +def detect_command(cmd: str) -> int: + result = shutil.which(cmd) + if result: + info(f"Detected `{cmd}` command (cmd={result})") + return 0 + else: + warn(f"Failed to find `{cmd}` on PATH and is required for development") + return 1 + + +def current_openfiles_soft_limit() -> int: + result = subprocess.run( + ["bash", "-c", "ulimit -Sn"], + capture_output=True, + ) + result.check_returncode() + return int(result.stdout.strip().decode("ascii")) + + +def section(msg: str): + print(f"--- {msg}") + + +def info(msg: str): + print(f" - {msg}") + + +def warn(msg: str): + print(f" x {msg}") + + +def indent(msg: str, amount=1): + print("{:>{width}}{}".format("", msg, width=amount * 4)) + + +def blank(): + print("") + + +if __name__ == "__main__": + sys.exit(main()) + diff --git a/vendor/galoy-quickstart/dev/helpers/auth.sh b/vendor/galoy-quickstart/dev/helpers/auth.sh new file mode 100644 index 0000000..f2e78b4 --- /dev/null +++ b/vendor/galoy-quickstart/dev/helpers/auth.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +AUTH_ENDPOINT="http://localhost:4455/auth/phone/login" + +login_user() { + phone="$1" + + login_response=$(curl \ + -s \ + -X POST $AUTH_ENDPOINT \ + -H "Content-Type: application/json" \ + -d '{"phone": "'$phone'", "code":"000000"}') + + echo "$login_response" | jq -r '.authToken' +} diff --git a/vendor/galoy-quickstart/dev/helpers/cli.sh b/vendor/galoy-quickstart/dev/helpers/cli.sh new file mode 100755 index 0000000..f86979a --- /dev/null +++ b/vendor/galoy-quickstart/dev/helpers/cli.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +COMPOSE_PROJECT_NAME="${COMPOSE_PROJECT_NAME:-quickstart}" + +bitcoin_cli() { + docker exec "${COMPOSE_PROJECT_NAME}-bitcoind-1" bitcoin-cli "$@" +} + +bitcoin_signer_cli() { + docker exec "${COMPOSE_PROJECT_NAME}-bitcoind-signer-1" bitcoin-cli "$@" +} + +bria_cli() { + docker exec "${COMPOSE_PROJECT_NAME}-bria-1" bria "$@" +} + +lnd_cli() { + docker exec "${COMPOSE_PROJECT_NAME}-lnd1-1" \ + lncli \ + --macaroonpath /root/.lnd/admin.macaroon \ + --tlscertpath /root/.lnd/tls.cert \ + $@ +} + +lnd_outside_cli() { + docker exec "${COMPOSE_PROJECT_NAME}-lnd-outside-1-1" \ + lncli \ + --macaroonpath /root/.lnd/admin.macaroon \ + --tlscertpath /root/.lnd/tls.cert \ + $@ +} + +lnd_outside_2_cli() { + docker exec "${COMPOSE_PROJECT_NAME}-lnd-outside-2-1" \ + lncli \ + --macaroonpath /root/.lnd/admin.macaroon \ + --tlscertpath /root/.lnd/tls.cert \ + $@ +} + +hydra_cli() { + docker exec "${COMPOSE_PROJECT_NAME}-hydra-1" hydra "$@" +} + +kratos_pg() { + DB_USER="dbuser" + DB_NAME="default" + + docker exec "${COMPOSE_PROJECT_NAME}-kratos-pg-1" psql -U $DB_USER -d $DB_NAME -t "$@" +} + +mongo_cli() { + docker exec "${COMPOSE_PROJECT_NAME}-mongodb-1" mongosh --quiet mongodb://localhost:27017/galoy --eval $@ +} diff --git a/vendor/galoy-quickstart/dev/helpers/gql.sh b/vendor/galoy-quickstart/dev/helpers/gql.sh new file mode 100644 index 0000000..4ed0b44 --- /dev/null +++ b/vendor/galoy-quickstart/dev/helpers/gql.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +GQL_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")/gql" +HELPERS_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" +source "${HELPERS_DIR}/cli.sh" + +GALOY_ENDPOINT="http://localhost:4455/graphql" + +register_email_to_user() { + local token=$1 + local email=$2 + + variables="{\"input\": {\"email\": \"$email\"}}" + registration_id=$(exec_graphql $token 'user-email-registration-initiate' "${variables}" '.data.userEmailRegistrationInitiate.emailRegistrationId') + + email_code_response=$(kratos_pg -c "SELECT body FROM courier_messages WHERE recipient='$email' ORDER BY created_at DESC LIMIT 1;") + email_code=$(echo "$email_code_response" | grep -oP '\d{6}') + + variables="{\"input\": {\"code\": \"$email_code\", \"emailRegistrationId\": \"$registration_id\"}}" + exec_graphql $token 'user-email-registration-validate' "${variables}" +} + +gql_file() { + echo "${GQL_DIR}/$1.gql" +} + +gql_query() { + cat "$(gql_file $1)" | tr '\n' ' ' | sed 's/"/\\"/g' +} + +exec_graphql() { + local token=$1 + local query_name=$2 + local variables=${3:-"{}"} + local output=${4:-"."} + + if [[ ${token} == "anon" ]]; then + AUTH_HEADER="" + else + AUTH_HEADER="Authorization: Bearer ${token}" + fi + + curl -s \ + -X POST \ + ${AUTH_HEADER:+ -H "$AUTH_HEADER"} \ + -H "Content-Type: application/json" \ + -H "X-Idempotency-Key: $(random_uuid)" \ + -d "{\"query\": \"$(gql_query $query_name)\", \"variables\": $variables}" \ + "${GALOY_ENDPOINT}" | jq -r "${output}" +} + +random_uuid() { + if [[ -e /proc/sys/kernel/random/uuid ]]; then + cat /proc/sys/kernel/random/uuid + else + uuidgen + fi +} diff --git a/vendor/galoy-quickstart/dev/helpers/gql/default-account.gql b/vendor/galoy-quickstart/dev/helpers/gql/default-account.gql new file mode 100644 index 0000000..d32015b --- /dev/null +++ b/vendor/galoy-quickstart/dev/helpers/gql/default-account.gql @@ -0,0 +1,7 @@ +query defaultAccount { + me { + defaultAccount { + id + } + } +} diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/on-chain-address-create.gql b/vendor/galoy-quickstart/dev/helpers/gql/on-chain-address-create.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/on-chain-address-create.gql rename to vendor/galoy-quickstart/dev/helpers/gql/on-chain-address-create.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/transactions.gql b/vendor/galoy-quickstart/dev/helpers/gql/transactions.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/transactions.gql rename to vendor/galoy-quickstart/dev/helpers/gql/transactions.gql diff --git a/vendor/galoy-quickstart/dev/helpers/gql/update-username.gql b/vendor/galoy-quickstart/dev/helpers/gql/update-username.gql new file mode 100644 index 0000000..47b734f --- /dev/null +++ b/vendor/galoy-quickstart/dev/helpers/gql/update-username.gql @@ -0,0 +1,10 @@ +mutation UserUpdateUsername($input: UserUpdateUsernameInput!) { + userUpdateUsername(input: $input) { + errors { + message + } + user { + id + } + } +} diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/user-email-registration-initiate.gql b/vendor/galoy-quickstart/dev/helpers/gql/user-email-registration-initiate.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/user-email-registration-initiate.gql rename to vendor/galoy-quickstart/dev/helpers/gql/user-email-registration-initiate.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/user-email-registration-validate.gql b/vendor/galoy-quickstart/dev/helpers/gql/user-email-registration-validate.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/user-email-registration-validate.gql rename to vendor/galoy-quickstart/dev/helpers/gql/user-email-registration-validate.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/wallets-for-account.gql b/vendor/galoy-quickstart/dev/helpers/gql/wallets-for-account.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/wallets-for-account.gql rename to vendor/galoy-quickstart/dev/helpers/gql/wallets-for-account.gql diff --git a/vendor/galoy-quickstart/dev/helpers/onchain.sh b/vendor/galoy-quickstart/dev/helpers/onchain.sh new file mode 100644 index 0000000..f521d08 --- /dev/null +++ b/vendor/galoy-quickstart/dev/helpers/onchain.sh @@ -0,0 +1,59 @@ +DEV_DIR="$(dirname "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")")" +source "${DEV_DIR}/helpers/gql.sh" +source "${DEV_DIR}/helpers/cli.sh" + + +fund_user_onchain() { + local token=$1 + local wallet_currency=$2 + local btc_amount_in_btc=${3:-"0.01"} + + response="$(exec_graphql "$token" "wallets-for-account")" + wallet_id=$(echo "$response" | jq -r --arg wc "$wallet_currency" '.data.me.defaultAccount.wallets[] | select(.walletCurrency == $wc) .id') + + echo "Creating variables for GraphQL query for :====> $wallet_id wallet ID i.e :===> $wallet_currency" + variables=$( + jq -n \ + --arg wallet_id "$wallet_id" \ + '{input: {walletId: $wallet_id}}' + ) + + response=$(exec_graphql "$token" 'on-chain-address-create' "$variables") + address=$(echo "$response" | jq -r '.data.onChainAddressCreate.address') + [[ "${address}" != "null" ]] || exit 1 + + + bitcoin_cli -regtest loadwallet "outside" + bitcoin_cli -regtest listwallets + bitcoin_cli -regtest sendtoaddress "$address" "$btc_amount_in_btc" + bitcoin_cli -regtest -generate 4 + + variables=$( + jq -n \ + --argjson first "1" \ + '{"first": $first}' + ) + local success=false + for i in {1..60}; do + response=$(exec_graphql "$token" 'transactions' "$variables") + jq_query='.data.me.defaultAccount.transactions.edges[] | select(.node.initiationVia.address == $address) .node' + transaction_info=$(echo $response \ + | jq -r --arg address "$address" "$jq_query") + + settled_status=$(echo "$transaction_info" | jq -r ".status") + settled_currency=$(echo "$transaction_info" | jq -r ".settlementCurrency") + + if [[ "${settled_status}" == "SUCCESS" && "${settled_currency}" == "$wallet_currency" ]]; then + echo "Transaction successful with correct settlement currency" + success=true + break + fi + + sleep 1 + done + + if [[ $success != true ]]; then + echo "Failed to fund user: response ==> $response" + exit 1 + fi +} diff --git a/vendor/galoy-quickstart/dev/lnd/lnd1.tpub b/vendor/galoy-quickstart/dev/lnd/lnd1.tpub deleted file mode 100644 index 1f3d7f7..0000000 --- a/vendor/galoy-quickstart/dev/lnd/lnd1.tpub +++ /dev/null @@ -1 +0,0 @@ -tpubDD4vFnWuTMEcZiaaZPgvzeGyMzWe6qHW8gALk5Md9kutDvtdDjYFwzauEFFRHgov8pAwup5jX88j5YFyiACsPf3pqn5hBjvuTLRAseaJ6b4 diff --git a/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd1-1.loop.db b/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd1-1.loop.db deleted file mode 100644 index 2ecbeb7..0000000 Binary files a/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd1-1.loop.db and /dev/null differ diff --git a/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd1-1.loop.macaroon b/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd1-1.loop.macaroon deleted file mode 100644 index 97ffff5..0000000 Binary files a/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd1-1.loop.macaroon and /dev/null differ diff --git a/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd1-1.loop.macaroon.base64 b/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd1-1.loop.macaroon.base64 deleted file mode 100644 index c01e8be..0000000 --- a/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd1-1.loop.macaroon.base64 +++ /dev/null @@ -1 +0,0 @@ -AgEEbG9vcAJ3AwoQRGymK6/vfF3wwuVmaTj3RhIBMBoMCgRhdXRoEgRyZWFkGg8KBGxvb3ASAmluEgNvdXQaGgoLc3VnZ2VzdGlvbnMSBHJlYWQSBXdyaXRlGhUKBHN3YXASB2V4ZWN1dGUSBHJlYWQaDQoFdGVybXMSBHJlYWQAAAYgAFS/qTZItZ3ZKksQkfXAKFnsb0JS5Ok3Oi5fAgCaE/k= diff --git a/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd1-1.macaroons.db b/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd1-1.macaroons.db deleted file mode 100644 index 2cf7668..0000000 Binary files a/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd1-1.macaroons.db and /dev/null differ diff --git a/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd1-1.tls.cert b/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd1-1.tls.cert deleted file mode 100644 index 63cd5cb..0000000 --- a/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd1-1.tls.cert +++ /dev/null @@ -1,14 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICJjCCAc2gAwIBAgIRAMfzeW3BtQbZi7qJ6hBNo0swCgYIKoZIzj0EAwIwOTEg -MB4GA1UEChMXbG9vcCBhdXRvZ2VuZXJhdGVkIGNlcnQxFTATBgNVBAMTDDJjZGQ1 -N2ZmZTYxZDAeFw0yMjA5MDcyMTMyMjRaFw0yMzExMDIyMTMyMjRaMDkxIDAeBgNV -BAoTF2xvb3AgYXV0b2dlbmVyYXRlZCBjZXJ0MRUwEwYDVQQDEwwyY2RkNTdmZmU2 -MWQwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATqNjqQLPcGIDZJkGzse/wvektO -QVXihRzZeKk/Y0YS41dz0vN9PvKZ3FqNcvxCykW/gWJ5hAtJBe7Ci6aZ+gGKo4G1 -MIGyMA4GA1UdDwEB/wQEAwICpDATBgNVHSUEDDAKBggrBgEFBQcDATAPBgNVHRMB -Af8EBTADAQH/MB0GA1UdDgQWBBQdrlpt33iKvVTed2VuxcnnARLy9DBbBgNVHREE -VDBSggwyY2RkNTdmZmU2MWSCCWxvY2FsaG9zdIIEdW5peIIKdW5peHBhY2tldIIH -YnVmY29ubocEfwAAAYcQAAAAAAAAAAAAAAAAAAAAAYcErBsADzAKBggqhkjOPQQD -AgNHADBEAiBXhR6VdsHV+DHaXdkWeQgJs2TqOJWj0pQr5dqKpUb69AIgSxkXa6EE -VVOBgEa5tygsApc6l0RjNgTavJAzOgVOkHY= ------END CERTIFICATE----- diff --git a/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd1-1.tls.cert.base64 b/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd1-1.tls.cert.base64 deleted file mode 100644 index 278aea3..0000000 --- a/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd1-1.tls.cert.base64 +++ /dev/null @@ -1 +0,0 @@ -LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNKakNDQWMyZ0F3SUJBZ0lSQU1memVXM0J0UWJaaTdxSjZoQk5vMHN3Q2dZSUtvWkl6ajBFQXdJd09URWcKTUI0R0ExVUVDaE1YYkc5dmNDQmhkWFJ2WjJWdVpYSmhkR1ZrSUdObGNuUXhGVEFUQmdOVkJBTVREREpqWkdRMQpOMlptWlRZeFpEQWVGdzB5TWpBNU1EY3lNVE15TWpSYUZ3MHlNekV4TURJeU1UTXlNalJhTURreElEQWVCZ05WCkJBb1RGMnh2YjNBZ1lYVjBiMmRsYm1WeVlYUmxaQ0JqWlhKME1SVXdFd1lEVlFRREV3d3lZMlJrTlRkbVptVTIKTVdRd1dUQVRCZ2NxaGtqT1BRSUJCZ2dxaGtqT1BRTUJCd05DQUFUcU5qcVFMUGNHSURaSmtHenNlL3d2ZWt0TwpRVlhpaFJ6WmVLay9ZMFlTNDFkejB2TjlQdktaM0ZxTmN2eEN5a1cvZ1dKNWhBdEpCZTdDaTZhWitnR0tvNEcxCk1JR3lNQTRHQTFVZER3RUIvd1FFQXdJQ3BEQVRCZ05WSFNVRUREQUtCZ2dyQmdFRkJRY0RBVEFQQmdOVkhSTUIKQWY4RUJUQURBUUgvTUIwR0ExVWREZ1FXQkJRZHJscHQzM2lLdlZUZWQyVnV4Y25uQVJMeTlEQmJCZ05WSFJFRQpWREJTZ2d3eVkyUmtOVGRtWm1VMk1XU0NDV3h2WTJGc2FHOXpkSUlFZFc1cGVJSUtkVzVwZUhCaFkydGxkSUlIClluVm1ZMjl1Ym9jRWZ3QUFBWWNRQUFBQUFBQUFBQUFBQUFBQUFBQUFBWWNFckJzQUR6QUtCZ2dxaGtqT1BRUUQKQWdOSEFEQkVBaUJYaFI2VmRzSFYrREhhWGRrV2VRZ0pzMlRxT0pXajBwUXI1ZHFLcFViNjlBSWdTeGtYYTZFRQpWVk9CZ0VhNXR5Z3NBcGM2bDBSak5nVGF2SkF6T2dWT2tIWT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= diff --git a/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd1-1.tls.key b/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd1-1.tls.key deleted file mode 100644 index 6a8f97f..0000000 --- a/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd1-1.tls.key +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN EC PRIVATE KEY----- -MHcCAQEEIGHGbr1TCDEw6eX6CJxhIy8PdKnG6wnW7UCKy7JVSB0ioAoGCCqGSM49 -AwEHoUQDQgAE6jY6kCz3BiA2SZBs7Hv8L3pLTkFV4oUc2XipP2NGEuNXc9LzfT7y -mdxajXL8QspFv4FieYQLSQXuwoummfoBig== ------END EC PRIVATE KEY----- diff --git a/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd2-1.loop.db b/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd2-1.loop.db deleted file mode 100644 index 340763d..0000000 Binary files a/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd2-1.loop.db and /dev/null differ diff --git a/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd2-1.loop.macaroon b/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd2-1.loop.macaroon deleted file mode 100644 index 991f160..0000000 Binary files a/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd2-1.loop.macaroon and /dev/null differ diff --git a/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd2-1.loop.macaroon.base64 b/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd2-1.loop.macaroon.base64 deleted file mode 100644 index aba6515..0000000 --- a/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd2-1.loop.macaroon.base64 +++ /dev/null @@ -1 +0,0 @@ -AgEEbG9vcAJ3AwoQ6Ntr7+DpuicdMgmVPKvDVxIBMBoMCgRhdXRoEgRyZWFkGg8KBGxvb3ASAmluEgNvdXQaGgoLc3VnZ2VzdGlvbnMSBHJlYWQSBXdyaXRlGhUKBHN3YXASB2V4ZWN1dGUSBHJlYWQaDQoFdGVybXMSBHJlYWQAAAYgU6bTJC50AuYehDtb9U2s4EuH7C2Tf8eAppPPOFeUXds= diff --git a/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd2-1.macaroons.db b/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd2-1.macaroons.db deleted file mode 100644 index c85bfe7..0000000 Binary files a/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd2-1.macaroons.db and /dev/null differ diff --git a/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd2-1.tls.cert b/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd2-1.tls.cert deleted file mode 100644 index 0bd1dc2..0000000 --- a/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd2-1.tls.cert +++ /dev/null @@ -1,14 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICJjCCAcygAwIBAgIQV7vtYTo2XKSrmkz7wtJ3cTAKBggqhkjOPQQDAjA5MSAw -HgYDVQQKExdsb29wIGF1dG9nZW5lcmF0ZWQgY2VydDEVMBMGA1UEAxMMZTFiNDhm -YmU0NjYzMB4XDTIyMDkwNzIxMzIyNVoXDTIzMTEwMjIxMzIyNVowOTEgMB4GA1UE -ChMXbG9vcCBhdXRvZ2VuZXJhdGVkIGNlcnQxFTATBgNVBAMTDGUxYjQ4ZmJlNDY2 -MzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABEXo9gtzdRqLMaav2uT08xySQJS+ -h0SLqC+vzsGDagj09x7Qonwz+jZ4xzizIlueNcBeX63wuFgGp99A1of042SjgbUw -gbIwDgYDVR0PAQH/BAQDAgKkMBMGA1UdJQQMMAoGCCsGAQUFBwMBMA8GA1UdEwEB -/wQFMAMBAf8wHQYDVR0OBBYEFFN3a7ZF9caRPbg42Wb+NbuX3hSaMFsGA1UdEQRU -MFKCDGUxYjQ4ZmJlNDY2M4IJbG9jYWxob3N0ggR1bml4ggp1bml4cGFja2V0ggdi -dWZjb25uhwR/AAABhxAAAAAAAAAAAAAAAAAAAAABhwSsGwAQMAoGCCqGSM49BAMC -A0gAMEUCIQDTqJgV+QzK67yR7YFqkrBCzhD68LYr0A3RLXQurC6wmAIgY4gDJ05y -QN2Bcf/hIzTrpoVe+v4nPQDH7mpEAtr8Oz0= ------END CERTIFICATE----- diff --git a/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd2-1.tls.cert.base64 b/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd2-1.tls.cert.base64 deleted file mode 100644 index d39ccbb..0000000 --- a/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd2-1.tls.cert.base64 +++ /dev/null @@ -1 +0,0 @@ -LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNKakNDQWN5Z0F3SUJBZ0lRVjd2dFlUbzJYS1NybWt6N3d0SjNjVEFLQmdncWhrak9QUVFEQWpBNU1TQXcKSGdZRFZRUUtFeGRzYjI5d0lHRjFkRzluWlc1bGNtRjBaV1FnWTJWeWRERVZNQk1HQTFVRUF4TU1aVEZpTkRobQpZbVUwTmpZek1CNFhEVEl5TURrd056SXhNekl5TlZvWERUSXpNVEV3TWpJeE16SXlOVm93T1RFZ01CNEdBMVVFCkNoTVhiRzl2Y0NCaGRYUnZaMlZ1WlhKaGRHVmtJR05sY25ReEZUQVRCZ05WQkFNVERHVXhZalE0Wm1KbE5EWTIKTXpCWk1CTUdCeXFHU000OUFnRUdDQ3FHU000OUF3RUhBMElBQkVYbzlndHpkUnFMTWFhdjJ1VDA4eHlTUUpTKwpoMFNMcUMrdnpzR0RhZ2owOXg3UW9ud3oralo0eHppeklsdWVOY0JlWDYzd3VGZ0dwOTlBMW9mMDQyU2pnYlV3CmdiSXdEZ1lEVlIwUEFRSC9CQVFEQWdLa01CTUdBMVVkSlFRTU1Bb0dDQ3NHQVFVRkJ3TUJNQThHQTFVZEV3RUIKL3dRRk1BTUJBZjh3SFFZRFZSME9CQllFRkZOM2E3WkY5Y2FSUGJnNDJXYitOYnVYM2hTYU1Gc0dBMVVkRVFSVQpNRktDREdVeFlqUTRabUpsTkRZMk00SUpiRzlqWVd4b2IzTjBnZ1IxYm1sNGdncDFibWw0Y0dGamEyVjBnZ2RpCmRXWmpiMjV1aHdSL0FBQUJoeEFBQUFBQUFBQUFBQUFBQUFBQUFBQUJod1NzR3dBUU1Bb0dDQ3FHU000OUJBTUMKQTBnQU1FVUNJUURUcUpnVitReks2N3lSN1lGcWtyQkN6aEQ2OExZcjBBM1JMWFF1ckM2d21BSWdZNGdESjA1eQpRTjJCY2YvaEl6VHJwb1ZlK3Y0blBRREg3bXBFQXRyOE96MD0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= diff --git a/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd2-1.tls.key b/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd2-1.tls.key deleted file mode 100644 index ffa9c7c..0000000 --- a/vendor/galoy-quickstart/dev/lnd/loop/regtest/loopd2-1.tls.key +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN EC PRIVATE KEY----- -MHcCAQEEIChwzC4bQi68zZMIGUgUVb5NAtCX6evswxz99EXBqGq2oAoGCCqGSM49 -AwEHoUQDQgAERej2C3N1Gosxpq/a5PTzHJJAlL6HRIuoL6/OwYNqCPT3HtCifDP6 -NnjHOLMiW541wF5frfC4WAan30DWh/TjZA== ------END EC PRIVATE KEY----- diff --git a/vendor/galoy-quickstart/dev/lnd/loop/server/regtest/admin.macaroon b/vendor/galoy-quickstart/dev/lnd/loop/server/regtest/admin.macaroon deleted file mode 100644 index 246395b..0000000 Binary files a/vendor/galoy-quickstart/dev/lnd/loop/server/regtest/admin.macaroon and /dev/null differ diff --git a/vendor/galoy-quickstart/dev/lnd/loop/server/regtest/chainnotifier.macaroon b/vendor/galoy-quickstart/dev/lnd/loop/server/regtest/chainnotifier.macaroon deleted file mode 100644 index bf8001c..0000000 Binary files a/vendor/galoy-quickstart/dev/lnd/loop/server/regtest/chainnotifier.macaroon and /dev/null differ diff --git a/vendor/galoy-quickstart/dev/lnd/loop/server/regtest/invoices.macaroon b/vendor/galoy-quickstart/dev/lnd/loop/server/regtest/invoices.macaroon deleted file mode 100644 index a28f362..0000000 Binary files a/vendor/galoy-quickstart/dev/lnd/loop/server/regtest/invoices.macaroon and /dev/null differ diff --git a/vendor/galoy-quickstart/dev/lnd/loop/server/regtest/readonly.macaroon b/vendor/galoy-quickstart/dev/lnd/loop/server/regtest/readonly.macaroon deleted file mode 100644 index 246395b..0000000 Binary files a/vendor/galoy-quickstart/dev/lnd/loop/server/regtest/readonly.macaroon and /dev/null differ diff --git a/vendor/galoy-quickstart/dev/lnd/loop/server/regtest/router.macaroon b/vendor/galoy-quickstart/dev/lnd/loop/server/regtest/router.macaroon deleted file mode 100644 index 7b5f51c..0000000 Binary files a/vendor/galoy-quickstart/dev/lnd/loop/server/regtest/router.macaroon and /dev/null differ diff --git a/vendor/galoy-quickstart/dev/lnd/loop/server/regtest/signer.macaroon b/vendor/galoy-quickstart/dev/lnd/loop/server/regtest/signer.macaroon deleted file mode 100644 index bb5d018..0000000 Binary files a/vendor/galoy-quickstart/dev/lnd/loop/server/regtest/signer.macaroon and /dev/null differ diff --git a/vendor/galoy-quickstart/dev/lnd/loop/server/regtest/walletkit.macaroon b/vendor/galoy-quickstart/dev/lnd/loop/server/regtest/walletkit.macaroon deleted file mode 100644 index 02c2e06..0000000 Binary files a/vendor/galoy-quickstart/dev/lnd/loop/server/regtest/walletkit.macaroon and /dev/null differ diff --git a/vendor/galoy-quickstart/dev/lnd/tls.cert.base64 b/vendor/galoy-quickstart/dev/lnd/tls.cert.base64 deleted file mode 100644 index 6d39c2d..0000000 --- a/vendor/galoy-quickstart/dev/lnd/tls.cert.base64 +++ /dev/null @@ -1 +0,0 @@ -LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNZVENDQWdlZ0F3SUJBZ0lSQU9zZzdYWFR4cnVZYlhkeTY2d3RuN1F3Q2dZSUtvWkl6ajBFQXdJd09ERWYKTUIwR0ExVUVDaE1XYkc1a0lHRjFkRzluWlc1bGNtRjBaV1FnWTJWeWRERVZNQk1HQTFVRUF4TU1PRFl4T1RneApNak5tT0Roak1CNFhEVEl6TURFeE9USXdOREUxTTFvWERUTTBNRGN5TVRJd05ERTFNMW93T0RFZk1CMEdBMVVFCkNoTVdiRzVrSUdGMWRHOW5aVzVsY21GMFpXUWdZMlZ5ZERFVk1CTUdBMVVFQXhNTU9EWXhPVGd4TWpObU9EaGoKTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFM1lieUlKWU1Vcm8zZkl0UFFucysxZ2lpTXI5NQpJUXRmclFDQ2JhOWVtcjI4TENmbk1vYy9VQVFwUlg3QVlvVFRneUdiMFBuZGNUODF5ZVgvYTlPa0RLT0I4VENCCjdqQU9CZ05WSFE4QkFmOEVCQU1DQXFRd0V3WURWUjBsQkF3d0NnWUlLd1lCQlFVSEF3RXdEd1lEVlIwVEFRSC8KQkFVd0F3RUIvekFkQmdOVkhRNEVGZ1FVL1AxRHpJUkRzTEhHMU10d3NrZE5nZ0lub1Mwd2daWUdBMVVkRVFTQgpqakNCaTRJTU9EWXhPVGd4TWpObU9EaGpnZ2xzYjJOaGJHaHZjM1NDRFd4dVpDMXZkWFJ6YVdSbExUR0NEV3h1ClpDMXZkWFJ6YVdSbExUS0NEV3h1WkMxdmRYUnphV1JsTFRPQ0JHeHVaREdDQkd4dVpES0NCSFZ1YVhpQ0NuVnUKYVhod1lXTnJaWFNDQjJKMVptTnZibTZIQkg4QUFBR0hFQUFBQUFBQUFBQUFBQUFBQUFBQUFBR0hCS3dUQUJBdwpDZ1lJS29aSXpqMEVBd0lEU0FBd1JRSWhBSU5DNlJWQ3d6SzFYRnFxeVNLY0Y4QzQ5ZFlSOThjemdLNVdkcmNOCkxYYWlBaUJHYmtWeGhaeHdDaDVLQ1o1Z2M1Q2FsQ0RvaGNxVkdiaHNya0hHTFhpdHN3PT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= \ No newline at end of file diff --git a/vendor/galoy-quickstart/dev/lnd/tls.key.base64 b/vendor/galoy-quickstart/dev/lnd/tls.key.base64 deleted file mode 100644 index 93a3939..0000000 --- a/vendor/galoy-quickstart/dev/lnd/tls.key.base64 +++ /dev/null @@ -1 +0,0 @@ -LS0tLS1CRUdJTiBFQyBQUklWQVRFIEtFWS0tLS0tCk1IY0NBUUVFSVB5NzRDVXBBTS9ndlJ1cnEwUytYaVpEUU9oNEhab2RIcFk0WFp6WnlFa2ZvQW9HQ0NxR1NNNDkKQXdFSG9VUURRZ0FFM1lieUlKWU1Vcm8zZkl0UFFucysxZ2lpTXI5NUlRdGZyUUNDYmE5ZW1yMjhMQ2ZuTW9jLwpVQVFwUlg3QVlvVFRneUdiMFBuZGNUODF5ZVgvYTlPa0RBPT0KLS0tLS1FTkQgRUMgUFJJVkFURSBLRVktLS0tLQo= \ No newline at end of file diff --git a/vendor/galoy-quickstart/dev/svix/README.md b/vendor/galoy-quickstart/dev/svix/README.md deleted file mode 100644 index 94a8765..0000000 --- a/vendor/galoy-quickstart/dev/svix/README.md +++ /dev/null @@ -1,97 +0,0 @@ -create an application: - -``` -variables=$( - jq -n \ - --arg account_id "account.$account_id" \ - '{ "name": "Client application", "uid": $account_id }' \ -) - -curl --silent -X 'POST' \ - 'http://127.0.0.1:8071/api/v1/app/' \ - -H "Authorization: Bearer $SVIX_SECRET" \ - -H 'Accept: application/json' \ - -H 'Content-Type: application/json' \ - -d "$variables" | jq -``` - -get the applications: - -``` -curl --silent -X 'GET' \ - "$SVIX_ENDPOINT/api/v1/app/" \ - -H "Authorization: Bearer $SVIX_SECRET" \ - -H 'Accept: application/json' \ - -H 'Content-Type: application/json' | jq -``` - -set account_path value: - -``` -export account_path=$(curl --silent -X 'GET' \ - "$SVIX_ENDPOINT/api/v1/app/" \ - -H "Authorization: Bearer $SVIX_SECRET" \ - -H 'Accept: application/json' \ - -H 'Content-Type: application/json' | jq -r '.data[1].uid') -``` - -list endpoints: -``` -curl --silent -X 'GET' \ - "$SVIX_ENDPOINT/api/v1/app/$account_path/endpoint/" \ - -H "Authorization: Bearer $SVIX_SECRET" \ - -H 'Accept: application/json' \ - -H 'Content-Type: application/json' | jq -``` - -add endpoint: - -``` -curl --silent -X 'POST' \ - "$SVIX_ENDPOINT/api/v1/app/$account_path/endpoint/" \ - -H "Authorization: Bearer $SVIX_SECRET" \ - -H 'Accept: application/json' \ - -H 'Content-Type: application/json' \ - -d '{ - "description": "An example endpoint name", - "url": "http://bats-tests:8080/webhook/", - "version": 1, - "secret": "whsec_abcd1234abcd1234abcd1234abcd1234" - }' | jq -``` - - -create message: - -``` -curl --silent -X 'POST' \ - "$SVIX_ENDPOINT/api/v1/app/$account_path/msg/" \ - -H "Authorization: Bearer $SVIX_SECRET" \ - -H 'Accept: application/json' \ - -H 'Content-Type: application/json' \ - -d '{ - "eventType": "user.signup", - "payload": {"paymentHash":"409ba1c57aa8dad3ee142fa379afe7672157de4d088445dc690e8c3e010e68db","accountId":"account123", "txid": "txid", "eventType": "receive.intraledger"} - }' | jq -``` - -list messages: - -``` -curl --silent -X 'GET' \ - "$SVIX_ENDPOINT/api/v1/app/$account_path/msg/" \ - -H "Authorization: Bearer $SVIX_SECRET" \ - -H 'Accept: application/json' \ - -H 'Content-Type: application/json' | jq '.data[] | {id: .id}' -``` - -get message attempts (update msdig first): - -``` -msgid="msg_2U142wNkbNBmefv2qfcHoaOsi1t" && \ -curl --silent -X 'GET' \ - "$SVIX_ENDPOINT/api/v1/app/$account_path/attempt/msg/$msgid/" \ - -H "Authorization: Bearer $SVIX_SECRET" \ - -H 'Accept: application/json' \ - -H 'Content-Type: application/json' | jq -``` diff --git a/vendor/galoy-quickstart/dev/tilt.bzl b/vendor/galoy-quickstart/dev/tilt.bzl new file mode 100644 index 0000000..0305c60 --- /dev/null +++ b/vendor/galoy-quickstart/dev/tilt.bzl @@ -0,0 +1,51 @@ +def tilt_impl(ctx: AnalysisContext) -> list[[DefaultInfo, RunInfo]]: + return _invoke_tilt(ctx, ctx.attrs.subcmd) + +tilt = rule( + impl = tilt_impl, + attrs = { + "subcmd": attrs.enum(["up", "down"]), + "tiltfile": attrs.string( + default = "Tiltfile", + doc = """The Tiltfile to run.""", + ), + "args": attrs.list( + attrs.string(), + default = [], + doc = """Additional arguments passed as .""", + ), + }, +) + +def _invoke_tilt(ctx: AnalysisContext, subcmd: str) -> list[[DefaultInfo, RunInfo]]: + tiltfile = "{}/{}".format( + ctx.label.package, + ctx.attrs.tiltfile, + ) + + script = ctx.actions.write("tilt-run.sh", """\ +#!/usr/bin/env bash +set -euo pipefail + +rootpath="$(git rev-parse --show-toplevel)" +subcmd="$1" +tiltfile="$2" +args=("${@:3}") + +exec tilt "$subcmd" --file "$rootpath"/"$tiltfile" -- "${args[@]}" +""", is_executable = True) + + run_cmd_args = cmd_args([ + script, + subcmd, + tiltfile, + ctx.attrs.args + ]) + + args_file = ctx.actions.write("tilt-args.txt", run_cmd_args) + + return [ + DefaultInfo(default_output = args_file), + RunInfo(run_cmd_args), + ] + diff --git a/vendor/galoy-quickstart/docker-compose.yml b/vendor/galoy-quickstart/docker-compose.yml index a7a1dd2..86b7cb3 100644 --- a/vendor/galoy-quickstart/docker-compose.yml +++ b/vendor/galoy-quickstart/docker-compose.yml @@ -6,7 +6,6 @@ services: - apollo-router - oathkeeper - kratos - - kratos-pg - galoy - trigger - redis @@ -17,11 +16,10 @@ services: - bitcoind-signer - lnd1 - lnd-outside-1 - - postgres-bria + - bria - fulcrum - stablesats - svix - - svix-pg - hydra restart: on-failure:10 apollo-router: @@ -29,10 +27,12 @@ services: ports: - 4004:4004 environment: - - APOLLO_ROUTER_SUPERGRAPH_PATH=/repo/dev/apollo-federation/supergraph.graphql - - APOLLO_ROUTER_CONFIG_PATH=/repo/dev/apollo-federation/router.yaml + - APOLLO_ROUTER_SUPERGRAPH_PATH=/repo/dev/supergraph.graphql + - APOLLO_ROUTER_CONFIG_PATH=/repo/dev/router.yaml volumes: - - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev:/repo/dev + - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/config/apollo-federation:/repo/dev + depends_on: + - otel-agent oathkeeper: image: oryd/oathkeeper:v0.40.6-distroless ports: @@ -40,7 +40,12 @@ services: - 4456:4456 command: serve -c /home/ory/oathkeeper.yml --sqa-opt-out volumes: - - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/ory:/home/ory + - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/config/ory:/home/ory + depends_on: + - kratos + - hydra + - apollo-router + - otel-agent kratos: image: oryd/kratos:v1.0.0 ports: @@ -53,13 +58,11 @@ services: links: - kratos-pg:kratos-pg volumes: - - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/ory:/home/ory + - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/config/ory:/home/ory kratos-pg: image: postgres:14.1 ports: - - 5433:5432 - expose: - - "5432" + - 5432:5432 environment: - POSTGRES_USER=dbuser - POSTGRES_PASSWORD=secret @@ -71,34 +74,77 @@ services: - 4445:4445 command: serve -c /home/ory/hydra.yml all --dev volumes: - - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/ory:/home/ory + - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/config/ory:/home/ory environment: - - DSN=postgres://hydra:secret@postgresdhydra:5432/hydra?sslmode=disable&max_conns=20&max_idle_conns=4 + - DSN=postgres://hydra:secret@hydra-pg:5432/hydra?sslmode=disable&max_conns=20&max_idle_conns=4 restart: unless-stopped depends_on: - hydra-migrate - - postgresdhydra + - hydra-pg hydra-migrate: image: oryd/hydra:v2.1.2 environment: - - DSN=postgres://hydra:secret@postgresdhydra:5432/hydra?sslmode=disable&max_conns=20&max_idle_conns=4 + - DSN=postgres://hydra:secret@hydra-pg:5432/hydra?sslmode=disable&max_conns=20&max_idle_conns=4 command: migrate -c /home/ory/hydra.yml sql -e --yes volumes: - - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/ory:/home/ory + - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/config/ory:/home/ory restart: on-failure depends_on: - - postgresdhydra - postgresdhydra: + - hydra-pg + hydra-pg: image: postgres:14.1 environment: - POSTGRES_USER=hydra - POSTGRES_PASSWORD=secret - POSTGRES_DB=hydra - ports: - - 5434:5432 galoy: - image: us.gcr.io/galoy-org/galoy-api@sha256:9c661b570fa4732c3918bc6e193818c89d77c14dc0649fca0dda67ef6df18d47 - env_file: ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/.env.galoy + image: us.gcr.io/galoy-org/galoy-api@sha256:db6cadaf07496da7a06e545c3d7b9c526c88a4d9eb9ba085cd7ce4b0d6fb1e02 + environment: + - HELMREVISION=dev + - NETWORK=regtest + - OATHKEEPER_DECISION_ENDPOINT=http://oathkeeper:4456 + - TWILIO_ACCOUNT_SID=AC_twilio_id + - TWILIO_AUTH_TOKEN=AC_twilio_auth_token + - TWILIO_VERIFY_SERVICE_ID=VA_twilio_service + - KRATOS_PG_CON=postgres://dbuser:secret@kratos-pg:5432/default?sslmode=disable + - KRATOS_PUBLIC_API=http://kratos:4433 + - KRATOS_ADMIN_API=http://kratos:4434 + - KRATOS_MASTER_USER_PASSWORD=passwordHardtoFindWithNumber123 + - KRATOS_CALLBACK_API_KEY=The-Value-of-My-Key + - PRICE_HOST=price + - PRICE_HISTORY_HOST=price-history + - PRICE_SERVER_HOST=stablesats + - BRIA_HOST=bria + - BRIA_API_KEY=bria_dev_000000000000000000000 + - NOTIFICATIONS_HOST=notifications + - MONGODB_CON=mongodb://mongodb:27017/galoy + - REDIS_MASTER_NAME=mymaster + - REDIS_PASSWORD= + - REDIS_0_DNS=redis + - REDIS_0_PORT=6379 + - REDIS_TYPE=standalone + - UNSECURE_IP_FROM_REQUEST_OBJECT=true + - UNSECURE_DEFAULT_LOGIN_CODE=000000 + - GEETEST_ID=geetest_id + - GEETEST_KEY=geetest_key + - LND1_TLS=LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNZVENDQWdlZ0F3SUJBZ0lSQU9zZzdYWFR4cnVZYlhkeTY2d3RuN1F3Q2dZSUtvWkl6ajBFQXdJd09ERWYKTUIwR0ExVUVDaE1XYkc1a0lHRjFkRzluWlc1bGNtRjBaV1FnWTJWeWRERVZNQk1HQTFVRUF4TU1PRFl4T1RneApNak5tT0Roak1CNFhEVEl6TURFeE9USXdOREUxTTFvWERUTTBNRGN5TVRJd05ERTFN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- LND2_NAME=lnd2 + - LND2_TYPE=offchain + - SVIX_SECRET=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2OTE2NzIwMTQsImV4cCI6MjAwNzAzMjAxNCwibmJmIjoxNjkxNjcyMDE0LCJpc3MiOiJzdml4LXNlcnZlciIsInN1YiI6Im9yZ18yM3JiOFlkR3FNVDBxSXpwZ0d3ZFhmSGlyTXUifQ.b9s0aWSisNdUNki4edabBEToLNSwjC9-AiJQr4J3y4E + - SVIX_ENDPOINT=http://svix:8071 + - EXPORTER_PORT=3003 + - OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-agent:4318 depends_on: - trigger - apollo-router @@ -115,8 +161,53 @@ services: aliases: - bats-tests trigger: - image: us.gcr.io/galoy-org/galoy-api-trigger@sha256:e3ad13f6cfffc46e381c49481f781d7d0c0bd2e6c57d099aaebd750cc682b569 - env_file: ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/.env.galoy + image: us.gcr.io/galoy-org/galoy-api-trigger@sha256:449d20625a80c95a5c0a5a86a4be969a0751b9d92b1f4efaf3b1619418722f15 + environment: + - HELMREVISION=dev + - NETWORK=regtest + - OATHKEEPER_DECISION_ENDPOINT=http://oathkeeper:4456 + - TWILIO_ACCOUNT_SID=AC_twilio_id + - TWILIO_AUTH_TOKEN=AC_twilio_auth_token + - TWILIO_VERIFY_SERVICE_ID=VA_twilio_service + - KRATOS_PG_CON=postgres://dbuser:secret@kratos-pg:5432/default?sslmode=disable + - KRATOS_PUBLIC_API=http://kratos:4433 + - KRATOS_ADMIN_API=http://kratos:4434 + - KRATOS_MASTER_USER_PASSWORD=passwordHardtoFindWithNumber123 + - KRATOS_CALLBACK_API_KEY=The-Value-of-My-Key + - PRICE_HOST=price + - PRICE_HISTORY_HOST=price-history + - PRICE_SERVER_HOST=stablesats + - BRIA_HOST=bria + - BRIA_API_KEY=bria_dev_000000000000000000000 + - NOTIFICATIONS_HOST=notifications + - MONGODB_CON=mongodb://mongodb:27017/galoy + - REDIS_MASTER_NAME=mymaster + - REDIS_PASSWORD= + - REDIS_0_DNS=redis + - REDIS_0_PORT=6379 + - REDIS_TYPE=standalone + - UNSECURE_IP_FROM_REQUEST_OBJECT=true + - UNSECURE_DEFAULT_LOGIN_CODE=000000 + - GEETEST_ID=geetest_id + - GEETEST_KEY=geetest_key + - LND1_TLS=LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNZVENDQWdlZ0F3SUJBZ0lSQU9zZzdYWFR4cnVZYlhkeTY2d3RuN1F3Q2dZSUtvWkl6ajBFQXdJd09ERWYKTUIwR0ExVUVDaE1XYkc1a0lHRjFkRzluWlc1bGNtRjBaV1FnWTJWeWRERVZNQk1HQTFVRUF4TU1PRFl4T1RneApNak5tT0Roak1CNFhEVEl6TURFeE9USXdOREUxTTFvWERUTTBNRGN5TVRJd05ERTFNMW93T0RFZk1CMEdBMVVFCkNoTVdiRzVrSUdGMWRHOW5aVzVsY21GMFpXUWdZMlZ5ZERFVk1CTUdBMVVFQXhNTU9EWXhPVGd4TWpObU9EaGoKTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFM1lieUlKWU1Vcm8zZkl0UFFucysxZ2lpTXI5NQpJUXRmclFDQ2JhOWVtcjI4TENmbk1vYy9VQVFwUlg3QVlvVFRneUdiMFBuZGNUODF5ZVgvYTlPa0RLT0I4VENCCjdqQU9CZ05WSFE4QkFmOEVCQU1DQXFRd0V3WURWUjBsQkF3d0NnWUlLd1lCQlFVSEF3RXdEd1lEVlIwVEFRSC8KQkFVd0F3RUIvekFkQmdOVkhRNEVGZ1FVL1AxRHpJUkRzTEhHMU10d3NrZE5nZ0lub1Mwd2daWUdBMVVkRVFTQgpqakNCaTRJTU9EWXhPVGd4TWpObU9EaGpnZ2xzYjJOaGJHaHZjM1NDRFd4dVpDMXZkWFJ6YVdSbExUR0NEV3h1ClpDMXZkWFJ6YVd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LND2_MACAROON=AgEDbG5kAvgBAwoQX0BxfhQTxLTiqaceBnGnfBIBMBoWCgdhZGRyZXNzEgRyZWFkEgV3cml0ZRoTCgRpbmZvEgRyZWFkEgV3cml0ZRoXCghpbnZvaWNlcxIEcmVhZBIFd3JpdGUaIQoIbWFjYXJvb24SCGdlbmVyYXRlEgRyZWFkEgV3cml0ZRoWCgdtZXNzYWdlEgRyZWFkEgV3cml0ZRoXCghvZmZjaGFpbhIEcmVhZBIFd3JpdGUaFgoHb25jaGFpbhIEcmVhZBIFd3JpdGUaFAoFcGVlcnMSBHJlYWQSBXdyaXRlGhgKBnNpZ25lchIIZ2VuZXJhdGUSBHJlYWQAAAYgMAKlr1HehfBpn2R5RPE2IuY9r/18QBeLZxYgRidpos4= + - LND2_PUBKEY=039341ef13e776dc1611502cf510110d9ac5cdc252141f5997adcfd72cef34c3a7 + - LND2_DNS=lnd2 + - LND2_RPCPORT=10010 + - LND2_NAME=lnd2 + - LND2_TYPE=offchain + - SVIX_SECRET=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2OTE2NzIwMTQsImV4cCI6MjAwNzAzMjAxNCwibmJmIjoxNjkxNjcyMDE0LCJpc3MiOiJzdml4LXNlcnZlciIsInN1YiI6Im9yZ18yM3JiOFlkR3FNVDBxSXpwZ0d3ZFhmSGlyTXUifQ.b9s0aWSisNdUNki4edabBEToLNSwjC9-AiJQr4J3y4E + - SVIX_ENDPOINT=http://svix:8071 + - EXPORTER_PORT=3003 + - OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-agent:4318 depends_on: - lnd1 - bria @@ -129,14 +220,13 @@ services: - ALLOW_EMPTY_PASSWORD=yes - REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL mongodb: - image: mongo:${MONGODB_VERSION:-7.0.2} + image: mongo:7.0.2 ports: - 27017:27017 environment: - - MONGODB_ADVERTISED_HOSTNAME=127.0.0.1 - MONGO_INITDB_DATABASE=galoy mongodb-migrate: - image: us.gcr.io/galoy-org/galoy-api-migrate@sha256:de7a680539d1856c64ad1e7e8c877ea01c711fe89dbd90aa094c84f1abc7bfb7 + image: us.gcr.io/galoy-org/galoy-api-migrate@sha256:d5a1b52471800d747b20555dee88cec26b181acbbdb3df8fb81c73c4053f0ec2 depends_on: - mongodb environment: @@ -152,7 +242,7 @@ services: - 50052:50052 command: ./scripts/run-servers-dev.sh environment: - - DB_HOST=postgres-price-history + - DB_HOST=price-history-pg - DB_PORT=5432 - DB_USER=galoy-price-usr - DB_PWD=galoy-price-pwd @@ -161,13 +251,13 @@ services: - DB_POOL_MAX=5 - DB_DEBUG=false depends_on: - - postgres-price-history + - price-history-pg - price-history-migrate price-history-migrate: image: us.gcr.io/galoy-org/price-history-migrate:edge ports: [] environment: - - DB_HOST=postgres-price-history + - DB_HOST=price-history-pg - DB_PORT=5432 - DB_USER=galoy-price-usr - DB_PWD=galoy-price-pwd @@ -176,11 +266,9 @@ services: - DB_POOL_MAX=5 - DB_DEBUG=false depends_on: - - postgres-price-history - postgres-price-history: + - price-history-pg + price-history-pg: image: postgres:14.1 - ports: - - 5432:5432 environment: - POSTGRES_USER=galoy-price-usr - POSTGRES_PASSWORD=galoy-price-pwd @@ -190,13 +278,12 @@ services: ports: - 18443:18443 volumes: - - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/bitcoind/bitcoin.conf:/data/.bitcoin/bitcoin.conf + - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/config/bitcoind/bitcoin.conf:/data/.bitcoin/bitcoin.conf bitcoind-signer: image: lncm/bitcoind:v25.1 - ports: - - 18543:18443 + ports: [] volumes: - - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/bitcoind/bitcoin.conf:/data/.bitcoin/bitcoin.conf + - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/config/bitcoind/bitcoin.conf:/data/.bitcoin/bitcoin.conf depends_on: - bitcoind entrypoint: @@ -210,12 +297,12 @@ services: ports: - 10009:10009 volumes: - - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/lnd/lnd.conf:/root/.lnd/lnd.conf - - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/lnd/tls.key:/root/.lnd/tls.key - - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/lnd/tls.cert:/root/.lnd/tls.cert - - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/lnd/regtest/lnd1.wallet.db:/root/.lnd/wallet.db - - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/lnd/regtest/lnd1.macaroons.db:/root/.lnd/macaroons.db - - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/lnd/regtest/lnd1.admin.macaroon:/root/.lnd/admin.macaroon + - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/config/lnd/lnd.conf:/root/.lnd/lnd.conf + - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/config/lnd/tls.key:/root/.lnd/tls.key + - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/config/lnd/tls.cert:/root/.lnd/tls.cert + - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/config/lnd/regtest/lnd1.wallet.db:/root/.lnd/wallet.db + - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/config/lnd/regtest/lnd1.macaroons.db:/root/.lnd/macaroons.db + - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/config/lnd/regtest/lnd1.admin.macaroon:/root/.lnd/admin.macaroon depends_on: - bitcoind entrypoint: @@ -233,12 +320,12 @@ services: ports: - 10012:10009 volumes: - - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/lnd/lnd.conf:/root/.lnd/lnd.conf - - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/lnd/tls.key:/root/.lnd/tls.key - - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/lnd/tls.cert:/root/.lnd/tls.cert - - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/lnd/regtest/lnd-outside-1.wallet.db:/root/.lnd/wallet.db - - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/lnd/regtest/lnd-outside-1.macaroons.db:/root/.lnd/macaroons.db - - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/lnd/regtest/lnd-outside-1.admin.macaroon:/root/.lnd/admin.macaroon + - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/config/lnd/lnd.conf:/root/.lnd/lnd.conf + - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/config/lnd/tls.key:/root/.lnd/tls.key + - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/config/lnd/tls.cert:/root/.lnd/tls.cert + - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/config/lnd/regtest/lnd-outside-1.wallet.db:/root/.lnd/wallet.db + - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/config/lnd/regtest/lnd-outside-1.macaroons.db:/root/.lnd/macaroons.db + - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/config/lnd/regtest/lnd-outside-1.admin.macaroon:/root/.lnd/admin.macaroon entrypoint: - /bin/sh - -c @@ -257,18 +344,20 @@ services: - 2743:2743 - 2742:2742 environment: - - PG_CON=postgres://user:password@postgres-bria:5432/pg + - PG_CON=postgres://user:password@bria-pg:5432/pg - BITCOIND_SIGNER_ENDPOINT=https://bitcoind-signer:18443 command: - bria - daemon - --config - - /repo/dev/bria.yml + - /bria.yml - dev - -x - tpubDDDDGYiFda8HfJRc2AHFJDxVzzEtBPrKsbh35EaW2UGd5qfzrF2G87ewAgeeRyHEz4iB3kvhAYW1sH6dpLepTkFUzAktumBN8AXeXWE9nd1 - -d - m/84h/0h/0h + volumes: + - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/config/bria.yml:/bria.yml depends_on: bitcoind-signer: condition: service_started @@ -276,12 +365,9 @@ services: condition: service_started fulcrum: condition: service_started - postgres-bria: + bria-pg: condition: service_healthy - restart: on-failure:10 - volumes: - - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/:/repo - postgres-bria: + bria-pg: image: postgres:14.1 environment: - POSTGRES_USER=user @@ -301,9 +387,9 @@ services: depends_on: - bitcoind volumes: - - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/fulcrum/fulcrum.conf:/fulcrum.conf - - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/fulcrum/tls.key:/tls.key - - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/fulcrum/tls.cert:/tls.cert + - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/config/fulcrum/fulcrum.conf:/fulcrum.conf + - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/config/fulcrum/tls.key:/tls.key + - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/config/fulcrum/tls.cert:/tls.cert environment: - DATA_DIR=/db - SSL_CERTFILE=/tls.cert @@ -318,15 +404,16 @@ services: command: - stablesats - run - working_dir: /repo/dev + working_dir: /repo/config depends_on: - otel-agent restart: on-failure:10 volumes: - - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/:/repo + - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/:/repo otel-agent: ports: - 4318:4318 + - 4317:4317 image: otel/opentelemetry-collector-contrib:0.84.0 command: - --config=/etc/otel-agent-config.yaml @@ -334,7 +421,7 @@ services: - HONEYCOMB_DATASET=${HONEYCOMB_DATASET} - HONEYCOMB_API_KEY=${HONEYCOMB_API_KEY} volumes: - - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/otel-agent-config.yaml:/etc/otel-agent-config.yaml + - ${HOST_PROJECT_PATH:-.}/${GALOY_QUICKSTART_PATH:-vendor/galoy-quickstart}/dev/config/otel-agent-config.yaml:/etc/otel-agent-config.yaml svix: image: svix/svix-server:v1.11 platform: linux/amd64 diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/account-default-wallet.gql b/vendor/galoy-quickstart/graphql/gql/account-default-wallet.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/account-default-wallet.gql rename to vendor/galoy-quickstart/graphql/gql/account-default-wallet.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/account-delete.gql b/vendor/galoy-quickstart/graphql/gql/account-delete.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/account-delete.gql rename to vendor/galoy-quickstart/graphql/gql/account-delete.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/account-details.gql b/vendor/galoy-quickstart/graphql/gql/account-details.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/account-details.gql rename to vendor/galoy-quickstart/graphql/gql/account-details.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/account-disable-notification-category.gql b/vendor/galoy-quickstart/graphql/gql/account-disable-notification-category.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/account-disable-notification-category.gql rename to vendor/galoy-quickstart/graphql/gql/account-disable-notification-category.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/account-disable-notification-channel.gql b/vendor/galoy-quickstart/graphql/gql/account-disable-notification-channel.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/account-disable-notification-channel.gql rename to vendor/galoy-quickstart/graphql/gql/account-disable-notification-channel.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/account-enable-notification-category.gql b/vendor/galoy-quickstart/graphql/gql/account-enable-notification-category.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/account-enable-notification-category.gql rename to vendor/galoy-quickstart/graphql/gql/account-enable-notification-category.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/account-enable-notification-channel.gql b/vendor/galoy-quickstart/graphql/gql/account-enable-notification-channel.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/account-enable-notification-channel.gql rename to vendor/galoy-quickstart/graphql/gql/account-enable-notification-channel.gql diff --git a/vendor/galoy-quickstart/graphql/gql/account-limits.gql b/vendor/galoy-quickstart/graphql/gql/account-limits.gql new file mode 100644 index 0000000..7250714 --- /dev/null +++ b/vendor/galoy-quickstart/graphql/gql/account-limits.gql @@ -0,0 +1,23 @@ +query accountLimits { + me { + defaultAccount { + limits { + convert { + interval + remainingLimit + totalLimit + } + internalSend { + interval + remainingLimit + totalLimit + } + withdrawal { + interval + remainingLimit + totalLimit + } + } + } + } +} diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/account-update-default-wallet-id.gql b/vendor/galoy-quickstart/graphql/gql/account-update-default-wallet-id.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/account-update-default-wallet-id.gql rename to vendor/galoy-quickstart/graphql/gql/account-update-default-wallet-id.gql diff --git a/vendor/galoy-quickstart/graphql/gql/api-key-create.gql b/vendor/galoy-quickstart/graphql/gql/api-key-create.gql new file mode 100644 index 0000000..aaeb1e7 --- /dev/null +++ b/vendor/galoy-quickstart/graphql/gql/api-key-create.gql @@ -0,0 +1,12 @@ +mutation apiKeyCreate($input: ApiKeyCreateInput!) { + apiKeyCreate(input: $input) { + apiKey { + id + name + createdAt + expiresAt + readOnly + } + apiKeySecret + } +} diff --git a/vendor/galoy-quickstart/graphql/gql/api-keys.gql b/vendor/galoy-quickstart/graphql/gql/api-keys.gql new file mode 100644 index 0000000..2537653 --- /dev/null +++ b/vendor/galoy-quickstart/graphql/gql/api-keys.gql @@ -0,0 +1,15 @@ +query apiKeys { + me { + defaultAccount { + id + } + apiKeys { + id + name + revoked + createdAt + expiresAt + readOnly + } + } +} diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/callback-endpoint-add.gql b/vendor/galoy-quickstart/graphql/gql/callback-endpoint-add.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/callback-endpoint-add.gql rename to vendor/galoy-quickstart/graphql/gql/callback-endpoint-add.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/callback-endpoint-delete.gql b/vendor/galoy-quickstart/graphql/gql/callback-endpoint-delete.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/callback-endpoint-delete.gql rename to vendor/galoy-quickstart/graphql/gql/callback-endpoint-delete.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/callback-endpoints-list.gql b/vendor/galoy-quickstart/graphql/gql/callback-endpoints-list.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/callback-endpoints-list.gql rename to vendor/galoy-quickstart/graphql/gql/callback-endpoints-list.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/contacts.gql b/vendor/galoy-quickstart/graphql/gql/contacts.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/contacts.gql rename to vendor/galoy-quickstart/graphql/gql/contacts.gql diff --git a/vendor/galoy-quickstart/graphql/gql/default-account.gql b/vendor/galoy-quickstart/graphql/gql/default-account.gql new file mode 100644 index 0000000..d32015b --- /dev/null +++ b/vendor/galoy-quickstart/graphql/gql/default-account.gql @@ -0,0 +1,7 @@ +query defaultAccount { + me { + defaultAccount { + id + } + } +} diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/globals.gql b/vendor/galoy-quickstart/graphql/gql/globals.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/globals.gql rename to vendor/galoy-quickstart/graphql/gql/globals.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/identity.gql b/vendor/galoy-quickstart/graphql/gql/identity.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/identity.gql rename to vendor/galoy-quickstart/graphql/gql/identity.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/intraledger-payment-send.gql b/vendor/galoy-quickstart/graphql/gql/intraledger-payment-send.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/intraledger-payment-send.gql rename to vendor/galoy-quickstart/graphql/gql/intraledger-payment-send.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/intraledger-usd-payment-send.gql b/vendor/galoy-quickstart/graphql/gql/intraledger-usd-payment-send.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/intraledger-usd-payment-send.gql rename to vendor/galoy-quickstart/graphql/gql/intraledger-usd-payment-send.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/invoice-for-wallet-by-payment-hash.gql b/vendor/galoy-quickstart/graphql/gql/invoice-for-wallet-by-payment-hash.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/invoice-for-wallet-by-payment-hash.gql rename to vendor/galoy-quickstart/graphql/gql/invoice-for-wallet-by-payment-hash.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/invoices-by-wallet.gql b/vendor/galoy-quickstart/graphql/gql/invoices-by-wallet.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/invoices-by-wallet.gql rename to vendor/galoy-quickstart/graphql/gql/invoices-by-wallet.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/invoices.gql b/vendor/galoy-quickstart/graphql/gql/invoices.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/invoices.gql rename to vendor/galoy-quickstart/graphql/gql/invoices.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/ln-invoice-create-on-behalf-of-recipient.gql b/vendor/galoy-quickstart/graphql/gql/ln-invoice-create-on-behalf-of-recipient.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/ln-invoice-create-on-behalf-of-recipient.gql rename to vendor/galoy-quickstart/graphql/gql/ln-invoice-create-on-behalf-of-recipient.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/ln-invoice-create.gql b/vendor/galoy-quickstart/graphql/gql/ln-invoice-create.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/ln-invoice-create.gql rename to vendor/galoy-quickstart/graphql/gql/ln-invoice-create.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/ln-invoice-fee-probe.gql b/vendor/galoy-quickstart/graphql/gql/ln-invoice-fee-probe.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/ln-invoice-fee-probe.gql rename to vendor/galoy-quickstart/graphql/gql/ln-invoice-fee-probe.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/ln-invoice-payment-send.gql b/vendor/galoy-quickstart/graphql/gql/ln-invoice-payment-send.gql similarity index 64% rename from vendor/galoy-quickstart/galoy/test/bats/gql/ln-invoice-payment-send.gql rename to vendor/galoy-quickstart/graphql/gql/ln-invoice-payment-send.gql index b34a5ab..d13fdc3 100644 --- a/vendor/galoy-quickstart/galoy/test/bats/gql/ln-invoice-payment-send.gql +++ b/vendor/galoy-quickstart/graphql/gql/ln-invoice-payment-send.gql @@ -11,6 +11,14 @@ mutation lnInvoicePaymentSend($input: LnInvoicePaymentInput!) { paymentRequest } } + settlementVia { + ... on SettlementViaIntraLedger { + preImage + } + ... on SettlementViaLn { + preImage + } + } } } } diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/ln-invoice-payment-status-sub.gql b/vendor/galoy-quickstart/graphql/gql/ln-invoice-payment-status-sub.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/ln-invoice-payment-status-sub.gql rename to vendor/galoy-quickstart/graphql/gql/ln-invoice-payment-status-sub.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/ln-invoice-payment-status.gql b/vendor/galoy-quickstart/graphql/gql/ln-invoice-payment-status.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/ln-invoice-payment-status.gql rename to vendor/galoy-quickstart/graphql/gql/ln-invoice-payment-status.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/ln-no-amount-invoice-create-on-behalf-of-recipient.gql b/vendor/galoy-quickstart/graphql/gql/ln-no-amount-invoice-create-on-behalf-of-recipient.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/ln-no-amount-invoice-create-on-behalf-of-recipient.gql rename to vendor/galoy-quickstart/graphql/gql/ln-no-amount-invoice-create-on-behalf-of-recipient.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/ln-no-amount-invoice-create.gql b/vendor/galoy-quickstart/graphql/gql/ln-no-amount-invoice-create.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/ln-no-amount-invoice-create.gql rename to vendor/galoy-quickstart/graphql/gql/ln-no-amount-invoice-create.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/ln-no-amount-invoice-fee-probe.gql b/vendor/galoy-quickstart/graphql/gql/ln-no-amount-invoice-fee-probe.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/ln-no-amount-invoice-fee-probe.gql rename to vendor/galoy-quickstart/graphql/gql/ln-no-amount-invoice-fee-probe.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/ln-no-amount-invoice-payment-send.gql b/vendor/galoy-quickstart/graphql/gql/ln-no-amount-invoice-payment-send.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/ln-no-amount-invoice-payment-send.gql rename to vendor/galoy-quickstart/graphql/gql/ln-no-amount-invoice-payment-send.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/ln-no-amount-usd-invoice-fee-probe.gql b/vendor/galoy-quickstart/graphql/gql/ln-no-amount-usd-invoice-fee-probe.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/ln-no-amount-usd-invoice-fee-probe.gql rename to vendor/galoy-quickstart/graphql/gql/ln-no-amount-usd-invoice-fee-probe.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/ln-no-amount-usd-invoice-payment-send.gql b/vendor/galoy-quickstart/graphql/gql/ln-no-amount-usd-invoice-payment-send.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/ln-no-amount-usd-invoice-payment-send.gql rename to vendor/galoy-quickstart/graphql/gql/ln-no-amount-usd-invoice-payment-send.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/ln-usd-invoice-btc-denominated-create-on-behalf-of-recipient.gql b/vendor/galoy-quickstart/graphql/gql/ln-usd-invoice-btc-denominated-create-on-behalf-of-recipient.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/ln-usd-invoice-btc-denominated-create-on-behalf-of-recipient.gql rename to vendor/galoy-quickstart/graphql/gql/ln-usd-invoice-btc-denominated-create-on-behalf-of-recipient.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/ln-usd-invoice-create-on-behalf-of-recipient.gql b/vendor/galoy-quickstart/graphql/gql/ln-usd-invoice-create-on-behalf-of-recipient.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/ln-usd-invoice-create-on-behalf-of-recipient.gql rename to vendor/galoy-quickstart/graphql/gql/ln-usd-invoice-create-on-behalf-of-recipient.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/ln-usd-invoice-create.gql b/vendor/galoy-quickstart/graphql/gql/ln-usd-invoice-create.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/ln-usd-invoice-create.gql rename to vendor/galoy-quickstart/graphql/gql/ln-usd-invoice-create.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/ln-usd-invoice-fee-probe.gql b/vendor/galoy-quickstart/graphql/gql/ln-usd-invoice-fee-probe.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/ln-usd-invoice-fee-probe.gql rename to vendor/galoy-quickstart/graphql/gql/ln-usd-invoice-fee-probe.gql diff --git a/vendor/galoy-quickstart/graphql/gql/lnurl-payment-send.gql b/vendor/galoy-quickstart/graphql/gql/lnurl-payment-send.gql new file mode 100644 index 0000000..f92ecbf --- /dev/null +++ b/vendor/galoy-quickstart/graphql/gql/lnurl-payment-send.gql @@ -0,0 +1,12 @@ +mutation lnurlPaymentSend($input: LnurlPaymentSendInput!) { + lnurlPaymentSend(input: $input) { + errors { + message + path + } + status + transaction { + id + } + } +} diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/logout.gql b/vendor/galoy-quickstart/graphql/gql/logout.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/logout.gql rename to vendor/galoy-quickstart/graphql/gql/logout.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/my-updates-sub.gql b/vendor/galoy-quickstart/graphql/gql/my-updates-sub.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/my-updates-sub.gql rename to vendor/galoy-quickstart/graphql/gql/my-updates-sub.gql diff --git a/vendor/galoy-quickstart/graphql/gql/on-chain-address-create.gql b/vendor/galoy-quickstart/graphql/gql/on-chain-address-create.gql new file mode 100644 index 0000000..b8992d2 --- /dev/null +++ b/vendor/galoy-quickstart/graphql/gql/on-chain-address-create.gql @@ -0,0 +1,8 @@ +mutation onChainAddressCreate($input: OnChainAddressCreateInput!) { + onChainAddressCreate(input: $input) { + address + errors { + message + } + } +} diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/on-chain-address-current.gql b/vendor/galoy-quickstart/graphql/gql/on-chain-address-current.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/on-chain-address-current.gql rename to vendor/galoy-quickstart/graphql/gql/on-chain-address-current.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/on-chain-payment-send-all.gql b/vendor/galoy-quickstart/graphql/gql/on-chain-payment-send-all.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/on-chain-payment-send-all.gql rename to vendor/galoy-quickstart/graphql/gql/on-chain-payment-send-all.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/on-chain-payment-send.gql b/vendor/galoy-quickstart/graphql/gql/on-chain-payment-send.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/on-chain-payment-send.gql rename to vendor/galoy-quickstart/graphql/gql/on-chain-payment-send.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/on-chain-tx-fee.gql b/vendor/galoy-quickstart/graphql/gql/on-chain-tx-fee.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/on-chain-tx-fee.gql rename to vendor/galoy-quickstart/graphql/gql/on-chain-tx-fee.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/on-chain-usd-payment-send-as-btc-denominated.gql b/vendor/galoy-quickstart/graphql/gql/on-chain-usd-payment-send-as-btc-denominated.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/on-chain-usd-payment-send-as-btc-denominated.gql rename to vendor/galoy-quickstart/graphql/gql/on-chain-usd-payment-send-as-btc-denominated.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/on-chain-usd-payment-send.gql b/vendor/galoy-quickstart/graphql/gql/on-chain-usd-payment-send.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/on-chain-usd-payment-send.gql rename to vendor/galoy-quickstart/graphql/gql/on-chain-usd-payment-send.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/on-chain-usd-tx-fee-as-btc-denominated.gql b/vendor/galoy-quickstart/graphql/gql/on-chain-usd-tx-fee-as-btc-denominated.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/on-chain-usd-tx-fee-as-btc-denominated.gql rename to vendor/galoy-quickstart/graphql/gql/on-chain-usd-tx-fee-as-btc-denominated.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/on-chain-usd-tx-fee.gql b/vendor/galoy-quickstart/graphql/gql/on-chain-usd-tx-fee.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/on-chain-usd-tx-fee.gql rename to vendor/galoy-quickstart/graphql/gql/on-chain-usd-tx-fee.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/pending-incoming-transactions-by-address.gql b/vendor/galoy-quickstart/graphql/gql/pending-incoming-transactions-by-address.gql similarity index 97% rename from vendor/galoy-quickstart/galoy/test/bats/gql/pending-incoming-transactions-by-address.gql rename to vendor/galoy-quickstart/graphql/gql/pending-incoming-transactions-by-address.gql index bf3568a..942f950 100644 --- a/vendor/galoy-quickstart/galoy/test/bats/gql/pending-incoming-transactions-by-address.gql +++ b/vendor/galoy-quickstart/graphql/gql/pending-incoming-transactions-by-address.gql @@ -31,7 +31,6 @@ query pendingIncomingTransactionsByAddress($address: OnChainAddress!) { } ... on InitiationViaLn { paymentHash - paymentRequest } ... on InitiationViaOnChain { address diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/pending-incoming-transactions.gql b/vendor/galoy-quickstart/graphql/gql/pending-incoming-transactions.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/pending-incoming-transactions.gql rename to vendor/galoy-quickstart/graphql/gql/pending-incoming-transactions.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/price-sub.gql b/vendor/galoy-quickstart/graphql/gql/price-sub.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/price-sub.gql rename to vendor/galoy-quickstart/graphql/gql/price-sub.gql diff --git a/vendor/galoy-quickstart/graphql/gql/quiz-claim.gql b/vendor/galoy-quickstart/graphql/gql/quiz-claim.gql new file mode 100644 index 0000000..a581b2e --- /dev/null +++ b/vendor/galoy-quickstart/graphql/gql/quiz-claim.gql @@ -0,0 +1,15 @@ +mutation quizClaim($input: QuizClaimInput!) { + quizClaim(input: $input) { + quizzes { + amount + completed + id + notBefore + } + errors { + code + message + path + } + } +} diff --git a/vendor/galoy-quickstart/graphql/gql/quiz-question.gql b/vendor/galoy-quickstart/graphql/gql/quiz-question.gql new file mode 100644 index 0000000..648be43 --- /dev/null +++ b/vendor/galoy-quickstart/graphql/gql/quiz-question.gql @@ -0,0 +1,14 @@ +mutation quizQuestion($input: QuizCompletedInput!) { + quizCompleted(input: $input) { + quiz { + amount + completed + id + } + errors { + code + message + path + } + } +} diff --git a/vendor/galoy-quickstart/graphql/gql/quiz.gql b/vendor/galoy-quickstart/graphql/gql/quiz.gql new file mode 100644 index 0000000..b93946e --- /dev/null +++ b/vendor/galoy-quickstart/graphql/gql/quiz.gql @@ -0,0 +1,16 @@ +query myQuizQuestions { + me { + id + defaultAccount { + id + ... on ConsumerAccount { + quiz { + id + amount + completed + notBefore + } + } + } + } +} diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/real-time-price-sub.gql b/vendor/galoy-quickstart/graphql/gql/real-time-price-sub.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/real-time-price-sub.gql rename to vendor/galoy-quickstart/graphql/gql/real-time-price-sub.gql diff --git a/vendor/galoy-quickstart/graphql/gql/revoke-api-key.gql b/vendor/galoy-quickstart/graphql/gql/revoke-api-key.gql new file mode 100644 index 0000000..d671dab --- /dev/null +++ b/vendor/galoy-quickstart/graphql/gql/revoke-api-key.gql @@ -0,0 +1,13 @@ +mutation ApiKeyRevoke($input: ApiKeyRevokeInput!) { + apiKeyRevoke(input: $input) { + apiKey { + id + name + createdAt + revoked + expired + lastUsedAt + expiresAt + } + } +} diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/transaction-for-wallet-by-id.gql b/vendor/galoy-quickstart/graphql/gql/transaction-for-wallet-by-id.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/transaction-for-wallet-by-id.gql rename to vendor/galoy-quickstart/graphql/gql/transaction-for-wallet-by-id.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/transactions-by-address.gql b/vendor/galoy-quickstart/graphql/gql/transactions-by-address.gql similarity index 98% rename from vendor/galoy-quickstart/galoy/test/bats/gql/transactions-by-address.gql rename to vendor/galoy-quickstart/graphql/gql/transactions-by-address.gql index 7bae64c..00ff809 100644 --- a/vendor/galoy-quickstart/galoy/test/bats/gql/transactions-by-address.gql +++ b/vendor/galoy-quickstart/graphql/gql/transactions-by-address.gql @@ -45,7 +45,6 @@ fragment TransactionList on TransactionConnection { } ... on InitiationViaLn { paymentHash - paymentRequest } ... on InitiationViaOnChain { address diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/transactions-by-wallet.gql b/vendor/galoy-quickstart/graphql/gql/transactions-by-wallet.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/transactions-by-wallet.gql rename to vendor/galoy-quickstart/graphql/gql/transactions-by-wallet.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/transactions-for-wallet-by-payment-hash.gql b/vendor/galoy-quickstart/graphql/gql/transactions-for-wallet-by-payment-hash.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/transactions-for-wallet-by-payment-hash.gql rename to vendor/galoy-quickstart/graphql/gql/transactions-for-wallet-by-payment-hash.gql diff --git a/vendor/galoy-quickstart/graphql/gql/transactions.gql b/vendor/galoy-quickstart/graphql/gql/transactions.gql new file mode 100644 index 0000000..5955d7a --- /dev/null +++ b/vendor/galoy-quickstart/graphql/gql/transactions.gql @@ -0,0 +1,66 @@ +query transactions($walletIds: [WalletId], $first: Int, $after: String) { + me { + defaultAccount { + defaultWallet { + id + } + transactions(walletIds: $walletIds, first: $first, after: $after) { + ...TransactionList + } + } + } +} + +fragment TransactionList on TransactionConnection { + pageInfo { + hasNextPage + } + edges { + cursor + node { + __typename + id + status + direction + memo + createdAt + settlementAmount + settlementFee + settlementDisplayAmount + settlementDisplayFee + settlementDisplayCurrency + settlementCurrency + settlementPrice { + base + offset + } + initiationVia { + __typename + ... on InitiationViaIntraLedger { + counterPartyWalletId + counterPartyUsername + } + ... on InitiationViaLn { + paymentHash + paymentRequest + } + ... on InitiationViaOnChain { + address + } + } + settlementVia { + __typename + ... on SettlementViaIntraLedger { + counterPartyWalletId + counterPartyUsername + } + ... on SettlementViaLn { + preImage + } + ... on SettlementViaOnChain { + transactionHash + } + } + } + } +} diff --git a/vendor/galoy-quickstart/graphql/gql/update-display-currency.gql b/vendor/galoy-quickstart/graphql/gql/update-display-currency.gql new file mode 100644 index 0000000..a813cee --- /dev/null +++ b/vendor/galoy-quickstart/graphql/gql/update-display-currency.gql @@ -0,0 +1,7 @@ +mutation displayCurrencyUpdate($input: AccountUpdateDisplayCurrencyInput!) { + accountUpdateDisplayCurrency(input: $input) { + account { + displayCurrency + } + } +} diff --git a/vendor/galoy-quickstart/graphql/gql/user-details.gql b/vendor/galoy-quickstart/graphql/gql/user-details.gql new file mode 100644 index 0000000..931ac80 --- /dev/null +++ b/vendor/galoy-quickstart/graphql/gql/user-details.gql @@ -0,0 +1,6 @@ +query userDetails { + me { + id + language + } +} diff --git a/vendor/galoy-quickstart/graphql/gql/user-disable-notification-category.gql b/vendor/galoy-quickstart/graphql/gql/user-disable-notification-category.gql new file mode 100644 index 0000000..5a7ac5c --- /dev/null +++ b/vendor/galoy-quickstart/graphql/gql/user-disable-notification-category.gql @@ -0,0 +1,12 @@ +mutation userDisableNotificationCategory( + $input: UserDisableNotificationCategoryInput! +) { + userDisableNotificationCategory(input: $input) { + notificationSettings { + push { + enabled + disabledCategories + } + } + } +} diff --git a/vendor/galoy-quickstart/graphql/gql/user-disable-notification-channel.gql b/vendor/galoy-quickstart/graphql/gql/user-disable-notification-channel.gql new file mode 100644 index 0000000..b9ad7df --- /dev/null +++ b/vendor/galoy-quickstart/graphql/gql/user-disable-notification-channel.gql @@ -0,0 +1,12 @@ +mutation userDisableNotificationChannel( + $input: UserDisableNotificationChannelInput! +) { + userDisableNotificationChannel(input: $input) { + notificationSettings { + push { + enabled + disabledCategories + } + } + } +} diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/user-email-delete.gql b/vendor/galoy-quickstart/graphql/gql/user-email-delete.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/user-email-delete.gql rename to vendor/galoy-quickstart/graphql/gql/user-email-delete.gql diff --git a/vendor/galoy-quickstart/graphql/gql/user-email-registration-initiate.gql b/vendor/galoy-quickstart/graphql/gql/user-email-registration-initiate.gql new file mode 100644 index 0000000..e71d774 --- /dev/null +++ b/vendor/galoy-quickstart/graphql/gql/user-email-registration-initiate.gql @@ -0,0 +1,15 @@ +mutation userEmailRegistrationInitiate($input: UserEmailRegistrationInitiateInput!) { + userEmailRegistrationInitiate(input: $input) { + errors { + message + } + emailRegistrationId + me { + id + email { + address + verified + } + } + } +} diff --git a/vendor/galoy-quickstart/graphql/gql/user-email-registration-validate.gql b/vendor/galoy-quickstart/graphql/gql/user-email-registration-validate.gql new file mode 100644 index 0000000..14fc670 --- /dev/null +++ b/vendor/galoy-quickstart/graphql/gql/user-email-registration-validate.gql @@ -0,0 +1,14 @@ +mutation userEmailRegistrationValidate($input: UserEmailRegistrationValidateInput!) { + userEmailRegistrationValidate(input: $input) { + errors { + message + } + me { + id + email { + address + verified + } + } + } +} diff --git a/vendor/galoy-quickstart/graphql/gql/user-enable-notification-category.gql b/vendor/galoy-quickstart/graphql/gql/user-enable-notification-category.gql new file mode 100644 index 0000000..e613b1b --- /dev/null +++ b/vendor/galoy-quickstart/graphql/gql/user-enable-notification-category.gql @@ -0,0 +1,12 @@ +mutation userEnableNotificationCategory( + $input: UserEnableNotificationCategoryInput! +) { + userEnableNotificationCategory(input: $input) { + notificationSettings { + push { + enabled + disabledCategories + } + } + } +} diff --git a/vendor/galoy-quickstart/graphql/gql/user-enable-notification-channel.gql b/vendor/galoy-quickstart/graphql/gql/user-enable-notification-channel.gql new file mode 100644 index 0000000..d52dfdd --- /dev/null +++ b/vendor/galoy-quickstart/graphql/gql/user-enable-notification-channel.gql @@ -0,0 +1,12 @@ +mutation userEnableNotificationChannel( + $input: UserEnableNotificationChannelInput! +) { + userEnableNotificationChannel(input: $input) { + notificationSettings { + push { + enabled + disabledCategories + } + } + } +} diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/user-login-upgrade.gql b/vendor/galoy-quickstart/graphql/gql/user-login-upgrade.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/user-login-upgrade.gql rename to vendor/galoy-quickstart/graphql/gql/user-login-upgrade.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/user-login.gql b/vendor/galoy-quickstart/graphql/gql/user-login.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/user-login.gql rename to vendor/galoy-quickstart/graphql/gql/user-login.gql diff --git a/vendor/galoy-quickstart/graphql/gql/user-notification-settings.gql b/vendor/galoy-quickstart/graphql/gql/user-notification-settings.gql new file mode 100644 index 0000000..f412ddd --- /dev/null +++ b/vendor/galoy-quickstart/graphql/gql/user-notification-settings.gql @@ -0,0 +1,10 @@ +query userNotificationSettings { + me { + id + notificationSettings { + push { + enabled + } + } + } +} diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/user-phone-delete.gql b/vendor/galoy-quickstart/graphql/gql/user-phone-delete.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/user-phone-delete.gql rename to vendor/galoy-quickstart/graphql/gql/user-phone-delete.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/user-phone-registration-initiate.gql b/vendor/galoy-quickstart/graphql/gql/user-phone-registration-initiate.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/user-phone-registration-initiate.gql rename to vendor/galoy-quickstart/graphql/gql/user-phone-registration-initiate.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/user-phone-registration-validate.gql b/vendor/galoy-quickstart/graphql/gql/user-phone-registration-validate.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/user-phone-registration-validate.gql rename to vendor/galoy-quickstart/graphql/gql/user-phone-registration-validate.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/user-totp-delete.gql b/vendor/galoy-quickstart/graphql/gql/user-totp-delete.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/user-totp-delete.gql rename to vendor/galoy-quickstart/graphql/gql/user-totp-delete.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/user-totp-registration-initiate.gql b/vendor/galoy-quickstart/graphql/gql/user-totp-registration-initiate.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/user-totp-registration-initiate.gql rename to vendor/galoy-quickstart/graphql/gql/user-totp-registration-initiate.gql diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/user-totp-registration-validate.gql b/vendor/galoy-quickstart/graphql/gql/user-totp-registration-validate.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/user-totp-registration-validate.gql rename to vendor/galoy-quickstart/graphql/gql/user-totp-registration-validate.gql diff --git a/vendor/galoy-quickstart/graphql/gql/user-update-language.gql b/vendor/galoy-quickstart/graphql/gql/user-update-language.gql new file mode 100644 index 0000000..f1683e6 --- /dev/null +++ b/vendor/galoy-quickstart/graphql/gql/user-update-language.gql @@ -0,0 +1,11 @@ +mutation userUpdateLanguage($input: UserUpdateLanguageInput!) { + userUpdateLanguage(input: $input) { + user { + language + } + errors { + code + message + } + } +} diff --git a/vendor/galoy-quickstart/galoy/test/bats/gql/user-update-username.gql b/vendor/galoy-quickstart/graphql/gql/user-update-username.gql similarity index 100% rename from vendor/galoy-quickstart/galoy/test/bats/gql/user-update-username.gql rename to vendor/galoy-quickstart/graphql/gql/user-update-username.gql diff --git a/vendor/galoy-quickstart/graphql/gql/username-available.gql b/vendor/galoy-quickstart/graphql/gql/username-available.gql new file mode 100644 index 0000000..dabe694 --- /dev/null +++ b/vendor/galoy-quickstart/graphql/gql/username-available.gql @@ -0,0 +1,3 @@ +query usernameAvailable($username: Username!) { + usernameAvailable(username: $username) +} diff --git a/vendor/galoy-quickstart/graphql/gql/wallets-for-account.gql b/vendor/galoy-quickstart/graphql/gql/wallets-for-account.gql new file mode 100644 index 0000000..4679226 --- /dev/null +++ b/vendor/galoy-quickstart/graphql/gql/wallets-for-account.gql @@ -0,0 +1,13 @@ +query me { + me { + defaultAccount { + id + wallets { + id + walletCurrency + balance + pendingIncomingBalance + } + } + } +} diff --git a/vendor/galoy-quickstart/graphql/admin/schema.graphql b/vendor/galoy-quickstart/graphql/schemas/admin/schema.graphql similarity index 100% rename from vendor/galoy-quickstart/graphql/admin/schema.graphql rename to vendor/galoy-quickstart/graphql/schemas/admin/schema.graphql diff --git a/vendor/galoy-quickstart/graphql/public/schema.graphql b/vendor/galoy-quickstart/graphql/schemas/public/schema.graphql similarity index 100% rename from vendor/galoy-quickstart/graphql/public/schema.graphql rename to vendor/galoy-quickstart/graphql/schemas/public/schema.graphql