diff --git a/.github/labeler.yml b/.github/labeler.yml
index 71e9482c99..5d35153e1d 100644
--- a/.github/labeler.yml
+++ b/.github/labeler.yml
@@ -22,6 +22,11 @@ admin-panel:
- flake.lock
- pnpm-lock.yaml
+map:
+ - apps/map/*
+ - flake.lock
+ - pnpm-lock.yaml
+
core:
- core/api/*
- core/api-cron/*
diff --git a/.github/workflows/bats.yml b/.github/workflows/bats.yml
index f050386d9f..8b5df6699f 100644
--- a/.github/workflows/bats.yml
+++ b/.github/workflows/bats.yml
@@ -23,7 +23,7 @@ jobs:
- name: Buck2 build
run: |
nix develop -c buck2 build //core/api //core/api-ws-server \
- //core/api-keys //apps/dashboard //apps/consent //apps/pay //apps/admin-panel \
+ //core/api-keys //apps/dashboard //apps/consent //apps/pay //apps/admin-panel //apps/map \
//core/notifications
- name: Run bats tests
run: |
diff --git a/.github/workflows/buck2-test.yaml b/.github/workflows/buck2-test.yaml
index 445260ddad..f072fc87cb 100644
--- a/.github/workflows/buck2-test.yaml
+++ b/.github/workflows/buck2-test.yaml
@@ -23,7 +23,7 @@ jobs:
${{ toJSON(github.event.pull_request.labels.*.name) }}
EOF
- DEFAULT_LABELS=("dashboard" "consent" "pay" "core" "api-keys" "notifications" "admin-panel")
+ DEFAULT_LABELS=("dashboard" "consent" "pay" "core" "api-keys" "notifications" "admin-panel" "map")
LABELS=($(jq -r '.[]' < labels.json))
if [ ${#LABELS[@]} -eq 0 ]; then
LABELS=("${DEFAULT_LABELS[@]}")
@@ -33,7 +33,7 @@ jobs:
for LABEL in "${LABELS[@]}"; do
case "$LABEL" in
- dashboard|consent|pay|admin-panel)
+ dashboard|consent|pay|admin-panel|map)
ARGS+=" //apps/$LABEL:test"
;;
core)
diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml
index 0cf1b06d86..cf39a00ff4 100644
--- a/.github/workflows/integration-test.yml
+++ b/.github/workflows/integration-test.yml
@@ -27,7 +27,7 @@ jobs:
${{ toJSON(github.event.pull_request.labels.*.name) }}
EOF
- DEFAULT_LABELS=("dashboard" "consent" "pay" "core" "admin-panel")
+ DEFAULT_LABELS=("dashboard" "consent" "pay" "core" "admin-panel" "map")
LABELS=($(jq -r '.[]' < labels.json))
if [ ${#LABELS[@]} -eq 0 ]; then
LABELS=("${DEFAULT_LABELS[@]}")
@@ -37,7 +37,7 @@ jobs:
for LABEL in "${LABELS[@]}"; do
case "$LABEL" in
- dashboard|consent|pay|core|admin-panel)
+ dashboard|consent|pay|core|admin-panel|map)
ARGS+=" $LABEL"
;;
esac
diff --git a/BUCK b/BUCK
index 79553ed659..482cfe37fc 100644
--- a/BUCK
+++ b/BUCK
@@ -8,6 +8,7 @@ pnpm_workspace(
"//apps/dashboard:package.json",
"//apps/pay:package.json",
"//apps/admin-panel:package.json",
+ "//apps/map:package.json",
"//lib/eslint-config:package.json",
"//lib/galoy-components:package.json"
],
diff --git a/apps/map/.eslintrc.json b/apps/map/.eslintrc.json
new file mode 100644
index 0000000000..bffb357a71
--- /dev/null
+++ b/apps/map/.eslintrc.json
@@ -0,0 +1,3 @@
+{
+ "extends": "next/core-web-vitals"
+}
diff --git a/apps/map/.gitignore b/apps/map/.gitignore
new file mode 100644
index 0000000000..fd3dbb571a
--- /dev/null
+++ b/apps/map/.gitignore
@@ -0,0 +1,36 @@
+# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
+
+# dependencies
+/node_modules
+/.pnp
+.pnp.js
+.yarn/install-state.gz
+
+# testing
+/coverage
+
+# next.js
+/.next/
+/out/
+
+# production
+/build
+
+# misc
+.DS_Store
+*.pem
+
+# debug
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+# local env files
+.env*.local
+
+# vercel
+.vercel
+
+# typescript
+*.tsbuildinfo
+next-env.d.ts
diff --git a/apps/map/BUCK b/apps/map/BUCK
new file mode 100644
index 0000000000..83780d50c2
--- /dev/null
+++ b/apps/map/BUCK
@@ -0,0 +1,84 @@
+load(
+ "@toolchains//workspace-pnpm:macros.bzl",
+ "dev_pnpm_task_binary",
+ "dev_pnpm_task_test",
+ "build_node_modules",
+ "next_build",
+ "next_build_bin",
+ "eslint",
+ "audit",
+)
+
+dev_pnpm_task_binary(
+ name = "dev",
+ command = "dev",
+)
+
+dev_pnpm_task_binary(
+ name = "lint-fix",
+ command = "lint:fix",
+)
+
+dev_pnpm_task_test(
+ name = "test-integration",
+ command = "test",
+)
+
+export_file(
+ name = "package.json",
+ visibility = ["PUBLIC"],
+)
+
+build_node_modules(
+ name = "node_modules",
+)
+
+filegroup(
+ name = "src",
+ srcs = glob([
+ "app/**",
+ "theme/**",
+ "services/**",
+ "components/**",
+ "tailwind.config.ts",
+ "postcss.config.js",
+ "next.config.js",
+ "tsconfig.json",
+ "*.ts",
+ "instrumentation.node.ts"
+ ]),
+)
+
+next_build(
+ name = "build",
+ srcs = [":src"],
+)
+
+next_build_bin(
+ name = "map",
+)
+
+dev_deps_srcs = {
+ "lib/eslint-config": "//lib/eslint-config:src",
+}
+
+audit(
+ name = "audit",
+ level = "critical",
+)
+
+eslint(
+ name = "lint",
+ srcs = [":src"] + glob([".eslint*"]),
+ extensions = [".ts", ".tsx"],
+ allow_warnings = True,
+ dev_deps_srcs = dev_deps_srcs,
+)
+
+test_suite(
+ name = "test",
+ tests = [
+ ":audit",
+ ":lint",
+ ],
+)
diff --git a/apps/map/Dockerfile b/apps/map/Dockerfile
new file mode 100644
index 0000000000..fd299527dd
--- /dev/null
+++ b/apps/map/Dockerfile
@@ -0,0 +1,32 @@
+FROM nixos/nix:latest AS builder
+ARG APP=map
+
+COPY . /workdir
+WORKDIR /workdir
+
+RUN set -eux; \
+ nix \
+ --extra-experimental-features "nix-command flakes impure-derivations ca-derivations" \
+ --option filter-syscalls false \
+ build \
+ ".#$APP";
+
+RUN mkdir -p /tmp/nix-store-closure /tmp/local-bin
+RUN cp -R $(nix-store --query --requisites result/) /tmp/nix-store-closure
+RUN ln -snf $(nix-store --query result/)/bin/* /tmp/local-bin/
+
+FROM gcr.io/distroless/static-debian11 AS final
+ARG APP=map
+
+WORKDIR /app/$APP
+COPY --from=builder /tmp/nix-store-closure /nix/store
+COPY --from=builder /tmp/local-bin/* /usr/local/bin/
+
+USER 1000
+
+ARG COMMITHASH
+ENV COMMITHASH ${COMMITHASH}
+
+CMD [ \
+ "/usr/local/bin/run" \
+]
diff --git a/apps/map/README.md b/apps/map/README.md
new file mode 100644
index 0000000000..0a55876c0e
--- /dev/null
+++ b/apps/map/README.md
@@ -0,0 +1,9 @@
+# Map
+
+### local dev setup
+This app uses Google Maps, therefore it requires a Google Maps API token:
+```
+NEXT_PUBLIC_MAP_API_TOKEN
+```
+
+App run's on port `3005` by default.
diff --git a/apps/map/app/favicon.ico b/apps/map/app/favicon.ico
new file mode 100644
index 0000000000..06739ff07e
Binary files /dev/null and b/apps/map/app/favicon.ico differ
diff --git a/apps/map/app/globals.css b/apps/map/app/globals.css
new file mode 100644
index 0000000000..b5c61c9567
--- /dev/null
+++ b/apps/map/app/globals.css
@@ -0,0 +1,3 @@
+@tailwind base;
+@tailwind components;
+@tailwind utilities;
diff --git a/apps/map/app/layout.tsx b/apps/map/app/layout.tsx
new file mode 100644
index 0000000000..9b8bb28818
--- /dev/null
+++ b/apps/map/app/layout.tsx
@@ -0,0 +1,22 @@
+import type { Metadata } from "next"
+import { Inter_Tight } from "next/font/google"
+import "./globals.css"
+
+const inter = Inter_Tight({ subsets: ["latin"] })
+
+export const metadata: Metadata = {
+ title: "Maps",
+ description: "Merchant map for Blink",
+}
+
+export default function RootLayout({
+ children,
+}: Readonly<{
+ children: React.ReactNode
+}>) {
+ return (
+
+
{children}
+
+ )
+}
diff --git a/apps/map/app/page.tsx b/apps/map/app/page.tsx
new file mode 100644
index 0000000000..0d819695f2
--- /dev/null
+++ b/apps/map/app/page.tsx
@@ -0,0 +1,19 @@
+import MapComponent from "@/components/map"
+import { businessMapMarkers } from "@/services/galoy/graphql/queries/business-map-marker"
+import Image from "next/image"
+
+export default async function Home() {
+ const mapData = await businessMapMarkers()
+ if (mapData instanceof Error) {
+ return {mapData.message}
+ }
+
+ return (
+
+
+
+
+
+
+ )
+}
diff --git a/apps/map/app/server-acton.ts b/apps/map/app/server-acton.ts
new file mode 100644
index 0000000000..b68d930271
--- /dev/null
+++ b/apps/map/app/server-acton.ts
@@ -0,0 +1,76 @@
+"use server"
+
+import { merchantMapSuggest } from "@/services/galoy/graphql/mutation/merchant-map-suggest"
+import { isValidCoordinates } from "./utils"
+
+export const submitMerchantSuggest = async (
+ _prevState: {
+ error: boolean
+ message: string
+ },
+ form: FormData,
+): Promise<{
+ error: boolean
+ message: string
+}> => {
+ const title = form.get("title")
+ const username = form.get("username")
+ const latitude = form.get("latitude")
+ const longitude = form.get("longitude")
+ if (
+ !title ||
+ !username ||
+ !latitude ||
+ !longitude ||
+ typeof title !== "string" ||
+ typeof username != "string" ||
+ typeof latitude != "string" ||
+ typeof longitude != "string"
+ ) {
+ return {
+ error: true,
+ message: "Missing fields",
+ }
+ }
+
+ const lat = Number(latitude)
+ const lon = Number(longitude)
+
+ if (
+ isValidCoordinates({
+ latitude: lat,
+ longitude: lon,
+ })
+ ) {
+ return {
+ error: true,
+ message: "Invalid coordinates",
+ }
+ }
+
+ const response = await merchantMapSuggest({
+ title,
+ username,
+ latitude: lat,
+ longitude: lon,
+ })
+
+ if (response instanceof Error) {
+ return {
+ error: true,
+ message: response.message,
+ }
+ }
+
+ if (response.errors.length > 0) {
+ return {
+ error: true,
+ message: response.errors[0].message,
+ }
+ }
+
+ return {
+ error: false,
+ message: "success",
+ }
+}
diff --git a/apps/map/app/utils.ts b/apps/map/app/utils.ts
new file mode 100644
index 0000000000..f0f71cf7e7
--- /dev/null
+++ b/apps/map/app/utils.ts
@@ -0,0 +1,11 @@
+export function isValidCoordinates({
+ latitude,
+ longitude,
+}: {
+ latitude: number
+ longitude: number
+}): boolean {
+ const isValidLatitude: boolean = latitude >= -90 && latitude <= 90
+ const isValidLongitude: boolean = longitude >= -180 && longitude <= 180
+ return isValidLatitude && isValidLongitude
+}
diff --git a/apps/map/codegen.yml b/apps/map/codegen.yml
new file mode 100644
index 0000000000..2a58c294fe
--- /dev/null
+++ b/apps/map/codegen.yml
@@ -0,0 +1,61 @@
+overwrite: true
+schema:
+ - "../../core/api/src/graphql/public/schema.graphql"
+documents:
+ - "app/**/*.{ts,tsx}"
+ - "services/**/*.{ts,tsx}"
+generates:
+ services/galoy/graphql/generated.ts:
+ plugins:
+ - typescript
+ - typescript-operations
+ - typescript-react-apollo
+ - add:
+ content: "// this file is autogenerated by codegen"
+ - add:
+ content: "\/* eslint-disable *\/"
+ config:
+ # typesPrefix: GQL
+ enumsAsConst: true
+ immutableTypes: true
+ strictScalars: true
+ nonOptionalTypename: true
+ scalars:
+ AccountApiKeyLabel: "string"
+ AuthToken: "string"
+ CentAmount: "number"
+ ContactAlias: "string"
+ Hex32Bytes: "string"
+ Language: "string"
+ LnPaymentPreImage: "string"
+ LnPaymentRequest: "string"
+ LnPaymentSecret: "string"
+ Memo: "string"
+ OnChainAddress: "string"
+ OnChainTxHash: "string"
+ OneTimeAuthCode: "string"
+ PaymentHash: "string"
+ Phone: "string"
+ SafeInt: "number"
+ SatAmount: "number"
+ SignedAmount: "number"
+ TargetConfirmations: "number"
+ Timestamp: "number"
+ Username: "string"
+ WalletId: "string"
+ Seconds: "number"
+ DisplayCurrency: "string"
+ SignedDisplayMajorAmount: "string"
+ CountryCode: "string"
+ EmailRegistrationId: "string"
+ TotpRegistrationId: "string"
+ EmailAddress: "string"
+ TotpSecret: "string"
+ TotpCode: "string"
+ Feedback: "string"
+ Minutes: "string"
+ LnPubkey: "string"
+ EndpointId: "string"
+ EndpointUrl: "string"
+ Object: "string"
+ NotificationCategory: "string"
diff --git a/apps/map/components/input/index.tsx b/apps/map/components/input/index.tsx
new file mode 100644
index 0000000000..165b65b67f
--- /dev/null
+++ b/apps/map/components/input/index.tsx
@@ -0,0 +1,34 @@
+import React, { InputHTMLAttributes } from "react"
+
+interface InputProps extends InputHTMLAttributes {
+ label?: string
+ id: string
+}
+
+const InputComponent: React.FC = ({ label, id, ...inputProps }) => {
+ return (
+
+ {label ? (
+
+ ) : null}
+
+
+ )
+}
+
+export default InputComponent
diff --git a/apps/map/components/logo/location.tsx b/apps/map/components/logo/location.tsx
new file mode 100644
index 0000000000..5e310d9366
--- /dev/null
+++ b/apps/map/components/logo/location.tsx
@@ -0,0 +1,16 @@
+import React from "react"
+
+const LocationIcon = () => (
+
+)
+
+export default LocationIcon
diff --git a/apps/map/components/map/index.tsx b/apps/map/components/map/index.tsx
new file mode 100644
index 0000000000..aba045cf3f
--- /dev/null
+++ b/apps/map/components/map/index.tsx
@@ -0,0 +1,336 @@
+"use client"
+import React, { useState, useMemo, useEffect, useCallback, useRef } from "react"
+import { GoogleMap, MarkerF, InfoWindow, useLoadScript } from "@react-google-maps/api"
+import { BusinessMapMarkersQuery } from "@/services/galoy/graphql/generated"
+import Link from "next/link"
+import { theme } from "./map-theme"
+import { env } from "@/env"
+import LocationIcon from "../logo/location"
+import { SuggestMapFormSheet } from "./suggest-form"
+
+type MapComponentProps = {
+ mapData: BusinessMapMarkersQuery["businessMapMarkers"]
+}
+const DEFAULT_LAT = 13.7942
+const DEFAULT_LNG = -88.8965
+
+export default function MapComponent({ mapData }: MapComponentProps) {
+ const mapRef = useRef()
+ const [selectedMarker, setSelectedMarker] = useState<
+ BusinessMapMarkersQuery["businessMapMarkers"][number] | null
+ >(null)
+ const [currentLocation, setCurrentLocation] = useState({
+ coordinates: {
+ lat: DEFAULT_LAT,
+ lng: DEFAULT_LNG,
+ },
+ userAllowedLocation: false,
+ })
+
+ const [draggablePin, setDraggablePin] = useState({
+ coordinates: { lat: 0, lng: 0 },
+ visible: false,
+ })
+
+ const libraries = useMemo(() => ["places"], [])
+ const onMapLoad = useCallback((map: google.maps.Map) => {
+ mapRef.current = map
+ }, [])
+
+ const mapOptions = useMemo(
+ () => ({
+ disableDefaultUI: true,
+ clickableIcons: true,
+ zoomControl: true,
+ maxZoom: 38,
+ minZoom: 3,
+ styles: [...theme, ...unwantedMarkers],
+ restriction: {
+ latLngBounds: {
+ north: 85,
+ south: -85,
+ east: 180,
+ west: -180,
+ },
+ strictBounds: true,
+ },
+ }),
+ [],
+ )
+
+ useEffect(() => {
+ navigator.geolocation.getCurrentPosition(
+ (position) => {
+ setCurrentLocation({
+ coordinates: { lat: position.coords.latitude, lng: position.coords.longitude },
+ userAllowedLocation: true,
+ })
+ },
+ () => {
+ console.error("Could not fetch the location")
+ },
+ )
+ }, [])
+
+ const { isLoaded } = useLoadScript({
+ googleMapsApiKey: env.NEXT_PUBLIC_MAP_API_TOKEN,
+ libraries: libraries as any,
+ })
+
+ if (!isLoaded) {
+ return Loading...
+ }
+
+ const handleMarkerClick = (
+ marker: BusinessMapMarkersQuery["businessMapMarkers"][number],
+ ) => {
+ setSelectedMarker(marker)
+ }
+
+ const centerMapOnCurrentLocation = () => {
+ if (mapRef.current) {
+ mapRef.current.panTo(currentLocation.coordinates)
+ mapRef.current.setZoom(14)
+ }
+ }
+
+ const addDraggablePin = () => {
+ const center = mapRef?.current?.getCenter()
+
+ if (!center) {
+ return
+ }
+
+ setDraggablePin({
+ coordinates: { lat: center?.lat(), lng: center?.lng() },
+ visible: true,
+ })
+ }
+
+ const cancelDraggablePin = () => {
+ setDraggablePin({
+ coordinates: { lat: 0, lng: 0 },
+ visible: false,
+ })
+ }
+
+ const handleDragEnd = (event: google.maps.MapMouseEvent) => {
+ const lat = event?.latLng?.lat()
+ const lng = event?.latLng?.lng()
+
+ if (!lat || !lng) {
+ return
+ }
+
+ setDraggablePin({
+ coordinates: { lat, lng },
+ visible: true,
+ })
+ }
+
+ const onInputChangeDraggablePinLat = (e: React.ChangeEvent) => {
+ setDraggablePin({
+ coordinates: { lat: Number(e.target.value), lng: draggablePin.coordinates.lng },
+ visible: true,
+ })
+
+ if (!mapRef.current) {
+ return
+ }
+ mapRef.current.panTo({
+ lat: Number(e.target.value),
+ lng: draggablePin.coordinates.lng,
+ })
+ }
+
+ const onInputChangeDraggablePinLong = (e: React.ChangeEvent) => {
+ setDraggablePin({
+ coordinates: { lat: draggablePin.coordinates.lat, lng: Number(e.target.value) },
+ visible: true,
+ })
+
+ if (!mapRef.current) {
+ return
+ }
+ mapRef.current.panTo({
+ lat: draggablePin.coordinates.lat,
+ lng: Number(e.target.value),
+ })
+ }
+
+ return (
+ <>
+ {draggablePin.visible && (
+
+ )}
+
+ {draggablePin.visible && (
+
+
+
+
+ )}
+ {!draggablePin.visible && (
+
+ )}
+ {currentLocation.userAllowedLocation && (
+
+ )}
+
+ {mapData.map((marker, index) => (
+ handleMarkerClick(marker)}
+ />
+ ))}
+ {currentLocation.userAllowedLocation && (
+
+ )}
+ {selectedMarker && (
+ setSelectedMarker(null)}
+ >
+
+
+ {selectedMarker.username}
+
+
+
+
+
+
+ )}
+ {draggablePin.visible && (
+
+ )}
+
+ >
+ )
+}
+
+const unwantedMarkers = [
+ {
+ featureType: "poi",
+ elementType: "labels",
+ stylers: [{ visibility: "off" }],
+ },
+ {
+ featureType: "transit",
+ elementType: "all",
+ stylers: [{ visibility: "off" }],
+ },
+ {
+ featureType: "poi.park",
+ elementType: "labels",
+ stylers: [{ visibility: "off" }],
+ },
+ {
+ featureType: "poi.business",
+ stylers: [{ visibility: "off" }],
+ },
+ {
+ featureType: "poi.business",
+ stylers: [{ visibility: "off" }],
+ },
+ {
+ featureType: "landscape.man_made",
+ stylers: [{ visibility: "off" }],
+ },
+ {
+ featureType: "road",
+ elementType: "labels.icon",
+ stylers: [{ visibility: "off" }],
+ },
+]
diff --git a/apps/map/components/map/map-theme.ts b/apps/map/components/map/map-theme.ts
new file mode 100644
index 0000000000..2e4a72f826
--- /dev/null
+++ b/apps/map/components/map/map-theme.ts
@@ -0,0 +1,80 @@
+export const theme = [
+ { elementType: "geometry", stylers: [{ color: "#242f3e" }] },
+ { elementType: "labels.text.stroke", stylers: [{ color: "#242f3e" }] },
+ { elementType: "labels.text.fill", stylers: [{ color: "#746855" }] },
+ {
+ featureType: "administrative.locality",
+ elementType: "labels.text.fill",
+ stylers: [{ color: "#d59563" }],
+ },
+ {
+ featureType: "poi",
+ elementType: "labels.text.fill",
+ stylers: [{ color: "#d59563" }],
+ },
+ {
+ featureType: "poi.park",
+ elementType: "geometry",
+ stylers: [{ color: "#263c3f" }],
+ },
+ {
+ featureType: "poi.park",
+ elementType: "labels.text.fill",
+ stylers: [{ color: "#6b9a76" }],
+ },
+ {
+ featureType: "road",
+ elementType: "geometry",
+ stylers: [{ color: "#38414e" }],
+ },
+ {
+ featureType: "road",
+ elementType: "geometry.stroke",
+ stylers: [{ color: "#212a37" }],
+ },
+ {
+ featureType: "road",
+ elementType: "labels.text.fill",
+ stylers: [{ color: "#9ca5b3" }],
+ },
+ {
+ featureType: "road.highway",
+ elementType: "geometry",
+ stylers: [{ color: "#746855" }],
+ },
+ {
+ featureType: "road.highway",
+ elementType: "geometry.stroke",
+ stylers: [{ color: "#1f2835" }],
+ },
+ {
+ featureType: "road.highway",
+ elementType: "labels.text.fill",
+ stylers: [{ color: "#f3d19c" }],
+ },
+ {
+ featureType: "transit",
+ elementType: "geometry",
+ stylers: [{ color: "#2f3948" }],
+ },
+ {
+ featureType: "transit.station",
+ elementType: "labels.text.fill",
+ stylers: [{ color: "#d59563" }],
+ },
+ {
+ featureType: "water",
+ elementType: "geometry",
+ stylers: [{ color: "#17263c" }],
+ },
+ {
+ featureType: "water",
+ elementType: "labels.text.fill",
+ stylers: [{ color: "#515c6d" }],
+ },
+ {
+ featureType: "water",
+ elementType: "labels.text.stroke",
+ stylers: [{ color: "#17263c" }],
+ },
+]
diff --git a/apps/map/components/map/suggest-form.tsx b/apps/map/components/map/suggest-form.tsx
new file mode 100644
index 0000000000..e2c06455ee
--- /dev/null
+++ b/apps/map/components/map/suggest-form.tsx
@@ -0,0 +1,120 @@
+import { submitMerchantSuggest } from "@/app/server-acton"
+import InputComponent from "../input"
+import {
+ Sheet,
+ SheetContent,
+ SheetDescription,
+ SheetHeader,
+ SheetTitle,
+ SheetTrigger,
+} from "../sheet"
+import { useFormState } from "react-dom"
+import { useState } from "react"
+
+type formProps = {
+ latitude: number
+ longitude: number
+}
+
+export function SuggestMapFormSheet({ latitude, longitude }: formProps) {
+ const [isOpen, setIsOpen] = useState(false)
+ const [coordinates, setCoordinates] = useState({
+ latitude: latitude,
+ longitude: longitude,
+ })
+
+ const [state, formAction] = useFormState<
+ {
+ error: boolean
+ message: string
+ },
+ FormData
+ >(submitMerchantSuggest, {
+ error: false,
+ message: "",
+ })
+
+ const handleOpen = () => {
+ state.error = false
+ state.message = ""
+ setCoordinates({
+ latitude,
+ longitude,
+ })
+ setIsOpen(true)
+ }
+
+ return (
+
+
+
+
+
+
+ Suggest Business
+
+ {state.message === "success" ? (
+ {"Request Submitted"}
+ ) : (
+ <>
+
+ Fill the Details of the Business you want to Add.
+
+
+ >
+ )}
+
+
+ )
+}
diff --git a/apps/map/components/sheet/index.tsx b/apps/map/components/sheet/index.tsx
new file mode 100644
index 0000000000..a6095ced50
--- /dev/null
+++ b/apps/map/components/sheet/index.tsx
@@ -0,0 +1,126 @@
+import * as React from "react"
+import * as SheetPrimitive from "@radix-ui/react-dialog"
+import { cva, type VariantProps } from "class-variance-authority"
+import { cn } from "../utils"
+
+const Sheet = SheetPrimitive.Root
+
+const SheetTrigger = SheetPrimitive.Trigger
+
+const SheetClose = SheetPrimitive.Close
+
+const SheetPortal = SheetPrimitive.Portal
+
+const SheetOverlay = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+))
+SheetOverlay.displayName = SheetPrimitive.Overlay.displayName
+
+const sheetVariants = cva(
+ "fixed z-50 gap-4 bg-white p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
+ {
+ variants: {
+ side: {
+ top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
+ bottom:
+ "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
+ left: "inset-y-0 left-0 h-full sm:w-3/4 sm:border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left w-full sm:max-w-sm",
+ right:
+ "inset-y-0 right-0 h-full sm:w-3/4 sm:border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right w-full sm:max-w-sm",
+ },
+ },
+ defaultVariants: {
+ side: "right",
+ },
+ },
+)
+
+interface SheetContentProps
+ extends React.ComponentPropsWithoutRef,
+ VariantProps {}
+
+const SheetContent = React.forwardRef<
+ React.ElementRef,
+ SheetContentProps
+>(({ side = "right", className, children, ...props }, ref) => (
+
+
+
+ {children}
+
+ xClose
+
+
+
+))
+SheetContent.displayName = SheetPrimitive.Content.displayName
+
+const SheetHeader = ({ className, ...props }: React.HTMLAttributes) => (
+
+)
+SheetHeader.displayName = "SheetHeader"
+
+const SheetFooter = ({ className, ...props }: React.HTMLAttributes) => (
+
+)
+SheetFooter.displayName = "SheetFooter"
+
+const SheetTitle = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+))
+SheetTitle.displayName = SheetPrimitive.Title.displayName
+
+const SheetDescription = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+))
+SheetDescription.displayName = SheetPrimitive.Description.displayName
+
+export {
+ Sheet,
+ SheetPortal,
+ SheetOverlay,
+ SheetTrigger,
+ SheetClose,
+ SheetContent,
+ SheetHeader,
+ SheetFooter,
+ SheetTitle,
+ SheetDescription,
+}
diff --git a/apps/map/components/utils.ts b/apps/map/components/utils.ts
new file mode 100644
index 0000000000..bd0c391ddd
--- /dev/null
+++ b/apps/map/components/utils.ts
@@ -0,0 +1,6 @@
+import { clsx, type ClassValue } from "clsx"
+import { twMerge } from "tailwind-merge"
+
+export function cn(...inputs: ClassValue[]) {
+ return twMerge(clsx(inputs))
+}
diff --git a/apps/map/env.ts b/apps/map/env.ts
new file mode 100644
index 0000000000..434a7d20b7
--- /dev/null
+++ b/apps/map/env.ts
@@ -0,0 +1,15 @@
+import { createEnv } from "@t3-oss/env-nextjs"
+import { z } from "zod"
+
+export const env = createEnv({
+ server: {
+ CORE_URL: z.string().default("http://localhost:4455/graphql"),
+ },
+ client: {
+ NEXT_PUBLIC_MAP_API_TOKEN: z.string().default(""),
+ },
+ runtimeEnv: {
+ CORE_URL: process.env.CORE_URL,
+ NEXT_PUBLIC_MAP_API_TOKEN: process.env.NEXT_PUBLIC_MAP_API_TOKEN,
+ },
+})
diff --git a/apps/map/instrumentation.node.ts b/apps/map/instrumentation.node.ts
new file mode 100644
index 0000000000..377f594508
--- /dev/null
+++ b/apps/map/instrumentation.node.ts
@@ -0,0 +1,35 @@
+import { NodeSDK } from "@opentelemetry/sdk-node"
+import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http"
+import { Resource } from "@opentelemetry/resources"
+import { SemanticResourceAttributes } from "@opentelemetry/semantic-conventions"
+import { SimpleSpanProcessor } from "@opentelemetry/sdk-trace-node"
+import { NetInstrumentation } from "@opentelemetry/instrumentation-net"
+import { HttpInstrumentation } from "@opentelemetry/instrumentation-http"
+import { GraphQLInstrumentation } from "@opentelemetry/instrumentation-graphql"
+import { W3CTraceContextPropagator } from "@opentelemetry/core"
+
+const sdk = new NodeSDK({
+ textMapPropagator: new W3CTraceContextPropagator(),
+ resource: new Resource({
+ [SemanticResourceAttributes.SERVICE_NAME]:
+ process.env.TRACING_SERVICE_NAME || "map",
+ }),
+ spanProcessor: new SimpleSpanProcessor(new OTLPTraceExporter()),
+ instrumentations: [
+ new NetInstrumentation(),
+ new HttpInstrumentation(),
+ new GraphQLInstrumentation({
+ mergeItems: true,
+ allowValues: true,
+ }),
+ ],
+})
+sdk.start()
+
+process.on("SIGTERM", () => {
+ sdk
+ .shutdown()
+ .then(() => console.log("Tracing terminated"))
+ .catch((error) => console.log("Error terminating tracing", error))
+ .finally(() => process.exit(0))
+})
diff --git a/apps/map/instrumentation.ts b/apps/map/instrumentation.ts
new file mode 100644
index 0000000000..e357de1a6d
--- /dev/null
+++ b/apps/map/instrumentation.ts
@@ -0,0 +1,7 @@
+export async function register() {
+ console.log("register", process.env.NEXT_RUNTIME)
+
+ if (process.env.NEXT_RUNTIME === "nodejs") {
+ await import("./instrumentation.node")
+ }
+}
diff --git a/apps/map/next-env.d.ts b/apps/map/next-env.d.ts
new file mode 100644
index 0000000000..4f11a03dc6
--- /dev/null
+++ b/apps/map/next-env.d.ts
@@ -0,0 +1,5 @@
+///
+///
+
+// NOTE: This file should not be edited
+// see https://nextjs.org/docs/basic-features/typescript for more information.
diff --git a/apps/map/next.config.js b/apps/map/next.config.js
new file mode 100644
index 0000000000..cbd4faab40
--- /dev/null
+++ b/apps/map/next.config.js
@@ -0,0 +1,10 @@
+/** @type {import('next').NextConfig} */
+const nextConfig = {
+ experimental: {
+ outputFileTracingRoot: require("path").join(__dirname, "../../"),
+ instrumentationHook: true,
+ },
+ output: "standalone",
+}
+
+module.exports = nextConfig
diff --git a/apps/map/package.json b/apps/map/package.json
new file mode 100644
index 0000000000..98b1374681
--- /dev/null
+++ b/apps/map/package.json
@@ -0,0 +1,58 @@
+{
+ "name": "map",
+ "private": true,
+ "scripts": {
+ "dev": "next dev -p 3005",
+ "build": "next build",
+ "start": "next start",
+ "lint": "next lint",
+ "lint:fix": "eslint --fix --ext .ts,.tsx .",
+ "codegen": "graphql-codegen --config codegen.yml",
+ "test": "echo 'Need to add test'"
+ },
+ "dependencies": {
+ "@apollo/client": "^3.9.2",
+ "@opentelemetry/api": "^1.6.0",
+ "@opentelemetry/core": "^1.21.0",
+ "@opentelemetry/exporter-trace-otlp-http": "^0.44.0",
+ "@opentelemetry/instrumentation-graphql": "^0.35.2",
+ "@opentelemetry/instrumentation-http": "^0.44.0",
+ "@opentelemetry/instrumentation-net": "^0.32.2",
+ "@opentelemetry/resources": "^1.17.1",
+ "@opentelemetry/sdk-node": "^0.48.0",
+ "@opentelemetry/sdk-trace-node": "^1.18.1",
+ "@opentelemetry/semantic-conventions": "^1.17.1",
+ "@radix-ui/react-dialog": "^1.0.5",
+ "@react-google-maps/api": "^2.19.2",
+ "@t3-oss/env-nextjs": "^0.8.0",
+ "class-variance-authority": "^0.7.0",
+ "clsx": "^2.0.0",
+ "graphql": "^16.8.1",
+ "next": "14.1.0",
+ "react": "^18.2.0",
+ "react-dom": "^18.2.0",
+ "tailwind-merge": "^2.1.0",
+ "tailwindcss-animate": "^1.0.7",
+ "zod": "^3.22.4"
+ },
+ "devDependencies": {
+ "@galoy/eslint-config": "workspace:^",
+ "@graphql-codegen/add": "^5.0.0",
+ "@graphql-codegen/cli": "^5.0.0",
+ "@graphql-codegen/client-preset": "^4.1.0",
+ "@graphql-codegen/typescript": "^4.0.1",
+ "@graphql-codegen/typescript-operations": "^4.0.1",
+ "@graphql-codegen/typescript-react-apollo": "^4.1.0",
+ "@graphql-codegen/typescript-resolvers": "^4.0.1",
+ "@graphql-inspector/cli": "^4.0.3",
+ "@types/node": "^20",
+ "@types/react": "18.2.31",
+ "@types/react-dom": "18.2.14",
+ "autoprefixer": "^10.0.1",
+ "eslint": "^8",
+ "eslint-config-next": "14.1.0",
+ "postcss": "^8",
+ "tailwindcss": "^3.3.0",
+ "typescript": "^5"
+ }
+}
\ No newline at end of file
diff --git a/apps/map/postcss.config.js b/apps/map/postcss.config.js
new file mode 100644
index 0000000000..12a703d900
--- /dev/null
+++ b/apps/map/postcss.config.js
@@ -0,0 +1,6 @@
+module.exports = {
+ plugins: {
+ tailwindcss: {},
+ autoprefixer: {},
+ },
+};
diff --git a/apps/map/prettier.config.js b/apps/map/prettier.config.js
new file mode 100644
index 0000000000..e6236cf0be
--- /dev/null
+++ b/apps/map/prettier.config.js
@@ -0,0 +1,15 @@
+module.exports = {
+ // Custom:
+ semi: false,
+ trailingComma: "all",
+ printWidth: 90,
+ quoteProps: "consistent",
+ // Defaults:
+ singleQuote: false,
+ tabWidth: 2,
+ useTabs: false,
+ bracketSpacing: true,
+ arrowParens: "always",
+ proseWrap: "preserve",
+ endOfLine: "lf",
+}
diff --git a/apps/map/prettierrc.js b/apps/map/prettierrc.js
new file mode 100644
index 0000000000..9c225f1883
--- /dev/null
+++ b/apps/map/prettierrc.js
@@ -0,0 +1,3 @@
+const baseConfig = require("@galoy/eslint-config/prettier")
+
+module.exports = baseConfig
diff --git a/apps/map/public/logo.svg b/apps/map/public/logo.svg
new file mode 100644
index 0000000000..f48cc40169
--- /dev/null
+++ b/apps/map/public/logo.svg
@@ -0,0 +1,162 @@
+
+
+
diff --git a/apps/map/services/galoy/graphql/client.ts b/apps/map/services/galoy/graphql/client.ts
new file mode 100644
index 0000000000..e7b202cca1
--- /dev/null
+++ b/apps/map/services/galoy/graphql/client.ts
@@ -0,0 +1,23 @@
+import { ApolloClient, HttpLink, InMemoryCache } from "@apollo/client"
+import { propagation, context } from "@opentelemetry/api"
+import { env } from "@/env"
+
+export const apolloClient = {
+ UnAuthed: () => {
+ return new ApolloClient({
+ cache: new InMemoryCache(),
+ link: new HttpLink({
+ uri: env.CORE_URL,
+ fetchOptions: { cache: "no-store" },
+ fetch: (uri, options) => {
+ const headersWithTrace = options?.headers || {}
+ propagation.inject(context.active(), headersWithTrace)
+ return fetch(uri, {
+ ...options,
+ headers: headersWithTrace,
+ })
+ },
+ }),
+ })
+ },
+}
diff --git a/apps/map/services/galoy/graphql/generated.ts b/apps/map/services/galoy/graphql/generated.ts
new file mode 100644
index 0000000000..442540d77b
--- /dev/null
+++ b/apps/map/services/galoy/graphql/generated.ts
@@ -0,0 +1,2152 @@
+// this file is autogenerated by codegen
+/* eslint-disable */
+import { gql } from '@apollo/client';
+import * as Apollo from '@apollo/client';
+export type Maybe = T | null;
+export type InputMaybe = Maybe;
+export type Exact = { [K in keyof T]: T[K] };
+export type MakeOptional = Omit & { [SubKey in K]?: Maybe };
+export type MakeMaybe = Omit & { [SubKey in K]: Maybe };
+export type MakeEmpty = { [_ in K]?: never };
+export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
+const defaultOptions = {} as const;
+/** All built-in and custom scalars, mapped to their actual values */
+export type Scalars = {
+ ID: { input: string; output: string; }
+ String: { input: string; output: string; }
+ Boolean: { input: boolean; output: boolean; }
+ Int: { input: number; output: number; }
+ Float: { input: number; output: number; }
+ /** An Opaque Bearer token */
+ AuthToken: { input: string; output: string; }
+ /** (Positive) Cent amount (1/100 of a dollar) */
+ CentAmount: { input: number; output: number; }
+ /** An alias name that a user can set for a wallet (with which they have transactions) */
+ ContactAlias: { input: string; output: string; }
+ /** A CCA2 country code (ex US, FR, etc) */
+ CountryCode: { input: string; output: string; }
+ /** Display currency of an account */
+ DisplayCurrency: { input: string; output: string; }
+ /** Email address */
+ EmailAddress: { input: string; output: string; }
+ /** An id to be passed between registrationInitiate and registrationValidate for confirming email */
+ EmailRegistrationId: { input: string; output: string; }
+ EndpointId: { input: string; output: string; }
+ /** Url that will be fetched on events for the account */
+ EndpointUrl: { input: string; output: string; }
+ /** Feedback shared with our user */
+ Feedback: { input: string; output: string; }
+ /** Hex-encoded string of 32 bytes */
+ Hex32Bytes: { input: string; output: string; }
+ Language: { input: string; output: string; }
+ LnPaymentPreImage: { input: string; output: string; }
+ /** BOLT11 lightning invoice payment request with the amount included */
+ LnPaymentRequest: { input: string; output: string; }
+ LnPaymentSecret: { input: string; output: string; }
+ /** Text field in a lightning payment transaction */
+ Memo: { input: string; output: string; }
+ /** (Positive) amount of minutes */
+ Minutes: { input: string; output: string; }
+ NotificationCategory: { input: string; output: string; }
+ /** An address for an on-chain bitcoin destination */
+ OnChainAddress: { input: string; output: string; }
+ OnChainTxHash: { input: string; output: string; }
+ /** An authentication code valid for a single use */
+ OneTimeAuthCode: { input: string; output: string; }
+ PaymentHash: { input: string; output: string; }
+ /** Phone number which includes country code */
+ Phone: { input: string; output: string; }
+ /** Non-fractional signed whole numeric value between -(2^53) + 1 and 2^53 - 1 */
+ SafeInt: { input: number; output: number; }
+ /** (Positive) Satoshi amount */
+ SatAmount: { input: number; output: number; }
+ /** (Positive) amount of seconds */
+ Seconds: { input: number; output: number; }
+ /** An amount (of a currency) that can be negative (e.g. in a transaction) */
+ SignedAmount: { input: number; output: number; }
+ /** A string amount (of a currency) that can be negative (e.g. in a transaction) */
+ SignedDisplayMajorAmount: { input: string; output: string; }
+ /** Timestamp field, serialized as Unix time (the number of seconds since the Unix epoch) */
+ Timestamp: { input: number; output: number; }
+ /** A time-based one-time password */
+ TotpCode: { input: string; output: string; }
+ /** An id to be passed between set and verify for confirming totp */
+ TotpRegistrationId: { input: string; output: string; }
+ /** A secret to generate time-based one-time password */
+ TotpSecret: { input: string; output: string; }
+ /** Unique identifier of a user */
+ Username: { input: string; output: string; }
+ /** Unique identifier of a wallet */
+ WalletId: { input: string; output: string; }
+};
+
+export type Account = {
+ readonly callbackEndpoints: ReadonlyArray;
+ readonly csvTransactions: Scalars['String']['output'];
+ readonly defaultWallet: PublicWallet;
+ /** @deprecated Shifting property to 'defaultWallet.id' */
+ readonly defaultWalletId: Scalars['WalletId']['output'];
+ readonly displayCurrency: Scalars['DisplayCurrency']['output'];
+ readonly id: Scalars['ID']['output'];
+ readonly invoices?: Maybe;
+ readonly level: AccountLevel;
+ readonly limits: AccountLimits;
+ readonly notificationSettings: NotificationSettings;
+ readonly pendingIncomingTransactions: ReadonlyArray;
+ readonly realtimePrice: RealtimePrice;
+ readonly transactions?: Maybe;
+ readonly walletById: Wallet;
+ readonly wallets: ReadonlyArray;
+};
+
+
+export type AccountCsvTransactionsArgs = {
+ walletIds: ReadonlyArray;
+};
+
+
+export type AccountInvoicesArgs = {
+ after?: InputMaybe;
+ before?: InputMaybe;
+ first?: InputMaybe;
+ last?: InputMaybe;
+ walletIds?: InputMaybe>>;
+};
+
+
+export type AccountPendingIncomingTransactionsArgs = {
+ walletIds?: InputMaybe>>;
+};
+
+
+export type AccountTransactionsArgs = {
+ after?: InputMaybe;
+ before?: InputMaybe;
+ first?: InputMaybe;
+ last?: InputMaybe;
+ walletIds?: InputMaybe>>;
+};
+
+
+export type AccountWalletByIdArgs = {
+ walletId: Scalars['WalletId']['input'];
+};
+
+export type AccountDeletePayload = {
+ readonly __typename: 'AccountDeletePayload';
+ readonly errors: ReadonlyArray;
+ readonly success: Scalars['Boolean']['output'];
+};
+
+export type AccountDisableNotificationCategoryInput = {
+ readonly category: Scalars['NotificationCategory']['input'];
+ readonly channel?: InputMaybe;
+};
+
+export type AccountDisableNotificationChannelInput = {
+ readonly channel: NotificationChannel;
+};
+
+export type AccountEnableNotificationCategoryInput = {
+ readonly category: Scalars['NotificationCategory']['input'];
+ readonly channel?: InputMaybe;
+};
+
+export type AccountEnableNotificationChannelInput = {
+ readonly channel: NotificationChannel;
+};
+
+export const AccountLevel = {
+ One: 'ONE',
+ Two: 'TWO',
+ Zero: 'ZERO'
+} as const;
+
+export type AccountLevel = typeof AccountLevel[keyof typeof AccountLevel];
+export type AccountLimit = {
+ /** The rolling time interval in seconds that the limits would apply for. */
+ readonly interval?: Maybe;
+ /** The amount of cents remaining below the limit for the current 24 hour period. */
+ readonly remainingLimit?: Maybe;
+ /** The current maximum limit for a given 24 hour period. */
+ readonly totalLimit: Scalars['CentAmount']['output'];
+};
+
+export type AccountLimits = {
+ readonly __typename: 'AccountLimits';
+ /** Limits for converting between currencies among a account's own wallets. */
+ readonly convert: ReadonlyArray;
+ /** Limits for sending to other internal accounts. */
+ readonly internalSend: ReadonlyArray;
+ /** Limits for withdrawing to external onchain or lightning destinations. */
+ readonly withdrawal: ReadonlyArray;
+};
+
+export type AccountUpdateDefaultWalletIdInput = {
+ readonly walletId: Scalars['WalletId']['input'];
+};
+
+export type AccountUpdateDefaultWalletIdPayload = {
+ readonly __typename: 'AccountUpdateDefaultWalletIdPayload';
+ readonly account?: Maybe;
+ readonly errors: ReadonlyArray;
+};
+
+export type AccountUpdateDisplayCurrencyInput = {
+ readonly currency: Scalars['DisplayCurrency']['input'];
+};
+
+export type AccountUpdateDisplayCurrencyPayload = {
+ readonly __typename: 'AccountUpdateDisplayCurrencyPayload';
+ readonly account?: Maybe;
+ readonly errors: ReadonlyArray;
+};
+
+export type AccountUpdateNotificationSettingsPayload = {
+ readonly __typename: 'AccountUpdateNotificationSettingsPayload';
+ readonly account?: Maybe;
+ readonly errors: ReadonlyArray;
+};
+
+export type AuthTokenPayload = {
+ readonly __typename: 'AuthTokenPayload';
+ readonly authToken?: Maybe;
+ readonly errors: ReadonlyArray;
+ readonly totpRequired?: Maybe;
+};
+
+/** A wallet belonging to an account which contains a BTC balance and a list of transactions. */
+export type BtcWallet = Wallet & {
+ readonly __typename: 'BTCWallet';
+ readonly accountId: Scalars['ID']['output'];
+ /** A balance stored in BTC. */
+ readonly balance: Scalars['SignedAmount']['output'];
+ readonly id: Scalars['ID']['output'];
+ readonly invoiceByPaymentHash: Invoice;
+ /** A list of all invoices associated with walletIds optionally passed. */
+ readonly invoices?: Maybe;
+ /** An unconfirmed incoming onchain balance. */
+ readonly pendingIncomingBalance: Scalars['SignedAmount']['output'];
+ readonly pendingIncomingTransactions: ReadonlyArray;
+ readonly pendingIncomingTransactionsByAddress: ReadonlyArray;
+ readonly transactionById: Transaction;
+ /** A list of BTC transactions associated with this wallet. */
+ readonly transactions?: Maybe;
+ readonly transactionsByAddress?: Maybe;
+ readonly transactionsByPaymentHash: ReadonlyArray;
+ readonly walletCurrency: WalletCurrency;
+};
+
+
+/** A wallet belonging to an account which contains a BTC balance and a list of transactions. */
+export type BtcWalletInvoiceByPaymentHashArgs = {
+ paymentHash: Scalars['PaymentHash']['input'];
+};
+
+
+/** A wallet belonging to an account which contains a BTC balance and a list of transactions. */
+export type BtcWalletInvoicesArgs = {
+ after?: InputMaybe;
+ before?: InputMaybe;
+ first?: InputMaybe;
+ last?: InputMaybe;
+};
+
+
+/** A wallet belonging to an account which contains a BTC balance and a list of transactions. */
+export type BtcWalletPendingIncomingTransactionsByAddressArgs = {
+ address: Scalars['OnChainAddress']['input'];
+};
+
+
+/** A wallet belonging to an account which contains a BTC balance and a list of transactions. */
+export type BtcWalletTransactionByIdArgs = {
+ transactionId: Scalars['ID']['input'];
+};
+
+
+/** A wallet belonging to an account which contains a BTC balance and a list of transactions. */
+export type BtcWalletTransactionsArgs = {
+ after?: InputMaybe;
+ before?: InputMaybe;
+ first?: InputMaybe;
+ last?: InputMaybe;
+};
+
+
+/** A wallet belonging to an account which contains a BTC balance and a list of transactions. */
+export type BtcWalletTransactionsByAddressArgs = {
+ address: Scalars['OnChainAddress']['input'];
+ after?: InputMaybe;
+ before?: InputMaybe;
+ first?: InputMaybe;
+ last?: InputMaybe;
+};
+
+
+/** A wallet belonging to an account which contains a BTC balance and a list of transactions. */
+export type BtcWalletTransactionsByPaymentHashArgs = {
+ paymentHash: Scalars['PaymentHash']['input'];
+};
+
+export type BuildInformation = {
+ readonly __typename: 'BuildInformation';
+ readonly commitHash?: Maybe;
+ readonly helmRevision?: Maybe;
+};
+
+export type CallbackEndpoint = {
+ readonly __typename: 'CallbackEndpoint';
+ readonly id: Scalars['EndpointId']['output'];
+ readonly url: Scalars['EndpointUrl']['output'];
+};
+
+export type CallbackEndpointAddInput = {
+ /** callback endpoint to be called */
+ readonly url: Scalars['EndpointUrl']['input'];
+};
+
+export type CallbackEndpointAddPayload = {
+ readonly __typename: 'CallbackEndpointAddPayload';
+ readonly errors: ReadonlyArray;
+ readonly id?: Maybe;
+};
+
+export type CallbackEndpointDeleteInput = {
+ readonly id: Scalars['EndpointId']['input'];
+};
+
+export type CaptchaCreateChallengePayload = {
+ readonly __typename: 'CaptchaCreateChallengePayload';
+ readonly errors: ReadonlyArray;
+ readonly result?: Maybe;
+};
+
+export type CaptchaCreateChallengeResult = {
+ readonly __typename: 'CaptchaCreateChallengeResult';
+ readonly challengeCode: Scalars['String']['output'];
+ readonly failbackMode: Scalars['Boolean']['output'];
+ readonly id: Scalars['String']['output'];
+ readonly newCaptcha: Scalars['Boolean']['output'];
+};
+
+export type CaptchaRequestAuthCodeInput = {
+ readonly challengeCode: Scalars['String']['input'];
+ readonly channel?: InputMaybe;
+ readonly phone: Scalars['Phone']['input'];
+ readonly secCode: Scalars['String']['input'];
+ readonly validationCode: Scalars['String']['input'];
+};
+
+export type CentAmountPayload = {
+ readonly __typename: 'CentAmountPayload';
+ readonly amount?: Maybe;
+ readonly errors: ReadonlyArray;
+};
+
+export type ConsumerAccount = Account & {
+ readonly __typename: 'ConsumerAccount';
+ readonly callbackEndpoints: ReadonlyArray;
+ /** return CSV stream, base64 encoded, of the list of transactions in the wallet */
+ readonly csvTransactions: Scalars['String']['output'];
+ readonly defaultWallet: PublicWallet;
+ readonly defaultWalletId: Scalars['WalletId']['output'];
+ readonly displayCurrency: Scalars['DisplayCurrency']['output'];
+ readonly id: Scalars['ID']['output'];
+ /** A list of all invoices associated with walletIds optionally passed. */
+ readonly invoices?: Maybe;
+ readonly level: AccountLevel;
+ readonly limits: AccountLimits;
+ readonly notificationSettings: NotificationSettings;
+ readonly pendingIncomingTransactions: ReadonlyArray;
+ /** List the quiz questions of the consumer account */
+ readonly quiz: ReadonlyArray;
+ readonly realtimePrice: RealtimePrice;
+ /** A list of all transactions associated with walletIds optionally passed. */
+ readonly transactions?: Maybe;
+ readonly walletById: Wallet;
+ readonly wallets: ReadonlyArray;
+};
+
+
+export type ConsumerAccountCsvTransactionsArgs = {
+ walletIds: ReadonlyArray;
+};
+
+
+export type ConsumerAccountInvoicesArgs = {
+ after?: InputMaybe;
+ before?: InputMaybe;
+ first?: InputMaybe;
+ last?: InputMaybe;
+ walletIds?: InputMaybe>>;
+};
+
+
+export type ConsumerAccountPendingIncomingTransactionsArgs = {
+ walletIds?: InputMaybe>>;
+};
+
+
+export type ConsumerAccountTransactionsArgs = {
+ after?: InputMaybe;
+ before?: InputMaybe;
+ first?: InputMaybe;
+ last?: InputMaybe;
+ walletIds?: InputMaybe>>;
+};
+
+
+export type ConsumerAccountWalletByIdArgs = {
+ walletId: Scalars['WalletId']['input'];
+};
+
+export type Coordinates = {
+ readonly __typename: 'Coordinates';
+ readonly latitude: Scalars['Float']['output'];
+ readonly longitude: Scalars['Float']['output'];
+};
+
+export type Country = {
+ readonly __typename: 'Country';
+ readonly id: Scalars['CountryCode']['output'];
+ readonly supportedAuthChannels: ReadonlyArray;
+};
+
+export type Currency = {
+ readonly __typename: 'Currency';
+ readonly flag: Scalars['String']['output'];
+ readonly fractionDigits: Scalars['Int']['output'];
+ readonly id: Scalars['ID']['output'];
+ readonly name: Scalars['String']['output'];
+ readonly symbol: Scalars['String']['output'];
+};
+
+export type DepositFeesInformation = {
+ readonly __typename: 'DepositFeesInformation';
+ readonly minBankFee: Scalars['String']['output'];
+ /** below this amount minBankFee will be charged */
+ readonly minBankFeeThreshold: Scalars['String']['output'];
+ /** ratio to charge as basis points above minBankFeeThreshold amount */
+ readonly ratio: Scalars['String']['output'];
+};
+
+export type DeviceNotificationTokenCreateInput = {
+ readonly deviceToken: Scalars['String']['input'];
+};
+
+export type Email = {
+ readonly __typename: 'Email';
+ readonly address?: Maybe;
+ readonly verified?: Maybe;
+};
+
+export type Error = {
+ readonly code?: Maybe;
+ readonly message: Scalars['String']['output'];
+ readonly path?: Maybe>>;
+};
+
+export const ExchangeCurrencyUnit = {
+ Btcsat: 'BTCSAT',
+ Usdcent: 'USDCENT'
+} as const;
+
+export type ExchangeCurrencyUnit = typeof ExchangeCurrencyUnit[keyof typeof ExchangeCurrencyUnit];
+export type FeedbackSubmitInput = {
+ readonly feedback: Scalars['Feedback']['input'];
+};
+
+export type FeesInformation = {
+ readonly __typename: 'FeesInformation';
+ readonly deposit: DepositFeesInformation;
+};
+
+/** Provides global settings for the application which might have an impact for the user. */
+export type Globals = {
+ readonly __typename: 'Globals';
+ readonly buildInformation: BuildInformation;
+ readonly feesInformation: FeesInformation;
+ /** The domain name for lightning addresses accepted by this Galoy instance */
+ readonly lightningAddressDomain: Scalars['String']['output'];
+ readonly lightningAddressDomainAliases: ReadonlyArray;
+ /** Which network (mainnet, testnet, regtest, signet) this instance is running on. */
+ readonly network: Network;
+ /**
+ * A list of public keys for the running lightning nodes.
+ * This can be used to know if an invoice belongs to one of our nodes.
+ */
+ readonly nodesIds: ReadonlyArray;
+ /** A list of countries and their supported auth channels */
+ readonly supportedCountries: ReadonlyArray;
+};
+
+export type GraphQlApplicationError = Error & {
+ readonly __typename: 'GraphQLApplicationError';
+ readonly code?: Maybe;
+ readonly message: Scalars['String']['output'];
+ readonly path?: Maybe>>;
+};
+
+export type InitiationVia = InitiationViaIntraLedger | InitiationViaLn | InitiationViaOnChain;
+
+export type InitiationViaIntraLedger = {
+ readonly __typename: 'InitiationViaIntraLedger';
+ readonly counterPartyUsername?: Maybe;
+ readonly counterPartyWalletId?: Maybe;
+};
+
+export type InitiationViaLn = {
+ readonly __typename: 'InitiationViaLn';
+ readonly paymentHash: Scalars['PaymentHash']['output'];
+ /** Bolt11 invoice */
+ readonly paymentRequest: Scalars['LnPaymentRequest']['output'];
+};
+
+export type InitiationViaOnChain = {
+ readonly __typename: 'InitiationViaOnChain';
+ readonly address: Scalars['OnChainAddress']['output'];
+};
+
+export type IntraLedgerPaymentSendInput = {
+ /** Amount in satoshis. */
+ readonly amount: Scalars['SatAmount']['input'];
+ /** Optional memo to be attached to the payment. */
+ readonly memo?: InputMaybe;
+ readonly recipientWalletId: Scalars['WalletId']['input'];
+ /** The wallet ID of the sender. */
+ readonly walletId: Scalars['WalletId']['input'];
+};
+
+export type IntraLedgerUpdate = {
+ readonly __typename: 'IntraLedgerUpdate';
+ /** @deprecated Deprecated in favor of transaction */
+ readonly amount: Scalars['SatAmount']['output'];
+ /** @deprecated Deprecated in favor of transaction */
+ readonly displayCurrencyPerSat: Scalars['Float']['output'];
+ readonly transaction: Transaction;
+ readonly txNotificationType: TxNotificationType;
+ /** @deprecated updated over displayCurrencyPerSat */
+ readonly usdPerSat: Scalars['Float']['output'];
+ /** @deprecated Deprecated in favor of transaction */
+ readonly walletId: Scalars['WalletId']['output'];
+};
+
+export type IntraLedgerUsdPaymentSendInput = {
+ /** Amount in cents. */
+ readonly amount: Scalars['CentAmount']['input'];
+ /** Optional memo to be attached to the payment. */
+ readonly memo?: InputMaybe;
+ readonly recipientWalletId: Scalars['WalletId']['input'];
+ /** The wallet ID of the sender. */
+ readonly walletId: Scalars['WalletId']['input'];
+};
+
+/** A lightning invoice. */
+export type Invoice = {
+ readonly createdAt: Scalars['Timestamp']['output'];
+ /** The payment hash of the lightning invoice. */
+ readonly paymentHash: Scalars['PaymentHash']['output'];
+ /** The bolt11 invoice to be paid. */
+ readonly paymentRequest: Scalars['LnPaymentRequest']['output'];
+ /** The payment secret of the lightning invoice. This is not the preimage of the payment hash. */
+ readonly paymentSecret: Scalars['LnPaymentSecret']['output'];
+ /** The payment status of the invoice. */
+ readonly paymentStatus: InvoicePaymentStatus;
+};
+
+/** A connection to a list of items. */
+export type InvoiceConnection = {
+ readonly __typename: 'InvoiceConnection';
+ /** A list of edges. */
+ readonly edges?: Maybe>;
+ /** Information to aid in pagination. */
+ readonly pageInfo: PageInfo;
+};
+
+/** An edge in a connection. */
+export type InvoiceEdge = {
+ readonly __typename: 'InvoiceEdge';
+ /** A cursor for use in pagination */
+ readonly cursor: Scalars['String']['output'];
+ /** The item at the end of the edge */
+ readonly node: Invoice;
+};
+
+export const InvoicePaymentStatus = {
+ Expired: 'EXPIRED',
+ Paid: 'PAID',
+ Pending: 'PENDING'
+} as const;
+
+export type InvoicePaymentStatus = typeof InvoicePaymentStatus[keyof typeof InvoicePaymentStatus];
+export type LnAddressPaymentSendInput = {
+ /** Amount in satoshis. */
+ readonly amount: Scalars['SatAmount']['input'];
+ /** Lightning address to send to. */
+ readonly lnAddress: Scalars['String']['input'];
+ /** Wallet ID to send bitcoin from. */
+ readonly walletId: Scalars['WalletId']['input'];
+};
+
+export type LnInvoice = Invoice & {
+ readonly __typename: 'LnInvoice';
+ readonly createdAt: Scalars['Timestamp']['output'];
+ readonly paymentHash: Scalars['PaymentHash']['output'];
+ readonly paymentRequest: Scalars['LnPaymentRequest']['output'];
+ readonly paymentSecret: Scalars['LnPaymentSecret']['output'];
+ readonly paymentStatus: InvoicePaymentStatus;
+ readonly satoshis: Scalars['SatAmount']['output'];
+};
+
+export type LnInvoiceCreateInput = {
+ /** Amount in satoshis. */
+ readonly amount: Scalars['SatAmount']['input'];
+ /** Optional invoice expiration time in minutes. */
+ readonly expiresIn?: InputMaybe;
+ /** Optional memo for the lightning invoice. */
+ readonly memo?: InputMaybe;
+ /** Wallet ID for a BTC wallet belonging to the current account. */
+ readonly walletId: Scalars['WalletId']['input'];
+};
+
+export type LnInvoiceCreateOnBehalfOfRecipientInput = {
+ /** Amount in satoshis. */
+ readonly amount: Scalars['SatAmount']['input'];
+ readonly descriptionHash?: InputMaybe;
+ /** Optional invoice expiration time in minutes. */
+ readonly expiresIn?: InputMaybe;
+ /** Optional memo for the lightning invoice. */
+ readonly memo?: InputMaybe;
+ /** Wallet ID for a BTC wallet which belongs to any account. */
+ readonly recipientWalletId: Scalars['WalletId']['input'];
+};
+
+export type LnInvoiceFeeProbeInput = {
+ readonly paymentRequest: Scalars['LnPaymentRequest']['input'];
+ readonly walletId: Scalars['WalletId']['input'];
+};
+
+export type LnInvoicePayload = {
+ readonly __typename: 'LnInvoicePayload';
+ readonly errors: ReadonlyArray;
+ readonly invoice?: Maybe;
+};
+
+export type LnInvoicePaymentInput = {
+ /** Optional memo to associate with the lightning invoice. */
+ readonly memo?: InputMaybe;
+ /** Payment request representing the invoice which is being paid. */
+ readonly paymentRequest: Scalars['LnPaymentRequest']['input'];
+ /** Wallet ID with sufficient balance to cover amount of invoice. Must belong to the account of the current user. */
+ readonly walletId: Scalars['WalletId']['input'];
+};
+
+export type LnInvoicePaymentStatusInput = {
+ readonly paymentRequest: Scalars['LnPaymentRequest']['input'];
+};
+
+export type LnInvoicePaymentStatusPayload = {
+ readonly __typename: 'LnInvoicePaymentStatusPayload';
+ readonly errors: ReadonlyArray;
+ readonly status?: Maybe;
+};
+
+export type LnNoAmountInvoice = Invoice & {
+ readonly __typename: 'LnNoAmountInvoice';
+ readonly createdAt: Scalars['Timestamp']['output'];
+ readonly paymentHash: Scalars['PaymentHash']['output'];
+ readonly paymentRequest: Scalars['LnPaymentRequest']['output'];
+ readonly paymentSecret: Scalars['LnPaymentSecret']['output'];
+ readonly paymentStatus: InvoicePaymentStatus;
+};
+
+export type LnNoAmountInvoiceCreateInput = {
+ /** Optional invoice expiration time in minutes. */
+ readonly expiresIn?: InputMaybe;
+ /** Optional memo for the lightning invoice. */
+ readonly memo?: InputMaybe;
+ /** ID for either a USD or BTC wallet belonging to the account of the current user. */
+ readonly walletId: Scalars['WalletId']['input'];
+};
+
+export type LnNoAmountInvoiceCreateOnBehalfOfRecipientInput = {
+ /** Optional invoice expiration time in minutes. */
+ readonly expiresIn?: InputMaybe;
+ /** Optional memo for the lightning invoice. */
+ readonly memo?: InputMaybe;
+ /** ID for either a USD or BTC wallet which belongs to the account of any user. */
+ readonly recipientWalletId: Scalars['WalletId']['input'];
+};
+
+export type LnNoAmountInvoiceFeeProbeInput = {
+ readonly amount: Scalars['SatAmount']['input'];
+ readonly paymentRequest: Scalars['LnPaymentRequest']['input'];
+ readonly walletId: Scalars['WalletId']['input'];
+};
+
+export type LnNoAmountInvoicePayload = {
+ readonly __typename: 'LnNoAmountInvoicePayload';
+ readonly errors: ReadonlyArray;
+ readonly invoice?: Maybe;
+};
+
+export type LnNoAmountInvoicePaymentInput = {
+ /** Amount to pay in satoshis. */
+ readonly amount: Scalars['SatAmount']['input'];
+ /** Optional memo to associate with the lightning invoice. */
+ readonly memo?: InputMaybe;
+ /** Payment request representing the invoice which is being paid. */
+ readonly paymentRequest: Scalars['LnPaymentRequest']['input'];
+ /** Wallet ID with sufficient balance to cover amount defined in mutation request. Must belong to the account of the current user. */
+ readonly walletId: Scalars['WalletId']['input'];
+};
+
+export type LnNoAmountUsdInvoiceFeeProbeInput = {
+ readonly amount: Scalars['CentAmount']['input'];
+ readonly paymentRequest: Scalars['LnPaymentRequest']['input'];
+ readonly walletId: Scalars['WalletId']['input'];
+};
+
+export type LnNoAmountUsdInvoicePaymentInput = {
+ /** Amount to pay in USD cents. */
+ readonly amount: Scalars['CentAmount']['input'];
+ /** Optional memo to associate with the lightning invoice. */
+ readonly memo?: InputMaybe;
+ /** Payment request representing the invoice which is being paid. */
+ readonly paymentRequest: Scalars['LnPaymentRequest']['input'];
+ /** Wallet ID with sufficient balance to cover amount defined in mutation request. Must belong to the account of the current user. */
+ readonly walletId: Scalars['WalletId']['input'];
+};
+
+export type LnUpdate = {
+ readonly __typename: 'LnUpdate';
+ /** @deprecated Deprecated in favor of transaction */
+ readonly paymentHash: Scalars['PaymentHash']['output'];
+ readonly status: InvoicePaymentStatus;
+ readonly transaction: Transaction;
+ /** @deprecated Deprecated in favor of transaction */
+ readonly walletId: Scalars['WalletId']['output'];
+};
+
+export type LnUsdInvoiceBtcDenominatedCreateOnBehalfOfRecipientInput = {
+ /** Amount in satoshis. */
+ readonly amount: Scalars['SatAmount']['input'];
+ readonly descriptionHash?: InputMaybe;
+ /** Optional invoice expiration time in minutes. */
+ readonly expiresIn?: InputMaybe;
+ /** Optional memo for the lightning invoice. Acts as a note to the recipient. */
+ readonly memo?: InputMaybe;
+ /** Wallet ID for a USD wallet which belongs to the account of any user. */
+ readonly recipientWalletId: Scalars['WalletId']['input'];
+};
+
+export type LnUsdInvoiceCreateInput = {
+ /** Amount in USD cents. */
+ readonly amount: Scalars['CentAmount']['input'];
+ /** Optional invoice expiration time in minutes. */
+ readonly expiresIn?: InputMaybe;
+ /** Optional memo for the lightning invoice. */
+ readonly memo?: InputMaybe;
+ /** Wallet ID for a USD wallet belonging to the current user. */
+ readonly walletId: Scalars['WalletId']['input'];
+};
+
+export type LnUsdInvoiceCreateOnBehalfOfRecipientInput = {
+ /** Amount in USD cents. */
+ readonly amount: Scalars['CentAmount']['input'];
+ readonly descriptionHash?: InputMaybe;
+ /** Optional invoice expiration time in minutes. */
+ readonly expiresIn?: InputMaybe;
+ /** Optional memo for the lightning invoice. Acts as a note to the recipient. */
+ readonly memo?: InputMaybe;
+ /** Wallet ID for a USD wallet which belongs to the account of any user. */
+ readonly recipientWalletId: Scalars['WalletId']['input'];
+};
+
+export type LnUsdInvoiceFeeProbeInput = {
+ readonly paymentRequest: Scalars['LnPaymentRequest']['input'];
+ readonly walletId: Scalars['WalletId']['input'];
+};
+
+export type LnurlPaymentSendInput = {
+ /** Amount in satoshis. */
+ readonly amount: Scalars['SatAmount']['input'];
+ /** Lnurl string to send to. */
+ readonly lnurl: Scalars['String']['input'];
+ /** Wallet ID to send bitcoin from. */
+ readonly walletId: Scalars['WalletId']['input'];
+};
+
+export type MapInfo = {
+ readonly __typename: 'MapInfo';
+ readonly coordinates: Coordinates;
+ readonly title: Scalars['String']['output'];
+};
+
+export type MapMarker = {
+ readonly __typename: 'MapMarker';
+ readonly mapInfo: MapInfo;
+ readonly username: Scalars['Username']['output'];
+};
+
+export type Merchant = {
+ readonly __typename: 'Merchant';
+ /** GPS coordinates for the merchant that can be used to place the related business on a map */
+ readonly coordinates: Coordinates;
+ readonly createdAt: Scalars['Timestamp']['output'];
+ readonly id: Scalars['ID']['output'];
+ readonly title: Scalars['String']['output'];
+ /** The username of the merchant */
+ readonly username: Scalars['Username']['output'];
+ /** Whether the merchant has been validated */
+ readonly validated: Scalars['Boolean']['output'];
+};
+
+export type MerchantMapSuggestInput = {
+ readonly latitude: Scalars['Float']['input'];
+ readonly longitude: Scalars['Float']['input'];
+ readonly title: Scalars['String']['input'];
+ readonly username: Scalars['Username']['input'];
+};
+
+export type MerchantPayload = {
+ readonly __typename: 'MerchantPayload';
+ readonly errors: ReadonlyArray;
+ readonly merchant?: Maybe;
+};
+
+export type MobileVersions = {
+ readonly __typename: 'MobileVersions';
+ readonly currentSupported: Scalars['Int']['output'];
+ readonly minSupported: Scalars['Int']['output'];
+ readonly platform: Scalars['String']['output'];
+};
+
+export type Mutation = {
+ readonly __typename: 'Mutation';
+ readonly accountDelete: AccountDeletePayload;
+ readonly accountDisableNotificationCategory: AccountUpdateNotificationSettingsPayload;
+ readonly accountDisableNotificationChannel: AccountUpdateNotificationSettingsPayload;
+ readonly accountEnableNotificationCategory: AccountUpdateNotificationSettingsPayload;
+ readonly accountEnableNotificationChannel: AccountUpdateNotificationSettingsPayload;
+ readonly accountUpdateDefaultWalletId: AccountUpdateDefaultWalletIdPayload;
+ readonly accountUpdateDisplayCurrency: AccountUpdateDisplayCurrencyPayload;
+ readonly callbackEndpointAdd: CallbackEndpointAddPayload;
+ readonly callbackEndpointDelete: SuccessPayload;
+ readonly captchaCreateChallenge: CaptchaCreateChallengePayload;
+ readonly captchaRequestAuthCode: SuccessPayload;
+ readonly deviceNotificationTokenCreate: SuccessPayload;
+ readonly feedbackSubmit: SuccessPayload;
+ /**
+ * Actions a payment which is internal to the ledger e.g. it does
+ * not use onchain/lightning. Returns payment status (success,
+ * failed, pending, already_paid).
+ */
+ readonly intraLedgerPaymentSend: PaymentSendPayload;
+ /**
+ * Actions a payment which is internal to the ledger e.g. it does
+ * not use onchain/lightning. Returns payment status (success,
+ * failed, pending, already_paid).
+ */
+ readonly intraLedgerUsdPaymentSend: PaymentSendPayload;
+ /** Sends a payment to a lightning address. */
+ readonly lnAddressPaymentSend: PaymentSendPayload;
+ /**
+ * Returns a lightning invoice for an associated wallet.
+ * When invoice is paid the value will be credited to a BTC wallet.
+ * Expires after 'expiresIn' or 24 hours.
+ */
+ readonly lnInvoiceCreate: LnInvoicePayload;
+ /**
+ * Returns a lightning invoice for an associated wallet.
+ * When invoice is paid the value will be credited to a BTC wallet.
+ * Expires after 'expiresIn' or 24 hours.
+ */
+ readonly lnInvoiceCreateOnBehalfOfRecipient: LnInvoicePayload;
+ readonly lnInvoiceFeeProbe: SatAmountPayload;
+ /**
+ * Pay a lightning invoice using a balance from a wallet which is owned by the account of the current user.
+ * Provided wallet can be USD or BTC and must have sufficient balance to cover amount in lightning invoice.
+ * Returns payment status (success, failed, pending, already_paid).
+ */
+ readonly lnInvoicePaymentSend: PaymentSendPayload;
+ /**
+ * Returns a lightning invoice for an associated wallet.
+ * Can be used to receive any supported currency value (currently USD or BTC).
+ * Expires after 'expiresIn' or 24 hours for BTC invoices or 5 minutes for USD invoices.
+ */
+ readonly lnNoAmountInvoiceCreate: LnNoAmountInvoicePayload;
+ /**
+ * Returns a lightning invoice for an associated wallet.
+ * Can be used to receive any supported currency value (currently USD or BTC).
+ * Expires after 'expiresIn' or 24 hours for BTC invoices or 5 minutes for USD invoices.
+ */
+ readonly lnNoAmountInvoiceCreateOnBehalfOfRecipient: LnNoAmountInvoicePayload;
+ readonly lnNoAmountInvoiceFeeProbe: SatAmountPayload;
+ /**
+ * Pay a lightning invoice using a balance from a wallet which is owned by the account of the current user.
+ * Provided wallet must be BTC and must have sufficient balance to cover amount specified in mutation request.
+ * Returns payment status (success, failed, pending, already_paid).
+ */
+ readonly lnNoAmountInvoicePaymentSend: PaymentSendPayload;
+ readonly lnNoAmountUsdInvoiceFeeProbe: CentAmountPayload;
+ /**
+ * Pay a lightning invoice using a balance from a wallet which is owned by the account of the current user.
+ * Provided wallet must be USD and have sufficient balance to cover amount specified in mutation request.
+ * Returns payment status (success, failed, pending, already_paid).
+ */
+ readonly lnNoAmountUsdInvoicePaymentSend: PaymentSendPayload;
+ /**
+ * Returns a lightning invoice denominated in satoshis for an associated wallet.
+ * When invoice is paid the equivalent value at invoice creation will be credited to a USD wallet.
+ * Expires after 'expiresIn' or 5 minutes (short expiry time because there is a USD/BTC exchange rate
+ * associated with the amount).
+ */
+ readonly lnUsdInvoiceBtcDenominatedCreateOnBehalfOfRecipient: LnInvoicePayload;
+ /**
+ * Returns a lightning invoice denominated in satoshis for an associated wallet.
+ * When invoice is paid the equivalent value at invoice creation will be credited to a USD wallet.
+ * Expires after 'expiresIn' or 5 minutes (short expiry time because there is a USD/BTC exchange rate
+ * associated with the amount).
+ */
+ readonly lnUsdInvoiceCreate: LnInvoicePayload;
+ /**
+ * Returns a lightning invoice denominated in satoshis for an associated wallet.
+ * When invoice is paid the equivalent value at invoice creation will be credited to a USD wallet.
+ * Expires after 'expiresIn' or 5 minutes (short expiry time because there is a USD/BTC exchange rate
+ * associated with the amount).
+ */
+ readonly lnUsdInvoiceCreateOnBehalfOfRecipient: LnInvoicePayload;
+ readonly lnUsdInvoiceFeeProbe: SatAmountPayload;
+ /** Sends a payment to a lightning address. */
+ readonly lnurlPaymentSend: PaymentSendPayload;
+ readonly merchantMapSuggest: MerchantPayload;
+ readonly onChainAddressCreate: OnChainAddressPayload;
+ readonly onChainAddressCurrent: OnChainAddressPayload;
+ readonly onChainPaymentSend: PaymentSendPayload;
+ readonly onChainPaymentSendAll: PaymentSendPayload;
+ readonly onChainUsdPaymentSend: PaymentSendPayload;
+ readonly onChainUsdPaymentSendAsBtcDenominated: PaymentSendPayload;
+ readonly quizClaim: QuizClaimPayload;
+ /** @deprecated Use quizClaim instead */
+ readonly quizCompleted: QuizCompletedPayload;
+ /** @deprecated will be moved to AccountContact */
+ readonly userContactUpdateAlias: UserContactUpdateAliasPayload;
+ readonly userEmailDelete: UserEmailDeletePayload;
+ readonly userEmailRegistrationInitiate: UserEmailRegistrationInitiatePayload;
+ readonly userEmailRegistrationValidate: UserEmailRegistrationValidatePayload;
+ readonly userLogin: AuthTokenPayload;
+ readonly userLoginUpgrade: UpgradePayload;
+ readonly userLogout: SuccessPayload;
+ readonly userPhoneDelete: UserPhoneDeletePayload;
+ readonly userPhoneRegistrationInitiate: SuccessPayload;
+ readonly userPhoneRegistrationValidate: UserPhoneRegistrationValidatePayload;
+ readonly userTotpDelete: UserTotpDeletePayload;
+ readonly userTotpRegistrationInitiate: UserTotpRegistrationInitiatePayload;
+ readonly userTotpRegistrationValidate: UserTotpRegistrationValidatePayload;
+ readonly userUpdateLanguage: UserUpdateLanguagePayload;
+ /** @deprecated Username will be moved to @Handle in Accounts. Also SetUsername naming should be used instead of UpdateUsername to reflect the idempotency of Handles */
+ readonly userUpdateUsername: UserUpdateUsernamePayload;
+};
+
+
+export type MutationAccountDisableNotificationCategoryArgs = {
+ input: AccountDisableNotificationCategoryInput;
+};
+
+
+export type MutationAccountDisableNotificationChannelArgs = {
+ input: AccountDisableNotificationChannelInput;
+};
+
+
+export type MutationAccountEnableNotificationCategoryArgs = {
+ input: AccountEnableNotificationCategoryInput;
+};
+
+
+export type MutationAccountEnableNotificationChannelArgs = {
+ input: AccountEnableNotificationChannelInput;
+};
+
+
+export type MutationAccountUpdateDefaultWalletIdArgs = {
+ input: AccountUpdateDefaultWalletIdInput;
+};
+
+
+export type MutationAccountUpdateDisplayCurrencyArgs = {
+ input: AccountUpdateDisplayCurrencyInput;
+};
+
+
+export type MutationCallbackEndpointAddArgs = {
+ input: CallbackEndpointAddInput;
+};
+
+
+export type MutationCallbackEndpointDeleteArgs = {
+ input: CallbackEndpointDeleteInput;
+};
+
+
+export type MutationCaptchaRequestAuthCodeArgs = {
+ input: CaptchaRequestAuthCodeInput;
+};
+
+
+export type MutationDeviceNotificationTokenCreateArgs = {
+ input: DeviceNotificationTokenCreateInput;
+};
+
+
+export type MutationFeedbackSubmitArgs = {
+ input: FeedbackSubmitInput;
+};
+
+
+export type MutationIntraLedgerPaymentSendArgs = {
+ input: IntraLedgerPaymentSendInput;
+};
+
+
+export type MutationIntraLedgerUsdPaymentSendArgs = {
+ input: IntraLedgerUsdPaymentSendInput;
+};
+
+
+export type MutationLnAddressPaymentSendArgs = {
+ input: LnAddressPaymentSendInput;
+};
+
+
+export type MutationLnInvoiceCreateArgs = {
+ input: LnInvoiceCreateInput;
+};
+
+
+export type MutationLnInvoiceCreateOnBehalfOfRecipientArgs = {
+ input: LnInvoiceCreateOnBehalfOfRecipientInput;
+};
+
+
+export type MutationLnInvoiceFeeProbeArgs = {
+ input: LnInvoiceFeeProbeInput;
+};
+
+
+export type MutationLnInvoicePaymentSendArgs = {
+ input: LnInvoicePaymentInput;
+};
+
+
+export type MutationLnNoAmountInvoiceCreateArgs = {
+ input: LnNoAmountInvoiceCreateInput;
+};
+
+
+export type MutationLnNoAmountInvoiceCreateOnBehalfOfRecipientArgs = {
+ input: LnNoAmountInvoiceCreateOnBehalfOfRecipientInput;
+};
+
+
+export type MutationLnNoAmountInvoiceFeeProbeArgs = {
+ input: LnNoAmountInvoiceFeeProbeInput;
+};
+
+
+export type MutationLnNoAmountInvoicePaymentSendArgs = {
+ input: LnNoAmountInvoicePaymentInput;
+};
+
+
+export type MutationLnNoAmountUsdInvoiceFeeProbeArgs = {
+ input: LnNoAmountUsdInvoiceFeeProbeInput;
+};
+
+
+export type MutationLnNoAmountUsdInvoicePaymentSendArgs = {
+ input: LnNoAmountUsdInvoicePaymentInput;
+};
+
+
+export type MutationLnUsdInvoiceBtcDenominatedCreateOnBehalfOfRecipientArgs = {
+ input: LnUsdInvoiceBtcDenominatedCreateOnBehalfOfRecipientInput;
+};
+
+
+export type MutationLnUsdInvoiceCreateArgs = {
+ input: LnUsdInvoiceCreateInput;
+};
+
+
+export type MutationLnUsdInvoiceCreateOnBehalfOfRecipientArgs = {
+ input: LnUsdInvoiceCreateOnBehalfOfRecipientInput;
+};
+
+
+export type MutationLnUsdInvoiceFeeProbeArgs = {
+ input: LnUsdInvoiceFeeProbeInput;
+};
+
+
+export type MutationLnurlPaymentSendArgs = {
+ input: LnurlPaymentSendInput;
+};
+
+
+export type MutationMerchantMapSuggestArgs = {
+ input: MerchantMapSuggestInput;
+};
+
+
+export type MutationOnChainAddressCreateArgs = {
+ input: OnChainAddressCreateInput;
+};
+
+
+export type MutationOnChainAddressCurrentArgs = {
+ input: OnChainAddressCurrentInput;
+};
+
+
+export type MutationOnChainPaymentSendArgs = {
+ input: OnChainPaymentSendInput;
+};
+
+
+export type MutationOnChainPaymentSendAllArgs = {
+ input: OnChainPaymentSendAllInput;
+};
+
+
+export type MutationOnChainUsdPaymentSendArgs = {
+ input: OnChainUsdPaymentSendInput;
+};
+
+
+export type MutationOnChainUsdPaymentSendAsBtcDenominatedArgs = {
+ input: OnChainUsdPaymentSendAsBtcDenominatedInput;
+};
+
+
+export type MutationQuizClaimArgs = {
+ input: QuizClaimInput;
+};
+
+
+export type MutationQuizCompletedArgs = {
+ input: QuizCompletedInput;
+};
+
+
+export type MutationUserContactUpdateAliasArgs = {
+ input: UserContactUpdateAliasInput;
+};
+
+
+export type MutationUserEmailRegistrationInitiateArgs = {
+ input: UserEmailRegistrationInitiateInput;
+};
+
+
+export type MutationUserEmailRegistrationValidateArgs = {
+ input: UserEmailRegistrationValidateInput;
+};
+
+
+export type MutationUserLoginArgs = {
+ input: UserLoginInput;
+};
+
+
+export type MutationUserLoginUpgradeArgs = {
+ input: UserLoginUpgradeInput;
+};
+
+
+export type MutationUserLogoutArgs = {
+ input?: InputMaybe;
+};
+
+
+export type MutationUserPhoneRegistrationInitiateArgs = {
+ input: UserPhoneRegistrationInitiateInput;
+};
+
+
+export type MutationUserPhoneRegistrationValidateArgs = {
+ input: UserPhoneRegistrationValidateInput;
+};
+
+
+export type MutationUserTotpRegistrationValidateArgs = {
+ input: UserTotpRegistrationValidateInput;
+};
+
+
+export type MutationUserUpdateLanguageArgs = {
+ input: UserUpdateLanguageInput;
+};
+
+
+export type MutationUserUpdateUsernameArgs = {
+ input: UserUpdateUsernameInput;
+};
+
+export type MyUpdatesPayload = {
+ readonly __typename: 'MyUpdatesPayload';
+ readonly errors: ReadonlyArray;
+ readonly me?: Maybe;
+ readonly update?: Maybe;
+};
+
+export const Network = {
+ Mainnet: 'mainnet',
+ Regtest: 'regtest',
+ Signet: 'signet',
+ Testnet: 'testnet'
+} as const;
+
+export type Network = typeof Network[keyof typeof Network];
+export const NotificationChannel = {
+ Push: 'PUSH'
+} as const;
+
+export type NotificationChannel = typeof NotificationChannel[keyof typeof NotificationChannel];
+export type NotificationChannelSettings = {
+ readonly __typename: 'NotificationChannelSettings';
+ readonly disabledCategories: ReadonlyArray;
+ readonly enabled: Scalars['Boolean']['output'];
+};
+
+export type NotificationSettings = {
+ readonly __typename: 'NotificationSettings';
+ readonly push: NotificationChannelSettings;
+};
+
+export type OnChainAddressCreateInput = {
+ readonly walletId: Scalars['WalletId']['input'];
+};
+
+export type OnChainAddressCurrentInput = {
+ readonly walletId: Scalars['WalletId']['input'];
+};
+
+export type OnChainAddressPayload = {
+ readonly __typename: 'OnChainAddressPayload';
+ readonly address?: Maybe;
+ readonly errors: ReadonlyArray;
+};
+
+export type OnChainPaymentSendAllInput = {
+ readonly address: Scalars['OnChainAddress']['input'];
+ readonly memo?: InputMaybe;
+ readonly speed?: PayoutSpeed;
+ readonly walletId: Scalars['WalletId']['input'];
+};
+
+export type OnChainPaymentSendInput = {
+ readonly address: Scalars['OnChainAddress']['input'];
+ readonly amount: Scalars['SatAmount']['input'];
+ readonly memo?: InputMaybe;
+ readonly speed?: PayoutSpeed;
+ readonly walletId: Scalars['WalletId']['input'];
+};
+
+export type OnChainTxFee = {
+ readonly __typename: 'OnChainTxFee';
+ readonly amount: Scalars['SatAmount']['output'];
+};
+
+export type OnChainUpdate = {
+ readonly __typename: 'OnChainUpdate';
+ /** @deprecated Deprecated in favor of transaction */
+ readonly amount: Scalars['SatAmount']['output'];
+ /** @deprecated Deprecated in favor of transaction */
+ readonly displayCurrencyPerSat: Scalars['Float']['output'];
+ readonly transaction: Transaction;
+ /** @deprecated Deprecated in favor of transaction */
+ readonly txHash: Scalars['OnChainTxHash']['output'];
+ readonly txNotificationType: TxNotificationType;
+ /** @deprecated updated over displayCurrencyPerSat */
+ readonly usdPerSat: Scalars['Float']['output'];
+ /** @deprecated Deprecated in favor of transaction */
+ readonly walletId: Scalars['WalletId']['output'];
+};
+
+export type OnChainUsdPaymentSendAsBtcDenominatedInput = {
+ readonly address: Scalars['OnChainAddress']['input'];
+ readonly amount: Scalars['SatAmount']['input'];
+ readonly memo?: InputMaybe;
+ readonly speed?: PayoutSpeed;
+ readonly walletId: Scalars['WalletId']['input'];
+};
+
+export type OnChainUsdPaymentSendInput = {
+ readonly address: Scalars['OnChainAddress']['input'];
+ readonly amount: Scalars['CentAmount']['input'];
+ readonly memo?: InputMaybe;
+ readonly speed?: PayoutSpeed;
+ readonly walletId: Scalars['WalletId']['input'];
+};
+
+export type OnChainUsdTxFee = {
+ readonly __typename: 'OnChainUsdTxFee';
+ readonly amount: Scalars['CentAmount']['output'];
+};
+
+export type OneDayAccountLimit = AccountLimit & {
+ readonly __typename: 'OneDayAccountLimit';
+ /** The rolling time interval value in seconds for the current 24 hour period. */
+ readonly interval?: Maybe;
+ /** The amount of cents remaining below the limit for the current 24 hour period. */
+ readonly remainingLimit?: Maybe;
+ /** The current maximum limit for a given 24 hour period. */
+ readonly totalLimit: Scalars['CentAmount']['output'];
+};
+
+/** Information about pagination in a connection. */
+export type PageInfo = {
+ readonly __typename: 'PageInfo';
+ /** When paginating forwards, the cursor to continue. */
+ readonly endCursor?: Maybe;
+ /** When paginating forwards, are there more items? */
+ readonly hasNextPage: Scalars['Boolean']['output'];
+ /** When paginating backwards, are there more items? */
+ readonly hasPreviousPage: Scalars['Boolean']['output'];
+ /** When paginating backwards, the cursor to continue. */
+ readonly startCursor?: Maybe;
+};
+
+export type PaymentSendPayload = {
+ readonly __typename: 'PaymentSendPayload';
+ readonly errors: ReadonlyArray;
+ readonly status?: Maybe;
+ readonly transaction?: Maybe;
+};
+
+export const PaymentSendResult = {
+ AlreadyPaid: 'ALREADY_PAID',
+ Failure: 'FAILURE',
+ Pending: 'PENDING',
+ Success: 'SUCCESS'
+} as const;
+
+export type PaymentSendResult = typeof PaymentSendResult[keyof typeof PaymentSendResult];
+export const PayoutSpeed = {
+ Fast: 'FAST'
+} as const;
+
+export type PayoutSpeed = typeof PayoutSpeed[keyof typeof PayoutSpeed];
+export const PhoneCodeChannelType = {
+ Sms: 'SMS',
+ Whatsapp: 'WHATSAPP'
+} as const;
+
+export type PhoneCodeChannelType = typeof PhoneCodeChannelType[keyof typeof PhoneCodeChannelType];
+/** Price amount expressed in base/offset. To calculate, use: `base / 10^offset` */
+export type Price = {
+ readonly __typename: 'Price';
+ readonly base: Scalars['SafeInt']['output'];
+ readonly currencyUnit: Scalars['String']['output'];
+ readonly formattedAmount: Scalars['String']['output'];
+ readonly offset: Scalars['Int']['output'];
+};
+
+/** The range for the X axis in the BTC price graph */
+export const PriceGraphRange = {
+ FiveYears: 'FIVE_YEARS',
+ OneDay: 'ONE_DAY',
+ OneMonth: 'ONE_MONTH',
+ OneWeek: 'ONE_WEEK',
+ OneYear: 'ONE_YEAR'
+} as const;
+
+export type PriceGraphRange = typeof PriceGraphRange[keyof typeof PriceGraphRange];
+export type PriceInput = {
+ readonly amount: Scalars['SatAmount']['input'];
+ readonly amountCurrencyUnit: ExchangeCurrencyUnit;
+ readonly priceCurrencyUnit: ExchangeCurrencyUnit;
+};
+
+export type PriceInterface = {
+ readonly base: Scalars['SafeInt']['output'];
+ /** @deprecated Deprecated due to type renaming */
+ readonly currencyUnit: Scalars['String']['output'];
+ readonly offset: Scalars['Int']['output'];
+};
+
+/** Price of 1 sat in base/offset. To calculate, use: `base / 10^offset` */
+export type PriceOfOneSatInMinorUnit = PriceInterface & {
+ readonly __typename: 'PriceOfOneSatInMinorUnit';
+ readonly base: Scalars['SafeInt']['output'];
+ /** @deprecated Deprecated due to type renaming */
+ readonly currencyUnit: Scalars['String']['output'];
+ readonly offset: Scalars['Int']['output'];
+};
+
+/** Price of 1 sat or 1 usd cent in base/offset. To calculate, use: `base / 10^offset` */
+export type PriceOfOneSettlementMinorUnitInDisplayMinorUnit = PriceInterface & {
+ readonly __typename: 'PriceOfOneSettlementMinorUnitInDisplayMinorUnit';
+ readonly base: Scalars['SafeInt']['output'];
+ /** @deprecated Deprecated due to type renaming */
+ readonly currencyUnit: Scalars['String']['output'];
+ /** @deprecated Deprecated please use `base / 10^offset` */
+ readonly formattedAmount: Scalars['String']['output'];
+ readonly offset: Scalars['Int']['output'];
+};
+
+/** Price of 1 usd cent in base/offset. To calculate, use: `base / 10^offset` */
+export type PriceOfOneUsdCentInMinorUnit = PriceInterface & {
+ readonly __typename: 'PriceOfOneUsdCentInMinorUnit';
+ readonly base: Scalars['SafeInt']['output'];
+ /** @deprecated Deprecated due to type renaming */
+ readonly currencyUnit: Scalars['String']['output'];
+ readonly offset: Scalars['Int']['output'];
+};
+
+export type PricePayload = {
+ readonly __typename: 'PricePayload';
+ readonly errors: ReadonlyArray;
+ readonly price?: Maybe;
+};
+
+export type PricePoint = {
+ readonly __typename: 'PricePoint';
+ readonly price: Price;
+ /** Unix timestamp (number of seconds elapsed since January 1, 1970 00:00:00 UTC) */
+ readonly timestamp: Scalars['Timestamp']['output'];
+};
+
+/** A public view of a generic wallet which stores value in one of our supported currencies. */
+export type PublicWallet = {
+ readonly __typename: 'PublicWallet';
+ readonly currency: WalletCurrency;
+ readonly id: Scalars['ID']['output'];
+ /** @deprecated Shifting property to 'currency' */
+ readonly walletCurrency: WalletCurrency;
+};
+
+export type Query = {
+ readonly __typename: 'Query';
+ readonly accountDefaultWallet: PublicWallet;
+ readonly btcPriceList?: Maybe>>;
+ readonly businessMapMarkers: ReadonlyArray;
+ readonly currencyList: ReadonlyArray;
+ readonly globals?: Maybe;
+ readonly lnInvoicePaymentStatus: LnInvoicePaymentStatusPayload;
+ readonly me?: Maybe;
+ readonly mobileVersions?: Maybe>>;
+ readonly onChainTxFee: OnChainTxFee;
+ readonly onChainUsdTxFee: OnChainUsdTxFee;
+ readonly onChainUsdTxFeeAsBtcDenominated: OnChainUsdTxFee;
+ /** Returns 1 Sat and 1 Usd Cent price for the given currency */
+ readonly realtimePrice: RealtimePrice;
+ /** @deprecated will be migrated to AccountDefaultWalletId */
+ readonly userDefaultWalletId: Scalars['WalletId']['output'];
+ readonly usernameAvailable?: Maybe;
+};
+
+
+export type QueryAccountDefaultWalletArgs = {
+ username: Scalars['Username']['input'];
+ walletCurrency?: InputMaybe;
+};
+
+
+export type QueryBtcPriceListArgs = {
+ range: PriceGraphRange;
+};
+
+
+export type QueryLnInvoicePaymentStatusArgs = {
+ input: LnInvoicePaymentStatusInput;
+};
+
+
+export type QueryOnChainTxFeeArgs = {
+ address: Scalars['OnChainAddress']['input'];
+ amount: Scalars['SatAmount']['input'];
+ speed?: PayoutSpeed;
+ walletId: Scalars['WalletId']['input'];
+};
+
+
+export type QueryOnChainUsdTxFeeArgs = {
+ address: Scalars['OnChainAddress']['input'];
+ amount: Scalars['CentAmount']['input'];
+ speed?: PayoutSpeed;
+ walletId: Scalars['WalletId']['input'];
+};
+
+
+export type QueryOnChainUsdTxFeeAsBtcDenominatedArgs = {
+ address: Scalars['OnChainAddress']['input'];
+ amount: Scalars['SatAmount']['input'];
+ speed?: PayoutSpeed;
+ walletId: Scalars['WalletId']['input'];
+};
+
+
+export type QueryRealtimePriceArgs = {
+ currency?: InputMaybe;
+};
+
+
+export type QueryUserDefaultWalletIdArgs = {
+ username: Scalars['Username']['input'];
+};
+
+
+export type QueryUsernameAvailableArgs = {
+ username: Scalars['Username']['input'];
+};
+
+export type Quiz = {
+ readonly __typename: 'Quiz';
+ /** The reward in Satoshis for the quiz question */
+ readonly amount: Scalars['SatAmount']['output'];
+ readonly completed: Scalars['Boolean']['output'];
+ readonly id: Scalars['ID']['output'];
+ readonly notBefore?: Maybe;
+};
+
+export type QuizClaimInput = {
+ readonly id: Scalars['ID']['input'];
+};
+
+export type QuizClaimPayload = {
+ readonly __typename: 'QuizClaimPayload';
+ readonly errors: ReadonlyArray;
+ readonly quizzes: ReadonlyArray;
+};
+
+export type QuizCompletedInput = {
+ readonly id: Scalars['ID']['input'];
+};
+
+export type QuizCompletedPayload = {
+ readonly __typename: 'QuizCompletedPayload';
+ readonly errors: ReadonlyArray;
+ readonly quiz?: Maybe;
+};
+
+export type RealtimePrice = {
+ readonly __typename: 'RealtimePrice';
+ readonly btcSatPrice: PriceOfOneSatInMinorUnit;
+ readonly denominatorCurrency: Scalars['DisplayCurrency']['output'];
+ readonly id: Scalars['ID']['output'];
+ /** Unix timestamp (number of seconds elapsed since January 1, 1970 00:00:00 UTC) */
+ readonly timestamp: Scalars['Timestamp']['output'];
+ readonly usdCentPrice: PriceOfOneUsdCentInMinorUnit;
+};
+
+export type RealtimePriceInput = {
+ readonly currency?: InputMaybe;
+};
+
+export type RealtimePricePayload = {
+ readonly __typename: 'RealtimePricePayload';
+ readonly errors: ReadonlyArray;
+ readonly realtimePrice?: Maybe;
+};
+
+export type SatAmountPayload = {
+ readonly __typename: 'SatAmountPayload';
+ readonly amount?: Maybe;
+ readonly errors: ReadonlyArray;
+};
+
+export type SettlementVia = SettlementViaIntraLedger | SettlementViaLn | SettlementViaOnChain;
+
+export type SettlementViaIntraLedger = {
+ readonly __typename: 'SettlementViaIntraLedger';
+ /** Settlement destination: Could be null if the payee does not have a username */
+ readonly counterPartyUsername?: Maybe;
+ readonly counterPartyWalletId?: Maybe;
+ readonly preImage?: Maybe;
+};
+
+export type SettlementViaLn = {
+ readonly __typename: 'SettlementViaLn';
+ /** @deprecated Shifting property to 'preImage' to improve granularity of the LnPaymentSecret type */
+ readonly paymentSecret?: Maybe;
+ readonly preImage?: Maybe;
+};
+
+export type SettlementViaOnChain = {
+ readonly __typename: 'SettlementViaOnChain';
+ readonly arrivalInMempoolEstimatedAt?: Maybe;
+ readonly transactionHash?: Maybe;
+ readonly vout?: Maybe;
+};
+
+export type Subscription = {
+ readonly __typename: 'Subscription';
+ readonly lnInvoicePaymentStatus: LnInvoicePaymentStatusPayload;
+ readonly myUpdates: MyUpdatesPayload;
+ readonly price: PricePayload;
+ /** Returns the price of 1 satoshi */
+ readonly realtimePrice: RealtimePricePayload;
+};
+
+
+export type SubscriptionLnInvoicePaymentStatusArgs = {
+ input: LnInvoicePaymentStatusInput;
+};
+
+
+export type SubscriptionPriceArgs = {
+ input: PriceInput;
+};
+
+
+export type SubscriptionRealtimePriceArgs = {
+ input: RealtimePriceInput;
+};
+
+export type SuccessPayload = {
+ readonly __typename: 'SuccessPayload';
+ readonly errors: ReadonlyArray;
+ readonly success?: Maybe;
+};
+
+/**
+ * Give details about an individual transaction.
+ * Galoy have a smart routing system which is automatically
+ * settling intraledger when both the payer and payee use the same wallet
+ * therefore it's possible the transactions is being initiated onchain
+ * or with lightning but settled intraledger.
+ */
+export type Transaction = {
+ readonly __typename: 'Transaction';
+ readonly createdAt: Scalars['Timestamp']['output'];
+ readonly direction: TxDirection;
+ readonly id: Scalars['ID']['output'];
+ /** From which protocol the payment has been initiated. */
+ readonly initiationVia: InitiationVia;
+ readonly memo?: Maybe;
+ /** Amount of the settlement currency sent or received. */
+ readonly settlementAmount: Scalars['SignedAmount']['output'];
+ /** Wallet currency for transaction. */
+ readonly settlementCurrency: WalletCurrency;
+ readonly settlementDisplayAmount: Scalars['SignedDisplayMajorAmount']['output'];
+ readonly settlementDisplayCurrency: Scalars['DisplayCurrency']['output'];
+ readonly settlementDisplayFee: Scalars['SignedDisplayMajorAmount']['output'];
+ readonly settlementFee: Scalars['SignedAmount']['output'];
+ /** Price in WALLETCURRENCY/SETTLEMENTUNIT at time of settlement. */
+ readonly settlementPrice: PriceOfOneSettlementMinorUnitInDisplayMinorUnit;
+ /** To which protocol the payment has settled on. */
+ readonly settlementVia: SettlementVia;
+ readonly status: TxStatus;
+};
+
+/** A connection to a list of items. */
+export type TransactionConnection = {
+ readonly __typename: 'TransactionConnection';
+ /** A list of edges. */
+ readonly edges?: Maybe>;
+ /** Information to aid in pagination. */
+ readonly pageInfo: PageInfo;
+};
+
+/** An edge in a connection. */
+export type TransactionEdge = {
+ readonly __typename: 'TransactionEdge';
+ /** A cursor for use in pagination */
+ readonly cursor: Scalars['String']['output'];
+ /** The item at the end of the edge */
+ readonly node: Transaction;
+};
+
+export const TxDirection = {
+ Receive: 'RECEIVE',
+ Send: 'SEND'
+} as const;
+
+export type TxDirection = typeof TxDirection[keyof typeof TxDirection];
+export const TxNotificationType = {
+ IntraLedgerPayment: 'IntraLedgerPayment',
+ IntraLedgerReceipt: 'IntraLedgerReceipt',
+ LigtningReceipt: 'LigtningReceipt',
+ OnchainPayment: 'OnchainPayment',
+ OnchainReceipt: 'OnchainReceipt',
+ OnchainReceiptPending: 'OnchainReceiptPending'
+} as const;
+
+export type TxNotificationType = typeof TxNotificationType[keyof typeof TxNotificationType];
+export const TxStatus = {
+ Failure: 'FAILURE',
+ Pending: 'PENDING',
+ Success: 'SUCCESS'
+} as const;
+
+export type TxStatus = typeof TxStatus[keyof typeof TxStatus];
+export type UpgradePayload = {
+ readonly __typename: 'UpgradePayload';
+ readonly authToken?: Maybe;
+ readonly errors: ReadonlyArray;
+ readonly success: Scalars['Boolean']['output'];
+};
+
+/** A wallet belonging to an account which contains a USD balance and a list of transactions. */
+export type UsdWallet = Wallet & {
+ readonly __typename: 'UsdWallet';
+ readonly accountId: Scalars['ID']['output'];
+ readonly balance: Scalars['SignedAmount']['output'];
+ readonly id: Scalars['ID']['output'];
+ readonly invoiceByPaymentHash: Invoice;
+ /** A list of all invoices associated with walletIds optionally passed. */
+ readonly invoices?: Maybe;
+ /** An unconfirmed incoming onchain balance. */
+ readonly pendingIncomingBalance: Scalars['SignedAmount']['output'];
+ readonly pendingIncomingTransactions: ReadonlyArray;
+ readonly pendingIncomingTransactionsByAddress: ReadonlyArray;
+ readonly transactionById: Transaction;
+ readonly transactions?: Maybe;
+ readonly transactionsByAddress?: Maybe;
+ readonly transactionsByPaymentHash: ReadonlyArray;
+ readonly walletCurrency: WalletCurrency;
+};
+
+
+/** A wallet belonging to an account which contains a USD balance and a list of transactions. */
+export type UsdWalletInvoiceByPaymentHashArgs = {
+ paymentHash: Scalars['PaymentHash']['input'];
+};
+
+
+/** A wallet belonging to an account which contains a USD balance and a list of transactions. */
+export type UsdWalletInvoicesArgs = {
+ after?: InputMaybe;
+ before?: InputMaybe;
+ first?: InputMaybe;
+ last?: InputMaybe;
+};
+
+
+/** A wallet belonging to an account which contains a USD balance and a list of transactions. */
+export type UsdWalletPendingIncomingTransactionsByAddressArgs = {
+ address: Scalars['OnChainAddress']['input'];
+};
+
+
+/** A wallet belonging to an account which contains a USD balance and a list of transactions. */
+export type UsdWalletTransactionByIdArgs = {
+ transactionId: Scalars['ID']['input'];
+};
+
+
+/** A wallet belonging to an account which contains a USD balance and a list of transactions. */
+export type UsdWalletTransactionsArgs = {
+ after?: InputMaybe;
+ before?: InputMaybe;
+ first?: InputMaybe;
+ last?: InputMaybe;
+};
+
+
+/** A wallet belonging to an account which contains a USD balance and a list of transactions. */
+export type UsdWalletTransactionsByAddressArgs = {
+ address: Scalars['OnChainAddress']['input'];
+ after?: InputMaybe;
+ before?: InputMaybe;
+ first?: InputMaybe;
+ last?: InputMaybe;
+};
+
+
+/** A wallet belonging to an account which contains a USD balance and a list of transactions. */
+export type UsdWalletTransactionsByPaymentHashArgs = {
+ paymentHash: Scalars['PaymentHash']['input'];
+};
+
+export type User = {
+ readonly __typename: 'User';
+ /**
+ * Get single contact details.
+ * Can include the transactions associated with the contact.
+ * @deprecated will be moved to Accounts
+ */
+ readonly contactByUsername: UserContact;
+ /**
+ * Get full list of contacts.
+ * Can include the transactions associated with each contact.
+ * @deprecated will be moved to account
+ */
+ readonly contacts: ReadonlyArray;
+ readonly createdAt: Scalars['Timestamp']['output'];
+ readonly defaultAccount: Account;
+ /** Email address */
+ readonly email?: Maybe;
+ readonly id: Scalars['ID']['output'];
+ /**
+ * Preferred language for user.
+ * When value is 'default' the intent is to use preferred language from OS settings.
+ */
+ readonly language: Scalars['Language']['output'];
+ /** Phone number with international calling code. */
+ readonly phone?: Maybe;
+ /** Whether TOTP is enabled for this user. */
+ readonly totpEnabled: Scalars['Boolean']['output'];
+ /**
+ * Optional immutable user friendly identifier.
+ * @deprecated will be moved to @Handle in Account and Wallet
+ */
+ readonly username?: Maybe;
+};
+
+
+export type UserContactByUsernameArgs = {
+ username: Scalars['Username']['input'];
+};
+
+export type UserContact = {
+ readonly __typename: 'UserContact';
+ /**
+ * Alias the user can set for this contact.
+ * Only the user can see the alias attached to their contact.
+ */
+ readonly alias?: Maybe;
+ readonly id: Scalars['Username']['output'];
+ /** Paginated list of transactions sent to/from this contact. */
+ readonly transactions?: Maybe;
+ readonly transactionsCount: Scalars['Int']['output'];
+ /** Actual identifier of the contact. */
+ readonly username: Scalars['Username']['output'];
+};
+
+
+export type UserContactTransactionsArgs = {
+ after?: InputMaybe;
+ before?: InputMaybe;
+ first?: InputMaybe;
+ last?: InputMaybe;
+};
+
+export type UserContactUpdateAliasInput = {
+ readonly alias: Scalars['ContactAlias']['input'];
+ readonly username: Scalars['Username']['input'];
+};
+
+export type UserContactUpdateAliasPayload = {
+ readonly __typename: 'UserContactUpdateAliasPayload';
+ readonly contact?: Maybe;
+ readonly errors: ReadonlyArray;
+};
+
+export type UserEmailDeletePayload = {
+ readonly __typename: 'UserEmailDeletePayload';
+ readonly errors: ReadonlyArray;
+ readonly me?: Maybe;
+};
+
+export type UserEmailRegistrationInitiateInput = {
+ readonly email: Scalars['EmailAddress']['input'];
+};
+
+export type UserEmailRegistrationInitiatePayload = {
+ readonly __typename: 'UserEmailRegistrationInitiatePayload';
+ readonly emailRegistrationId?: Maybe;
+ readonly errors: ReadonlyArray;
+ readonly me?: Maybe;
+};
+
+export type UserEmailRegistrationValidateInput = {
+ readonly code: Scalars['OneTimeAuthCode']['input'];
+ readonly emailRegistrationId: Scalars['EmailRegistrationId']['input'];
+};
+
+export type UserEmailRegistrationValidatePayload = {
+ readonly __typename: 'UserEmailRegistrationValidatePayload';
+ readonly errors: ReadonlyArray;
+ readonly me?: Maybe;
+};
+
+export type UserLoginInput = {
+ readonly code: Scalars['OneTimeAuthCode']['input'];
+ readonly phone: Scalars['Phone']['input'];
+};
+
+export type UserLoginUpgradeInput = {
+ readonly code: Scalars['OneTimeAuthCode']['input'];
+ readonly phone: Scalars['Phone']['input'];
+};
+
+export type UserLogoutInput = {
+ readonly deviceToken: Scalars['String']['input'];
+};
+
+export type UserPhoneDeletePayload = {
+ readonly __typename: 'UserPhoneDeletePayload';
+ readonly errors: ReadonlyArray;
+ readonly me?: Maybe;
+};
+
+export type UserPhoneRegistrationInitiateInput = {
+ readonly channel?: InputMaybe;
+ readonly phone: Scalars['Phone']['input'];
+};
+
+export type UserPhoneRegistrationValidateInput = {
+ readonly code: Scalars['OneTimeAuthCode']['input'];
+ readonly phone: Scalars['Phone']['input'];
+};
+
+export type UserPhoneRegistrationValidatePayload = {
+ readonly __typename: 'UserPhoneRegistrationValidatePayload';
+ readonly errors: ReadonlyArray;
+ readonly me?: Maybe;
+};
+
+export type UserTotpDeletePayload = {
+ readonly __typename: 'UserTotpDeletePayload';
+ readonly errors: ReadonlyArray;
+ readonly me?: Maybe;
+};
+
+export type UserTotpRegistrationInitiatePayload = {
+ readonly __typename: 'UserTotpRegistrationInitiatePayload';
+ readonly errors: ReadonlyArray;
+ readonly totpRegistrationId?: Maybe;
+ readonly totpSecret?: Maybe;
+};
+
+export type UserTotpRegistrationValidateInput = {
+ readonly authToken?: InputMaybe;
+ readonly totpCode: Scalars['TotpCode']['input'];
+ readonly totpRegistrationId: Scalars['TotpRegistrationId']['input'];
+};
+
+export type UserTotpRegistrationValidatePayload = {
+ readonly __typename: 'UserTotpRegistrationValidatePayload';
+ readonly errors: ReadonlyArray;
+ readonly me?: Maybe