diff --git a/.eslintrc.json b/.eslintrc.json index 1b29f42c79..dd73173c75 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -4,7 +4,7 @@ "es6": true, "node": true }, - "ignorePatterns": ["/*.js", "lib", "coverage", "generated", "protos"], + "ignorePatterns": ["/*.js", "lib", "coverage", "generated", "protos", "apps"], "parser": "@typescript-eslint/parser", "parserOptions": { "project": "tsconfig.json", diff --git a/apps/consent/src/routes/consent.ts b/apps/consent/src/routes/consent.ts index 6cbc4f4a60..2e5bb06eea 100644 --- a/apps/consent/src/routes/consent.ts +++ b/apps/consent/src/routes/consent.ts @@ -64,7 +64,9 @@ router.get("/", csrfProtection, async (req, res, next) => { // unless you limit who can introspect tokens. access_token: { card: "alice" }, // This data will be available in the ID token. - id_token: { who: "bob" }, + + // TODO fetch email + id_token: { who: "bob", email: "" }, }, }, }) @@ -127,9 +129,11 @@ router.post("/", csrfProtection, async (req, res, next) => { let session = { // This data will be available when introspecting the token. Try to avoid sensitive information here, // unless you limit who can introspect tokens. - access_token: { card: "alice" }, + + // TODO: pass email + access_token: { card: "alice", email: "" }, // This data will be available in the ID token. - id_token: { card: "bob" }, + id_token: { card: "bob", email: "" }, } try { diff --git a/apps/consent/src/routes/login.ts b/apps/consent/src/routes/login.ts index 0843b9353d..46ca9249bb 100644 --- a/apps/consent/src/routes/login.ts +++ b/apps/consent/src/routes/login.ts @@ -107,12 +107,21 @@ router.post("/", csrfProtection, async (req, res, next) => { const url = `${authUrl}/auth/email/code` - const result = await axios.post(url, { - email, - }) + let emailLoginId: string + + try { + const result = await axios.post(url, { + email, + }) + emailLoginId = result.data.result + } catch (err) { + // TODO: error layout + console.error(err) + return + } + // TODO: manage error on ip rate limit // TODO: manage error when trying the same email too often - const emailLoginId = result.data.result if (emailLoginId) { console.log({ emailLoginId }) diff --git a/apps/dashboard/.env b/apps/dashboard/.env new file mode 100755 index 0000000000..c75e0da20d --- /dev/null +++ b/apps/dashboard/.env @@ -0,0 +1,3 @@ +NEXTAUTH_URL=https://bdb1-93-108-186-220.ngrok-free.app +PORT=3001 +NEXTAUTH_SECRET="thisismysecret" \ No newline at end of file diff --git a/apps/dashboard/.eslintrc.json b/apps/dashboard/.eslintrc.json new file mode 100644 index 0000000000..bffb357a71 --- /dev/null +++ b/apps/dashboard/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "next/core-web-vitals" +} diff --git a/apps/dashboard/.gitignore b/apps/dashboard/.gitignore new file mode 100644 index 0000000000..8f322f0d8f --- /dev/null +++ b/apps/dashboard/.gitignore @@ -0,0 +1,35 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# 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/dashboard/README.md b/apps/dashboard/README.md new file mode 100644 index 0000000000..c4033664f8 --- /dev/null +++ b/apps/dashboard/README.md @@ -0,0 +1,36 @@ +This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). + +## Getting Started + +First, run the development server: + +```bash +npm run dev +# or +yarn dev +# or +pnpm dev +# or +bun dev +``` + +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. + +You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. + +This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. + +## Learn More + +To learn more about Next.js, take a look at the following resources: + +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. +- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. + +You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! + +## Deploy on Vercel + +The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. + +Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. diff --git a/apps/dashboard/app/api/auth/[...nextauth]/route.ts b/apps/dashboard/app/api/auth/[...nextauth]/route.ts new file mode 100644 index 0000000000..a86e5b0302 --- /dev/null +++ b/apps/dashboard/app/api/auth/[...nextauth]/route.ts @@ -0,0 +1,55 @@ +import NextAuth from "next-auth" +import GithubProvider from "next-auth/providers/auth0" +import { ProviderType } from "next-auth/providers/index" + +const type = "oauth" as const // as ProviderType + +export const authOptions = { + // Configure one or more authentication providers + providers: [ + { + id: "blink", + clientId: process.env.CLIENT_ID, + clientSecret: process.env.CLIENT_SECRET, + wellKnown: "http://127.0.0.1:4444/.well-known/openid-configuration", + useSecureCookies: false, + authorization: { params: { scope: "offline transactions:read" } }, + idToken: false, + name: "Blink", + type, + profile(profile) { + console.log({ profile }, "profile123") + return { + id: profile.sub, + // email: profile.email, + } + }, + }, + // ...add more providers here + ], + debug: true, + secret: process.env.NEXTAUTH_SECRET as string, + callbacks: { + async jwt({ token, account, profile }) { + // Persist the OAuth access_token and or the user id to the token right after signin + if (account) { + token.accessToken = account.access_token + token.expiresAt = account.expires_at + token.refreshToken = account.refresh_token + token.id = profile.id + } + return token + }, + async session({ session, token, user }) { + console.log({ session, token, user }, "session12") + // Send properties to the client, like an access_token from a provider. + session.sub = token.sub + session.accessToken = token.accessToken + return session + }, + }, +} + +const handler = NextAuth(authOptions) + +export { handler as GET, handler as POST } diff --git a/apps/dashboard/app/favicon.ico b/apps/dashboard/app/favicon.ico new file mode 100644 index 0000000000..718d6fea48 Binary files /dev/null and b/apps/dashboard/app/favicon.ico differ diff --git a/apps/dashboard/app/globals.css b/apps/dashboard/app/globals.css new file mode 100644 index 0000000000..fd81e88583 --- /dev/null +++ b/apps/dashboard/app/globals.css @@ -0,0 +1,27 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +:root { + --foreground-rgb: 0, 0, 0; + --background-start-rgb: 214, 219, 220; + --background-end-rgb: 255, 255, 255; +} + +@media (prefers-color-scheme: dark) { + :root { + --foreground-rgb: 255, 255, 255; + --background-start-rgb: 0, 0, 0; + --background-end-rgb: 0, 0, 0; + } +} + +body { + color: rgb(var(--foreground-rgb)); + background: linear-gradient( + to bottom, + transparent, + rgb(var(--background-end-rgb)) + ) + rgb(var(--background-start-rgb)); +} diff --git a/apps/dashboard/app/graphql/config.ts b/apps/dashboard/app/graphql/config.ts new file mode 100644 index 0000000000..3ab574b70c --- /dev/null +++ b/apps/dashboard/app/graphql/config.ts @@ -0,0 +1,4 @@ +// export const serverUrl = +// process.env.SERVER_URL ?? "https://fe69-93-108-186-220.ngrok-free.app" + +export const coreUrl = process.env.CORE_URL ?? "http://localhost:4002/graphql" diff --git a/apps/dashboard/app/graphql/generated.ts b/apps/dashboard/app/graphql/generated.ts new file mode 100644 index 0000000000..29cc79fa08 --- /dev/null +++ b/apps/dashboard/app/graphql/generated.ts @@ -0,0 +1,3362 @@ +// this file is autogenerated by codegen +/* eslint-disable */ +import { GraphQLResolveInfo, GraphQLScalarType, GraphQLScalarTypeConfig } from 'graphql'; +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 }; +export type Omit = Pick>; +export type RequireFields = Omit & { [P in K]-?: NonNullable }; +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; } + LeaderboardName: { 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; } + _FieldSet: { input: string; output: string; } +}; + +export type Account = { + readonly callbackEndpoints: ReadonlyArray; + readonly csvTransactions: Scalars['String']['output']; + readonly defaultWalletId: Scalars['WalletId']['output']; + readonly displayCurrency: Scalars['DisplayCurrency']['output']; + readonly id: Scalars['ID']['output']; + readonly level: AccountLevel; + readonly limits: AccountLimits; + readonly notificationSettings: NotificationSettings; + readonly realtimePrice: RealtimePrice; + readonly transactions?: Maybe; + readonly wallets: ReadonlyArray; +}; + + +export type AccountCsvTransactionsArgs = { + walletIds: ReadonlyArray; +}; + + +export type AccountTransactionsArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + walletIds?: InputMaybe>>; +}; + +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']; + /** An unconfirmed incoming onchain balance. */ + readonly pendingIncomingBalance: Scalars['SignedAmount']['output']; + /** A list of BTC transactions associated with this wallet. */ + readonly transactions?: Maybe; + readonly transactionsByAddress?: Maybe; + readonly walletCurrency: WalletCurrency; +}; + + +/** 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; +}; + +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 defaultWalletId: Scalars['WalletId']['output']; + readonly displayCurrency: Scalars['DisplayCurrency']['output']; + readonly id: Scalars['ID']['output']; + readonly level: AccountLevel; + readonly limits: AccountLimits; + readonly notificationSettings: NotificationSettings; + /** 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 wallets: ReadonlyArray; + readonly welcomeProfile?: Maybe; +}; + + +export type ConsumerAccountCsvTransactionsArgs = { + walletIds: ReadonlyArray; +}; + + +export type ConsumerAccountTransactionsArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + walletIds?: InputMaybe>>; +}; + +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']; +}; + +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'; + readonly amount: Scalars['SatAmount']['output']; + readonly displayCurrencyPerSat: Scalars['Float']['output']; + readonly txNotificationType: TxNotificationType; + /** @deprecated updated over displayCurrencyPerSat */ + readonly usdPerSat: Scalars['Float']['output']; + 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']; +}; + +export const InvoicePaymentStatus = { + Expired: 'EXPIRED', + Paid: 'PAID', + Pending: 'PENDING' +} as const; + +export type InvoicePaymentStatus = typeof InvoicePaymentStatus[keyof typeof InvoicePaymentStatus]; +export type Leader = { + readonly __typename: 'Leader'; + readonly name?: Maybe; + readonly points: Scalars['Int']['output']; + readonly rank: Scalars['Int']['output']; +}; + +export type Leaderboard = { + readonly __typename: 'Leaderboard'; + readonly leaders: ReadonlyArray; + readonly range: WelcomeRange; +}; + +export type LnInvoice = { + readonly __typename: 'LnInvoice'; + readonly paymentHash: Scalars['PaymentHash']['output']; + readonly paymentRequest: Scalars['LnPaymentRequest']['output']; + readonly paymentSecret: Scalars['LnPaymentSecret']['output']; + readonly satoshis?: Maybe; +}; + +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 = { + readonly __typename: 'LnNoAmountInvoice'; + readonly paymentHash: Scalars['PaymentHash']['output']; + readonly paymentRequest: Scalars['LnPaymentRequest']['output']; + readonly paymentSecret: Scalars['LnPaymentSecret']['output']; +}; + +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'; + readonly paymentHash: Scalars['PaymentHash']['output']; + readonly status: InvoicePaymentStatus; + readonly walletId: Scalars['WalletId']['output']; +}; + +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 MapInfo = { + readonly __typename: 'MapInfo'; + readonly coordinates: Coordinates; + readonly title: Scalars['String']['output']; +}; + +export type MapMarker = { + readonly __typename: 'MapMarker'; + readonly mapInfo: MapInfo; + readonly username?: 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; + /** + * 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 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; + readonly onChainAddressCreate: OnChainAddressPayload; + readonly onChainAddressCurrent: OnChainAddressPayload; + readonly onChainPaymentSend: PaymentSendPayload; + readonly onChainPaymentSendAll: PaymentSendPayload; + readonly onChainUsdPaymentSend: PaymentSendPayload; + readonly onChainUsdPaymentSendAsBtcDenominated: PaymentSendPayload; + 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; + /** @deprecated Use QuizCompletedMutation instead */ + readonly userQuizQuestionUpdateCompleted: UserQuizQuestionUpdateCompletedPayload; + 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 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 MutationLnUsdInvoiceCreateArgs = { + input: LnUsdInvoiceCreateInput; +}; + + +export type MutationLnUsdInvoiceCreateOnBehalfOfRecipientArgs = { + input: LnUsdInvoiceCreateOnBehalfOfRecipientInput; +}; + + +export type MutationLnUsdInvoiceFeeProbeArgs = { + input: LnUsdInvoiceFeeProbeInput; +}; + + +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 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 MutationUserQuizQuestionUpdateCompletedArgs = { + input: UserQuizQuestionUpdateCompletedInput; +}; + + +export type MutationUserTotpDeleteArgs = { + input: UserTotpDeleteInput; +}; + + +export type MutationUserTotpRegistrationInitiateArgs = { + input: UserTotpRegistrationInitiateInput; +}; + + +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?: InputMaybe; + readonly walletId: Scalars['WalletId']['input']; +}; + +export type OnChainPaymentSendInput = { + readonly address: Scalars['OnChainAddress']['input']; + readonly amount: Scalars['SatAmount']['input']; + readonly memo?: InputMaybe; + readonly speed?: InputMaybe; + readonly walletId: Scalars['WalletId']['input']; +}; + +export type OnChainTxFee = { + readonly __typename: 'OnChainTxFee'; + readonly amount: Scalars['SatAmount']['output']; +}; + +export type OnChainUpdate = { + readonly __typename: 'OnChainUpdate'; + readonly amount: Scalars['SatAmount']['output']; + readonly displayCurrencyPerSat: Scalars['Float']['output']; + readonly txHash: Scalars['OnChainTxHash']['output']; + readonly txNotificationType: TxNotificationType; + /** @deprecated updated over displayCurrencyPerSat */ + readonly usdPerSat: Scalars['Float']['output']; + readonly walletId: Scalars['WalletId']['output']; +}; + +export type OnChainUsdPaymentSendAsBtcDenominatedInput = { + readonly address: Scalars['OnChainAddress']['input']; + readonly amount: Scalars['SatAmount']['input']; + readonly memo?: InputMaybe; + readonly speed?: InputMaybe; + readonly walletId: Scalars['WalletId']['input']; +}; + +export type OnChainUsdPaymentSendInput = { + readonly address: Scalars['OnChainAddress']['input']; + readonly amount: Scalars['CentAmount']['input']; + readonly memo?: InputMaybe; + readonly speed?: InputMaybe; + 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; +}; + +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 id: Scalars['ID']['output']; + readonly walletCurrency: WalletCurrency; +}; + +export type Query = { + readonly __typename: 'Query'; + readonly accountDefaultWallet: PublicWallet; + /** @deprecated Deprecated in favor of realtimePrice */ + readonly btcPrice?: Maybe; + readonly btcPriceList?: Maybe>>; + readonly businessMapMarkers?: Maybe>>; + readonly currencyList: ReadonlyArray; + readonly globals?: Maybe; + readonly lnInvoicePaymentStatus: LnInvoicePaymentStatusPayload; + readonly me?: Maybe; + readonly mobileVersions?: Maybe>>; + readonly onChainTxFee: OnChainTxFee; + readonly onChainUsdTxFee: OnChainUsdTxFee; + readonly onChainUsdTxFeeAsBtcDenominated: OnChainUsdTxFee; + /** @deprecated TODO: remove. we don't need a non authenticated version of this query. the users can only do the query while authenticated */ + readonly quizQuestions?: Maybe>>; + /** 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; + readonly welcomeLeaderboard: Leaderboard; +}; + + +export type QueryAccountDefaultWalletArgs = { + username: Scalars['Username']['input']; + walletCurrency?: InputMaybe; +}; + + +export type QueryBtcPriceArgs = { + currency?: Scalars['DisplayCurrency']['input']; +}; + + +export type QueryBtcPriceListArgs = { + range: PriceGraphRange; +}; + + +export type QueryLnInvoicePaymentStatusArgs = { + input: LnInvoicePaymentStatusInput; +}; + + +export type QueryOnChainTxFeeArgs = { + address: Scalars['OnChainAddress']['input']; + amount: Scalars['SatAmount']['input']; + speed?: InputMaybe; + walletId: Scalars['WalletId']['input']; +}; + + +export type QueryOnChainUsdTxFeeArgs = { + address: Scalars['OnChainAddress']['input']; + amount: Scalars['CentAmount']['input']; + speed?: InputMaybe; + walletId: Scalars['WalletId']['input']; +}; + + +export type QueryOnChainUsdTxFeeAsBtcDenominatedArgs = { + address: Scalars['OnChainAddress']['input']; + amount: Scalars['SatAmount']['input']; + speed?: InputMaybe; + 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 QueryWelcomeLeaderboardArgs = { + input: WelcomeLeaderboardInput; +}; + +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']; +}; + +export type QuizCompletedInput = { + readonly id: Scalars['ID']['input']; +}; + +export type QuizCompletedPayload = { + readonly __typename: 'QuizCompletedPayload'; + readonly errors: ReadonlyArray; + readonly quiz?: Maybe; +}; + +export type QuizQuestion = { + readonly __typename: 'QuizQuestion'; + /** The earn reward in Satoshis for the quiz question */ + readonly earnAmount: Scalars['SatAmount']['output']; + readonly id: Scalars['ID']['output']; +}; + +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; +}; + +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 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', + LnInvoicePaid: 'LnInvoicePaid', + 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']; + /** An unconfirmed incoming onchain balance. */ + readonly pendingIncomingBalance: Scalars['SignedAmount']['output']; + readonly transactions?: Maybe; + readonly transactionsByAddress?: Maybe; + readonly walletCurrency: WalletCurrency; +}; + + +/** 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; +}; + +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; + /** + * List the quiz questions the user may have completed. + * @deprecated use Quiz from Account instead + */ + readonly quizQuestions: ReadonlyArray; + /** 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 UserQuizQuestion = { + readonly __typename: 'UserQuizQuestion'; + readonly completed: Scalars['Boolean']['output']; + readonly question: QuizQuestion; +}; + +export type UserQuizQuestionUpdateCompletedInput = { + readonly id: Scalars['ID']['input']; +}; + +export type UserQuizQuestionUpdateCompletedPayload = { + readonly __typename: 'UserQuizQuestionUpdateCompletedPayload'; + readonly errors: ReadonlyArray; + readonly userQuizQuestion?: Maybe; +}; + +export type UserTotpDeleteInput = { + readonly authToken: Scalars['AuthToken']['input']; +}; + +export type UserTotpDeletePayload = { + readonly __typename: 'UserTotpDeletePayload'; + readonly errors: ReadonlyArray; + readonly me?: Maybe; +}; + +export type UserTotpRegistrationInitiateInput = { + readonly authToken: Scalars['AuthToken']['input']; +}; + +export type UserTotpRegistrationInitiatePayload = { + readonly __typename: 'UserTotpRegistrationInitiatePayload'; + readonly errors: ReadonlyArray; + readonly totpRegistrationId?: Maybe; + readonly totpSecret?: Maybe; +}; + +export type UserTotpRegistrationValidateInput = { + readonly authToken: Scalars['AuthToken']['input']; + readonly totpCode: Scalars['TotpCode']['input']; + readonly totpRegistrationId: Scalars['TotpRegistrationId']['input']; +}; + +export type UserTotpRegistrationValidatePayload = { + readonly __typename: 'UserTotpRegistrationValidatePayload'; + readonly errors: ReadonlyArray; + readonly me?: Maybe; +}; + +export type UserUpdate = IntraLedgerUpdate | LnUpdate | OnChainUpdate | Price | RealtimePrice; + +export type UserUpdateLanguageInput = { + readonly language: Scalars['Language']['input']; +}; + +export type UserUpdateLanguagePayload = { + readonly __typename: 'UserUpdateLanguagePayload'; + readonly errors: ReadonlyArray; + readonly user?: Maybe; +}; + +export type UserUpdateUsernameInput = { + readonly username: Scalars['Username']['input']; +}; + +export type UserUpdateUsernamePayload = { + readonly __typename: 'UserUpdateUsernamePayload'; + readonly errors: ReadonlyArray; + readonly user?: Maybe; +}; + +/** A generic wallet which stores value in one of our supported currencies. */ +export type Wallet = { + readonly accountId: Scalars['ID']['output']; + readonly balance: Scalars['SignedAmount']['output']; + readonly id: Scalars['ID']['output']; + readonly pendingIncomingBalance: Scalars['SignedAmount']['output']; + /** + * Transactions are ordered anti-chronologically, + * ie: the newest transaction will be first + */ + readonly transactions?: Maybe; + /** + * Transactions are ordered anti-chronologically, + * ie: the newest transaction will be first + */ + readonly transactionsByAddress?: Maybe; + readonly walletCurrency: WalletCurrency; +}; + + +/** A generic wallet which stores value in one of our supported currencies. */ +export type WalletTransactionsArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + + +/** A generic wallet which stores value in one of our supported currencies. */ +export type WalletTransactionsByAddressArgs = { + address: Scalars['OnChainAddress']['input']; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; +}; + +export const WalletCurrency = { + Btc: 'BTC', + Usd: 'USD' +} as const; + +export type WalletCurrency = typeof WalletCurrency[keyof typeof WalletCurrency]; +export type WelcomeLeaderboardInput = { + readonly range: WelcomeRange; +}; + +export type WelcomeProfile = { + readonly __typename: 'WelcomeProfile'; + readonly allTimePoints: Scalars['Int']['output']; + readonly allTimeRank: Scalars['Int']['output']; + readonly innerCircleAllTimeCount: Scalars['Int']['output']; + readonly innerCircleThisMonthCount: Scalars['Int']['output']; + readonly leaderboardName?: Maybe; + readonly outerCircleAllTimeCount: Scalars['Int']['output']; + readonly outerCircleThisMonthCount: Scalars['Int']['output']; + readonly thisMonthPoints: Scalars['Int']['output']; + readonly thisMonthRank: Scalars['Int']['output']; +}; + +export const WelcomeRange = { + AllTime: 'AllTime', + ThisMonth: 'ThisMonth' +} as const; + +export type WelcomeRange = typeof WelcomeRange[keyof typeof WelcomeRange]; +export type MeQueryVariables = Exact<{ [key: string]: never; }>; + + +export type MeQuery = { readonly __typename: 'Query', readonly me?: { readonly __typename: 'User', readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly id: string, readonly level: AccountLevel } } | null }; + + +export const MeDocument = gql` + query me { + me { + defaultAccount { + id + level + } + } +} + `; + +/** + * __useMeQuery__ + * + * To run a query within a React component, call `useMeQuery` and pass it any options that fit your needs. + * When your component renders, `useMeQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useMeQuery({ + * variables: { + * }, + * }); + */ +export function useMeQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(MeDocument, options); + } +export function useMeLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(MeDocument, options); + } +export type MeQueryHookResult = ReturnType; +export type MeLazyQueryHookResult = ReturnType; +export type MeQueryResult = Apollo.QueryResult; + + +export type ResolverTypeWrapper = Promise | T; + + +export type ResolverWithResolve = { + resolve: ResolverFn; +}; +export type Resolver = ResolverFn | ResolverWithResolve; + +export type ResolverFn = ( + parent: TParent, + args: TArgs, + context: TContext, + info: GraphQLResolveInfo +) => Promise | TResult; + +export type SubscriptionSubscribeFn = ( + parent: TParent, + args: TArgs, + context: TContext, + info: GraphQLResolveInfo +) => AsyncIterable | Promise>; + +export type SubscriptionResolveFn = ( + parent: TParent, + args: TArgs, + context: TContext, + info: GraphQLResolveInfo +) => TResult | Promise; + +export interface SubscriptionSubscriberObject { + subscribe: SubscriptionSubscribeFn<{ [key in TKey]: TResult }, TParent, TContext, TArgs>; + resolve?: SubscriptionResolveFn; +} + +export interface SubscriptionResolverObject { + subscribe: SubscriptionSubscribeFn; + resolve: SubscriptionResolveFn; +} + +export type SubscriptionObject = + | SubscriptionSubscriberObject + | SubscriptionResolverObject; + +export type SubscriptionResolver = + | ((...args: any[]) => SubscriptionObject) + | SubscriptionObject; + +export type TypeResolveFn = ( + parent: TParent, + context: TContext, + info: GraphQLResolveInfo +) => Maybe | Promise>; + +export type IsTypeOfResolverFn = (obj: T, context: TContext, info: GraphQLResolveInfo) => boolean | Promise; + +export type NextResolverFn = () => Promise; + +export type DirectiveResolverFn = ( + next: NextResolverFn, + parent: TParent, + args: TArgs, + context: TContext, + info: GraphQLResolveInfo +) => TResult | Promise; + +/** Mapping of union types */ +export type ResolversUnionTypes> = { + InitiationVia: ( InitiationViaIntraLedger ) | ( InitiationViaLn ) | ( InitiationViaOnChain ); + SettlementVia: ( SettlementViaIntraLedger ) | ( SettlementViaLn ) | ( SettlementViaOnChain ); + UserUpdate: ( IntraLedgerUpdate ) | ( LnUpdate ) | ( OnChainUpdate ) | ( Price ) | ( RealtimePrice ); +}; + +/** Mapping of interface types */ +export type ResolversInterfaceTypes> = { + Account: ( ConsumerAccount ); + AccountLimit: ( OneDayAccountLimit ); + Error: ( GraphQlApplicationError ); + PriceInterface: ( PriceOfOneSatInMinorUnit ) | ( PriceOfOneSettlementMinorUnitInDisplayMinorUnit ) | ( PriceOfOneUsdCentInMinorUnit ); + Wallet: ( BtcWallet ) | ( UsdWallet ); +}; + +/** Mapping between all available schema types and the resolvers types */ +export type ResolversTypes = { + Account: ResolverTypeWrapper['Account']>; + String: ResolverTypeWrapper; + ID: ResolverTypeWrapper; + Int: ResolverTypeWrapper; + AccountDeletePayload: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; + AccountDisableNotificationCategoryInput: AccountDisableNotificationCategoryInput; + AccountDisableNotificationChannelInput: AccountDisableNotificationChannelInput; + AccountEnableNotificationCategoryInput: AccountEnableNotificationCategoryInput; + AccountEnableNotificationChannelInput: AccountEnableNotificationChannelInput; + AccountLevel: AccountLevel; + AccountLimit: ResolverTypeWrapper['AccountLimit']>; + AccountLimits: ResolverTypeWrapper; + AccountUpdateDefaultWalletIdInput: AccountUpdateDefaultWalletIdInput; + AccountUpdateDefaultWalletIdPayload: ResolverTypeWrapper; + AccountUpdateDisplayCurrencyInput: AccountUpdateDisplayCurrencyInput; + AccountUpdateDisplayCurrencyPayload: ResolverTypeWrapper; + AccountUpdateNotificationSettingsPayload: ResolverTypeWrapper; + AuthToken: ResolverTypeWrapper; + AuthTokenPayload: ResolverTypeWrapper; + BTCWallet: ResolverTypeWrapper; + BuildInformation: ResolverTypeWrapper; + CallbackEndpoint: ResolverTypeWrapper; + CallbackEndpointAddInput: CallbackEndpointAddInput; + CallbackEndpointAddPayload: ResolverTypeWrapper; + CallbackEndpointDeleteInput: CallbackEndpointDeleteInput; + CaptchaCreateChallengePayload: ResolverTypeWrapper; + CaptchaCreateChallengeResult: ResolverTypeWrapper; + CaptchaRequestAuthCodeInput: CaptchaRequestAuthCodeInput; + CentAmount: ResolverTypeWrapper; + CentAmountPayload: ResolverTypeWrapper; + ConsumerAccount: ResolverTypeWrapper; + ContactAlias: ResolverTypeWrapper; + Coordinates: ResolverTypeWrapper; + Float: ResolverTypeWrapper; + Country: ResolverTypeWrapper; + CountryCode: ResolverTypeWrapper; + Currency: ResolverTypeWrapper; + DepositFeesInformation: ResolverTypeWrapper; + DeviceNotificationTokenCreateInput: DeviceNotificationTokenCreateInput; + DisplayCurrency: ResolverTypeWrapper; + Email: ResolverTypeWrapper; + EmailAddress: ResolverTypeWrapper; + EmailRegistrationId: ResolverTypeWrapper; + EndpointId: ResolverTypeWrapper; + EndpointUrl: ResolverTypeWrapper; + Error: ResolverTypeWrapper['Error']>; + ExchangeCurrencyUnit: ExchangeCurrencyUnit; + Feedback: ResolverTypeWrapper; + FeedbackSubmitInput: FeedbackSubmitInput; + FeesInformation: ResolverTypeWrapper; + Globals: ResolverTypeWrapper; + GraphQLApplicationError: ResolverTypeWrapper; + Hex32Bytes: ResolverTypeWrapper; + InitiationVia: ResolverTypeWrapper['InitiationVia']>; + InitiationViaIntraLedger: ResolverTypeWrapper; + InitiationViaLn: ResolverTypeWrapper; + InitiationViaOnChain: ResolverTypeWrapper; + IntraLedgerPaymentSendInput: IntraLedgerPaymentSendInput; + IntraLedgerUpdate: ResolverTypeWrapper; + IntraLedgerUsdPaymentSendInput: IntraLedgerUsdPaymentSendInput; + InvoicePaymentStatus: InvoicePaymentStatus; + Language: ResolverTypeWrapper; + Leader: ResolverTypeWrapper; + Leaderboard: ResolverTypeWrapper; + LeaderboardName: ResolverTypeWrapper; + LnInvoice: ResolverTypeWrapper; + LnInvoiceCreateInput: LnInvoiceCreateInput; + LnInvoiceCreateOnBehalfOfRecipientInput: LnInvoiceCreateOnBehalfOfRecipientInput; + LnInvoiceFeeProbeInput: LnInvoiceFeeProbeInput; + LnInvoicePayload: ResolverTypeWrapper; + LnInvoicePaymentInput: LnInvoicePaymentInput; + LnInvoicePaymentStatusInput: LnInvoicePaymentStatusInput; + LnInvoicePaymentStatusPayload: ResolverTypeWrapper; + LnNoAmountInvoice: ResolverTypeWrapper; + LnNoAmountInvoiceCreateInput: LnNoAmountInvoiceCreateInput; + LnNoAmountInvoiceCreateOnBehalfOfRecipientInput: LnNoAmountInvoiceCreateOnBehalfOfRecipientInput; + LnNoAmountInvoiceFeeProbeInput: LnNoAmountInvoiceFeeProbeInput; + LnNoAmountInvoicePayload: ResolverTypeWrapper; + LnNoAmountInvoicePaymentInput: LnNoAmountInvoicePaymentInput; + LnNoAmountUsdInvoiceFeeProbeInput: LnNoAmountUsdInvoiceFeeProbeInput; + LnNoAmountUsdInvoicePaymentInput: LnNoAmountUsdInvoicePaymentInput; + LnPaymentPreImage: ResolverTypeWrapper; + LnPaymentRequest: ResolverTypeWrapper; + LnPaymentSecret: ResolverTypeWrapper; + LnUpdate: ResolverTypeWrapper; + LnUsdInvoiceCreateInput: LnUsdInvoiceCreateInput; + LnUsdInvoiceCreateOnBehalfOfRecipientInput: LnUsdInvoiceCreateOnBehalfOfRecipientInput; + LnUsdInvoiceFeeProbeInput: LnUsdInvoiceFeeProbeInput; + MapInfo: ResolverTypeWrapper; + MapMarker: ResolverTypeWrapper; + Memo: ResolverTypeWrapper; + Minutes: ResolverTypeWrapper; + MobileVersions: ResolverTypeWrapper; + Mutation: ResolverTypeWrapper<{}>; + MyUpdatesPayload: ResolverTypeWrapper & { update?: Maybe }>; + Network: Network; + NotificationCategory: ResolverTypeWrapper; + NotificationChannel: NotificationChannel; + NotificationChannelSettings: ResolverTypeWrapper; + NotificationSettings: ResolverTypeWrapper; + OnChainAddress: ResolverTypeWrapper; + OnChainAddressCreateInput: OnChainAddressCreateInput; + OnChainAddressCurrentInput: OnChainAddressCurrentInput; + OnChainAddressPayload: ResolverTypeWrapper; + OnChainPaymentSendAllInput: OnChainPaymentSendAllInput; + OnChainPaymentSendInput: OnChainPaymentSendInput; + OnChainTxFee: ResolverTypeWrapper; + OnChainTxHash: ResolverTypeWrapper; + OnChainUpdate: ResolverTypeWrapper; + OnChainUsdPaymentSendAsBtcDenominatedInput: OnChainUsdPaymentSendAsBtcDenominatedInput; + OnChainUsdPaymentSendInput: OnChainUsdPaymentSendInput; + OnChainUsdTxFee: ResolverTypeWrapper; + OneDayAccountLimit: ResolverTypeWrapper; + OneTimeAuthCode: ResolverTypeWrapper; + PageInfo: ResolverTypeWrapper; + PaymentHash: ResolverTypeWrapper; + PaymentSendPayload: ResolverTypeWrapper; + PaymentSendResult: PaymentSendResult; + PayoutSpeed: PayoutSpeed; + Phone: ResolverTypeWrapper; + PhoneCodeChannelType: PhoneCodeChannelType; + Price: ResolverTypeWrapper; + PriceGraphRange: PriceGraphRange; + PriceInput: PriceInput; + PriceInterface: ResolverTypeWrapper['PriceInterface']>; + PriceOfOneSatInMinorUnit: ResolverTypeWrapper; + PriceOfOneSettlementMinorUnitInDisplayMinorUnit: ResolverTypeWrapper; + PriceOfOneUsdCentInMinorUnit: ResolverTypeWrapper; + PricePayload: ResolverTypeWrapper; + PricePoint: ResolverTypeWrapper; + PublicWallet: ResolverTypeWrapper; + Query: ResolverTypeWrapper<{}>; + Quiz: ResolverTypeWrapper; + QuizCompletedInput: QuizCompletedInput; + QuizCompletedPayload: ResolverTypeWrapper; + QuizQuestion: ResolverTypeWrapper; + RealtimePrice: ResolverTypeWrapper; + RealtimePriceInput: RealtimePriceInput; + RealtimePricePayload: ResolverTypeWrapper; + SafeInt: ResolverTypeWrapper; + SatAmount: ResolverTypeWrapper; + SatAmountPayload: ResolverTypeWrapper; + Seconds: ResolverTypeWrapper; + SettlementVia: ResolverTypeWrapper['SettlementVia']>; + SettlementViaIntraLedger: ResolverTypeWrapper; + SettlementViaLn: ResolverTypeWrapper; + SettlementViaOnChain: ResolverTypeWrapper; + SignedAmount: ResolverTypeWrapper; + SignedDisplayMajorAmount: ResolverTypeWrapper; + Subscription: ResolverTypeWrapper<{}>; + SuccessPayload: ResolverTypeWrapper; + Timestamp: ResolverTypeWrapper; + TotpCode: ResolverTypeWrapper; + TotpRegistrationId: ResolverTypeWrapper; + TotpSecret: ResolverTypeWrapper; + Transaction: ResolverTypeWrapper & { initiationVia: ResolversTypes['InitiationVia'], settlementVia: ResolversTypes['SettlementVia'] }>; + TransactionConnection: ResolverTypeWrapper; + TransactionEdge: ResolverTypeWrapper; + TxDirection: TxDirection; + TxNotificationType: TxNotificationType; + TxStatus: TxStatus; + UpgradePayload: ResolverTypeWrapper; + UsdWallet: ResolverTypeWrapper; + User: ResolverTypeWrapper; + UserContact: ResolverTypeWrapper; + UserContactUpdateAliasInput: UserContactUpdateAliasInput; + UserContactUpdateAliasPayload: ResolverTypeWrapper; + UserEmailDeletePayload: ResolverTypeWrapper; + UserEmailRegistrationInitiateInput: UserEmailRegistrationInitiateInput; + UserEmailRegistrationInitiatePayload: ResolverTypeWrapper; + UserEmailRegistrationValidateInput: UserEmailRegistrationValidateInput; + UserEmailRegistrationValidatePayload: ResolverTypeWrapper; + UserLoginInput: UserLoginInput; + UserLoginUpgradeInput: UserLoginUpgradeInput; + UserLogoutInput: UserLogoutInput; + UserPhoneDeletePayload: ResolverTypeWrapper; + UserPhoneRegistrationInitiateInput: UserPhoneRegistrationInitiateInput; + UserPhoneRegistrationValidateInput: UserPhoneRegistrationValidateInput; + UserPhoneRegistrationValidatePayload: ResolverTypeWrapper; + UserQuizQuestion: ResolverTypeWrapper; + UserQuizQuestionUpdateCompletedInput: UserQuizQuestionUpdateCompletedInput; + UserQuizQuestionUpdateCompletedPayload: ResolverTypeWrapper; + UserTotpDeleteInput: UserTotpDeleteInput; + UserTotpDeletePayload: ResolverTypeWrapper; + UserTotpRegistrationInitiateInput: UserTotpRegistrationInitiateInput; + UserTotpRegistrationInitiatePayload: ResolverTypeWrapper; + UserTotpRegistrationValidateInput: UserTotpRegistrationValidateInput; + UserTotpRegistrationValidatePayload: ResolverTypeWrapper; + UserUpdate: ResolverTypeWrapper['UserUpdate']>; + UserUpdateLanguageInput: UserUpdateLanguageInput; + UserUpdateLanguagePayload: ResolverTypeWrapper; + UserUpdateUsernameInput: UserUpdateUsernameInput; + UserUpdateUsernamePayload: ResolverTypeWrapper; + Username: ResolverTypeWrapper; + Wallet: ResolverTypeWrapper['Wallet']>; + WalletCurrency: WalletCurrency; + WalletId: ResolverTypeWrapper; + WelcomeLeaderboardInput: WelcomeLeaderboardInput; + WelcomeProfile: ResolverTypeWrapper; + WelcomeRange: WelcomeRange; +}; + +/** Mapping between all available schema types and the resolvers parents */ +export type ResolversParentTypes = { + Account: ResolversInterfaceTypes['Account']; + String: Scalars['String']['output']; + ID: Scalars['ID']['output']; + Int: Scalars['Int']['output']; + AccountDeletePayload: AccountDeletePayload; + Boolean: Scalars['Boolean']['output']; + AccountDisableNotificationCategoryInput: AccountDisableNotificationCategoryInput; + AccountDisableNotificationChannelInput: AccountDisableNotificationChannelInput; + AccountEnableNotificationCategoryInput: AccountEnableNotificationCategoryInput; + AccountEnableNotificationChannelInput: AccountEnableNotificationChannelInput; + AccountLimit: ResolversInterfaceTypes['AccountLimit']; + AccountLimits: AccountLimits; + AccountUpdateDefaultWalletIdInput: AccountUpdateDefaultWalletIdInput; + AccountUpdateDefaultWalletIdPayload: AccountUpdateDefaultWalletIdPayload; + AccountUpdateDisplayCurrencyInput: AccountUpdateDisplayCurrencyInput; + AccountUpdateDisplayCurrencyPayload: AccountUpdateDisplayCurrencyPayload; + AccountUpdateNotificationSettingsPayload: AccountUpdateNotificationSettingsPayload; + AuthToken: Scalars['AuthToken']['output']; + AuthTokenPayload: AuthTokenPayload; + BTCWallet: BtcWallet; + BuildInformation: BuildInformation; + CallbackEndpoint: CallbackEndpoint; + CallbackEndpointAddInput: CallbackEndpointAddInput; + CallbackEndpointAddPayload: CallbackEndpointAddPayload; + CallbackEndpointDeleteInput: CallbackEndpointDeleteInput; + CaptchaCreateChallengePayload: CaptchaCreateChallengePayload; + CaptchaCreateChallengeResult: CaptchaCreateChallengeResult; + CaptchaRequestAuthCodeInput: CaptchaRequestAuthCodeInput; + CentAmount: Scalars['CentAmount']['output']; + CentAmountPayload: CentAmountPayload; + ConsumerAccount: ConsumerAccount; + ContactAlias: Scalars['ContactAlias']['output']; + Coordinates: Coordinates; + Float: Scalars['Float']['output']; + Country: Country; + CountryCode: Scalars['CountryCode']['output']; + Currency: Currency; + DepositFeesInformation: DepositFeesInformation; + DeviceNotificationTokenCreateInput: DeviceNotificationTokenCreateInput; + DisplayCurrency: Scalars['DisplayCurrency']['output']; + Email: Email; + EmailAddress: Scalars['EmailAddress']['output']; + EmailRegistrationId: Scalars['EmailRegistrationId']['output']; + EndpointId: Scalars['EndpointId']['output']; + EndpointUrl: Scalars['EndpointUrl']['output']; + Error: ResolversInterfaceTypes['Error']; + Feedback: Scalars['Feedback']['output']; + FeedbackSubmitInput: FeedbackSubmitInput; + FeesInformation: FeesInformation; + Globals: Globals; + GraphQLApplicationError: GraphQlApplicationError; + Hex32Bytes: Scalars['Hex32Bytes']['output']; + InitiationVia: ResolversUnionTypes['InitiationVia']; + InitiationViaIntraLedger: InitiationViaIntraLedger; + InitiationViaLn: InitiationViaLn; + InitiationViaOnChain: InitiationViaOnChain; + IntraLedgerPaymentSendInput: IntraLedgerPaymentSendInput; + IntraLedgerUpdate: IntraLedgerUpdate; + IntraLedgerUsdPaymentSendInput: IntraLedgerUsdPaymentSendInput; + Language: Scalars['Language']['output']; + Leader: Leader; + Leaderboard: Leaderboard; + LeaderboardName: Scalars['LeaderboardName']['output']; + LnInvoice: LnInvoice; + LnInvoiceCreateInput: LnInvoiceCreateInput; + LnInvoiceCreateOnBehalfOfRecipientInput: LnInvoiceCreateOnBehalfOfRecipientInput; + LnInvoiceFeeProbeInput: LnInvoiceFeeProbeInput; + LnInvoicePayload: LnInvoicePayload; + LnInvoicePaymentInput: LnInvoicePaymentInput; + LnInvoicePaymentStatusInput: LnInvoicePaymentStatusInput; + LnInvoicePaymentStatusPayload: LnInvoicePaymentStatusPayload; + LnNoAmountInvoice: LnNoAmountInvoice; + LnNoAmountInvoiceCreateInput: LnNoAmountInvoiceCreateInput; + LnNoAmountInvoiceCreateOnBehalfOfRecipientInput: LnNoAmountInvoiceCreateOnBehalfOfRecipientInput; + LnNoAmountInvoiceFeeProbeInput: LnNoAmountInvoiceFeeProbeInput; + LnNoAmountInvoicePayload: LnNoAmountInvoicePayload; + LnNoAmountInvoicePaymentInput: LnNoAmountInvoicePaymentInput; + LnNoAmountUsdInvoiceFeeProbeInput: LnNoAmountUsdInvoiceFeeProbeInput; + LnNoAmountUsdInvoicePaymentInput: LnNoAmountUsdInvoicePaymentInput; + LnPaymentPreImage: Scalars['LnPaymentPreImage']['output']; + LnPaymentRequest: Scalars['LnPaymentRequest']['output']; + LnPaymentSecret: Scalars['LnPaymentSecret']['output']; + LnUpdate: LnUpdate; + LnUsdInvoiceCreateInput: LnUsdInvoiceCreateInput; + LnUsdInvoiceCreateOnBehalfOfRecipientInput: LnUsdInvoiceCreateOnBehalfOfRecipientInput; + LnUsdInvoiceFeeProbeInput: LnUsdInvoiceFeeProbeInput; + MapInfo: MapInfo; + MapMarker: MapMarker; + Memo: Scalars['Memo']['output']; + Minutes: Scalars['Minutes']['output']; + MobileVersions: MobileVersions; + Mutation: {}; + MyUpdatesPayload: Omit & { update?: Maybe }; + NotificationCategory: Scalars['NotificationCategory']['output']; + NotificationChannelSettings: NotificationChannelSettings; + NotificationSettings: NotificationSettings; + OnChainAddress: Scalars['OnChainAddress']['output']; + OnChainAddressCreateInput: OnChainAddressCreateInput; + OnChainAddressCurrentInput: OnChainAddressCurrentInput; + OnChainAddressPayload: OnChainAddressPayload; + OnChainPaymentSendAllInput: OnChainPaymentSendAllInput; + OnChainPaymentSendInput: OnChainPaymentSendInput; + OnChainTxFee: OnChainTxFee; + OnChainTxHash: Scalars['OnChainTxHash']['output']; + OnChainUpdate: OnChainUpdate; + OnChainUsdPaymentSendAsBtcDenominatedInput: OnChainUsdPaymentSendAsBtcDenominatedInput; + OnChainUsdPaymentSendInput: OnChainUsdPaymentSendInput; + OnChainUsdTxFee: OnChainUsdTxFee; + OneDayAccountLimit: OneDayAccountLimit; + OneTimeAuthCode: Scalars['OneTimeAuthCode']['output']; + PageInfo: PageInfo; + PaymentHash: Scalars['PaymentHash']['output']; + PaymentSendPayload: PaymentSendPayload; + Phone: Scalars['Phone']['output']; + Price: Price; + PriceInput: PriceInput; + PriceInterface: ResolversInterfaceTypes['PriceInterface']; + PriceOfOneSatInMinorUnit: PriceOfOneSatInMinorUnit; + PriceOfOneSettlementMinorUnitInDisplayMinorUnit: PriceOfOneSettlementMinorUnitInDisplayMinorUnit; + PriceOfOneUsdCentInMinorUnit: PriceOfOneUsdCentInMinorUnit; + PricePayload: PricePayload; + PricePoint: PricePoint; + PublicWallet: PublicWallet; + Query: {}; + Quiz: Quiz; + QuizCompletedInput: QuizCompletedInput; + QuizCompletedPayload: QuizCompletedPayload; + QuizQuestion: QuizQuestion; + RealtimePrice: RealtimePrice; + RealtimePriceInput: RealtimePriceInput; + RealtimePricePayload: RealtimePricePayload; + SafeInt: Scalars['SafeInt']['output']; + SatAmount: Scalars['SatAmount']['output']; + SatAmountPayload: SatAmountPayload; + Seconds: Scalars['Seconds']['output']; + SettlementVia: ResolversUnionTypes['SettlementVia']; + SettlementViaIntraLedger: SettlementViaIntraLedger; + SettlementViaLn: SettlementViaLn; + SettlementViaOnChain: SettlementViaOnChain; + SignedAmount: Scalars['SignedAmount']['output']; + SignedDisplayMajorAmount: Scalars['SignedDisplayMajorAmount']['output']; + Subscription: {}; + SuccessPayload: SuccessPayload; + Timestamp: Scalars['Timestamp']['output']; + TotpCode: Scalars['TotpCode']['output']; + TotpRegistrationId: Scalars['TotpRegistrationId']['output']; + TotpSecret: Scalars['TotpSecret']['output']; + Transaction: Omit & { initiationVia: ResolversParentTypes['InitiationVia'], settlementVia: ResolversParentTypes['SettlementVia'] }; + TransactionConnection: TransactionConnection; + TransactionEdge: TransactionEdge; + UpgradePayload: UpgradePayload; + UsdWallet: UsdWallet; + User: User; + UserContact: UserContact; + UserContactUpdateAliasInput: UserContactUpdateAliasInput; + UserContactUpdateAliasPayload: UserContactUpdateAliasPayload; + UserEmailDeletePayload: UserEmailDeletePayload; + UserEmailRegistrationInitiateInput: UserEmailRegistrationInitiateInput; + UserEmailRegistrationInitiatePayload: UserEmailRegistrationInitiatePayload; + UserEmailRegistrationValidateInput: UserEmailRegistrationValidateInput; + UserEmailRegistrationValidatePayload: UserEmailRegistrationValidatePayload; + UserLoginInput: UserLoginInput; + UserLoginUpgradeInput: UserLoginUpgradeInput; + UserLogoutInput: UserLogoutInput; + UserPhoneDeletePayload: UserPhoneDeletePayload; + UserPhoneRegistrationInitiateInput: UserPhoneRegistrationInitiateInput; + UserPhoneRegistrationValidateInput: UserPhoneRegistrationValidateInput; + UserPhoneRegistrationValidatePayload: UserPhoneRegistrationValidatePayload; + UserQuizQuestion: UserQuizQuestion; + UserQuizQuestionUpdateCompletedInput: UserQuizQuestionUpdateCompletedInput; + UserQuizQuestionUpdateCompletedPayload: UserQuizQuestionUpdateCompletedPayload; + UserTotpDeleteInput: UserTotpDeleteInput; + UserTotpDeletePayload: UserTotpDeletePayload; + UserTotpRegistrationInitiateInput: UserTotpRegistrationInitiateInput; + UserTotpRegistrationInitiatePayload: UserTotpRegistrationInitiatePayload; + UserTotpRegistrationValidateInput: UserTotpRegistrationValidateInput; + UserTotpRegistrationValidatePayload: UserTotpRegistrationValidatePayload; + UserUpdate: ResolversUnionTypes['UserUpdate']; + UserUpdateLanguageInput: UserUpdateLanguageInput; + UserUpdateLanguagePayload: UserUpdateLanguagePayload; + UserUpdateUsernameInput: UserUpdateUsernameInput; + UserUpdateUsernamePayload: UserUpdateUsernamePayload; + Username: Scalars['Username']['output']; + Wallet: ResolversInterfaceTypes['Wallet']; + WalletId: Scalars['WalletId']['output']; + WelcomeLeaderboardInput: WelcomeLeaderboardInput; + WelcomeProfile: WelcomeProfile; +}; + +export type DeferDirectiveArgs = { + if?: Scalars['Boolean']['input']; + label?: Maybe; +}; + +export type DeferDirectiveResolver = DirectiveResolverFn; + +export type AccountResolvers = { + __resolveType: TypeResolveFn<'ConsumerAccount', ParentType, ContextType>; + callbackEndpoints?: Resolver, ParentType, ContextType>; + csvTransactions?: Resolver>; + defaultWalletId?: Resolver; + displayCurrency?: Resolver; + id?: Resolver; + level?: Resolver; + limits?: Resolver; + notificationSettings?: Resolver; + realtimePrice?: Resolver; + transactions?: Resolver, ParentType, ContextType, Partial>; + wallets?: Resolver, ParentType, ContextType>; +}; + +export type AccountDeletePayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + success?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type AccountLimitResolvers = { + __resolveType: TypeResolveFn<'OneDayAccountLimit', ParentType, ContextType>; + interval?: Resolver, ParentType, ContextType>; + remainingLimit?: Resolver, ParentType, ContextType>; + totalLimit?: Resolver; +}; + +export type AccountLimitsResolvers = { + convert?: Resolver, ParentType, ContextType>; + internalSend?: Resolver, ParentType, ContextType>; + withdrawal?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type AccountUpdateDefaultWalletIdPayloadResolvers = { + account?: Resolver, ParentType, ContextType>; + errors?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type AccountUpdateDisplayCurrencyPayloadResolvers = { + account?: Resolver, ParentType, ContextType>; + errors?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type AccountUpdateNotificationSettingsPayloadResolvers = { + account?: Resolver, ParentType, ContextType>; + errors?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export interface AuthTokenScalarConfig extends GraphQLScalarTypeConfig { + name: 'AuthToken'; +} + +export type AuthTokenPayloadResolvers = { + authToken?: Resolver, ParentType, ContextType>; + errors?: Resolver, ParentType, ContextType>; + totpRequired?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type BtcWalletResolvers = { + accountId?: Resolver; + balance?: Resolver; + id?: Resolver; + pendingIncomingBalance?: Resolver; + transactions?: Resolver, ParentType, ContextType, Partial>; + transactionsByAddress?: Resolver, ParentType, ContextType, RequireFields>; + walletCurrency?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type BuildInformationResolvers = { + commitHash?: Resolver, ParentType, ContextType>; + helmRevision?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type CallbackEndpointResolvers = { + id?: Resolver; + url?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type CallbackEndpointAddPayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + id?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type CaptchaCreateChallengePayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + result?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type CaptchaCreateChallengeResultResolvers = { + challengeCode?: Resolver; + failbackMode?: Resolver; + id?: Resolver; + newCaptcha?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export interface CentAmountScalarConfig extends GraphQLScalarTypeConfig { + name: 'CentAmount'; +} + +export type CentAmountPayloadResolvers = { + amount?: Resolver, ParentType, ContextType>; + errors?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ConsumerAccountResolvers = { + callbackEndpoints?: Resolver, ParentType, ContextType>; + csvTransactions?: Resolver>; + defaultWalletId?: Resolver; + displayCurrency?: Resolver; + id?: Resolver; + level?: Resolver; + limits?: Resolver; + notificationSettings?: Resolver; + quiz?: Resolver, ParentType, ContextType>; + realtimePrice?: Resolver; + transactions?: Resolver, ParentType, ContextType, Partial>; + wallets?: Resolver, ParentType, ContextType>; + welcomeProfile?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export interface ContactAliasScalarConfig extends GraphQLScalarTypeConfig { + name: 'ContactAlias'; +} + +export type CoordinatesResolvers = { + latitude?: Resolver; + longitude?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type CountryResolvers = { + id?: Resolver; + supportedAuthChannels?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export interface CountryCodeScalarConfig extends GraphQLScalarTypeConfig { + name: 'CountryCode'; +} + +export type CurrencyResolvers = { + flag?: Resolver; + fractionDigits?: Resolver; + id?: Resolver; + name?: Resolver; + symbol?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type DepositFeesInformationResolvers = { + minBankFee?: Resolver; + minBankFeeThreshold?: Resolver; + ratio?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export interface DisplayCurrencyScalarConfig extends GraphQLScalarTypeConfig { + name: 'DisplayCurrency'; +} + +export type EmailResolvers = { + address?: Resolver, ParentType, ContextType>; + verified?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export interface EmailAddressScalarConfig extends GraphQLScalarTypeConfig { + name: 'EmailAddress'; +} + +export interface EmailRegistrationIdScalarConfig extends GraphQLScalarTypeConfig { + name: 'EmailRegistrationId'; +} + +export interface EndpointIdScalarConfig extends GraphQLScalarTypeConfig { + name: 'EndpointId'; +} + +export interface EndpointUrlScalarConfig extends GraphQLScalarTypeConfig { + name: 'EndpointUrl'; +} + +export type ErrorResolvers = { + __resolveType: TypeResolveFn<'GraphQLApplicationError', ParentType, ContextType>; + code?: Resolver, ParentType, ContextType>; + message?: Resolver; + path?: Resolver>>, ParentType, ContextType>; +}; + +export interface FeedbackScalarConfig extends GraphQLScalarTypeConfig { + name: 'Feedback'; +} + +export type FeesInformationResolvers = { + deposit?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type GlobalsResolvers = { + buildInformation?: Resolver; + feesInformation?: Resolver; + lightningAddressDomain?: Resolver; + lightningAddressDomainAliases?: Resolver, ParentType, ContextType>; + network?: Resolver; + nodesIds?: Resolver, ParentType, ContextType>; + supportedCountries?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type GraphQlApplicationErrorResolvers = { + code?: Resolver, ParentType, ContextType>; + message?: Resolver; + path?: Resolver>>, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export interface Hex32BytesScalarConfig extends GraphQLScalarTypeConfig { + name: 'Hex32Bytes'; +} + +export type InitiationViaResolvers = { + __resolveType: TypeResolveFn<'InitiationViaIntraLedger' | 'InitiationViaLn' | 'InitiationViaOnChain', ParentType, ContextType>; +}; + +export type InitiationViaIntraLedgerResolvers = { + counterPartyUsername?: Resolver, ParentType, ContextType>; + counterPartyWalletId?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type InitiationViaLnResolvers = { + paymentHash?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type InitiationViaOnChainResolvers = { + address?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type IntraLedgerUpdateResolvers = { + amount?: Resolver; + displayCurrencyPerSat?: Resolver; + txNotificationType?: Resolver; + usdPerSat?: Resolver; + walletId?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export interface LanguageScalarConfig extends GraphQLScalarTypeConfig { + name: 'Language'; +} + +export type LeaderResolvers = { + name?: Resolver, ParentType, ContextType>; + points?: Resolver; + rank?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type LeaderboardResolvers = { + leaders?: Resolver, ParentType, ContextType>; + range?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export interface LeaderboardNameScalarConfig extends GraphQLScalarTypeConfig { + name: 'LeaderboardName'; +} + +export type LnInvoiceResolvers = { + paymentHash?: Resolver; + paymentRequest?: Resolver; + paymentSecret?: Resolver; + satoshis?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type LnInvoicePayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + invoice?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type LnInvoicePaymentStatusPayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + status?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type LnNoAmountInvoiceResolvers = { + paymentHash?: Resolver; + paymentRequest?: Resolver; + paymentSecret?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type LnNoAmountInvoicePayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + invoice?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export interface LnPaymentPreImageScalarConfig extends GraphQLScalarTypeConfig { + name: 'LnPaymentPreImage'; +} + +export interface LnPaymentRequestScalarConfig extends GraphQLScalarTypeConfig { + name: 'LnPaymentRequest'; +} + +export interface LnPaymentSecretScalarConfig extends GraphQLScalarTypeConfig { + name: 'LnPaymentSecret'; +} + +export type LnUpdateResolvers = { + paymentHash?: Resolver; + status?: Resolver; + walletId?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type MapInfoResolvers = { + coordinates?: Resolver; + title?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type MapMarkerResolvers = { + mapInfo?: Resolver; + username?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export interface MemoScalarConfig extends GraphQLScalarTypeConfig { + name: 'Memo'; +} + +export interface MinutesScalarConfig extends GraphQLScalarTypeConfig { + name: 'Minutes'; +} + +export type MobileVersionsResolvers = { + currentSupported?: Resolver; + minSupported?: Resolver; + platform?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type MutationResolvers = { + accountDelete?: Resolver; + accountDisableNotificationCategory?: Resolver>; + accountDisableNotificationChannel?: Resolver>; + accountEnableNotificationCategory?: Resolver>; + accountEnableNotificationChannel?: Resolver>; + accountUpdateDefaultWalletId?: Resolver>; + accountUpdateDisplayCurrency?: Resolver>; + callbackEndpointAdd?: Resolver>; + callbackEndpointDelete?: Resolver>; + captchaCreateChallenge?: Resolver; + captchaRequestAuthCode?: Resolver>; + deviceNotificationTokenCreate?: Resolver>; + feedbackSubmit?: Resolver>; + intraLedgerPaymentSend?: Resolver>; + intraLedgerUsdPaymentSend?: Resolver>; + lnInvoiceCreate?: Resolver>; + lnInvoiceCreateOnBehalfOfRecipient?: Resolver>; + lnInvoiceFeeProbe?: Resolver>; + lnInvoicePaymentSend?: Resolver>; + lnNoAmountInvoiceCreate?: Resolver>; + lnNoAmountInvoiceCreateOnBehalfOfRecipient?: Resolver>; + lnNoAmountInvoiceFeeProbe?: Resolver>; + lnNoAmountInvoicePaymentSend?: Resolver>; + lnNoAmountUsdInvoiceFeeProbe?: Resolver>; + lnNoAmountUsdInvoicePaymentSend?: Resolver>; + lnUsdInvoiceCreate?: Resolver>; + lnUsdInvoiceCreateOnBehalfOfRecipient?: Resolver>; + lnUsdInvoiceFeeProbe?: Resolver>; + onChainAddressCreate?: Resolver>; + onChainAddressCurrent?: Resolver>; + onChainPaymentSend?: Resolver>; + onChainPaymentSendAll?: Resolver>; + onChainUsdPaymentSend?: Resolver>; + onChainUsdPaymentSendAsBtcDenominated?: Resolver>; + quizCompleted?: Resolver>; + userContactUpdateAlias?: Resolver>; + userEmailDelete?: Resolver; + userEmailRegistrationInitiate?: Resolver>; + userEmailRegistrationValidate?: Resolver>; + userLogin?: Resolver>; + userLoginUpgrade?: Resolver>; + userLogout?: Resolver>; + userPhoneDelete?: Resolver; + userPhoneRegistrationInitiate?: Resolver>; + userPhoneRegistrationValidate?: Resolver>; + userQuizQuestionUpdateCompleted?: Resolver>; + userTotpDelete?: Resolver>; + userTotpRegistrationInitiate?: Resolver>; + userTotpRegistrationValidate?: Resolver>; + userUpdateLanguage?: Resolver>; + userUpdateUsername?: Resolver>; +}; + +export type MyUpdatesPayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + me?: Resolver, ParentType, ContextType>; + update?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export interface NotificationCategoryScalarConfig extends GraphQLScalarTypeConfig { + name: 'NotificationCategory'; +} + +export type NotificationChannelSettingsResolvers = { + disabledCategories?: Resolver, ParentType, ContextType>; + enabled?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type NotificationSettingsResolvers = { + push?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export interface OnChainAddressScalarConfig extends GraphQLScalarTypeConfig { + name: 'OnChainAddress'; +} + +export type OnChainAddressPayloadResolvers = { + address?: Resolver, ParentType, ContextType>; + errors?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type OnChainTxFeeResolvers = { + amount?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export interface OnChainTxHashScalarConfig extends GraphQLScalarTypeConfig { + name: 'OnChainTxHash'; +} + +export type OnChainUpdateResolvers = { + amount?: Resolver; + displayCurrencyPerSat?: Resolver; + txHash?: Resolver; + txNotificationType?: Resolver; + usdPerSat?: Resolver; + walletId?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type OnChainUsdTxFeeResolvers = { + amount?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type OneDayAccountLimitResolvers = { + interval?: Resolver, ParentType, ContextType>; + remainingLimit?: Resolver, ParentType, ContextType>; + totalLimit?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export interface OneTimeAuthCodeScalarConfig extends GraphQLScalarTypeConfig { + name: 'OneTimeAuthCode'; +} + +export type PageInfoResolvers = { + endCursor?: Resolver, ParentType, ContextType>; + hasNextPage?: Resolver; + hasPreviousPage?: Resolver; + startCursor?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export interface PaymentHashScalarConfig extends GraphQLScalarTypeConfig { + name: 'PaymentHash'; +} + +export type PaymentSendPayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + status?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export interface PhoneScalarConfig extends GraphQLScalarTypeConfig { + name: 'Phone'; +} + +export type PriceResolvers = { + base?: Resolver; + currencyUnit?: Resolver; + formattedAmount?: Resolver; + offset?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type PriceInterfaceResolvers = { + __resolveType: TypeResolveFn<'PriceOfOneSatInMinorUnit' | 'PriceOfOneSettlementMinorUnitInDisplayMinorUnit' | 'PriceOfOneUsdCentInMinorUnit', ParentType, ContextType>; + base?: Resolver; + currencyUnit?: Resolver; + offset?: Resolver; +}; + +export type PriceOfOneSatInMinorUnitResolvers = { + base?: Resolver; + currencyUnit?: Resolver; + offset?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type PriceOfOneSettlementMinorUnitInDisplayMinorUnitResolvers = { + base?: Resolver; + currencyUnit?: Resolver; + formattedAmount?: Resolver; + offset?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type PriceOfOneUsdCentInMinorUnitResolvers = { + base?: Resolver; + currencyUnit?: Resolver; + offset?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type PricePayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + price?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type PricePointResolvers = { + price?: Resolver; + timestamp?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type PublicWalletResolvers = { + id?: Resolver; + walletCurrency?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type QueryResolvers = { + accountDefaultWallet?: Resolver>; + btcPrice?: Resolver, ParentType, ContextType, RequireFields>; + btcPriceList?: Resolver>>, ParentType, ContextType, RequireFields>; + businessMapMarkers?: Resolver>>, ParentType, ContextType>; + currencyList?: Resolver, ParentType, ContextType>; + globals?: Resolver, ParentType, ContextType>; + lnInvoicePaymentStatus?: Resolver>; + me?: Resolver, ParentType, ContextType>; + mobileVersions?: Resolver>>, ParentType, ContextType>; + onChainTxFee?: Resolver>; + onChainUsdTxFee?: Resolver>; + onChainUsdTxFeeAsBtcDenominated?: Resolver>; + quizQuestions?: Resolver>>, ParentType, ContextType>; + realtimePrice?: Resolver>; + userDefaultWalletId?: Resolver>; + usernameAvailable?: Resolver, ParentType, ContextType, RequireFields>; + welcomeLeaderboard?: Resolver>; +}; + +export type QuizResolvers = { + amount?: Resolver; + completed?: Resolver; + id?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type QuizCompletedPayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + quiz?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type QuizQuestionResolvers = { + earnAmount?: Resolver; + id?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type RealtimePriceResolvers = { + btcSatPrice?: Resolver; + denominatorCurrency?: Resolver; + id?: Resolver; + timestamp?: Resolver; + usdCentPrice?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type RealtimePricePayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + realtimePrice?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export interface SafeIntScalarConfig extends GraphQLScalarTypeConfig { + name: 'SafeInt'; +} + +export interface SatAmountScalarConfig extends GraphQLScalarTypeConfig { + name: 'SatAmount'; +} + +export type SatAmountPayloadResolvers = { + amount?: Resolver, ParentType, ContextType>; + errors?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export interface SecondsScalarConfig extends GraphQLScalarTypeConfig { + name: 'Seconds'; +} + +export type SettlementViaResolvers = { + __resolveType: TypeResolveFn<'SettlementViaIntraLedger' | 'SettlementViaLn' | 'SettlementViaOnChain', ParentType, ContextType>; +}; + +export type SettlementViaIntraLedgerResolvers = { + counterPartyUsername?: Resolver, ParentType, ContextType>; + counterPartyWalletId?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type SettlementViaLnResolvers = { + paymentSecret?: Resolver, ParentType, ContextType>; + preImage?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type SettlementViaOnChainResolvers = { + transactionHash?: Resolver, ParentType, ContextType>; + vout?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export interface SignedAmountScalarConfig extends GraphQLScalarTypeConfig { + name: 'SignedAmount'; +} + +export interface SignedDisplayMajorAmountScalarConfig extends GraphQLScalarTypeConfig { + name: 'SignedDisplayMajorAmount'; +} + +export type SubscriptionResolvers = { + lnInvoicePaymentStatus?: SubscriptionResolver>; + myUpdates?: SubscriptionResolver; + price?: SubscriptionResolver>; + realtimePrice?: SubscriptionResolver>; +}; + +export type SuccessPayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + success?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export interface TimestampScalarConfig extends GraphQLScalarTypeConfig { + name: 'Timestamp'; +} + +export interface TotpCodeScalarConfig extends GraphQLScalarTypeConfig { + name: 'TotpCode'; +} + +export interface TotpRegistrationIdScalarConfig extends GraphQLScalarTypeConfig { + name: 'TotpRegistrationId'; +} + +export interface TotpSecretScalarConfig extends GraphQLScalarTypeConfig { + name: 'TotpSecret'; +} + +export type TransactionResolvers = { + createdAt?: Resolver; + direction?: Resolver; + id?: Resolver; + initiationVia?: Resolver; + memo?: Resolver, ParentType, ContextType>; + settlementAmount?: Resolver; + settlementCurrency?: Resolver; + settlementDisplayAmount?: Resolver; + settlementDisplayCurrency?: Resolver; + settlementDisplayFee?: Resolver; + settlementFee?: Resolver; + settlementPrice?: Resolver; + settlementVia?: Resolver; + status?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type TransactionConnectionResolvers = { + edges?: Resolver>, ParentType, ContextType>; + pageInfo?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type TransactionEdgeResolvers = { + cursor?: Resolver; + node?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type UpgradePayloadResolvers = { + authToken?: Resolver, ParentType, ContextType>; + errors?: Resolver, ParentType, ContextType>; + success?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type UsdWalletResolvers = { + accountId?: Resolver; + balance?: Resolver; + id?: Resolver; + pendingIncomingBalance?: Resolver; + transactions?: Resolver, ParentType, ContextType, Partial>; + transactionsByAddress?: Resolver, ParentType, ContextType, RequireFields>; + walletCurrency?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type UserResolvers = { + contactByUsername?: Resolver>; + contacts?: Resolver, ParentType, ContextType>; + createdAt?: Resolver; + defaultAccount?: Resolver; + email?: Resolver, ParentType, ContextType>; + id?: Resolver; + language?: Resolver; + phone?: Resolver, ParentType, ContextType>; + quizQuestions?: Resolver, ParentType, ContextType>; + totpEnabled?: Resolver; + username?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type UserContactResolvers = { + alias?: Resolver, ParentType, ContextType>; + id?: Resolver; + transactions?: Resolver, ParentType, ContextType, Partial>; + transactionsCount?: Resolver; + username?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type UserContactUpdateAliasPayloadResolvers = { + contact?: Resolver, ParentType, ContextType>; + errors?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type UserEmailDeletePayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + me?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type UserEmailRegistrationInitiatePayloadResolvers = { + emailRegistrationId?: Resolver, ParentType, ContextType>; + errors?: Resolver, ParentType, ContextType>; + me?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type UserEmailRegistrationValidatePayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + me?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type UserPhoneDeletePayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + me?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type UserPhoneRegistrationValidatePayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + me?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type UserQuizQuestionResolvers = { + completed?: Resolver; + question?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type UserQuizQuestionUpdateCompletedPayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + userQuizQuestion?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type UserTotpDeletePayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + me?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type UserTotpRegistrationInitiatePayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + totpRegistrationId?: Resolver, ParentType, ContextType>; + totpSecret?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type UserTotpRegistrationValidatePayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + me?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type UserUpdateResolvers = { + __resolveType: TypeResolveFn<'IntraLedgerUpdate' | 'LnUpdate' | 'OnChainUpdate' | 'Price' | 'RealtimePrice', ParentType, ContextType>; +}; + +export type UserUpdateLanguagePayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + user?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type UserUpdateUsernamePayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + user?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export interface UsernameScalarConfig extends GraphQLScalarTypeConfig { + name: 'Username'; +} + +export type WalletResolvers = { + __resolveType: TypeResolveFn<'BTCWallet' | 'UsdWallet', ParentType, ContextType>; + accountId?: Resolver; + balance?: Resolver; + id?: Resolver; + pendingIncomingBalance?: Resolver; + transactions?: Resolver, ParentType, ContextType, Partial>; + transactionsByAddress?: Resolver, ParentType, ContextType, RequireFields>; + walletCurrency?: Resolver; +}; + +export interface WalletIdScalarConfig extends GraphQLScalarTypeConfig { + name: 'WalletId'; +} + +export type WelcomeProfileResolvers = { + allTimePoints?: Resolver; + allTimeRank?: Resolver; + innerCircleAllTimeCount?: Resolver; + innerCircleThisMonthCount?: Resolver; + leaderboardName?: Resolver, ParentType, ContextType>; + outerCircleAllTimeCount?: Resolver; + outerCircleThisMonthCount?: Resolver; + thisMonthPoints?: Resolver; + thisMonthRank?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type Resolvers = { + Account?: AccountResolvers; + AccountDeletePayload?: AccountDeletePayloadResolvers; + AccountLimit?: AccountLimitResolvers; + AccountLimits?: AccountLimitsResolvers; + AccountUpdateDefaultWalletIdPayload?: AccountUpdateDefaultWalletIdPayloadResolvers; + AccountUpdateDisplayCurrencyPayload?: AccountUpdateDisplayCurrencyPayloadResolvers; + AccountUpdateNotificationSettingsPayload?: AccountUpdateNotificationSettingsPayloadResolvers; + AuthToken?: GraphQLScalarType; + AuthTokenPayload?: AuthTokenPayloadResolvers; + BTCWallet?: BtcWalletResolvers; + BuildInformation?: BuildInformationResolvers; + CallbackEndpoint?: CallbackEndpointResolvers; + CallbackEndpointAddPayload?: CallbackEndpointAddPayloadResolvers; + CaptchaCreateChallengePayload?: CaptchaCreateChallengePayloadResolvers; + CaptchaCreateChallengeResult?: CaptchaCreateChallengeResultResolvers; + CentAmount?: GraphQLScalarType; + CentAmountPayload?: CentAmountPayloadResolvers; + ConsumerAccount?: ConsumerAccountResolvers; + ContactAlias?: GraphQLScalarType; + Coordinates?: CoordinatesResolvers; + Country?: CountryResolvers; + CountryCode?: GraphQLScalarType; + Currency?: CurrencyResolvers; + DepositFeesInformation?: DepositFeesInformationResolvers; + DisplayCurrency?: GraphQLScalarType; + Email?: EmailResolvers; + EmailAddress?: GraphQLScalarType; + EmailRegistrationId?: GraphQLScalarType; + EndpointId?: GraphQLScalarType; + EndpointUrl?: GraphQLScalarType; + Error?: ErrorResolvers; + Feedback?: GraphQLScalarType; + FeesInformation?: FeesInformationResolvers; + Globals?: GlobalsResolvers; + GraphQLApplicationError?: GraphQlApplicationErrorResolvers; + Hex32Bytes?: GraphQLScalarType; + InitiationVia?: InitiationViaResolvers; + InitiationViaIntraLedger?: InitiationViaIntraLedgerResolvers; + InitiationViaLn?: InitiationViaLnResolvers; + InitiationViaOnChain?: InitiationViaOnChainResolvers; + IntraLedgerUpdate?: IntraLedgerUpdateResolvers; + Language?: GraphQLScalarType; + Leader?: LeaderResolvers; + Leaderboard?: LeaderboardResolvers; + LeaderboardName?: GraphQLScalarType; + LnInvoice?: LnInvoiceResolvers; + LnInvoicePayload?: LnInvoicePayloadResolvers; + LnInvoicePaymentStatusPayload?: LnInvoicePaymentStatusPayloadResolvers; + LnNoAmountInvoice?: LnNoAmountInvoiceResolvers; + LnNoAmountInvoicePayload?: LnNoAmountInvoicePayloadResolvers; + LnPaymentPreImage?: GraphQLScalarType; + LnPaymentRequest?: GraphQLScalarType; + LnPaymentSecret?: GraphQLScalarType; + LnUpdate?: LnUpdateResolvers; + MapInfo?: MapInfoResolvers; + MapMarker?: MapMarkerResolvers; + Memo?: GraphQLScalarType; + Minutes?: GraphQLScalarType; + MobileVersions?: MobileVersionsResolvers; + Mutation?: MutationResolvers; + MyUpdatesPayload?: MyUpdatesPayloadResolvers; + NotificationCategory?: GraphQLScalarType; + NotificationChannelSettings?: NotificationChannelSettingsResolvers; + NotificationSettings?: NotificationSettingsResolvers; + OnChainAddress?: GraphQLScalarType; + OnChainAddressPayload?: OnChainAddressPayloadResolvers; + OnChainTxFee?: OnChainTxFeeResolvers; + OnChainTxHash?: GraphQLScalarType; + OnChainUpdate?: OnChainUpdateResolvers; + OnChainUsdTxFee?: OnChainUsdTxFeeResolvers; + OneDayAccountLimit?: OneDayAccountLimitResolvers; + OneTimeAuthCode?: GraphQLScalarType; + PageInfo?: PageInfoResolvers; + PaymentHash?: GraphQLScalarType; + PaymentSendPayload?: PaymentSendPayloadResolvers; + Phone?: GraphQLScalarType; + Price?: PriceResolvers; + PriceInterface?: PriceInterfaceResolvers; + PriceOfOneSatInMinorUnit?: PriceOfOneSatInMinorUnitResolvers; + PriceOfOneSettlementMinorUnitInDisplayMinorUnit?: PriceOfOneSettlementMinorUnitInDisplayMinorUnitResolvers; + PriceOfOneUsdCentInMinorUnit?: PriceOfOneUsdCentInMinorUnitResolvers; + PricePayload?: PricePayloadResolvers; + PricePoint?: PricePointResolvers; + PublicWallet?: PublicWalletResolvers; + Query?: QueryResolvers; + Quiz?: QuizResolvers; + QuizCompletedPayload?: QuizCompletedPayloadResolvers; + QuizQuestion?: QuizQuestionResolvers; + RealtimePrice?: RealtimePriceResolvers; + RealtimePricePayload?: RealtimePricePayloadResolvers; + SafeInt?: GraphQLScalarType; + SatAmount?: GraphQLScalarType; + SatAmountPayload?: SatAmountPayloadResolvers; + Seconds?: GraphQLScalarType; + SettlementVia?: SettlementViaResolvers; + SettlementViaIntraLedger?: SettlementViaIntraLedgerResolvers; + SettlementViaLn?: SettlementViaLnResolvers; + SettlementViaOnChain?: SettlementViaOnChainResolvers; + SignedAmount?: GraphQLScalarType; + SignedDisplayMajorAmount?: GraphQLScalarType; + Subscription?: SubscriptionResolvers; + SuccessPayload?: SuccessPayloadResolvers; + Timestamp?: GraphQLScalarType; + TotpCode?: GraphQLScalarType; + TotpRegistrationId?: GraphQLScalarType; + TotpSecret?: GraphQLScalarType; + Transaction?: TransactionResolvers; + TransactionConnection?: TransactionConnectionResolvers; + TransactionEdge?: TransactionEdgeResolvers; + UpgradePayload?: UpgradePayloadResolvers; + UsdWallet?: UsdWalletResolvers; + User?: UserResolvers; + UserContact?: UserContactResolvers; + UserContactUpdateAliasPayload?: UserContactUpdateAliasPayloadResolvers; + UserEmailDeletePayload?: UserEmailDeletePayloadResolvers; + UserEmailRegistrationInitiatePayload?: UserEmailRegistrationInitiatePayloadResolvers; + UserEmailRegistrationValidatePayload?: UserEmailRegistrationValidatePayloadResolvers; + UserPhoneDeletePayload?: UserPhoneDeletePayloadResolvers; + UserPhoneRegistrationValidatePayload?: UserPhoneRegistrationValidatePayloadResolvers; + UserQuizQuestion?: UserQuizQuestionResolvers; + UserQuizQuestionUpdateCompletedPayload?: UserQuizQuestionUpdateCompletedPayloadResolvers; + UserTotpDeletePayload?: UserTotpDeletePayloadResolvers; + UserTotpRegistrationInitiatePayload?: UserTotpRegistrationInitiatePayloadResolvers; + UserTotpRegistrationValidatePayload?: UserTotpRegistrationValidatePayloadResolvers; + UserUpdate?: UserUpdateResolvers; + UserUpdateLanguagePayload?: UserUpdateLanguagePayloadResolvers; + UserUpdateUsernamePayload?: UserUpdateUsernamePayloadResolvers; + Username?: GraphQLScalarType; + Wallet?: WalletResolvers; + WalletId?: GraphQLScalarType; + WelcomeProfile?: WelcomeProfileResolvers; +}; + +export type DirectiveResolvers = { + defer?: DeferDirectiveResolver; +}; diff --git a/apps/dashboard/app/graphql/index.ts b/apps/dashboard/app/graphql/index.ts new file mode 100644 index 0000000000..75f29da76b --- /dev/null +++ b/apps/dashboard/app/graphql/index.ts @@ -0,0 +1,26 @@ +import { ApolloClient, HttpLink, InMemoryCache } from "@apollo/client" +import { registerApolloClient } from "@apollo/experimental-nextjs-app-support/rsc" + +import { loadDevMessages, loadErrorMessages } from "@apollo/client/dev" + +import { coreUrl } from "./config" + +export const apollo = (token: string) => + registerApolloClient(() => { + return new ApolloClient({ + cache: new InMemoryCache(), + link: new HttpLink({ + headers: { + ["Oauth2-Token"]: token, + }, + uri: coreUrl, + // you can disable result caching here if you want to + // (this does not work if you are rendering your page with `export const dynamic = "force-static"`) + fetchOptions: { cache: "no-store" }, + }), + }) + }) + +// TODO: Adds messages only in a dev environment +loadDevMessages() +loadErrorMessages() diff --git a/apps/dashboard/app/layout.tsx b/apps/dashboard/app/layout.tsx new file mode 100644 index 0000000000..ae84562123 --- /dev/null +++ b/apps/dashboard/app/layout.tsx @@ -0,0 +1,22 @@ +import './globals.css' +import type { Metadata } from 'next' +import { Inter } from 'next/font/google' + +const inter = Inter({ subsets: ['latin'] }) + +export const metadata: Metadata = { + title: 'Create Next App', + description: 'Generated by create next app', +} + +export default function RootLayout({ + children, +}: { + children: React.ReactNode +}) { + return ( + + {children} + + ) +} diff --git a/apps/dashboard/app/page.tsx b/apps/dashboard/app/page.tsx new file mode 100644 index 0000000000..32ba6559f8 --- /dev/null +++ b/apps/dashboard/app/page.tsx @@ -0,0 +1,56 @@ +import { NextRequest } from "next/server" +import { getServerSession } from "next-auth/next" +import { authOptions } from "./api/auth/[...nextauth]/route" +import { gql } from "@apollo/client" +import { apollo } from "./graphql" +import { MeDocument, MeQuery } from "./graphql/generated" + +gql` + query me { + me { + defaultAccount { + id + level + } + } + } +` + +export default async function Home(req: NextRequest) { + const session = await getServerSession(authOptions) + console.log("sessionHome", session) + const isAuthed = session?.sub ?? false + + const token = session?.accessToken + + const client = apollo(token).getClient() + + let level: string | undefined = "undefined" + + try { + const data = await client.query({ + query: MeDocument, + }) + level = data.data.me?.defaultAccount?.level + } catch (e) { + console.log("error", e) + } + + return ( +
+ {isAuthed && ( + <> +

logged in

+

UserId: {session.sub}

+

Level: {level}

+ + )} + {!isAuthed && ( + <> +

not logged in

+ Sign in + + )} +
+ ) +} diff --git a/apps/dashboard/bun.lockb b/apps/dashboard/bun.lockb new file mode 100755 index 0000000000..8818368af3 Binary files /dev/null and b/apps/dashboard/bun.lockb differ diff --git a/apps/dashboard/codegen.yml b/apps/dashboard/codegen.yml new file mode 100644 index 0000000000..e259312282 --- /dev/null +++ b/apps/dashboard/codegen.yml @@ -0,0 +1,66 @@ +overwrite: true +schema: "https://api.staging.galoy.io/graphql" +# schema: "./supergraph.graphql" +documents: + - "app/**/*.ts" + - "app/**/*.tsx" + - "e2e/**/*.ts" +generates: + app/graphql/generated.ts: + plugins: + - typescript + - typescript-operations + - typescript-react-apollo + - typescript-resolvers + - add: + content: "// this file is autogenerated by codegen" + - add: + content: "\/* eslint-disable *\/" + config: + # typesPrefix: GQL + enumsAsConst: true + immutableTypes: true + strictScalars: true + nonOptionalTypename: true + federation: 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" + LeaderboardName: "string" + join__FieldSet: "string" + link__Import: "string" + _FieldSet: "string" + EndpointId: "string" + EndpointUrl: "string" + NotificationCategory: "string" diff --git a/apps/dashboard/next.config.js b/apps/dashboard/next.config.js new file mode 100644 index 0000000000..767719fc4f --- /dev/null +++ b/apps/dashboard/next.config.js @@ -0,0 +1,4 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = {} + +module.exports = nextConfig diff --git a/apps/dashboard/package.json b/apps/dashboard/package.json new file mode 100644 index 0000000000..dc7a08e293 --- /dev/null +++ b/apps/dashboard/package.json @@ -0,0 +1,40 @@ +{ + "name": "dashboard", + "version": "0.1.0", + "private": true, + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start", + "lint": "next lint", + "codegen": "graphql-codegen --config codegen.yml" + }, + "dependencies": { + "@apollo/client": "^3.8.4", + "@apollo/experimental-nextjs-app-support": "^0.4.3", + "graphql": "^16.8.1", + "next": "latest", + "next-auth": "^4.23.1", + "react": "latest", + "react-dom": "latest" + }, + "devDependencies": { + "@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.0.0", + "@graphql-codegen/typescript-resolvers": "^4.0.1", + "@graphql-inspector/cli": "^4.0.2", + "@types/node": "latest", + "@types/react": "latest", + "@types/react-dom": "latest", + "autoprefixer": "latest", + "eslint": "latest", + "eslint-config-next": "latest", + "postcss": "latest", + "tailwindcss": "latest", + "typescript": "latest" + } +} diff --git a/apps/dashboard/postcss.config.js b/apps/dashboard/postcss.config.js new file mode 100644 index 0000000000..33ad091d26 --- /dev/null +++ b/apps/dashboard/postcss.config.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/apps/dashboard/public/next.svg b/apps/dashboard/public/next.svg new file mode 100644 index 0000000000..5174b28c56 --- /dev/null +++ b/apps/dashboard/public/next.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/dashboard/public/vercel.svg b/apps/dashboard/public/vercel.svg new file mode 100644 index 0000000000..d2f8422273 --- /dev/null +++ b/apps/dashboard/public/vercel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/dashboard/tailwind.config.ts b/apps/dashboard/tailwind.config.ts new file mode 100644 index 0000000000..c7ead80465 --- /dev/null +++ b/apps/dashboard/tailwind.config.ts @@ -0,0 +1,20 @@ +import type { Config } from 'tailwindcss' + +const config: Config = { + content: [ + './pages/**/*.{js,ts,jsx,tsx,mdx}', + './components/**/*.{js,ts,jsx,tsx,mdx}', + './app/**/*.{js,ts,jsx,tsx,mdx}', + ], + theme: { + extend: { + backgroundImage: { + 'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))', + 'gradient-conic': + 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))', + }, + }, + }, + plugins: [], +} +export default config diff --git a/apps/dashboard/tsconfig.json b/apps/dashboard/tsconfig.json new file mode 100644 index 0000000000..c714696378 --- /dev/null +++ b/apps/dashboard/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "target": "es5", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "plugins": [ + { + "name": "next" + } + ], + "paths": { + "@/*": ["./*"] + } + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules"] +} diff --git a/dev/ory/oathkeeper_rules.yaml b/dev/ory/oathkeeper_rules.yaml index 40e363b4b9..62cbca321e 100644 --- a/dev/ory/oathkeeper_rules.yaml +++ b/dev/ory/oathkeeper_rules.yaml @@ -93,14 +93,7 @@ url: "<(http|https)>://<.*><[0-9]+>/admin<.*>" methods: ["GET", "POST", "OPTIONS"] authenticators: - # - handler: oauth2_client_credentials - # config: - # token_url: http://hydra:4444/oauth2/token - # required_scope: - # - admin - # - editor - - - handler: cookie_session + - handler: oauth2_introspection config: check_session_url: http://host.docker.internal:3002/api/auth/session preserve_path: true @@ -120,7 +113,6 @@ preserve_query: true subject_from: identity.id extra_from: "@this" - - handler: anonymous authorizer: handler: allow mutators: