@galoymoney/client
Advanced tools
Comparing version 0.1.63 to 0.1.64
export declare const MUTATIONS: { | ||
accountUpdateStatus: import("graphql").DocumentNode; | ||
accountUpdateLevel: import("graphql").DocumentNode; | ||
accountUpdateStatus: any; | ||
accountUpdateLevel: any; | ||
}; |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.MUTATIONS = void 0; | ||
var account_update_level_1 = __importDefault(require("./mutations/account-update-level")); | ||
var account_update_status_1 = __importDefault(require("./mutations/account-update-status")); | ||
var load_files_1 = require("@graphql-tools/load-files"); | ||
var accountUpdateStatus = (0, load_files_1.loadFilesSync)("./mutations/account-update-status.gql")[0]; | ||
var accountUpdateLevel = (0, load_files_1.loadFilesSync)("./mutations/account-update-level.gql")[0]; | ||
exports.MUTATIONS = { | ||
accountUpdateStatus: account_update_status_1.default, | ||
accountUpdateLevel: account_update_level_1.default, | ||
accountUpdateStatus: accountUpdateStatus, | ||
accountUpdateLevel: accountUpdateLevel, | ||
}; |
export declare const QUERIES: { | ||
accountDetailsByUserPhone: import("graphql").DocumentNode; | ||
accountDetailsByUsername: import("graphql").DocumentNode; | ||
accountDetailsByUserPhone: any; | ||
accountDetailsByUsername: any; | ||
}; |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.QUERIES = void 0; | ||
var account_details_by_user_phone_1 = __importDefault(require("./queries/account-details-by-user-phone")); | ||
var account_details_by_username_1 = __importDefault(require("./queries/account-details-by-username")); | ||
var load_files_1 = require("@graphql-tools/load-files"); | ||
var accountDetailsByUserPhone = (0, load_files_1.loadFilesSync)("./queries/account-details-by-user-phone.gql")[0]; | ||
var accountDetailsByUsername = (0, load_files_1.loadFilesSync)("./queries/account-details-by-username.gql")[0]; | ||
exports.QUERIES = { | ||
accountDetailsByUserPhone: account_details_by_user_phone_1.default, | ||
accountDetailsByUsername: account_details_by_username_1.default, | ||
accountDetailsByUserPhone: accountDetailsByUserPhone, | ||
accountDetailsByUsername: accountDetailsByUsername, | ||
}; |
@@ -12,3 +12,3 @@ import "cross-fetch/polyfill"; | ||
export declare const postRequest: (authToken: string | undefined) => (path: string, variables?: Record<string, string | number | boolean>) => Promise<any>; | ||
export declare type CreateGaloyClientFunction = (argW: { | ||
export type CreateGaloyClientFunction = (argW: { | ||
config: Record<string, any>; | ||
@@ -15,0 +15,0 @@ initData?: NormalizedCacheObject; |
@@ -28,3 +28,3 @@ "use strict"; | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
while (g && (g = 0, op[0] && (_ = 0)), _) try { | ||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | ||
@@ -55,4 +55,5 @@ if (y = 0, t) op = [op[0] & 2, t.value]; | ||
var error_1 = require("@apollo/client/link/error"); | ||
var ws_1 = require("@apollo/client/link/ws"); | ||
var utilities_1 = require("@apollo/client/utilities"); | ||
var subscriptions_1 = require("@apollo/client/link/subscriptions"); | ||
var graphql_ws_1 = require("graphql-ws"); | ||
var client_2 = require("@apollo/client"); | ||
@@ -162,18 +163,11 @@ Object.defineProperty(exports, "GaloyProvider", { enumerable: true, get: function () { return client_2.ApolloProvider; } }); | ||
var httpLink = new client_1.HttpLink({ uri: config.graphqlUrl, credentials: "include" }); | ||
var wsLink = new ws_1.WebSocketLink({ | ||
uri: config.graphqlSubscriptionUrl, | ||
options: { | ||
reconnect: true, | ||
reconnectionAttempts: 3, | ||
lazy: true, | ||
connectionParams: function () { return __awaiter(void 0, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
return [2 /*return*/, { | ||
credentials: "include", | ||
authorization: authToken ? "Bearer ".concat(authToken) : "", | ||
}]; | ||
}); | ||
}); }, | ||
}, | ||
}); | ||
var wsLink = new subscriptions_1.GraphQLWsLink((0, graphql_ws_1.createClient)({ | ||
url: config.graphqlSubscriptionUrl, | ||
connectionParams: authToken | ||
? { Authorization: "Bearer ".concat(authToken) } | ||
: undefined, | ||
webSocketImpl: WebSocket, | ||
// TODO: implement keepAlive and reconnection? | ||
// https://github.com/enisdenjo/graphql-ws/blob/master/docs/interfaces/client.ClientOptions.md#keepalive | ||
})); | ||
var splitLink = (0, client_1.split)(function (_a) { | ||
@@ -180,0 +174,0 @@ var query = _a.query; |
import { GaloyGQL } from "./types"; | ||
declare const joinErrorsMessages: (errors?: Array<GaloyGQL.Error>) => string | undefined; | ||
export declare type CachedData = { | ||
export type CachedData = { | ||
satPriceInCents: number; | ||
@@ -5,0 +5,0 @@ }; |
import { MutationFunctionOptions, MutationHookOptions, MutationResult } from "@apollo/client"; | ||
import { GaloyGQL } from "../index"; | ||
export declare const MUTATIONS: { | ||
accountUpdateDefaultWalletId: import("@apollo/client").DocumentNode; | ||
captchaCreateChallenge: import("@apollo/client").DocumentNode; | ||
captchaRequestAuthCode: import("@apollo/client").DocumentNode; | ||
deviceNotificationTokenCreate: import("@apollo/client").DocumentNode; | ||
intraLedgerPaymentSend: import("@apollo/client").DocumentNode; | ||
intraLedgerUsdPaymentSend: import("@apollo/client").DocumentNode; | ||
lnInvoiceCreate: import("@apollo/client").DocumentNode; | ||
lnInvoiceCreateOnBehalfOfRecipient: import("@apollo/client").DocumentNode; | ||
lnInvoiceFeeProbe: import("@apollo/client").DocumentNode; | ||
lnInvoicePaymentSend: import("@apollo/client").DocumentNode; | ||
lnNoAmountInvoiceCreate: import("@apollo/client").DocumentNode; | ||
lnNoAmountInvoiceFeeProbe: import("@apollo/client").DocumentNode; | ||
lnNoAmountInvoicePaymentSend: import("@apollo/client").DocumentNode; | ||
lnNoAmountUsdInvoiceFeeProbe: import("@apollo/client").DocumentNode; | ||
lnNoAmountUsdInvoicePaymentSend: import("@apollo/client").DocumentNode; | ||
lnUsdInvoiceCreate: import("@apollo/client").DocumentNode; | ||
lnUsdInvoiceCreateOnBehalfOfRecipient: import("@apollo/client").DocumentNode; | ||
lnUsdInvoiceFeeProbe: import("@apollo/client").DocumentNode; | ||
onChainAddressCurrent: import("@apollo/client").DocumentNode; | ||
onChainPaymentSend: import("@apollo/client").DocumentNode; | ||
userContactUpdateAlias: import("@apollo/client").DocumentNode; | ||
userLogin: import("@apollo/client").DocumentNode; | ||
userQuizQuestionUpdateCompleted: import("@apollo/client").DocumentNode; | ||
userUpdateLanguage: import("@apollo/client").DocumentNode; | ||
userUpdateUsername: import("@apollo/client").DocumentNode; | ||
accountUpdateDefaultWalletId: any; | ||
userLoginUpgrade: any; | ||
userDeviceAccountCreate: any; | ||
captchaCreateChallenge: any; | ||
captchaRequestAuthCode: any; | ||
deviceNotificationTokenCreate: any; | ||
intraLedgerPaymentSend: any; | ||
intraLedgerUsdPaymentSend: any; | ||
lnInvoiceCreate: any; | ||
lnInvoiceCreateOnBehalfOfRecipient: any; | ||
lnInvoiceFeeProbe: any; | ||
lnInvoicePaymentSend: any; | ||
lnNoAmountInvoiceCreate: any; | ||
lnNoAmountInvoiceFeeProbe: any; | ||
lnNoAmountInvoicePaymentSend: any; | ||
lnNoAmountUsdInvoiceFeeProbe: any; | ||
lnNoAmountUsdInvoicePaymentSend: any; | ||
lnUsdInvoiceCreate: any; | ||
lnUsdInvoiceCreateOnBehalfOfRecipient: any; | ||
lnUsdInvoiceFeeProbe: any; | ||
onChainAddressCurrent: any; | ||
onChainPaymentSend: any; | ||
userContactUpdateAlias: any; | ||
userLogin: any; | ||
userQuizQuestionUpdateCompleted: any; | ||
userUpdateLanguage: any; | ||
userUpdateUsername: any; | ||
}; | ||
declare type MutationHelpers = { | ||
type MutationHelpers = { | ||
errorsMessage?: string; | ||
}; | ||
declare type MutationFunction<TData, TVars> = (options?: MutationFunctionOptions<TData, TVars>) => Promise<MutationResult<TData> & MutationHelpers>; | ||
type MutationFunction<TData, TVars> = (options?: MutationFunctionOptions<TData, TVars>) => Promise<MutationResult<TData> & MutationHelpers>; | ||
export declare const useMutation: { | ||
@@ -40,2 +42,12 @@ accountUpdateDefaultWalletId: (config?: MutationHookOptions<GaloyGQL.AccountUpdateDefaultWalletIdMutation, GaloyGQL.Exact<{ | ||
}>>, MutationResult<GaloyGQL.AccountUpdateDefaultWalletIdMutation> & MutationHelpers]; | ||
userLoginUpgrade: (config?: MutationHookOptions<GaloyGQL.UserLoginUpgradeMutation, GaloyGQL.Exact<{ | ||
input: GaloyGQL.UserLoginUpgrade; | ||
}>, import("@apollo/client").DefaultContext, import("@apollo/client").ApolloCache<any>> | undefined) => [MutationFunction<GaloyGQL.UserLoginUpgradeMutation, GaloyGQL.Exact<{ | ||
input: GaloyGQL.UserLoginUpgrade; | ||
}>>, MutationResult<GaloyGQL.UserLoginUpgradeMutation> & MutationHelpers]; | ||
userDeviceAccountCreate: (config?: MutationHookOptions<GaloyGQL.UserDeviceAccountCreateMutation, GaloyGQL.Exact<{ | ||
input: GaloyGQL.UserDeviceAccountCreateInput; | ||
}>, import("@apollo/client").DefaultContext, import("@apollo/client").ApolloCache<any>> | undefined) => [MutationFunction<GaloyGQL.UserDeviceAccountCreateMutation, GaloyGQL.Exact<{ | ||
input: GaloyGQL.UserDeviceAccountCreateInput; | ||
}>>, MutationResult<GaloyGQL.UserDeviceAccountCreateMutation> & MutationHelpers]; | ||
captchaCreateChallenge: (config?: MutationHookOptions<GaloyGQL.CaptchaCreateChallengeMutation, GaloyGQL.Exact<{ | ||
@@ -42,0 +54,0 @@ [key: string]: never; |
@@ -28,3 +28,3 @@ "use strict"; | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
while (g && (g = 0, op[0] && (_ = 0)), _) try { | ||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | ||
@@ -50,5 +50,2 @@ if (y = 0, t) op = [op[0] & 2, t.value]; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -59,53 +56,58 @@ exports.useMutation = exports.MUTATIONS = void 0; | ||
var index_1 = require("../index"); | ||
var account_update_default_wallet_id_1 = __importDefault(require("./mutations/account-update-default-wallet-id")); | ||
var captcha_create_challenge_1 = __importDefault(require("./mutations/captcha-create-challenge")); | ||
var captcha_request_auth_code_1 = __importDefault(require("./mutations/captcha-request-auth-code")); | ||
var device_notification_token_create_1 = __importDefault(require("./mutations/device-notification-token-create")); | ||
var intra_ledger_paymest_send_1 = __importDefault(require("./mutations/intra-ledger-paymest-send")); | ||
var intra_ledger_usd_payment_send_1 = __importDefault(require("./mutations/intra-ledger-usd-payment-send")); | ||
var ln_invoice_create_1 = __importDefault(require("./mutations/ln-invoice-create")); | ||
var ln_invoice_create_on_behalf_of_recipient_1 = __importDefault(require("./mutations/ln-invoice-create-on-behalf-of-recipient")); | ||
var ln_invoice_fee_probe_1 = __importDefault(require("./mutations/ln-invoice-fee-probe")); | ||
var ln_invoice_payment_send_1 = __importDefault(require("./mutations/ln-invoice-payment-send")); | ||
var ln_no_amount_invoice_create_1 = __importDefault(require("./mutations/ln-no-amount-invoice-create")); | ||
var ln_no_amount_invoice_fee_probe_1 = __importDefault(require("./mutations/ln-no-amount-invoice-fee-probe")); | ||
var ln_no_amount_invoice_payment_send_1 = __importDefault(require("./mutations/ln-no-amount-invoice-payment-send")); | ||
var ln_no_amount_usd_invoice_fee_probe_1 = __importDefault(require("./mutations/ln-no-amount-usd-invoice-fee-probe")); | ||
var ln_no_amount_usd_invoice_payment_send_1 = __importDefault(require("./mutations/ln-no-amount-usd-invoice-payment-send")); | ||
var ln_usd_invoice_create_1 = __importDefault(require("./mutations/ln-usd-invoice-create")); | ||
var ln_usd_invoice_create_on_behalf_of_recipient_1 = __importDefault(require("./mutations/ln-usd-invoice-create-on-behalf-of-recipient")); | ||
var ln_usd_invoice_fee_probe_1 = __importDefault(require("./mutations/ln-usd-invoice-fee-probe")); | ||
var on_chain_address_current_1 = __importDefault(require("./mutations/on-chain-address-current")); | ||
var on_chain_payment_send_1 = __importDefault(require("./mutations/on-chain-payment-send")); | ||
var user_contact_update_alias_1 = __importDefault(require("./mutations/user-contact-update-alias")); | ||
var user_login_1 = __importDefault(require("./mutations/user-login")); | ||
var user_quiz_question_update_completed_1 = __importDefault(require("./mutations/user-quiz-question-update-completed")); | ||
var user_update_language_1 = __importDefault(require("./mutations/user-update-language")); | ||
var user_update_username_1 = __importDefault(require("./mutations/user-update-username")); | ||
var load_files_1 = require("@graphql-tools/load-files"); | ||
var accountUpdateDefaultWalletId = (0, load_files_1.loadFilesSync)("./mutations/account-update-default-wallet-id.gql")[0]; | ||
var userLoginUpgrade = (0, load_files_1.loadFilesSync)("./mutations/user-login-upgrade.gql")[0]; | ||
var userDeviceAccountCreate = (0, load_files_1.loadFilesSync)("./mutations/user-device-account-create.gql")[0]; | ||
var captchaCreateChallenge = (0, load_files_1.loadFilesSync)("./mutations/captcha-create-challenge.gql")[0]; | ||
var captchaRequestAuthCode = (0, load_files_1.loadFilesSync)("./mutations/captcha-request-auth-code.gql")[0]; | ||
var deviceNotificationTokenCreate = (0, load_files_1.loadFilesSync)("./mutations/device-notification-token-create.gql")[0]; | ||
var intraLedgerPaymentSend = (0, load_files_1.loadFilesSync)("./mutations/intra-ledger-paymest-send.gql")[0]; | ||
var intraLedgerUsdPaymentSend = (0, load_files_1.loadFilesSync)("./mutations/intra-ledger-usd-payment-send.gql")[0]; | ||
var lnInvoiceCreate = (0, load_files_1.loadFilesSync)("./mutations/ln-invoice-create.gql")[0]; | ||
var lnInvoiceCreateOnBehalfOfRecipient = (0, load_files_1.loadFilesSync)("./mutations/ln-invoice-create-on-behalf-of-recipient.gql")[0]; | ||
var lnInvoiceFeeProbe = (0, load_files_1.loadFilesSync)("./mutations/ln-invoice-fee-probe.gql")[0]; | ||
var lnInvoicePaymentSend = (0, load_files_1.loadFilesSync)("./mutations/ln-invoice-payment-send.gql")[0]; | ||
var lnNoAmountInvoiceCreate = (0, load_files_1.loadFilesSync)("./mutations/ln-no-amount-invoice-create.gql")[0]; | ||
var lnNoAmountInvoiceFeeProbe = (0, load_files_1.loadFilesSync)("./mutations/ln-no-amount-invoice-fee-probe.gql")[0]; | ||
var lnNoAmountInvoicePaymentSend = (0, load_files_1.loadFilesSync)("./mutations/ln-no-amount-invoice-payment-send.gql")[0]; | ||
var lnNoAmountUsdInvoiceFeeProbe = (0, load_files_1.loadFilesSync)("./mutations/ln-no-amount-usd-invoice-fee-probe.gql")[0]; | ||
var lnNoAmountUsdInvoicePaymentSend = (0, load_files_1.loadFilesSync)("./mutations/ln-no-amount-usd-invoice-payment-send.gql")[0]; | ||
var lnUsdInvoiceCreate = (0, load_files_1.loadFilesSync)("./mutations/ln-usd-invoice-create.gql")[0]; | ||
var lnUsdInvoiceCreateOnBehalfOfRecipient = (0, load_files_1.loadFilesSync)("./mutations/ln-usd-invoice-create-on-behalf-of-recipient.gql")[0]; | ||
var lnUsdInvoiceFeeProbe = (0, load_files_1.loadFilesSync)("./mutations/ln-usd-invoice-fee-probe.gql")[0]; | ||
var onChainAddressCurrent = (0, load_files_1.loadFilesSync)("./mutations/on-chain-address-current.gql")[0]; | ||
var onChainPaymentSend = (0, load_files_1.loadFilesSync)("./mutations/on-chain-payment-send.gql")[0]; | ||
var userContactUpdateAlias = (0, load_files_1.loadFilesSync)("./mutations/user-contact-update-alias.gql")[0]; | ||
var userLogin = (0, load_files_1.loadFilesSync)("./mutations/user-login.gql")[0]; | ||
var userQuizQuestionUpdateCompleted = (0, load_files_1.loadFilesSync)("./mutations/user-quiz-question-update-completed.gql")[0]; | ||
var userUpdateLanguage = (0, load_files_1.loadFilesSync)("./mutations/user-update-language.gql")[0]; | ||
var userUpdateUsername = (0, load_files_1.loadFilesSync)("./mutations/user-update-username.gql")[0]; | ||
exports.MUTATIONS = { | ||
accountUpdateDefaultWalletId: account_update_default_wallet_id_1.default, | ||
captchaCreateChallenge: captcha_create_challenge_1.default, | ||
captchaRequestAuthCode: captcha_request_auth_code_1.default, | ||
deviceNotificationTokenCreate: device_notification_token_create_1.default, | ||
intraLedgerPaymentSend: intra_ledger_paymest_send_1.default, | ||
intraLedgerUsdPaymentSend: intra_ledger_usd_payment_send_1.default, | ||
lnInvoiceCreate: ln_invoice_create_1.default, | ||
lnInvoiceCreateOnBehalfOfRecipient: ln_invoice_create_on_behalf_of_recipient_1.default, | ||
lnInvoiceFeeProbe: ln_invoice_fee_probe_1.default, | ||
lnInvoicePaymentSend: ln_invoice_payment_send_1.default, | ||
lnNoAmountInvoiceCreate: ln_no_amount_invoice_create_1.default, | ||
lnNoAmountInvoiceFeeProbe: ln_no_amount_invoice_fee_probe_1.default, | ||
lnNoAmountInvoicePaymentSend: ln_no_amount_invoice_payment_send_1.default, | ||
lnNoAmountUsdInvoiceFeeProbe: ln_no_amount_usd_invoice_fee_probe_1.default, | ||
lnNoAmountUsdInvoicePaymentSend: ln_no_amount_usd_invoice_payment_send_1.default, | ||
lnUsdInvoiceCreate: ln_usd_invoice_create_1.default, | ||
lnUsdInvoiceCreateOnBehalfOfRecipient: ln_usd_invoice_create_on_behalf_of_recipient_1.default, | ||
lnUsdInvoiceFeeProbe: ln_usd_invoice_fee_probe_1.default, | ||
onChainAddressCurrent: on_chain_address_current_1.default, | ||
onChainPaymentSend: on_chain_payment_send_1.default, | ||
userContactUpdateAlias: user_contact_update_alias_1.default, | ||
userLogin: user_login_1.default, | ||
userQuizQuestionUpdateCompleted: user_quiz_question_update_completed_1.default, | ||
userUpdateLanguage: user_update_language_1.default, | ||
userUpdateUsername: user_update_username_1.default, | ||
accountUpdateDefaultWalletId: accountUpdateDefaultWalletId, | ||
userLoginUpgrade: userLoginUpgrade, | ||
userDeviceAccountCreate: userDeviceAccountCreate, | ||
captchaCreateChallenge: captchaCreateChallenge, | ||
captchaRequestAuthCode: captchaRequestAuthCode, | ||
deviceNotificationTokenCreate: deviceNotificationTokenCreate, | ||
intraLedgerPaymentSend: intraLedgerPaymentSend, | ||
intraLedgerUsdPaymentSend: intraLedgerUsdPaymentSend, | ||
lnInvoiceCreate: lnInvoiceCreate, | ||
lnInvoiceCreateOnBehalfOfRecipient: lnInvoiceCreateOnBehalfOfRecipient, | ||
lnInvoiceFeeProbe: lnInvoiceFeeProbe, | ||
lnInvoicePaymentSend: lnInvoicePaymentSend, | ||
lnNoAmountInvoiceCreate: lnNoAmountInvoiceCreate, | ||
lnNoAmountInvoiceFeeProbe: lnNoAmountInvoiceFeeProbe, | ||
lnNoAmountInvoicePaymentSend: lnNoAmountInvoicePaymentSend, | ||
lnNoAmountUsdInvoiceFeeProbe: lnNoAmountUsdInvoiceFeeProbe, | ||
lnNoAmountUsdInvoicePaymentSend: lnNoAmountUsdInvoicePaymentSend, | ||
lnUsdInvoiceCreate: lnUsdInvoiceCreate, | ||
lnUsdInvoiceCreateOnBehalfOfRecipient: lnUsdInvoiceCreateOnBehalfOfRecipient, | ||
lnUsdInvoiceFeeProbe: lnUsdInvoiceFeeProbe, | ||
onChainAddressCurrent: onChainAddressCurrent, | ||
onChainPaymentSend: onChainPaymentSend, | ||
userContactUpdateAlias: userContactUpdateAlias, | ||
userLogin: userLogin, | ||
userQuizQuestionUpdateCompleted: userQuizQuestionUpdateCompleted, | ||
userUpdateLanguage: userUpdateLanguage, | ||
userUpdateUsername: userUpdateUsername, | ||
}; | ||
@@ -139,2 +141,4 @@ var useMutationWrapper = function (mutationName, config) { | ||
var accountUpdateDefaultWalletIdMutation = defineMutation("accountUpdateDefaultWalletId"); | ||
var userLoginUpgradeMutation = defineMutation("userLoginUpgrade"); | ||
var userDeviceAccountCreateMutation = defineMutation("userDeviceAccountCreate"); | ||
var captchaCreateChallengeMutation = defineMutation("captchaCreateChallenge"); | ||
@@ -166,2 +170,4 @@ var captchaRequestAuthCodeMutation = defineMutation("captchaRequestAuthCode"); | ||
accountUpdateDefaultWalletId: accountUpdateDefaultWalletIdMutation, | ||
userLoginUpgrade: userLoginUpgradeMutation, | ||
userDeviceAccountCreate: userDeviceAccountCreateMutation, | ||
captchaCreateChallenge: captchaCreateChallengeMutation, | ||
@@ -168,0 +174,0 @@ captchaRequestAuthCode: captchaRequestAuthCodeMutation, |
import { QueryResult, QueryHookOptions, QueryOptions } from "@apollo/client"; | ||
import { GaloyGQL } from "../index"; | ||
export declare const QUERIES: { | ||
accountDefaultWallet: import("@apollo/client").DocumentNode; | ||
btcPriceList: import("@apollo/client").DocumentNode; | ||
businessMapMarkers: import("@apollo/client").DocumentNode; | ||
contacts: import("@apollo/client").DocumentNode; | ||
getWalletCsvTransactions: import("@apollo/client").DocumentNode; | ||
main: import("@apollo/client").DocumentNode; | ||
onChainTxFee: import("@apollo/client").DocumentNode; | ||
quizQuestions: import("@apollo/client").DocumentNode; | ||
transactionList: import("@apollo/client").DocumentNode; | ||
transactionListForContact: import("@apollo/client").DocumentNode; | ||
transactionListForDefaultAccount: import("@apollo/client").DocumentNode; | ||
userDefaultWalletId: import("@apollo/client").DocumentNode; | ||
usernameAvailable: import("@apollo/client").DocumentNode; | ||
currencyList: import("@apollo/client").DocumentNode; | ||
accountDefaultWallet: any; | ||
btcPriceList: any; | ||
businessMapMarkers: any; | ||
contacts: any; | ||
getWalletCsvTransactions: any; | ||
main: any; | ||
onChainTxFee: any; | ||
quizQuestions: any; | ||
transactionList: any; | ||
transactionListForContact: any; | ||
transactionListForDefaultAccount: any; | ||
userDefaultWalletId: any; | ||
usernameAvailable: any; | ||
currencyList: any; | ||
}; | ||
declare type QueryHelpers = { | ||
type QueryHelpers = { | ||
errorsMessage?: string; | ||
@@ -21,0 +21,0 @@ }; |
@@ -28,3 +28,3 @@ "use strict"; | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
while (g && (g = 0, op[0] && (_ = 0)), _) try { | ||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | ||
@@ -50,5 +50,2 @@ if (y = 0, t) op = [op[0] & 2, t.value]; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -58,32 +55,33 @@ exports.useDelayedQuery = exports.useQuery = exports.QUERIES = void 0; | ||
var react_1 = require("react"); | ||
var account_default_wallet_1 = __importDefault(require("./queries/account-default-wallet")); | ||
var btc_price_list_1 = __importDefault(require("./queries/btc-price-list")); | ||
var business_map_markers_1 = __importDefault(require("./queries/business-map-markers")); | ||
var contacts_1 = __importDefault(require("./queries/contacts")); | ||
var get_wallet_csv_transactions_1 = __importDefault(require("./queries/get-wallet-csv-transactions")); | ||
var main_1 = __importDefault(require("./queries/main")); | ||
var on_chain_tx_fee_1 = __importDefault(require("./queries/on-chain-tx-fee")); | ||
var quiz_questions_1 = __importDefault(require("./queries/quiz-questions")); | ||
var transaction_list_1 = __importDefault(require("./queries/transaction-list")); | ||
var transaction_list_for_contact_1 = __importDefault(require("./queries/transaction-list-for-contact")); | ||
var transaction_list_for_default_account_1 = __importDefault(require("./queries/transaction-list-for-default-account")); | ||
var user_default_wallet_id_1 = __importDefault(require("./queries/user-default-wallet-id")); | ||
var username_available_1 = __importDefault(require("./queries/username-available")); | ||
var currency_list_1 = __importDefault(require("./queries/currency-list")); | ||
var index_1 = require("../index"); | ||
var load_files_1 = require("@graphql-tools/load-files"); | ||
var main = (0, load_files_1.loadFilesSync)("./queries/main.gql")[0]; | ||
var transactionList = (0, load_files_1.loadFilesSync)("./queries/transaction-list.gql")[0]; | ||
var transactionListForContact = (0, load_files_1.loadFilesSync)("./queries/transaction-list.gql")[0]; | ||
var transactionListForDefaultAccount = (0, load_files_1.loadFilesSync)("./queries/transaction-list.gql")[0]; | ||
var accountDefaultWallet = (0, load_files_1.loadFilesSync)("./queries/account-default-wallet.gql")[0]; | ||
var btcPriceList = (0, load_files_1.loadFilesSync)("./queries/btc-price-list.gql")[0]; | ||
var businessMapMarkers = (0, load_files_1.loadFilesSync)("./queries/business-map-markers.gql")[0]; | ||
var contacts = (0, load_files_1.loadFilesSync)("./queries/contacts.gql")[0]; | ||
var getWalletCsvTransactions = (0, load_files_1.loadFilesSync)("./queries/get-wallet-csv-transactions.gql")[0]; | ||
var onChainTxFee = (0, load_files_1.loadFilesSync)("./queries/on-chain-tx-fee.gql")[0]; | ||
var quizQuestions = (0, load_files_1.loadFilesSync)("./queries/quiz-questions.gql")[0]; | ||
var userDefaultWalletId = (0, load_files_1.loadFilesSync)("./queries/user-default-wallet-id.gql")[0]; | ||
var usernameAvailable = (0, load_files_1.loadFilesSync)("./queries/username-available.gql")[0]; | ||
var currencyList = (0, load_files_1.loadFilesSync)("./queries/currency-list.gql")[0]; | ||
exports.QUERIES = { | ||
accountDefaultWallet: account_default_wallet_1.default, | ||
btcPriceList: btc_price_list_1.default, | ||
businessMapMarkers: business_map_markers_1.default, | ||
contacts: contacts_1.default, | ||
getWalletCsvTransactions: get_wallet_csv_transactions_1.default, | ||
main: main_1.default, | ||
onChainTxFee: on_chain_tx_fee_1.default, | ||
quizQuestions: quiz_questions_1.default, | ||
transactionList: transaction_list_1.default, | ||
transactionListForContact: transaction_list_for_contact_1.default, | ||
transactionListForDefaultAccount: transaction_list_for_default_account_1.default, | ||
userDefaultWalletId: user_default_wallet_id_1.default, | ||
usernameAvailable: username_available_1.default, | ||
currencyList: currency_list_1.default, | ||
accountDefaultWallet: accountDefaultWallet, | ||
btcPriceList: btcPriceList, | ||
businessMapMarkers: businessMapMarkers, | ||
contacts: contacts, | ||
getWalletCsvTransactions: getWalletCsvTransactions, | ||
main: main, | ||
onChainTxFee: onChainTxFee, | ||
quizQuestions: quizQuestions, | ||
transactionList: transactionList, | ||
transactionListForContact: transactionListForContact, | ||
transactionListForDefaultAccount: transactionListForDefaultAccount, | ||
userDefaultWalletId: userDefaultWalletId, | ||
usernameAvailable: usernameAvailable, | ||
currencyList: currencyList, | ||
}; | ||
@@ -90,0 +88,0 @@ var useQueryWrapper = function (queryName, config) { |
import { SubscriptionHookOptions, SubscriptionResult } from "@apollo/client"; | ||
import { GaloyGQL } from "../index"; | ||
export declare const SUBSCRIPTIONS: { | ||
myUpdates: import("@apollo/client").DocumentNode; | ||
lnInvoicePaymentStatus: import("@apollo/client").DocumentNode; | ||
myUpdates: any; | ||
lnInvoicePaymentStatus: any; | ||
}; | ||
declare type SubscriptionHelpers = { | ||
type SubscriptionHelpers = { | ||
errorsMessage?: string; | ||
@@ -9,0 +9,0 @@ }; |
@@ -13,5 +13,2 @@ "use strict"; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -21,7 +18,8 @@ exports.useSubscription = exports.SUBSCRIPTIONS = void 0; | ||
var index_1 = require("../index"); | ||
var my_updates_1 = __importDefault(require("./subscriptions/my-updates")); | ||
var ln_invoice_payment_status_1 = __importDefault(require("./subscriptions/ln-invoice-payment-status")); | ||
var load_files_1 = require("@graphql-tools/load-files"); | ||
var myUpdates = (0, load_files_1.loadFilesSync)("./subscriptions/my-updates.gql")[0]; | ||
var lnInvoicePaymentStatus = (0, load_files_1.loadFilesSync)("./subscriptions/my-updates.gql")[0]; | ||
exports.SUBSCRIPTIONS = { | ||
myUpdates: my_updates_1.default, | ||
lnInvoicePaymentStatus: ln_invoice_payment_status_1.default, | ||
myUpdates: myUpdates, | ||
lnInvoicePaymentStatus: lnInvoicePaymentStatus, | ||
}; | ||
@@ -28,0 +26,0 @@ var useSubscriptionWrapper = function (subscriptionName, config) { |
import { LnUrlPayServiceArgs, LnUrlPayServiceResponse, LnUrlRequestInvoiceArgs, LnUrlRequestInvoiceResponse } from "lnurl-pay/dist/types/types"; | ||
import { Network } from "../parsing-v2"; | ||
declare type isLnurlPaymentSameNodeArgs = { | ||
type isLnurlPaymentSameNodeArgs = { | ||
lnUrlOrAddress: string; | ||
@@ -5,0 +5,0 @@ ourNode: string; |
@@ -17,3 +17,3 @@ "use strict"; | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
while (g && (g = 0, op[0] && (_ = 0)), _) try { | ||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | ||
@@ -20,0 +20,0 @@ if (y = 0, t) op = [op[0] & 2, t.value]; |
import bolt11 from "bolt11"; | ||
export declare type Network = "mainnet" | "signet" | "regtest"; | ||
export type Network = "mainnet" | "signet" | "regtest"; | ||
export declare const parseBolt11Network: (network: string) => bolt11.Network; | ||
@@ -15,3 +15,3 @@ export declare const getDescription: (decoded: bolt11.PaymentRequestObject) => string | undefined; | ||
} | ||
export declare type UnknownPaymentDestination = { | ||
export type UnknownPaymentDestination = { | ||
paymentType: PaymentType.Unknown; | ||
@@ -22,3 +22,3 @@ }; | ||
} | ||
export declare type LnurlPaymentDestination = { | ||
export type LnurlPaymentDestination = { | ||
paymentType: PaymentType.Lnurl; | ||
@@ -37,3 +37,3 @@ valid: true; | ||
} | ||
export declare type LightningPaymentDestination = { | ||
export type LightningPaymentDestination = { | ||
paymentType: PaymentType.Lightning; | ||
@@ -55,3 +55,3 @@ valid: true; | ||
} | ||
export declare type OnchainPaymentDestination = { | ||
export type OnchainPaymentDestination = { | ||
paymentType: PaymentType.Onchain; | ||
@@ -67,11 +67,11 @@ valid: true; | ||
}; | ||
export declare type IntraledgerPaymentDestination = { | ||
export type IntraledgerPaymentDestination = { | ||
paymentType: PaymentType.Intraledger; | ||
handle: string; | ||
}; | ||
export declare type ParsedPaymentDestination = UnknownPaymentDestination | LnurlPaymentDestination | LightningPaymentDestination | OnchainPaymentDestination | IntraledgerPaymentDestination; | ||
export type ParsedPaymentDestination = UnknownPaymentDestination | LnurlPaymentDestination | LightningPaymentDestination | OnchainPaymentDestination | IntraledgerPaymentDestination; | ||
export declare const lightningInvoiceHasExpired: (payReq: bolt11.PaymentRequestObject) => boolean; | ||
export declare const getLightningInvoiceExpiryTime: (payReq: bolt11.PaymentRequestObject) => number; | ||
export declare const decodeInvoiceString: (invoice: string, network: Network) => bolt11.PaymentRequestObject; | ||
declare type ParsePaymentDestinationArgs = { | ||
type ParsePaymentDestinationArgs = { | ||
destination: string; | ||
@@ -78,0 +78,0 @@ network: Network; |
@@ -5,4 +5,4 @@ import bolt11 from "bolt11"; | ||
export declare const getHashFromInvoice: (invoice: string, network?: bolt11.Network) => string | undefined; | ||
export declare type Network = "mainnet" | "signet" | "regtest"; | ||
export declare type PaymentType = "lightning" | "onchain" | "intraledger" | "lnurl"; | ||
export type Network = "mainnet" | "signet" | "regtest"; | ||
export type PaymentType = "lightning" | "onchain" | "intraledger" | "lnurl"; | ||
export interface ValidPaymentResponse { | ||
@@ -23,3 +23,3 @@ valid: boolean; | ||
export declare const decodeInvoiceString: (invoice: string, network?: bolt11.Network) => bolt11.PaymentRequestObject; | ||
declare type ParsePaymentDestinationArgs = { | ||
type ParsePaymentDestinationArgs = { | ||
destination: string; | ||
@@ -26,0 +26,0 @@ network: Network; |
@@ -141,3 +141,3 @@ declare const ES: { | ||
}; | ||
export declare type TranslationKey = keyof typeof ES; | ||
export type TranslationKey = keyof typeof ES; | ||
export default ES; |
{ | ||
"name": "@galoymoney/client", | ||
"main": "dist/index.js", | ||
"version": "0.1.63", | ||
"version": "0.1.64", | ||
"license": "MIT", | ||
@@ -21,2 +21,3 @@ "repository": "https://github.com/galoymoney/galoy-client", | ||
"@apollo/client": ">=3.6.0", | ||
"@graphql-tools/load-files": "^6.6.1", | ||
"bitcoinjs-lib": "~6.0.2", | ||
@@ -26,7 +27,8 @@ "bolt11": "~1.3.4", | ||
"graphql": ">=16.0.0", | ||
"graphql-ws": "^5.11.2", | ||
"lnurl-pay": "^1.0.1", | ||
"react": ">=17.0.0", | ||
"react-dom": ">=17.0.0", | ||
"subscriptions-transport-ws": ">=0.11.0", | ||
"url": ">=0.11.0" | ||
"url": ">=0.11.0", | ||
"ws": "^8.11.0" | ||
}, | ||
@@ -39,2 +41,3 @@ "devDependencies": { | ||
"@graphql-codegen/typescript-operations": "^2.5.11", | ||
"@graphql-tools/load-files": "^6.6.1", | ||
"@types/jest": "^28.1.4", | ||
@@ -57,7 +60,7 @@ "@types/react": "^18.0.15", | ||
"react-dom": "^18.2.0", | ||
"subscriptions-transport-ws": "^0.11.0", | ||
"ts-jest": "^28.0.5", | ||
"typescript": "^4.7.4", | ||
"typescript": "^4.9.4", | ||
"url": "^0.11.0" | ||
} | ||
}, | ||
"dependencies": {} | ||
} |
Sorry, the diff of this file is too big to display
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
0
505634
12
96
9489