@galoymoney/client
Advanced tools
Comparing version 0.0.15 to 0.0.16
@@ -11,5 +11,5 @@ "use strict"; | ||
var client_1 = require("@apollo/client"); | ||
var transaction_list_fragment_1 = __importDefault(require("../fragments/transaction-list-fragment")); | ||
var main = (0, client_1.gql)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n query main($hasToken: Boolean!, $recentTransactions: Int = 3) {\n globals {\n nodesIds\n }\n btcPrice {\n base\n offset\n currencyUnit\n formattedAmount\n }\n me @include(if: $hasToken) {\n id\n language\n username\n phone\n defaultAccount {\n id\n defaultWalletId\n wallets {\n id\n balance\n walletCurrency\n transactions(first: $recentTransactions) {\n ...TransactionList\n }\n }\n }\n }\n }\n ", "\n"], ["\n query main($hasToken: Boolean!, $recentTransactions: Int = 3) {\n globals {\n nodesIds\n }\n btcPrice {\n base\n offset\n currencyUnit\n formattedAmount\n }\n me @include(if: $hasToken) {\n id\n language\n username\n phone\n defaultAccount {\n id\n defaultWalletId\n wallets {\n id\n balance\n walletCurrency\n transactions(first: $recentTransactions) {\n ...TransactionList\n }\n }\n }\n }\n }\n ", "\n"])), transaction_list_fragment_1.default); | ||
var me_fragment_1 = __importDefault(require("../fragments/me-fragment")); | ||
var main = (0, client_1.gql)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n query main($hasToken: Boolean!, $recentTransactions: Int) {\n globals {\n nodesIds\n }\n btcPrice {\n base\n offset\n currencyUnit\n formattedAmount\n }\n me @include(if: $hasToken) {\n ...Me\n }\n }\n ", "\n"], ["\n query main($hasToken: Boolean!, $recentTransactions: Int) {\n globals {\n nodesIds\n }\n btcPrice {\n base\n offset\n currencyUnit\n formattedAmount\n }\n me @include(if: $hasToken) {\n ...Me\n }\n }\n ", "\n"])), me_fragment_1.default); | ||
exports.default = main; | ||
var templateObject_1; |
@@ -6,6 +6,10 @@ "use strict"; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var client_1 = require("@apollo/client"); | ||
var myUpdates = (0, client_1.gql)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n subscription myUpdates {\n myUpdates {\n errors {\n message\n }\n me {\n id\n defaultAccount {\n id\n wallets {\n id\n walletCurrency\n balance\n }\n }\n }\n update {\n type: __typename\n ... on Price {\n base\n offset\n currencyUnit\n formattedAmount\n }\n ... on LnUpdate {\n walletId\n paymentHash\n status\n }\n ... on OnChainUpdate {\n walletId\n txNotificationType\n txHash\n amount\n usdPerSat\n }\n ... on IntraLedgerUpdate {\n walletId\n txNotificationType\n amount\n usdPerSat\n }\n }\n }\n }\n"], ["\n subscription myUpdates {\n myUpdates {\n errors {\n message\n }\n me {\n id\n defaultAccount {\n id\n wallets {\n id\n walletCurrency\n balance\n }\n }\n }\n update {\n type: __typename\n ... on Price {\n base\n offset\n currencyUnit\n formattedAmount\n }\n ... on LnUpdate {\n walletId\n paymentHash\n status\n }\n ... on OnChainUpdate {\n walletId\n txNotificationType\n txHash\n amount\n usdPerSat\n }\n ... on IntraLedgerUpdate {\n walletId\n txNotificationType\n amount\n usdPerSat\n }\n }\n }\n }\n"]))); | ||
var me_fragment_1 = __importDefault(require("../fragments/me-fragment")); | ||
var myUpdates = (0, client_1.gql)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n subscription myUpdates($recentTransactions: Int = 5) {\n myUpdates {\n errors {\n message\n }\n me {\n ...Me\n }\n update {\n type: __typename\n ... on Price {\n base\n offset\n currencyUnit\n formattedAmount\n }\n ... on LnUpdate {\n walletId\n paymentHash\n status\n }\n ... on OnChainUpdate {\n walletId\n txNotificationType\n txHash\n amount\n usdPerSat\n }\n ... on IntraLedgerUpdate {\n walletId\n txNotificationType\n amount\n usdPerSat\n }\n }\n }\n }\n ", "\n"], ["\n subscription myUpdates($recentTransactions: Int = 5) {\n myUpdates {\n errors {\n message\n }\n me {\n ...Me\n }\n update {\n type: __typename\n ... on Price {\n base\n offset\n currencyUnit\n formattedAmount\n }\n ... on LnUpdate {\n walletId\n paymentHash\n status\n }\n ... on OnChainUpdate {\n walletId\n txNotificationType\n txHash\n amount\n usdPerSat\n }\n ... on IntraLedgerUpdate {\n walletId\n txNotificationType\n amount\n usdPerSat\n }\n }\n }\n }\n ", "\n"])), me_fragment_1.default); | ||
exports.default = myUpdates; | ||
var templateObject_1; |
@@ -30,2 +30,6 @@ import { QueryResult, QueryHookOptions } from "@apollo/client"; | ||
}>> | undefined) => QueryResult<GaloyGQL.OnChainTxFeeQuery> & QueryHelpers; | ||
transactionList: (config?: QueryHookOptions<GaloyGQL.TransactionListQuery, GaloyGQL.Exact<{ | ||
first?: GaloyGQL.InputMaybe<number> | undefined; | ||
after?: GaloyGQL.InputMaybe<string> | undefined; | ||
}>> | undefined) => QueryResult<GaloyGQL.TransactionListQuery> & QueryHelpers; | ||
}; | ||
@@ -32,0 +36,0 @@ export declare const useDelayedQuery: { |
@@ -95,5 +95,9 @@ "use strict"; | ||
}; | ||
var transactionListQuery = function (config) { | ||
return useQueryWrapper("transactionList", config); | ||
}; | ||
exports.useQuery = { | ||
main: mainQuery, | ||
onChainTxFee: onChainTxFeeQuery, | ||
transactionList: transactionListQuery, | ||
}; | ||
@@ -100,0 +104,0 @@ // ********** DELAYED QUERIES ********** // |
@@ -11,5 +11,5 @@ import { SubscriptionHookOptions, SubscriptionResult } from "@apollo/client"; | ||
myUpdates: (config?: SubscriptionHookOptions<GaloyGQL.MyUpdatesSubscription, GaloyGQL.Exact<{ | ||
[key: string]: never; | ||
recentTransactions?: GaloyGQL.InputMaybe<number> | undefined; | ||
}>> | undefined) => SubscriptionResult<GaloyGQL.MyUpdatesSubscription> & SubscriptionHelpers; | ||
}; | ||
export {}; |
declare const ES: { | ||
readonly "Address has been copied to the clipboard": undefined; | ||
readonly "Activate Wallet": undefined; | ||
readonly Address: undefined; | ||
readonly "Amount is required": undefined; | ||
readonly Back: undefined; | ||
readonly Bank: undefined; | ||
readonly "Bitcoin Price": undefined; | ||
readonly Bitcoin: undefined; | ||
readonly Cancel: undefined; | ||
readonly "Cash Account": undefined; | ||
readonly "Click QR code to copy": undefined; | ||
readonly Close: undefined; | ||
readonly "Coming soon!": undefined; | ||
readonly Confirm: undefined; | ||
readonly "Current Balance": undefined; | ||
readonly Date: undefined; | ||
readonly Description: undefined; | ||
readonly Domain: undefined; | ||
readonly "Email Support": undefined; | ||
readonly Email: undefined; | ||
readonly "Enter amount and destination": undefined; | ||
readonly "Enter your phone number and we'll text you an access code": undefined; | ||
readonly "Error loading transactions": undefined; | ||
readonly Error: undefined; | ||
readonly "Export transactions as CSV": undefined; | ||
readonly Fatal: undefined; | ||
readonly fee: undefined; | ||
readonly Fee: undefined; | ||
readonly "Fees (sats)": undefined; | ||
readonly "Fees (USD)": undefined; | ||
readonly Fees: undefined; | ||
readonly "First Name": undefined; | ||
readonly "Generate new invoice for %{amount}": undefined; | ||
readonly "Generate New Invoice": undefined; | ||
readonly Home: undefined; | ||
readonly hour: undefined; | ||
readonly Hash: undefined; | ||
readonly hours: undefined; | ||
readonly "Invaild country code": undefined; | ||
@@ -20,9 +48,22 @@ readonly "Invaild verification. Please try again": undefined; | ||
readonly "Invoice value is now %{value}": undefined; | ||
readonly Invoice: undefined; | ||
readonly "Language preference": undefined; | ||
readonly Language: undefined; | ||
readonly "Last Name": undefined; | ||
readonly Later: undefined; | ||
readonly Lightning: undefined; | ||
readonly "Log Out": undefined; | ||
readonly "Login to send": undefined; | ||
readonly Login: undefined; | ||
readonly Logout: undefined; | ||
readonly minutes: undefined; | ||
readonly Next: undefined; | ||
readonly "No connection": undefined; | ||
readonly "No transactions": undefined; | ||
readonly "Not able to generate invoice.": undefined; | ||
readonly Note: undefined; | ||
readonly Notification: undefined; | ||
readonly OK: undefined; | ||
readonly OnChain: undefined; | ||
readonly "Open Wallet": undefined; | ||
readonly "Payment amount exceeds balance of %{balance} sats": undefined; | ||
@@ -32,2 +73,3 @@ readonly "Payment failed": undefined; | ||
readonly "Phone number is too short": undefined; | ||
readonly "Phone Number": undefined; | ||
readonly "Please try again later.": undefined; | ||
@@ -39,18 +81,43 @@ readonly "Powered By": undefined; | ||
readonly "Reload Application": undefined; | ||
readonly Restart: undefined; | ||
readonly sats: undefined; | ||
readonly "Scan QR code": undefined; | ||
readonly Search: undefined; | ||
readonly Security: undefined; | ||
readonly "Send another payment": undefined; | ||
readonly "Send Bitcoin": undefined; | ||
readonly "Send Payment": undefined; | ||
readonly Send: undefined; | ||
readonly "Set a note for the receiver here (optional)": undefined; | ||
readonly "Set a note for the sender here (optional)": undefined; | ||
readonly "set an amount": undefined; | ||
readonly "Set invoice value in %{currency}": undefined; | ||
readonly "Set value to send in %{currency}": undefined; | ||
readonly "Share Bitcoin Address": undefined; | ||
readonly "Share Lightning Invoice": undefined; | ||
readonly Share: undefined; | ||
readonly "Sorry, we appear to be having issues loading the application data. If the problem persists, please contact support.": undefined; | ||
readonly "Success!": undefined; | ||
readonly "To confirm your phone number, enter the code we just sent you on %{phoneNumber}": undefined; | ||
readonly To: undefined; | ||
readonly Total: undefined; | ||
readonly "Transaction Details": undefined; | ||
readonly Transactions: undefined; | ||
readonly "Try Again": undefined; | ||
readonly Type: undefined; | ||
readonly "Username is required": undefined; | ||
readonly "username or invoice": undefined; | ||
readonly Username: undefined; | ||
readonly "Validate your phone to open your wallet": undefined; | ||
readonly "Verify you are human": undefined; | ||
readonly "Waiting for payment confirmation...": undefined; | ||
readonly "You can't send to yourself": undefined; | ||
readonly "You have been logged out.": undefined; | ||
readonly "You received": undefined; | ||
readonly "You spent": undefined; | ||
readonly "Your session has expired. Please log in again.": undefined; | ||
readonly "Received from": undefined; | ||
readonly "Sent to": undefined; | ||
}; | ||
export declare type VALID_KEYS = keyof typeof ES; | ||
export default ES; |
@@ -6,11 +6,39 @@ "use strict"; | ||
"Address has been copied to the clipboard": undefined, | ||
"Activate Wallet": undefined, | ||
"Address": undefined, | ||
"Amount is required": undefined, | ||
"Back": undefined, | ||
"Bank": undefined, | ||
"Bitcoin Price": undefined, | ||
"Bitcoin": undefined, | ||
"Cancel": undefined, | ||
"Cash Account": undefined, | ||
"Click QR code to copy": undefined, | ||
"Close": undefined, | ||
"Coming soon!": undefined, | ||
"Confirm": undefined, | ||
"Current Balance": undefined, | ||
"Date": undefined, | ||
"Description": undefined, | ||
"Domain": undefined, | ||
"Email Support": undefined, | ||
"Email": undefined, | ||
"Enter amount and destination": undefined, | ||
"Enter your phone number and we'll text you an access code": undefined, | ||
"Error loading transactions": undefined, | ||
"Error": undefined, | ||
"Export transactions as CSV": undefined, | ||
"Fatal": undefined, | ||
"fee": undefined, | ||
"Fee": undefined, | ||
"Fees (sats)": undefined, | ||
"Fees (USD)": undefined, | ||
"Fees": undefined, | ||
"First Name": undefined, | ||
"Generate new invoice for %{amount}": undefined, | ||
"Generate New Invoice": undefined, | ||
"Home": undefined, | ||
"hour": undefined, | ||
"Hash": undefined, | ||
"hours": undefined, | ||
"Invaild country code": undefined, | ||
@@ -24,9 +52,22 @@ "Invaild verification. Please try again": undefined, | ||
"Invoice value is now %{value}": undefined, | ||
"Invoice": undefined, | ||
"Language preference": undefined, | ||
"Language": undefined, | ||
"Last Name": undefined, | ||
"Later": undefined, | ||
"Lightning": undefined, | ||
"Log Out": undefined, | ||
"Login to send": undefined, | ||
"Login": undefined, | ||
"Logout": undefined, | ||
"minutes": undefined, | ||
"Next": undefined, | ||
"No connection": undefined, | ||
"No transactions": undefined, | ||
"Not able to generate invoice.": undefined, | ||
"Note": undefined, | ||
"Notification": undefined, | ||
"OK": undefined, | ||
"OnChain": undefined, | ||
"Open Wallet": undefined, | ||
"Payment amount exceeds balance of %{balance} sats": undefined, | ||
@@ -36,2 +77,3 @@ "Payment failed": undefined, | ||
"Phone number is too short": undefined, | ||
"Phone Number": undefined, | ||
"Please try again later.": undefined, | ||
@@ -43,17 +85,42 @@ "Powered By": undefined, | ||
"Reload Application": undefined, | ||
"Restart": undefined, | ||
"sats": undefined, | ||
"Scan QR code": undefined, | ||
"Search": undefined, | ||
"Security": undefined, | ||
"Send another payment": undefined, | ||
"Send Bitcoin": undefined, | ||
"Send Payment": undefined, | ||
"Send": undefined, | ||
"Set a note for the receiver here (optional)": undefined, | ||
"Set a note for the sender here (optional)": undefined, | ||
"set an amount": undefined, | ||
"Set invoice value in %{currency}": undefined, | ||
"Set value to send in %{currency}": undefined, | ||
"Share Bitcoin Address": undefined, | ||
"Share Lightning Invoice": undefined, | ||
"Share": undefined, | ||
"Sorry, we appear to be having issues loading the application data. If the problem persists, please contact support.": undefined, | ||
"Success!": undefined, | ||
"To confirm your phone number, enter the code we just sent you on %{phoneNumber}": undefined, | ||
"To": undefined, | ||
"Total": undefined, | ||
"Transaction Details": undefined, | ||
"Transactions": undefined, | ||
"Try Again": undefined, | ||
"Type": undefined, | ||
"Username is required": undefined, | ||
"username or invoice": undefined, | ||
"Username": undefined, | ||
"Validate your phone to open your wallet": undefined, | ||
"Verify you are human": undefined, | ||
"Waiting for payment confirmation...": undefined, | ||
"You can't send to yourself": undefined, | ||
"You have been logged out.": undefined, | ||
"You received": undefined, | ||
"You spent": undefined, | ||
"Your session has expired. Please log in again.": undefined, | ||
"Received from": undefined, | ||
"Sent to": undefined, | ||
}; | ||
exports.default = ES; |
export declare const formatRelativeTime: (timestamp: number) => string | undefined; | ||
export declare const formatTime: (timestamp: number) => string; | ||
export declare const formatUsd: (value: number) => string; | ||
export declare const satsToBTC: (satsAmount: number) => number; |
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.satsToBTC = exports.formatUsd = exports.formatRelativeTime = void 0; | ||
exports.satsToBTC = exports.formatUsd = exports.formatTime = exports.formatRelativeTime = void 0; | ||
var i18n_js_1 = __importDefault(require("i18n-js")); | ||
@@ -34,2 +34,13 @@ var DIVISIONS = [ | ||
exports.formatRelativeTime = formatRelativeTime; | ||
var formatTime = function (timestamp) { | ||
return new Date(timestamp).toLocaleString("en-US", { | ||
weekday: "short", | ||
year: "numeric", | ||
month: "short", | ||
day: "numeric", | ||
hour: "numeric", | ||
minute: "numeric", | ||
}); | ||
}; | ||
exports.formatTime = formatTime; | ||
var usdFormatter = new Intl.NumberFormat("en-US", { | ||
@@ -36,0 +47,0 @@ style: "currency", |
{ | ||
"name": "@galoymoney/client", | ||
"main": "dist/index.js", | ||
"version": "0.0.15", | ||
"version": "0.0.16", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "repository": "https://github.com/galoymoney/galoy-client", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
183267
95
3554