diff --git a/core/api/dev/apollo-federation/supergraph.graphql b/core/api/dev/apollo-federation/supergraph.graphql index 61768fb4666..c25e02d22d2 100644 --- a/core/api/dev/apollo-federation/supergraph.graphql +++ b/core/api/dev/apollo-federation/supergraph.graphql @@ -644,6 +644,8 @@ input IntraLedgerUsdPaymentSendInput interface Invoice @join__type(graph: PUBLIC) { + createdAt: Timestamp! + """The payment hash of the lightning invoice.""" paymentHash: PaymentHash! @@ -717,11 +719,12 @@ type LnInvoice implements Invoice @join__implements(graph: PUBLIC, interface: "Invoice") @join__type(graph: PUBLIC) { + createdAt: Timestamp! paymentHash: PaymentHash! paymentRequest: LnPaymentRequest! paymentSecret: LnPaymentSecret! paymentStatus: InvoicePaymentStatus! - satoshis: SatAmount + satoshis: SatAmount! } input LnInvoiceCreateInput @@ -803,6 +806,7 @@ type LnNoAmountInvoice implements Invoice @join__implements(graph: PUBLIC, interface: "Invoice") @join__type(graph: PUBLIC) { + createdAt: Timestamp! paymentHash: PaymentHash! paymentRequest: LnPaymentRequest! paymentSecret: LnPaymentSecret! diff --git a/core/api/src/graphql/public/schema.graphql b/core/api/src/graphql/public/schema.graphql index 8ad8f45a519..3bdfb7822ae 100644 --- a/core/api/src/graphql/public/schema.graphql +++ b/core/api/src/graphql/public/schema.graphql @@ -5,16 +5,24 @@ interface Account { displayCurrency: DisplayCurrency! id: ID! invoices( - """Returns the items in the list that come after the specified cursor.""" + """ + Returns the items in the list that come after the specified cursor. + """ after: String - """Returns the items in the list that come before the specified cursor.""" + """ + Returns the items in the list that come before the specified cursor. + """ before: String - """Returns the first n items from the list.""" + """ + Returns the first n items from the list. + """ first: Int - """Returns the last n items from the list.""" + """ + Returns the last n items from the list. + """ last: Int walletIds: [WalletId] ): InvoiceConnection @@ -24,16 +32,24 @@ interface Account { pendingTransactions(walletIds: [WalletId]): [Transaction!]! realtimePrice: RealtimePrice! transactions( - """Returns the items in the list that come after the specified cursor.""" + """ + Returns the items in the list that come after the specified cursor. + """ after: String - """Returns the items in the list that come before the specified cursor.""" + """ + Returns the items in the list that come before the specified cursor. + """ before: String - """Returns the first n items from the list.""" + """ + Returns the first n items from the list. + """ first: Int - """Returns the last n items from the list.""" + """ + Returns the last n items from the list. + """ last: Int walletIds: [WalletId] ): TransactionConnection @@ -71,7 +87,9 @@ enum AccountLevel { } interface AccountLimit { - """The rolling time interval in seconds that the limits would apply for.""" + """ + The rolling time interval in seconds that the limits would apply for. + """ interval: Seconds """ @@ -79,7 +97,9 @@ interface AccountLimit { """ remainingLimit: CentAmount - """The current maximum limit for a given 24 hour period.""" + """ + The current maximum limit for a given 24 hour period. + """ totalLimit: CentAmount! } @@ -89,10 +109,14 @@ type AccountLimits { """ convert: [AccountLimit!]! - """Limits for sending to other internal accounts.""" + """ + Limits for sending to other internal accounts. + """ internalSend: [AccountLimit!]! - """Limits for withdrawing to external onchain or lightning destinations.""" + """ + Limits for withdrawing to external onchain or lightning destinations. + """ withdrawal: [AccountLimit!]! } @@ -119,7 +143,9 @@ type AccountUpdateNotificationSettingsPayload { errors: [Error!]! } -"""An Opaque Bearer token""" +""" +An Opaque Bearer token +""" scalar AuthToken type AuthTokenPayload { @@ -134,63 +160,99 @@ A wallet belonging to an account which contains a BTC balance and a list of tran type BTCWallet implements Wallet { accountId: ID! - """A balance stored in BTC.""" + """ + A balance stored in BTC. + """ balance: SignedAmount! id: ID! invoiceByPaymentHash(paymentHash: PaymentHash!): Invoice! - """A list of all invoices associated with walletIds optionally passed.""" + """ + A list of all invoices associated with walletIds optionally passed. + """ invoices( - """Returns the items in the list that come after the specified cursor.""" + """ + Returns the items in the list that come after the specified cursor. + """ after: String - """Returns the items in the list that come before the specified cursor.""" + """ + Returns the items in the list that come before the specified cursor. + """ before: String - """Returns the first n items from the list.""" + """ + Returns the first n items from the list. + """ first: Int - """Returns the last n items from the list.""" + """ + Returns the last n items from the list. + """ last: Int ): InvoiceConnection - """An unconfirmed incoming onchain balance.""" + """ + An unconfirmed incoming onchain balance. + """ pendingIncomingBalance: SignedAmount! pendingTransactions: [Transaction!]! pendingTransactionsByAddress( - """Returns the items that include this address.""" + """ + Returns the items that include this address. + """ address: OnChainAddress! ): [Transaction!]! transactionById(transactionId: ID!): Transaction! - """A list of BTC transactions associated with this wallet.""" + """ + A list of BTC transactions associated with this wallet. + """ transactions( - """Returns the items in the list that come after the specified cursor.""" + """ + Returns the items in the list that come after the specified cursor. + """ after: String - """Returns the items in the list that come before the specified cursor.""" + """ + Returns the items in the list that come before the specified cursor. + """ before: String - """Returns the first n items from the list.""" + """ + Returns the first n items from the list. + """ first: Int - """Returns the last n items from the list.""" + """ + Returns the last n items from the list. + """ last: Int ): TransactionConnection transactionsByAddress( - """Returns the items that include this address.""" + """ + Returns the items that include this address. + """ address: OnChainAddress! - """Returns the items in the list that come after the specified cursor.""" + """ + Returns the items in the list that come after the specified cursor. + """ after: String - """Returns the items in the list that come before the specified cursor.""" + """ + Returns the items in the list that come before the specified cursor. + """ before: String - """Returns the first n items from the list.""" + """ + Returns the first n items from the list. + """ first: Int - """Returns the last n items from the list.""" + """ + Returns the last n items from the list. + """ last: Int ): TransactionConnection transactionsByPaymentHash(paymentHash: PaymentHash!): [Transaction!]! @@ -208,7 +270,9 @@ type CallbackEndpoint { } input CallbackEndpointAddInput { - """callback endpoint to be called""" + """ + callback endpoint to be called + """ url: EndpointUrl! } @@ -241,7 +305,9 @@ input CaptchaRequestAuthCodeInput { validationCode: String! } -"""(Positive) Cent amount (1/100 of a dollar)""" +""" +(Positive) Cent amount (1/100 of a dollar) +""" scalar CentAmount type CentAmountPayload { @@ -260,18 +326,28 @@ type ConsumerAccount implements Account { displayCurrency: DisplayCurrency! id: ID! - """A list of all invoices associated with walletIds optionally passed.""" + """ + A list of all invoices associated with walletIds optionally passed. + """ invoices( - """Returns the items in the list that come after the specified cursor.""" + """ + Returns the items in the list that come after the specified cursor. + """ after: String - """Returns the items in the list that come before the specified cursor.""" + """ + Returns the items in the list that come before the specified cursor. + """ before: String - """Returns the first n items from the list.""" + """ + Returns the first n items from the list. + """ first: Int - """Returns the last n items from the list.""" + """ + Returns the last n items from the list. + """ last: Int walletIds: [WalletId] ): InvoiceConnection @@ -280,7 +356,9 @@ type ConsumerAccount implements Account { notificationSettings: NotificationSettings! pendingTransactions(walletIds: [WalletId]): [Transaction!]! - """List the quiz questions of the consumer account""" + """ + List the quiz questions of the consumer account + """ quiz: [Quiz!]! realtimePrice: RealtimePrice! @@ -288,16 +366,24 @@ type ConsumerAccount implements Account { A list of all transactions associated with walletIds optionally passed. """ transactions( - """Returns the items in the list that come after the specified cursor.""" + """ + Returns the items in the list that come after the specified cursor. + """ after: String - """Returns the items in the list that come before the specified cursor.""" + """ + Returns the items in the list that come before the specified cursor. + """ before: String - """Returns the first n items from the list.""" + """ + Returns the first n items from the list. + """ first: Int - """Returns the last n items from the list.""" + """ + Returns the last n items from the list. + """ last: Int walletIds: [WalletId] ): TransactionConnection @@ -320,7 +406,9 @@ type Country { supportedAuthChannels: [PhoneCodeChannelType!]! } -"""A CCA2 country code (ex US, FR, etc)""" +""" +A CCA2 country code (ex US, FR, etc) +""" scalar CountryCode type Currency { @@ -334,10 +422,14 @@ type Currency { type DepositFeesInformation { minBankFee: String! - """below this amount minBankFee will be charged""" + """ + below this amount minBankFee will be charged + """ minBankFeeThreshold: String! - """ratio to charge as basis points above minBankFeeThreshold amount""" + """ + ratio to charge as basis points above minBankFeeThreshold amount + """ ratio: String! } @@ -345,7 +437,9 @@ input DeviceNotificationTokenCreateInput { deviceToken: String! } -"""Display currency of an account""" +""" +Display currency of an account +""" scalar DisplayCurrency type Email { @@ -353,7 +447,9 @@ type Email { verified: Boolean } -"""Email address""" +""" +Email address +""" scalar EmailAddress """ @@ -363,7 +459,9 @@ scalar EmailRegistrationId scalar EndpointId -"""Url that will be fetched on events for the account""" +""" +Url that will be fetched on events for the account +""" scalar EndpointUrl interface Error { @@ -377,7 +475,9 @@ enum ExchangeCurrencyUnit { USDCENT } -"""Feedback shared with our user""" +""" +Feedback shared with our user +""" scalar Feedback input FeedbackSubmitInput { @@ -412,7 +512,9 @@ type Globals { """ nodesIds: [String!]! - """A list of countries and their supported auth channels""" + """ + A list of countries and their supported auth channels + """ supportedCountries: [Country!]! } @@ -422,7 +524,9 @@ type GraphQLApplicationError implements Error { path: [String] } -"""Hex-encoded string of 32 bytes""" +""" +Hex-encoded string of 32 bytes +""" scalar Hex32Bytes union InitiationVia = InitiationViaIntraLedger | InitiationViaLn | InitiationViaOnChain @@ -441,14 +545,20 @@ type InitiationViaOnChain { } input IntraLedgerPaymentSendInput { - """Amount in satoshis.""" + """ + Amount in satoshis. + """ amount: SatAmount! - """Optional memo to be attached to the payment.""" + """ + Optional memo to be attached to the payment. + """ memo: Memo recipientWalletId: WalletId! - """The wallet ID of the sender.""" + """ + The wallet ID of the sender. + """ walletId: WalletId! } @@ -461,23 +571,37 @@ type IntraLedgerUpdate { } input IntraLedgerUsdPaymentSendInput { - """Amount in cents.""" + """ + Amount in cents. + """ amount: CentAmount! - """Optional memo to be attached to the payment.""" + """ + Optional memo to be attached to the payment. + """ memo: Memo recipientWalletId: WalletId! - """The wallet ID of the sender.""" + """ + The wallet ID of the sender. + """ walletId: WalletId! } -"""A lightning invoice.""" +""" +A lightning invoice. +""" interface Invoice { - """The payment hash of the lightning invoice.""" + createdAt: Timestamp! + + """ + The payment hash of the lightning invoice. + """ paymentHash: PaymentHash! - """The bolt11 invoice to be paid.""" + """ + The bolt11 invoice to be paid. + """ paymentRequest: LnPaymentRequest! """ @@ -485,25 +609,39 @@ interface Invoice { """ paymentSecret: LnPaymentSecret! - """The payment status of the invoice.""" + """ + The payment status of the invoice. + """ paymentStatus: InvoicePaymentStatus! } -"""A connection to a list of items.""" +""" +A connection to a list of items. +""" type InvoiceConnection { - """A list of edges.""" + """ + A list of edges. + """ edges: [InvoiceEdge!] - """Information to aid in pagination.""" + """ + Information to aid in pagination. + """ pageInfo: PageInfo! } -"""An edge in a connection.""" +""" +An edge in a connection. +""" type InvoiceEdge { - """A cursor for use in pagination""" + """ + A cursor for use in pagination + """ cursor: String! - """The item at the end of the edge""" + """ + The item at the end of the edge + """ node: Invoice! } @@ -516,39 +654,56 @@ enum InvoicePaymentStatus { scalar Language type LnInvoice implements Invoice { + createdAt: Timestamp! paymentHash: PaymentHash! paymentRequest: LnPaymentRequest! paymentSecret: LnPaymentSecret! paymentStatus: InvoicePaymentStatus! - satoshis: SatAmount + satoshis: SatAmount! } input LnInvoiceCreateInput { - """Amount in satoshis.""" + """ + Amount in satoshis. + """ amount: SatAmount! - """Optional invoice expiration time in minutes.""" + """ + Optional invoice expiration time in minutes. + """ expiresIn: Minutes - """Optional memo for the lightning invoice.""" + """ + Optional memo for the lightning invoice. + """ memo: Memo - """Wallet ID for a BTC wallet belonging to the current account.""" + """ + Wallet ID for a BTC wallet belonging to the current account. + """ walletId: WalletId! } input LnInvoiceCreateOnBehalfOfRecipientInput { - """Amount in satoshis.""" + """ + Amount in satoshis. + """ amount: SatAmount! descriptionHash: Hex32Bytes - """Optional invoice expiration time in minutes.""" + """ + Optional invoice expiration time in minutes. + """ expiresIn: Minutes - """Optional memo for the lightning invoice.""" + """ + Optional memo for the lightning invoice. + """ memo: Memo - """Wallet ID for a BTC wallet which belongs to any account.""" + """ + Wallet ID for a BTC wallet which belongs to any account. + """ recipientWalletId: WalletId! } @@ -563,10 +718,14 @@ type LnInvoicePayload { } input LnInvoicePaymentInput { - """Optional memo to associate with the lightning invoice.""" + """ + Optional memo to associate with the lightning invoice. + """ memo: Memo - """Payment request representing the invoice which is being paid.""" + """ + Payment request representing the invoice which is being paid. + """ paymentRequest: LnPaymentRequest! """ @@ -585,6 +744,7 @@ type LnInvoicePaymentStatusPayload { } type LnNoAmountInvoice implements Invoice { + createdAt: Timestamp! paymentHash: PaymentHash! paymentRequest: LnPaymentRequest! paymentSecret: LnPaymentSecret! @@ -592,10 +752,14 @@ type LnNoAmountInvoice implements Invoice { } input LnNoAmountInvoiceCreateInput { - """Optional invoice expiration time in minutes.""" + """ + Optional invoice expiration time in minutes. + """ expiresIn: Minutes - """Optional memo for the lightning invoice.""" + """ + Optional memo for the lightning invoice. + """ memo: Memo """ @@ -605,10 +769,14 @@ input LnNoAmountInvoiceCreateInput { } input LnNoAmountInvoiceCreateOnBehalfOfRecipientInput { - """Optional invoice expiration time in minutes.""" + """ + Optional invoice expiration time in minutes. + """ expiresIn: Minutes - """Optional memo for the lightning invoice.""" + """ + Optional memo for the lightning invoice. + """ memo: Memo """ @@ -629,13 +797,19 @@ type LnNoAmountInvoicePayload { } input LnNoAmountInvoicePaymentInput { - """Amount to pay in satoshis.""" + """ + Amount to pay in satoshis. + """ amount: SatAmount! - """Optional memo to associate with the lightning invoice.""" + """ + Optional memo to associate with the lightning invoice. + """ memo: Memo - """Payment request representing the invoice which is being paid.""" + """ + Payment request representing the invoice which is being paid. + """ paymentRequest: LnPaymentRequest! """ @@ -651,13 +825,19 @@ input LnNoAmountUsdInvoiceFeeProbeInput { } input LnNoAmountUsdInvoicePaymentInput { - """Amount to pay in USD cents.""" + """ + Amount to pay in USD cents. + """ amount: CentAmount! - """Optional memo to associate with the lightning invoice.""" + """ + Optional memo to associate with the lightning invoice. + """ memo: Memo - """Payment request representing the invoice which is being paid.""" + """ + Payment request representing the invoice which is being paid. + """ paymentRequest: LnPaymentRequest! """ @@ -668,7 +848,9 @@ input LnNoAmountUsdInvoicePaymentInput { scalar LnPaymentPreImage -"""BOLT11 lightning invoice payment request with the amount included""" +""" +BOLT11 lightning invoice payment request with the amount included +""" scalar LnPaymentRequest scalar LnPaymentSecret @@ -680,11 +862,15 @@ type LnUpdate { } input LnUsdInvoiceBtcDenominatedCreateOnBehalfOfRecipientInput { - """Amount in satoshis.""" + """ + Amount in satoshis. + """ amount: SatAmount! descriptionHash: Hex32Bytes - """Optional invoice expiration time in minutes.""" + """ + Optional invoice expiration time in minutes. + """ expiresIn: Minutes """ @@ -692,30 +878,44 @@ input LnUsdInvoiceBtcDenominatedCreateOnBehalfOfRecipientInput { """ memo: Memo - """Wallet ID for a USD wallet which belongs to the account of any user.""" + """ + Wallet ID for a USD wallet which belongs to the account of any user. + """ recipientWalletId: WalletId! } input LnUsdInvoiceCreateInput { - """Amount in USD cents.""" + """ + Amount in USD cents. + """ amount: CentAmount! - """Optional invoice expiration time in minutes.""" + """ + Optional invoice expiration time in minutes. + """ expiresIn: Minutes - """Optional memo for the lightning invoice.""" + """ + Optional memo for the lightning invoice. + """ memo: Memo - """Wallet ID for a USD wallet belonging to the current user.""" + """ + Wallet ID for a USD wallet belonging to the current user. + """ walletId: WalletId! } input LnUsdInvoiceCreateOnBehalfOfRecipientInput { - """Amount in USD cents.""" + """ + Amount in USD cents. + """ amount: CentAmount! descriptionHash: Hex32Bytes - """Optional invoice expiration time in minutes.""" + """ + Optional invoice expiration time in minutes. + """ expiresIn: Minutes """ @@ -723,7 +923,9 @@ input LnUsdInvoiceCreateOnBehalfOfRecipientInput { """ memo: Memo - """Wallet ID for a USD wallet which belongs to the account of any user.""" + """ + Wallet ID for a USD wallet which belongs to the account of any user. + """ recipientWalletId: WalletId! } @@ -742,10 +944,14 @@ type MapMarker { username: Username } -"""Text field in a lightning payment transaction""" +""" +Text field in a lightning payment transaction +""" scalar Memo -"""(Positive) amount of minutes""" +""" +(Positive) amount of minutes +""" scalar Minutes type MobileVersions { @@ -756,17 +962,31 @@ type MobileVersions { type Mutation { accountDelete: AccountDeletePayload! - accountDisableNotificationCategory(input: AccountDisableNotificationCategoryInput!): AccountUpdateNotificationSettingsPayload! - accountDisableNotificationChannel(input: AccountDisableNotificationChannelInput!): AccountUpdateNotificationSettingsPayload! - accountEnableNotificationCategory(input: AccountEnableNotificationCategoryInput!): AccountUpdateNotificationSettingsPayload! - accountEnableNotificationChannel(input: AccountEnableNotificationChannelInput!): AccountUpdateNotificationSettingsPayload! - accountUpdateDefaultWalletId(input: AccountUpdateDefaultWalletIdInput!): AccountUpdateDefaultWalletIdPayload! - accountUpdateDisplayCurrency(input: AccountUpdateDisplayCurrencyInput!): AccountUpdateDisplayCurrencyPayload! + accountDisableNotificationCategory( + input: AccountDisableNotificationCategoryInput! + ): AccountUpdateNotificationSettingsPayload! + accountDisableNotificationChannel( + input: AccountDisableNotificationChannelInput! + ): AccountUpdateNotificationSettingsPayload! + accountEnableNotificationCategory( + input: AccountEnableNotificationCategoryInput! + ): AccountUpdateNotificationSettingsPayload! + accountEnableNotificationChannel( + input: AccountEnableNotificationChannelInput! + ): AccountUpdateNotificationSettingsPayload! + accountUpdateDefaultWalletId( + input: AccountUpdateDefaultWalletIdInput! + ): AccountUpdateDefaultWalletIdPayload! + accountUpdateDisplayCurrency( + input: AccountUpdateDisplayCurrencyInput! + ): AccountUpdateDisplayCurrencyPayload! callbackEndpointAdd(input: CallbackEndpointAddInput!): CallbackEndpointAddPayload! callbackEndpointDelete(input: CallbackEndpointDeleteInput!): SuccessPayload! captchaCreateChallenge: CaptchaCreateChallengePayload! captchaRequestAuthCode(input: CaptchaRequestAuthCodeInput!): SuccessPayload! - deviceNotificationTokenCreate(input: DeviceNotificationTokenCreateInput!): SuccessPayload! + deviceNotificationTokenCreate( + input: DeviceNotificationTokenCreateInput! + ): SuccessPayload! feedbackSubmit(input: FeedbackSubmitInput!): SuccessPayload! """ @@ -795,7 +1015,9 @@ type Mutation { When invoice is paid the value will be credited to a BTC wallet. Expires after 'expiresIn' or 24 hours. """ - lnInvoiceCreateOnBehalfOfRecipient(input: LnInvoiceCreateOnBehalfOfRecipientInput!): LnInvoicePayload! + lnInvoiceCreateOnBehalfOfRecipient( + input: LnInvoiceCreateOnBehalfOfRecipientInput! + ): LnInvoicePayload! lnInvoiceFeeProbe(input: LnInvoiceFeeProbeInput!): SatAmountPayload! """ @@ -817,7 +1039,9 @@ type Mutation { 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. """ - lnNoAmountInvoiceCreateOnBehalfOfRecipient(input: LnNoAmountInvoiceCreateOnBehalfOfRecipientInput!): LnNoAmountInvoicePayload! + lnNoAmountInvoiceCreateOnBehalfOfRecipient( + input: LnNoAmountInvoiceCreateOnBehalfOfRecipientInput! + ): LnNoAmountInvoicePayload! lnNoAmountInvoiceFeeProbe(input: LnNoAmountInvoiceFeeProbeInput!): SatAmountPayload! """ @@ -826,14 +1050,18 @@ type Mutation { Returns payment status (success, failed, pending, already_paid). """ lnNoAmountInvoicePaymentSend(input: LnNoAmountInvoicePaymentInput!): PaymentSendPayload! - lnNoAmountUsdInvoiceFeeProbe(input: LnNoAmountUsdInvoiceFeeProbeInput!): CentAmountPayload! + lnNoAmountUsdInvoiceFeeProbe( + input: LnNoAmountUsdInvoiceFeeProbeInput! + ): 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). """ - lnNoAmountUsdInvoicePaymentSend(input: LnNoAmountUsdInvoicePaymentInput!): PaymentSendPayload! + lnNoAmountUsdInvoicePaymentSend( + input: LnNoAmountUsdInvoicePaymentInput! + ): PaymentSendPayload! """ Returns a lightning invoice denominated in satoshis for an associated wallet. @@ -841,7 +1069,9 @@ type Mutation { Expires after 'expiresIn' or 5 minutes (short expiry time because there is a USD/BTC exchange rate associated with the amount). """ - lnUsdInvoiceBtcDenominatedCreateOnBehalfOfRecipient(input: LnUsdInvoiceBtcDenominatedCreateOnBehalfOfRecipientInput!): LnInvoicePayload! + lnUsdInvoiceBtcDenominatedCreateOnBehalfOfRecipient( + input: LnUsdInvoiceBtcDenominatedCreateOnBehalfOfRecipientInput! + ): LnInvoicePayload! """ Returns a lightning invoice denominated in satoshis for an associated wallet. @@ -857,30 +1087,51 @@ type Mutation { Expires after 'expiresIn' or 5 minutes (short expiry time because there is a USD/BTC exchange rate associated with the amount). """ - lnUsdInvoiceCreateOnBehalfOfRecipient(input: LnUsdInvoiceCreateOnBehalfOfRecipientInput!): LnInvoicePayload! + lnUsdInvoiceCreateOnBehalfOfRecipient( + input: LnUsdInvoiceCreateOnBehalfOfRecipientInput! + ): LnInvoicePayload! lnUsdInvoiceFeeProbe(input: LnUsdInvoiceFeeProbeInput!): SatAmountPayload! onChainAddressCreate(input: OnChainAddressCreateInput!): OnChainAddressPayload! onChainAddressCurrent(input: OnChainAddressCurrentInput!): OnChainAddressPayload! onChainPaymentSend(input: OnChainPaymentSendInput!): PaymentSendPayload! onChainPaymentSendAll(input: OnChainPaymentSendAllInput!): PaymentSendPayload! onChainUsdPaymentSend(input: OnChainUsdPaymentSendInput!): PaymentSendPayload! - onChainUsdPaymentSendAsBtcDenominated(input: OnChainUsdPaymentSendAsBtcDenominatedInput!): PaymentSendPayload! + onChainUsdPaymentSendAsBtcDenominated( + input: OnChainUsdPaymentSendAsBtcDenominatedInput! + ): PaymentSendPayload! quizCompleted(input: QuizCompletedInput!): QuizCompletedPayload! - userContactUpdateAlias(input: UserContactUpdateAliasInput!): UserContactUpdateAliasPayload! @deprecated(reason: "will be moved to AccountContact") + userContactUpdateAlias( + input: UserContactUpdateAliasInput! + ): UserContactUpdateAliasPayload! @deprecated(reason: "will be moved to AccountContact") userEmailDelete: UserEmailDeletePayload! - userEmailRegistrationInitiate(input: UserEmailRegistrationInitiateInput!): UserEmailRegistrationInitiatePayload! - userEmailRegistrationValidate(input: UserEmailRegistrationValidateInput!): UserEmailRegistrationValidatePayload! + userEmailRegistrationInitiate( + input: UserEmailRegistrationInitiateInput! + ): UserEmailRegistrationInitiatePayload! + userEmailRegistrationValidate( + input: UserEmailRegistrationValidateInput! + ): UserEmailRegistrationValidatePayload! userLogin(input: UserLoginInput!): AuthTokenPayload! userLoginUpgrade(input: UserLoginUpgradeInput!): UpgradePayload! userLogout(input: UserLogoutInput): SuccessPayload! userPhoneDelete: UserPhoneDeletePayload! - userPhoneRegistrationInitiate(input: UserPhoneRegistrationInitiateInput!): SuccessPayload! - userPhoneRegistrationValidate(input: UserPhoneRegistrationValidateInput!): UserPhoneRegistrationValidatePayload! + userPhoneRegistrationInitiate( + input: UserPhoneRegistrationInitiateInput! + ): SuccessPayload! + userPhoneRegistrationValidate( + input: UserPhoneRegistrationValidateInput! + ): UserPhoneRegistrationValidatePayload! userTotpDelete(input: UserTotpDeleteInput!): UserTotpDeletePayload! - userTotpRegistrationInitiate(input: UserTotpRegistrationInitiateInput!): UserTotpRegistrationInitiatePayload! - userTotpRegistrationValidate(input: UserTotpRegistrationValidateInput!): UserTotpRegistrationValidatePayload! + userTotpRegistrationInitiate( + input: UserTotpRegistrationInitiateInput! + ): UserTotpRegistrationInitiatePayload! + userTotpRegistrationValidate( + input: UserTotpRegistrationValidateInput! + ): UserTotpRegistrationValidatePayload! userUpdateLanguage(input: UserUpdateLanguageInput!): UserUpdateLanguagePayload! - userUpdateUsername(input: UserUpdateUsernameInput!): UserUpdateUsernamePayload! @deprecated(reason: "Username will be moved to @Handle in Accounts. Also SetUsername naming should be used instead of UpdateUsername to reflect the idempotency of Handles") + userUpdateUsername(input: UserUpdateUsernameInput!): UserUpdateUsernamePayload! + @deprecated( + reason: "Username will be moved to @Handle in Accounts. Also SetUsername naming should be used instead of UpdateUsername to reflect the idempotency of Handles" + ) } type MyUpdatesPayload { @@ -911,7 +1162,9 @@ type NotificationSettings { push: NotificationChannelSettings! } -"""An address for an on-chain bitcoin destination""" +""" +An address for an on-chain bitcoin destination +""" scalar OnChainAddress input OnChainAddressCreateInput { @@ -988,25 +1241,39 @@ type OneDayAccountLimit implements AccountLimit { """ remainingLimit: CentAmount - """The current maximum limit for a given 24 hour period.""" + """ + The current maximum limit for a given 24 hour period. + """ totalLimit: CentAmount! } -"""An authentication code valid for a single use""" +""" +An authentication code valid for a single use +""" scalar OneTimeAuthCode -"""Information about pagination in a connection.""" +""" +Information about pagination in a connection. +""" type PageInfo { - """When paginating forwards, the cursor to continue.""" + """ + When paginating forwards, the cursor to continue. + """ endCursor: String - """When paginating forwards, are there more items?""" + """ + When paginating forwards, are there more items? + """ hasNextPage: Boolean! - """When paginating backwards, are there more items?""" + """ + When paginating backwards, are there more items? + """ hasPreviousPage: Boolean! - """When paginating backwards, the cursor to continue.""" + """ + When paginating backwards, the cursor to continue. + """ startCursor: String } @@ -1028,7 +1295,9 @@ enum PayoutSpeed { FAST } -"""Phone number which includes country code""" +""" +Phone number which includes country code +""" scalar Phone enum PhoneCodeChannelType { @@ -1046,7 +1315,9 @@ type Price { offset: Int! } -"""The range for the X axis in the BTC price graph""" +""" +The range for the X axis in the BTC price graph +""" enum PriceGraphRange { FIVE_YEARS ONE_DAY @@ -1067,7 +1338,9 @@ interface PriceInterface { offset: Int! } -"""Price of 1 sat in base/offset. To calculate, use: `base / 10^offset`""" +""" +Price of 1 sat in base/offset. To calculate, use: `base / 10^offset` +""" type PriceOfOneSatInMinorUnit implements PriceInterface { base: SafeInt! currencyUnit: String! @deprecated(reason: "Deprecated due to type renaming") @@ -1121,22 +1394,47 @@ type Query { businessMapMarkers: [MapMarker] currencyList: [Currency!]! globals: Globals - lnInvoicePaymentStatus(input: LnInvoicePaymentStatusInput!): LnInvoicePaymentStatusPayload! + lnInvoicePaymentStatus( + input: LnInvoicePaymentStatusInput! + ): LnInvoicePaymentStatusPayload! me: User mobileVersions: [MobileVersions] - onChainTxFee(address: OnChainAddress!, amount: SatAmount!, speed: PayoutSpeed! = FAST, walletId: WalletId!): OnChainTxFee! - onChainUsdTxFee(address: OnChainAddress!, amount: CentAmount!, speed: PayoutSpeed! = FAST, walletId: WalletId!): OnChainUsdTxFee! - onChainUsdTxFeeAsBtcDenominated(address: OnChainAddress!, amount: SatAmount!, speed: PayoutSpeed! = FAST, walletId: WalletId!): OnChainUsdTxFee! - quizQuestions: [QuizQuestion] @deprecated(reason: "TODO: remove. we don't need a non authenticated version of this query. the users can only do the query while authenticated") + onChainTxFee( + address: OnChainAddress! + amount: SatAmount! + speed: PayoutSpeed! = FAST + walletId: WalletId! + ): OnChainTxFee! + onChainUsdTxFee( + address: OnChainAddress! + amount: CentAmount! + speed: PayoutSpeed! = FAST + walletId: WalletId! + ): OnChainUsdTxFee! + onChainUsdTxFeeAsBtcDenominated( + address: OnChainAddress! + amount: SatAmount! + speed: PayoutSpeed! = FAST + walletId: WalletId! + ): OnChainUsdTxFee! + quizQuestions: [QuizQuestion] + @deprecated( + reason: "TODO: remove. we don't need a non authenticated version of this query. the users can only do the query while authenticated" + ) - """Returns 1 Sat and 1 Usd Cent price for the given currency""" + """ + Returns 1 Sat and 1 Usd Cent price for the given currency + """ realtimePrice(currency: DisplayCurrency = "USD"): RealtimePrice! - userDefaultWalletId(username: Username!): WalletId! @deprecated(reason: "will be migrated to AccountDefaultWalletId") + userDefaultWalletId(username: Username!): WalletId! + @deprecated(reason: "will be migrated to AccountDefaultWalletId") usernameAvailable(username: Username!): Boolean } type Quiz { - """The reward in Satoshis for the quiz question""" + """ + The reward in Satoshis for the quiz question + """ amount: SatAmount! completed: Boolean! id: ID! @@ -1152,7 +1450,9 @@ type QuizCompletedPayload { } type QuizQuestion { - """The earn reward in Satoshis for the quiz question""" + """ + The earn reward in Satoshis for the quiz question + """ earnAmount: SatAmount! id: ID! } @@ -1183,7 +1483,9 @@ Non-fractional signed whole numeric value between -(2^53) + 1 and 2^53 - 1 """ scalar SafeInt -"""(Positive) Satoshi amount""" +""" +(Positive) Satoshi amount +""" scalar SatAmount type SatAmountPayload { @@ -1191,7 +1493,9 @@ type SatAmountPayload { errors: [Error!]! } -"""(Positive) amount of seconds""" +""" +(Positive) amount of seconds +""" scalar Seconds union SettlementVia = SettlementViaIntraLedger | SettlementViaLn | SettlementViaOnChain @@ -1205,7 +1509,10 @@ type SettlementViaIntraLedger { } type SettlementViaLn { - paymentSecret: LnPaymentSecret @deprecated(reason: "Shifting property to 'preImage' to improve granularity of the LnPaymentSecret type") + paymentSecret: LnPaymentSecret + @deprecated( + reason: "Shifting property to 'preImage' to improve granularity of the LnPaymentSecret type" + ) preImage: LnPaymentPreImage } @@ -1214,7 +1521,9 @@ type SettlementViaOnChain { vout: Int } -"""An amount (of a currency) that can be negative (e.g. in a transaction)""" +""" +An amount (of a currency) that can be negative (e.g. in a transaction) +""" scalar SignedAmount """ @@ -1223,11 +1532,15 @@ A string amount (of a currency) that can be negative (e.g. in a transaction) scalar SignedDisplayMajorAmount type Subscription { - lnInvoicePaymentStatus(input: LnInvoicePaymentStatusInput!): LnInvoicePaymentStatusPayload! + lnInvoicePaymentStatus( + input: LnInvoicePaymentStatusInput! + ): LnInvoicePaymentStatusPayload! myUpdates: MyUpdatesPayload! price(input: PriceInput!): PricePayload! - """Returns the price of 1 satoshi""" + """ + Returns the price of 1 satoshi + """ realtimePrice(input: RealtimePriceInput!): RealtimePricePayload! } @@ -1241,13 +1554,19 @@ Timestamp field, serialized as Unix time (the number of seconds since the Unix e """ scalar Timestamp -"""A time-based one-time password""" +""" +A time-based one-time password +""" scalar TotpCode -"""An id to be passed between set and verify for confirming totp""" +""" +An id to be passed between set and verify for confirming totp +""" scalar TotpRegistrationId -"""A secret to generate time-based one-time password""" +""" +A secret to generate time-based one-time password +""" scalar TotpSecret """ @@ -1262,43 +1581,65 @@ type Transaction { direction: TxDirection! id: ID! - """From which protocol the payment has been initiated.""" + """ + From which protocol the payment has been initiated. + """ initiationVia: InitiationVia! memo: Memo - """Amount of the settlement currency sent or received.""" + """ + Amount of the settlement currency sent or received. + """ settlementAmount: SignedAmount! - """Wallet currency for transaction.""" + """ + Wallet currency for transaction. + """ settlementCurrency: WalletCurrency! settlementDisplayAmount: SignedDisplayMajorAmount! settlementDisplayCurrency: DisplayCurrency! settlementDisplayFee: SignedDisplayMajorAmount! settlementFee: SignedAmount! - """Price in WALLETCURRENCY/SETTLEMENTUNIT at time of settlement.""" + """ + Price in WALLETCURRENCY/SETTLEMENTUNIT at time of settlement. + """ settlementPrice: PriceOfOneSettlementMinorUnitInDisplayMinorUnit! - """To which protocol the payment has settled on.""" + """ + To which protocol the payment has settled on. + """ settlementVia: SettlementVia! status: TxStatus! } -"""A connection to a list of items.""" +""" +A connection to a list of items. +""" type TransactionConnection { - """A list of edges.""" + """ + A list of edges. + """ edges: [TransactionEdge!] - """Information to aid in pagination.""" + """ + Information to aid in pagination. + """ pageInfo: PageInfo! } -"""An edge in a connection.""" +""" +An edge in a connection. +""" type TransactionEdge { - """A cursor for use in pagination""" + """ + A cursor for use in pagination + """ cursor: String! - """The item at the end of the edge""" + """ + The item at the end of the edge + """ node: Transaction! } @@ -1337,56 +1678,88 @@ type UsdWallet implements Wallet { id: ID! invoiceByPaymentHash(paymentHash: PaymentHash!): Invoice! - """A list of all invoices associated with walletIds optionally passed.""" + """ + A list of all invoices associated with walletIds optionally passed. + """ invoices( - """Returns the items in the list that come after the specified cursor.""" + """ + Returns the items in the list that come after the specified cursor. + """ after: String - """Returns the items in the list that come before the specified cursor.""" + """ + Returns the items in the list that come before the specified cursor. + """ before: String - """Returns the first n items from the list.""" + """ + Returns the first n items from the list. + """ first: Int - """Returns the last n items from the list.""" + """ + Returns the last n items from the list. + """ last: Int ): InvoiceConnection - """An unconfirmed incoming onchain balance.""" + """ + An unconfirmed incoming onchain balance. + """ pendingIncomingBalance: SignedAmount! pendingTransactions: [Transaction!]! pendingTransactionsByAddress( - """Returns the items that include this address.""" + """ + Returns the items that include this address. + """ address: OnChainAddress! ): [Transaction!]! transactionById(transactionId: ID!): Transaction! transactions( - """Returns the items in the list that come after the specified cursor.""" + """ + Returns the items in the list that come after the specified cursor. + """ after: String - """Returns the items in the list that come before the specified cursor.""" + """ + Returns the items in the list that come before the specified cursor. + """ before: String - """Returns the first n items from the list.""" + """ + Returns the first n items from the list. + """ first: Int - """Returns the last n items from the list.""" + """ + Returns the last n items from the list. + """ last: Int ): TransactionConnection transactionsByAddress( - """Returns the items that include this address.""" + """ + Returns the items that include this address. + """ address: OnChainAddress! - """Returns the items in the list that come after the specified cursor.""" + """ + Returns the items in the list that come after the specified cursor. + """ after: String - """Returns the items in the list that come before the specified cursor.""" + """ + Returns the items in the list that come before the specified cursor. + """ before: String - """Returns the first n items from the list.""" + """ + Returns the first n items from the list. + """ first: Int - """Returns the last n items from the list.""" + """ + Returns the last n items from the list. + """ last: Int ): TransactionConnection transactionsByPaymentHash(paymentHash: PaymentHash!): [Transaction!]! @@ -1398,7 +1771,8 @@ type User { Get single contact details. Can include the transactions associated with the contact. """ - contactByUsername(username: Username!): UserContact! @deprecated(reason: "will be moved to Accounts") + contactByUsername(username: Username!): UserContact! + @deprecated(reason: "will be moved to Accounts") """ Get full list of contacts. @@ -1408,7 +1782,9 @@ type User { createdAt: Timestamp! defaultAccount: Account! - """Email address""" + """ + Email address + """ email: Email id: ID! @@ -1418,16 +1794,24 @@ type User { """ language: Language! - """Phone number with international calling code.""" + """ + Phone number with international calling code. + """ phone: Phone - """List the quiz questions the user may have completed.""" + """ + List the quiz questions the user may have completed. + """ quizQuestions: [UserQuizQuestion!]! @deprecated(reason: "use Quiz from Account instead") - """Whether TOTP is enabled for this user.""" + """ + Whether TOTP is enabled for this user. + """ totpEnabled: Boolean! - """Optional immutable user friendly identifier.""" + """ + Optional immutable user friendly identifier. + """ username: Username @deprecated(reason: "will be moved to @Handle in Account and Wallet") } @@ -1439,23 +1823,35 @@ type UserContact { alias: ContactAlias id: Username! - """Paginated list of transactions sent to/from this contact.""" + """ + Paginated list of transactions sent to/from this contact. + """ transactions( - """Returns the items in the list that come after the specified cursor.""" + """ + Returns the items in the list that come after the specified cursor. + """ after: String - """Returns the items in the list that come before the specified cursor.""" + """ + Returns the items in the list that come before the specified cursor. + """ before: String - """Returns the first n items from the list.""" + """ + Returns the first n items from the list. + """ first: Int - """Returns the last n items from the list.""" + """ + Returns the last n items from the list. + """ last: Int ): TransactionConnection transactionsCount: Int! - """Actual identifier of the contact.""" + """ + Actual identifier of the contact. + """ username: Username! } @@ -1583,7 +1979,9 @@ type UserUpdateUsernamePayload { user: User } -"""Unique identifier of a user""" +""" +Unique identifier of a user +""" scalar Username """ @@ -1600,16 +1998,24 @@ interface Wallet { paymentHash: PaymentHash! ): Invoice! invoices( - """Returns the items in the list that come after the specified cursor.""" + """ + Returns the items in the list that come after the specified cursor. + """ after: String - """Returns the items in the list that come before the specified cursor.""" + """ + Returns the items in the list that come before the specified cursor. + """ before: String - """Returns the first n items from the list.""" + """ + Returns the first n items from the list. + """ first: Int - """Returns the last n items from the list.""" + """ + Returns the last n items from the list. + """ last: Int ): InvoiceConnection pendingIncomingBalance: SignedAmount! @@ -1629,7 +2035,9 @@ interface Wallet { ie: the newest transaction will be first """ pendingTransactionsByAddress( - """Returns the items that include this address.""" + """ + Returns the items that include this address. + """ address: OnChainAddress! ): [Transaction!]! transactionById(transactionId: ID!): Transaction! @@ -1639,16 +2047,24 @@ interface Wallet { ie: the newest transaction will be first """ transactions( - """Returns the items in the list that come after the specified cursor.""" + """ + Returns the items in the list that come after the specified cursor. + """ after: String - """Returns the items in the list that come before the specified cursor.""" + """ + Returns the items in the list that come before the specified cursor. + """ before: String - """Returns the first n items from the list.""" + """ + Returns the first n items from the list. + """ first: Int - """Returns the last n items from the list.""" + """ + Returns the last n items from the list. + """ last: Int ): TransactionConnection @@ -1657,19 +2073,29 @@ interface Wallet { ie: the newest transaction will be first """ transactionsByAddress( - """Returns the items that include this address.""" + """ + Returns the items that include this address. + """ address: OnChainAddress! - """Returns the items in the list that come after the specified cursor.""" + """ + Returns the items in the list that come after the specified cursor. + """ after: String - """Returns the items in the list that come before the specified cursor.""" + """ + Returns the items in the list that come before the specified cursor. + """ before: String - """Returns the first n items from the list.""" + """ + Returns the first n items from the list. + """ first: Int - """Returns the last n items from the list.""" + """ + Returns the last n items from the list. + """ last: Int ): TransactionConnection @@ -1677,7 +2103,9 @@ interface Wallet { Returns the transactions that include this paymentHash. This should be a list of size one for a received lightning payment. This can be more that one transaction for a sent lightning payment. """ transactionsByPaymentHash( - """The payment hash of the lightning invoice paid in this transaction.""" + """ + The payment hash of the lightning invoice paid in this transaction. + """ paymentHash: PaymentHash! ): [Transaction!]! walletCurrency: WalletCurrency! @@ -1688,5 +2116,7 @@ enum WalletCurrency { USD } -"""Unique identifier of a wallet""" +""" +Unique identifier of a wallet +""" scalar WalletId diff --git a/core/api/src/graphql/shared/types/abstract/invoice.ts b/core/api/src/graphql/shared/types/abstract/invoice.ts index fb4773ad736..9f404963930 100644 --- a/core/api/src/graphql/shared/types/abstract/invoice.ts +++ b/core/api/src/graphql/shared/types/abstract/invoice.ts @@ -5,6 +5,8 @@ import LnPaymentSecret from "../scalar/ln-payment-secret" import InvoicePaymentStatus from "../scalar/invoice-payment-status" +import Timestamp from "../scalar/timestamp" + import { GT } from "@/graphql/index" import { connectionDefinitions } from "@/graphql/connections" @@ -29,6 +31,9 @@ const IInvoice = GT.Interface({ type: GT.NonNull(InvoicePaymentStatus), description: "The payment status of the invoice.", }, + createdAt: { + type: GT.NonNull(Timestamp), + }, }), }) diff --git a/core/api/src/graphql/shared/types/object/ln-invoice.ts b/core/api/src/graphql/shared/types/object/ln-invoice.ts index 0e4defab7c9..2163ab7867d 100644 --- a/core/api/src/graphql/shared/types/object/ln-invoice.ts +++ b/core/api/src/graphql/shared/types/object/ln-invoice.ts @@ -7,6 +7,8 @@ import IInvoice from "../abstract/invoice" import InvoicePaymentStatus from "../scalar/invoice-payment-status" +import Timestamp from "../scalar/timestamp" + import { GT } from "@/graphql/index" import { WalletInvoiceStatusChecker } from "@/domain/wallet-invoices/wallet-invoice-status-checker" @@ -28,7 +30,7 @@ const LnInvoice = GT.Object({ resolve: (source) => source.lnInvoice.paymentSecret, }, satoshis: { - type: SatAmount, + type: GT.NonNull(SatAmount), resolve: (source) => source.lnInvoice.amount, }, paymentStatus: { @@ -39,6 +41,10 @@ const LnInvoice = GT.Object({ return status }, }, + createdAt: { + type: GT.NonNull(Timestamp), + resolve: (source) => source.createdAt, + }, }), }) diff --git a/core/api/src/graphql/shared/types/object/ln-noamount-invoice.ts b/core/api/src/graphql/shared/types/object/ln-noamount-invoice.ts index 9c3772efac4..53e5df68128 100644 --- a/core/api/src/graphql/shared/types/object/ln-noamount-invoice.ts +++ b/core/api/src/graphql/shared/types/object/ln-noamount-invoice.ts @@ -4,6 +4,8 @@ import LnPaymentSecret from "../scalar/ln-payment-secret" import IInvoice from "../abstract/invoice" +import Timestamp from "../scalar/timestamp" + import { GT } from "@/graphql/index" import InvoicePaymentStatus from "@/graphql/shared/types/scalar/invoice-payment-status" import { WalletInvoiceStatusChecker } from "@/domain/wallet-invoices/wallet-invoice-status-checker" @@ -33,6 +35,10 @@ const LnNoAmountInvoice = GT.Object({ return status }, }, + createdAt: { + type: GT.NonNull(Timestamp), + resolve: (source) => source.createdAt, + }, }), }) diff --git a/core/api/src/services/mongoose/wallet-invoices.ts b/core/api/src/services/mongoose/wallet-invoices.ts index f6cbd8821ef..beef11f6817 100644 --- a/core/api/src/services/mongoose/wallet-invoices.ts +++ b/core/api/src/services/mongoose/wallet-invoices.ts @@ -163,8 +163,12 @@ export const WalletInvoicesRepository = (): IWalletInvoicesRepository => { $lt?: Date $gt?: Date } + paymentRequest: { + $exists: true + } } = { walletId: { $in: walletIds }, + paymentRequest: { $exists: true }, } // this could cause a bug if there are multiple invoices with the same timestamp diff --git a/dev/config/apollo-federation/supergraph.graphql b/dev/config/apollo-federation/supergraph.graphql index 61768fb4666..91dbb678296 100644 --- a/dev/config/apollo-federation/supergraph.graphql +++ b/dev/config/apollo-federation/supergraph.graphql @@ -1,7 +1,6 @@ schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.3", for: EXECUTION) -{ + @link(url: "https://specs.apollo.dev/join/v0.3", for: EXECUTION) { query: Query mutation: Mutation subscription: Subscription @@ -9,37 +8,68 @@ schema directive @join__enumValue(graph: join__Graph!) repeatable on ENUM_VALUE -directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field( + graph: join__Graph + requires: join__FieldSet + provides: join__FieldSet + type: String + external: Boolean + override: String + usedOverridden: Boolean +) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE -directive @join__implements(graph: join__Graph!, interface: String!) repeatable on OBJECT | INTERFACE - -directive @join__type(graph: join__Graph!, key: join__FieldSet, extension: Boolean! = false, resolvable: Boolean! = true, isInterfaceObject: Boolean! = false) repeatable on OBJECT | INTERFACE | UNION | ENUM | INPUT_OBJECT | SCALAR - -directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on UNION - -directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA - -interface Account - @join__type(graph: PUBLIC) -{ +directive @join__implements( + graph: join__Graph! + interface: String! +) repeatable on OBJECT | INTERFACE + +directive @join__type( + graph: join__Graph! + key: join__FieldSet + extension: Boolean! = false + resolvable: Boolean! = true + isInterfaceObject: Boolean! = false +) repeatable on OBJECT | INTERFACE | UNION | ENUM | INPUT_OBJECT | SCALAR + +directive @join__unionMember( + graph: join__Graph! + member: String! +) repeatable on UNION + +directive @link( + url: String + as: String + for: link__Purpose + import: [link__Import] +) repeatable on SCHEMA + +interface Account @join__type(graph: PUBLIC) { callbackEndpoints: [CallbackEndpoint!]! csvTransactions(walletIds: [WalletId!]!): String! defaultWalletId: WalletId! displayCurrency: DisplayCurrency! id: ID! invoices( - """Returns the items in the list that come after the specified cursor.""" + """ + Returns the items in the list that come after the specified cursor. + """ after: String - """Returns the items in the list that come before the specified cursor.""" + """ + Returns the items in the list that come before the specified cursor. + """ before: String - """Returns the first n items from the list.""" + """ + Returns the first n items from the list. + """ first: Int - """Returns the last n items from the list.""" + """ + Returns the last n items from the list. + """ last: Int walletIds: [WalletId] ): InvoiceConnection @@ -49,16 +79,24 @@ interface Account pendingTransactions(walletIds: [WalletId]): [Transaction!]! realtimePrice: RealtimePrice! transactions( - """Returns the items in the list that come after the specified cursor.""" + """ + Returns the items in the list that come after the specified cursor. + """ after: String - """Returns the items in the list that come before the specified cursor.""" + """ + Returns the items in the list that come before the specified cursor. + """ before: String - """Returns the first n items from the list.""" + """ + Returns the first n items from the list. + """ first: Int - """Returns the last n items from the list.""" + """ + Returns the last n items from the list. + """ last: Int walletIds: [WalletId] ): TransactionConnection @@ -66,51 +104,39 @@ interface Account wallets: [Wallet!]! } -type AccountDeletePayload - @join__type(graph: PUBLIC) -{ +type AccountDeletePayload @join__type(graph: PUBLIC) { errors: [Error!]! success: Boolean! } -input AccountDisableNotificationCategoryInput - @join__type(graph: PUBLIC) -{ +input AccountDisableNotificationCategoryInput @join__type(graph: PUBLIC) { category: NotificationCategory! channel: NotificationChannel } -input AccountDisableNotificationChannelInput - @join__type(graph: PUBLIC) -{ +input AccountDisableNotificationChannelInput @join__type(graph: PUBLIC) { channel: NotificationChannel! } -input AccountEnableNotificationCategoryInput - @join__type(graph: PUBLIC) -{ +input AccountEnableNotificationCategoryInput @join__type(graph: PUBLIC) { category: NotificationCategory! channel: NotificationChannel } -input AccountEnableNotificationChannelInput - @join__type(graph: PUBLIC) -{ +input AccountEnableNotificationChannelInput @join__type(graph: PUBLIC) { channel: NotificationChannel! } -enum AccountLevel - @join__type(graph: PUBLIC) -{ +enum AccountLevel @join__type(graph: PUBLIC) { ONE @join__enumValue(graph: PUBLIC) TWO @join__enumValue(graph: PUBLIC) ZERO @join__enumValue(graph: PUBLIC) } -interface AccountLimit - @join__type(graph: PUBLIC) -{ - """The rolling time interval in seconds that the limits would apply for.""" +interface AccountLimit @join__type(graph: PUBLIC) { + """ + The rolling time interval in seconds that the limits would apply for. + """ interval: Seconds """ @@ -118,61 +144,53 @@ interface AccountLimit """ remainingLimit: CentAmount - """The current maximum limit for a given 24 hour period.""" + """ + The current maximum limit for a given 24 hour period. + """ totalLimit: CentAmount! } -type AccountLimits - @join__type(graph: PUBLIC) -{ +type AccountLimits @join__type(graph: PUBLIC) { """ Limits for converting between currencies among a account's own wallets. """ convert: [AccountLimit!]! - """Limits for sending to other internal accounts.""" + """ + Limits for sending to other internal accounts. + """ internalSend: [AccountLimit!]! - """Limits for withdrawing to external onchain or lightning destinations.""" + """ + Limits for withdrawing to external onchain or lightning destinations. + """ withdrawal: [AccountLimit!]! } -input AccountUpdateDefaultWalletIdInput - @join__type(graph: PUBLIC) -{ +input AccountUpdateDefaultWalletIdInput @join__type(graph: PUBLIC) { walletId: WalletId! } -type AccountUpdateDefaultWalletIdPayload - @join__type(graph: PUBLIC) -{ +type AccountUpdateDefaultWalletIdPayload @join__type(graph: PUBLIC) { account: ConsumerAccount errors: [Error!]! } -input AccountUpdateDisplayCurrencyInput - @join__type(graph: PUBLIC) -{ +input AccountUpdateDisplayCurrencyInput @join__type(graph: PUBLIC) { currency: DisplayCurrency! } -type AccountUpdateDisplayCurrencyPayload - @join__type(graph: PUBLIC) -{ +type AccountUpdateDisplayCurrencyPayload @join__type(graph: PUBLIC) { account: ConsumerAccount errors: [Error!]! } -type AccountUpdateNotificationSettingsPayload - @join__type(graph: PUBLIC) -{ +type AccountUpdateNotificationSettingsPayload @join__type(graph: PUBLIC) { account: ConsumerAccount errors: [Error!]! } -type ApiKey - @join__type(graph: API_KEYS) -{ +type ApiKey @join__type(graph: API_KEYS) { id: ID! name: String! createdAt: Timestamp! @@ -182,39 +200,30 @@ type ApiKey expiresAt: Timestamp! } -input ApiKeyCreateInput - @join__type(graph: API_KEYS) -{ +input ApiKeyCreateInput @join__type(graph: API_KEYS) { name: String! expireInDays: Int } -type ApiKeyCreatePayload - @join__type(graph: API_KEYS) -{ +type ApiKeyCreatePayload @join__type(graph: API_KEYS) { apiKey: ApiKey! apiKeySecret: String! } -input ApiKeyRevokeInput - @join__type(graph: API_KEYS) -{ +input ApiKeyRevokeInput @join__type(graph: API_KEYS) { id: ID! } -type ApiKeyRevokePayload - @join__type(graph: API_KEYS) -{ +type ApiKeyRevokePayload @join__type(graph: API_KEYS) { apiKey: ApiKey! } -"""An Opaque Bearer token""" -scalar AuthToken - @join__type(graph: PUBLIC) +""" +An Opaque Bearer token +""" +scalar AuthToken @join__type(graph: PUBLIC) -type AuthTokenPayload - @join__type(graph: PUBLIC) -{ +type AuthTokenPayload @join__type(graph: PUBLIC) { authToken: AuthToken errors: [Error!]! totpRequired: Boolean @@ -225,126 +234,147 @@ A wallet belonging to an account which contains a BTC balance and a list of tran """ type BTCWallet implements Wallet @join__implements(graph: PUBLIC, interface: "Wallet") - @join__type(graph: PUBLIC) -{ + @join__type(graph: PUBLIC) { accountId: ID! - """A balance stored in BTC.""" + """ + A balance stored in BTC. + """ balance: SignedAmount! id: ID! invoiceByPaymentHash(paymentHash: PaymentHash!): Invoice! - """A list of all invoices associated with walletIds optionally passed.""" + """ + A list of all invoices associated with walletIds optionally passed. + """ invoices( - """Returns the items in the list that come after the specified cursor.""" + """ + Returns the items in the list that come after the specified cursor. + """ after: String - """Returns the items in the list that come before the specified cursor.""" + """ + Returns the items in the list that come before the specified cursor. + """ before: String - """Returns the first n items from the list.""" + """ + Returns the first n items from the list. + """ first: Int - """Returns the last n items from the list.""" + """ + Returns the last n items from the list. + """ last: Int ): InvoiceConnection - """An unconfirmed incoming onchain balance.""" + """ + An unconfirmed incoming onchain balance. + """ pendingIncomingBalance: SignedAmount! pendingTransactions: [Transaction!]! pendingTransactionsByAddress( - """Returns the items that include this address.""" + """ + Returns the items that include this address. + """ address: OnChainAddress! ): [Transaction!]! transactionById(transactionId: ID!): Transaction! - """A list of BTC transactions associated with this wallet.""" + """ + A list of BTC transactions associated with this wallet. + """ transactions( - """Returns the items in the list that come after the specified cursor.""" + """ + Returns the items in the list that come after the specified cursor. + """ after: String - """Returns the items in the list that come before the specified cursor.""" + """ + Returns the items in the list that come before the specified cursor. + """ before: String - """Returns the first n items from the list.""" + """ + Returns the first n items from the list. + """ first: Int - """Returns the last n items from the list.""" + """ + Returns the last n items from the list. + """ last: Int ): TransactionConnection transactionsByAddress( - """Returns the items that include this address.""" + """ + Returns the items that include this address. + """ address: OnChainAddress! - """Returns the items in the list that come after the specified cursor.""" + """ + Returns the items in the list that come after the specified cursor. + """ after: String - """Returns the items in the list that come before the specified cursor.""" + """ + Returns the items in the list that come before the specified cursor. + """ before: String - """Returns the first n items from the list.""" + """ + Returns the first n items from the list. + """ first: Int - """Returns the last n items from the list.""" + """ + Returns the last n items from the list. + """ last: Int ): TransactionConnection transactionsByPaymentHash(paymentHash: PaymentHash!): [Transaction!]! walletCurrency: WalletCurrency! } -type BuildInformation - @join__type(graph: PUBLIC) -{ +type BuildInformation @join__type(graph: PUBLIC) { commitHash: String helmRevision: Int } -type CallbackEndpoint - @join__type(graph: PUBLIC) -{ +type CallbackEndpoint @join__type(graph: PUBLIC) { id: EndpointId! url: EndpointUrl! } -input CallbackEndpointAddInput - @join__type(graph: PUBLIC) -{ - """callback endpoint to be called""" +input CallbackEndpointAddInput @join__type(graph: PUBLIC) { + """ + callback endpoint to be called + """ url: EndpointUrl! } -type CallbackEndpointAddPayload - @join__type(graph: PUBLIC) -{ +type CallbackEndpointAddPayload @join__type(graph: PUBLIC) { errors: [Error!]! id: EndpointId } -input CallbackEndpointDeleteInput - @join__type(graph: PUBLIC) -{ +input CallbackEndpointDeleteInput @join__type(graph: PUBLIC) { id: EndpointId! } -type CaptchaCreateChallengePayload - @join__type(graph: PUBLIC) -{ +type CaptchaCreateChallengePayload @join__type(graph: PUBLIC) { errors: [Error!]! result: CaptchaCreateChallengeResult } -type CaptchaCreateChallengeResult - @join__type(graph: PUBLIC) -{ +type CaptchaCreateChallengeResult @join__type(graph: PUBLIC) { challengeCode: String! failbackMode: Boolean! id: String! newCaptcha: Boolean! } -input CaptchaRequestAuthCodeInput - @join__type(graph: PUBLIC) -{ +input CaptchaRequestAuthCodeInput @join__type(graph: PUBLIC) { challengeCode: String! channel: PhoneCodeChannelType phone: Phone! @@ -352,21 +382,19 @@ input CaptchaRequestAuthCodeInput validationCode: String! } -"""(Positive) Cent amount (1/100 of a dollar)""" -scalar CentAmount - @join__type(graph: PUBLIC) +""" +(Positive) Cent amount (1/100 of a dollar) +""" +scalar CentAmount @join__type(graph: PUBLIC) -type CentAmountPayload - @join__type(graph: PUBLIC) -{ +type CentAmountPayload @join__type(graph: PUBLIC) { amount: CentAmount errors: [Error!]! } type ConsumerAccount implements Account @join__implements(graph: PUBLIC, interface: "Account") - @join__type(graph: PUBLIC) -{ + @join__type(graph: PUBLIC) { callbackEndpoints: [CallbackEndpoint!]! """ @@ -377,18 +405,28 @@ type ConsumerAccount implements Account displayCurrency: DisplayCurrency! id: ID! - """A list of all invoices associated with walletIds optionally passed.""" + """ + A list of all invoices associated with walletIds optionally passed. + """ invoices( - """Returns the items in the list that come after the specified cursor.""" + """ + Returns the items in the list that come after the specified cursor. + """ after: String - """Returns the items in the list that come before the specified cursor.""" + """ + Returns the items in the list that come before the specified cursor. + """ before: String - """Returns the first n items from the list.""" + """ + Returns the first n items from the list. + """ first: Int - """Returns the last n items from the list.""" + """ + Returns the last n items from the list. + """ last: Int walletIds: [WalletId] ): InvoiceConnection @@ -397,7 +435,9 @@ type ConsumerAccount implements Account notificationSettings: NotificationSettings! pendingTransactions(walletIds: [WalletId]): [Transaction!]! - """List the quiz questions of the consumer account""" + """ + List the quiz questions of the consumer account + """ quiz: [Quiz!]! realtimePrice: RealtimePrice! @@ -405,16 +445,24 @@ type ConsumerAccount implements Account A list of all transactions associated with walletIds optionally passed. """ transactions( - """Returns the items in the list that come after the specified cursor.""" + """ + Returns the items in the list that come after the specified cursor. + """ after: String - """Returns the items in the list that come before the specified cursor.""" + """ + Returns the items in the list that come before the specified cursor. + """ before: String - """Returns the first n items from the list.""" + """ + Returns the first n items from the list. + """ first: Int - """Returns the last n items from the list.""" + """ + Returns the last n items from the list. + """ last: Int walletIds: [WalletId] ): TransactionConnection @@ -425,30 +473,24 @@ type ConsumerAccount implements Account """ An alias name that a user can set for a wallet (with which they have transactions) """ -scalar ContactAlias - @join__type(graph: PUBLIC) +scalar ContactAlias @join__type(graph: PUBLIC) -type Coordinates - @join__type(graph: PUBLIC) -{ +type Coordinates @join__type(graph: PUBLIC) { latitude: Float! longitude: Float! } -type Country - @join__type(graph: PUBLIC) -{ +type Country @join__type(graph: PUBLIC) { id: CountryCode! supportedAuthChannels: [PhoneCodeChannelType!]! } -"""A CCA2 country code (ex US, FR, etc)""" -scalar CountryCode - @join__type(graph: PUBLIC) +""" +A CCA2 country code (ex US, FR, etc) +""" +scalar CountryCode @join__type(graph: PUBLIC) -type Currency - @join__type(graph: PUBLIC) -{ +type Currency @join__type(graph: PUBLIC) { flag: String! fractionDigits: Int! id: ID! @@ -456,89 +498,79 @@ type Currency symbol: String! } -type DepositFeesInformation - @join__type(graph: PUBLIC) -{ +type DepositFeesInformation @join__type(graph: PUBLIC) { minBankFee: String! - """below this amount minBankFee will be charged""" + """ + below this amount minBankFee will be charged + """ minBankFeeThreshold: String! - """ratio to charge as basis points above minBankFeeThreshold amount""" + """ + ratio to charge as basis points above minBankFeeThreshold amount + """ ratio: String! } -input DeviceNotificationTokenCreateInput - @join__type(graph: PUBLIC) -{ +input DeviceNotificationTokenCreateInput @join__type(graph: PUBLIC) { deviceToken: String! } -"""Display currency of an account""" -scalar DisplayCurrency - @join__type(graph: PUBLIC) +""" +Display currency of an account +""" +scalar DisplayCurrency @join__type(graph: PUBLIC) -type Email - @join__type(graph: PUBLIC) -{ +type Email @join__type(graph: PUBLIC) { address: EmailAddress verified: Boolean } -"""Email address""" -scalar EmailAddress - @join__type(graph: PUBLIC) +""" +Email address +""" +scalar EmailAddress @join__type(graph: PUBLIC) """ An id to be passed between registrationInitiate and registrationValidate for confirming email """ -scalar EmailRegistrationId - @join__type(graph: PUBLIC) +scalar EmailRegistrationId @join__type(graph: PUBLIC) -scalar EndpointId - @join__type(graph: PUBLIC) +scalar EndpointId @join__type(graph: PUBLIC) -"""Url that will be fetched on events for the account""" -scalar EndpointUrl - @join__type(graph: PUBLIC) +""" +Url that will be fetched on events for the account +""" +scalar EndpointUrl @join__type(graph: PUBLIC) -interface Error - @join__type(graph: PUBLIC) -{ +interface Error @join__type(graph: PUBLIC) { code: String message: String! path: [String] } -enum ExchangeCurrencyUnit - @join__type(graph: PUBLIC) -{ +enum ExchangeCurrencyUnit @join__type(graph: PUBLIC) { BTCSAT @join__enumValue(graph: PUBLIC) USDCENT @join__enumValue(graph: PUBLIC) } -"""Feedback shared with our user""" -scalar Feedback - @join__type(graph: PUBLIC) +""" +Feedback shared with our user +""" +scalar Feedback @join__type(graph: PUBLIC) -input FeedbackSubmitInput - @join__type(graph: PUBLIC) -{ +input FeedbackSubmitInput @join__type(graph: PUBLIC) { feedback: Feedback! } -type FeesInformation - @join__type(graph: PUBLIC) -{ +type FeesInformation @join__type(graph: PUBLIC) { deposit: DepositFeesInformation! } """ Provides global settings for the application which might have an impact for the user. """ -type Globals - @join__type(graph: PUBLIC) -{ +type Globals @join__type(graph: PUBLIC) { buildInformation: BuildInformation! feesInformation: FeesInformation! @@ -559,66 +591,66 @@ type Globals """ nodesIds: [String!]! - """A list of countries and their supported auth channels""" + """ + A list of countries and their supported auth channels + """ supportedCountries: [Country!]! } type GraphQLApplicationError implements Error @join__implements(graph: PUBLIC, interface: "Error") - @join__type(graph: PUBLIC) -{ + @join__type(graph: PUBLIC) { code: String message: String! path: [String] } -"""Hex-encoded string of 32 bytes""" -scalar Hex32Bytes - @join__type(graph: PUBLIC) +""" +Hex-encoded string of 32 bytes +""" +scalar Hex32Bytes @join__type(graph: PUBLIC) union InitiationVia @join__type(graph: PUBLIC) @join__unionMember(graph: PUBLIC, member: "InitiationViaIntraLedger") @join__unionMember(graph: PUBLIC, member: "InitiationViaLn") - @join__unionMember(graph: PUBLIC, member: "InitiationViaOnChain") - = InitiationViaIntraLedger | InitiationViaLn | InitiationViaOnChain + @join__unionMember(graph: PUBLIC, member: "InitiationViaOnChain") = + InitiationViaIntraLedger + | InitiationViaLn + | InitiationViaOnChain -type InitiationViaIntraLedger - @join__type(graph: PUBLIC) -{ +type InitiationViaIntraLedger @join__type(graph: PUBLIC) { counterPartyUsername: Username counterPartyWalletId: WalletId } -type InitiationViaLn - @join__type(graph: PUBLIC) -{ +type InitiationViaLn @join__type(graph: PUBLIC) { paymentHash: PaymentHash! } -type InitiationViaOnChain - @join__type(graph: PUBLIC) -{ +type InitiationViaOnChain @join__type(graph: PUBLIC) { address: OnChainAddress! } -input IntraLedgerPaymentSendInput - @join__type(graph: PUBLIC) -{ - """Amount in satoshis.""" +input IntraLedgerPaymentSendInput @join__type(graph: PUBLIC) { + """ + Amount in satoshis. + """ amount: SatAmount! - """Optional memo to be attached to the payment.""" + """ + Optional memo to be attached to the payment. + """ memo: Memo recipientWalletId: WalletId! - """The wallet ID of the sender.""" + """ + The wallet ID of the sender. + """ walletId: WalletId! } -type IntraLedgerUpdate - @join__type(graph: PUBLIC) -{ +type IntraLedgerUpdate @join__type(graph: PUBLIC) { amount: SatAmount! displayCurrencyPerSat: Float! txNotificationType: TxNotificationType! @@ -626,28 +658,38 @@ type IntraLedgerUpdate walletId: WalletId! } -input IntraLedgerUsdPaymentSendInput - @join__type(graph: PUBLIC) -{ - """Amount in cents.""" +input IntraLedgerUsdPaymentSendInput @join__type(graph: PUBLIC) { + """ + Amount in cents. + """ amount: CentAmount! - """Optional memo to be attached to the payment.""" + """ + Optional memo to be attached to the payment. + """ memo: Memo recipientWalletId: WalletId! - """The wallet ID of the sender.""" + """ + The wallet ID of the sender. + """ walletId: WalletId! } -"""A lightning invoice.""" -interface Invoice - @join__type(graph: PUBLIC) -{ - """The payment hash of the lightning invoice.""" +""" +A lightning invoice. +""" +interface Invoice @join__type(graph: PUBLIC) { + createdAt: Timestamp! + + """ + The payment hash of the lightning invoice. + """ paymentHash: PaymentHash! - """The bolt11 invoice to be paid.""" + """ + The bolt11 invoice to be paid. + """ paymentRequest: LnPaymentRequest! """ @@ -655,35 +697,43 @@ interface Invoice """ paymentSecret: LnPaymentSecret! - """The payment status of the invoice.""" + """ + The payment status of the invoice. + """ paymentStatus: InvoicePaymentStatus! } -"""A connection to a list of items.""" -type InvoiceConnection - @join__type(graph: PUBLIC) -{ - """A list of edges.""" +""" +A connection to a list of items. +""" +type InvoiceConnection @join__type(graph: PUBLIC) { + """ + A list of edges. + """ edges: [InvoiceEdge!] - """Information to aid in pagination.""" + """ + Information to aid in pagination. + """ pageInfo: PageInfo! } -"""An edge in a connection.""" -type InvoiceEdge - @join__type(graph: PUBLIC) -{ - """A cursor for use in pagination""" +""" +An edge in a connection. +""" +type InvoiceEdge @join__type(graph: PUBLIC) { + """ + A cursor for use in pagination + """ cursor: String! - """The item at the end of the edge""" + """ + The item at the end of the edge + """ node: Invoice! } -enum InvoicePaymentStatus - @join__type(graph: PUBLIC) -{ +enum InvoicePaymentStatus @join__type(graph: PUBLIC) { EXPIRED @join__enumValue(graph: PUBLIC) PAID @join__enumValue(graph: PUBLIC) PENDING @join__enumValue(graph: PUBLIC) @@ -696,8 +746,7 @@ enum join__Graph { PUBLIC @join__graph(name: "public", url: "http://bats-tests:4012/graphql") } -scalar Language - @join__type(graph: PUBLIC) +scalar Language @join__type(graph: PUBLIC) scalar link__Import @@ -715,69 +764,79 @@ enum link__Purpose { type LnInvoice implements Invoice @join__implements(graph: PUBLIC, interface: "Invoice") - @join__type(graph: PUBLIC) -{ + @join__type(graph: PUBLIC) { + createdAt: Timestamp! paymentHash: PaymentHash! paymentRequest: LnPaymentRequest! paymentSecret: LnPaymentSecret! paymentStatus: InvoicePaymentStatus! - satoshis: SatAmount + satoshis: SatAmount! } -input LnInvoiceCreateInput - @join__type(graph: PUBLIC) -{ - """Amount in satoshis.""" +input LnInvoiceCreateInput @join__type(graph: PUBLIC) { + """ + Amount in satoshis. + """ amount: SatAmount! - """Optional invoice expiration time in minutes.""" + """ + Optional invoice expiration time in minutes. + """ expiresIn: Minutes - """Optional memo for the lightning invoice.""" + """ + Optional memo for the lightning invoice. + """ memo: Memo - """Wallet ID for a BTC wallet belonging to the current account.""" + """ + Wallet ID for a BTC wallet belonging to the current account. + """ walletId: WalletId! } -input LnInvoiceCreateOnBehalfOfRecipientInput - @join__type(graph: PUBLIC) -{ - """Amount in satoshis.""" +input LnInvoiceCreateOnBehalfOfRecipientInput @join__type(graph: PUBLIC) { + """ + Amount in satoshis. + """ amount: SatAmount! descriptionHash: Hex32Bytes - """Optional invoice expiration time in minutes.""" + """ + Optional invoice expiration time in minutes. + """ expiresIn: Minutes - """Optional memo for the lightning invoice.""" + """ + Optional memo for the lightning invoice. + """ memo: Memo - """Wallet ID for a BTC wallet which belongs to any account.""" + """ + Wallet ID for a BTC wallet which belongs to any account. + """ recipientWalletId: WalletId! } -input LnInvoiceFeeProbeInput - @join__type(graph: PUBLIC) -{ +input LnInvoiceFeeProbeInput @join__type(graph: PUBLIC) { paymentRequest: LnPaymentRequest! walletId: WalletId! } -type LnInvoicePayload - @join__type(graph: PUBLIC) -{ +type LnInvoicePayload @join__type(graph: PUBLIC) { errors: [Error!]! invoice: LnInvoice } -input LnInvoicePaymentInput - @join__type(graph: PUBLIC) -{ - """Optional memo to associate with the lightning invoice.""" +input LnInvoicePaymentInput @join__type(graph: PUBLIC) { + """ + Optional memo to associate with the lightning invoice. + """ memo: Memo - """Payment request representing the invoice which is being paid.""" + """ + Payment request representing the invoice which is being paid. + """ paymentRequest: LnPaymentRequest! """ @@ -786,36 +845,34 @@ input LnInvoicePaymentInput walletId: WalletId! } -input LnInvoicePaymentStatusInput - @join__type(graph: PUBLIC) -{ +input LnInvoicePaymentStatusInput @join__type(graph: PUBLIC) { paymentRequest: LnPaymentRequest! } -type LnInvoicePaymentStatusPayload - @join__type(graph: PUBLIC) -{ +type LnInvoicePaymentStatusPayload @join__type(graph: PUBLIC) { errors: [Error!]! status: InvoicePaymentStatus } type LnNoAmountInvoice implements Invoice @join__implements(graph: PUBLIC, interface: "Invoice") - @join__type(graph: PUBLIC) -{ + @join__type(graph: PUBLIC) { + createdAt: Timestamp! paymentHash: PaymentHash! paymentRequest: LnPaymentRequest! paymentSecret: LnPaymentSecret! paymentStatus: InvoicePaymentStatus! } -input LnNoAmountInvoiceCreateInput - @join__type(graph: PUBLIC) -{ - """Optional invoice expiration time in minutes.""" +input LnNoAmountInvoiceCreateInput @join__type(graph: PUBLIC) { + """ + Optional invoice expiration time in minutes. + """ expiresIn: Minutes - """Optional memo for the lightning invoice.""" + """ + Optional memo for the lightning invoice. + """ memo: Memo """ @@ -825,12 +882,15 @@ input LnNoAmountInvoiceCreateInput } input LnNoAmountInvoiceCreateOnBehalfOfRecipientInput - @join__type(graph: PUBLIC) -{ - """Optional invoice expiration time in minutes.""" + @join__type(graph: PUBLIC) { + """ + Optional invoice expiration time in minutes. + """ expiresIn: Minutes - """Optional memo for the lightning invoice.""" + """ + Optional memo for the lightning invoice. + """ memo: Memo """ @@ -839,31 +899,31 @@ input LnNoAmountInvoiceCreateOnBehalfOfRecipientInput recipientWalletId: WalletId! } -input LnNoAmountInvoiceFeeProbeInput - @join__type(graph: PUBLIC) -{ +input LnNoAmountInvoiceFeeProbeInput @join__type(graph: PUBLIC) { amount: SatAmount! paymentRequest: LnPaymentRequest! walletId: WalletId! } -type LnNoAmountInvoicePayload - @join__type(graph: PUBLIC) -{ +type LnNoAmountInvoicePayload @join__type(graph: PUBLIC) { errors: [Error!]! invoice: LnNoAmountInvoice } -input LnNoAmountInvoicePaymentInput - @join__type(graph: PUBLIC) -{ - """Amount to pay in satoshis.""" +input LnNoAmountInvoicePaymentInput @join__type(graph: PUBLIC) { + """ + Amount to pay in satoshis. + """ amount: SatAmount! - """Optional memo to associate with the lightning invoice.""" + """ + Optional memo to associate with the lightning invoice. + """ memo: Memo - """Payment request representing the invoice which is being paid.""" + """ + Payment request representing the invoice which is being paid. + """ paymentRequest: LnPaymentRequest! """ @@ -872,24 +932,26 @@ input LnNoAmountInvoicePaymentInput walletId: WalletId! } -input LnNoAmountUsdInvoiceFeeProbeInput - @join__type(graph: PUBLIC) -{ +input LnNoAmountUsdInvoiceFeeProbeInput @join__type(graph: PUBLIC) { amount: CentAmount! paymentRequest: LnPaymentRequest! walletId: WalletId! } -input LnNoAmountUsdInvoicePaymentInput - @join__type(graph: PUBLIC) -{ - """Amount to pay in USD cents.""" +input LnNoAmountUsdInvoicePaymentInput @join__type(graph: PUBLIC) { + """ + Amount to pay in USD cents. + """ amount: CentAmount! - """Optional memo to associate with the lightning invoice.""" + """ + Optional memo to associate with the lightning invoice. + """ memo: Memo - """Payment request representing the invoice which is being paid.""" + """ + Payment request representing the invoice which is being paid. + """ paymentRequest: LnPaymentRequest! """ @@ -898,32 +960,32 @@ input LnNoAmountUsdInvoicePaymentInput walletId: WalletId! } -scalar LnPaymentPreImage - @join__type(graph: PUBLIC) +scalar LnPaymentPreImage @join__type(graph: PUBLIC) -"""BOLT11 lightning invoice payment request with the amount included""" -scalar LnPaymentRequest - @join__type(graph: PUBLIC) +""" +BOLT11 lightning invoice payment request with the amount included +""" +scalar LnPaymentRequest @join__type(graph: PUBLIC) -scalar LnPaymentSecret - @join__type(graph: PUBLIC) +scalar LnPaymentSecret @join__type(graph: PUBLIC) -type LnUpdate - @join__type(graph: PUBLIC) -{ +type LnUpdate @join__type(graph: PUBLIC) { paymentHash: PaymentHash! status: InvoicePaymentStatus! walletId: WalletId! } input LnUsdInvoiceBtcDenominatedCreateOnBehalfOfRecipientInput - @join__type(graph: PUBLIC) -{ - """Amount in satoshis.""" + @join__type(graph: PUBLIC) { + """ + Amount in satoshis. + """ amount: SatAmount! descriptionHash: Hex32Bytes - """Optional invoice expiration time in minutes.""" + """ + Optional invoice expiration time in minutes. + """ expiresIn: Minutes """ @@ -931,34 +993,44 @@ input LnUsdInvoiceBtcDenominatedCreateOnBehalfOfRecipientInput """ memo: Memo - """Wallet ID for a USD wallet which belongs to the account of any user.""" + """ + Wallet ID for a USD wallet which belongs to the account of any user. + """ recipientWalletId: WalletId! } -input LnUsdInvoiceCreateInput - @join__type(graph: PUBLIC) -{ - """Amount in USD cents.""" +input LnUsdInvoiceCreateInput @join__type(graph: PUBLIC) { + """ + Amount in USD cents. + """ amount: CentAmount! - """Optional invoice expiration time in minutes.""" + """ + Optional invoice expiration time in minutes. + """ expiresIn: Minutes - """Optional memo for the lightning invoice.""" + """ + Optional memo for the lightning invoice. + """ memo: Memo - """Wallet ID for a USD wallet belonging to the current user.""" + """ + Wallet ID for a USD wallet belonging to the current user. + """ walletId: WalletId! } -input LnUsdInvoiceCreateOnBehalfOfRecipientInput - @join__type(graph: PUBLIC) -{ - """Amount in USD cents.""" +input LnUsdInvoiceCreateOnBehalfOfRecipientInput @join__type(graph: PUBLIC) { + """ + Amount in USD cents. + """ amount: CentAmount! descriptionHash: Hex32Bytes - """Optional invoice expiration time in minutes.""" + """ + Optional invoice expiration time in minutes. + """ expiresIn: Minutes """ @@ -966,132 +1038,168 @@ input LnUsdInvoiceCreateOnBehalfOfRecipientInput """ memo: Memo - """Wallet ID for a USD wallet which belongs to the account of any user.""" + """ + Wallet ID for a USD wallet which belongs to the account of any user. + """ recipientWalletId: WalletId! } -input LnUsdInvoiceFeeProbeInput - @join__type(graph: PUBLIC) -{ +input LnUsdInvoiceFeeProbeInput @join__type(graph: PUBLIC) { paymentRequest: LnPaymentRequest! walletId: WalletId! } -type MapInfo - @join__type(graph: PUBLIC) -{ +type MapInfo @join__type(graph: PUBLIC) { coordinates: Coordinates! title: String! } -type MapMarker - @join__type(graph: PUBLIC) -{ +type MapMarker @join__type(graph: PUBLIC) { mapInfo: MapInfo! username: Username } -"""Text field in a lightning payment transaction""" -scalar Memo - @join__type(graph: PUBLIC) +""" +Text field in a lightning payment transaction +""" +scalar Memo @join__type(graph: PUBLIC) -"""(Positive) amount of minutes""" -scalar Minutes - @join__type(graph: PUBLIC) +""" +(Positive) amount of minutes +""" +scalar Minutes @join__type(graph: PUBLIC) -type MobileVersions - @join__type(graph: PUBLIC) -{ +type MobileVersions @join__type(graph: PUBLIC) { currentSupported: Int! minSupported: Int! platform: String! } -type Mutation - @join__type(graph: API_KEYS) - @join__type(graph: PUBLIC) -{ - apiKeyCreate(input: ApiKeyCreateInput!): ApiKeyCreatePayload! @join__field(graph: API_KEYS) - apiKeyRevoke(input: ApiKeyRevokeInput!): ApiKeyRevokePayload! @join__field(graph: API_KEYS) +type Mutation @join__type(graph: API_KEYS) @join__type(graph: PUBLIC) { + apiKeyCreate(input: ApiKeyCreateInput!): ApiKeyCreatePayload! + @join__field(graph: API_KEYS) + apiKeyRevoke(input: ApiKeyRevokeInput!): ApiKeyRevokePayload! + @join__field(graph: API_KEYS) accountDelete: AccountDeletePayload! @join__field(graph: PUBLIC) - accountDisableNotificationCategory(input: AccountDisableNotificationCategoryInput!): AccountUpdateNotificationSettingsPayload! @join__field(graph: PUBLIC) - accountDisableNotificationChannel(input: AccountDisableNotificationChannelInput!): AccountUpdateNotificationSettingsPayload! @join__field(graph: PUBLIC) - accountEnableNotificationCategory(input: AccountEnableNotificationCategoryInput!): AccountUpdateNotificationSettingsPayload! @join__field(graph: PUBLIC) - accountEnableNotificationChannel(input: AccountEnableNotificationChannelInput!): AccountUpdateNotificationSettingsPayload! @join__field(graph: PUBLIC) - accountUpdateDefaultWalletId(input: AccountUpdateDefaultWalletIdInput!): AccountUpdateDefaultWalletIdPayload! @join__field(graph: PUBLIC) - accountUpdateDisplayCurrency(input: AccountUpdateDisplayCurrencyInput!): AccountUpdateDisplayCurrencyPayload! @join__field(graph: PUBLIC) - callbackEndpointAdd(input: CallbackEndpointAddInput!): CallbackEndpointAddPayload! @join__field(graph: PUBLIC) - callbackEndpointDelete(input: CallbackEndpointDeleteInput!): SuccessPayload! @join__field(graph: PUBLIC) - captchaCreateChallenge: CaptchaCreateChallengePayload! @join__field(graph: PUBLIC) - captchaRequestAuthCode(input: CaptchaRequestAuthCodeInput!): SuccessPayload! @join__field(graph: PUBLIC) - deviceNotificationTokenCreate(input: DeviceNotificationTokenCreateInput!): SuccessPayload! @join__field(graph: PUBLIC) - feedbackSubmit(input: FeedbackSubmitInput!): SuccessPayload! @join__field(graph: PUBLIC) + accountDisableNotificationCategory( + input: AccountDisableNotificationCategoryInput! + ): AccountUpdateNotificationSettingsPayload! @join__field(graph: PUBLIC) + accountDisableNotificationChannel( + input: AccountDisableNotificationChannelInput! + ): AccountUpdateNotificationSettingsPayload! @join__field(graph: PUBLIC) + accountEnableNotificationCategory( + input: AccountEnableNotificationCategoryInput! + ): AccountUpdateNotificationSettingsPayload! @join__field(graph: PUBLIC) + accountEnableNotificationChannel( + input: AccountEnableNotificationChannelInput! + ): AccountUpdateNotificationSettingsPayload! @join__field(graph: PUBLIC) + accountUpdateDefaultWalletId( + input: AccountUpdateDefaultWalletIdInput! + ): AccountUpdateDefaultWalletIdPayload! @join__field(graph: PUBLIC) + accountUpdateDisplayCurrency( + input: AccountUpdateDisplayCurrencyInput! + ): AccountUpdateDisplayCurrencyPayload! @join__field(graph: PUBLIC) + callbackEndpointAdd( + input: CallbackEndpointAddInput! + ): CallbackEndpointAddPayload! @join__field(graph: PUBLIC) + callbackEndpointDelete(input: CallbackEndpointDeleteInput!): SuccessPayload! + @join__field(graph: PUBLIC) + captchaCreateChallenge: CaptchaCreateChallengePayload! + @join__field(graph: PUBLIC) + captchaRequestAuthCode(input: CaptchaRequestAuthCodeInput!): SuccessPayload! + @join__field(graph: PUBLIC) + deviceNotificationTokenCreate( + input: DeviceNotificationTokenCreateInput! + ): SuccessPayload! @join__field(graph: PUBLIC) + feedbackSubmit(input: FeedbackSubmitInput!): SuccessPayload! + @join__field(graph: PUBLIC) """ 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). """ - intraLedgerPaymentSend(input: IntraLedgerPaymentSendInput!): PaymentSendPayload! @join__field(graph: PUBLIC) + intraLedgerPaymentSend( + input: IntraLedgerPaymentSendInput! + ): PaymentSendPayload! @join__field(graph: PUBLIC) """ 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). """ - intraLedgerUsdPaymentSend(input: IntraLedgerUsdPaymentSendInput!): PaymentSendPayload! @join__field(graph: PUBLIC) + intraLedgerUsdPaymentSend( + input: IntraLedgerUsdPaymentSendInput! + ): PaymentSendPayload! @join__field(graph: PUBLIC) """ 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. """ - lnInvoiceCreate(input: LnInvoiceCreateInput!): LnInvoicePayload! @join__field(graph: PUBLIC) + lnInvoiceCreate(input: LnInvoiceCreateInput!): LnInvoicePayload! + @join__field(graph: PUBLIC) """ 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. """ - lnInvoiceCreateOnBehalfOfRecipient(input: LnInvoiceCreateOnBehalfOfRecipientInput!): LnInvoicePayload! @join__field(graph: PUBLIC) - lnInvoiceFeeProbe(input: LnInvoiceFeeProbeInput!): SatAmountPayload! @join__field(graph: PUBLIC) + lnInvoiceCreateOnBehalfOfRecipient( + input: LnInvoiceCreateOnBehalfOfRecipientInput! + ): LnInvoicePayload! @join__field(graph: PUBLIC) + lnInvoiceFeeProbe(input: LnInvoiceFeeProbeInput!): SatAmountPayload! + @join__field(graph: PUBLIC) """ 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). """ - lnInvoicePaymentSend(input: LnInvoicePaymentInput!): PaymentSendPayload! @join__field(graph: PUBLIC) + lnInvoicePaymentSend(input: LnInvoicePaymentInput!): PaymentSendPayload! + @join__field(graph: PUBLIC) """ 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. """ - lnNoAmountInvoiceCreate(input: LnNoAmountInvoiceCreateInput!): LnNoAmountInvoicePayload! @join__field(graph: PUBLIC) + lnNoAmountInvoiceCreate( + input: LnNoAmountInvoiceCreateInput! + ): LnNoAmountInvoicePayload! @join__field(graph: PUBLIC) """ 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. """ - lnNoAmountInvoiceCreateOnBehalfOfRecipient(input: LnNoAmountInvoiceCreateOnBehalfOfRecipientInput!): LnNoAmountInvoicePayload! @join__field(graph: PUBLIC) - lnNoAmountInvoiceFeeProbe(input: LnNoAmountInvoiceFeeProbeInput!): SatAmountPayload! @join__field(graph: PUBLIC) + lnNoAmountInvoiceCreateOnBehalfOfRecipient( + input: LnNoAmountInvoiceCreateOnBehalfOfRecipientInput! + ): LnNoAmountInvoicePayload! @join__field(graph: PUBLIC) + lnNoAmountInvoiceFeeProbe( + input: LnNoAmountInvoiceFeeProbeInput! + ): SatAmountPayload! @join__field(graph: PUBLIC) """ 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). """ - lnNoAmountInvoicePaymentSend(input: LnNoAmountInvoicePaymentInput!): PaymentSendPayload! @join__field(graph: PUBLIC) - lnNoAmountUsdInvoiceFeeProbe(input: LnNoAmountUsdInvoiceFeeProbeInput!): CentAmountPayload! @join__field(graph: PUBLIC) + lnNoAmountInvoicePaymentSend( + input: LnNoAmountInvoicePaymentInput! + ): PaymentSendPayload! @join__field(graph: PUBLIC) + lnNoAmountUsdInvoiceFeeProbe( + input: LnNoAmountUsdInvoiceFeeProbeInput! + ): CentAmountPayload! @join__field(graph: PUBLIC) """ 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). """ - lnNoAmountUsdInvoicePaymentSend(input: LnNoAmountUsdInvoicePaymentInput!): PaymentSendPayload! @join__field(graph: PUBLIC) + lnNoAmountUsdInvoicePaymentSend( + input: LnNoAmountUsdInvoicePaymentInput! + ): PaymentSendPayload! @join__field(graph: PUBLIC) """ Returns a lightning invoice denominated in satoshis for an associated wallet. @@ -1099,7 +1207,9 @@ type Mutation Expires after 'expiresIn' or 5 minutes (short expiry time because there is a USD/BTC exchange rate associated with the amount). """ - lnUsdInvoiceBtcDenominatedCreateOnBehalfOfRecipient(input: LnUsdInvoiceBtcDenominatedCreateOnBehalfOfRecipientInput!): LnInvoicePayload! @join__field(graph: PUBLIC) + lnUsdInvoiceBtcDenominatedCreateOnBehalfOfRecipient( + input: LnUsdInvoiceBtcDenominatedCreateOnBehalfOfRecipientInput! + ): LnInvoicePayload! @join__field(graph: PUBLIC) """ Returns a lightning invoice denominated in satoshis for an associated wallet. @@ -1107,7 +1217,8 @@ type Mutation Expires after 'expiresIn' or 5 minutes (short expiry time because there is a USD/BTC exchange rate associated with the amount). """ - lnUsdInvoiceCreate(input: LnUsdInvoiceCreateInput!): LnInvoicePayload! @join__field(graph: PUBLIC) + lnUsdInvoiceCreate(input: LnUsdInvoiceCreateInput!): LnInvoicePayload! + @join__field(graph: PUBLIC) """ Returns a lightning invoice denominated in satoshis for an associated wallet. @@ -1115,106 +1226,129 @@ type Mutation Expires after 'expiresIn' or 5 minutes (short expiry time because there is a USD/BTC exchange rate associated with the amount). """ - lnUsdInvoiceCreateOnBehalfOfRecipient(input: LnUsdInvoiceCreateOnBehalfOfRecipientInput!): LnInvoicePayload! @join__field(graph: PUBLIC) - lnUsdInvoiceFeeProbe(input: LnUsdInvoiceFeeProbeInput!): SatAmountPayload! @join__field(graph: PUBLIC) - onChainAddressCreate(input: OnChainAddressCreateInput!): OnChainAddressPayload! @join__field(graph: PUBLIC) - onChainAddressCurrent(input: OnChainAddressCurrentInput!): OnChainAddressPayload! @join__field(graph: PUBLIC) - onChainPaymentSend(input: OnChainPaymentSendInput!): PaymentSendPayload! @join__field(graph: PUBLIC) - onChainPaymentSendAll(input: OnChainPaymentSendAllInput!): PaymentSendPayload! @join__field(graph: PUBLIC) - onChainUsdPaymentSend(input: OnChainUsdPaymentSendInput!): PaymentSendPayload! @join__field(graph: PUBLIC) - onChainUsdPaymentSendAsBtcDenominated(input: OnChainUsdPaymentSendAsBtcDenominatedInput!): PaymentSendPayload! @join__field(graph: PUBLIC) - quizCompleted(input: QuizCompletedInput!): QuizCompletedPayload! @join__field(graph: PUBLIC) - userContactUpdateAlias(input: UserContactUpdateAliasInput!): UserContactUpdateAliasPayload! @join__field(graph: PUBLIC) @deprecated(reason: "will be moved to AccountContact") + lnUsdInvoiceCreateOnBehalfOfRecipient( + input: LnUsdInvoiceCreateOnBehalfOfRecipientInput! + ): LnInvoicePayload! @join__field(graph: PUBLIC) + lnUsdInvoiceFeeProbe(input: LnUsdInvoiceFeeProbeInput!): SatAmountPayload! + @join__field(graph: PUBLIC) + onChainAddressCreate( + input: OnChainAddressCreateInput! + ): OnChainAddressPayload! @join__field(graph: PUBLIC) + onChainAddressCurrent( + input: OnChainAddressCurrentInput! + ): OnChainAddressPayload! @join__field(graph: PUBLIC) + onChainPaymentSend(input: OnChainPaymentSendInput!): PaymentSendPayload! + @join__field(graph: PUBLIC) + onChainPaymentSendAll( + input: OnChainPaymentSendAllInput! + ): PaymentSendPayload! @join__field(graph: PUBLIC) + onChainUsdPaymentSend( + input: OnChainUsdPaymentSendInput! + ): PaymentSendPayload! @join__field(graph: PUBLIC) + onChainUsdPaymentSendAsBtcDenominated( + input: OnChainUsdPaymentSendAsBtcDenominatedInput! + ): PaymentSendPayload! @join__field(graph: PUBLIC) + quizCompleted(input: QuizCompletedInput!): QuizCompletedPayload! + @join__field(graph: PUBLIC) + userContactUpdateAlias( + input: UserContactUpdateAliasInput! + ): UserContactUpdateAliasPayload! + @join__field(graph: PUBLIC) + @deprecated(reason: "will be moved to AccountContact") userEmailDelete: UserEmailDeletePayload! @join__field(graph: PUBLIC) - userEmailRegistrationInitiate(input: UserEmailRegistrationInitiateInput!): UserEmailRegistrationInitiatePayload! @join__field(graph: PUBLIC) - userEmailRegistrationValidate(input: UserEmailRegistrationValidateInput!): UserEmailRegistrationValidatePayload! @join__field(graph: PUBLIC) - userLogin(input: UserLoginInput!): AuthTokenPayload! @join__field(graph: PUBLIC) - userLoginUpgrade(input: UserLoginUpgradeInput!): UpgradePayload! @join__field(graph: PUBLIC) - userLogout(input: UserLogoutInput): SuccessPayload! @join__field(graph: PUBLIC) + userEmailRegistrationInitiate( + input: UserEmailRegistrationInitiateInput! + ): UserEmailRegistrationInitiatePayload! @join__field(graph: PUBLIC) + userEmailRegistrationValidate( + input: UserEmailRegistrationValidateInput! + ): UserEmailRegistrationValidatePayload! @join__field(graph: PUBLIC) + userLogin(input: UserLoginInput!): AuthTokenPayload! + @join__field(graph: PUBLIC) + userLoginUpgrade(input: UserLoginUpgradeInput!): UpgradePayload! + @join__field(graph: PUBLIC) + userLogout(input: UserLogoutInput): SuccessPayload! + @join__field(graph: PUBLIC) userPhoneDelete: UserPhoneDeletePayload! @join__field(graph: PUBLIC) - userPhoneRegistrationInitiate(input: UserPhoneRegistrationInitiateInput!): SuccessPayload! @join__field(graph: PUBLIC) - userPhoneRegistrationValidate(input: UserPhoneRegistrationValidateInput!): UserPhoneRegistrationValidatePayload! @join__field(graph: PUBLIC) - userTotpDelete(input: UserTotpDeleteInput!): UserTotpDeletePayload! @join__field(graph: PUBLIC) - userTotpRegistrationInitiate(input: UserTotpRegistrationInitiateInput!): UserTotpRegistrationInitiatePayload! @join__field(graph: PUBLIC) - userTotpRegistrationValidate(input: UserTotpRegistrationValidateInput!): UserTotpRegistrationValidatePayload! @join__field(graph: PUBLIC) - userUpdateLanguage(input: UserUpdateLanguageInput!): UserUpdateLanguagePayload! @join__field(graph: PUBLIC) - userUpdateUsername(input: UserUpdateUsernameInput!): UserUpdateUsernamePayload! @join__field(graph: PUBLIC) @deprecated(reason: "Username will be moved to @Handle in Accounts. Also SetUsername naming should be used instead of UpdateUsername to reflect the idempotency of Handles") -} - -type MyUpdatesPayload - @join__type(graph: PUBLIC) -{ + userPhoneRegistrationInitiate( + input: UserPhoneRegistrationInitiateInput! + ): SuccessPayload! @join__field(graph: PUBLIC) + userPhoneRegistrationValidate( + input: UserPhoneRegistrationValidateInput! + ): UserPhoneRegistrationValidatePayload! @join__field(graph: PUBLIC) + userTotpDelete(input: UserTotpDeleteInput!): UserTotpDeletePayload! + @join__field(graph: PUBLIC) + userTotpRegistrationInitiate( + input: UserTotpRegistrationInitiateInput! + ): UserTotpRegistrationInitiatePayload! @join__field(graph: PUBLIC) + userTotpRegistrationValidate( + input: UserTotpRegistrationValidateInput! + ): UserTotpRegistrationValidatePayload! @join__field(graph: PUBLIC) + userUpdateLanguage( + input: UserUpdateLanguageInput! + ): UserUpdateLanguagePayload! @join__field(graph: PUBLIC) + userUpdateUsername( + input: UserUpdateUsernameInput! + ): UserUpdateUsernamePayload! + @join__field(graph: PUBLIC) + @deprecated( + reason: "Username will be moved to @Handle in Accounts. Also SetUsername naming should be used instead of UpdateUsername to reflect the idempotency of Handles" + ) +} + +type MyUpdatesPayload @join__type(graph: PUBLIC) { errors: [Error!]! me: User update: UserUpdate } -enum Network - @join__type(graph: PUBLIC) -{ +enum Network @join__type(graph: PUBLIC) { mainnet @join__enumValue(graph: PUBLIC) regtest @join__enumValue(graph: PUBLIC) signet @join__enumValue(graph: PUBLIC) testnet @join__enumValue(graph: PUBLIC) } -scalar NotificationCategory - @join__type(graph: PUBLIC) +scalar NotificationCategory @join__type(graph: PUBLIC) -enum NotificationChannel - @join__type(graph: PUBLIC) -{ +enum NotificationChannel @join__type(graph: PUBLIC) { PUSH @join__enumValue(graph: PUBLIC) } -type NotificationChannelSettings - @join__type(graph: PUBLIC) -{ +type NotificationChannelSettings @join__type(graph: PUBLIC) { disabledCategories: [NotificationCategory!]! enabled: Boolean! } -type NotificationSettings - @join__type(graph: PUBLIC) -{ +type NotificationSettings @join__type(graph: PUBLIC) { push: NotificationChannelSettings! } -"""An address for an on-chain bitcoin destination""" -scalar OnChainAddress - @join__type(graph: PUBLIC) +""" +An address for an on-chain bitcoin destination +""" +scalar OnChainAddress @join__type(graph: PUBLIC) -input OnChainAddressCreateInput - @join__type(graph: PUBLIC) -{ +input OnChainAddressCreateInput @join__type(graph: PUBLIC) { walletId: WalletId! } -input OnChainAddressCurrentInput - @join__type(graph: PUBLIC) -{ +input OnChainAddressCurrentInput @join__type(graph: PUBLIC) { walletId: WalletId! } -type OnChainAddressPayload - @join__type(graph: PUBLIC) -{ +type OnChainAddressPayload @join__type(graph: PUBLIC) { address: OnChainAddress errors: [Error!]! } -input OnChainPaymentSendAllInput - @join__type(graph: PUBLIC) -{ +input OnChainPaymentSendAllInput @join__type(graph: PUBLIC) { address: OnChainAddress! memo: Memo speed: PayoutSpeed! = FAST walletId: WalletId! } -input OnChainPaymentSendInput - @join__type(graph: PUBLIC) -{ +input OnChainPaymentSendInput @join__type(graph: PUBLIC) { address: OnChainAddress! amount: SatAmount! memo: Memo @@ -1222,18 +1356,13 @@ input OnChainPaymentSendInput walletId: WalletId! } -type OnChainTxFee - @join__type(graph: PUBLIC) -{ +type OnChainTxFee @join__type(graph: PUBLIC) { amount: SatAmount! } -scalar OnChainTxHash - @join__type(graph: PUBLIC) +scalar OnChainTxHash @join__type(graph: PUBLIC) -type OnChainUpdate - @join__type(graph: PUBLIC) -{ +type OnChainUpdate @join__type(graph: PUBLIC) { amount: SatAmount! displayCurrencyPerSat: Float! txHash: OnChainTxHash! @@ -1242,9 +1371,7 @@ type OnChainUpdate walletId: WalletId! } -input OnChainUsdPaymentSendAsBtcDenominatedInput - @join__type(graph: PUBLIC) -{ +input OnChainUsdPaymentSendAsBtcDenominatedInput @join__type(graph: PUBLIC) { address: OnChainAddress! amount: SatAmount! memo: Memo @@ -1252,9 +1379,7 @@ input OnChainUsdPaymentSendAsBtcDenominatedInput walletId: WalletId! } -input OnChainUsdPaymentSendInput - @join__type(graph: PUBLIC) -{ +input OnChainUsdPaymentSendInput @join__type(graph: PUBLIC) { address: OnChainAddress! amount: CentAmount! memo: Memo @@ -1262,16 +1387,13 @@ input OnChainUsdPaymentSendInput walletId: WalletId! } -type OnChainUsdTxFee - @join__type(graph: PUBLIC) -{ +type OnChainUsdTxFee @join__type(graph: PUBLIC) { amount: CentAmount! } type OneDayAccountLimit implements AccountLimit @join__implements(graph: PUBLIC, interface: "AccountLimit") - @join__type(graph: PUBLIC) -{ + @join__type(graph: PUBLIC) { """ The rolling time interval value in seconds for the current 24 hour period. """ @@ -1282,63 +1404,66 @@ type OneDayAccountLimit implements AccountLimit """ remainingLimit: CentAmount - """The current maximum limit for a given 24 hour period.""" + """ + The current maximum limit for a given 24 hour period. + """ totalLimit: CentAmount! } -"""An authentication code valid for a single use""" -scalar OneTimeAuthCode - @join__type(graph: PUBLIC) +""" +An authentication code valid for a single use +""" +scalar OneTimeAuthCode @join__type(graph: PUBLIC) -"""Information about pagination in a connection.""" -type PageInfo - @join__type(graph: PUBLIC) -{ - """When paginating forwards, the cursor to continue.""" +""" +Information about pagination in a connection. +""" +type PageInfo @join__type(graph: PUBLIC) { + """ + When paginating forwards, the cursor to continue. + """ endCursor: String - """When paginating forwards, are there more items?""" + """ + When paginating forwards, are there more items? + """ hasNextPage: Boolean! - """When paginating backwards, are there more items?""" + """ + When paginating backwards, are there more items? + """ hasPreviousPage: Boolean! - """When paginating backwards, the cursor to continue.""" + """ + When paginating backwards, the cursor to continue. + """ startCursor: String } -scalar PaymentHash - @join__type(graph: PUBLIC) +scalar PaymentHash @join__type(graph: PUBLIC) -type PaymentSendPayload - @join__type(graph: PUBLIC) -{ +type PaymentSendPayload @join__type(graph: PUBLIC) { errors: [Error!]! status: PaymentSendResult } -enum PaymentSendResult - @join__type(graph: PUBLIC) -{ +enum PaymentSendResult @join__type(graph: PUBLIC) { ALREADY_PAID @join__enumValue(graph: PUBLIC) FAILURE @join__enumValue(graph: PUBLIC) PENDING @join__enumValue(graph: PUBLIC) SUCCESS @join__enumValue(graph: PUBLIC) } -enum PayoutSpeed - @join__type(graph: PUBLIC) -{ +enum PayoutSpeed @join__type(graph: PUBLIC) { FAST @join__enumValue(graph: PUBLIC) } -"""Phone number which includes country code""" -scalar Phone - @join__type(graph: PUBLIC) +""" +Phone number which includes country code +""" +scalar Phone @join__type(graph: PUBLIC) -enum PhoneCodeChannelType - @join__type(graph: PUBLIC) -{ +enum PhoneCodeChannelType @join__type(graph: PUBLIC) { SMS @join__enumValue(graph: PUBLIC) WHATSAPP @join__enumValue(graph: PUBLIC) } @@ -1346,19 +1471,17 @@ enum PhoneCodeChannelType """ Price amount expressed in base/offset. To calculate, use: `base / 10^offset` """ -type Price - @join__type(graph: PUBLIC) -{ +type Price @join__type(graph: PUBLIC) { base: SafeInt! currencyUnit: String! formattedAmount: String! offset: Int! } -"""The range for the X axis in the BTC price graph""" -enum PriceGraphRange - @join__type(graph: PUBLIC) -{ +""" +The range for the X axis in the BTC price graph +""" +enum PriceGraphRange @join__type(graph: PUBLIC) { FIVE_YEARS @join__enumValue(graph: PUBLIC) ONE_DAY @join__enumValue(graph: PUBLIC) ONE_MONTH @join__enumValue(graph: PUBLIC) @@ -1366,27 +1489,24 @@ enum PriceGraphRange ONE_YEAR @join__enumValue(graph: PUBLIC) } -input PriceInput - @join__type(graph: PUBLIC) -{ +input PriceInput @join__type(graph: PUBLIC) { amount: SatAmount! amountCurrencyUnit: ExchangeCurrencyUnit! priceCurrencyUnit: ExchangeCurrencyUnit! } -interface PriceInterface - @join__type(graph: PUBLIC) -{ +interface PriceInterface @join__type(graph: PUBLIC) { base: SafeInt! currencyUnit: String! @deprecated(reason: "Deprecated due to type renaming") offset: Int! } -"""Price of 1 sat in base/offset. To calculate, use: `base / 10^offset`""" +""" +Price of 1 sat in base/offset. To calculate, use: `base / 10^offset` +""" type PriceOfOneSatInMinorUnit implements PriceInterface @join__implements(graph: PUBLIC, interface: "PriceInterface") - @join__type(graph: PUBLIC) -{ + @join__type(graph: PUBLIC) { base: SafeInt! currencyUnit: String! @deprecated(reason: "Deprecated due to type renaming") offset: Int! @@ -1397,11 +1517,11 @@ Price of 1 sat or 1 usd cent in base/offset. To calculate, use: `base / 10^offse """ type PriceOfOneSettlementMinorUnitInDisplayMinorUnit implements PriceInterface @join__implements(graph: PUBLIC, interface: "PriceInterface") - @join__type(graph: PUBLIC) -{ + @join__type(graph: PUBLIC) { base: SafeInt! currencyUnit: String! @deprecated(reason: "Deprecated due to type renaming") - formattedAmount: String! @deprecated(reason: "Deprecated please use `base / 10^offset`") + formattedAmount: String! + @deprecated(reason: "Deprecated please use `base / 10^offset`") offset: Int! } @@ -1410,23 +1530,18 @@ Price of 1 usd cent in base/offset. To calculate, use: `base / 10^offset` """ type PriceOfOneUsdCentInMinorUnit implements PriceInterface @join__implements(graph: PUBLIC, interface: "PriceInterface") - @join__type(graph: PUBLIC) -{ + @join__type(graph: PUBLIC) { base: SafeInt! currencyUnit: String! @deprecated(reason: "Deprecated due to type renaming") offset: Int! } -type PricePayload - @join__type(graph: PUBLIC) -{ +type PricePayload @join__type(graph: PUBLIC) { errors: [Error!]! price: Price } -type PricePoint - @join__type(graph: PUBLIC) -{ +type PricePoint @join__type(graph: PUBLIC) { price: Price! """ @@ -1438,69 +1553,88 @@ type PricePoint """ A public view of a generic wallet which stores value in one of our supported currencies. """ -type PublicWallet - @join__type(graph: PUBLIC) -{ +type PublicWallet @join__type(graph: PUBLIC) { id: ID! walletCurrency: WalletCurrency! } -type Query - @join__type(graph: API_KEYS) - @join__type(graph: PUBLIC) -{ - accountDefaultWallet(username: Username!, walletCurrency: WalletCurrency): PublicWallet! @join__field(graph: PUBLIC) - btcPriceList(range: PriceGraphRange!): [PricePoint] @join__field(graph: PUBLIC) +type Query @join__type(graph: API_KEYS) @join__type(graph: PUBLIC) { + accountDefaultWallet( + username: Username! + walletCurrency: WalletCurrency + ): PublicWallet! @join__field(graph: PUBLIC) + btcPriceList(range: PriceGraphRange!): [PricePoint] + @join__field(graph: PUBLIC) businessMapMarkers: [MapMarker] @join__field(graph: PUBLIC) currencyList: [Currency!]! @join__field(graph: PUBLIC) globals: Globals @join__field(graph: PUBLIC) - lnInvoicePaymentStatus(input: LnInvoicePaymentStatusInput!): LnInvoicePaymentStatusPayload! @join__field(graph: PUBLIC) + lnInvoicePaymentStatus( + input: LnInvoicePaymentStatusInput! + ): LnInvoicePaymentStatusPayload! @join__field(graph: PUBLIC) me: User @join__field(graph: PUBLIC) mobileVersions: [MobileVersions] @join__field(graph: PUBLIC) - onChainTxFee(address: OnChainAddress!, amount: SatAmount!, speed: PayoutSpeed! = FAST, walletId: WalletId!): OnChainTxFee! @join__field(graph: PUBLIC) - onChainUsdTxFee(address: OnChainAddress!, amount: CentAmount!, speed: PayoutSpeed! = FAST, walletId: WalletId!): OnChainUsdTxFee! @join__field(graph: PUBLIC) - onChainUsdTxFeeAsBtcDenominated(address: OnChainAddress!, amount: SatAmount!, speed: PayoutSpeed! = FAST, walletId: WalletId!): OnChainUsdTxFee! @join__field(graph: PUBLIC) - quizQuestions: [QuizQuestion] @join__field(graph: PUBLIC) @deprecated(reason: "TODO: remove. we don't need a non authenticated version of this query. the users can only do the query while authenticated") - - """Returns 1 Sat and 1 Usd Cent price for the given currency""" - realtimePrice(currency: DisplayCurrency = "USD"): RealtimePrice! @join__field(graph: PUBLIC) - userDefaultWalletId(username: Username!): WalletId! @join__field(graph: PUBLIC) @deprecated(reason: "will be migrated to AccountDefaultWalletId") + onChainTxFee( + address: OnChainAddress! + amount: SatAmount! + speed: PayoutSpeed! = FAST + walletId: WalletId! + ): OnChainTxFee! @join__field(graph: PUBLIC) + onChainUsdTxFee( + address: OnChainAddress! + amount: CentAmount! + speed: PayoutSpeed! = FAST + walletId: WalletId! + ): OnChainUsdTxFee! @join__field(graph: PUBLIC) + onChainUsdTxFeeAsBtcDenominated( + address: OnChainAddress! + amount: SatAmount! + speed: PayoutSpeed! = FAST + walletId: WalletId! + ): OnChainUsdTxFee! @join__field(graph: PUBLIC) + quizQuestions: [QuizQuestion] + @join__field(graph: PUBLIC) + @deprecated( + reason: "TODO: remove. we don't need a non authenticated version of this query. the users can only do the query while authenticated" + ) + + """ + Returns 1 Sat and 1 Usd Cent price for the given currency + """ + realtimePrice(currency: DisplayCurrency = "USD"): RealtimePrice! + @join__field(graph: PUBLIC) + userDefaultWalletId(username: Username!): WalletId! + @join__field(graph: PUBLIC) + @deprecated(reason: "will be migrated to AccountDefaultWalletId") usernameAvailable(username: Username!): Boolean @join__field(graph: PUBLIC) } -type Quiz - @join__type(graph: PUBLIC) -{ - """The reward in Satoshis for the quiz question""" +type Quiz @join__type(graph: PUBLIC) { + """ + The reward in Satoshis for the quiz question + """ amount: SatAmount! completed: Boolean! id: ID! } -input QuizCompletedInput - @join__type(graph: PUBLIC) -{ +input QuizCompletedInput @join__type(graph: PUBLIC) { id: ID! } -type QuizCompletedPayload - @join__type(graph: PUBLIC) -{ +type QuizCompletedPayload @join__type(graph: PUBLIC) { errors: [Error!]! quiz: Quiz } -type QuizQuestion - @join__type(graph: PUBLIC) -{ - """The earn reward in Satoshis for the quiz question""" +type QuizQuestion @join__type(graph: PUBLIC) { + """ + The earn reward in Satoshis for the quiz question + """ earnAmount: SatAmount! id: ID! } -type RealtimePrice - @join__type(graph: PUBLIC) -{ +type RealtimePrice @join__type(graph: PUBLIC) { btcSatPrice: PriceOfOneSatInMinorUnit! denominatorCurrency: DisplayCurrency! id: ID! @@ -1512,15 +1646,11 @@ type RealtimePrice usdCentPrice: PriceOfOneUsdCentInMinorUnit! } -input RealtimePriceInput - @join__type(graph: PUBLIC) -{ +input RealtimePriceInput @join__type(graph: PUBLIC) { currency: DisplayCurrency = "USD" } -type RealtimePricePayload - @join__type(graph: PUBLIC) -{ +type RealtimePricePayload @join__type(graph: PUBLIC) { errors: [Error!]! realtimePrice: RealtimePrice } @@ -1528,34 +1658,33 @@ type RealtimePricePayload """ Non-fractional signed whole numeric value between -(2^53) + 1 and 2^53 - 1 """ -scalar SafeInt - @join__type(graph: PUBLIC) +scalar SafeInt @join__type(graph: PUBLIC) -"""(Positive) Satoshi amount""" -scalar SatAmount - @join__type(graph: PUBLIC) +""" +(Positive) Satoshi amount +""" +scalar SatAmount @join__type(graph: PUBLIC) -type SatAmountPayload - @join__type(graph: PUBLIC) -{ +type SatAmountPayload @join__type(graph: PUBLIC) { amount: SatAmount errors: [Error!]! } -"""(Positive) amount of seconds""" -scalar Seconds - @join__type(graph: PUBLIC) +""" +(Positive) amount of seconds +""" +scalar Seconds @join__type(graph: PUBLIC) union SettlementVia @join__type(graph: PUBLIC) @join__unionMember(graph: PUBLIC, member: "SettlementViaIntraLedger") @join__unionMember(graph: PUBLIC, member: "SettlementViaLn") - @join__unionMember(graph: PUBLIC, member: "SettlementViaOnChain") - = SettlementViaIntraLedger | SettlementViaLn | SettlementViaOnChain + @join__unionMember(graph: PUBLIC, member: "SettlementViaOnChain") = + SettlementViaIntraLedger + | SettlementViaLn + | SettlementViaOnChain -type SettlementViaIntraLedger - @join__type(graph: PUBLIC) -{ +type SettlementViaIntraLedger @join__type(graph: PUBLIC) { """ Settlement destination: Could be null if the payee does not have a username """ @@ -1563,44 +1692,43 @@ type SettlementViaIntraLedger counterPartyWalletId: WalletId } -type SettlementViaLn - @join__type(graph: PUBLIC) -{ - paymentSecret: LnPaymentSecret @deprecated(reason: "Shifting property to 'preImage' to improve granularity of the LnPaymentSecret type") +type SettlementViaLn @join__type(graph: PUBLIC) { + paymentSecret: LnPaymentSecret + @deprecated( + reason: "Shifting property to 'preImage' to improve granularity of the LnPaymentSecret type" + ) preImage: LnPaymentPreImage } -type SettlementViaOnChain - @join__type(graph: PUBLIC) -{ +type SettlementViaOnChain @join__type(graph: PUBLIC) { transactionHash: OnChainTxHash vout: Int } -"""An amount (of a currency) that can be negative (e.g. in a transaction)""" -scalar SignedAmount - @join__type(graph: PUBLIC) +""" +An amount (of a currency) that can be negative (e.g. in a transaction) +""" +scalar SignedAmount @join__type(graph: PUBLIC) """ A string amount (of a currency) that can be negative (e.g. in a transaction) """ -scalar SignedDisplayMajorAmount - @join__type(graph: PUBLIC) +scalar SignedDisplayMajorAmount @join__type(graph: PUBLIC) -type Subscription - @join__type(graph: PUBLIC) -{ - lnInvoicePaymentStatus(input: LnInvoicePaymentStatusInput!): LnInvoicePaymentStatusPayload! +type Subscription @join__type(graph: PUBLIC) { + lnInvoicePaymentStatus( + input: LnInvoicePaymentStatusInput! + ): LnInvoicePaymentStatusPayload! myUpdates: MyUpdatesPayload! price(input: PriceInput!): PricePayload! - """Returns the price of 1 satoshi""" + """ + Returns the price of 1 satoshi + """ realtimePrice(input: RealtimePriceInput!): RealtimePricePayload! } -type SuccessPayload - @join__type(graph: PUBLIC) -{ +type SuccessPayload @join__type(graph: PUBLIC) { errors: [Error!]! success: Boolean } @@ -1608,21 +1736,22 @@ type SuccessPayload """ Timestamp field, serialized as Unix time (the number of seconds since the Unix epoch) """ -scalar Timestamp - @join__type(graph: API_KEYS) - @join__type(graph: PUBLIC) +scalar Timestamp @join__type(graph: API_KEYS) @join__type(graph: PUBLIC) -"""A time-based one-time password""" -scalar TotpCode - @join__type(graph: PUBLIC) +""" +A time-based one-time password +""" +scalar TotpCode @join__type(graph: PUBLIC) -"""An id to be passed between set and verify for confirming totp""" -scalar TotpRegistrationId - @join__type(graph: PUBLIC) +""" +An id to be passed between set and verify for confirming totp +""" +scalar TotpRegistrationId @join__type(graph: PUBLIC) -"""A secret to generate time-based one-time password""" -scalar TotpSecret - @join__type(graph: PUBLIC) +""" +A secret to generate time-based one-time password +""" +scalar TotpSecret @join__type(graph: PUBLIC) """ Give details about an individual transaction. @@ -1631,67 +1760,79 @@ 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. """ -type Transaction - @join__type(graph: PUBLIC) -{ +type Transaction @join__type(graph: PUBLIC) { createdAt: Timestamp! direction: TxDirection! id: ID! - """From which protocol the payment has been initiated.""" + """ + From which protocol the payment has been initiated. + """ initiationVia: InitiationVia! memo: Memo - """Amount of the settlement currency sent or received.""" + """ + Amount of the settlement currency sent or received. + """ settlementAmount: SignedAmount! - """Wallet currency for transaction.""" + """ + Wallet currency for transaction. + """ settlementCurrency: WalletCurrency! settlementDisplayAmount: SignedDisplayMajorAmount! settlementDisplayCurrency: DisplayCurrency! settlementDisplayFee: SignedDisplayMajorAmount! settlementFee: SignedAmount! - """Price in WALLETCURRENCY/SETTLEMENTUNIT at time of settlement.""" + """ + Price in WALLETCURRENCY/SETTLEMENTUNIT at time of settlement. + """ settlementPrice: PriceOfOneSettlementMinorUnitInDisplayMinorUnit! - """To which protocol the payment has settled on.""" + """ + To which protocol the payment has settled on. + """ settlementVia: SettlementVia! status: TxStatus! } -"""A connection to a list of items.""" -type TransactionConnection - @join__type(graph: PUBLIC) -{ - """A list of edges.""" +""" +A connection to a list of items. +""" +type TransactionConnection @join__type(graph: PUBLIC) { + """ + A list of edges. + """ edges: [TransactionEdge!] - """Information to aid in pagination.""" + """ + Information to aid in pagination. + """ pageInfo: PageInfo! } -"""An edge in a connection.""" -type TransactionEdge - @join__type(graph: PUBLIC) -{ - """A cursor for use in pagination""" +""" +An edge in a connection. +""" +type TransactionEdge @join__type(graph: PUBLIC) { + """ + A cursor for use in pagination + """ cursor: String! - """The item at the end of the edge""" + """ + The item at the end of the edge + """ node: Transaction! } -enum TxDirection - @join__type(graph: PUBLIC) -{ +enum TxDirection @join__type(graph: PUBLIC) { RECEIVE @join__enumValue(graph: PUBLIC) SEND @join__enumValue(graph: PUBLIC) } -enum TxNotificationType - @join__type(graph: PUBLIC) -{ +enum TxNotificationType @join__type(graph: PUBLIC) { IntraLedgerPayment @join__enumValue(graph: PUBLIC) IntraLedgerReceipt @join__enumValue(graph: PUBLIC) LnInvoicePaid @join__enumValue(graph: PUBLIC) @@ -1700,17 +1841,13 @@ enum TxNotificationType OnchainReceiptPending @join__enumValue(graph: PUBLIC) } -enum TxStatus - @join__type(graph: PUBLIC) -{ +enum TxStatus @join__type(graph: PUBLIC) { FAILURE @join__enumValue(graph: PUBLIC) PENDING @join__enumValue(graph: PUBLIC) SUCCESS @join__enumValue(graph: PUBLIC) } -type UpgradePayload - @join__type(graph: PUBLIC) -{ +type UpgradePayload @join__type(graph: PUBLIC) { authToken: AuthToken errors: [Error!]! success: Boolean! @@ -1721,63 +1858,94 @@ A wallet belonging to an account which contains a USD balance and a list of tran """ type UsdWallet implements Wallet @join__implements(graph: PUBLIC, interface: "Wallet") - @join__type(graph: PUBLIC) -{ + @join__type(graph: PUBLIC) { accountId: ID! balance: SignedAmount! id: ID! invoiceByPaymentHash(paymentHash: PaymentHash!): Invoice! - """A list of all invoices associated with walletIds optionally passed.""" + """ + A list of all invoices associated with walletIds optionally passed. + """ invoices( - """Returns the items in the list that come after the specified cursor.""" + """ + Returns the items in the list that come after the specified cursor. + """ after: String - """Returns the items in the list that come before the specified cursor.""" + """ + Returns the items in the list that come before the specified cursor. + """ before: String - """Returns the first n items from the list.""" + """ + Returns the first n items from the list. + """ first: Int - """Returns the last n items from the list.""" + """ + Returns the last n items from the list. + """ last: Int ): InvoiceConnection - """An unconfirmed incoming onchain balance.""" + """ + An unconfirmed incoming onchain balance. + """ pendingIncomingBalance: SignedAmount! pendingTransactions: [Transaction!]! pendingTransactionsByAddress( - """Returns the items that include this address.""" + """ + Returns the items that include this address. + """ address: OnChainAddress! ): [Transaction!]! transactionById(transactionId: ID!): Transaction! transactions( - """Returns the items in the list that come after the specified cursor.""" + """ + Returns the items in the list that come after the specified cursor. + """ after: String - """Returns the items in the list that come before the specified cursor.""" + """ + Returns the items in the list that come before the specified cursor. + """ before: String - """Returns the first n items from the list.""" + """ + Returns the first n items from the list. + """ first: Int - """Returns the last n items from the list.""" + """ + Returns the last n items from the list. + """ last: Int ): TransactionConnection transactionsByAddress( - """Returns the items that include this address.""" + """ + Returns the items that include this address. + """ address: OnChainAddress! - """Returns the items in the list that come after the specified cursor.""" + """ + Returns the items in the list that come after the specified cursor. + """ after: String - """Returns the items in the list that come before the specified cursor.""" + """ + Returns the items in the list that come before the specified cursor. + """ before: String - """Returns the first n items from the list.""" + """ + Returns the first n items from the list. + """ first: Int - """Returns the last n items from the list.""" + """ + Returns the last n items from the list. + """ last: Int ): TransactionConnection transactionsByPaymentHash(paymentHash: PaymentHash!): [Transaction!]! @@ -1786,8 +1954,7 @@ type UsdWallet implements Wallet type User @join__type(graph: API_KEYS, key: "id", extension: true) - @join__type(graph: PUBLIC) -{ + @join__type(graph: PUBLIC) { id: ID! apiKeys: [ApiKey!]! @join__field(graph: API_KEYS) @@ -1795,17 +1962,23 @@ type User Get single contact details. Can include the transactions associated with the contact. """ - contactByUsername(username: Username!): UserContact! @join__field(graph: PUBLIC) @deprecated(reason: "will be moved to Accounts") + contactByUsername(username: Username!): UserContact! + @join__field(graph: PUBLIC) + @deprecated(reason: "will be moved to Accounts") """ Get full list of contacts. Can include the transactions associated with each contact. """ - contacts: [UserContact!]! @join__field(graph: PUBLIC) @deprecated(reason: "will be moved to account") + contacts: [UserContact!]! + @join__field(graph: PUBLIC) + @deprecated(reason: "will be moved to account") createdAt: Timestamp! @join__field(graph: PUBLIC) defaultAccount: Account! @join__field(graph: PUBLIC) - """Email address""" + """ + Email address + """ email: Email @join__field(graph: PUBLIC) """ @@ -1814,22 +1987,32 @@ type User """ language: Language! @join__field(graph: PUBLIC) - """Phone number with international calling code.""" + """ + Phone number with international calling code. + """ phone: Phone @join__field(graph: PUBLIC) - """List the quiz questions the user may have completed.""" - quizQuestions: [UserQuizQuestion!]! @join__field(graph: PUBLIC) @deprecated(reason: "use Quiz from Account instead") + """ + List the quiz questions the user may have completed. + """ + quizQuestions: [UserQuizQuestion!]! + @join__field(graph: PUBLIC) + @deprecated(reason: "use Quiz from Account instead") - """Whether TOTP is enabled for this user.""" + """ + Whether TOTP is enabled for this user. + """ totpEnabled: Boolean! @join__field(graph: PUBLIC) - """Optional immutable user friendly identifier.""" - username: Username @join__field(graph: PUBLIC) @deprecated(reason: "will be moved to @Handle in Account and Wallet") + """ + Optional immutable user friendly identifier. + """ + username: Username + @join__field(graph: PUBLIC) + @deprecated(reason: "will be moved to @Handle in Account and Wallet") } -type UserContact - @join__type(graph: PUBLIC) -{ +type UserContact @join__type(graph: PUBLIC) { """ Alias the user can set for this contact. Only the user can see the alias attached to their contact. @@ -1837,172 +2020,143 @@ type UserContact alias: ContactAlias id: Username! - """Paginated list of transactions sent to/from this contact.""" + """ + Paginated list of transactions sent to/from this contact. + """ transactions( - """Returns the items in the list that come after the specified cursor.""" + """ + Returns the items in the list that come after the specified cursor. + """ after: String - """Returns the items in the list that come before the specified cursor.""" + """ + Returns the items in the list that come before the specified cursor. + """ before: String - """Returns the first n items from the list.""" + """ + Returns the first n items from the list. + """ first: Int - """Returns the last n items from the list.""" + """ + Returns the last n items from the list. + """ last: Int ): TransactionConnection transactionsCount: Int! - """Actual identifier of the contact.""" + """ + Actual identifier of the contact. + """ username: Username! } -input UserContactUpdateAliasInput - @join__type(graph: PUBLIC) -{ +input UserContactUpdateAliasInput @join__type(graph: PUBLIC) { alias: ContactAlias! username: Username! } -type UserContactUpdateAliasPayload - @join__type(graph: PUBLIC) -{ +type UserContactUpdateAliasPayload @join__type(graph: PUBLIC) { contact: UserContact errors: [Error!]! } -type UserEmailDeletePayload - @join__type(graph: PUBLIC) -{ +type UserEmailDeletePayload @join__type(graph: PUBLIC) { errors: [Error!]! me: User } -input UserEmailRegistrationInitiateInput - @join__type(graph: PUBLIC) -{ +input UserEmailRegistrationInitiateInput @join__type(graph: PUBLIC) { email: EmailAddress! } -type UserEmailRegistrationInitiatePayload - @join__type(graph: PUBLIC) -{ +type UserEmailRegistrationInitiatePayload @join__type(graph: PUBLIC) { emailRegistrationId: EmailRegistrationId errors: [Error!]! me: User } -input UserEmailRegistrationValidateInput - @join__type(graph: PUBLIC) -{ +input UserEmailRegistrationValidateInput @join__type(graph: PUBLIC) { code: OneTimeAuthCode! emailRegistrationId: EmailRegistrationId! } -type UserEmailRegistrationValidatePayload - @join__type(graph: PUBLIC) -{ +type UserEmailRegistrationValidatePayload @join__type(graph: PUBLIC) { errors: [Error!]! me: User } -input UserLoginInput - @join__type(graph: PUBLIC) -{ +input UserLoginInput @join__type(graph: PUBLIC) { code: OneTimeAuthCode! phone: Phone! } -input UserLoginUpgradeInput - @join__type(graph: PUBLIC) -{ +input UserLoginUpgradeInput @join__type(graph: PUBLIC) { code: OneTimeAuthCode! phone: Phone! } -input UserLogoutInput - @join__type(graph: PUBLIC) -{ +input UserLogoutInput @join__type(graph: PUBLIC) { deviceToken: String! } -"""Unique identifier of a user""" -scalar Username - @join__type(graph: PUBLIC) +""" +Unique identifier of a user +""" +scalar Username @join__type(graph: PUBLIC) -type UserPhoneDeletePayload - @join__type(graph: PUBLIC) -{ +type UserPhoneDeletePayload @join__type(graph: PUBLIC) { errors: [Error!]! me: User } -input UserPhoneRegistrationInitiateInput - @join__type(graph: PUBLIC) -{ +input UserPhoneRegistrationInitiateInput @join__type(graph: PUBLIC) { channel: PhoneCodeChannelType phone: Phone! } -input UserPhoneRegistrationValidateInput - @join__type(graph: PUBLIC) -{ +input UserPhoneRegistrationValidateInput @join__type(graph: PUBLIC) { code: OneTimeAuthCode! phone: Phone! } -type UserPhoneRegistrationValidatePayload - @join__type(graph: PUBLIC) -{ +type UserPhoneRegistrationValidatePayload @join__type(graph: PUBLIC) { errors: [Error!]! me: User } -type UserQuizQuestion - @join__type(graph: PUBLIC) -{ +type UserQuizQuestion @join__type(graph: PUBLIC) { completed: Boolean! question: QuizQuestion! } -input UserTotpDeleteInput - @join__type(graph: PUBLIC) -{ +input UserTotpDeleteInput @join__type(graph: PUBLIC) { authToken: AuthToken! } -type UserTotpDeletePayload - @join__type(graph: PUBLIC) -{ +type UserTotpDeletePayload @join__type(graph: PUBLIC) { errors: [Error!]! me: User } -input UserTotpRegistrationInitiateInput - @join__type(graph: PUBLIC) -{ +input UserTotpRegistrationInitiateInput @join__type(graph: PUBLIC) { authToken: AuthToken! } -type UserTotpRegistrationInitiatePayload - @join__type(graph: PUBLIC) -{ +type UserTotpRegistrationInitiatePayload @join__type(graph: PUBLIC) { errors: [Error!]! totpRegistrationId: TotpRegistrationId totpSecret: TotpSecret } -input UserTotpRegistrationValidateInput - @join__type(graph: PUBLIC) -{ +input UserTotpRegistrationValidateInput @join__type(graph: PUBLIC) { authToken: AuthToken! totpCode: TotpCode! totpRegistrationId: TotpRegistrationId! } -type UserTotpRegistrationValidatePayload - @join__type(graph: PUBLIC) -{ +type UserTotpRegistrationValidatePayload @join__type(graph: PUBLIC) { errors: [Error!]! me: User } @@ -2013,31 +2167,27 @@ union UserUpdate @join__unionMember(graph: PUBLIC, member: "LnUpdate") @join__unionMember(graph: PUBLIC, member: "OnChainUpdate") @join__unionMember(graph: PUBLIC, member: "Price") - @join__unionMember(graph: PUBLIC, member: "RealtimePrice") - = IntraLedgerUpdate | LnUpdate | OnChainUpdate | Price | RealtimePrice - -input UserUpdateLanguageInput - @join__type(graph: PUBLIC) -{ + @join__unionMember(graph: PUBLIC, member: "RealtimePrice") = + IntraLedgerUpdate + | LnUpdate + | OnChainUpdate + | Price + | RealtimePrice + +input UserUpdateLanguageInput @join__type(graph: PUBLIC) { language: Language! } -type UserUpdateLanguagePayload - @join__type(graph: PUBLIC) -{ +type UserUpdateLanguagePayload @join__type(graph: PUBLIC) { errors: [Error!]! user: User } -input UserUpdateUsernameInput - @join__type(graph: PUBLIC) -{ +input UserUpdateUsernameInput @join__type(graph: PUBLIC) { username: Username! } -type UserUpdateUsernamePayload - @join__type(graph: PUBLIC) -{ +type UserUpdateUsernamePayload @join__type(graph: PUBLIC) { errors: [Error!]! user: User } @@ -2045,9 +2195,7 @@ type UserUpdateUsernamePayload """ A generic wallet which stores value in one of our supported currencies. """ -interface Wallet - @join__type(graph: PUBLIC) -{ +interface Wallet @join__type(graph: PUBLIC) { accountId: ID! balance: SignedAmount! id: ID! @@ -2058,16 +2206,24 @@ interface Wallet paymentHash: PaymentHash! ): Invoice! invoices( - """Returns the items in the list that come after the specified cursor.""" + """ + Returns the items in the list that come after the specified cursor. + """ after: String - """Returns the items in the list that come before the specified cursor.""" + """ + Returns the items in the list that come before the specified cursor. + """ before: String - """Returns the first n items from the list.""" + """ + Returns the first n items from the list. + """ first: Int - """Returns the last n items from the list.""" + """ + Returns the last n items from the list. + """ last: Int ): InvoiceConnection pendingIncomingBalance: SignedAmount! @@ -2087,7 +2243,9 @@ interface Wallet ie: the newest transaction will be first """ pendingTransactionsByAddress( - """Returns the items that include this address.""" + """ + Returns the items that include this address. + """ address: OnChainAddress! ): [Transaction!]! transactionById(transactionId: ID!): Transaction! @@ -2097,16 +2255,24 @@ interface Wallet ie: the newest transaction will be first """ transactions( - """Returns the items in the list that come after the specified cursor.""" + """ + Returns the items in the list that come after the specified cursor. + """ after: String - """Returns the items in the list that come before the specified cursor.""" + """ + Returns the items in the list that come before the specified cursor. + """ before: String - """Returns the first n items from the list.""" + """ + Returns the first n items from the list. + """ first: Int - """Returns the last n items from the list.""" + """ + Returns the last n items from the list. + """ last: Int ): TransactionConnection @@ -2115,19 +2281,29 @@ interface Wallet ie: the newest transaction will be first """ transactionsByAddress( - """Returns the items that include this address.""" + """ + Returns the items that include this address. + """ address: OnChainAddress! - """Returns the items in the list that come after the specified cursor.""" + """ + Returns the items in the list that come after the specified cursor. + """ after: String - """Returns the items in the list that come before the specified cursor.""" + """ + Returns the items in the list that come before the specified cursor. + """ before: String - """Returns the first n items from the list.""" + """ + Returns the first n items from the list. + """ first: Int - """Returns the last n items from the list.""" + """ + Returns the last n items from the list. + """ last: Int ): TransactionConnection @@ -2135,19 +2311,20 @@ interface Wallet Returns the transactions that include this paymentHash. This should be a list of size one for a received lightning payment. This can be more that one transaction for a sent lightning payment. """ transactionsByPaymentHash( - """The payment hash of the lightning invoice paid in this transaction.""" + """ + The payment hash of the lightning invoice paid in this transaction. + """ paymentHash: PaymentHash! ): [Transaction!]! walletCurrency: WalletCurrency! } -enum WalletCurrency - @join__type(graph: PUBLIC) -{ +enum WalletCurrency @join__type(graph: PUBLIC) { BTC @join__enumValue(graph: PUBLIC) USD @join__enumValue(graph: PUBLIC) } -"""Unique identifier of a wallet""" -scalar WalletId - @join__type(graph: PUBLIC) \ No newline at end of file +""" +Unique identifier of a wallet +""" +scalar WalletId @join__type(graph: PUBLIC)